Commit Graph
3368 Commits
Author SHA1 Message Date
Tianyi Cui 7a9c2ef473 docs(core): state loop initiator precondition 2026-07-19 14:20:27 +08:00
Tianyi Cui 4284cf70e4 Merge remote-tracking branch 'origin/worktree/agent-execution-context-rfc' into codex/simplify-agent-identity-plumbing
# Conflicts:
#	docs/rfc/implemented/architecture/2026-07-15-agent-initiator-scope.i18n.yaml
#	docs/rfc/implemented/architecture/2026-07-15-agent-initiator-scope.md
#	docs/rfc/implemented/architecture/2026-07-15-agent-initiator-scope.zh.md
2026-07-19 14:18:58 +08:00
Tianyi Cui 4791b40b26 fix(llm-pi-ai): classify usage-based context overflow
Pass each resolved catalog model capacity into pi-ai stream conversion so the upstream full-message classifier can recognize provider-specific, silent, and length-stop overflow signals. Retain the harness text fallback for legacy provider wording and cover the catalog-resolution path with a mock-provider regression.
2026-07-19 14:18:13 +08:00
Tianyi Cui f66cde41d1 docs(core): clarify initiator restoration timing 2026-07-19 14:16:07 +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
Yichen Jiang fc478d675c fix(ci): suppress bearer auth for Azure API keys 2026-07-19 14:10:47 +08:00
Tianyi Cui f21ed1bfa0 refactor(core): use initiator in loop internals 2026-07-19 14:06:47 +08:00
Yichen Jiang 39dea6107e fix(ci): target Azure Foundry OpenAI v1 route 2026-07-19 14:06:18 +08:00
Tianyi Cui 595e666a9d Merge remote-tracking branch 'origin/master' into codex/pr335-merge-master-20260719 2026-07-19 13:52:41 +08:00
Tianyi Cui 2ef9590f33 test(loader-smoke): declare argv lib fixture 2026-07-19 13:51:41 +08:00
Yichen Jiang 51425dd61a test(llm-pi-ai): surface provider e2e failures 2026-07-19 13:51:25 +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 595d9acd7a Merge remote-tracking branch 'origin/master' into codex/cli-one-shot-demo
# Conflicts:
#	docs/cookbook/extension-cookbook.i18n.yaml
#	docs/cookbook/extension-cookbook.md
#	docs/cookbook/extension-cookbook.zh.md
#	examples/README.md
#	examples/repl-agent/README.md
#	package.json
#	scripts/gen-doc-graphs.ts
2026-07-19 13:44:34 +08:00
Yichen Jiang 1fdcd5a773 ci: run pi-ai OpenAI e2e through Azure 2026-07-19 13:42:21 +08:00
Yichen Jiang cb8cdafbe3 Merge remote-tracking branch 'origin/master' into worktree/pi-ai-manual-e2e 2026-07-19 13:39:27 +08:00
Tianyi Cui e0b5cadd2a chore(core): align merged initiator changes 2026-07-19 13:37:11 +08:00
Tianyi Cui 44d9fbcd6d Merge remote-tracking branch 'origin/master' into codex/pr332-merge-master-20260719
# Conflicts:
#	docs/cookbook/extension-cookbook.i18n.yaml
2026-07-19 13:36:08 +08:00
Tianyi Cui 9828892742 Merge latest origin/master into worktree/agent-execution-context-rfc 2026-07-19 13:34:48 +08:00
Tianyi Cui fda72637d5 Merge latest origin/master into worktree/agent-execution-context-rfc
# Conflicts:
#	docs/cordis-catalog/services.md
2026-07-19 13:34:17 +08:00
Tianyi Cui c23214be56 refactor(core): fold initiator scope into agents 2026-07-19 13:30:45 +08:00
Tianyi Cui a61b725a20 Merge remote-tracking branch 'origin/master' into codex/pr335-merge-master-20260719 2026-07-19 13:30:10 +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 b0ab117748 Merge remote-tracking branch 'origin/master' into codex/pr332-merge-master-20260719 2026-07-19 13:28:35 +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 b2f3d73c1c Merge latest origin/master into codex/rename-repl-agent
Refresh PR #380 against master at ab96fdb63 immediately before landing so the admin merge is evaluated against the current repository contracts rather than the branch's earlier base.

Take the merged SQLite owner-only permission hardening and its regenerated config catalog while preserving the examples/repl-agent rename. The merge leaves examples/coding-agent absent and keeps demo:repl wired to the renamed leaf.
2026-07-19 13:27:44 +08:00
Tianyi Cui 89987f0ad4 docs: align one-shot demo prose 2026-07-19 13:25:30 +08:00
Tianyi Cui a6b8ce456a test(fs): compare Windows DACL access policy
ReplaceFileW preserves ACLs by merging security information, which may reserialize auto-inheritance state and duplicate equivalent ACEs. Compare the final ordered, de-duplicated ACE policy instead of requiring byte-identical self-relative descriptor buffers.

Update the host-independent binding assertion to expect the namespaced absolute paths that the Win32 boundary actually receives, and align the package and bilingual RFC contracts with the semantic DACL guarantee.
2026-07-19 13:25:15 +08:00
Tianyi Cui 0f8d0082e4 fix(tui): stabilize Windows terminal snapshots
Treat an absolute path.relative() result as a cross-volume path instead of incorrectly abbreviating it beneath the user's home directory.

Allow embeddings to project a logical footer cwd without changing the operational session cwd. The recorded-session harness now uses a POSIX-shaped display alias for both the footer and filesystem result paths, preserving the existing pre-normalization layout width on every host.

Keep runtime-provided labels behind terminal-control escaping, cover that boundary, and document the embedding contract.
2026-07-19 13:20:59 +08:00
Tianyi Cui dbe9e307b0 Merge remote-tracking branch 'origin/master' into codex/cli-one-shot-demo
# Conflicts:
#	AGENTS.md
#	README.i18n.yaml
#	README.md
#	README.zh.md
#	docs/architecture.md
#	docs/cookbook/extension-cookbook.i18n.yaml
#	docs/cookbook/extension-cookbook.md
#	docs/cookbook/extension-cookbook.zh.md
#	docs/event-producer-consumer.md
#	docs/graph-atlas.md
#	docs/module-graph.md
#	docs/testing.md
#	examples/README.md
#	examples/coding-agent/README.md
#	package.json
#	packages/examples/README.md
#	scripts/gen-doc-graphs.ts
2026-07-19 13:17:53 +08:00
Tianyi Cui 024b5e38b8 Merge remote-tracking branch 'origin/master' into compact-post-step-overflow-recovery
# Conflicts:
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
2026-07-19 13:15:14 +08:00
Tianyi Cui b95a9052fb Merge latest origin/master into codex/rename-repl-agent
Bring the follow-up branch onto master after PR #379 landed so the rename is reviewed and validated against the current generated Cordis catalog and JSDoc completeness contract.

The histories merge without a content conflict: master's catalog generator changes remain intact, while the repl-agent move continues to own only example paths, front-door naming, and their documentation derivatives.
2026-07-19 13:13:50 +08:00
Tianyi Cui 2faeabb05a refactor(examples): rename coding-agent leaf to repl-agent
Name the runnable leaf for the line-oriented front door it owns, matching the existing tui-agent and acp-agent organization. Move the complete config, Code Mode overlay, tests, metadata, and generated composition graph together, then update every loader path and repository reference.

Keep the shared model identity independent of its terminal front door by phrasing the persona as a coding-agent role rather than retaining the retired leaf name. Regenerate graph and tool catalogs and re-record each affected bilingual pair so derived documentation cannot point at the removed path.
2026-07-19 13:13:14 +08:00
Tianyi Cui 5510b4ec06 Merge remote-tracking branch 'origin/master' into codex/pr357-merge-review-20260719 2026-07-19 13:12:00 +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 b99008221e Merge remote-tracking branch 'origin/master' into compact-post-step-overflow-recovery
# Conflicts:
#	docs/cookbook/extension-cookbook.i18n.yaml
#	docs/event-producer-consumer.md
2026-07-19 13:06:34 +08:00
Tianyi Cui 536cb6f985 Merge latest origin/master into worktree/agent-execution-context-rfc
# Conflicts:
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	packages/examples/README.md
2026-07-19 13:04:29 +08:00
Tianyi Cui edaaa50fe3 test(acp): snapshot cancelled queued tool calls 2026-07-19 13:03:31 +08:00
Tianyi Cui 954c2ad2b5 docs(llm-pi-ai): track overflow classification gap 2026-07-19 13:03:15 +08:00
Tianyi Cui 897dc76d24 Merge remote-tracking branch 'origin/master' into codex/cordis-catalog-jsdoc 2026-07-19 12:59:37 +08:00
Tianyi Cui 3ffc1ce8f5 Merge remote-tracking branch 'origin/master' into codex/pr357-merge-review-20260719 2026-07-19 12:58:57 +08:00
Tianyi Cui bdba206640 Merge remote-tracking branch 'origin/master' into codex/pr335-merge-master-20260719 2026-07-19 12:57:38 +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 c660048759 test(subagent): cover late forced-wait exit markers
Exercise both exitCode and signalCode arriving after the SIGTERM grace begins but before the bounded SIGKILL confirmation helper starts. This pins the fast path that avoids signaling an already-terminated child and restores the package's per-file 100% branch and statement coverage.

Keep the marker transition deterministic by withholding the synthetic exit event, matching the OS state race the defensive pre-check exists to absorb.
2026-07-19 12:52:42 +08:00
Tianyi Cui 30d1af3bbc docs: include JSDoc in cordis catalog blocks 2026-07-19 12:52:34 +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 4bf2ef89c4 fix(jsonl): bind MoveFileExW with the Win32 BOOL ABI
Declare MoveFileExW's return value as Koffi int and model it as a numeric 32-bit Win32 BOOL. The previous Koffi bool declaration represented a one-byte C boolean and could read the native return register with the wrong ABI.

Test zero and nonzero results explicitly and assert the binding result type while preserving the existing write-through flags, error translation, and durable directory race behavior.
2026-07-19 12:44:47 +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 aa21c0b83f docs(tui): remove demo image assets
Remove the animated, dark, and light terminal captures and their bilingual RFC section. The implemented RFC retains the durable front-door decision and verification contract without carrying binary demo artifacts that need visual maintenance.

Tighten the package README ownership wording and refresh the bilingual consistency record so no repository link or prose claim refers to the removed files.
2026-07-19 12:41:38 +08:00