Commit Graph
480 Commits
Author SHA1 Message Date
Tianyi Cui af4313ec11 Merge rfc/loop into codex/goal-domain 2026-07-20 01:04:15 +08:00
Tianyi Cui 684fcf3357 Merge branch 'codex/invariant-package-registration-gate' into codex/package-invariant-checks
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-19-package-invariant-runtime-contracts.i18n.yaml
#	.agents/notes/implemented/architecture/2026-07-19-package-invariant-runtime-contracts.md
#	.agents/notes/implemented/architecture/2026-07-19-package-invariant-runtime-contracts.zh.md
#	.agents/notes/implemented/architecture/2026-07-19-package-owned-invariant-service.i18n.yaml
#	docs/rfc/INDEX.md
#	packages/AGENTS.md
2026-07-20 00:54:28 +08:00
Tianyi Cui 941b0411d8 feat(invariants): implement package runtime checks 2026-07-20 00:38:37 +08:00
Tianyi Cui 6520f71f94 Merge remote-tracking branch 'origin/codex/invariant-service-seam' into codex/invariant-package-registration-gate
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-19-package-owned-invariant-service.i18n.yaml
#	docs/core-data-structures/session.md
#	docs/module-graph.md
#	package.json
#	packages/sdk/scripts/tsconfig.json
2026-07-20 00:35:06 +08:00
Tianyi Cui b46dfe08a2 Merge remote-tracking branch 'origin/master' into codex/invariant-service-seam
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-19-package-owned-invariant-service.i18n.yaml
#	.agents/notes/implemented/architecture/2026-07-19-package-owned-invariant-service.md
#	.agents/notes/implemented/architecture/2026-07-19-package-owned-invariant-service.zh.md
#	.agents/notes/implemented/feature/2026-06-18-compaction-capability-seam.md
#	.agents/notes/implemented/feature/2026-07-07-session-prefix.md
#	.agents/notes/implemented/process/2026-07-14-typescript-program-backed-semantic-gates.i18n.yaml
#	docs/architecture.md
#	docs/config-catalog.md
#	docs/core-data-structures/session.md
#	docs/rfc/INDEX.md
#	packages/examples/agent-spine-demo/README.md
#	packages/examples/agent-spine-demo/src/index.ts
#	packages/examples/agent-spine-demo/tests/agent-core.spec.ts
#	packages/support/invariants/README.md
#	packages/support/invariants/src/index.ts
#	packages/support/invariants/tests/invariants.spec.ts
2026-07-20 00:25:31 +08:00
Tianyi Cui 7a4909f221 Merge remote-tracking branch 'origin/master' into codex/jsonl-zstd-persistence
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-19-zstandard-jsonl-session-logs.i18n.yaml
#	.agents/notes/implemented/architecture/2026-07-19-zstandard-jsonl-session-logs.md
#	.agents/notes/implemented/architecture/2026-07-19-zstandard-jsonl-session-logs.zh.md
#	docs/rfc/INDEX.md
#	packages/session-persistence/session-persistence-jsonl/README.md
2026-07-20 00:15:32 +08:00
Tianyi Cui d139948ed2 feat(persistence): compress JSONL logs with Zstandard 2026-07-20 00:06:21 +08:00
Tianyi Cui e8eddc7ef8 Rename RFCs to Agent Notes 2026-07-19 22:52:03 +08:00
Tianyi Cui adc350eba2 Merge remote-tracking branch 'origin/codex/goal-tools' into codex/goal-session 2026-07-19 22:33:34 +08:00
Tianyi Cui 4164c7120e Merge remote-tracking branch 'origin/rfc/loop' into codex/goal-domain 2026-07-19 22:20:18 +08:00
Tianyi Cui 433670a754 feat(invariants): require package-owned companions 2026-07-19 22:13:50 +08:00
Tianyi Cui 546f2ae478 Merge remote-tracking branch 'origin/master' into codex/rename-golden-files-to-expected 2026-07-19 21:09:20 +08:00
imccyu 6eabba8021 Merge branch 'master' into worktree-windows-runtime 2026-07-19 21:08:12 +08:00
Tianyi Cui 25555c9cfc feat(goal): drive same-session goal rounds 2026-07-19 20:30:43 +08:00
Tianyi Cui 9d310ecc27 feat(invariants): add package-owned service seam 2026-07-19 19:19:57 +08:00
imccyu 5faf8d1200 test(acp-snapshot): skip POSIX-cancel scenarios on Windows
The cancel-tool-calls scenario cancels a live bash call, which relies on
POSIX detached-process-group termination; bash has no Windows process-tree
kill yet (deferred with the Bash execution domain), so the hung call times
the scenario out on the native Windows snapshot lane.

Add a posixOnly scenario declaration that skips the run test on win32
while the fixture guards keep covering committed files on every platform,
and mark cancel-tool-calls with it.
2026-07-19 19:02:06 +08:00
Tianyi Cui a525776015 feat(goal): add persisted same-session goal domain 2026-07-19 18:47:34 +08:00
Tianyi Cui a278374e8f docs: structure model experience fields 2026-07-19 18:08:42 +08:00
Tianyi Cui 9c5b86051b Merge master into tool-result pruning
Retarget the pruning feature onto the merged compaction foundation.

Adapt content-only tool-result rewrite validation to the session-owned surface manager, migrate the demo wiring to repl-agent, and refresh generated type, catalog, and website contracts while preserving pressure and overflow pruning behavior.
2026-07-19 17:54:55 +08:00
imccyu 3e9cb70c78 Merge remote-tracking branch 'origin/master' into worktree-windows-runtime
# Conflicts:
#	packages/session-persistence/session-persistence-jsonl/README.md
#	packages/session-persistence/session-persistence-jsonl/src/index.ts
#	packages/session-persistence/session-persistence-jsonl/tests/jsonl.spec.ts
#	packages/support/loader-smoke/tests/loader-smoke.spec.ts
2026-07-19 17:52:36 +08:00
Tianyi Cui 0893aaa7cb test: rename golden snapshot files to expected 2026-07-19 17:45:49 +08:00
Yichen Jiang b0dc299508 Merge remote-tracking branch 'origin/master' into fix/subagent-depth-budget
# Conflicts:
#	examples/acp-agent/tests/acp.snapshot.ts
2026-07-19 17:42:52 +08:00
Tianyi Cui bcc920369c docs: document package KV cache effects 2026-07-19 17:39:50 +08:00
Yichen Jiang d231f30024 test(acp-snapshot): cover the child-omission branches synthetically
The childToolOmissions comparison arms ran only through the examples
snapshot suites, which the unit coverage gate does not count. Add an
authored child-omission scenario to the synthetic replay suite: one
scripted child omits the declared tool (header pin minus the omission,
prompt pin skipped), one keeps the full set (pin and prompt compared
verbatim), restoring 100% branch coverage on suite.ts.
2026-07-19 17:34:10 +08:00
Yichen Jiang cb74477d42 feat(tool-subagent): default maxDepth 1 with at-cap schema hiding
An omitted maxDepth meant unbounded recursion, and the shipped examples
shipped that default. maxDepth now defaults to 1; a numeric cap requires
the provider's depthLimit capability (the mount fails loud and points to
the explicit 'provider-managed' opt-out for out-of-process providers),
and a child AT the cap loses the delegating tool from its own schema via
the child toolFilter — prompt-face hiding on top of the execution-face
depth check. Examples pin maxDepth explicitly. The ACP snapshot harness
gains Scenario.childToolOmissions so a child session may legitimately
omit declared delegation tools from its pinned header and prompt;
affected subagent/workflow goldens are re-recorded.
2026-07-19 17:20:49 +08:00
Tianyi Cui 3e4e3aa865 Merge remote-tracking branch 'origin/master' into codex/pr332-merge-master-20260719
# Conflicts:
#	docs/cookbook/extension-cookbook.i18n.yaml
2026-07-19 15:07:58 +08:00
Tianyi Cui a246afa33a test(acp-snapshot): detach the inherited-stdio fixture
Windows does not guarantee that an ordinary child process will continue after its parent exits. The fake ACP agent exited immediately after spawning its late-output descendant, so Windows could tear down that descendant and close the protocol stream before the delayed ACP update was written.

Launch the descendant in detached mode while continuing to inherit stdout and stderr, then unref it as before. This preserves the intended regression boundary: launcher shutdown must wait for descendant-held stdio and parse the final buffered frame after the direct ACP parent exits.
2026-07-19 14:14:00 +08:00
Tianyi Cui 2ef9590f33 test(loader-smoke): declare argv lib fixture 2026-07-19 13:51:41 +08:00
Tianyi Cui b1b076f993 test(acp-snapshot): cover accepted fallback termination
Drive the shutdown path where the requested signal reports a child error without exiting, the bounded marker grace expires, and fallback SIGKILL is accepted.

Assert that both signals are attempted and that close drains the successful fallback exit before preserving the original child error, restoring per-file 100% branch and line coverage for the launcher.
2026-07-19 13:49:48 +08:00
Tianyi Cui 97f9ec7c19 test(acp-snapshot): inherit descendant pipes portably
Use Node's explicit inherit stdio mode for the fake descendant instead of passing the parent process stream objects as child descriptors.

This keeps the grandchild's stdout and stderr handles open across the fake ACP parent's exit on Windows, so launcher shutdown must drain the late buffered update and stderr bytes just as it does on POSIX.
2026-07-19 13:29:31 +08:00
Tianyi Cui 5d6b589922 fix(acp-snapshot): await delayed Windows exit markers
A successful Windows termination request can end the process before Node publishes exitCode or signalCode. If a child error wins the shutdown race, give that accepted exit a bounded observation window before escalating or reporting fallback refusal.

Cover a delayed real exit edge, preserve prompt refusal behavior for a genuinely live child, and document the launcher grace without weakening the complete stdio and parser drain boundary.
2026-07-19 13:28:19 +08:00
Tianyi Cui 89987f0ad4 docs: align one-shot demo prose 2026-07-19 13:25:30 +08:00
Tianyi Cui 53c729e00b Merge remote-tracking branch 'origin/master' into codex/cli-one-shot-demo
# Conflicts:
#	AGENTS.md
#	docs/architecture.md
#	docs/capability-seams.md
#	docs/cookbook/extension-cookbook.i18n.yaml
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	knip.json
#	packages/README.md
#	packages/support/loader-smoke/README.md
#	packages/support/loader-smoke/src/index.ts
#	vitest.snapshot.config.ts
2026-07-19 13:11:50 +08:00
Tianyi Cui d709a8a1a4 test(acp): await cancelled tool updates 2026-07-19 13:09:16 +08:00
Tianyi Cui edaaa50fe3 test(acp): snapshot cancelled queued tool calls 2026-07-19 13:03:31 +08:00
Tianyi Cui e9aac53fde test(acp-snapshot): cover pre-fallback Windows exit state
Model the requested signal setting a child termination marker before the launcher begins fallback handling. The regression proves close drains inherited stdio and propagates the original process error without sending a redundant SIGKILL.

This complements the post-check fallback-refusal race and restores the launcher's required 100% per-file statement and branch coverage.
2026-07-19 12:53:41 +08:00
Tianyi Cui 6cc9c8e1fb Merge remote-tracking branch 'origin/master' into codex/pr335-merge-master-20260719 2026-07-19 12:45:35 +08:00
Tianyi Cui 0f4bc645da test(acp-snapshot): inherit descendant stdio portably
Pass the fake descendant the parent process's stdout and stderr stream handles instead of Unix-style numeric file descriptors. This lets Windows duplicate the live ACP and diagnostic pipes so launcher shutdown can prove that inherited handles, buffered frames, and stderr all drain after the parent exits.

Observe the pending update promise before initiating shutdown as well, preventing a missing late frame from becoming a transient unhandled rejection before the assertion reports the fixture failure.
2026-07-19 12:42:59 +08:00
Tianyi Cui f110c5e083 fix(acp-snapshot): accept Windows termination exit races
Treat a fallback kill refusal as successful termination when the child already carries an OS exit marker. Windows maps Node's supported signal names to forced termination, so the requested signal can end the process between the launcher error race and its fallback SIGKILL.

Drain inherited stdio, the ACP parser, and in-flight callbacks before propagating the original child error in either exit-race path. Preserve AggregateError reporting only for a refused fallback while the process is still live, and add a deterministic cross-platform regression for that ordering.
2026-07-19 12:41:46 +08:00
Tianyi Cui 0c41ba7ead Merge remote-tracking branch 'origin/master' into compact-post-step-overflow-recovery
# Conflicts:
#	docs/capability-seams.md
2026-07-19 12:23:59 +08:00
Tianyi Cui 7be78c7d4c Merge latest origin/master into compact-post-step-overflow-recovery
# Conflicts:
#	docs/agent-lifecycle.md
#	docs/architecture.md
#	docs/cookbook/extension-cookbook.i18n.yaml
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/event-producer-consumer.md
#	docs/rfc/INDEX.md
#	docs/rfc/implemented/architecture/2026-07-05-reconstructable-requests.md
#	docs/rfc/implemented/architecture/2026-07-15-replay-token-meter-service.i18n.yaml
#	docs/rfc/implemented/architecture/2026-07-15-replay-token-meter-service.md
#	docs/rfc/implemented/architecture/2026-07-15-replay-token-meter-service.zh.md
#	docs/rfc/implemented/feature/2026-06-18-compaction-capability-seam.md
#	docs/rfc/implemented/feature/2026-07-07-session-prefix.md
#	packages/compact/compact-basic/README.md
#	packages/compact/compact-basic/src/config.ts
#	packages/compact/compact-basic/src/index.ts
#	packages/compact/compact-basic/src/summarizer.ts
#	packages/compact/compact-basic/tests/compact-basic.spec.ts
#	packages/compact/compact-basic/tests/compact-loop-repro.spec.ts
#	packages/compact/compact/README.md
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/core/agent-loop/src/loop.ts
#	packages/core/agent-loop/tests/cancel.spec.ts
#	packages/llm/llm-deepseek/src/adapter.ts
#	packages/llm/llm-pi-ai/README.md
#	packages/llm/llm-pi-ai/src/stream.ts
#	packages/llm/llm-pi-ai/tests/convert.spec.ts
#	packages/llm/llm/README.md
#	packages/llm/llm/src/index.ts
#	packages/llm/llm/tests/service.spec.ts
#	scripts/gen-doc-graphs.ts
2026-07-19 12:06:23 +08:00
Tianyi Cui 4dda5b953b refactor(subagent): retire standalone mock package 2026-07-19 11:54:37 +08:00
Tianyi Cui 39c1c3df4f Merge remote-tracking branch 'origin/master' into codex/pr335-merge-master-20260719
# Conflicts:
#	packages/support/acp-snapshot/README.md
#	packages/support/acp-snapshot/src/harness.ts
#	packages/support/acp-snapshot/src/suite.ts
#	packages/support/acp-snapshot/tests/harness.spec.ts
#	packages/support/acp-snapshot/tests/suite.spec.ts
2026-07-19 11:41:10 +08:00
Tianyi Cui a656ab4120 Merge branch 'codex/simp-unify-agent-session-id' into codex/simp-ui-identity-residue 2026-07-19 02:39:09 +08:00
Tianyi Cui 0c84c2a842 Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id 2026-07-19 02:39:09 +08:00
Tianyi Cui 7b076a1e01 Merge remote-tracking branch 'origin/master' into codex/simp-prune-llm-contract 2026-07-19 02:10:25 +08:00
Tianyi Cui 4694582170 Merge remote-tracking branch 'origin/master' into codex/simp-prune-llm-contract 2026-07-18 14:28:54 +08:00
Tianyi Cui 0f85ae0a9d fix(subagent): identify lifecycle runs explicitly 2026-07-18 14:26:14 +08:00
Tianyi Cui a8150815ba Merge branch 'codex/simp-agent-entry-state' into codex/simp-unify-agent-session-id
# Conflicts:
#	packages/subagent/subagent-acp/package.json
#	packages/subagent/subagent-acp/tests/mock-acp-server.ts
#	pnpm-lock.yaml
#	website/zh-CN/api/harness/agents.md
2026-07-18 14:01:03 +08:00
Tianyi Cui e846a115f2 test(acp-snapshot): cover pre-spawn launch failure 2026-07-18 13:51:44 +08:00