Commit Graph

38533 Commits

Author SHA1 Message Date
Peter Steinberger
3fccaec469 fix: let doctor migrate legacy operator approvals (#108203)
* fix(state): avoid nested approval migration transaction

* fix(ci): repair system agent checks

* test(agents): align harness scope assertions
2026-07-15 02:39:36 -07:00
Ayaan Zaidi
2b4c03cae8 fix(telegram): keep rich HTML islands intact on message-tool sends 2026-07-15 14:57:55 +05:30
Ayaan Zaidi
195e29343b feat(telegram): map agent HTML islands to typed rich blocks 2026-07-15 14:57:55 +05:30
Peter Steinberger
ce2bc379a3 refactor(deadcode): repair system-agent export ratchet (#108201)
* refactor(agents): privatize delegation tool factory

* refactor(state): privatize approval migration helpers

* refactor(ui): privatize approval event parsers

* chore(deadcode): remove system-agent baseline growth
2026-07-15 02:11:42 -07:00
mushuiyu886
f946f45ef1 fix(sessions): preserve UTF-8 across tail reads (#108151) 2026-07-15 02:08:58 -07:00
Peter Steinberger
69595af402 refactor(sessions): trim internal exports (#108191)
* refactor(sessions): trim internal exports

* chore(deadcode): shrink sessions export baseline
2026-07-15 02:03:06 -07:00
Peter Steinberger
30bbe1b385 fix(system-agent): atomic approval migration + credential-scoped fallback
Final review findings:
- Wrap the operator-approval copy/drop/rename in a single immediate
  transaction so a crash mid-migration cannot strand or lose rows.
- The inference fallback marked a provider attempted before probing, so a
  stale requester credential blocked another agent's valid same-provider
  route. Dedup by credential owner and only retire a whole provider on
  provider-wide failures (auth/billing may differ per credential owner).

Refs #107237
2026-07-15 01:56:31 -07:00
Peter Steinberger
a97bdfb687 feat(agents): narrow gateway tool to read-only config
Phase 3 of #107237. Removes config.apply/config.patch/restart from the
regular-agent gateway tool (mirroring Phase 2's update.run removal); only
config.get and config.schema.lookup reads remain. Persistent config changes
and restarts now go exclusively through the human-approved openclaw
delegation path — closing the last unmediated agent config-write surface.
gateway stays owner-only/control-plane gated (config reads expose secrets and
host topology). Legacy setups can re-enable writes via the existing per-agent
tool allowlist; no new config key. Net -2271 LOC.

Refs #107237
2026-07-15 01:56:31 -07:00
Peter Steinberger
ea1b524d8d fix(state): fail-closed operator-approval migration
Review P2: the doctor repair only checked operator_approvals column NAMES, so
a look-alike table with different constraints/defaults would get its rows
copied under today's schema, silently discarding those semantics. Gate the
destructive replacement on the exact prior canonical DDL (the two-kind
constraint before system-agent). Test proves it refuses a same-columns table
with a different kind constraint.

Refs #107237
2026-07-15 01:56:31 -07:00
Peter Steinberger
b1f4aac349 feat(agents): OpenClaw system-agent delegation
New openclaw delegation tool relays to openclaw.chat in-process; persistent
writes surface through the existing durable operator-approval registry as a
third system-agent kind (no parallel store), armed only by a human operator
in the Control UI — a delegated agent can never self-approve. Setup wizards
(channel/model/open-setup/open-tui) are refused in delegated mode so a
machine agent cannot complete setup or persist credentials unattended.
Vendor-neutral inference fallback ladder (requester route first, then other
authed providers by provider id). update.run removed from the gateway tool.
Caveman system-prompt fragment steers config/channels/plugins/agents/updates
to the openclaw tool. Doctor-owned state migration widens the approval-kind
constraint; runtime stays canonical-only.

Refs #107237
2026-07-15 01:56:31 -07:00
Peter Steinberger
75db23f3fc fix: prevent stale rescue approvals from executing (#108147)
* fix(system-agent): persist rescue approvals in sqlite

Co-authored-by: Yung-Chen Tang <46495124+yungchentang@users.noreply.github.com>

* fix(system-agent): narrow rescue expiry clock

* test(system-agent): isolate rescue docker inference

* test(system-agent): align rescue docker doctor contract

* test(system-agent): accept canonical model shape

* fix(system-agent): refuse remote doctor repairs

* fix(infra): break rescue migration import cycle

* test(system-agent): lock rescue publish ordering

* test(system-agent): align rescue harness assertions

---------

Co-authored-by: Yung-Chen Tang <46495124+yungchentang@users.noreply.github.com>
2026-07-15 01:53:00 -07:00
Peter Steinberger
40dd08a0a6 refactor(context-engine): trim internal registry exports (#108179)
* refactor(context-engine): trim internal registry exports

* chore(deadcode): refresh export baseline
2026-07-15 01:52:20 -07:00
Peter Steinberger
6eda184f27 refactor: simplify native session executable resolution (#108169) 2026-07-15 01:49:45 -07:00
Peter Steinberger
3bd9e280e4 refactor(acp): trim internal dead exports (#108170)
* refactor(acp): trim internal dead exports

* chore(deadcode): refresh export baseline
2026-07-15 01:37:08 -07:00
Peter Steinberger
ad1071bcd0 refactor: split agent runner execution and preserve probe state (#108137)
* refactor(auto-reply): split agent runner execution

* fix(auto-reply): preserve concurrent probe selection

* fix(auto-reply): refresh rejected probe cache

* fix(auto-reply): preserve probe cache updates

* fix(auto-reply): preserve concurrent probe cache state

* fix(auto-reply): guard persisted probe generation

* fix(auto-reply): snapshot nested probe cache state

* fix(auto-reply): merge probe cleanup cache updates

* fix(auto-reply): privatize fallback cycle types
2026-07-15 01:35:37 -07:00
Peter Steinberger
3861bce485 test(ci): separate hooks output and exit deadlines (#108162) 2026-07-15 01:35:17 -07:00
Peter Steinberger
b6989cbaf2 refactor(cron): isolate creator tool caps (#108122)
* refactor(cron): isolate creator tool caps

Co-authored-by: yetval <yetvald@gmail.com>

* fix(cron): keep creator cap plan internal

* test(cron): derive internal patch plan type

---------

Co-authored-by: yetval <yetvald@gmail.com>
2026-07-15 01:25:41 -07:00
Peter Steinberger
40e245856e fix: synchronize gateway dispatch tests before invocation (#108138)
* test(gateway): capture dispatch baseline before invocation

* docs(agents): guard local PR token identity
2026-07-15 01:22:23 -07:00
Dallin Romney
ad34552473 refactor(qa): migrate Matrix scenarios into QA Lab (#103589)
* refactor(qa): migrate Matrix scenarios into QA Lab

* fix(qa): build Matrix boundary declarations

* fix(qa): preserve Matrix preview boundaries

* fix(qa): preserve Matrix hot reload semantics

* fix(qa): harden Matrix destructive scenario failures

* fix(qa): harden Matrix scenario isolation

* fix(qa): close Matrix negative scenario blind spots

* fix(qa): isolate Matrix substrate state

* fix(qa): harden Matrix transport substrate

* fix(qa): preserve Matrix profile and event parity

* fix(qa): preserve explicit scenario models

* fix(qa): align Matrix scenario coverage taxonomy

* fix(qa): format Matrix allowlist cleanup

* fix(qa): satisfy migrated Matrix CI contracts

* fix(qa): reconcile Matrix migration with current main

* fix(qa): break scenario flow import cycle

* fix(qa): reconcile Matrix max-lines ownership

* fix(qa): address Matrix review boundaries

* fix(qa): remove stale Matrix lint suppression

* fix(qa): adopt split Matrix E2EE flows

* fix(qa): export Matrix scenario record guard

* fix(qa): align Matrix migration with privatized helpers

* refactor(qa): finish Matrix QA Lab ownership

* fix(qa): preserve Matrix suite defaults

* fix(qa): reconcile Matrix cleanup with current main

* test(qa): follow canonical Matrix profile size

* fix(qa): guard stale Matrix QA package output

* docs(qa): redirect retired Matrix QA pages

* refactor(qa): finish Matrix runner rename

* test(qa): assert Matrix defaults through profile resolver

* docs: refresh QA cleanup map

* fix(qa): privatize Matrix storage discovery
2026-07-15 01:22:20 -07:00
Peter Steinberger
3e4b3b370f test(hooks): isolate Gmail setup module cache (#108150)
* test(hooks): isolate Gmail setup module cache

* chore(deadcode): refresh export baseline
2026-07-15 01:18:23 -07:00
Peter Steinberger
0be803ebc0 fix: npm 12 global updates no longer stop at the candidate guard (#108100)
* fix(update): approve candidate lifecycle on npm 12

* test(update): align npm lifecycle argv expectations
2026-07-15 01:10:32 -07:00
Peter Steinberger
f3e6042119 fix(ui): preserve explicit steer queue mode (#108121) 2026-07-15 01:09:55 -07:00
Peter Steinberger
a7456edf94 refactor(proxy-capture): privatize server helpers (#108139)
* refactor(proxy-capture): privatize server helpers

* chore(deadcode): refresh export baseline
2026-07-15 01:07:57 -07:00
Peter Steinberger
f1e2e5bc25 fix: clear stale task and OAuth doctor warnings (#108123)
* fix(doctor): repair taskflow and oauth warnings

* chore: keep release changelog out of PR
2026-07-15 01:03:53 -07:00
Peter Steinberger
f3c191039a refactor(music-generation): privatize mode resolver (#108132)
* refactor(music-generation): privatize mode resolver

* chore(deadcode): refresh export baseline
2026-07-15 00:59:15 -07:00
Peter Steinberger
2afa9de438 fix(codex): structured abort detection, tool-schema repair, native-result middleware relay (#108105)
* fix(codex): use structured turn status for aborts, repair tool schemas, relay native results to middleware

- turn aborts are detected from the correlated turn/completed status instead
  of byte-matching private codex-rs prose; the <turn_aborted> marker remains a
  non-terminal user-interrupt hint (tags only, wording-independent) because the
  app-server collapses all abort reasons into "interrupted" (#99268)
- dynamic-tool schemas are repaired before projection via the shared OpenAI
  normalizer: annotation nulls stripped, type:null inferred from object/array
  shape hints; unrepairable null constraints stay quarantined instead of
  widening the schema (#106277, #97913)
- Codex-native tool results now flow through agentToolResultMiddleware at the
  post_tool_use relay boundary (observe-only: the Codex PostToolUse contract
  cannot replace a native tool response) (#95597)

* test(codex): regenerate prompt snapshots for normalized dynamic-tool schemas

The shared OpenAI strict-compat normalization now runs on Codex dynamic tools,
so empty object schemas gain additionalProperties:false and required:[] in the
snapshot payloads, matching what the OpenAI provider family sends.
2026-07-15 00:51:24 -07:00
Peter Steinberger
fda08e26de refactor(gateway): privatize terminal shell quoting (#108125)
* refactor(gateway): privatize terminal shell quoting

* chore(deadcode): refresh export baseline
2026-07-15 00:50:01 -07:00
Peter Steinberger
fe469082b7 chore(plugins): backfill compat windows for deprecated plugin-sdk subpaths (#108035) 2026-07-15 00:49:02 -07:00
Peter Steinberger
4f71a2855e test(auto-reply): install channel metadata for group prompt cases (#108113) 2026-07-15 00:43:03 -07:00
Peter Steinberger
46393fb3dc refactor(status): privatize session cost line (#108118)
* refactor(status): privatize session cost line

* chore(deadcode): refresh export baseline
2026-07-15 00:41:45 -07:00
Peter Steinberger
658fdaea5b refactor(audit): remove internal test exports (#108111)
* refactor(audit): remove internal test exports

* chore(deadcode): refresh export baseline
2026-07-15 00:30:16 -07:00
sunlit-deng
8ddb23ea96 fix(agents): avoid stale session label timestamps after replacement (#107638)
* fix(agents): clear session label timestamps on replacement

* fix(agents): clear label timestamps on run reset

Co-authored-by: sunlit-deng <yang.jiajun1@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-15 00:29:35 -07:00
Peter Steinberger
666a907316 fix: preserve updates across pnpm and Bun lifecycle checks (#108090)
* fix(update): validate lifecycle runtimes

* fix(update): verify Bun lifecycle path

* fix(update): reject drive-relative Node paths

* test(update): align lifecycle argv expectations
2026-07-15 00:26:41 -07:00
Peter Steinberger
46fad5296a refactor(github-copilot): own runtime auth in provider (#108096) 2026-07-15 00:19:44 -07:00
Peter Steinberger
723c2f81ad refactor(llm): privatize provider internals (#108099)
* refactor(llm): privatize provider internals

* chore(deadcode): refresh export baseline
2026-07-15 00:11:43 -07:00
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