Skip to content

Commit 51ce791

Browse files
Merge remote-tracking branch 'upstream/main' into fix/codex-terminal-overflow-binding
# Conflicts: # extensions/codex/src/app-server/run-attempt.ts
2 parents b403fe7 + 440e737 commit 51ce791

1,848 files changed

Lines changed: 95074 additions & 18043 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/discrawl/SKILL.md

Lines changed: 131 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: discrawl
3-
description: "Discord archive: search, sync freshness, DMs, channel slices, SQL counts, and Discrawl repo work."
3+
description: "Discord archive: search, sync freshness, DMs, summaries, TUI, repo/release work."
44
metadata:
55
openclaw:
66
homepage: https://github.com/openclaw/discrawl
@@ -16,29 +16,154 @@ metadata:
1616

1717
# Discrawl
1818

19-
Use local Discord archive data before live Discord APIs. Check freshness for recent/current questions:
19+
Use local Discord archive data first for Discord questions. Hit Discord APIs
20+
only when the archive is stale, missing the requested scope, or the user asks
21+
for current external context.
22+
23+
## Sources
24+
25+
- DB: platform-native XDG data dir, usually
26+
`${XDG_DATA_HOME:-~/.local/share}/discrawl/discrawl.db` on Linux or
27+
`~/Library/Application Support/discrawl/discrawl.db` on macOS
28+
- Config: platform-native XDG config dir, with legacy fallback to
29+
`~/.discrawl/config.toml`
30+
- Cache: platform-native XDG cache dir
31+
- Logs: platform-native XDG state dir
32+
- Git share repo: platform-native XDG data dir
33+
- Repo: `openclaw/discrawl`; use `~/GIT/_Perso/discrawl` only after verifying
34+
its remote targets `openclaw/discrawl`, otherwise use a fresh checkout
35+
- Preferred CLI: `discrawl`; fallback to `go run ./cmd/discrawl` from the repo
36+
if the installed binary is stale
37+
38+
## Freshness
39+
40+
For recent/current questions, check freshness before analysis:
2041

2142
```bash
2243
discrawl status --json
44+
```
45+
46+
For precise freshness from the default database:
47+
48+
```bash
49+
# Discrawl uses macOS ~/Library defaults unless XDG_DATA_HOME is explicitly set.
50+
case "$(uname -s)" in
51+
Darwin)
52+
db="$HOME/Library/Application Support/discrawl/discrawl.db"
53+
;;
54+
*)
55+
db="${XDG_DATA_HOME:-$HOME/.local/share}/discrawl/discrawl.db"
56+
;;
57+
esac
58+
sqlite3 "$db" \
59+
"select coalesce(max(updated_at),'') from sync_state where scope like 'channel:%';"
60+
```
61+
62+
Routine diagnostics:
63+
64+
```bash
2365
discrawl doctor
2466
```
2567

26-
Refresh only when stale or asked:
68+
Desktop-local refresh:
2769

2870
```bash
2971
discrawl sync --source wiretap
72+
```
73+
74+
Bot API latest refresh, when credentials are available:
75+
76+
```bash
3077
discrawl sync
3178
```
3279

33-
Query with bounded slices:
80+
Use `--full` only for deliberate historical backfills:
81+
82+
```bash
83+
discrawl sync --full
84+
```
85+
86+
If SQLite reports busy/locked, check for stray `discrawl` processes before retrying.
87+
88+
## Query Workflow
89+
90+
1. Resolve scope: guild, channel, DM, author, keyword, date range.
91+
2. Check freshness for recent/current requests.
92+
3. Prefer CLI search/messages for slices; use read-only SQL for exact counts.
93+
4. Report absolute date spans, counts, channel/DM names, and known gaps.
94+
95+
Use root or subcommand help for syntax: `discrawl --help`,
96+
`discrawl help search`, `discrawl search --help`. Use
97+
`DISCRAWL_NO_AUTO_UPDATE=1` for read smokes when you do not want git-share
98+
updates.
99+
100+
Common commands:
34101

35102
```bash
36103
DISCRAWL_NO_AUTO_UPDATE=1 discrawl search --limit 20 "query"
37104
discrawl messages --channel '#maintainers' --days 7 --all
38105
discrawl dms --last 20
106+
discrawl tui --dm
39107
DISCRAWL_NO_AUTO_UPDATE=1 discrawl --json sql "select count(*) from messages;"
40108
```
41109

42-
Report absolute date spans, channel/DM names, counts, and known gaps. Use read-only SQL for exact counts/rankings. Never use `--unsafe --confirm` unless the user explicitly requests a reviewed DB mutation.
110+
## SQL
111+
112+
Use `discrawl sql` for exact counts, joins, and ranking queries when normal
113+
CLI reads are too coarse. The command is read-only by default, accepts SQL as
114+
args or stdin, and supports `--json` for agent parsing.
115+
116+
Useful examples:
117+
118+
```bash
119+
DISCRAWL_NO_AUTO_UPDATE=1 discrawl --json sql "select count(*) as messages from messages;"
120+
DISCRAWL_NO_AUTO_UPDATE=1 discrawl --json sql "select coalesce(nullif(c.name, ''), m.channel_id) as channel, count(*) as messages from messages m left join channels c on c.id = m.channel_id group by m.channel_id order by messages desc limit 20;"
121+
DISCRAWL_NO_AUTO_UPDATE=1 discrawl --json sql "select coalesce(nullif(mm.display_name, ''), nullif(mm.global_name, ''), nullif(mm.username, ''), m.author_id) as author, count(*) as messages from messages m left join members mm on mm.guild_id = m.guild_id and mm.user_id = m.author_id group by m.guild_id, m.author_id order by messages desc limit 20;"
122+
```
123+
124+
Never use `--unsafe --confirm` unless the user explicitly asks for a database
125+
mutation and the write has been reviewed.
126+
127+
When the installed CLI lacks a new feature, build or run from a verified
128+
`openclaw/discrawl` checkout before concluding the feature is missing.
129+
130+
## Discord Boundaries
131+
132+
Bot API sync requires configured Discord bot credentials; do not invent token
133+
availability. Desktop wiretap mode reads local Discord Desktop artifacts and
134+
must not extract credentials, use user tokens, call Discord as the user, or
135+
write to Discord application storage. Wiretap/Desktop cache DMs are local-only
136+
and must not be described as part of the published Git snapshot. Git-share
137+
snapshots must not include secrets or `@me` DM rows.
138+
139+
## Verification
140+
141+
For repo edits, prefer existing Go gates:
142+
143+
```bash
144+
GOWORK=off go test ./...
145+
```
146+
147+
Then run targeted CLI smoke for the touched surface, for example:
148+
149+
```bash
150+
discrawl doctor
151+
discrawl status --json
152+
DISCRAWL_NO_AUTO_UPDATE=1 discrawl search --limit 5 "test"
153+
```
154+
155+
## ClawSweeper Sandbox
156+
157+
Use the sandbox reader only:
158+
159+
```bash
160+
discrawl-sandbox search --limit 20 "query"
161+
discrawl-sandbox messages --channel clawtributors --days 7 --all
162+
discrawl-sandbox status --json
163+
```
43164

44-
Boundaries: bot sync needs configured Discord bot credentials. Wiretap reads local Discord Desktop artifacts only; do not extract user tokens, call Discord as the user, or write to Discord storage. Git-share snapshots must not include secrets or `@me` DM rows.
165+
This reader imports `https://github.com/openclaw/discord-store.git` into
166+
`/root/clawsweeper-sandbox-workspace/.discrawl/discrawl.db` with
167+
`discord.token_source = "none"`. The published Git snapshot is public-channel
168+
filtered; do not use `/root/.discrawl/config.toml` or the rich writer DB from
169+
sandboxed public Discord sessions.

.agents/skills/openclaw-changelog-update/SKILL.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ description: Regenerate OpenClaw release changelog sections from git history bef
66
# OpenClaw Changelog Update
77

88
Use this for release changelog rewrites and GitHub release-note source text.
9-
Use it with `release-openclaw-maintainer`; this skill owns changelog content,
10-
ordering, and audit discipline.
9+
This is mandatory before every beta, beta rerun, stable release, or stable
10+
rerun. Use it with `release-openclaw-maintainer`; this skill owns changelog
11+
content, ordering, grouping, and attribution discipline.
1112

1213
## Goal
1314

1415
Rewrite the target `CHANGELOG.md` version section from history, not from stale
15-
draft notes. Produce user-facing release notes sorted by user interest while
16-
preserving issue/PR refs and thanks.
16+
draft notes. Produce grouped user-facing release notes sorted by user interest
17+
while preserving every relevant issue/PR ref and every human `Thanks @...`
18+
attribution.
1719

1820
## Inputs
1921

@@ -44,10 +46,18 @@ preserving issue/PR refs and thanks.
4446
- `### Highlights`: 5-8 bullets, broad user wins first
4547
- `### Changes`: new capabilities and behavior changes
4648
- `### Fixes`: user-facing fixes first, grouped by impact and surface
49+
- group related changes/fixes by surface and user impact; avoid one bullet
50+
per tiny commit when several commits tell one user-facing story
4751
6. Preserve attribution:
4852
- keep `#issue`, `(#PR)`, `Fixes #...`, and `Thanks @...`
4953
- every human-authored merged PR represented by a user-facing entry needs
5054
its PR ref and `Thanks @author`, even when the PR had no linked issue
55+
- when grouping multiple PRs/issues in one bullet, include every relevant
56+
PR/issue ref and every human contributor handle in that same bullet
57+
- multiple `Thanks @...` handles in one bullet are expected; do not drop or
58+
collapse contributor credit just because the note is grouped
59+
- if one grouped bullet covers both direct commits and PRs, keep all PR refs
60+
and thanks, plus any issue refs from the direct commits
5161
- do not add GHSA references, advisory IDs, or security advisory slugs to
5262
changelog entries or GitHub release-note text unless explicitly requested
5363
- never thank bots, `@openclaw`, `@clawsweeper`, or `@steipete`

.agents/skills/release-openclaw-ci/scripts/release-ci-summary.mjs

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,30 @@ function jsonGh(args) {
2121
return JSON.parse(gh(args));
2222
}
2323

24+
function githubRestJson(pathSuffix) {
25+
const result = execFileSync(
26+
"bash",
27+
[
28+
"-lc",
29+
[
30+
"set -euo pipefail",
31+
'token="$(gh auth token)"',
32+
'curl -fsS -H "Authorization: Bearer ${token}" -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" "${OPENCLAW_GITHUB_REST_URL}"',
33+
].join("\n"),
34+
],
35+
{
36+
encoding: "utf8",
37+
env: {
38+
...process.env,
39+
OPENCLAW_GITHUB_REST_URL: `https://api.github.com/repos/${repo}/${pathSuffix}`,
40+
},
41+
maxBuffer: 16 * 1024 * 1024,
42+
stdio: ["ignore", "pipe", "pipe"],
43+
},
44+
);
45+
return JSON.parse(result);
46+
}
47+
2448
function rate() {
2549
try {
2650
return jsonGh(["api", "rate_limit"]).resources.core;
@@ -59,12 +83,30 @@ for (const job of parent.jobs ?? []) {
5983
}
6084

6185
const since = parent.createdAt;
62-
const runList = gh([
63-
"api",
64-
`repos/${repo}/actions/runs?per_page=100`,
65-
"--jq",
66-
`.workflow_runs[] | select(.created_at >= "${since}") | select(.name=="CI" or .name=="OpenClaw Release Checks" or .name=="Plugin Prerelease" or .name=="NPM Telegram Beta E2E" or .name=="Full Release Validation") | [.id,.name,.status,.conclusion,.head_sha,.html_url] | @tsv`,
67-
]).trim();
86+
const runsQuery = new URLSearchParams({
87+
per_page: "100",
88+
created: `>=${since}`,
89+
exclude_pull_requests: "true",
90+
});
91+
const childWorkflowNames = new Set([
92+
"CI",
93+
"OpenClaw Release Checks",
94+
"Plugin Prerelease",
95+
"NPM Telegram Beta E2E",
96+
"Full Release Validation",
97+
]);
98+
const runs = githubRestJson(`actions/runs?${runsQuery.toString()}`).workflow_runs ?? [];
99+
const runList = runs
100+
.filter(
101+
(run) =>
102+
run.created_at >= since &&
103+
run.head_sha === parent.headSha &&
104+
childWorkflowNames.has(run.name),
105+
)
106+
.map((run) =>
107+
[run.id, run.name, run.status, run.conclusion ?? "", run.head_sha, run.html_url].join("\t"),
108+
)
109+
.join("\n");
68110

69111
if (!runList) {
70112
console.log("children: none found yet");

.agents/skills/release-openclaw-maintainer/SKILL.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,13 @@ Use this skill for release and publish-time workflow. Load `$release-private` if
6969
or clawgrit reports. Report regressions explicitly. A major regression is a
7070
release blocker unless the operator waives it or the data clearly proves
7171
infrastructure noise.
72-
- Generate the changelog before version/tag preparation so the top changelog
73-
section is deduped and ordered by user impact. Use
74-
`$openclaw-changelog-update` for the rewrite.
72+
- Generate the changelog before every beta, beta rerun, stable release, or
73+
stable rerun, before version/tag preparation. Use
74+
`$openclaw-changelog-update` for the rewrite. Do not continue release prep if
75+
the target `CHANGELOG.md` section does not have `### Highlights`,
76+
`### Changes`, and `### Fixes`, grouped by user-facing surface while
77+
preserving every relevant PR/issue ref and every human `Thanks @...`
78+
attribution in the grouped bullet.
7579
- Do not create beta-specific `CHANGELOG.md` headings. Beta releases use the
7680
stable base version section, for example `v2026.4.20-beta.1` uses
7781
`## 2026.4.20` release notes.
@@ -144,6 +148,9 @@ Use this skill for release and publish-time workflow. Load `$release-private` if
144148
section from history, not existing notes. Use the last reachable stable or
145149
beta release tag as the base, then inspect every commit through the target
146150
release SHA.
151+
- The changelog rewrite is not optional for beta reruns: any `beta.N` after a
152+
rebase or backport must refresh the same stable-base `## YYYY.M.D` section
153+
before the new version/tag commit.
147154
- Include both merged PR commits and direct commits on `main`. Direct commits
148155
matter: infer notes from their subject, body, touched files, linked issues,
149156
tests, and nearby code when no PR body exists.
@@ -157,6 +164,11 @@ Use this skill for release and publish-time workflow. Load `$release-private` if
157164
- Add missed user-facing changes, remove internal-only noise, dedupe overlapping
158165
PR/direct-commit entries, and sort each section from most to least interesting
159166
for users.
167+
- Group related highlights, changes, and fixes by user-facing surface and
168+
impact, but never lose traceability: each grouped bullet keeps every relevant
169+
`#issue`, `(#PR)`, `Fixes #...`, and every human `Thanks @...` handle.
170+
Multiple thanks in one bullet are expected when multiple contributor PRs are
171+
grouped.
160172
- Changelog entries should be user-facing, not internal release-process notes.
161173
- GitHub release and prerelease bodies must use the full matching
162174
`CHANGELOG.md` version section, not highlights or an excerpt. When creating

.github/actions/ensure-base-commit/action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,15 @@ runs:
3838
exit 0
3939
fi
4040
41+
fetch_base_ref() {
42+
timeout --signal=TERM --kill-after=10s 30s git \
43+
-c protocol.version=2 \
44+
fetch "$@"
45+
}
46+
4147
for deepen_by in 25 100 300; do
4248
echo "Base commit missing; deepening $FETCH_REF by $deepen_by."
43-
if ! git fetch --no-tags --deepen="$deepen_by" origin -- "$FETCH_REF"; then
49+
if ! fetch_base_ref --no-tags --deepen="$deepen_by" origin -- "$FETCH_REF"; then
4450
echo "::warning title=ensure-base-commit fetch failed::Failed to deepen $FETCH_REF by $deepen_by while looking for $BASE_SHA"
4551
fi
4652
if git rev-parse --verify "$BASE_SHA^{commit}" >/dev/null 2>&1; then
@@ -50,7 +56,7 @@ runs:
5056
done
5157
5258
echo "Base commit still missing; fetching full history for $FETCH_REF."
53-
if ! git fetch --no-tags origin -- "$FETCH_REF"; then
59+
if ! fetch_base_ref --no-tags origin -- "$FETCH_REF"; then
5460
echo "::warning title=ensure-base-commit fetch failed::Failed to fetch full history for $FETCH_REF while looking for $BASE_SHA"
5561
fi
5662
if git rev-parse --verify "$BASE_SHA^{commit}" >/dev/null 2>&1; then

.github/codeql/codeql-network-runtime-boundary-critical-quality.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ queries:
99
paths:
1010
- src
1111
- extensions
12+
- packages/net-policy/src
1213

1314
paths-ignore:
1415
- "**/node_modules"

.github/codeql/codeql-network-ssrf-boundary-critical-security.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ query-filters:
1515

1616
paths:
1717
- src/infra/net
18-
- src/shared/net
1918
- src/agents/tools/web-fetch.ts
2019
- src/agents/tools/web-guarded-fetch.ts
2120
- src/agents/tools/web-shared.ts
2221
- src/plugin-sdk/ssrf-policy.ts
2322
- src/web-fetch
2423
- src/web/provider-runtime-shared.ts
2524
- packages/memory-host-sdk/src/host/ssrf-policy.ts
25+
- packages/net-policy/src
2626

2727
paths-ignore:
2828
- "**/node_modules"

.github/labeler.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@
4747
- "extensions/meeting-notes/**"
4848
- "docs/plugins/meeting-notes.md"
4949
- "src/meeting-notes/**"
50+
"plugin: workboard":
51+
- changed-files:
52+
- any-glob-to-any-file:
53+
- "extensions/workboard/**"
54+
- "docs/plugins/workboard.md"
55+
- "docs/plugins/reference/workboard.md"
5056
"plugin: migrate-hermes":
5157
- changed-files:
5258
- any-glob-to-any-file:

.github/workflows/auto-response.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ permissions: {}
1919

2020
jobs:
2121
auto-response:
22-
if: >-
23-
${{
24-
!(
25-
(github.event.action == 'labeled' || github.event.action == 'unlabeled') &&
26-
github.event.label.name == 'dependency-guard-backfill'
27-
)
28-
}}
2922
permissions:
3023
contents: read
3124
issues: write

0 commit comments

Comments
 (0)