Commit Graph
1817 Commits
Author SHA1 Message Date
yudshj 37d27fcdf9 feat(web): present immutable file deliveries with download cards 2026-09-09 01:15:31 +08:00
Dudu-0223 2db4bdd31d feat(subagent): record and observe parent-owned child catalogs 2026-09-08 23:28:50 +08:00
imccyu 2faa751be9 release(dsh): 0.1.5-alpha.1 2026-09-08 23:06:34 +08:00
Tianyi Cui 0aa1ef0d1e Merge remote-tracking branch 'origin/release/session-log-v3' into integrate/v3-master-refresh-345248 2026-09-08 21:23:29 +08:00
Tianyi Cui e11b2a5558 merge: refresh session-log-v3 from master 345248f470 2026-09-08 21:15:06 +08:00
_Kerman 3e0e419bd2 Merge remote-tracking branch 'origin/master' into xtr/explicit-agent-context
# Conflicts:
#	apps/web/tests/queue-actions.e2e.ts
#	docs/subsystems/tools.i18n.yaml
#	docs/subsystems/tools.md
#	docs/subsystems/tools.zh.md
#	packages/extensions/tool-cordis/src/api-catalog.ts
#	packages/visualizer/tool-visualizer/README.i18n.yaml
#	packages/visualizer/tool-visualizer/README.md
#	packages/visualizer/tool-visualizer/README.zh.md
#	packages/visualizer/tool-visualizer/src/index.ts
#	packages/visualizer/tool-visualizer/tests/loader-composition.spec.ts
#	packages/visualizer/tool-visualizer/tests/model-surface.spec.ts
2026-09-08 19:54:59 +08:00
Tianyi Cui 92b3b02622 Revert "feat(visualizer): add dormant Host capability" 2026-09-08 18:12:15 +08:00
_Kerman c26350c303 Merge remote-tracking branch 'origin/master' into xtr/explicit-agent-context 2026-09-08 18:00:35 +08:00
_Kerman 314ccf08af Merge remote-tracking branch 'origin/master' into xtr/explicit-agent-context
# Conflicts:
#	packages/bundle/headless/tests/headless.spec.ts
#	packages/core/agent-loop/src/agent.ts
#	packages/subagent/subagent/tests/continuation.spec.ts
2026-09-08 17:12:51 +08:00
Tianyi Cui 53f42a781b test(session): close canonical envelope CI gaps 2026-09-08 16:56:53 +08:00
Tianyi Cui 756b10fcfe test(session): cover composed canonical and PTC restoration 2026-09-08 16:56:52 +08:00
Tianyi Cui 657e68186a fix(session): canonicalize V3 envelopes through adjacent migration 2026-09-08 16:56:52 +08:00
ZiyaZhang f1f6ca1c77 feat(visualizer): add dormant Host capability 2026-09-08 01:40:11 -07:00
Turtle f1c1ff5a08 docs: constrain package README summaries 2026-09-08 13:52:40 +08:00
Tianyi Cui 5b039c1796 Merge master 822041865d into Session V3 release 2026-09-08 00:17:14 +08:00
Tianyi Cui 4eebc70df2 test(agent-loop): account for route switch notice during prompt admission
The plain-to-capable transition emits the model-selection notice inherited from master. Preserve the exact in-history system ordering and assert both the admitted user input and the single durable notice instead of expecting the obsolete five-message request. Reproduces the identical Linux and Windows CI failure; all 57 adjacent admission, projection, reconstruction and selection tests pass.
2026-09-07 23:29:49 +08:00
_Kerman 0348599f04 Merge remote-tracking branch 'origin/master' into dshw/pr-deepseek-harness-deepseek-harness-2672
# Conflicts:
#	docs/event-producer-consumer.i18n.yaml
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	packages/acp/acp/tests/harness.ts
#	packages/api/session-controller/README.i18n.yaml
#	packages/api/session-controller/README.md
#	packages/api/session-controller/README.zh.md
#	packages/api/session-controller/tests/commands-queue-attachment.host.spec.ts
#	packages/context/agent-instructions/tests/agent-instructions.e2e.ts
#	packages/fs/tool-fs/tests/harness.ts
#	packages/preset/agent-presets/tests/invariant.spec.ts
#	packages/preset/agent-presets/tests/mount.spec.ts
#	packages/preset/agent-presets/tests/remote.spec.ts
#	packages/test-support/agent-loop-testkit/package.json
2026-09-07 20:22:24 +08:00
Yichen Jiang e379fa8bdd release(dsh): 0.1.3-alpha.2 2026-09-07 19:27:06 +08:00
Tianyi Cui 0deeec02c4 Merge current master and CI readiness repairs into in-history updates
Preserve prepared-route admission and V3 prompt semantics while adopting latest master. Regenerate the new model-switch recording at its actual upper-layer title ordering, retain the V2 predecessor, and keep queued-image and publint lifetime assertions strict.
2026-09-07 18:18:08 +08:00
Tianyi Cui 710823fd24 Merge current master and benchmark repairs into V3 system messages
Adopt current model-switch notices, lazy observation, and open-in-app integration while preserving structural V3 admission. Regenerate only the new model-switch owner’s native V3 recording, prompt-count manifest and expected delimiter; keep the master V2 predecessor byte-exact.
2026-09-07 18:14:14 +08:00
Tianyi Cui 89f4acbd74 Merge frozen master 777d73f into V3 benchmark repair
Bring model-switch notices, lazy observations, and open-in-app into the root V3 integration without importing the child structural header changes. Preserve V3 migration, PTC, and all predecessor fixtures.

Refresh only the model-switch-notice owner through dsh --profile headless to harvest native current-writer session.v3.jsonl. Keep the master session.v2.jsonl byte-exact; existing header pin and versioned writer helpers require no changes.
2026-09-07 18:04:19 +08:00
_Kerman 1780d0d355 Merge remote-tracking branch 'origin/master' into xtr/explicit-agent-context 2026-09-07 17:25:46 +08:00
creatixchu 48cc1cf1d6 feat(agent): announce model switches 2026-09-07 16:19:59 +08:00
Tianyi Cui 0d0914b814 fix(agent-loop): import message type for freeze provenance
Restore the explicit Message type import needed by master’s per-agent WeakSet after composing it with the in-history request builder.
2026-09-07 14:56:45 +08:00
Tianyi Cui 70ae2354d0 Merge latest master performance work and V3 preset migration
Freeze exactly the post-admission derived message array using the inherited per-agent provenance cache, preserving the prepared-route ordering and retry semantics. Adopt the root’s legacy preset migration without changing native V3 custom preset behavior. Request freeze, admission, projection and reconstruction regressions pass58 tests.
2026-09-07 14:55:12 +08:00
Tianyi Cui 19d167cec2 Merge latest master request-freeze and frontend performance work
Preserve the V3 system-prompt projection while adopting master’s per-agent frozen-message provenance and frontend performance gates. Keep benchmark workload admission and diagnostics fixes intact, and retain both migration and first-open/reopen lifecycle guarantees.
2026-09-07 14:53:00 +08:00
Tianyi Cui 85dcebcda4 Merge remote-tracking branch 'origin/master' into fix/spkv-root-latest-master 2026-09-07 14:48:39 +08:00
Tianyi Cui 73865675a4 docs(system-prompt): combine cache guarantees in model-experience field
Keep the merged in-history and stable suffix guarantees within the required single KV Cache effect paragraph. No behavior or guarantee changes.
2026-09-07 13:58:41 +08:00
Tianyi Cui d43d93d89f test(agent-loop): use current persona slots in admission harness
Adopt master’s explicit personaPrefix/personaSuffix configuration in the in-history test harness. The assembly override and all admission assertions remain unchanged; this fixes the typed build integration rather than weakening the tests.
2026-09-07 13:46:33 +08:00
Tianyi Cui a4e445236f Merge latest master prompt placement into in-history updates
Keep prepared-route in-history append, clear-all, and normalization semantics while adopting named persona prefix/suffix and late environment facts from master. Resolve documentation against the derived system-message history and retain the existing strict migration behavior.
2026-09-07 13:39:12 +08:00
Tianyi Cui 57885bd73d Merge latest master prompt placement through V3 integration
Preserve system/message persistence while adopting named persona prefix/suffix and environment facts after reusable instructions. Resolve the Web assertion against the logged system message, not retired header.system. Keep the existing protected V3 integration PR as the root publication path; no rules are bypassed.
2026-09-07 13:34:43 +08:00
Tianyi Cui 73edce1ae7 perf(agent-loop): reuse proven message freezes per agent 2026-09-07 13:29:37 +08:00
Tianyi Cui cbbbb30214 Merge remote-tracking branch 'origin/master' into release/session-log-v3 2026-09-07 13:15:00 +08:00
_Kerman b759ad91e8 Merge remote-tracking branch 'origin/master' into xtr/explicit-agent-context
# Conflicts:
#	packages/subagent/subagent/src/continuation.ts
2026-09-07 12:09:06 +08:00
Tianyi Cui 85421f31bc fix(agent-loop): detect first resumed pre-step replacement
Seed the request surface watermark from the attached session so a replacement before the first resumed request consolidates retained prompt versions. An unchanged resume still continues the series. Actual-loop replacement regression fails before the fix; 53 focused tests and the agent-loop project typecheck pass.
2026-09-07 11:09:40 +08:00
Tianyi Cui 2b363223da fix(agent-loop): clear noncanonical retained system content
A durable system message may contain multiple text blocks or other content. The runtime-context helper recognizes only one text block; treating an unrecognized system message as empty allowed clearing and incapable-route normalization to leave its instructions active. Keep undefined text distinct from genuinely empty content so every noncanonical node is replaced or cleared instead of silently skipped. Runtime-context snapshot equality remains unchanged.

Regression: a multiblock head and nontext tail previously survived a clear request; the new source-level case fails before this fix. Both system-prompt projection and actual-loop admission suites pass (21 tests).
2026-09-07 11:09:40 +08:00
Tianyi Cui 4028686136 fix(agent-loop): clear every retained system instruction
Use the same logged per-node normalization for an empty rendering as for incapable routes and broken request series: empty each active later system node, then empty the first node. Clearing only the latest node exposes stale earlier instructions, including converter-demoted user text. Dormant empty tails neither override effective text nor produce repeated replacements.

Keep the cleared structural head and ordinary restoration semantics: a capable continuing series may append new nonempty instructions, while incapable or broken-series requests refill the head. No initial empty-head creation change, deletion event, or rollback machinery.

Tests: capable/plain clearing after three active prompt versions fails before the fix and passes afterward; repeated clear and seeded resume remain empty without duplicate system events, restoration includes only new instructions, pi-ai conversion has no stale prompt, and source-event replay reconstructs every request. Final 395 loop tests pass with exact agent.ts/runtime-context.ts coverage at 100% all metrics; source tsc and focused lint pass. Fix new test discriminant narrowing discovered by focused compiler audit. Update EN/ZH consumers and owning rationale, seven pairs verified; parent owns broad gates and generated catalog/SDK/GUI updates.
2026-09-07 11:09:39 +08:00
Tianyi Cui 425a0a55e3 fix(agent-loop): reconcile prompts after retry compaction
Every same-step attempt resolves its bound route and reconciles the accepted rendered prompt against the current surface before deriving history. Preserve assembly, pre-step admission and entered users exactly once; compaction retries must not resurrect an older surviving prompt.

Normalize a broken request series to the current head plus dormant empty later system nodes, even if later versions survive or the effective text is unchanged. This removes the later-survivor exception without a delete operation and avoids appending instructions after already-admitted users on retry. Capture surface generation after reconciliation so subsequent ordinary retries do not emit phantom series headers.

Tests: both compaction cases fail before the fix (stale head, or stale later survivor), then pass with real loop/MockAdapter, pi-ai conversion and source-event reconstruction. Assert two retries keep one assembly/pre-step/user admission, preserve rendered text across section changes, and log one series boundary. Add unchanged-text explicit/tool series regressions. 391 loop tests with exact agent.ts/runtime-context.ts coverage pass at 100%; final admission spec has 11 passing cases. Source tsc and focused lint pass. Update EN/ZH implementation and owning rationale plus lifecycle retry documentation.
2026-09-07 11:09:39 +08:00
Tianyi Cui 2ce9738564 fix(agent-loop): admit prompts under the prepared route
Resolve agent/request and prepareCall inside the accepted open step before committing system and user input. Preserve prompt-assembly model selection, bind capability and dispatch to the same prepared adapter, then log the envelope and derive the request synchronously. Preparation cancellation leaves a balanced empty step with no admitted input.

Normalize incapable-route retained prompt versions with logged per-node empty replacements and a current head, including unchanged rendering and resumed history. Dormant empty tails do not override the effective prompt. No new event or delete operation.

Tests: 389 agent-loop cases pass with exact agent.ts/runtime-context.ts coverage at 100% for all metrics; tsc -b packages/core/agent-loop/tsconfig.json passes. Seven actual-loop MockAdapter cases exercise pi-ai conversion, source-event reconstruction, both route transitions, resume, cancellation barriers, and bound selection. Stale-capability negative control fails all three transition regressions. Update EN/ZH request visibility, lifecycle generator, and owning rationale. Broad catalogs, recorded SDK/GUI and aggregate gates remain parent-owned.
2026-09-07 11:09:39 +08:00
Tianyi Cui c988a6796f feat(agent-loop): append system prompt changes on capable routes
Consolidate the existing in-history capability, loop, UI and artifacts into one baseline. Preserve the reviewed tree so each independently verified correction has a subsequent rationale-rich commit.
2026-09-07 11:09:39 +08:00
Tianyi Cui 71b0d83822 Merge current V3 PTC vocabulary into system-prompt representation
Compose the shared release branch PTC rename with the structural system-head migration in the existing V2-to-V3 stage. Audit source payloads and remap local coordinates before renaming dispatch vocabulary and owned plugin attribution; retain original message identities and generation-qualified references. Native V3 validation combines the same system and PTC lifecycle semantics through a private released-validation view.

Reuse the V3 row-admission owner in current JSONL scanning before recoverable-tail suppression, so malformed rows cannot hide retired required PTC tags or header.system. The new corruption-prefix regressions and all173 existing JSONL scanner tests pass. Combined migration/catalog/persistence suite:300 tests; executable V3 migration source has100% coverage. No released generation, prior migration implementation, shared release branch, benchmark or CI workflow is modified by this integration.
2026-09-06 21:33:35 +08:00
Tianyi Cui 19fdc37448 docs(session): define V3 system-head migration guarantees
Record order-preserving structural conversion and strict refusal instead of an identity edge; distinguish native writer layout and local references from historical delivery facts. Keep released generations frozen and one evolving unreleased V3 target, with canonical envelopes composing afterward.
2026-09-06 20:45:00 +08:00
Tianyi Cui 4c9f5efc07 fix(agent-loop): reserve the initial empty system head
Cause: SystemPromptProjection skipped the first empty rendered prompt. The initial admitted user then occupied surface node zero, so a later nonempty prompt appended behind user history. Routes without in-history system support lost the leading system role; pi-ai demotes a non-leading system message to user content.

Fix: append the initial system node even when its content is empty. The existing loop commit order reserves node zero before admitted user messages; later prompt text replaces that node. Empty content still derives to no wire message. Keep retained-node replacement, clearing, multi-system handling, and pi-ai conversion unchanged; this addresses only the reviewed PR3476 initial-empty finding, not PR3483.

Tests: added initial-empty projection and two-turn loop regressions for empty wire output, reserved surface head, later leading system role, replacement intent, and series header. Negative control failed before the source fix. Focused projection/runtime-context/loop/request-reconstruction/session-surface/pi-ai-context suites passed 176 tests; exact runtime-context.ts coverage is 100% statements, branches, functions, and lines. test:docs passed all 15 gates. Updated README EN/ZH, architecture map and owning architecture note; recorded all three translation pairs. Broad doc-sync/lint stopped at parent request for combined-layer validation. No normalize.ts conflict-comment edit.
2026-09-06 20:42:43 +08:00
Tianyi Cui ee956c720d refactor(session): represent the system prompt as surface node zero
Consolidate the representation-change PR and its rebase reconciliations into one baseline. Preserve the exact tree and keep the in-history feature in the dependent PR. Follow-up fixes remain separate.
2026-09-06 20:42:43 +08:00
Tianyi Cui 40792330c0 fix(system-prompt): keep model persona prefix and place cwd in suffix 2026-09-06 20:35:42 +08:00
Tianyi Cui e28862db57 fix(system-prompt): place environment facts after reusable instructions 2026-09-06 20:08:19 +08:00
Tianyi Cui 5895f46b34 fix(session): preserve unsupported V3 events during tail recovery 2026-09-06 17:29:21 +08:00
Tianyi Cui bad4254d71 Rename durable PTC vocabulary with identity-preserving v2 migration 2026-09-06 14:53:16 +08:00
Tianyi Cui f7a6221158 feat(session): add identity V2-to-V3 migration and writer skeleton 2026-09-06 13:52:21 +08:00
imccyu 9b78f99dec perf(session): transfer frozen persistence reads into restore 2026-09-06 02:10:23 +08:00