Peter Steinberger
0b8aabe864
docs: document auth profile failure policy contract ( #89613 )
...
* docs: document markdown marker renderer
* docs: document rendered markdown chunking
* docs: document markdown text chunking
* docs: document shared text chunking
* docs: document plugin text chunking exports
* docs: document avatar policy constants
* docs: document node match candidates
* docs: document scoped expiring id cache
* docs: document runtime import normalization
* docs: document string sample summaries
* docs: document session usage timeseries types
* docs: document session usage response types
* docs: document manifest frontmatter shapes
* docs: document channel route input metadata
* docs: document pair loop guard settings
* docs: document migration config patch helpers
* docs: document api provider registry
* docs: document tool call repair payloads
* docs: document plugin tool payload helpers
* docs: document lazy promise loader
* docs: document store writer queue state
* docs: document thread binding lifecycle
* docs: document concurrency helper contract
* docs: document gateway client info contract
* docs: document delivery context contracts
* docs: document secret ref defaults contract
* docs: document command gating contract
* docs: document avatar policy contract
* docs: document node match policy
* docs: document message channel normalization
* docs: document boolean parsing contract
* docs: document zod parse helpers
* docs: document direct dm guard policy
* docs: document fixed window limiter contract
* docs: document node presence event contract
* docs: document secret normalization contract
* docs: document progress draft line removal
* docs: document usage formatting contracts
* docs: document agent run status contract
* docs: document runtime import helpers
* docs: document provider utility ownership
* docs: document invalid config helpers
* docs: document json compat parser
* docs: document channel config metadata ownership
* docs: document channel logging helpers
* docs: document sender identity validation ownership
* docs: document string sampling helper
* docs: document global singleton helpers
* docs: document transcript tool helpers
* docs: document exec safe-bin normalization
* docs: document reaction level resolver
* docs: document account snapshot redaction boundary
* docs: document messaging target helpers
* docs: document thread binding messages
* docs: document conversation binding context
* docs: document conversation resolution helper
* docs: document owner display secret retention
* docs: document provider request config types
* docs: document skills config types
* docs: document memory config types
* docs: document imessage config types
* docs: document crestodian config types
* docs: document tools config policies
* docs: document shared config base types
* docs: document channel config contracts
* docs: document openclaw config state types
* docs: document model config contracts
* docs: document shared agent config types
* docs: document agent defaults config types
* docs: document secret input contracts
* docs: document auth config contracts
* docs: document gateway config contracts
* docs: document tool call stream repair contracts
* docs: document memory host facades
* docs: document llm core contracts
* docs: document markdown core contracts
* docs: document gateway connect error contracts
* docs: document gateway protocol primitives
* docs: document gateway frame schemas
* docs: document gateway device schemas
* docs: document gateway environment schemas
* docs: document gateway push schemas
* docs: document gateway plugin schemas
* docs: document gateway artifact schemas
* docs: document gateway command schemas
* docs: document gateway task schemas
* docs: document gateway exec approval schemas
* docs: document gateway secret schemas
* docs: document gateway config schemas
* docs: document gateway snapshot schemas
* docs: document gateway chat schemas
* docs: document gateway wizard schemas
* docs: document gateway node schemas
* docs: document gateway plugin approval schemas
* docs: document gateway talk schemas
* docs: document gateway agent schemas
* docs: document gateway session schemas
* docs: document gateway cron schemas
* docs: document gateway agent model skill schemas
* docs: document gateway skill proposal tool schemas
* docs: document gateway protocol registry
* docs: document gateway channel status schemas
* docs: document gateway schema regression tests
* docs: document gateway schema barrel
* docs: document gateway validator tests
* docs: document gateway primitive push tests
* docs: document gateway contract tests
* docs: document native protocol guard
* docs: document channel schema tests
* docs: document gateway protocol smoke tests
* docs: document gateway protocol entrypoint
* docs: document gateway protocol type exports
* docs: document gateway error codes
* docs: document protocol schema registry
* docs: document talk audio codec
* docs: document talk activation names
* docs: document talk consult questions
* docs: document talk consult tool
* docs: document talk run control contracts
* docs: document talk run control adapter
* docs: document talkback consult queue
* docs: document talk consult transcript guard
* docs: document talk fast context runtime
* docs: document forced talk consult coordinator
* docs: document talk output activity tracker
* docs: document talk event metrics
* docs: document talk diagnostics
* docs: document talk observability hook
* docs: document talk provider resolver
* docs: document talk provider registry
* docs: document talk runtime primitives
* docs: document talk consult controller logs
* docs: document channel identity helpers
* docs: document channel account allowlist helpers
* docs: document channel metadata draft controls
* docs: document channel ingress policy
* docs: document channel sender access gates
* docs: document channel catalog message contracts
* docs: document channel account plugin helpers
* docs: document configured binding helpers
* docs: document channel acp approval config helpers
* docs: document channel bundled config write helpers
* docs: document channel plugin utility contracts
* docs: document channel config access helpers
* docs: document channel message action helpers
* docs: document channel outbound runtime helpers
* docs: document channel pairing promotion helpers
* docs: document channel registry helpers
* docs: document channel setup wizard helpers
* docs: document channel lifecycle status helpers
* docs: document channel target thread helpers
* docs: document channel session binding helpers
* docs: document channel package module probes
* docs: document channel setup wizard contracts
* docs: document channel plugin API barrels
* docs: document channel contract test helpers
* docs: document channel core helpers
* docs: document small core facades
* docs: document provider runtime helpers
* docs: document persistence and realtime helpers
* docs: document mcp and state helpers
* docs: document tool planner contracts
* docs: document music generation runtime
* docs: document crestodian command flow
* docs: document utility helpers
* docs: document node host helpers
* docs: document transcript contracts
* docs: document trajectory export contracts
* docs: document image generation contracts
* docs: document routing helper contracts
* docs: document session helper contracts
* docs: document video generation contracts
* docs: document model catalog contracts
* docs: document proxy capture contracts
* docs: document status rendering contracts
* docs: document test helper contracts
* docs: document wizard setup contracts
* docs: document process contracts
* docs: document memory host sdk contracts
* docs: document tts contracts
* docs: document secrets runtime contracts
* docs: document shared helper contracts
* docs: document hook runtime contracts
* docs: document security audit contracts
* docs: document flow contracts
* docs: document media understanding contracts
* docs: document tui contracts
* docs: document logging contracts
* docs: document llm contracts
* docs: document cron contracts
* docs: document daemon contracts
* docs: document task contracts
* docs: document acp contracts
* docs: document test utility contracts
* docs: document skill contracts
* docs: document config contracts
* docs: document outbound infra contracts
* docs: document command analysis contracts
* docs: document provider usage infra contracts
* docs: document file safety infra contracts
* docs: document exec approval infra contracts
* docs: document gateway runtime infra contracts
* docs: document infra utility contracts
* docs: document infra queue storage contracts
* docs: document heartbeat infra contracts
* docs: document remaining infra contracts
* docs: document gateway auth contracts
* docs: document gateway display helpers
* docs: document gateway http helpers
* docs: document gateway node helpers
* docs: document gateway mcp helpers
* docs: document gateway support helpers
* docs: document gateway server runtime helpers
* docs: document gateway runtime bootstrap helpers
* docs: document gateway session events
* docs: document gateway utility helpers
* docs: document gateway talk helpers
* docs: document gateway helper contracts
* docs: document gateway server method helpers
* docs: document gateway server auth helpers
* docs: document gateway server tests
* docs: document gateway test helpers
* docs: document gateway node tests
* docs: document gateway channel tests
* docs: document gateway session tests
* docs: document gateway server startup tests
* docs: document gateway tool test helpers
* docs: document gateway server test helpers
* docs: document gateway server method tests
* docs: document remaining gateway tests
* docs: document plugin sdk public subpaths
* docs: document plugin sdk runtime helpers
* docs: document plugin sdk memory provider helpers
* docs: document plugin sdk runtime facades
* docs: document plugin sdk command approval helpers
* docs: document plugin sdk runtime types
* docs: document plugin sdk browser account helpers
* docs: document plugin sdk media memory helpers
* docs: document plugin sdk core tests
* docs: document plugin sdk contract helpers
* docs: document plugin sdk test helpers
* docs: document remaining plugin sdk tests
* docs: document cli utility helpers
* docs: document cli runtime helpers
* docs: document cli command registration helpers
* docs: document node cli helpers
* docs: document cli program registration
* docs: document message cli registration
* docs: document daemon cli helpers
* docs: document cli route parsers
2026-06-03 15:20:39 -07:00
Peter Steinberger
27dde7a4d6
chore(lint): enable stricter error rules
2026-06-01 01:12:21 +01:00
Peter Steinberger
304e2c83c0
chore(lint): enable stricter oxlint rules
2026-05-31 18:59:02 +01:00
giming
f94512cd7f
fix(xiaomi): support MiMo voicedesign TTS
...
Adds Xiaomi MiMo voicedesign TTS support by registering the v2.5 voicedesign model and omitting audio.voice for that model's prompt-driven voice design flow.
Also accepts generic TTS aliases modelId, speakerVoice, and speakerVoiceId for Xiaomi provider config and request overrides.
Fixes exec timeout classification so a process that exits after a missed timeout callback is still reported as timed out, using monotonic deadlines to avoid wall-clock skew.
Verification:
- node scripts/run-vitest.mjs extensions/xiaomi/speech-provider.test.ts
- node scripts/run-vitest.mjs src/process/supervisor/supervisor.test.ts
- node scripts/run-vitest.mjs src/agents/bash-tools.exec-foreground-failures.test.ts
- git diff --check
- autoreview --mode local
- live Xiaomi MiMo voicedesign call returned wav RIFF/WAVE output, 169004 bytes
- GitHub CI success on fb3018ef31 : CI 26708919072, CodeQL Critical Quality 26708919082, CodeQL 26708919091, OpenGrep PR Diff 26708919089, Workflow Sanity 26708919083, Dependency Guard 26708918574, Real behavior proof 26708921767
Thanks @GimingRao.
Co-authored-by: Raoyu <2425198313@qq.com >
Co-authored-by: giming <53329020+GimingRao@users.noreply.github.com >
2026-05-31 10:34:51 +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
Vincent Koc
0d4828497e
refactor: share respawn child runner
2026-05-30 09:44:20 +02:00
Vincent Koc
8ba71e4aff
fix(process): bound command output capture
2026-05-28 15:52:02 +02:00
Vincent Koc
2252cf6f03
fix(supervisor): bound captured process output
2026-05-28 13:43:36 +02:00
Peter Steinberger
bb46b79d3c
refactor: internalize OpenClaw agent runtime ( #85341 )
...
* refactor: extract agent core package
Introduce packages/agent-core as the OpenClaw-owned home for reusable agent loop, harness, session, prompt, and runtime dependency contracts.
* refactor: extract shared llm runtime
Move provider model registries, stream wrappers, OAuth helpers, and LLM utilities into src/llm with plugin-sdk barrels instead of depending on the old embedded runtime layout.
* refactor: remove pi runtime internals
Rename remaining Pi-shaped agent surfaces to OpenClaw agent runtime names, delete obsolete Pi docs and package graph checks, and add the third-party notice for incorporated code.
* refactor: tighten agent session runtime
Make agent-core/runtime dependencies explicit, consolidate compaction and session transcript helpers, and move model/session helpers behind OpenClaw-owned contracts.
* refactor: remove static model and pi auth paths
Drop static model catalogs and Pi auth bridges, move model/provider facts to manifest-owned runtime contracts, and harden internal embedded-agent utilities.
* refactor: remove legacy provider compat paths
* docs: remove agent parity notes
* fix: skip provider wildcard metadata parsing
* refactor: share session extension sdk loading
* refactor: inline acpx proxy error formatter
* refactor: fold edit recovery into edit tool
* fix: accept extension batch separator
* test: align startup provider plugin expectations
* fix: restore provider-scoped release discovery
* test: align static asset packaging expectations
* fix: run static provider catalogs during scoped discovery
* fix: add provider entry catalogs for scoped live discovery
* fix: load lightweight provider catalog entries
* fix: refresh provider-scoped plugin metadata
* fix: keep provider catalog entries on release live path
* fix: keep static manifest models in release live checks
* fix: harden release model discovery
* fix: reduce OpenAI live cache probe reasoning
* fix: disable OpenAI cache probe reasoning
* ci: extend OpenAI gateway live timeout
* fix: extend live gateway model budget
* fix: stabilize release validation regressions
* fix: honor provider aliases in model rows
* fix: stabilize release validation lanes
* fix: stabilize release memory qa
* ci: stabilize release validation lanes
* ci: prefer ipv4 for live docker node calls
* fix: restore shared tool-call stream wrapper
* ci: remove legacy pi test shard alias
* fix: clean up embedded agent test drift
* fix: stabilize runtime alias status
* fix: clean up embedded agent ci drift
* fix: restore release ci invariants
* fix: clean up post-rebase runtime drift
* fix: restore release ci checks
* fix: restore release ci after rebase
* fix: remove stale pi runtime path
* test: align compaction runtime expectations
* test: update plugin prerelease expectations
* fix: handle claude live tool approvals
* fix: stabilize release validation gates
* fix: finish agent runtime import
* test: finish post-rebase agent runtime mocks
* fix: keep codex compaction native
* fix: stabilize codex app-server hook tests
* test: isolate codex diagnostic active run
* test: remove codex diagnostic completion race
# Conflicts:
# extensions/codex/src/app-server/run-attempt.test.ts
* ci: fix full release manifest performance run id
* refactor: narrow llm plugin sdk boundary
* chore: drop generated google boundary stamps
* fix: repair rebase fallout
* fix: clean up rebased runtime references
* fix: decode codex jwt payloads as base64url
* fix: preserve shipped pi runtime alias
* fix: add scoped sdk virtual modules
* fix: decode llm codex oauth jwt as base64url
* fix: avoid stale vertex adc negative cache
* fix: harden tool arg decoding and codeql path
* fix: keep vertex adc negative checks live
* refactor: consolidate codex jwt and edit helpers
* fix: await codex oauth node runtime imports
* fix: preserve sdk tool and notice contracts
* fix: preserve shipped compat config boundaries
* fix: align codex oauth callback host
* fix: terminate agent-core loop streams on failure
* fix: keep codex oauth callback alive during fallback
* ci: include session tools in critical codeql scans
* fix: keep Cloudflare Anthropic provider auth header
* docs: redirect legacy pi runtime pages
* fix: honor bundled web provider compat discovery
* fix: protect session output spill files
* fix: keep legacy agent dir env blocked
* fix: contain auto-discovered skill symlinks
* fix: harden agent core sdk proxy surfaces
* fix: restore approval reaction sdk compat
* fix: keep live docker runs bounded
* fix: keep codex oauth redirect host aligned
* fix: resolve post-rebase agent runtime drift
* fix: redact anthropic oauth parse failures
* fix: preserve responses strict tool shaping
* fix: repair agent runtime rebase cleanup
* docs: redirect retired parity pages
* fix: bound auto-discovered resources to roots
* fix: repair post-rebase agent test drift
* fix: preserve bundled provider allowlist migration
* fix: preserve manifest-owned provider aliases
* fix: declare photon image dependency
* fix: keep provider headers out of proxy body
* fix: preserve shipped env aliases
* fix: refresh control ui i18n generated state
* fix: quote read fallback paths
* fix: preview edits through configured backend
* test: satisfy core test typecheck
* fix: preserve ZAI usage auth fallback
* test: repair codex diagnostic test
* fix: repair agent runtime rebase drift
* test: finish embedded runner import rename
* fix: repair agent runtime rebase integrations
* test: align compaction oauth fallback expectations
* fix: allow sdk-auth session models
* fix: update doctor tool schema import
* fix: preserve bedrock plugin region
* fix: stream harmony-like prose immediately
* ci: include session runtime in codeql shards
* fix: repair latest rebase integrations
* fix: honor explicit codex websocket transport
* fix: keep openai-compatible credentials provider-scoped
* fix: refresh sdk api baseline after rebase
* fix: route cli runtime aliases through openclaw harness
* test: rename stale harness mock expectation
* test: rename embedded agent overflow calls
* test: clean embedded auth test wording
* test: use openclaw stream types in deepinfra cache test
* fix: refresh sdk api baseline on latest main
* fix: honor bundled discovery compat allowlists
* fix: refresh sdk api baseline after latest rebase
* fix: remove stale rebase imports
* test: rename stale model catalog mock
* test: mock renamed doctor runtime modules
* fix: map canonical kimi env auth
* fix: use internal model registry in bench script
* fix: migrate deepinfra provider catalog entry
* fix: enforce builtin tool suppression
* fix: route compaction auth and proxy payloads safely
* refactor: prune unused llm registry leftovers
* test: update codex hooks session import
* test: fix model picker ci coverage
* test: align model picker auth mock types
2026-05-27 19:24:04 +01:00
Peter Steinberger
94fb547fe2
fix(agents): handle deferred maintenance drain
...
Ensure deferred context-engine maintenance rejects cleanly when the gateway command queue is draining, including coalesced active-run requests. This prevents budget compaction from treating an unscheduled deferred maintenance run as successful and leaving the context engine alive.
Verification:
- pnpm exec oxfmt --check --threads=1 src/process/command-queue.ts src/agents/pi-embedded-runner/compact.queued.ts src/agents/pi-embedded-runner/context-engine-maintenance.ts src/agents/pi-embedded-runner/context-engine-maintenance.test.ts
- pnpm test src/auto-reply/reply/agent-runner-memory.test.ts src/agents/pi-embedded-runner/compact.hooks.test.ts src/agents/pi-embedded-runner/context-engine-maintenance.test.ts src/tasks/task-flow-registry.store.test.ts src/auto-reply/reply/commands-compact.test.ts src/agents/pi-embedded-runner/compact-reasons.test.ts
- .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
- GitHub Actions CI run 26475226442: relevant Node/Linux, lint, type, security, CodeQL, OpenGrep, Socket, Real behavior proof, and build jobs passed; Windows job failed before tests due current runner image Node 22.19.0 vs required 24.x, matching current main infra failure.
2026-05-26 22:17:19 +01:00
WhatsSkiLL
b13166bc0c
fix: gracefully escalate process supervisor cancellations ( #85865 )
...
* fix: gracefully escalate supervisor cancellations
* fix: preserve process-tree cancellation during grace
* fix: satisfy signal monitor allSettled lint
* fix(process): split graceful cancel signal escalation
---------
Co-authored-by: JARVIS-Glasses <284122573+JARVIS-Glasses@users.noreply.github.com >
Co-authored-by: Peter Steinberger <steipete@gmail.com >
2026-05-24 03:35:37 +01:00
Patrick Erichsen
c0312748c4
feat: support git and local skill installs ( #84793 )
2026-05-20 21:12:03 -07:00
Peter Steinberger
4f4d108639
chore(lint): remove underscore-dangle allow list ( #83542 )
...
* chore(lint): reduce underscore-dangle exceptions
* chore(lint): reduce more underscore exceptions
* chore(lint): remove underscore-dangle allow list
* fix(lint): repair underscore cleanup regressions
* test(lint): track version define suppression
2026-05-18 14:56:06 +01:00
Vincent Koc
54d063167e
test: use platform spy helper in cli tests
2026-05-17 17:03:23 +08:00
Galin Iliev
18812bfc03
fix(process): clarify lane wait diagnostics ( #82792 )
...
Merged via squash.
Prepared head SHA: 1a09b724a5
Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com >
Reviewed-by: @galiniliev
2026-05-16 21:26:31 -07:00
Vincent Koc
e0c3c80ebc
test: share Windows platform spy helpers
2026-05-17 08:56:56 +08:00
Galin Iliev
7c151b212b
fix(agents): prioritize manual session turns ( #82765 )
...
* fix(agents): prioritize manual session turns
* docs: update changelog for session priority
---------
Co-authored-by: Galin Iliev <Galin.Iliev@microsoft.com >
2026-05-16 17:49:48 -07:00
Peter Steinberger
21c5f8dc6d
fix(codex): keep run lane timeout progress-aware
2026-05-16 16:21:34 +01:00
samzong
2fa853dce5
fix(gateway): isolate gmail watcher restart and abort handling ( #82395 )
...
Merged via squash.
Prepared head SHA: 61502846df
Co-authored-by: samzong <13782141+samzong@users.noreply.github.com >
Co-authored-by: frankekn <4488090+frankekn@users.noreply.github.com >
Reviewed-by: @frankekn
2026-05-16 15:31:51 +08:00
Vincent Koc
d656cda46d
fix(process): normalize Windows child env keys
2026-05-14 14:34:00 +08:00
Peter Steinberger
f468f0f61f
test: guard windows exec mock calls
2026-05-12 04:19:02 +01:00
Peter Steinberger
60e5804a9d
test: guard windows exec spawn call
2026-05-11 22:42:30 +01:00
Peter Steinberger
c69b58157f
test: guard process child adapter calls
2026-05-11 22:41:27 +01:00
Peter Steinberger
ca6a513c55
test: guard process queue calls
2026-05-11 22:40:24 +01:00
Peter Steinberger
70a0236ccc
test: guard process spawn calls
2026-05-11 22:36:06 +01:00
Shakker
3cebb019d0
test: tighten windows exec assertions
2026-05-11 04:51:55 +01:00
Peter Steinberger
aa3421e2d7
test: tighten command queue assertions
2026-05-10 22:59:02 +01:00
Peter Steinberger
41859bb3fc
fix: preserve cron lane timeout result
2026-05-10 19:03:17 +01:00
bitloi
ed6b030a43
feat(process): show input-wait hints in log and poll
...
Show input-wait hints in process log/poll for idle interactive background sessions, keep list markers and structured stdin metadata, and document the recovery flow through log plus existing input actions.
Docs: updated docs/gateway/background-process.md.
Verification:
- pnpm test src/agents/bash-tools.test.ts
- pnpm test src/agents/bash-tools.process.input-hints.test.ts
- pnpm test src/agents/bash-tools.process.input-hints.test.ts src/agents/bash-tools.process.poll-timeout.test.ts src/agents/bash-tools.process.supervisor.test.ts src/agents/bash-tools.process-send-keys.test.ts
- pnpm check:docs
- git diff --check
- CI on 4aea1f11fe : check, check-additional, check-docs, checks-node-core, process/security relevant shards, real behavior proof passed
Fixes #33957 .
Thanks @bitloi and @vincentkoc.
Co-authored-by: bitloi <89318445+bitloi@users.noreply.github.com >
Co-authored-by: bitloi <raphaelaloi.eth@gmail.com >
2026-05-10 04:13:07 -04:00
Peter Steinberger
b447d30349
test: tighten process assertions
2026-05-09 12:28:59 +01:00
Shakker
8cd978c02a
test: tighten core empty array assertions
2026-05-09 05:12:12 +01:00
Peter Steinberger
03e7fcfcc8
test: simplify supervisor adapter fixture
2026-05-08 20:13:35 +01:00
Peter Steinberger
0c34f7ac1c
test: reuse command queue deferred helper
2026-05-08 19:26:34 +01:00
Shakker
40998a8152
test: tighten command queue wait assertion
2026-05-08 16:57:46 +01:00
Peter Steinberger
03ac05a3cd
test: tighten core helper assertions
2026-05-08 16:48:41 +01:00
Peter Steinberger
5c589673ec
test: clarify loose boolean assertions
2026-05-08 14:00:34 +01:00
Peter Steinberger
b67bc04c43
test: clarify command queue reset assertions
2026-05-08 12:44:20 +01:00
Peter Steinberger
9ef37d1907
test: tighten assertions and harness coverage
2026-05-08 05:28:12 +01:00
Mert Başar
029ca8c268
feat(agents): implement state-aware failover and lane suspension
...
Summary:
- Persist quota-suspension state transitions and reload fresh suspension state before failover handoff injection.
- Restore suspended lanes to configured concurrency and share failover-to-suspension reason mapping across fallback and embedded runner paths.
- Export model.failover diagnostics via OTLP and cover queueing/resume behavior with regressions.
Verification:
- pnpm test src/config/sessions/store.pruning.integration.test.ts src/process/command-queue.test.ts src/agents/session-suspension.test.ts src/agents/model-fallback.test.ts extensions/diagnostics-otel/src/service.test.ts
- git diff --check
- pnpm exec oxfmt --check --threads=1 on changed TypeScript files
- GitHub checks: 92 successful, 0 pending, 0 failed on head 962146be88
- Review threads: none unresolved
2026-05-07 18:34:05 -05:00
Devin Robison
982d123b80
Harden Windows command wrapper resolution ( #77472 )
...
* Harden Windows command wrapper resolution
* clawsweeper: route Windows cmd.exe wrapper through getWindowsInstallRoots
Replace the local SystemRoot/windir/SYSTEMROOT/WINDIR scan in
resolveTrustedWindowsCmdExe with the shared getWindowsInstallRoots()
resolver from src/infra/windows-install-roots.ts. The shared resolver
already rejects UNC paths, root-relative values, semicolon-delimited
path-lists, and missing-drive-letter roots, and prefers registry-derived
roots over env, so the wrapper-launch trust boundary now matches the
existing Windows install-root boundary on main.
Tests:
- _resetWindowsInstallRootsForTests in beforeEach so cached roots track
per-test process.env mutations
- expectedTrustedCmdExe helper now joins the resolved systemRoot, so the
expected wrapper executable matches the production resolver on Linux
CI (where it falls back to DEFAULT_WINDOWS_SYSTEM_ROOT)
- new "rejects unsafe Windows root values" test covers UNC,
semicolon-delimited path-list, root-relative, and bare-relative
SystemRoot inputs
* Add CHANGELOG entry for #77472 Windows command wrapper hardening
* clawsweeper: stub registry probe in Windows wrapper tests
On real Windows CI runners getWindowsInstallRoots() reads the canonical
SystemRoot from the registry (e.g. C:\WINDOWS) before falling back to
process.env, which shadowed the env-only setup in the ComSpec-poisoning
and unsafe-root tests and produced casing mismatches like
"C:\WINDOWS\System32\cmd.exe" vs the expected "C:\Windows\...". Pass a
queryRegistryValue stub returning null in beforeEach (and inside the
unsafe-root loop) so install-root resolution is fully driven by the
test's process.env setup on every platform.
* clawsweeper: overwrite WINDIR alongside SystemRoot in unsafe-root test
Real Windows runners did not honor `delete process.env.windir`, so the
unsafe-root iteration's WINDIR fallback still resolved to the canonical
`C:\WINDOWS` and produced a casing mismatch against the expected default
`C:\Windows\System32\cmd.exe`. Set both `SystemRoot` and `WINDIR` to the
unsafe payload so every install-root env source is rejected by
`normalizeWindowsInstallRoot` and the resolver falls through to
`DEFAULT_WINDOWS_SYSTEM_ROOT`.
2026-05-04 14:33:18 -06:00
Peter Steinberger
3921e1b0b7
fix(process): kill Windows command trees on timeout
...
(cherry picked from commit 9cc3ae100b )
2026-05-04 20:44:27 +01:00
Peter Steinberger
2f0c9358b1
refactor: hide shared constants
2026-05-02 08:29:21 +01:00
Peter Steinberger
ad1e14af53
refactor: delete unused test helper code
2026-05-01 13:11:42 +01:00
Alex Knight
e1a7c5b860
fix: handle EPIPE errors on child process stdin writes ( #75602 )
...
Fix three child-process stdin write paths that let async EPIPE errors
escape to uncaughtException and crash the gateway.
extensions/imessage/src/client.ts (the actual #75438 crash path):
- Add child.stdin.on('error') listener in start() to catch async EPIPE
and reject all pending requests via failAll().
- Add write callback to request() stdin.write() that rejects the
specific pending request on error, instead of leaving it hanging
until timeout.
src/agents/mcp-stdio-transport.ts:
- Fix write callback race in send(): previously resolved the promise
immediately when write() returned true, then the write callback with
EPIPE would fire after the promise was already fulfilled. Now always
settles the promise from the write callback so the outcome is known
before resolving.
src/process/exec.ts:
- Add stdin.on('error') before writing input so EPIPE from a
prematurely-exited child is swallowed — the process exit handler
reports the real status.
One reporter observed a gateway crash after 10.5 hours of stable
uptime — a single EPIPE on an iMessage RPC child process stdin write
killed the gateway with code 1.
Fixes : #75438
2026-05-01 21:45:12 +10:00
Peter Steinberger
42d73fd955
refactor: remove dead private helpers
2026-05-01 06:55:26 +01:00
Peter Steinberger
470098bd26
fix: keep embedded run lanes from wedging
2026-04-29 21:37:17 +01:00
Peter Steinberger
f5e7557c70
fix(heartbeat): defer during cron and nested lane pressure
2026-04-29 10:08:48 +01:00
Peter Steinberger
14e8a2d00b
chore: remove unused internal dead code
2026-04-29 09:34:40 +01:00
Peter Steinberger
c500e8704f
fix(gateway): recover stale session lanes
2026-04-28 20:37:29 +01:00
Peter Steinberger
e1acb61317
refactor: expose SDK test helper subpaths
2026-04-28 03:28:17 +01:00