Commit Graph
3650 Commits
Author SHA1 Message Date
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
Tianyi Cui 25a5dc35ba Refresh Cordis event API summaries 2026-07-15 17:53:51 +08:00
Hypatia May d66c926d7a fix(agent): preserve lifecycle recovery boundaries (PR3 round 2) 2026-07-15 17:43:33 +08:00
Tianyi Cui 263d8a6dff Merge branch 'codex/simp-hide-concrete-agent-loop' into codex/simp-hide-subagent-internals 2026-07-15 17:37:08 +08:00
Tianyi Cui e1c0d0b579 Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop 2026-07-15 17:37:08 +08:00
Tianyi Cui cdeec6fc1d Update built JSON-RPC probe path 2026-07-15 17:36:51 +08:00
Tianyi Cui 3460f9c10b Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id 2026-07-15 17:26:29 +08:00
Tianyi Cui 8c7e2b4426 Merge branch 'codex/simp-hide-concrete-agent-loop' into codex/simp-hide-subagent-internals 2026-07-15 17:26:29 +08:00
Tianyi Cui 6ee2655cab Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop 2026-07-15 17:26:29 +08:00
Tianyi Cui 9035ef1f98 Merge branch 'codex/simp-unify-agent-session-id' into codex/simp-ui-identity-residue 2026-07-15 17:26:29 +08:00
Tianyi Cui f20f5c2958 Merge branch 'codex/simp-compaction-surface' into codex/simp-agent-entry-state 2026-07-15 17:26:28 +08:00
Tianyi Cui 8eccd5416e Document restored compaction result fields 2026-07-15 17:26:28 +08:00
Tianyi Cui 0521ec02ef Merge branch 'codex/simp-hide-concrete-agent-loop' into codex/simp-hide-subagent-internals 2026-07-15 17:24:08 +08:00
Tianyi Cui 7fd7261bcd Merge branch 'codex/simp-ui-identity-residue' into codex/simp-hide-concrete-agent-loop 2026-07-15 17:24:08 +08:00
Tianyi Cui d6ba1fef26 Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id 2026-07-15 17:24:07 +08:00
Tianyi Cui 6edb44657c Merge branch 'codex/simp-unify-agent-session-id' into codex/simp-ui-identity-residue 2026-07-15 17:24:07 +08:00
Tianyi Cui 623c2fa8d2 Merge branch 'codex/simp-compaction-surface' into codex/simp-agent-entry-state 2026-07-15 17:24:07 +08:00
Tianyi Cui d25a56b431 Restore CompactionResult diagnostics 2026-07-15 17:23:39 +08:00
Tianyi Cui 41e711c01e Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id 2026-07-15 17:09:32 +08:00