Commit Graph
911 Commits
Author SHA1 Message Date
imccyu 00d541438b release(dsh): 0.2.2-alpha.2 2026-10-28 02:03:15 +08:00
imccyu 69c389ae11 release(dsh): 0.2.2-alpha.1 2026-10-28 00:00:58 +08:00
Magolorand_Kerman fcca540841 refactor(session): unify runtime projection reads (#7347)
* refactor(session): bind runtime projection reads to one session

* refactor(session): expose session-bound readers on projection handles

---------

Co-authored-by: _Kerman <[email protected]>
2026-10-27 09:50:22 +00:00
imccyu 3014b0af0f Merge master into DSH 0.2.1-rc.4 synchronization branch 2026-10-26 01:29:12 +08:00
imccyu 341beb33c0 release(dsh): 0.2.1-rc.4 2026-10-26 00:57:37 +08:00
Dudu-0223 30650824c9 Merge latest master and refresh persistence catalog 2026-10-23 14:55:33 +08:00
Dudu-0223 b096659245 fix(session): make ordinary forks independent of source lineage 2026-10-23 14:48:07 +08:00
mektpoy 6e4eda77c8 Merge origin/master into fix/agent-loop-series-start-prefix-cache 2026-10-23 14:06:46 +08:00
mektpoy 6b9f7fcaa7 test(agent-loop): pin the unchanged-text series start in a recorded session
Add an authored headless scenario that appends a changed prompt and then replaces a surface node before the third step. The unchanged-rendering series start must keep both prompt versions and write no system/message event; the scenario fails against the pre-fix projection. Also tighten the tool-series-start assertions and make the prefix premise explicit.
2026-10-23 14:06:08 +08:00
mektpoy d5ee15acf2 docs(agent-loop): align series-start contracts with shipped behavior
Clarify the SystemPromptDecisionInput.startsSeries contract (a new request series no longer implies consolidation), record the tool-schema series-start exception consistently in the decision and consequences, and correct the complete-declaration attribution to the unsupported-route projection.
2026-10-23 14:06:07 +08:00
imccyu 14f0b2aafe Merge master into DSH 0.2.1-rc.3 synchronization branch 2026-10-23 11:56:34 +08:00
imccyu d02ea370ee release(dsh): 0.2.1-rc.3 2026-10-23 01:11:35 +08:00
mektpoy b65da56f6e docs(agent-loop,session): record the unchanged-text series-start rule
Update the capability decision rule, both READMEs, the EventMap JSDoc and generated catalogs. Add the bug-fix Agent Note that records the incident evidence, the decision, rejected alternatives and consequences, and cross-link it from the in-history decision note.
2026-10-22 21:25:32 +08:00
mektpoy 2676c67f32 fix(agent-loop): keep the prompt prefix at a series start with unchanged text
An in-history route carries prompt updates as later system nodes while node 0 stays stale. A surface replacement (compaction, tool-result prune, image offload) starts a new request series, and the projection used to re-baseline node 0 even when the rendering already matched the latest surviving node: it emptied that node and wrote identical text into node 0, so the request differed at its first message and the provider prefix cache missed from the first token (#6973).

Re-baseline node 0 only when the effective text must move: an incapable route, an empty rendering, or a series start whose latest surviving non-empty node differs from the rendering. A capable series start with matching text emits no system event; the loop still logs the request series and rebuilds declarations. Retry compaction still folds the prompt to the head when it shadows the latest node.
2026-10-22 21:25:29 +08:00
mektpoy 71d5454904 test(agent-loop): reproduce series-start prompt rewrite on unchanged text
A compaction replacement after an appended in-history prompt starts a new request series, and the projection folds the prompt back into node 0 although the effective text is unchanged. The request moves the system segment to wire message 0, so the provider prefix cache misses from the first token (#6973).

The regression fails before the fix: the third request carries one system text ("prompt two") instead of keeping the appended node behind the cached prefix.
2026-10-22 21:19:24 +08:00
07akioni 84edeadc2b feat(i18n): add Spanish French German Russian and Portuguese 2026-10-22 19:53:52 +08:00
Yichen Jiang ce24d53eb5 Merge remote-tracking branch 'origin/master' into worktree/dynamic-tool-activation-pr-64796e 2026-10-21 23:32:43 +08:00
Yichen Jiang 207b30d299 Merge remote-tracking branch 'origin/master' into worktree/dynamic-tool-activation-pr-64796e
# Conflicts:
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/persistence-catalog.i18n.yaml
#	docs/persistence-catalog.md
#	docs/persistence-catalog.zh.md
#	docs/persistence-schema.json
#	packages/core/agent-loop/src/agent.ts
#	packages/core/agent-loop/src/tool-calls.ts
#	packages/core/agent-loop/tests/tool-updates.spec.ts
#	packages/core/system-prompt/README.i18n.yaml
#	packages/core/system-prompt/README.md
#	packages/core/system-prompt/README.zh.md
#	packages/core/tool-executor-ptc/src/ptc.ts
#	packages/core/tool-executor-ptc/tests/ptc.spec.ts
#	packages/core/tools/README.i18n.yaml
#	packages/core/tools/README.md
#	packages/core/tools/README.zh.md
#	packages/core/tools/src/index.ts
#	packages/extensions/tool-cordis/src/api-catalog.ts
#	packages/plan/plan-mode/tests/plan-mode.spec.ts
#	snapshots/session/cordis-inspect-jsdoc/session.v4.jsonl
2026-10-21 23:32:15 +08:00
_Kerman 04609dc0de Merge xtr/session-store-write-lifecycle into xtr/agent-initialization-flow 2026-10-21 19:33:26 +08:00
_Kerman fef2f3d06e Merge master into xtr/session-store-write-lifecycle 2026-10-21 19:27:56 +08:00
_Kerman 46fdc70d66 Merge master into xtr/session-store-write-lifecycle 2026-10-21 19:27:56 +08:00
_Kerman 0e7b3701cb Merge xtr/session-store-write-lifecycle into xtr/agent-initialization-flow 2026-10-21 18:22:35 +08:00
_Kerman b43a01e285 Merge master into xtr/session-store-write-lifecycle 2026-10-21 18:16:23 +08:00
_Kerman 7a8f417b5e Merge master into xtr/session-store-write-lifecycle 2026-10-21 18:16:23 +08:00
_Kerman d98025a089 Merge origin/master into xtr/tool-executor-plugins 2026-10-21 18:01:55 +08:00
Yichen Jiang 2f09a68329 Merge remote-tracking branch 'origin/master' into worktree/dynamic-tool-activation-pr-64796e 2026-10-21 17:58:24 +08:00
07akioni ed783066e6 fix(i18n): complete Japanese plugin metadata and guard locale coverage 2026-10-21 16:14:12 +08:00
_Kerman a53ecb2f3a Merge origin/master into xtr/tool-executor-plugins 2026-10-21 15:56:44 +08:00
Yichen Jiang 9d0c97b9d2 feat(tools): admit conditional tools per step
ctx.tools.register(definition, { when }) adds a synchronous or asynchronous
condition. AgentLoop resolves conditions once per proposed step with the
agent, the model selection that step preparation captured, and the turn
signal, before prompt assembly and agent/pre-step. The resulting
ResolvedToolSet governs tool declarations, Native dispatch, PTC bindings,
and nested calls for that step and its retries, and the turn disposes it
when the proposal is rejected or fails, when no step opens, and after the
step. A false condition removes the tool everywhere; a thrown condition
ends the turn with TOOL_ACTIVATION_FAILED. Calls whose registration was
replaced or removed during the step return UNKNOWN_TOOL.

system-prompt/assemble now transforms PromptPresentation without a tool
array, so tool declarations stay provider-owned. exit_plan_mode is declared
only for steps whose selected plan state is active, the same state that
renders plan guidance; it still rejects a call before the selection is
logged.

Model selection stays as master defines it; this change adds no model
selection event or Agent field.
2026-10-21 15:02:29 +08:00
_Kerman d6dc8890b9 Merge github/master into xtr/session-store-write-lifecycle 2026-10-21 15:01:22 +08:00
_Kerman 8f0489dc06 Merge github/master into xtr/session-store-write-lifecycle 2026-10-21 15:01:22 +08:00
_Kerman 6bfe05c6f5 refactor(agent): name captured step selection modelSelection 2026-10-21 14:08:11 +08:00
_Kerman e727a3b161 fix(tools): keep executor changes out of registry notifications 2026-10-21 12:13:57 +08:00
_Kerman cdb3a76b6a test(agent): complete model ownership migration coverage 2026-10-21 10:43:20 +08:00
_Kerman 7289bee231 test(agent-loop): assert rollback closes before rejection 2026-10-20 22:39:38 +08:00
_Kerman 06e97edd60 docs(agent): clarify initialization cleanup timing 2026-10-20 22:39:28 +08:00
_Kerman bf4ab8be26 refactor(agent-loop): unify agent initialization 2026-10-20 22:21:52 +08:00
_Kerman 200dedd494 chore: trim unrelated model-selection changes 2026-10-20 22:13:30 +08:00
_Kerman a9c006f9c3 refactor(agent): own model selection on each agent 2026-10-20 21:09:09 +08:00
_Kerman 8b79a1ddcc Merge origin/master into xtr/session-model-selection 2026-10-20 17:22:59 +08:00
_Kerman cc0e980e48 fix(session): align store-owned writes with lifecycle notifications 2026-10-20 11:33:44 +08:00
_Kerman 49a7a75d75 fix(session): align store-owned writes with lifecycle notifications 2026-10-20 11:33:44 +08:00
_Kerman 7d0301fe05 Merge master into scoped tool executors 2026-10-19 21:53:41 +08:00
_Kerman e9784c073b fix(tools): settle executor calls after unload and validate configuration 2026-10-19 16:32:29 +08:00
_Kerman 3b978adcec test(tools): tidy migrated fixture imports and comments 2026-10-19 16:32:04 +08:00
_Kerman ef9ed3fec1 test(agent-loop): preserve context after partial batch failure 2026-10-19 15:24:06 +08:00
_Kerman 31a49c6629 Merge remote-tracking branch 'origin/master' into xtr/tool-executor-plugins
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/tool-catalog.i18n.yaml
#	packages/bundle/base/package.json
#	packages/core/agent-loop/tests/serial-listener-review.spec.ts
#	packages/core/agent-tool-presentation/package.json
#	packages/experimental/auto-review/tests/auto-review.spec.ts
#	packages/lsp/tool-lsp/package.json
#	packages/subagent/tool-subagent/tests/list-models.spec.ts
#	scripts/check-workspace-constraints.ts
#	scripts/type-equiv.manifest.json
#	tsconfig.base.json
2026-10-19 14:53:33 +08:00
_Kerman ffe122ffd4 docs(tools): document executor plugins and migration 2026-10-19 14:50:00 +08:00
_Kerman 455686626d refactor(tools): separate scoped executors from tool registration 2026-10-19 14:49:55 +08:00
_Kerman c18f5bd3c0 Merge remote-tracking branch 'origin/master' into xtr/session-model-selection
# Conflicts:
#	docs/capability-seams.i18n.yaml
#	docs/capability-seams.md
#	docs/capability-seams.zh.md
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	docs/persistence-catalog.i18n.yaml
#	docs/persistence-catalog.md
#	docs/persistence-catalog.zh.md
#	docs/persistence-schema.json
#	packages/api/session-controller/src/types.ts
#	packages/bundle/base/package.json
#	packages/bundle/headless/README.i18n.yaml
#	packages/bundle/headless/README.md
#	packages/bundle/headless/README.zh.md
#	packages/bundle/headless/package.json
#	packages/bundle/headless/tsconfig.json
#	packages/subagent/tool-subagent/tests/model-selection-settings.spec.ts
#	scripts/type-equiv.manifest.json
2026-10-19 11:30:55 +08:00