Commit Graph

319 Commits

Author SHA1 Message Date
imccyu
8cbdd5b9d0 refactor(session): route construction through Session.create 2026-08-05 11:56:14 +08:00
xjt
7bd111b2af Merge origin/master into xjt/proofreading-active-docs-2-apply 2026-08-05 10:57:53 +08:00
imccyu
ca27512529 fix(packages): omit source publication payloads 2026-08-05 01:15:19 +08:00
xjt
2db712eec7 docs(i18n): proofread active Chinese documentation 2026-08-04 17:36:14 +08:00
Tianyi Cui
1ea72962eb Merge master into fix/subagent-stack-end-result 2026-08-02 23:13:00 +08:00
Tianyi Cui
b54381f3e7 fix(agent): commit mutable setup at publication
Agent setup may await while a mutable contribution registry changes. The previous subagent path validated and committed its provisioning batch inside the setup callback. A revocation queued after that callback returned therefore treated the installation as resident and released it, even though AgentLoop had not published the child yet. AgentLoop could then admit and announce a child whose required capability had already disappeared.

Introduce AgentSetupCommit as the optional synchronous result of create and resume setup. AgentLoop now awaits setup, invokes that commit with no intervening asynchronous boundary, and only then enters the Session and Agent registries. A commit failure follows the existing private-transaction rollback, so neither identity is published and the caller can reuse the id.

Keep continuable-subagent installations provisional until this publication commit. Contribution removal still releases every installation immediately, but now marks an unpublished batch invalid so its commit rejects with ACTIVATION_SETUP_REVOKED. Once the commit succeeds, later removal remains ordinary live revocation.

Cover create and resume ordering, resume commit rejection and identity reuse, and an assembled microtask revocation that leaves only the parent Agent and Session. Update the public JSDoc, architecture flow, package contracts, current Agent Notes, Chinese counterparts, pairing records, and generated Cordis API to describe the new boundary.

Validated with the four focused Agent/subagent test files (91 tests), the isolated assembled regression, targeted TypeScript project builds, generated Cordis API freshness, export JSDoc verification, scoped translation pairing, Markdown wrapping, and Mermaid parsing.
2026-08-02 20:09:05 +08:00
kingwl
955a12cca4 feat(web): steer queued messages into active turns 2026-08-02 17:53:07 +08:00
Dudu-0223
f0ab04273d fix(web): deduplicate subagent navigation 2026-08-02 12:51:09 +08:00
imccyu
bb6e6d6f3b fix(subagent): preserve continuable behavior after rebase 2026-08-02 04:35:23 +08:00
Dudu-0223
e1f7eeeb95 fix(subagent): confirm steering request admission 2026-08-02 04:34:16 +08:00
Dudu-0223
bb8ea2be51 fix(subagent): make strict steering atomic 2026-08-02 04:34:15 +08:00
Hypatia May
01e64c6350 Merge finalized Web transcript parent 2026-07-31 09:46:32 +08:00
Yichen Jiang
daf70f3660 feat(llm-deepseek): configure max token defaults 2026-07-30 21:04:00 +08:00
Hypatia May
faac9b4fd5 round 1: implement bracket-first manual compaction 2026-07-30 17:40:25 +08:00
kingwl
ebbcfdd03b Merge remote-tracking branch 'origin/master' into codex/web-queue-actions
# Conflicts:
#	packages/core/agent-loop/src/agent.ts
2026-07-30 03:33:41 +08:00
kingwl
7ce330f0e4 refactor(agent): scope queue actions to edit and remove 2026-07-30 01:58:51 +08:00
Tianyi Cui
4582e1425c Merge commit 'refs/codex/pr885/master-20260730' into worktree/retarget-pr885-20260729
# Conflicts:
#	eslint.config.mjs
2026-07-30 01:18:28 +08:00
kingwl
76e14793a9 Merge remote-tracking branch 'origin/master' into codex/web-queue-actions
# Conflicts:
#	docs/architecture.i18n.yaml
#	docs/cordis-catalog/events.md
#	docs/core-data-structures/core.i18n.yaml
#	docs/event-producer-consumer.md
2026-07-30 01:04:25 +08:00
kingwl
c97b1d025e Merge remote-tracking branch 'origin/master' into codex/web-queue-actions
# Conflicts:
#	apps/web/tsconfig.json
#	docs/architecture.i18n.yaml
#	docs/event-producer-consumer.md
#	packages/client/runtime/README.i18n.yaml
#	packages/client/tsdown.client.ts
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/core/agent-loop/README.i18n.yaml
#	packages/core/agent/README.i18n.yaml
#	packages/core/agent/README.zh.md
#	packages/host/apiproxy/README.i18n.yaml
#	tsconfig.host.json
2026-07-30 00:30:38 +08:00
kingwl
f893e2281d feat(agent): add addressable queue operations 2026-07-30 00:05:00 +08:00
imccyu
c269febc9a refactor(cordis): generate catalogs from Typert models 2026-07-29 23:55:12 +08:00
imccyu
f773985e71 feat(typert): add compiler-independent type pipeline 2026-07-29 23:45:42 +08:00
Tianyi Cui
32aaa8983e Merge commit 'ecbf75a5e70f662b6420375140cf12eb6bac7860' into worktree/retarget-pr885-20260729
# Conflicts:
#	docs/development.i18n.yaml
#	packages/client/ui-conversation/src/client/chat/MessageItem.tsx
#	packages/client/ui-primitives/src/markdown/CodeBlock.tsx
#	scripts/snapshots/translation-prompt-v4/request-response.expected.json
2026-07-29 21:37:43 +08:00
xjt
de0348bd9e docs(i18n): standardize reviewed README headings 2026-07-29 20:16:45 +08:00
xjt
e1481e2d98 docs(i18n): resolve follow-up review findings 2026-07-29 18:38:56 +08:00
j-xiang
599e6edc87 docs(i18n): record proofread README pairs 2026-07-29 15:30:44 +08:00
j-xiang
fff7f9cb3e docs(i18n): proofread README translations 41-60 2026-07-29 15:29:38 +08:00
Turtle
95a995968b refactor: migrate linting to Oxlint 2026-07-29 14:32:11 +08:00
Tianyi Cui
739647afc0 fix(subagent): publish inherited policy facts to telemetry
Inherited sandbox and approval events were part of the constructor seed. Session.firstLiveSeq classifies every constructor event as replayed history, so telemetry adoption skipped these child-only creation facts even though no parent or prior process had exported them.

Capture the parent overrides at the same synchronous delegation boundary, but append the events during the child factory setup while the session is still unpublished. They remain ordered after fork history, persist with the first child batch, and retain last-event-wins behavior while landing on the live side of the telemetry boundary. This uses the existing setup and session append contracts instead of adding another seed category or telemetry special case.

Add regression coverage for exporting an unpublished suffix without re-exporting constructor history, assert the spawn and fork firstLiveSeq boundaries, and restore the public seed documentation to replay/fork history only.
2026-07-29 00:39:56 +08:00
Tianyi Cui
cfceb8452b subagent: seed inherited policy events at creation
The parent implementation introduced sandboxMode and approvalPolicy as generic SessionHeader fields, then propagated those fields through both persistence backends, session-query indexes, collision checks, policy-specific seed-boundary folds, catalogs, and a broad test matrix. That storage plane is unnecessary: Session already accepts a validated constructor seed, and persistence captures that seed when the session is announced before committing its first batch.

Capture each parent override synchronously at delegation, append source-tagged sandbox/mode and approval/policy records after the optional fork prefix, and create the child with that combined seed. Keeping header.seedLength at the original fork-prefix length preserves lineage while ordinary last-event-wins folds make the inherited records outrank stale parent history and remain subordinate to later child switches. Unswitched parents still stamp nothing, so children continue to follow deployment defaults.

Remove the generic header fields and every persistence/query/schema branch built around them. Collapse the inheritance suite from ten leaking scenarios to four owned-context cases covering real filesystem confinement, stale fork precedence, delegation-time capture, and the no-override path. The assembled headless snapshot now asserts the persisted inheritance event directly.

This keeps the security behavior while restoring policy ownership to the existing event log and deleting the speculative durability machinery that the original tests did not exercise.
2026-07-28 21:31:17 +08:00
Tianyi Cui
afa38c4b2f Merge latest master into subagent policy inheritance
Retarget the feature branch to the current master tip without rewriting its existing review history. Keeping this as a dedicated merge checkpoint makes the later simplification diff attributable to the stacked child rather than mixing base movement with design changes.

Resolve the identified-message API drift in the feature tests by constructing complete user messages, reading the nested tool-result message shape, and adapting the prompt-submit listener signature. Preserve both sides of the user-approval conflict: master’s createUserMessage wrapper and the feature’s inherited-policy attribution.

Regenerate the Cordis and persistence catalogs, re-record the session README pair, and refresh the affected ACP/headless fixtures so derived artifacts describe the merged source rather than either parent in isolation.

Validated with the focused policy/session/persistence/query suites (430 tests), focused ACP/headless snapshots (3 tests), build, doc-sync (25 gates), lint, hygiene, and git diff checks.
2026-07-28 21:11:20 +08:00
_Kerman
bc988ca4a9 Merge remote-tracking branch 'origin/master' into xtr/identified-immutable-messages
# Conflicts:
#	docs/cordis-catalog/events.md
#	docs/core-data-structures/core.i18n.yaml
#	docs/event-producer-consumer.md
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	packages/core/agent-loop/README.i18n.yaml
#	packages/core/agent/README.i18n.yaml
2026-07-28 18:49:23 +08:00
kingwl
2f93614efb Merge remote-tracking branch 'origin/master' into feature/subagent-policy-inheritance
# Conflicts:
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	packages/subagent/subagent-inprocess/README.i18n.yaml
2026-07-28 18:37:46 +08:00
_Kerman
7127528b7f fix(agent): preserve sent message identity 2026-07-28 18:07:28 +08:00
Yichen Jiang
5358168787 feat(sdk): support max output tokens 2026-07-28 17:36:44 +08:00
_Kerman
b1af35145b fix: enforce message snapshot invariants 2026-07-28 15:33:00 +08:00
_Kerman
0225d598e3 fix: preserve message occurrence contracts 2026-07-28 14:44:15 +08:00
_Kerman
fbf87e660c refactor: identify and freeze messages at creation 2026-07-28 13:55:59 +08:00
kingwl
bc3e776225 Merge remote-tracking branch 'origin/master' into feature/subagent-policy-inheritance
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-06-sandbox.i18n.yaml
#	docs/cordis-catalog/services.md
#	docs/persistence-catalog.md
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	packages/core/session/README.i18n.yaml
#	packages/subagent/subagent-inprocess/README.i18n.yaml
#	packages/ui/user-approval/src/index.ts
2026-07-28 11:19:46 +08:00
Tianyi Cui
29619eda77 Merge remote-tracking branch 'origin/master' into worktree/pr628-merge-20260727
# Conflicts:
#	.agents/notes/implemented/architecture/2026-06-21-bounded-llm-request-recovery.i18n.yaml
#	.agents/notes/implemented/architecture/2026-06-21-bounded-llm-request-recovery.md
#	.agents/notes/implemented/architecture/2026-06-21-bounded-llm-request-recovery.zh.md
#	docs/architecture.i18n.yaml
#	docs/architecture.md
#	docs/architecture.zh.md
#	docs/cordis-catalog/events.md
#	docs/core-data-structures/llm-streaming.i18n.yaml
#	docs/core-data-structures/llm-streaming.md
#	docs/core-data-structures/llm-streaming.zh.md
#	docs/event-producer-consumer.md
#	examples/acp-agent/tests/snapshots/empty-response-retry/session.jsonl
#	packages/compact/compact-basic/src/index.ts
#	packages/compact/compact-basic/tests/compact-basic.spec.ts
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/core/agent-loop/README.i18n.yaml
#	packages/core/agent-loop/README.md
#	packages/core/agent-loop/README.zh.md
#	packages/core/agent-loop/src/loop.ts
#	packages/core/agent-loop/tests/request-recovery.spec.ts
#	packages/core/agent/src/types.ts
#	packages/core/scope/tests/invariant.spec.ts
#	packages/llm/llm-retry/README.i18n.yaml
#	packages/llm/llm-retry/README.md
#	packages/llm/llm-retry/README.zh.md
#	packages/llm/llm-retry/src/index.ts
#	packages/llm/llm-retry/src/invariant.ts
#	packages/llm/llm-retry/tests/invariant.spec.ts
#	packages/llm/llm-retry/tests/retry.spec.ts
#	packages/plan/plan-mode/src/index.ts
#	packages/plan/plan-mode/tests/integration.spec.ts
#	packages/plan/plan-mode/tests/plan-mode.spec.ts
2026-07-27 23:29:26 +08:00
Tianyi Cui
8a952ab433 Merge remote-tracking branch 'origin/master' into worktree/pr628-merge-20260727
# Conflicts:
#	.agents/notes/implemented/architecture/2026-06-21-bounded-llm-request-recovery.md
#	docs/architecture.i18n.yaml
#	docs/config-catalog.md
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/llm-streaming.i18n.yaml
#	docs/core-data-structures/llm-streaming.md
#	docs/core-data-structures/llm-streaming.zh.md
#	docs/event-producer-consumer.md
#	docs/module-graph.md
#	examples/headless-agent/tests/headless.snapshot.ts
#	packages/compact/compact-basic/tests/compact-loop-repro.spec.ts
#	packages/cordis/tool-cordis/src/api-catalog.ts
#	packages/core/agent-loop/README.md
#	packages/core/agent-loop/src/loop.ts
#	packages/examples/agent-spine-demo/README.md
#	packages/llm/README.md
#	packages/llm/llm-deepseek/src/adapter.ts
#	packages/llm/llm-pi-ai/src/adapter.ts
#	packages/llm/llm-retry/README.md
#	packages/llm/llm/README.md
#	packages/llm/llm/src/index.ts
#	packages/llm/llm/tests/service.spec.ts
#	packages/support/llm-replay/src/index.ts
#	packages/support/llm-replay/tests/llm-replay.spec.ts
2026-07-27 22:44:43 +08:00
_Kerman
ed67ad53d2 refactor(agent): return request retry action 2026-07-27 21:17:49 +08:00
_Kerman
9152858fd7 fix(agent-loop): preserve deferred message boundaries 2026-07-27 18:58:27 +08:00
_Kerman
98238ceace fix(agent-loop): settle rejected admission context 2026-07-27 18:32:07 +08:00
_Kerman
ff7792b17c docs(agent): document next-step acceptance window 2026-07-27 18:07:51 +08:00
_Kerman
f63d937496 fix(tui): route prompts by next-step capability 2026-07-27 18:05:43 +08:00
_Kerman
a59ce0367c fix(agent-loop): route next-step input during admission 2026-07-27 17:55:55 +08:00
_Kerman
52174e32cb refactor(agent): clarify turn lifecycle event names 2026-07-27 17:38:42 +08:00
_Kerman
7d5cc498d3 docs(agent): call agent step an extension point 2026-07-27 17:24:20 +08:00
_Kerman
749927ecd8 fix: reconcile agent loop merge integration 2026-07-27 17:04:22 +08:00