Commit Graph

8 Commits

Author SHA1 Message Date
Tianyi Cui
8c12f8945e Merge latest master into codex/llm-error-recovery-rfc
# Conflicts:
#	docs/architecture.md
#	docs/config-catalog.md
#	docs/cordis-catalog/events.md
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	docs/persistence-catalog.md
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/core/agent-loop/src/loop.ts
#	packages/core/agent/src/types.ts
#	packages/examples/agent-spine-demo/README.md
#	packages/examples/stdio-demo/README.md
#	packages/examples/stdio-demo/src/index.ts
#	packages/llm/llm-deepseek/README.md
#	packages/llm/llm-deepseek/src/adapter.ts
#	packages/llm/llm-deepseek/tests/adapter.spec.ts
#	packages/llm/llm/README.md
#	packages/llm/llm/src/error.ts
#	packages/llm/llm/tests/service.spec.ts
#	packages/sandbox/sandbox-policy/tsconfig.json
#	packages/ui/stdio/README.md
#	packages/ui/stdio/src/index.ts
#	packages/ui/stdio/tests/stdio.spec.ts
#	packages/ui/tui/src/index.ts
#	pnpm-lock.yaml
#	website/zh-CN/api/harness/events.md
#	website/zh-CN/api/harness/llm.md
2026-07-20 20:59:11 +08:00
Tianyi Cui
3b0b0cefeb feat: implement bounded LLM request recovery 2026-07-20 03:34:19 +08:00
Tianyi Cui
d139948ed2 feat(persistence): compress JSONL logs with Zstandard 2026-07-20 00:06:21 +08:00
Tianyi Cui
306dd2b1fe fix(cli-demo): make failure rendering total
Contain arbitrary plugin and runtime failures even when a thrown Proxy traps instanceof checks or its string coercion throws. Fall back to a stable diagnostic instead of letting executeCli reject outside its exit-code contract.

Route abort reasons through the same total renderer so cancellation cannot escape containment through an exotic reason value.

Add a focused regression that exercises both hostile inspection paths and verifies stdout remains empty, stderr remains labelled, and the CLI resolves with exit code 1.
2026-07-19 14:41:55 +08:00
Tianyi Cui
1698f0baa6 fix(cli-demo): preserve disposal diagnostics
Report context-disposal failure as an independent outcome even when argument, boot, task, or output handling has already produced a primary diagnostic.

Keep the primary error first, append the cleanup error, and retain the nonzero exit status so operators can see both the initiating failure and the possibility that teardown or persistence did not complete.

Add a regression that combines an invalid app composition with a failing disposer and asserts both ordered stderr lines.
2026-07-19 14:41:55 +08:00
Tianyi Cui
ae419fb692 fix(cli-demo): interrupt Loader boot on signals
Race Loader startup with the process abort signal so SIGINT and SIGTERM can settle the one-shot CLI even when initialization has not returned a Context.

If boot settles after cancellation, dispose the late context asynchronously instead of recreating the wait. Contain late boot rejection and report a late disposal failure on stderr.

Cover prompt interruption, late context disposal, late boot rejection, and cleanup failure with focused CLI regressions.
2026-07-19 14:37:47 +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
b78cdbcd51 feat(examples): add one-shot CLI demo 2026-07-15 21:21:24 +08:00