Commit Graph
3368 Commits
Author SHA1 Message Date
Tianyi Cui b01647bf95 Merge remote-tracking branch 'origin/master' into codex/simp-drop-unused-schema-default 2026-07-15 23:13:50 +08:00
Tianyi Cui b1de7c3009 Merge remote-tracking branch 'origin/codex/simp-prune-llm-contract' into codex/simp-hide-llm-adapter-helpers 2026-07-15 23:11:11 +08:00
Tianyi Cui bb1c8fa27d fix(llm): restore pruned status contract 2026-07-15 23:09:14 +08:00
Tianyi Cui abac7e4f44 Merge remote-tracking branch 'origin/master' into codex/simp-prune-llm-contract 2026-07-15 23:07:30 +08:00
Tianyi Cui fb7fa980b8 test(examples): include task controls in CLI composition 2026-07-15 22:58:44 +08:00
Tianyi Cui 380519b6d2 Merge remote-tracking branch 'origin/master' into codex/pr106-master-merge-review-20260715 2026-07-15 22:56:27 +08:00
Tianyi Cui cc7642ab66 Merge remote-tracking branch 'origin/master' into codex/cli-one-shot-demo
# Conflicts:
#	examples/coding-agent/README.md
2026-07-15 22:56:10 +08:00
Tianyi Cui 51f3a4eafc Merge remote-tracking branch 'origin/master' into codex/simp-prune-sandbox-surface
# Conflicts:
#	packages/bash/bash-sandbox/src/index.ts
2026-07-15 22:55:55 +08:00
Tianyi Cui 0fefc3d7b8 Merge branch 'master' into codex/simp-hide-web-provider-helpers 2026-07-15 22:49:56 +08:00
Tianyi Cui 6c846531e7 Merge current master into PR #106 2026-07-15 22:44:47 +08:00
kingwl 8f5c592b9f fix(session): break chunk runs on time gaps that cannot subtract exactly
Two safe-integer timestamps can differ by more than 2^53-1 (e.g.
MIN_SAFE_INTEGER to MAX_SAFE_INTEGER-1), so the dt subtraction rounds
and the packed row decodes to a timestamp one off the original --
violating the codec's lossless contract. Unreachable from a real clock
(the gap needs ~285k years) but reachable from hand-written fixtures,
and the decoder accepts hand-written rows.

continues() now refuses to extend a run across such a gap (the check is
exact both ways: an in-range true gap subtracts without rounding and
passes; an out-of-range one rounds to an out-of-range value and fails),
splitting the run instead -- whitelist philosophy, compression lost,
data never. The decoder tightens to match the encoder's image: time0
and dt must be safe integers, and reconstructed member seqs/times must
stay in safe range, so float reconstruction is exact wherever
validation passes.

The round-trip property now draws times from the full safe-integer
range (it previously generated only small gaps, which is how this
escaped); the bot's counterexample is pinned as an example test.

Found by ds-review-bot on #338.
2026-07-15 22:44:32 +08:00
Tianyi Cui 5e3da065db test(examples): snapshot headless one-shot stream 2026-07-15 22:43:03 +08:00
kingwl f408d420da Merge remote-tracking branch 'origin/master' into jsonl-packed-chunk-rows
# Conflicts:
#	docs/event-producer-consumer.md
2026-07-15 22:14:42 +08:00
Yichen Jiang 1094748bec Merge branch 'master' into codex/agent-session-jsonl-location 2026-07-15 22:04:58 +08:00
Tianyi Cui b06ae91fa8 fix(tasks): address task API review feedback
The public kill result used the awkward phrase already-terminal. Rename it to already-finished and keep the model-facing response aligned; not-alive would be inaccurate because a force-failed registry record can still correspond to orphaned producer work.

Task kinds were open strings even though producer namespaces are an extension point. Add the merge-extensible TaskKindMap and derived TaskKind, cover consumer declarations in task and bundle tests, and retain the runtime non-empty check for untyped callers.

With exactOptionalPropertyTypes, owner?: Agent | undefined allowed an explicit undefined value that no caller needs. Tighten the property to owner?: Agent so unowned work is expressed by omitting it.

Record the requested task-service/backend split as a follow-up, using a systemd-backed runtime as a concrete candidate without guessing its durability and ownership contract in this PR. Regenerate the type and Cordis catalogs so public docs match the declarations.
2026-07-15 21:45:30 +08:00
kingwl d46d37f372 Merge remote-tracking branch 'origin/master' into cross-family-fs-sandbox
# Conflicts:
#	docs/config-catalog.md
#	docs/module-graph.md
#	docs/rfc/INDEX.md
#	examples/acp-agent/composition.md
#	examples/acp-agent/cordis.yml
#	examples/acp-agent/tests/snapshots/advanced-toolchain/session.1.jsonl
#	examples/acp-agent/tests/snapshots/advanced-toolchain/session.2.jsonl
#	examples/acp-agent/tests/snapshots/advanced-toolchain/session.jsonl
#	examples/acp-agent/tests/snapshots/both-mode-turn/session.jsonl
#	examples/acp-agent/tests/snapshots/permission-switching/session.jsonl
#	examples/acp-agent/tests/snapshots/skill-load/session.jsonl
#	examples/acp-agent/tests/snapshots/text-turn/session.jsonl
#	packages/bash/bash-sandbox/package.json
#	packages/bash/bash/package.json
#	packages/bash/tool-bash/src/index.ts
#	packages/fs/fs/package.json
#	packages/fs/tool-fs/package.json
#	packages/fs/tool-fs/src/index.ts
#	packages/fs/tool-fs/tests/tools.spec.ts
#	pnpm-lock.yaml
2026-07-15 21:39:02 +08:00
Tianyi Cui 7278fc21d8 fix(session-persistence): handle Windows directory fsync 2026-07-15 21:36:42 +08:00
Tianyi Cui f4bd2405cc Merge current master into PR #219
Refresh the background-task branch onto the latest repository baseline before applying review feedback. This preserves merge ancestry, incorporates the current CI and package-structure changes, and ensures the review fixes are validated against the code that will actually receive the PR.
2026-07-15 21:30:21 +08:00
kingwl 7ef21239ca feat(session): opt-in packed chunk rows in the JSONL log
Providers stream token-sized deltas, so a session log stores hundreds of
near-identical assistant/chunk lines whose JSON envelopes dwarf their
payloads (~56x measured on a real DeepSeek session, 73% of file bytes).

Add a lossless storage codec to dsh-session: packChunkRuns() folds each
run of >=3 consecutive same-block delta chunks into one storage row --
text-chunks / reasoning-chunks / tool-call-chunks, bare slash-less tags
like the header line's 'session' so rows cannot be confused with session
events -- and decodeStorageRecord() expands rows back to the exact
original events (seq0/time0 + dt gap array reconstruct every member's
seq/time; tool-call rows carry the run-constant id/name). The encoder
whitelists exact shapes and stores anything unrecognized verbatim; the
decoder validates row-tagged values and fails loud on malformation.

The JSONL backend gains a packChunks config (default false). Writing
packs only when enabled -- default-off output stays byte-identical to
the previous layout, so snapshot goldens are untouched. Reading is
layout-blind: scanLog always decodes rows and now checks seq contiguity
with a cursor instead of the line index, so packed, unpacked, and mixed
files all load identically. Fixture readers (llm-replay parseSessionLog,
acp-snapshot normalizeSessionLog) share the codec; the normalizer zeroes
a row's time0/dt exactly like an event's time. The two demo bundles
plumb packChunks from cordis.yml to the backend.

Measured on a real coding session: 105 KB -> 42 KB (-60%), 475 lines ->
74, with reasoning/tool-call heavy sessions saving the most. Covered by
example + fast-check round-trip codec tests, backend packed/mixed/torn-
tail specs, and an end-to-end demo run loading a packed log through a
default-config backend.
2026-07-15 21:26:36 +08:00
Tianyi Cui b78cdbcd51 feat(examples): add one-shot CLI demo 2026-07-15 21:21:24 +08:00
Tianyi Cui 8bb8ac8b3c docs(tasks): condense background task prose
The background-task change repeated its lifecycle design across implemented RFCs, package READMEs, JSDoc, test commentary, and model-visible schemas. That repetition obscured the contracts that maintainers must preserve and added avoidable prompt tokens.

Rewrite the implemented RFCs around the current design, keep authorization, exact-owner cleanup, wait/abort ordering, producer quiescence, and teardown-failure guarantees at their owning surfaces, and remove peer surveys, review history, control-flow narration, and emphatic restatement.

Shorten the task and subagent schema wording, synchronize the bilingual tool cookbook, and regenerate the config, service, RFC, tool, and replay snapshot derivatives. Runtime behavior is unchanged; test edits update prose-only assertions and descriptions.
2026-07-15 21:08:58 +08:00
Tianyi Cui ac4be798f2 Merge remote-tracking branch 'origin/master' into codex/simp-drop-unused-schema-default 2026-07-15 20:51:05 +08:00
Tianyi Cui 4f37c91beb Merge remote-tracking branch 'origin/master' into codex/simp-hide-web-provider-helpers 2026-07-15 20:51:05 +08:00
Tianyi Cui cb3c3014d4 Merge branch 'codex/simp-prune-llm-contract' into codex/simp-hide-llm-adapter-helpers 2026-07-15 20:51:05 +08:00
Tianyi Cui 5139fddc8d Merge remote-tracking branch 'origin/master' into codex/simp-prune-llm-contract 2026-07-15 20:51:04 +08:00
Tianyi Cui abd1d7d89f Merge remote-tracking branch 'origin/master' into codex/simp-prune-sandbox-surface 2026-07-15 20:51:04 +08:00
Tianyi Cui 78614b670d Merge branch 'codex/simp-ui-identity-residue' into codex/simp-name-front-door-defaults 2026-07-15 20:50:56 +08:00
Tianyi Cui 7c6ead8b6f Merge branch 'codex/simp-hide-concrete-agent-loop' into codex/simp-hide-subagent-internals 2026-07-15 20:50:50 +08:00
Tianyi Cui 7396fb6fb5 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop 2026-07-15 20:50:50 +08:00
Tianyi Cui d6cc898a30 Merge branch 'codex/simp-unify-agent-session-id' into codex/simp-ui-identity-residue 2026-07-15 20:50:50 +08:00
Tianyi Cui 273dfca1a5 Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id 2026-07-15 20:50:50 +08:00
Tianyi Cui c6817b5585 Merge branch 'codex/simp-compaction-surface' into codex/simp-agent-entry-state 2026-07-15 20:50:50 +08:00
Tianyi Cui 11af4e0cc6 Merge branch 'codex/simp-trim-hook-snapshot-noise' into codex/simp-compaction-surface 2026-07-15 20:50:50 +08:00
Tianyi Cui ac6e397336 Merge branch 'codex/simp-snapshot-fixture-inventory' into codex/simp-shared-acp-test-launcher 2026-07-15 20:50:50 +08:00
Tianyi Cui f56f39cb0f Merge branch 'codex/simp-session-log-representation' into codex/simp-snapshot-fixture-inventory 2026-07-15 20:50:49 +08:00
Tianyi Cui 1c3bb4f8a8 Merge remote-tracking branch 'origin/master' into codex/simp-session-log-representation 2026-07-15 20:50:40 +08:00
Yichen Jiang 72903c9465 Merge remote-tracking branch 'origin/master' into worktree/provider-routed-llm-adapters 2026-07-15 20:18:20 +08:00
Yichen Jiang f47a87fcf5 Merge remote-tracking branch 'origin/master' into worktree/provider-routed-llm-adapters
# Conflicts:
#	docs/config-catalog.md
#	packages/examples/acp-demo/tests/acp-agent.spec.ts
#	packages/examples/stdio-demo/README.md
#	packages/examples/stdio-demo/src/index.ts
#	packages/examples/stdio-demo/tests/stdio-agent.spec.ts
2026-07-15 20:14:09 +08:00
Tianyi Cui 732735b27f docs: align default fallback test comments 2026-07-15 19:52:09 +08:00
Tianyi Cui 54fb96ef04 refactor: name front door defaults 2026-07-15 19:52:09 +08:00
Huanqi Cao 30a209aab5 fix(e2e): reach child quiescence before temp-dir cleanup in built-bin smokes
The acp built-bin smoke killed its child and immediately rm'd the temp
consumer dir; POSIX tolerates unlinking a live process's cwd, Windows fails
EBUSY while the child still holds its cwd and session-log handles (the CI
windows job's only red step). Await the child's exit after SIGKILL and give
both smokes' rm a brief retry for the OS handle-release lag.
2026-07-15 19:13:05 +08:00
Tianyi Cui 26a03cfbd6 Merge branch 'codex/simp-hide-concrete-agent-loop' into codex/simp-hide-subagent-internals 2026-07-15 17:55:57 +08:00
Tianyi Cui d06500fe9b Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop 2026-07-15 17:55:57 +08:00
Tianyi Cui 02da758a68 Merge branch 'codex/simp-unify-agent-session-id' into codex/simp-ui-identity-residue 2026-07-15 17:55:57 +08:00
Tianyi Cui 6245094fe1 Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id 2026-07-15 17:55:57 +08:00
Tianyi Cui d48edf818f Merge branch 'codex/simp-compaction-surface' into codex/simp-agent-entry-state 2026-07-15 17:55:57 +08:00
Tianyi Cui 87c900dfb2 Document compaction result diagnostics 2026-07-15 17:55:48 +08:00
Tianyi Cui 2176e25910 Merge branch 'codex/simp-trim-hook-snapshot-noise' into codex/simp-compaction-surface 2026-07-15 17:55:13 +08:00
Tianyi Cui 0b585e1d27 Merge branch 'codex/simp-snapshot-fixture-inventory' into codex/simp-shared-acp-test-launcher 2026-07-15 17:55:06 +08:00
Tianyi Cui e2c9048c16 Merge branch 'codex/simp-session-log-representation' into codex/simp-snapshot-fixture-inventory 2026-07-15 17:55:05 +08:00