Commit Graph
120 Commits
Author SHA1 Message Date
imccyu 4878cdabd8 release(dsh): 0.2.0-rc.1 (#5387) 2026-09-28 19:48:10 +08:00
turtle1999 787b746b80 release(dsh): 0.1.7-rc.2 2026-09-24 21:24:26 +08:00
Yixiang Tu 43048098f6 test(llm): cover dynamic tool updates and clarify documented limits 2026-09-23 22:40:38 +08:00
Yixiang Tu bc8c0dbf40 feat(llm): emit dynamic tool updates and project them per route
Log tool changes as developer messages independently of model capability,
fold committed headers and updates into Session.toolHistory(), and let the
LLM runtime construct deferred and retained declarations for routes that
declare a toolUpdate mode. DeepSeek serializes updates as system-role
tool_addition/tool_removal blocks with defer_loading and the tool-changes
beta header. An unchanged restored tool continues the series and is
re-offered through its recorded blocks instead of rewriting declarations.

Replace the obsolete rejection tests with wire assertions and add coverage
for the session fold, loop emission, route projection, config validation,
and the beta header. Chat and Trajectory changes land separately.
2026-09-23 22:39:26 +08:00
Turtle e7def469e1 feat(i18n): key translation pairing records by heading section (#5036)
* feat(i18n): key translation pairing records by heading section

Replace the whole-file blob hashes in *.i18n.yaml with one entry per
heading section that still holds language-specific content, keyed by the
English heading-slug path. Blocks identical across the pair (generated
table rows, code blocks, shared regions) stay out of the hash, so edits to
different sections and identical regenerations merge with Git's default
text merge, including on GitHub.

Remove the dsh-translation-pairing merge driver, its resolver command and
installer wiring; gen-translation-brief recovers last-confirmed text from
commit history. Migrate all active records, archive the superseded Agent
Note, and record the replayed conflict reduction in the new one.

* test(i18n): refresh translation prompt snapshot for the terminology note

* feat(i18n): exclude only code blocks and generated regions from pairing records

Replace byte-equality masking with an explicit rule: a record hash skips
fenced code blocks and BEGIN/END GENERATED regions, the two kinds of
content the pairing gate already requires to be identical on both sides.

Move generated data into regions written into both pages:
gen-config-catalog renders both languages and the record with per-package
regions labelled by code identifiers; gen-module-graph keeps its table in a
region; gen-doc-graphs splices the event matrix regions into the Chinese
page. Add a generic region splice beside the region grammar.
2026-09-23 22:32:06 +08:00
turtle1999 a60af51e80 release(dsh): 0.1.7-rc.1 2026-09-23 20:47:45 +08:00
imccyu 10ea83bcc3 release(dsh): 0.1.7-alpha.2 2026-09-22 23:12:55 +08:00
imccyu 4e6028a604 build: use tilde ranges for vendor and native workspaces 2026-09-22 21:14:06 +08:00
imccyu 37372101b5 build: pin internal DSH workspace dependencies 2026-09-22 21:12:56 +08:00
turtle1999 112ce776ac release(dsh): 0.1.7-alpha.1 2026-09-22 11:59:16 +08:00
Tianyi Cui 580bdc7258 refactor: remove redundant unknown casts 2026-09-19 20:13:58 +08:00
Dudu-0223 ec7030afd3 fix(compaction): default summary output cap to headroom 2026-09-19 19:56:54 +08:00
Dudu-0223 9b016b6425 refactor(compaction): require an explicit output reservation 2026-09-19 19:56:53 +08:00
Dudu-0223 555b664b08 fix(compaction): reserve configurable 64K pressure headroom 2026-09-19 19:56:53 +08:00
Dudu-0223 b02b20d713 fix(compaction): pin output caps and cover proactive reserve replay 2026-09-19 19:56:51 +08:00
Dudu-0223 a1cebebd40 refactor(compaction): drop the spec's reservedCompletionTokens field
Review follow-up: nothing consumed the field. The reserve stays an input to
`resolveCompactSpec`, whose returned budgets already express its effect, so
`ResolvedCompactSpec` keeps its exported shape.

Note the name collision a consumer would have hit: `ResolvedTargetPolicy.maxTokens`
is the compaction *summarization* output cap (default 8192), not the routed
request's cap reserved from the same window.
2026-09-19 19:56:51 +08:00
Dudu-0223 0fadb08fbd fix(compaction): gate pressure on the message budget, not the whole window
Proactive pressure scaled `thresholdRatio` by the routed model's entire
context window, but a request also reserves output tokens the provider
charges to that same window — the LLM service deliberately never clamps
them (`packages/llm/llm/src/index.ts`).

With a 1,000,000-token window and the default 256,000-token request cap the
gate therefore sat at 800,000 while the provider refused any prompt above
792,576. Observed in a real session: three requests died at 792,850 /
797,639 / 793,352 message tokens ("maximum context length is 1048576 ...
you requested 1048850 tokens"), no pressure compaction ever fired, and the
overflow recovery that did run could not condense an ~800k-token history
into the 8192-token summary cap.

Scale both ratios by the message budget left after the reserve, sourced from
the effective request envelope's `maxTokens` and falling back to the
adapter's per-request output default. A reserve that leaves no message
budget reports a target-specific pressure configuration error, matching the
existing per-route warning policy rather than silently disabling proactive
compaction. The headless compaction e2e advertises a coherent capacity/cap
pair so its 8000-token message budget and 4000-token threshold are unchanged.

Related #1841
2026-09-19 19:56:51 +08:00
_KermanandTianyi Cui fb79a944f5 refactor(llm): separate durable producer sources from request inputs
Give durable user context its producer-owned source kind instead of a generic plugin wrapper. The V3-to-V4 conversion preserves the frozen rename and collision rules, all own JSON metadata, event coordinates, and historical request-only kinds. Native catalog and JSONL admission retain source validation so unknown attribution can survive without its producer while malformed owned sources are refused.

Use an explicit user-only RequestUserInput for auxiliary LLM prompts that do not own durable message identity. Auto Review and compaction remove their request-only source registrations while retaining prompt content and freezing; provider serializers and projections keep the same wire data, assistant replay isolation, image ordering, and tool correlation. Session writes, Agent delivery, and recorded title requests continue to require identified durable messages.

Bind the saved compatibility policy only to user sources and qualify tmux location attribution without weakening fixed system, model, or tool semantics. Rebuild the current inventory and unpublished V4 acknowledgement on the actual tool-role parent, preserving its rationale and all accepted historical records. The catalog format version records tooling metadata; Session remains V4. Developer-role policy and activation belong to their own feature.

The latest-master Messages adapter, serialization, request-input typing, EpochHeader reservation, and attribution checks pass 103 tests across five files. The retained V3 Messages input-history snapshot passes through the source profile; Host/Client typechecks and all 41 documentation gates pass. The generated comparison records four changed roots and 447 unchanged type fingerprints. Latest-master ARIA changes are retained, with producer source labels applied independently; new Messages fixtures retain their producer names as declared source kinds and use the fixed system-message helper; recorded Session generations are unchanged by this regrouping.

Co-authored-by: Tianyi Cui <[email protected]>
2026-09-18 19:07:12 +08:00
_KermanandTianyi Cui f4a32dbd0a refactor(llm): flatten tool results and validate native V4 sessions
Represent tool results as tool-role messages and migrate released wrappers
without losing outer own JSON fields, call identity, error state, or writer
field order. Refuse nested or wrapper-only information that has no lossless
current representation before successor publication.

Validate current event relationships directly instead of projecting V4 data
back into V3. Keep lifecycle, PTC, title/command, compaction, system-field and
retired-syntax checks on catalog restoration and ordinary JSONL opens. The
Worker JSON equality helper must inspect own keys so it cannot admit PTC
arguments that Node rejects.

Keep the source role change, required native admission and consumer fixture
updates in one complete review layer. Explain shared-type changes in the
persistence record and the native reader rationale in its existing note.
Use checked branded fixture identities and discriminant narrowing instead
of unknown double casts; fixture values and assertions remain intact.

This recomposes the original tool-role work by _Kerman with the independently
validated migration and admission repairs by Tianyi Cui. Frozen generations
and snapshot input version selection are retained.

Co-authored-by: Tianyi Cui <[email protected]>
2026-09-18 19:05:32 +08:00
Tianyi Cui d66b21894c merge: integrate latest master into session-log-v4
Merge master 62b700bba7bb71e66d2d5a3b850ba8f4dd0fd6b4 into release/session-log-v4 at 4825bc01a999f564e79172a6af28e34fc757c540. Preserve this pinned integration checkpoint before any later upstream movement so the dependent session-format repairs have an immutable rebase base.

Keep release projection-backed child catalogs, independent Session references, exact fork behavior, V4 writer, and existing migration data. Adapt the incoming subagent sidebar chat to refreshProjections rather than the removed dedicated catalog API, preserve title projections in complete projection fixtures, and retain both sidebar actions and release lineage/status behavior. Remove the duplicate SessionProjectionMap import introduced by automatic merging.

Preserve both disjoint archive seals without changing any existing hash. Regenerate current Cordis and documentation catalogs from the combined source, retaining release session methods plus master slot factories. The frozen V0-V3 runtime paths are unchanged. Initial validation passed the full build, 93 focused Client tests, and all 1905 archived artifact seals; remaining integration and snapshot checks follow on this checkpoint.
2026-09-17 23:23:48 +08:00
creatixchu 6b1808f432 release(dsh): 0.1.6-alpha.2 2026-09-17 21:11:19 +08:00
Tianyi Cui 8696ec6cef feat(session): fork exact event prefixes with synthetic tail results 2026-09-17 00:00:44 +08:00
creatixchu ea53423b60 release(dsh): 0.1.6-alpha.1 2026-09-15 09:35:57 +08:00
creatixchu a7070008e7 Merge master and integrate image offload with both DeepSeek protocols 2026-09-14 10:19:11 +08:00
Turtle 71d50b4a84 refactor: ban ambiguous origin label 2026-09-11 17:45:28 +08:00
creatixchu 413ac14b16 refactor: move image offload projection into its plugin 2026-09-11 15:24:45 +08:00
creatixchu ec3560c42e Merge master 16bf879af2 into image offload branch 2026-09-11 13:40:19 +08:00
creatixchu 73e10fb80c fix(compaction): preserve summary diagnostics on cancellation 2026-09-11 10:58:36 +08:00
creatixchu debb4b9a9c fix(compaction): recover durable image offload in summary requests 2026-09-11 10:56:48 +08:00
Yichen Jiang 59f2e3be33 Merge release/dsh-0.1.5 version 0.1.5-rc.2 into master sync branch 2026-09-10 21:53:53 +08:00
Yichen Jiang a305303422 release(dsh): 0.1.5-rc.2 2026-09-10 21:38:20 +08:00
creatixchu b5e7fca4a5 feat(compaction): record image offload decisions without message replacement 2026-09-10 16:47:50 +08:00
_Kerman eb0a666415 Merge remote-tracking branch 'origin/master' into dshw/pr-deepseek-harness-deepseek-harness-3828
# Conflicts:
#	docs/config-catalog.i18n.yaml
#	docs/subsystems/session.i18n.yaml
#	packages/core/session/README.i18n.yaml
2026-09-10 11:19:25 +08:00
j-xiang 4ddf777ad8 Merge master into README proofreading branch 2026-09-10 10:42:13 +08:00
imccyu 1ef9c1fa9a release(dsh): 0.1.5-rc.1 2026-09-10 09:13:14 +08:00
j-xiang b5578ae46a Merge master into README proofreading branch 2026-09-10 01:29:37 +08:00
j-xiang 8e8fb2fc62 docs(i18n): proofread bilingual README corpus 2026-09-10 00:21:32 +08:00
imccyu dd393c1820 release(dsh): 0.1.5-alpha.2 2026-09-09 22:02:09 +08:00
_Kerman 8f986c8da6 chore(session): scope history reader exemptions to tests 2026-09-09 12:55:32 +08:00
_Kerman 37abcb74c5 chore(session): permit existing deprecated history reads 2026-09-09 12:33:53 +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
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
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
_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 1721a9c566 test(compaction): expect admitted instructions on metered retry
The meter regression deliberately rewrites the system node during request-error recovery. After the retry reconciliation fix, the next request must restore the captured admitted prompt rather than trust that temporary replacement. Keep the replacement stimulus and zero-delta metering assertions, but compare the retried prompt with the initial request so the two independently corrected components are tested together.

Validation: the combined regression run exposed this obsolete retry-text expectation while 945 other cases passed; all eight compaction-loop-repro cases pass with the admitted-prompt assertion.
2026-09-07 11:09:39 +08:00