109 Commits

Author SHA1 Message Date
Peter Steinberger ffb2ed9e89 refactor: remove residual normalization aliases (#122956)
* refactor: remove residual normalization aliases

* test(gateway): isolate approval authority handshake
2026-08-12 20:26:30 -07:00
Peter Steinberger b080dd1e76 refactor: consolidate coercion contracts (#122458)
* refactor: consolidate coercion contracts

Centralize exact string, record, numeric, date, Boolean, argument, and structured-error coercions while preserving call-site semantics.

Migrate canonical-name collisions and deprecated internal SDK bypasses, deleting 55 net production/tooling lines. Expand declaration ownership enforcement to 101 allowed helpers and add a narrow export-completeness audit.

* fix: preserve standalone script coercions

Keep copied Control UI tooling self-contained and retain the trusted release harness module-relative source seam when the harness runs against an old target cwd.
2026-08-11 23:26:37 -07:00
Peter Steinberger 964c8c84c1 refactor: consolidate coercion ownership (#122299)
* refactor: consolidate coercion ownership

Centralize four canonical coercion helpers, migrate exact core and plugin duplicates through narrow Plugin SDK facades, and enforce declaration and plugin-normalization ownership boundaries.

The sweep adds eight focused SDK exports while deleting more production and tooling code than it adds. User-visible behavior is unchanged except for safer equivalent object and UI parsing at existing boundaries.

* fix: guard integer option ownership

Register resolveIntegerOption with the canonical function owner and extend the declaration-guard fixture so future local duplicates fail validation.

* fix: keep integer helpers on numeric facade

Remove the unshipped duplicate string-coerce exports and route every affected plugin consumer through the existing number-runtime contract.

* fix: point numeric coercion to number runtime

Make boundary and declaration diagnostics recommend the canonical numeric facade, with failing-before coverage for both guidance paths.
2026-08-11 17:14:53 -07:00
Vincent Koc 7fe75acb5f fix(compaction): recover overflow from sparse assistant history (#122159)
Prevent overflow recovery from dereferencing missing assistant usage metadata while preserving explicit unavailable and legacy CLI barriers.

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-08-12 02:54:01 +08:00
Peter Steinberger cad77fb39c refactor: consolidate remaining coercion helpers (#122020) 2026-08-11 10:22:01 -07:00
Peter Steinberger 89ff93dbc2 fix(agents): retire attachment-only steering messages after delivery (#121158)
* fix(agents): retire queued messages by identity

* chore(plugin-sdk): refresh API baseline

* test(agents): narrow queued message events
2026-08-11 07:33:21 -07:00
Peter Steinberger fa03d9b913 refactor: consolidate coercion helpers (#121366)
* refactor: consolidate coercion helpers

* fix: remove duplicate coercion imports

* fix: preserve serialized coercion guard

* chore: ratchet coercion helper carve-outs

* fix(test): keep gauntlet subprocess startup lean

* fix: preserve imported session timestamp semantics

* fix: preserve catalog timestamp string semantics

* chore: align plugin SDK surface ratchet

* fix: preserve trajectory and SDK string contracts

* fix(test): preserve QA record assertion semantics

* fix: complete standalone record guard rename

* refactor(cron): use canonical string coercion

* fix(acpx): preserve Pi timestamp parsing

* test(channels): adapt custody test harnesses

* test(telegram): classify media harness as test support

* test(acpx): split timestamp contract coverage

* test(channels): support generated custody contracts

* chore: ban the full coercion helper name set

Extends the declaration guard to all eleven consolidated helper names and
renames the cron schedule-identity readNumber wrapper to readScheduleInteger
so the banned generic name cannot regrow.

* fix(scripts): repair release-validation guard drift and lint cause

Restores the renamed isJsonRecord guard in assertTrustedWorkflowHarness after
main added isRecord call sites in parallel, and attaches the caught YAML error
as the thrown error cause (preserve-caught-error was red on main).

* fix: preserve Claude timestamp string semantics

* fix: preserve persisted timestamp string semantics

* fix: preserve date-first timestamp contracts

* fix(openai): harden delegation failure formatting

* chore: close coercion helper guard gaps

* test(openai): model non-error delegation rejection

* chore: refresh plugin SDK API contract

* fix(tasks): use canonical string field reader

* fix(ai): use canonical provider error field coercion

* fix(browser): migrate native bootstrap coercion

* docs(plugin-sdk): clarify text record export compatibility

* fix(gateway): normalize approval execution identity

* test(outbound): isolate message action poll harness
2026-08-11 00:02:18 -07:00
Peter Steinberger 5d191c3984 fix(agents): exclude private shell output from context compaction (#121147)
* fix(agents): exclude private shell output from context compaction

## What Problem This Solves
Shell executions explicitly excluded from model context could still contribute their private output to session replay, token estimates, compaction boundaries, or branch summaries.

## Why This Change Was Made
The session projection owner now omits context-excluded shell messages, while compaction assigns those messages zero tokens and prevents private persisted entries from becoming retained-history cut boundaries.

## User Impact
Private shell output remains durably recorded for its intended owner without leaking into model-visible conversation context or wasting compaction budget; legitimate retained context remains intact.

## Context
Actual production code executed in an isolated VM reduced more than 20,000 characters of private output to zero model-visible characters while preserving eligible context. New owner and sibling regressions cover replay, compaction, branch summaries, and token accounting. Existing oxfmt formatting and scoped whitespace checks passed.

* test(agents): cover private Codex history projection
2026-08-09 19:50:50 -07:00
Peter Steinberger 587eaf42a1 fix(agents): pair reset tool results within retained session history (#121146)
* fix(agents): pair reset tool results within retained session history

## What Problem This Solves
Session resets selected tool-call pairs from history preceding the retained-session boundary, allowing an excluded call to incorrectly claim a retained tool result and leaving replayed conversation history inconsistent.

## Why This Change Was Made
The session-context owner now identifies the retained range before pairing reset tool calls and results. Both reset and compaction flows reuse the same canonical bounded history slice, removing duplicate scan and membership logic.

## User Impact
Reset agent sessions retain only legitimate in-window tool exchanges, repeated resets remain consistent, and cloud-worker replay receives coherent session context without resurrecting discarded calls.

## Context
Actual production-source execution reproduced the previous failure and passed after the fix across valid in-window pairs, repeated resets, and cloud-worker boundaries. Focused session-context and worker-launcher regressions cover the owner and downstream consumer. Existing oxfmt formatting and scoped whitespace checks passed; production code decreases by five lines.

* test(gateway): cover reused reset tool call ids
2026-08-09 19:14:55 -07:00
Peter Steinberger 8616c0c374 refactor: finish shared test helper migrations (#120996)
* test: finish shared helper migrations

* test: fix helper migration CI

* style: fix test import ordering

* test(acpx): restore deferred void types

* test: fix helper migrations after rebase
2026-08-09 06:00:06 -07:00
Peter Steinberger 8d152c1852 fix: preserve tool results across session reset (#121028)
* fix(agents): preserve paired reset tool results

Keep occurrence-paired tool results in reset-derived model context and compaction without rewriting persisted transcripts. Reuse the same classifier in transcript repair and compaction chunk planning.

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

* style(agents): apply transcript repair formatting

* fix(agents): keep pairing helpers private

* refactor(agents): preserve private pairing surface

---------

Co-authored-by: sunlit-deng <yang.jiajun1@xydigit.com>
2026-08-09 04:03:00 -07:00
Peter Steinberger 56cdad5055 fix(ai): invalidate stale compaction replay (#120786) 2026-08-08 17:29:17 -07:00
Peter Steinberger 83e24f8421 fix(llm-core): settle result() when a stream ends without a terminal event (#120508)
* fix(llm-core): settle result() when a stream ends without a terminal event

EventStream.end() with no argument and no prior terminal event left the final
result promise pending forever; any consumer awaiting result() dead-ended
silently for the whole run budget (the agent loop's fall-through in
streamAssistantResponse awaits exactly that promise). All in-repo pumps push
terminals or pass end(result), so this only fires on producer contract
violations — which previously hung and now reject loudly with a named error.
A pre-attached catch keeps iterate-only consumers free of unhandled
rejections. Also dedupe the agent loop's two identical final-message blocks
into one finalizeAssistantMessage helper (net-negative production delta).

Follow-up from #120426's turn-liveness investigation.

* fix(llm-core): void the intentional rejection pre-catch

ClawSweeper P1: the pre-attached no-op catch returns a Promise that would
float under typescript/no-floating-promises.
2026-08-08 13:07:58 -07:00
Peter Steinberger 7fd723b515 fix(agent): apply steering before unstarted tools (#120470)
* fix(agent): apply steering before unstarted tools

Restore steering checkpoints before sequential tool launches and before parallel batch launch. Preserve paired synthetic tool results, async callback compatibility, and Code Mode outcome handling.

* fix(agent): delay tool loop admission commits

Commit loop-detection history only for calls crossing the final launch checkpoint. Release steering-skipped markers, add repeated-steer coverage, and align remaining steering contract text.

* fix(agent): keep tool admission lifecycle internal

Attach delayed admission callbacks through the private internal-hooks seam so steering history remains correct without widening the public Agent Core or Plugin SDK contract.

* fix(agent): preserve steering API contracts

Keep public steering callbacks Promise-based and protocol error kinds unchanged. Use private synchronous draining and structured skip details to retain launch-boundary behavior without API or generated protocol drift.

* test(gateway): use canonical steering fixture config

Use keyed agent entries in the real gateway steering harness so current main does not migrate the fixture during startup.

* fix(agent): remove unused lifecycle re-export

* fix(agent): gate tool launch after wrapper preflight

Split OpenClaw tool execution into private prepare and launch phases so steering is checked after policy, approval, validation, and reconciliation but before the original side effect. Preserve final arguments, voice grants, loop admission, context wrappers, and direct tool execution.

* fix(agent): preserve steering callback receiver

Invoke public steering callbacks with their AgentLoopConfig receiver and cover method-style implementations that read config-owned queue state.
2026-08-08 09:52:10 -07:00
Peter Steinberger fa0fcef9f6 fix(sessions): require provenance for fresh context-size facts (#120497) 2026-08-07 23:06:30 -07:00
Onur Solmaz 1f10ef8050 fix(agents): recover once from critical tool loops (#118647)
* feat(agents): add bounded tool-loop recovery

* feat(agents): wire loop detection into batch recovery

* test(agents): cover bounded tool-loop recovery

* fix(agents): enforce loop thresholds within tool batches

* fix(agents): retain rejected loop batch evidence

* test(agents): update embedded session recovery fixture

* fix(agents): surface terminal loop recovery failures

* fix(agents): preserve loop recovery across retries

* fix(agents): isolate rejected loop evidence

* fix(agents): terminate native critical tool loops

* fix(agents): canonicalize tool loop actions

* fix(agents): preserve tool loop recovery guidance

* fix(agents): preserve code mode tool identity

* fix(agents): preserve prebatch loop evidence

* fix(agents): order native loop termination

* fix(agents): clean up rebased tool validation

* fix(agents): interrupt codex side turns on critical tool loops

* fix(agents): tighten loop recovery batch lifecycle

* fix(agents): drop unconsumed loop detector type export

* fix(agents): drop unconsumed loop relay exports

* test(agents): add agent subscribe to embedded session doubles

* fix(agents): scope critical loop recovery to embedded runs
2026-08-06 14:09:10 +08:00
Peter Steinberger d7a444b08a refactor(agent-core): unify session projection and compaction summaries (#119639) 2026-08-05 07:49:12 -07:00
Vincent Koc 6d88ec5248 fix(agents): recover from invalid compaction summaries (#119137) 2026-08-04 19:43:25 +08:00
Peter Steinberger c83dcc2bc0 fix(security): harden network tool output at canonical owner boundaries (#118984)
* fix(security): bound external tool content at its canonical owner boundary

* fix(plugin-sdk): document supported security boundary and restore facade parity
2026-08-03 15:34:33 -07:00
SunnyShu 1b7aa90c97 fix(agents): preserve tool-call pairing after mid-turn abort (#116642)
* [AI] fix(agents): emit aborted tool results for skipped tool calls on mid-turn abort

When an abort fires mid-batch in executeToolCalls (after the assistant
message with tool_use is committed but before all tool_results are
written), the sequential and parallel dispatch loops break out and skip
the remaining tool calls. The committed assistant turn retains N tool_use
blocks but only M < N tool_results land in context.messages, leaving
orphaned tool_use that corrupts retries/continuation and triggers provider
400 errors on providers that do not synthesize missing results
(allowSyntheticToolResults=false, e.g. openai-completions/DeepSeek).

Emit aborted tool results (createErrorToolResult("Operation aborted")) for
the skipped tail in both executeToolCallsSequential and
executeToolCallsParallel so every tool_use keeps a paired tool_result.
This complements the existing write-side guard (which only covers
synthetic-enabled providers) and the persisted replay repair.

The aborted tail outcomes are routed through finalizeToolCallOutcome (via
a shared finalizeAbortedToolCall helper) so config.afterToolOutcome hooks
(audit, redaction, metadata, error-normalization) observe these skipped
calls just like every immediate or executed outcome, instead of bypassing
the outcome contract. Regression tests assert afterToolOutcome fires for
every skipped call in both dispatch modes.

Fixes #116379

Co-Authored-By: Maas <noreply@anthropic.com>

* [AI] fix(agents): emit tool_execution_start before aborted end for skipped calls

The abort-tail backfill added in #116379 emits tool_execution_end (and a
paired tool_result) for tool calls the dispatch loop never reached, but it
skipped the matching tool_execution_start. Channel/client subscribers that
pair start→end events received an end for an unknown tool-call id during
abort recovery.

Emit tool_execution_start for each skipped call before its aborted end/result,
mirroring the start event every dispatched (including immediate non-executed)
call already emits. Covers both sequential and parallel dispatch, with
regression assertions that every skipped call has a start before its end and
that start/end counts stay paired.

Co-Authored-By: Maas <noreply@anthropic.com>

* fix(agents): complete aborted tool tails safely

Fixes #116379

---------

Co-authored-by: Maas <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-01 03:30:13 +08:00
Peter Steinberger 8c16b18a79 fix(agents): preserve atomic compaction and truthful bounded diagnostics (#116895)
* fix(agents): preserve compacted tool outcomes and summary bounds

* fix(agents): retain diagnostics outside compacted result tails

* fix(agents): honor valid explicit branch summary reservations

* fix(agents): avoid masking earlier failures with routine result tails

* fix(agents): never trade retained diagnostics for result footers

* fix(agents): anchor bounded result tails to terminal diagnostics

* fix(agents): avoid overlapping compacted diagnostic windows

---------

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 08:38:21 -07:00
pash-openai e52354ea13 fix(build): pin typebox to a published release (#116333) 2026-07-30 09:58:51 +00:00
Vincent Koc 38abf500ba fix(update): stabilize cross-version dev upgrades (#115651)
* fix(e2e): stabilize cross-version Parallels upgrades

* fix(e2e): avoid inline macOS guest probes

* fix(e2e): detach Windows dev updates

* fix(e2e): detach macOS guest updates with Node

* fix(e2e): initialize skipped upgrade config

* fix(update): use partial clone for dev checkout

* fix(update): keep Windows dev checkouts clean

* fix(e2e): pin Parallels dev update targets

* fix(e2e): own Parallels gateway restarts

* fix(e2e): verify pinned Parallels checkouts

* fix(e2e): forward Parallels update budgets

* fix(e2e): use canonical provider auth choices

* chore: leave changelog to release automation

* test(ui): stabilize route waits on loaded runners
2026-07-29 19:52:34 +08:00
Peter Steinberger 20668eed03 fix(memory): quarantine writes from tainted agent turns (#115818)
* feat(memory): taint writes after network tools

* fix(memory): keep provenance mutations recoverable

* fix(memory): roll back failed provenance writes

* fix(memory): serialize provenance mutations

* docs(memory): explain flush provenance boundary

* refactor(memory): share provenance mutation wrapper

* docs(memory): clarify flush provenance fallback

* fix(memory): canonicalize provenance paths
2026-07-29 06:02:06 -04:00
Peter Steinberger 4232126bba chore: update dependencies across workspace (#115677)
* chore(deps): update dependencies

* fix(deps): restore CI compatibility
2026-07-29 05:16:42 -04:00
Vincent Koc 892907bf25 fix(agents): bound Code Mode repair retries (#115729) 2026-07-29 15:26:00 +08:00
Peter Steinberger 34c90a8cb3 fix(process): prevent orphaned Windows child process trees (#115535)
* test(process): reproduce Windows taskkill process-tree leak

* fix(process): stop leaked Windows child process trees

Escalate only when Windows taskkill reports that graceful process-tree termination failed. Preserve awaited taskkill completion, grace-period fallback, one-shot signaling, and PID-reuse protection.

Closes #110789

Supersedes #112202

Co-authored-by: Mohammed Alkindi <alkndymhmd692@gmail.com>

---------

Co-authored-by: Mohammed Alkindi <alkndymhmd692@gmail.com>
2026-07-29 00:26:32 -04:00
Peter Steinberger c7fecd3b69 fix(compaction): plan cut points in trigger units (#111886) (#115309) 2026-07-28 13:24:40 -04:00
qingminlong a01319b27f fix: account for CJK text in compaction estimates (issue #103930) (#114386)
* fix: account for CJK text in compaction estimates

* fix: share CJK compaction estimator

* fix: format CJK compaction estimator

* fix: make CJK regexes lint-safe

Co-authored-by: qingminlong <qing.minlong@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-27 08:51:44 -04:00
Jason (Json) 2ee8730450 feat(anthropic): add Claude Opus 5 model support (#113391)
* feat(anthropic): add Claude Opus 5 model support

Wire claude-opus-5 through the Claude 5 contract seams: adaptive-by-default
thinking with the full low..max effort range, default-sampling and prefill
stripping, streaming refusal contract, model-bound thinking replay, and 1M/128k
catalog metadata across anthropic, claude-cli, Vertex, Bedrock, and Mantle.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(anthropic-vertex): normalize explicit Vertex Opus 5 model rows

Extend normalizeAnthropicVertexResolvedModel so user-configured Vertex Opus 5
rows regain reasoning, image input, 1M/128k limits, and the native thinking
map; update the live-model priority expectation and regenerate docs_map.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 14:47:08 -06:00
Peter Steinberger acd92f6a3d chore(deps): refresh repository dependencies (#112453)
* build(deps): update QA broker dependency

* build(deps): refresh repository dependencies

* build(deps): reconcile rebased shrinkwraps

* test(plugins): remove stale loader test state

* test(deps): stabilize updated dependency coverage

* fix(swift): use caller-isolated TaskLocal overload

* build(deps): regenerate rebased shrinkwraps

* test(msteams): preserve DNS validation in fetch helper

* fix(deps): avoid vulnerable optional image stack

* test(deps): validate generated LRU override

* refactor(ui): extract chat resizable divider

* test(ui): update divider ownership path

* fix(matrix): retain restart-compatible SDK

* style(cron): format update test
2026-07-23 16:17:13 +00:00
Peter Steinberger 9cbbac8fc8 refactor(plugins): prune retired compatibility tombstones (#113025)
* refactor(plugins): prune retired compat tombstones

* chore: shrink cleanup ratchets

* test(tooling): model flattened agent-core exports

* test(system-agent): isolate TUI catalog discovery
2026-07-23 07:30:35 -07:00
Peter Steinberger 9ae9fcb1cd fix: preserve transcript cursors across session resets (#112988)
* feat: add reset transcript boundaries

* feat: project reset boundaries in history

* refactor: reset sessions in place

* fix: fence reset runtime caches by lifecycle

* fix: preserve reset filtering during compaction

* fix: anchor compaction after reset boundaries

* fix: budget reset preludes during compaction

* fix: honor reset visibility in bounded history

* fix: couple reset boundaries to lifecycle commits

* fix: commit reset boundaries atomically

* fix: preserve reset boundary transition states

* fix: preserve concurrent reset lifecycle owners

* fix: preserve reset boundary storage compatibility

* fix: preserve reset windows across persisted histories

* fix: fence legacy reset lifecycle state

* fix: keep stale appends behind reset boundaries

* perf: index reset descendants linearly

* fix: bound reset history projection reads

* fix: narrow invalid leaf control types

* test: use typed cron lifecycle revision

* style: keep acp lifecycle helper within limit

* style: satisfy reset boundary lint rules

* test: split reset concurrency coverage

* style: satisfy compaction fixture lint

* refactor: remove retired reset replay exports

* test: assert in-place reply session resets

* test: assert reset boundary persistence

* test: mock session boundary counts
2026-07-23 06:22:43 -04:00
mikasa a8a6e2a828 fix(process): bound Windows exec timeout cleanup (#104234)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-21 09:26:04 -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 b6bac30e33 refactor(agent-core): delete the unused session harness layer (#110287) 2026-07-18 02:27:48 +01:00
Peter Steinberger c1ee9c6fb1 fix: network error hardening, session short-id entropy, extension load caching (#110196)
* fix(infra): harden network client errors, session short ids, and extension load caching

* fix(infra): preserve injected dispatcher seams and drop the uncached extension loader
2026-07-18 00:35:13 +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 cbaf112355 fix: compaction usage guards and agent-loop turn correctness (#109709)
* fix(agents): compaction usage guards and agent-loop turn correctness

* fix(agents): manual compaction replans with zero retention for small sessions

* ci: retrigger pull-request validation

* ci: refresh pull-request validation

* test(agents): live end-to-end agent session coverage

* fix(agents): keep yielded runs settled so external delivery can claim the session

* docs(agents): clarify length retry bookkeeping
2026-07-17 14:13:29 +01:00
Peter Steinberger b84199644d fix: silent credential-save failures and session/tool hygiene gaps (#109622)
* fix(agents): surface auth persistence failures and harden session, model, and shell tool hygiene

* refactor(agents): keep shell invocation types module-local

* test(agents): derive shell config type locally
2026-07-17 00:02:45 -07:00
thomas.szbay b06fe2a673 fix(kill-tree): verify process group leader before using group kill to prevent gateway SIGTERM (#76259) (#94697)
* fix(kill-tree): verify process group leader before group kill to prevent gateway SIGTERM (#76259)

- Add isProcessGroupLeader() to killProcessTree/signalProcessTree: ps -p <pid> -o pgid= primary check with /proc/<pid>/stat fallback on Linux. Group kill only when the PID is its own process group leader; non-leaders fall back to single-pid kill, preventing accidental gateway SIGTERM when a non-detached child shares the gateway's process group.
- Propagate detached: true to all detached-spawn cleanup callers (exec-termination, agent-bundle LSP, mcp-stdio, bash, supervisor pty, agent-core nodejs) so detached group cleanup survives leader exit.
- Gateway/daemon cleanup paths (schtasks, restart-health) keep the leader-checked default (detached omitted).

Closes #76259

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

* refactor(process): tighten process-group ownership checks

* refactor(daemon): split restart diagnostics

* refactor(daemon): isolate restart health types

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 12:30:51 -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
Ayaan Zaidi 432da8b3cb feat(agent): preserve interrupted turn context
Inspired by Codex: codex-rs/core/src/context/turn_aborted.rs and codex-rs/core/src/tasks/mod.rs.
2026-07-13 10:27:29 +05:30
Peter Steinberger 4b751ce48a feat(tooling): complete packages/* noUncheckedIndexedAccess adoption (phase 2) (#104626)
* feat(tooling): extend strict-ratchet lane to all remaining leaf packages

* fix(packages): burn down indexed-access debt in ai and agent-core

All 196 noUncheckedIndexedAccess errors fixed behavior-identically
(iteration, .at()/slices, DataView byte math, guarded queue peeks) plus
cleanup finds: a sparse-tool diagnostic bug, deduplicated Responses
call/item ID parsing with an honest string|undefined splitter, and a
clearer local failure for redacted-thinking blocks missing signatures.
Removes all 17 remaining non-null assertions across ai, gateway-client,
and llm-core so the assertion ban aligns 1:1 with the ratchet lane.
speech-core joins memory-host-sdk as structurally deferred (imports
src/** via plugin-sdk path mappings).
2026-07-11 11:54:06 -07:00
Peter Steinberger 7bf80dc2c6 chore(tooling): enforce formatting and refresh TypeScript checks (#104239)
* chore(tooling): enforce current formatter and refresh checks

* chore(tooling): keep release changelog formatter-owned

* chore(tooling): retain compatible Node type surface

* ci: enforce formatting for docs-only changes

* ci: isolate docs formatter check

* chore(tooling): apply updated lint and format rules

* chore(tooling): satisfy updated switch lint

* style(ui): apply Linux formatter layout

* test(doctor): match quiet local audio contribution

* test(doctor): assert quiet output only

* test(doctor): follow restored information contract
2026-07-11 01:09:51 -07:00
qingminlong 6e0d590bd8 fix(agent-core): avoid a crash when empty output has a negative line limit (#103425)
* fix(agent-core): avoid empty truncation crash

* refactor(agent-core): simplify empty truncation handling

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Peter Steinberger <peter@steipete.me>
2026-07-11 01:41:00 +01:00
qingminlong 3a64889d83 fix(agent-core): report correct JSONL entry line after blank rows (#103645)
* fix(agent-core): report jsonl entry physical line numbers

* fix(agent-core): preserve physical JSONL line numbers

* test(agent-core): keep JSONL cleanup lint-safe

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-10 18:12:56 +01:00
qingminlong e251bc4c2f fix(agent-core): keep file info basename on Windows paths (#102813)
* fix(agent-core): keep file info basename on Windows paths

* fix(agent-core): use platform path basenames

* chore: sync PR branch before changelog

* docs(changelog): credit Windows file metadata fix

* fix(agent-core): use platform path basenames

* test(agent-core): isolate Windows shell discovery

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Peter Steinberger <peter@steipete.me>
2026-07-09 23:33:28 +01:00
wings1029 f7cc6ebe1e fix(agent-core,memory-core): keep compaction summary and memory snippet truncation UTF-16 safe (#102542)
* fix(agent-core,memory-core): keep compaction summary and memory snippet truncation UTF-16 safe

* fix: make compaction and memory truncation UTF-16 safe

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-09 10:08:11 +01:00