Commit Graph

38498 Commits

Author SHA1 Message Date
Yuval Dinodia
864bb18738 fix(cron): cap trigger script tool access (#104430)
* fix(cron): cap trigger script tool access

Persist the creator tool cap for any cron job with a trigger script and pass it to the headless trigger runtime. System event and command payloads retain the cap across cron updates.

* fix(cron): persist trigger tool cap for systemEvent and command payloads

The creator tool cap is stamped on systemEvent and command payloads whenever a
cron job carries a trigger script, but the SQLite codec dropped
payload.toolsAllow for those kinds. After a gateway restart the reloaded job
carried no cap and the trigger regained the full coding surface. Persist and
restore toolsAllow through the existing payload_tools_allow_json column for all
payload kinds, and add restart-aware round-trip coverage.

* ci: re-trigger workflows (transient self-hosted runner flake)

* fix(cron): use expectDefined for store test job access

* refactor(cron): hoist cron tool types, payload merge, and wire types into companion modules

Keeps the oversized cron files at or below their baseline line counts for the
changed-file TypeScript LOC ratchet on main. No behavior change.

* fix(cron): retain freshly stamped cap markers

* test(ci): align compact shard count

* fix(cron): make trigger cap updates atomic

* fix(cron): preserve explicit cap provenance

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Peter Steinberger <peter@steipete.me>
2026-07-15 00:01:26 -07:00
Wynne668
b01c7619cc fix(media): handle uploads with conflicting MIME metadata (#107863)
* fix(media): prefer attachment bytes for MIME detection

* fix(media): honor detected MIME in explicit image paths

Co-authored-by: ZengWen-DT <ceng.wen@xydigit.com>

* fix(media): preserve ambiguous audio container hints

Co-authored-by: ZengWen-DT <ceng.wen@xydigit.com>

* fix(media): narrow ambiguous MIME overrides

Co-authored-by: ZengWen-DT <ceng.wen@xydigit.com>

* fix(media): reconcile fetched MIME hints

Co-authored-by: ZengWen-DT <ceng.wen@xydigit.com>

* fix(media): refine generic ZIP MIME metadata

Co-authored-by: ZengWen-DT <ceng.wen@xydigit.com>

* fix(media): preserve compatible ZIP MIME hints

Co-authored-by: ZengWen-DT <ceng.wen@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-14 23:57:56 -07:00
Peter Steinberger
0754d23615 fix: group native sessions by host (#108062)
* fix(control-ui): group native sessions by host

* test: satisfy native session checks

* chore: remove release-owned changelog entry
2026-07-14 23:51:00 -07:00
Peter Steinberger
92d06e51bb refactor(mcp): trim internal server exports (#108076)
* refactor(mcp): remove dead internal exports

* chore(deadcode): refresh export baseline
2026-07-14 23:47:38 -07:00
Peter Steinberger
92fc907ffb fix: preserve TUI restore state without JSON races (#108058)
* refactor(tui): move last session state to sqlite

* chore: keep release notes in PR body

* test: update doctor migration fixture

* chore: satisfy dead code export gate
2026-07-14 23:46:22 -07:00
Peter Steinberger
0240327fe7 refactor(security): privatize audit internals (#108067)
* refactor(security): privatize audit internals

* chore(deadcode): shrink security export baseline
2026-07-14 23:28:04 -07:00
Peter Steinberger
23c0a7b612 fix: preserve working installs on unsupported Node (#106994)
* fix(update): preserve installs on unsupported Node

* fix(update): verify skipped install scripts

* refactor(update): share global install preflight

* fix(update): validate Bun-installed Node runtime

* fix(update): classify install preflight failures

* refactor(update): normalize install failure reasons

* style(update): format updater policy test

* fix(update): preserve pnpm script policy safety

* fix(update): classify hosted git sources

* chore: leave release notes to release flow

* fix(release): defer package inventory helper loading

* style(release): keep inventory loader LOC-neutral

* fix(update): validate staged package lifecycle

* fix(update): match packed lifecycle contract

* fix(update): harden Bun package activation

* test(update): model packed Bun lifecycle

* style(update): avoid lifecycle name shadowing

* fix(update): remove unsafe Bun staging experiment

* fix(update): satisfy updater type checks

* fix(update): preserve packed npm package name

* fix(update): preserve checkout failure status

* fix(update): disable scripts while packing candidates

* fix(update): preflight source package engines safely

* fix(update): preserve legacy npm downgrades

* fix(update): pin npm packing to selected Node

* fix(update): stage npm activation before replacing live package

* fix(update): guard non-npm source activation

* refactor(update): isolate npm staging helpers

* fix(update): harden staged package lifecycle

* test(update): satisfy merged type gates

* fix(update): privatize runtime npm helper

* fix(ci): satisfy merged lint and type gates

* docs(changelog): defer updater note to release

* fix(update): guard package activation runtime

* fix(update): preserve installs on unsupported Node

* test(update): reject prerelease Node runtimes

* test(update): use shared temp cleanup

* fix(update): fail closed when install scripts are skipped

* fix(update): pack install guard in docker artifacts

* fix(ci): keep install guard export tooling-local
2026-07-14 23:19:48 -07:00
Peter Steinberger
bda5288365 fix(gateway): preserve MCP literal union schemas (#108054) 2026-07-14 23:17:42 -07:00
Peter Steinberger
75a48c0033 fix(config): align session maintenance validation (#108046) 2026-07-14 23:15:06 -07:00
Peter Steinberger
6ec5a2e5aa refactor(plugins): defer installed payload validation (#108051) 2026-07-14 23:14:06 -07:00
Peter Steinberger
3d4ba02574 feat(active-memory): add recall-specific fast mode (#108043)
* feat(active-memory): add fast mode override

* fix(agents): preserve fast auto cutoff

* fix(active-memory): inherit parent fast mode

* docs: refresh generated docs map
2026-07-14 23:09:04 -07:00
Peter Steinberger
f30d9b250a fix(worktrees): fail closed on owner lookup errors (#108041) 2026-07-14 23:06:26 -07:00
Peter Steinberger
701d02f241 refactor(gateway): make secret assignment projection explicit (#108040) 2026-07-14 22:56:54 -07:00
Leon-SK668
9f471d0189 fix(gateway): keep worker failures UTF-16 safe (#107718) 2026-07-14 22:51:38 -07:00
Peter Steinberger
ccefa7c028 test: speed exec no-output timer (#108037) 2026-07-14 22:48:11 -07:00
Peter Steinberger
d702f6fb33 ci: shorten full release validation critical path (#107894)
* ci(release): parallelize plugin Docker lanes

* test(plugins): expect malformed URL redaction

* ci: start release performance validation concurrently

* docs(agents): guard PR operations after throttling
2026-07-14 22:39:32 -07:00
Yuval Dinodia
d576881390 fix(github-copilot): reject unsupported OAuth enterprise domain before refresh and model routing (#105584)
* fix(github-copilot): reject unsupported OAuth enterprise domain before refresh and model routing

Legacy github-copilot OAuth credentials can carry a non-github.com
enterpriseUrl. The token-refresh path templated it into the endpoint and
sent the bearer refresh token there with no allowlist, and the model
routing path derived a base URL from the same credential, so an unexpired
credential kept routing its access token to that origin without ever
reaching a refresh.

A persisted credential origin that is not on the Copilot host allowlist
is now rejected before any request is issued and before any model URL is
produced. Because an off-allowlist origin means the stored access token
may itself have been minted by that origin, the credential is refused as
a whole rather than coerced to github.com: modifyModels withholds the
github-copilot models so the token has no route, and its proxy-ep is
never trusted. Login rejects an unsupported host up front, so every path
that turns a domain into a bearer-bearing URL validates first.
formatAuthDoctorHint guides affected users to re-authenticate, mirroring
the qwen-portal hint. Supported hosts are unchanged: github.com and
*.ghe.com data-residency tenants still route and refresh as before.

The allowlist plus a new isSupportedGithubCopilotDomain predicate move to
a dependency-free plugin-sdk leaf so the core OAuth runtime can share them
without closing a module cycle; plugin-sdk/provider-auth re-exports
normalizeGithubCopilotDomain, so the plugin-owned GitHub Copilot provider
keeps its existing import.

Fixes #103078.

* fix(github-copilot): resolve provider auth base conflict

* fix(github-copilot): resolve provider auth base conflict

* fix(github-copilot): validate token proxy endpoint

* fix(github-copilot): remove stale helper import

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Peter Steinberger <peter@steipete.me>
2026-07-14 22:29:35 -07:00
Peter Steinberger
b9a837ec8d refactor(agents): split agent session responsibilities (#107948) 2026-07-14 22:25:08 -07:00
Peter Steinberger
fbe033214d test: speed doctor plugin install tests (#108022) 2026-07-14 22:21:26 -07:00
Peter Steinberger
eebc0dbc33 refactor(auto-reply): split agent runner execution (#107985)
* refactor(auto-reply): split agent runner execution

* style(auto-reply): satisfy promise executor lint

* fix(ci): align refactor baselines and test types

* fix(ci): prune stale max-lines baseline
2026-07-14 22:20:25 -07:00
xydt-tanshanshan
f638cbd0f9 fix(doctor): preserve allowlist entries for version-bound runtime plugins during stale config scan (#107285)
* fix(doctor): preserve allowlist entries for version-bound runtime plugins (codex) during stale config scan

* fix(doctor): restore codex to scanner stale expectation, protect at repair-sequencing

Scanner now flags codex in plugins.allow as stale so diagnostics are visible.
Repair-sequencing preserves the entry via preservePluginIds which already
includes VERSION_BOUND_RUNTIME_PLUGIN_IDS.

* fix(doctor): scope version-bound runtime plugin preservation to allow surface only

ClawSweeper P2: VERSION_BOUND_RUNTIME_PLUGIN_IDS was applied globally
across all stale config surfaces (deny, entries, slots, channels, etc.),
but only plugins.allow needs preservation. Move to a surface-scoped
parameter surfacePreservePluginIds so codex is preserved only in allow.

* fix(doctor): harden version-bound allowlist repair

* fix(doctor): retain version-bound plugin policy

* fix(doctor): align version-bound plugin diagnostics

Co-authored-by: hailory <hailory@xydigit.com>

---------

Co-authored-by: hailory <hailory@xydigit.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-14 22:14:11 -07:00
Peter Steinberger
e9fc23ad1f refactor(plugin-sdk): remove private testing barrel ahead of window (#108020) 2026-07-14 22:13:37 -07:00
Peter Steinberger
290836cafd refactor(config): split config I/O responsibilities (#107983)
* refactor(config): split config I/O

* fix(config): align split modules with guardrails

* fix(config): remove dead write metadata helper

* style(config): format write safety imports

* fix(config): preserve comment-loss warning on split writes
2026-07-14 22:11:22 -07:00
snowzlmbot
1eec68a6a0 fix(gateway): recover when suppressed channel secrets are unavailable (#106826)
* fix(gateway): preserve safe-mode secret recovery

* test(gateway): sanitize SecretRef fixtures

Co-authored-by: snowzlmbot <293528334+snowzlmbot@users.noreply.github.com>

* test(gateway): use inert token placeholder

Co-authored-by: snowzlmbot <293528334+snowzlmbot@users.noreply.github.com>

---------

Co-authored-by: snowzlmbot <293528334+snowzlmbot@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-14 22:08:58 -07:00
mushuiyu886
646dfd7e76 fix(plugins): preserve state on npm metadata failures (#107063)
* fix(plugins): preserve state on npm metadata failures

* fix(plugins): harden npm metadata recovery

Co-authored-by: 杨浩宇0668001029 <yang.haoyu@xydigit.com>

* refactor(plugins): adapt metadata errors to installer split

Co-authored-by: 杨浩宇0668001029 <yang.haoyu@xydigit.com>

* fix(plugins): validate preserved npm payloads

Co-authored-by: 杨浩宇0668001029 <yang.haoyu@xydigit.com>

* fix(plugins): satisfy update lint

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-14 22:05:15 -07:00
Peter Steinberger
aac4c16f84 refactor(doctor): split Codex route diagnostics (#107955) 2026-07-14 22:02:56 -07:00
clawsweeper[bot]
3a208a5068 fix(discord): prevent presence wake floods after reconnects (#107969)
* feat(discord): throttle online-presence events after gateway reconnects

After a Discord gateway (re)connect the presence replay burst emitted one
system event per member, waking the agent each time. Add a per-account
emission gate: a post-reconnect suppression window (default 5 min), a
sliding-window burst limit (default 8/60s, logged once per episode), and
a configurable per-user greeting cooldown (default 8h). New guild
presenceEvents knobs: cooldownSeconds, reconnectSuppressSeconds,
burstLimit, burstWindowSeconds.

* fix(discord): preserve presence throttle retries

* fix(discord): preserve presence throttle retries

* fix(discord): scope presence throttle per guild

Co-authored-by: openclaw-clawsweeper[bot] <openclaw-clawsweeper[bot]@users.noreply.github.com>

* fix(discord): keep presence gate internals private

Co-authored-by: openclaw-clawsweeper[bot] <openclaw-clawsweeper[bot]@users.noreply.github.com>

---------

Co-authored-by: openclaw-clawsweeper[bot] <openclaw-clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Peter Steinberger <peter@steipete.me>
2026-07-14 22:02:53 -07:00
Peter Steinberger
74eea60e1b test(ci): serialize hooks process bootstraps (#107977)
* test(ci): serialize hooks process bootstraps

* fix(ci): repair main gate contracts

* fix(ci): refresh max-lines suppression baseline
2026-07-14 22:01:47 -07:00
Peter Steinberger
56ff612606 test(worktrees): cover session liveness across gc entry points (#107989)
Co-authored-by: RickLin <83101411+ObliviateRickLin@users.noreply.github.com>
2026-07-14 21:59:49 -07:00
Peter Steinberger
cbded6808b test: speed doctor preview warnings (#108017) 2026-07-14 21:53:25 -07:00
Monkey-wusky
4a9a556a3a fix(config): reject zero-value resetArchiveRetention to prevent silent data loss (#104516)
* fix(config): reject zero-value resetArchiveRetention to prevent silent data loss

* fix: add braces to guard clauses for curly lint rule

* fix: normalize numeric values and cover pruneAfter fallback in migration

* fix: reject zero-value pruneAfter at schema level to close fallback gap

* fix: independently check and repair both retention fields in migration

* fix: split doctor diagnostics into field-specific rules and messages

* fix: remove unused local in migration test helper

* fix: repair 5 lint errors (curly braces, zero-fraction, narrow value)

* fix(doctor): rewrite zero resetArchiveRetention to false instead of deleting it

Deleting a zero resetArchiveRetention caused the runtime to fall back to
pruneAfter (default 30d), which contradicted the doctor output that
claimed archives would be kept indefinitely.  Only an explicit false
value produces indefinite retention per the documented schema.

- P1: Rewrite zero resetArchiveRetention to false in the doctor
  migration apply callback, matching the promised indefinite-retention
  behavior.
- P3: Update the pruneAfter rule warning to describe eligible
  stale/non-preserved session entries instead of "all sessions".

* fix(config): repair zero retention safely

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Peter Steinberger <peter@steipete.me>
2026-07-14 21:47:40 -07:00
Erick Kinnee
067bc662fa fix(sqlite): distinguish shared system SQLite in WAL safety error (#107771)
* fix(sqlite): distinguish shared system SQLite from embedded in WAL safety error

* test(sqlite): cover shared build diagnostics

Co-authored-by: Erick Kinnee <erick@ekinnee.dev>

* style(sqlite): format shared build check

Co-authored-by: Erick Kinnee <erick@ekinnee.dev>

---------

Co-authored-by: Erick Kinnee <erick@ekinnee.dev>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-14 21:46:09 -07:00
Patrick Erichsen
ef110e9a0f fix(state): prefer SQLite plugin metadata during migration (#107961)
* fix(state): prefer SQLite plugin install metadata

* test(gateway): type hidden boundary metadata

* test(ci): prune retired QA Matrix line baseline

* test(ci): prune retired QA Matrix line baseline

* fix(state): ignore legacy plugin JSON after SQLite

* fix(state): prefer SQLite plugin install metadata

* fix(state): keep legacy JSON inert after SQLite migration

* fix(state): prefer SQLite plugin install metadata

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-14 21:41:19 -07:00
Peter Steinberger
4401aa7031 test: speed doctor host compatibility tests (#108008) 2026-07-14 21:40:27 -07:00
lee-xydt
6ce439da25 fix(config): warn before stripping JSON5 comments on config write (#107604)
* fix(config): warn before stripping JSON5 comments on config write

Add checkCommentLossWarning in json5-comments.ts to detect JSON5 comments
before config writes. Warn via deps.logger.warn for main config writes and
via options.warn for $include file writes. Both paths support skipOutputLogs
to suppress warnings during automated operations.

Fixes #105683

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(config): remove public warn callback, route through internal sink

Fixes #105683

- Remove warn field from exported ConfigWriteOptions (P1 merge-risk)
- Default checkCommentLossWarning to console.warn when no callback
- Move include warning after hash-conflict/rejection checks
- Update tests to spy on console.warn instead of custom callback

* fix(config): warn before stripping JSON5 comments

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Peter Steinberger <peter@steipete.me>
2026-07-14 21:39:18 -07:00
Peter Steinberger
decdaf1718 fix(ci): restore session history types and max-lines gate (#107987)
* fix(gateway): type inline session history messages

* fix(ci): prune stale max-lines baseline
2026-07-14 21:24:40 -07:00
Peter Steinberger
81d634be50 test: speed CLI capture suites (#107993) 2026-07-14 21:16:34 -07:00
Peter Steinberger
cb60e0a667 ci: stabilize release validation checks (#106959) 2026-07-15 05:03:43 +01:00
jincheng-xydt
41aa36a6e7 fix(doctor): accept memory provider none without api key (#107778)
* fix(doctor): accept memory provider none without api key

* test(doctor): preserve FTS-only backend diagnostics

Co-authored-by: jincheng-xydt <xu.jincheng@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-14 21:01:38 -07:00
Peter Steinberger
3eb8b3a0f8 refactor(plugins): split plugin installation flows (#107960)
* refactor(plugins): split plugin installation flows

* fix(plugins): keep compatibility helper private
2026-07-14 20:51:21 -07:00
Peter Steinberger
7748574c4b fix: stabilize flaky test shards blocking merges (#107938)
* test: stabilize flaky test shards

* style: format Feishu delivery trace types
2026-07-14 20:41:54 -07:00
Shakker
4755dee240 fix: preserve hidden chat run boundaries 2026-07-15 04:38:01 +01:00
Peter Steinberger
a3f06fb119 perf(test): speed up managed worktree fixtures (#107908) 2026-07-14 20:29:53 -07:00
Peter Steinberger
ac6eef5958 test: speed up CLI supervisor capture suite (#107932) 2026-07-14 20:21:45 -07:00
Peter Steinberger
652266b8b6 test: speed up hooks process lifecycle coverage (#107954) 2026-07-14 20:15:23 -07:00
Peter Steinberger
894cc604a5 refactor(core): declare outbound target grammar on the messaging adapter (batch 2) (#107953)
* refactor(core): declare outbound target grammar on the messaging adapter (batch 2)

* test(outbound): drop a useless spread in the comparison fixture
2026-07-14 20:09:00 -07:00
Shakker
2c95bd2387 fix: repair main CI regressions 2026-07-15 04:03:56 +01:00
Peter Steinberger
acbe29c411 refactor(channels): privatize message access internals (#107949) 2026-07-14 20:03:39 -07:00
Peter Steinberger
ed12937cbd refactor(plugin-sdk)!: delete the zero-consumer channel-ingress facade, AccessFacts projections, and dead dispatch aliases (#107906)
* refactor(plugin-sdk)!: delete the zero-consumer channel-ingress facade, AccessFacts projections, and dead dispatch aliases

* chore(plugin-sdk): refresh API baseline hash for the facade deletions

* fix(channels): drop dead AccessFacts field writes stranded by the facade deletion

* chore(plugin-sdk): refresh API baseline hash after rebase
2026-07-14 19:43:18 -07:00
Kyle Klouzal
2333bd59db fix: keep yielded parent turns nonterminal (#95996)
* fix: keep yielded parent turns nonterminal

* fix: type chat final stop reasons

* test: isolate yielded session reconciliation

* fix: refresh yielded lifecycle generated surfaces

* test: register Codex lifecycle test shard

---------

Co-authored-by: FullerStackDev <263060202+fuller-stack-dev@users.noreply.github.com>
2026-07-14 20:35:33 -06:00