Skip to content

Commit a9cabf2

Browse files
committed
Merge upstream/main into Discord reply chunks PR
2 parents e7bb7b7 + c79c380 commit a9cabf2

1,384 files changed

Lines changed: 83866 additions & 24073 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/crabbox/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ pnpm crabbox:run -- --help | sed -n '1,120p'
4343

4444
- OpenClaw scripts prefer `../crabbox/bin/crabbox` when present. The user PATH
4545
shim can be stale.
46-
- Check `.crabbox.yaml` for direct-provider defaults. Omitting `--provider`
47-
means brokered AWS for normal Linux/macOS paths; the wrapper selects Azure
48-
for unqualified Windows/WSL2 runs when the local Crabbox binary advertises
49-
Azure.
50-
- The brokered AWS default is a Linux developer image in `eu-west-1`; the repo
46+
- Check `.crabbox.yaml` for the provider default. Omitting `--provider`
47+
means Blacksmith Testbox through Crabbox for normal Linux paths; the wrapper
48+
selects Azure for unqualified Windows/WSL2 runs when the local Crabbox
49+
binary advertises Azure. Pass `--provider aws` for direct brokered AWS runs.
50+
- The brokered AWS image is a Linux developer image in `eu-west-1`; the repo
5151
config pins hot `eu-west-1a/b/c` placement so Fast Snapshot Restore can apply.
5252
If warmup drifts well past the minute-scale path, verify image promotion,
5353
region/AZ placement, and FSR state before blaming OpenClaw.

.agents/skills/openclaw-changelog-update/scripts/verify-release-notes.mjs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const nonEditorialTypes = new Set([
1919
const nonEditorialTitlePattern =
2020
/(?:^|[\s:([{\-])(docs?|documentation|tests?|testing|qa|quality assurance|refactor(?:ing)?|ci|continuous integration|build|chore|style|lint|format)(?:$|[\s:)\]}\-])/i;
2121
const editorialTitlePattern =
22-
/^\s*(?:\[[^\]]+\]\s*)?(?:#\d+:\s*)?(?:add|allow|block|enable|expose|fail|fix|harden|honor|improve|keep|migrate|move|persist|preserve|prevent|propagate|rate[- ]?limit|restore|revert|ship|support|treat|validate)\b|^\s*#\d+:/i;
22+
/^\s*(?:\[[^\]]+\]\s*)?(?:#\d+:\s*)?(?:add|allow|block|enable|expose|fail|fix|harden|honor|improve|keep|migrate|move|persist|polish|preserve|prevent|propagate|rate[- ]?limit|restore|revert|ship|support|treat|validate)\b|^\s*#\d+:/i;
2323
const genericDirectCommitTerms = new Set([
2424
"add",
2525
"allow",
@@ -656,9 +656,12 @@ function resolveAssociatedPullRequests(commitHashes, targetTimestamp) {
656656
const pullRequests = pullRequestsByCommit.get(commitHash) ?? [];
657657
const seen = new Set(pullRequests);
658658
for (const pullRequest of connection?.nodes ?? []) {
659+
// GitHub's mergedAt can trail the merge commit timestamp by a second.
660+
// Keep an exact merge-commit association so a release ending there does not drop its PR.
661+
const isExactMergeCommit = pullRequest.mergeCommit?.oid === commitHash;
659662
if (
660663
pullRequest.mergedAt &&
661-
mergedByTarget(pullRequest.mergedAt, targetTimestamp) &&
664+
(isExactMergeCommit || mergedByTarget(pullRequest.mergedAt, targetTimestamp)) &&
662665
!seen.has(pullRequest.number)
663666
) {
664667
pullRequests.push(pullRequest.number);
@@ -682,6 +685,7 @@ function resolveAssociatedPullRequests(commitHashes, targetTimestamp) {
682685
nodes {
683686
number
684687
mergedAt
688+
mergeCommit { oid }
685689
}
686690
pageInfo { hasNextPage endCursor }
687691
}
@@ -707,6 +711,7 @@ function resolveAssociatedPullRequests(commitHashes, targetTimestamp) {
707711
nodes {
708712
number
709713
mergedAt
714+
mergeCommit { oid }
710715
}
711716
pageInfo { hasNextPage endCursor }
712717
}
@@ -1191,7 +1196,7 @@ function ledgerFor(
11911196
(entry) =>
11921197
entry.type === "PullRequest" &&
11931198
entry.mergedAt &&
1194-
mergedByTarget(entry.mergedAt, targetTimestamp) &&
1199+
(sourcePullRequests.has(entry.number) || mergedByTarget(entry.mergedAt, targetTimestamp)) &&
11951200
recordedPullRequests.has(entry.number) &&
11961201
!revertedReferences.has(entry.number),
11971202
);
@@ -1514,7 +1519,7 @@ function main() {
15141519
return (
15151520
node?.__typename !== "PullRequest" ||
15161521
!node.mergedAt ||
1517-
!mergedByTarget(node.mergedAt, source.targetTimestamp)
1522+
(!source.pullRequests.has(number) && !mergedByTarget(node.mergedAt, source.targetTimestamp))
15181523
);
15191524
});
15201525
if (!options.writeLedger && invalidRecordedPullRequests.length > 0) {

.agents/skills/openclaw-testing/SKILL.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ Prove the touched surface first. Do not reflexively run the whole suite.
2828
For maintainer heavy `pnpm` gates, that is usually delegated Blacksmith
2929
Testbox through Crabbox, e.g. `node scripts/crabbox-wrapper.mjs run
3030
--provider blacksmith-testbox ... -- env OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 corepack pnpm check:changed`. For direct AWS
31-
Crabbox proof, omit `--provider` and let `.crabbox.yaml` choose AWS.
31+
Crabbox proof, pass `--provider aws`; omitting `--provider` follows the
32+
`.crabbox.yaml` default (Blacksmith Testbox).
3233
- workflow-only: `git diff --check`, workflow syntax/lint (`actionlint` when available)
3334
- docs-only: `pnpm docs:list`, docs formatter/lint only if docs tooling changed or requested
3435
2. Reproduce narrowly before fixing.
@@ -87,6 +88,36 @@ node scripts/run-vitest.mjs <path-or-filter>
8788
That keeps the test scoped without giving pnpm a chance to run dependency
8889
status checks or install reconciliation in a linked worktree.
8990

91+
## Plugin Package And Live Proof
92+
93+
When validating an external or official plugin package, prove the package shape
94+
and trust shape separately. Do not use raw archive/path installs to prove the
95+
managed dependency path, and do not treat `npm-pack:` as proof of catalog-linked
96+
official trust.
97+
98+
- For local release-candidate proof, pack the plugin and install it with
99+
`openclaw plugins install npm-pack:<path.tgz> --force`. This uses the managed
100+
per-plugin npm project and is the closest local substitute for the registry
101+
artifact's dependency behavior.
102+
- If the behavior depends on bundled-plugin or trusted official plugin status,
103+
add a second proof through a catalog-backed official install or a published
104+
package path that records official trust. Local `npm-pack:` proof alone is
105+
not sufficient for privileged helpers or trusted-official scope handling.
106+
- Treat missing runtime imports as package-manifest bugs first. Runtime code
107+
must depend on packages declared in the plugin package `dependencies` or
108+
`optionalDependencies`; do not make a final proof depend on manually running
109+
`npm install` inside `~/.openclaw/npm/projects/...`.
110+
- If the plugin ships `npm-shrinkwrap.json`, regenerate or check it after
111+
moving dependencies between dev and runtime sections.
112+
- Inspect the packed tarball when dependency ownership or generated `dist/`
113+
matters: verify `package/package.json`, the expected runtime files, and any
114+
package-local shrinkwrap before installing it on a live host.
115+
- After installing the package, restart the Gateway when the touched surface is
116+
plugin registration, runtime dependency loading, privileged helpers, provider
117+
routing, or generated dist.
118+
- For live provider or channel probes, add only temporary config needed for the
119+
proof, then remove it and verify the cleanup state before closeout.
120+
90121
## Command Semantics
91122

92123
- `pnpm check` and `pnpm check:changed` do not run Vitest tests. They are for

.crabbox.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
profile: openclaw-check
2-
# Default OpenClaw runner spend to the Azure-backed Crabbox account.
3-
# Use `--provider aws` only for AWS-specific runner proof.
4-
provider: azure
2+
# Default OpenClaw remote proof to Blacksmith Testbox through Crabbox: the
3+
# delegated CI environment owns checkout/hydration and leases reliably.
4+
# Use `--provider aws` for direct AWS runner proof; `--provider azure` spends
5+
# the Azure-backed credit account (its coordinator has stalled under load).
6+
provider: blacksmith-testbox
57
class: standard
68
capacity:
9+
# Class/capacity apply only to direct VM providers (`--provider aws|azure`);
10+
# delegated Blacksmith runs ignore them. Keep explicit on-demand capacity
11+
# instead of low-priority spot, whose regional quota is too small for broad
12+
# maintainer proof or parallel Crabbox lanes.
713
market: on-demand
814
strategy: most-available
9-
# The Azure-backed billing account carries the OpenClaw runner credits; use
10-
# explicit on-demand capacity instead of low-priority spot, whose regional
11-
# quota is too small for broad maintainer proof or parallel Crabbox lanes.
1215
hints: true
1316
actions:
1417
workflow: .github/workflows/crabbox-hydrate.yml

.github/codeql/openclaw-boundary/queries/raw-socket-callsite-classification.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ predicate allowedRawSocketClientCall(Expr call) {
6464
or
6565
allowedOwnerScope(call, "src/infra/gateway-lock.ts", "checkPortFree")
6666
or
67-
allowedOwnerScope(call, "src/infra/jsonl-socket.ts", "requestJsonlSocket")
67+
allowedOwnerScope(call, "src/infra/jsonl-socket.ts", "requestJsonlSocketWithMaxLineBytes")
6868
or
6969
allowedOwnerScope(call, "src/infra/net/http-connect-tunnel.ts", "connectToProxy")
7070
or

.github/labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,11 @@
359359
- any-glob-to-any-file:
360360
- "extensions/cerebras/**"
361361
- "docs/providers/cerebras.md"
362+
"extensions: clawrouter":
363+
- changed-files:
364+
- any-glob-to-any-file:
365+
- "extensions/clawrouter/**"
366+
- "docs/providers/clawrouter.md"
362367
"extensions: deepseek":
363368
- changed-files:
364369
- any-glob-to-any-file:

.github/workflows/ci-build-artifacts-testbox.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
permissions:
2828
contents: read
2929
name: "build-artifacts"
30-
runs-on: blacksmith-8vcpu-ubuntu-2404
30+
runs-on: blacksmith-16vcpu-ubuntu-2404
3131
timeout-minutes: 35
3232
steps:
3333
- name: Begin Testbox
@@ -156,7 +156,7 @@ jobs:
156156
- name: Build dist on cache miss
157157
if: steps.dist-cache.outputs.cache-hit != 'true'
158158
env:
159-
NODE_OPTIONS: --max-old-space-size=8192
159+
NODE_OPTIONS: --max-old-space-size=16384
160160
run: pnpm build:ci-artifacts
161161

162162
- name: Build Control UI on cache miss

.github/workflows/ci.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,12 @@ jobs:
288288
if (runNodeFull) {
289289
checksFastCoreTasks.push(
290290
{ check_name: "checks-fast-bundled-protocol", runtime: "node", task: "bundled-protocol" },
291-
{ check_name: "QA Smoke CI", runtime: "node", task: "qa-smoke-ci" },
291+
{
292+
check_name: "QA Smoke CI",
293+
runtime: "node",
294+
task: "qa-smoke-ci",
295+
runner: "blacksmith-16vcpu-ubuntu-2404",
296+
},
292297
{ check_name: "checks-fast-bun-launcher", runtime: "bun", task: "bun-launcher" },
293298
);
294299
} else {
@@ -845,7 +850,7 @@ jobs:
845850
name: ${{ matrix.check_name }}
846851
needs: [preflight]
847852
if: needs.preflight.outputs.run_checks_fast_core == 'true'
848-
runs-on: ${{ github.event_name == 'workflow_dispatch' && 'ubuntu-24.04' || (github.repository == 'openclaw/openclaw' && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-24.04') }}
853+
runs-on: ${{ github.event_name == 'workflow_dispatch' && 'ubuntu-24.04' || (github.repository == 'openclaw/openclaw' && (matrix.runner || 'blacksmith-4vcpu-ubuntu-2404') || 'ubuntu-24.04') }}
849854
timeout-minutes: 60
850855
strategy:
851856
fail-fast: false
@@ -872,12 +877,17 @@ jobs:
872877
;;
873878
qa-smoke-ci)
874879
output_dir=".artifacts/qa-e2e/smoke-ci-profile"
880+
package_dir=".artifacts/qa-e2e/smoke-ci-package"
875881
export OPENCLAW_BUILD_PRIVATE_QA=1
876882
export OPENCLAW_ENABLE_PRIVATE_QA_CLI=1
877883
export OPENCLAW_DISABLE_BUNDLED_PLUGINS=0
878884
export OPENCLAW_QA_REDACT_PUBLIC_METADATA=1
879885
export OPENCLAW_QA_TRANSPORT_READY_TIMEOUT_MS=180000
880-
NODE_OPTIONS=--max-old-space-size=8192 node scripts/build-all.mjs qaRuntime
886+
export NODE_OPTIONS=--max-old-space-size=16384
887+
node scripts/package-openclaw-for-docker.mjs \
888+
--output-dir "$package_dir" \
889+
--output-name openclaw-current.tgz
890+
export OPENCLAW_CURRENT_PACKAGE_TGZ="$PWD/$package_dir/openclaw-current.tgz"
881891
qa_exit_code=0
882892
pnpm openclaw qa run \
883893
--repo-root . \

.github/workflows/control-ui-locale-refresh.yml

Lines changed: 62 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,31 +200,86 @@ jobs:
200200
201201
run_openai_refresh
202202
203-
- name: Commit and push locale updates
203+
- name: Prepare locale artifact
204204
env:
205205
LOCALE: ${{ matrix.locale }}
206+
run: |
207+
set -euo pipefail
208+
artifact_dir="${RUNNER_TEMP}/control-ui-locale-${LOCALE}"
209+
mkdir -p "${artifact_dir}"
210+
git add -A ui/src/i18n
211+
git diff --cached --binary --full-index -- ui/src/i18n > "${artifact_dir}/${LOCALE}.patch"
212+
213+
- name: Upload locale artifact
214+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
215+
with:
216+
name: control-ui-locale-${{ matrix.locale }}
217+
path: ${{ runner.temp }}/control-ui-locale-${{ matrix.locale }}/${{ matrix.locale }}.patch
218+
if-no-files-found: error
219+
retention-days: 1
220+
221+
finalize:
222+
name: Commit control UI locale refresh
223+
needs: refresh
224+
if: needs.refresh.result == 'success'
225+
runs-on: ubuntu-latest
226+
steps:
227+
- name: Checkout
228+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
229+
with:
230+
fetch-depth: 0
231+
persist-credentials: true
232+
submodules: false
233+
234+
- name: Download locale artifacts
235+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
236+
with:
237+
pattern: control-ui-locale-*
238+
path: ${{ runner.temp }}/control-ui-locale-artifacts
239+
merge-multiple: true
240+
241+
- name: Apply locale artifacts
242+
run: |
243+
set -euo pipefail
244+
while IFS= read -r patch; do
245+
if [ -s "${patch}" ]; then
246+
git apply "${patch}"
247+
fi
248+
done < <(find "${RUNNER_TEMP}/control-ui-locale-artifacts" -type f -name '*.patch' | sort)
249+
250+
- name: Setup Node environment
251+
uses: ./.github/actions/setup-node-env
252+
with:
253+
install-bun: "false"
254+
255+
- name: Validate control UI locale refresh
256+
run: node --import tsx scripts/control-ui-i18n.ts check
257+
258+
- name: Commit and push aggregate locale refresh
259+
env:
206260
TARGET_BRANCH: ${{ github.event.repository.default_branch }}
207261
run: |
208262
set -euo pipefail
209-
if git diff --quiet -- ui/src/i18n; then
210-
echo "No control UI locale changes for ${LOCALE}."
263+
if ! git status --porcelain -- ui/src/i18n | grep -q .; then
264+
echo "No control UI locale changes."
211265
exit 0
212266
fi
213267
214268
git config user.name "github-actions[bot]"
215269
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
216270
git add -A ui/src/i18n
217-
git commit --no-verify -m "chore(ui): refresh ${LOCALE} control ui locale"
271+
git commit --no-verify -m "chore(ui): refresh control ui locales"
218272
219273
for attempt in 1 2 3 4 5; do
220274
git fetch origin "${TARGET_BRANCH}"
221-
git rebase --autostash "origin/${TARGET_BRANCH}"
275+
git rebase "origin/${TARGET_BRANCH}"
222276
if git push origin HEAD:"${TARGET_BRANCH}"; then
223277
exit 0
224278
fi
225-
echo "Push attempt ${attempt} for ${LOCALE} failed; retrying."
279+
git rebase --abort >/dev/null 2>&1 || true
280+
echo "Aggregate push attempt ${attempt} failed; retrying."
226281
sleep $((attempt * 2))
227282
done
228283
229-
echo "Failed to push ${LOCALE} locale update after retries."
284+
echo "Failed to push aggregate control UI locale update after retries."
230285
exit 1

0 commit comments

Comments
 (0)