Commit Graph

63 Commits

Author SHA1 Message Date
Peter Steinberger 3d76246792 refactor: eliminate final export name collisions (#122083)
* refactor: resolve final export name collisions

* refactor: update remaining collision rename consumers

* style: format rebased auth helpers

* test: update remaining session entry mocks

* test: update remaining runtime mock exports

* test: update delivery info path mock

* refactor: reconcile combined collision sweeps

* chore: regenerate collision and sdk baselines
2026-08-11 11:18:24 -07:00
Peter Steinberger 6f4c8bfb6d refactor(agents): move swarm family into subagents/swarm (#121295) 2026-08-09 18:06:43 -07:00
Peter Steinberger 8406cfeac1 fix(agents): isolate network-backed dynamic tool results and errors (#118729)
* fix(agents): isolate network-backed dynamic tool results and failures

* test(agents): retain literal text result types in dynamic tool fixtures
2026-08-03 10:19:27 -07:00
Vincent Koc 32036c473d fix(agents): resume Code Mode through gateway restarts (#116605)
* fix(agents): preserve Code Mode restart recovery

* chore(protocol): regenerate Swift agent params
2026-07-31 09:22:27 +08:00
Vincent Koc 44aaa2f916 fix(agents): clarify code mode contract for small models (#115275) 2026-07-29 14:04:01 +08:00
Peter Steinberger d9d2d2482d fix(agents): prevent Code Mode resume loss and unbounded preparation (#115314)
* fix(agents): harden code mode lifecycle and deadlines

* fix(agents): retain narrowed headless settlement frontier
2026-07-28 13:35:37 -04:00
Peter Steinberger 681535cb8b fix(code-mode): bound and simplify worker lifecycles (#114945)
* fix(code-mode): bound and simplify worker lifecycles

* fix(code-mode): keep worker input internal

* fix(code-mode): retry failed wasm initialization safely

* docs(code-mode): explain live node tool budget invariant

* test(code-mode): prove hostless promises fail without worker churn
2026-07-28 02:08:17 -04:00
Peter Steinberger 61bd5af77e feat(code-mode): first-class skills access (#114894)
* feat(agents): add code mode skills access

* test(agents): enforce code mode skills prompt parity

* fix(agents): drop stale code mode catalog binding

* test(agents): align embedded skill entry mock
2026-07-28 00:32:03 -04:00
Peter Steinberger ea707382fd feat(code-mode): first-class nodes API (#114877)
* feat(agents): add nodes to code mode

* fix(agents): add code mode nodes discovery hint
2026-07-27 23:03:23 -04:00
Peter Steinberger 37cf0c6064 improve: reduce GPT-5.6 coding harness overhead (#114574)
* improve: reduce GPT-5.6 coding harness overhead

* refactor: extract runtime parity timing helpers

* fix(qa): verify native apply-patch runtime parity

* fix(qa): use mock patch execution evidence

* fix(qa): preserve workspace templates in full syncs

* fix(qa): make rejected patch fixtures deterministic

* fix(qa): prove apply-patch workspace containment

* fix(qa): expose runtime prompt-cache usage

* fix(codex): confine forced private QA patch turns

* fix(qa): verify native patch execution and sandbox precedence

* fix(qa): execute native patches and prove disk mutation

* fix(codex): avoid duplicate native patch registration

* perf(agents): keep code mode catalog guidance compact

* fix(qa): make native Codex patch evidence deterministic

* fix(qa): recognize native sandbox denial errors

* fix(qa): advertise native Codex mock model capabilities

* fix(qa): seed native Codex mock model catalog at startup

* fix(qa): recognize native Codex patch denial results

* fix(ci): repair Codex harness parity checks

* fix(qa): distinguish unknown prompt-cache measurements

* fix(qa): accept native Codex project patch denials

* fix(ci): isolate runtime parity report contracts

* fix(codex): eliminate native runtime transport overhead

* fix(qa): consume runtime parity report contract

* fix(qa): compare matched runtime timing captures

* fix(qa): type native response delta context

* fix(qa): satisfy native codex websocket lint
2026-07-27 19:24:52 -04:00
Peter Steinberger b5bb29a36e fix(code-mode): preserve direct tools and secure suspended runs (#114778)
Preserve trusted policy-required message delivery and native image/computer tools across Code Mode catalogs and provider transports. Keep preferred Gemini capability metadata during live discovery, escape MCP declaration keywords, and reject suspended-run resumes with missing owner identity. Add before-and-after regressions for each user path. Closes #114753.
2026-07-27 18:47:33 -04:00
Peter Steinberger 7394262cd1 feat: per-model code-mode capability flags with an "auto" master-switch tier (#114695)
* feat(tools): per-model code-mode capability flags and auto master-switch tier

* feat(anthropic): flag claude-sonnet-4-6 as code-mode preferred

* revert(anthropic): drop claude-sonnet-4-6 from the code-mode preferred set

* test(anthropic): type the manifest compat field in the catalog contract test

* fix(anthropic): carry catalog compat onto hand-built forward-compat model rows
2026-07-27 16:47:41 -04:00
Sasan 7599bbe636 fix(agents): stop code-mode shell-command retry storms (#113070)
Reject recognizable POSIX and Windows shell source before QuickJS execution while preserving valid JavaScript, TypeScript, syntax errors, standard globals, and real hoisted bindings. Add real-worker regression coverage and adversarial cross-platform stress proof. Fixes #113069.
2026-07-27 08:10:37 -04:00
Peter Steinberger e52222cdef refactor(agents): split code mode execution (#113669)
* refactor(agents): split code mode execution

* refactor(agents): keep code mode bridge type private
2026-07-25 06:22:25 -07:00
Peter Steinberger 55d66fbf98 chore(scripts): remove resolved investigation tools and orphans (#113532)
* chore(scripts): remove orphaned wrappers

* chore(scripts): remove resolved investigation tools

* refactor(code-mode): remove orphaned plugin namespaces

* test(code-mode): remove stale namespace import
2026-07-25 02:47:40 -07:00
Peter Steinberger 0baf0495ab fix(cron): honor script limits and permanent failures (#112415)
* fix(cron): honor script execution contracts

* test(tui): isolate gateway fixture startup

* test(tui): type shared fixture cleanup
2026-07-21 17:41:45 -07:00
Peter Steinberger 104691f822 feat(swarm): add QuickJS guest orchestration (#111298)
* feat(swarm): add QuickJS guest orchestration (#110325)

* fix(agents): turn-stable swarm replay identity — distinct exec invocations cannot collide

* fix(agents): turn-stable swarm replay identity — distinct exec invocations cannot collide

* fix(agents): turn-stable swarm replay identity — distinct exec invocations cannot collide
2026-07-19 03:58:59 -07:00
Peter Steinberger e9f798ecc4 fix(agents): greedily pack the code mode quick index so one oversized entry cannot blank it (#110517) 2026-07-18 08:26:06 +01:00
Peter Steinberger 010f662f48 fix(agents): keep declared-output tools visible in the truncated code mode index (#110317) 2026-07-18 03:48:28 +01:00
Peter Steinberger 3d1e8f9475 perf(agents): compose conversation tools in code mode (#110098) 2026-07-17 20:54:32 +01:00
Peter Steinberger b319493a52 improve: let Code Mode use declared tool result shapes (#109813)
* feat(agents): add Code Mode output contracts

* perf(agents): defer untrusted tool schemas

* chore(plugin-sdk): refresh API baseline

* fix(agents): preserve deferred schema markers

* fix(agents): preserve policy-blocked tool results

* fix(agents): preserve nullable output contracts

* fix(agents): reject policy blocks from success contracts

* fix(agents): preserve output contracts through normalization

* test(agents): type normalized tool fixtures

* fix(agents): validate catalog results before projection

* fix(agents): keep result snapshots internal

* fix(agents): fail closed on unrenderable unions

* fix(agents): preserve empty result markers

* test(agents): keep result fixture discriminator literal

* test(agents): use native own-property check
2026-07-17 14:46:37 +01:00
Peter Steinberger c742caee4b perf(agents): prime code mode with compact tool ids (#109651) 2026-07-16 23:09:03 -07:00
Peter Steinberger 57cc2ca308 improve: reduce compact tool orchestration turns (#109596)
* perf(agents): streamline compact tool orchestration

* fix(agents): preserve compact schema narrowing

* refactor(agents): focus legacy tool-search guidance

* fix(agents): defer MCP compact schema hints

* chore: drop release-owned changelog edit
2026-07-16 20:53:42 -07:00
Peter Steinberger b39e1cf66f perf(agents): drain code-mode bridge calls inline within one exec turn (#109290)
Code mode previously suspended to the model with a waiting result for every
awaited tools.search/describe/call, forcing one wait tool turn per await
(turns = tool calls + 1). Bridge calls now resolve inline within the exec
deadline and resume the QuickJS snapshot host-side, matching the namespace
auto-drain path. Restart-safe runs keep their existing no-drain semantics.
Live proof across OpenAI/Anthropic/Google: ~45% fewer turns and ~45% fewer
input tokens at equal success rate.

Also landed with the same contract:
- one shared wall-clock deadline per exec/wait call (initial worker, inline
  drain rounds, and resumed guest interrupt budget all share it)
- park the snapshot instead of resuming when the remaining budget could not
  survive VM restore, so near-deadline settles stay recoverable
- abort now terminates the guest worker, skips resume, and drops suspended
  runs instead of pinning process-global slots until TTL, reported with the
  existing aborted failure code
- exec description omits API.list/MCP/namespace guidance when the run catalog
  has no MCP tools or namespaces, so models stop probing an empty surface
- API.list tolerates a trailing-slash prefix like API.list("mcp/")
2026-07-16 13:30:07 -07:00
Peter Steinberger 9497450511 refactor: eliminate dead-export baseline (#108376)
Burn the grandfathered unused-export baseline to zero and enforce a hard-zero Knip gate.
2026-07-15 17:05:07 +01:00
Peter Steinberger 3ea45589ba refactor(agents): trim CLI and transport export seams (#108309)
* refactor(agents): trim CLI and transport export seams

* chore(deadcode): shrink agents CLI transport baseline
2026-07-15 14:02:29 +01:00
Peter Steinberger 580938097f refactor(agents): privatize internal helper surfaces (#108219)
* refactor(agents): privatize internal helper surfaces

* chore(deadcode): shrink unused-export baseline
2026-07-15 02:47:05 -07:00
Peter Steinberger f81f9d8570 chore: enforce max-lines suppression ratchet (#107315)
* ci: enforce max-lines suppression ratchet

* chore: prune stale max-lines suppression

* fix: close max-lines ratchet enforcement gaps

* fix: harden max-lines ratchet checks

* fix(ci): satisfy max-lines ratchet checks

* style: format max-lines declarations

* fix(ci): match oxlint suppression grammar

* test: isolate max-lines git fixtures

* chore: prune resolved max-lines debt

* test: skip newline path fixture on Windows

* fix: harden max-lines suppression ratchet

* chore: refresh max-lines baseline

* fix: close max-lines ratchet bypasses

* fix: derive ratchet base from PR merge tree

* fix: support older Git in staged ratchet

* fix: align max-lines declarations and baseline

* chore: refresh max-lines baseline for current main

* fix: exclude generated wizard locales from max-lines

* chore: prune resolved max-lines debt
2026-07-14 09:27:02 -07:00
Peter Steinberger 6df498c3cd refactor: canonicalize binary operation results (#106049)
* refactor(normalization-core): promote shared result type

* refactor(agent-core): reuse canonical error coercion

* refactor: discriminate internal operation results

* docs: establish shared result convention

* fix(agent-core): preserve error coercion facade

* build: derive package entries from exports

* fix(plugins): resolve shared result subpath

* fix(ci): align Result integration guards

* build: refresh plugin SDK API baseline

* fix(agent-core): preserve toError compatibility
2026-07-13 00:39:43 -07:00
Vincent Koc ff4b4517d2 refactor(agents): remove stale testing aliases (#105293) 2026-07-12 12:47:30 +02:00
Peter Steinberger d14bb8ec44 fix: resume replay-safe work after gateway restarts (#104997)
* fix: resume replay-safe work after gateway restart

* chore: leave restart note to release process

* fix: sync restart recovery protocol artifacts
2026-07-12 06:37:22 +01:00
Peter Steinberger ae12413ee2 chore(tooling): enforce no-floating-promises and drop DOM globals from Node-side typechecking (#104422)
* chore(lint): enforce no-floating-promises repo-wide

* feat(tooling): split DOM globals out of the Node-side typecheck program

tsconfig.core.json now compiles src/ + packages/ with lib ES2023; new
tsconfig.ui.json owns ui/ with DOM. Web-global names used by Node code
alias to canonical undici/stream-web types; highlight.js loads through a
validated narrow API because its d.ts force-includes lib.dom. Boundary,
sparse-guard, changed-lane routing, and profile lanes cover the new ui
graph.

* chore(deps): declare undici-types and teach knip about the highlight.js runtime require

* ci: retrigger dropped pull_request synchronize event

* refactor(types): derive web-global aliases from @types/node fetch globals, drop undici-types dep

* ci: retrigger after dependency guard cleared

* fix(scripts): add ui lane to changed-lanes declaration union
2026-07-11 07:28:20 -07:00
QiuYuang de2af01c9c fix(agents): classify code mode aborts separately from timeouts (#102494)
* fix(agents): classify code mode aborts separately from timeouts

* fix(cron): accept aborted code mode trigger failures

* fix(agents): keep code mode wall-clock timeouts classified

* fix(cron): preserve abort and timeout ownership

* test(cron): preserve typed abort reasons

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-09 12:29:04 +01:00
Peter Steinberger a6768d9de5 feat(cron): event triggers — polled condition-watcher scripts via code mode (#101195)
* feat(cron): add headless code-mode driver and trigger-script evaluator

Part A of cron event triggers: runCodeModeScriptHeadless runs a script
to completion (exec/settle/resume, no snapshots, no session), plus the
cron-facing evaluator with per-job tool catalog cache, semaphore, 16KB
state cap, and closed failure taxonomy.

* fix(cron): correct trigger-script bootstrap flags and cache narrowing

* feat(cron): add event triggers (polled condition-watcher scripts)

Part B: trigger field on cron jobs gated by cron.triggers.enabled;
timer evaluates the script each due tick, quiet ticks leave no run
history, fired runs append the script message to the payload; once
semantics, min-interval floor, SQLite columns, RPC/CLI/agent-tool
surfaces, and docs.

* fix(cron): propagate triggerEval through startup catch-up outcomes

* fix(cron): honor cron staggering on quiet trigger ticks; fix trigger test types

* fix(cron): reject with Error reason in trigger-script abort test

* fix(cron): regenerate protocol/docs/snapshot artifacts and break madge cycle for trigger types

CI fixes for #101195: trigger evaluator result types move to the cron
types leaf (madge cycle), cron tool schema inventory gains trigger,
Swift protocol bindings + docs map + Linux prompt snapshots regenerated.

* fix(cron): drop underscore-dangle names in trigger code sync assert

* fix(cron): adopt registerHeadlessToolSearchCatalog after tool-search symbol localization

Upstream #101831 made registerToolSearchCatalog module-private; fold the
headless ref-only catalog registration into one public seam.
2026-07-07 19:12:38 +01:00
Dallin Romney 9f07e01fc0 refactor: reuse shared number clamp (#99786) 2026-07-04 11:16:38 -07:00
Peter Steinberger 3d404478b8 fix(discord): hide internal Code Mode wait progress (#99893)
Hide invocation-specific Code Mode wait controls from channel progress while preserving telemetry and visible non-internal tools.
2026-07-04 01:45:50 -07:00
Dallin Romney 5fa2082655 refactor(shared): consolidate core leaf lazy loaders (#99278) 2026-07-02 18:06:00 -07:00
mushuiyu886 01abe0a33d fix(agents): suggest recovery for unknown tool ids (#93374)
Merged via squash.

Prepared head SHA: bee84e4eb8
Co-authored-by: mushuiyu886 <266724580+mushuiyu886@users.noreply.github.com>
Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>
Reviewed-by: @vincentkoc
2026-06-23 14:20:09 +08:00
Vincent Koc 2e44610ba2 refactor(agents): dedupe code mode json serialization 2026-06-18 12:38:02 +08:00
Vincent Koc b63acf54f9 refactor(agents): dedupe dead helper code 2026-06-18 11:55:21 +08:00
Peter Steinberger 31a1034cb5 docs: document code mode helpers 2026-06-04 09:10:13 -04:00
Peter Steinberger 9877f31fdd docs: document code mode bridge 2026-06-04 01:19:45 -04:00
Peter Steinberger e681569536 feat: add code-mode MCP API files
* feat: add code-mode MCP API files

* fix: satisfy code-mode MCP lint
2026-05-31 21:29:06 +01:00
Peter Steinberger 304e2c83c0 chore(lint): enable stricter oxlint rules 2026-05-31 18:59:02 +01:00
Peter Steinberger 4150c6ff82 feat: add typed MCP code-mode API (#88678)
* feat: add typed MCP code-mode API

* fix: stabilize code-mode namespace drain

* fix: preserve code-mode run cap

* fix: reserve code-mode snapshot capacity
2026-05-31 17:51:22 +01:00
Peter Steinberger ec8cb8bcbf feat: add MCP code-mode namespace (#88636)
* feat: add MCP code-mode namespace

* fix: unblock mcp namespace ci gates
2026-05-31 15:02:19 +01:00
Peter Steinberger 59694e86d9 chore(lint): enable structured clone rules 2026-05-31 08:34:28 +01:00
Peter Steinberger 00d8d7ead0 refactor: extract normalization core package
Extract shared normalization/coercion helpers into private @openclaw/normalization-core workspace package while preserving existing plugin SDK helper subpaths.\n\nAlso keeps direct normalization-core imports internal, wires UI/build/loader resolution, and replaces the slow PR network CodeQL lane with a fast added-line boundary scan while retaining full CodeQL for scheduled/manual runs.\n\nVerification: local moved tests, plugin SDK boundary tests, extension loader tests, agents-support shard, UI build/test, build artifacts, lint, workflow guards, autoreview, and GitHub CI passed on PR head 963d893715.
2026-05-31 01:33:00 +01:00
Peter Steinberger 287687da20 feat: add internal code mode namespaces (#88043)
* feat: add internal code mode namespaces

* test: add code mode namespace live proof

* test: add live code mode Docker repro

* chore: keep code mode docker repro out of package scripts

* fix: break code mode namespace type cycle

* fix: clean code mode namespace ci drift

* fix: route code mode namespaces through tools

* fix: preserve explicit agent global sessions

* docs: explain code mode namespace registry

* test: cap realtime websocket payload

* fix: normalize code mode timeout results

* fix: satisfy code mode timeout lint

* chore: rerun code mode CI

* ci: extend node shard silence watchdog

* test: avoid child process mock deadlocks

* test: fix code mode repro shebang

* fix: scope explicit agent sentinel sessions

* test: preserve child process mock actual loader

* fix: dispatch namespace tools by exact id

* test: satisfy restart execFile mock type
2026-05-30 22:42:57 +01:00
Peter Steinberger 11b5728faa fix(agents): bound code mode snapshot expiry 2026-05-30 12:42:07 -04:00