Commit Graph
9203 Commits
Author SHA1 Message Date
imccyu c94de60a0c test(web): price the seeded compaction's shadow count exactly
The token-meter projections now subtract compact/summary's
shadowedTokenCount verbatim, so the seeded-history fixture's hand-picked
10k count drove the message figure negative and killed the projections
baseline. Realize the seed first (realizeSeedFixture, idempotent, shared
with seedSession) and derive the count from the shadowed rows through
the composed meter, reproducing the previous per-node fold bit for bit —
the recorded aria goldens pass unchanged.
2026-08-06 03:20:48 +08:00
imccyu 553898e529 fix(fixture): drop the unreachable merge-extension pricing fallback
Fixture-authored content is the closed base vocabulary, so after the
text/reasoning/tool-call arms only tool-result remains; the literal
comparison and its JSON fallback were dead and failed oxlint.
2026-08-06 03:20:41 +08:00
imccyu 297edd512d fix(token-meter): drop the dead deep-compare from claim bookkeeping
A defined fold claim is always freshly built and adjacent metering events
cannot repeat, so presence alone decides the claim transition; the value
comparison was unreachable and failed the per-file branch gate.
2026-08-06 03:20:34 +08:00
imccyu 59df683ef1 fix(token-meter): bound projection state via logged shadow prices
The contextBreakdown and contextPressure units carried the full priced
surface, so each session's persisted projection checkpoint grew without
bound. A surface replacement is now priced by the shadow-price event
logged directly before it — compact/summary for compaction, the new
compact/prune from tool-result pruning (priced through the injected
token meter) — and the unit states shrink to a fixed handful of numbers.
Regenerate the persistence/cordis/module/config catalogs.
2026-08-06 02:50:38 +08:00
imccyu 6400e521ba fix(fixture): avoid duplicated token estimator shape 2026-08-06 00:29:40 +08:00
imccyu a17eebcaca docs(metrics): clarify projection and latency contracts 2026-08-06 00:22:09 +08:00
imccyu aaca2fa52f fix(web): localize stats and close stale context meter 2026-08-06 00:21:34 +08:00
imccyu e94d539de1 fix(fixture): mirror context breakdown projection 2026-08-06 00:21:17 +08:00
imccyu b0d1d9445e Merge remote-tracking branch 'origin/master' into mergebot/pr1667
# Conflicts:
#	apps/web/tests/snapshots/queue-actions/preserved.expected.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/session.i18n.yaml
#	packages/client/runtime/src/client/session-history/history-fold.ts
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/core/session/src/index.ts
2026-08-05 22:56:57 +08:00
Huanqi Cao 17ff1e0d4a Merge pull request #1624 from deepseek-harness/feat/pwsh-ui-parity
feat(pwsh): render pwsh calls as bash-shaped terminal cards in the Web UI
2026-08-05 22:20:11 +08:00
_Kerman a25d0b5b66 Merge pull request #978 from deepseek-harness/xtr/react-loop-simplification
refactor(agent-loop): simplify message delivery and durable inbox
2026-08-05 22:13:54 +08:00
Huanqi Cao 22b2e78bb7 fix(knip): drop unnecessary pwsh ignoreBinaries entry 2026-08-05 22:06:50 +08:00
_Kerman bb6e473dd5 test(acp): refresh cordis-inspect snapshot for the claimed Inbox signature
The claimed-message refactor changed Inbox.claim(target, turn) and added
InboxNotifications.claimed, so the cordis_inspect tool output embedded in
the cordis-inspect-jsdoc replay fixture now carries the new declarations.
2026-08-05 21:58:09 +08:00
Huanqi Cao ca65cf1e14 Merge remote-tracking branch 'origin/master' into feat/pwsh-ui-parity
# Conflicts:
#	apps/web/tsconfig.json
2026-08-05 21:51:31 +08:00
Huanqi Cao 85a52dbe78 Merge branch 'feat/pwsh-ui-parity' of github.com:deepseek-harness/deepseek-harness into feat/pwsh-ui-parity 2026-08-05 21:50:13 +08:00
Huanqi Cao 28d0eef22c chore(pwsh): regen doc catalogs, ignore pwsh binary in knip 2026-08-05 21:49:51 +08:00
_Kerman dc2e2821b9 Merge follow-up: re-record translation hashes and fix e2e fixture shape 2026-08-05 21:42:59 +08:00
_Kerman 207e32493c Merge remote-tracking branch 'origin/master' into xtr/react-loop-simplification
Resolve translation-pairing hashes after the merge and adapt the
math-rendering e2e fixture to the simplified turn/start event shape.
2026-08-05 21:42:33 +08:00
_Kerman d3249f096b refactor(agent): publish agent/inbox/claimed from Inbox.claim
Move the claimed-message notification loop out of the loop's pre-step
into Inbox.claim(target, turn), so the step-boundary operation publishes
its own claimed notifications like insertions and discards do.
2026-08-05 21:36:51 +08:00
imccyu d0cb6770a9 Merge pull request #1668 from deepseek-harness/codex/fix-math-rendering
fix(ui): render common TeX math delimiters
2026-08-05 21:00:24 +08:00
fz 7604e82bf0 Merge remote-tracking branch 'origin/master' into codex/fix-math-rendering 2026-08-05 20:51:06 +08:00
fz e0328fc44d Merge remote-tracking branch 'origin/master' into codex/fix-math-rendering
# Conflicts:
#	packages/client/ui-primitives/README.i18n.yaml
2026-08-05 20:50:50 +08:00
imccyu 0664c27c76 Merge pull request #1385 from deepseek-harness/xtr/trajectory-virtual-scroll
fix(trajectory): keep long sessions responsive
2026-08-05 20:44:30 +08:00
_Kerman 488b8df547 Merge remote-tracking branch 'origin/master' into xtr/react-loop-simplification
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-25-web-client-session-scope-and-provide-channel.i18n.yaml
#	docs/architecture.i18n.yaml
#	docs/architecture.md
#	docs/architecture.zh.md
#	docs/cookbook/extension-cookbook.i18n.yaml
#	docs/cookbook/extension-cookbook.md
#	docs/cookbook/extension-cookbook.zh.md
#	docs/core-data-structures/llm-streaming.i18n.yaml
#	docs/core-data-structures/session.i18n.yaml
#	docs/defensive-patterns.i18n.yaml
#	packages/acp/acp/README.i18n.yaml
#	packages/client/runtime/README.i18n.yaml
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-goal/README.i18n.yaml
#	packages/compact/compact-basic/README.i18n.yaml
#	packages/context/README.i18n.yaml
#	packages/context/README.md
#	packages/context/README.zh.md
#	packages/context/session-reference/README.i18n.yaml
#	packages/context/session-reference/README.md
#	packages/context/session-reference/README.zh.md
#	packages/context/tmux-context/README.i18n.yaml
#	packages/core/session/README.i18n.yaml
#	packages/core/session/README.md
#	packages/core/session/README.zh.md
#	packages/goal/command-goal/README.i18n.yaml
#	packages/goal/goal-session/README.i18n.yaml
#	packages/goal/goal-session/README.zh.md
#	packages/guard/README.i18n.yaml
#	packages/guard/README.md
#	packages/guard/README.zh.md
#	packages/guard/repeat-tool-guard/README.i18n.yaml
#	packages/host/apiproxy/README.i18n.yaml
#	packages/host/apiproxy/README.md
#	packages/host/apiproxy/README.zh.md
#	packages/plan/plan-mode/README.i18n.yaml
#	packages/sdk/sdk-client/README.i18n.yaml
#	packages/sdk/sdk-client/README.md
#	packages/sdk/sdk-client/README.zh.md
#	packages/session-persistence/session-persistence/README.i18n.yaml
#	packages/subagent/subagent-dsh-sdk/README.i18n.yaml
#	python/sdk/README.i18n.yaml
2026-08-05 20:43:30 +08:00
_Kerman 208ec20dd9 docs(agent): mark claim as the loop-internal step-boundary operation 2026-08-05 20:26:46 +08:00
imccyu 749108c2b0 Merge branch 'master' into xtr/trajectory-virtual-scroll 2026-08-05 20:02:53 +08:00
CreatixChu edabb3c2dc Merge pull request #1526 from deepseek-harness/worktree/composer-scrollbar-gutter
fix(web): keep the input card in place across view tabs
2026-08-05 18:29:44 +08:00
creatixchu 452462a504 Merge remote-tracking branch 'origin/master' into worktree/composer-scrollbar-gutter 2026-08-05 18:20:36 +08:00
_Kerman 2d2b542372 Merge remote-tracking branch 'origin/master' into xtr/trajectory-virtual-scroll
# Conflicts:
#	packages/client/runtime/README.i18n.yaml
2026-08-05 18:11:51 +08:00
_Kerman 174d3bc04e Merge pull request #1648 from deepseek-harness/fix/workspace-blank-session-reuse-membership
fix(client): only reuse workspace-member blank sessions for New Session
2026-08-05 18:09:37 +08:00
Yichen Jiang 96c44c83d4 test(web): stabilize and refresh the aria goldens for the speed readings
The TTFT and tok/s readings divide by measured wall time, so they are not
reproducible: the same replayed scenario yielded 69 and 70 tok/s on
consecutive local runs, and a 3 ms replayed stream reads 26333 tok/s. Baking
those into committed goldens made the Web lane flaky by construction, and the
goldens for the readings themselves were never refreshed.

Three fixes, then a refresh:

The footer's decorative dots are `aria-hidden`, so the readings concatenated
into one accessible string — `Ran for 13sTTFT 0.2s12 tok/s`. That is a real
defect on its own (a reader hears one run-on instead of three facts) and it
also denied `{{duration}}` the word boundary it matches on, so even the
previously-stable `Ran for` duration started leaking raw. The separators now
carry flanking spaces.

`normalizeAria` gains `{{throughput}}` beside `{{duration}}`, and its duration
alternation accepts the stats line's compact `2m42s` as well as the
message-chrome template's `2m 42s` — the compact form had no pattern at all,
which is why `LLM 382m39s` survived the first refresh.

Refreshed 17 goldens. They also record that the stats line's `LLM` group now
renders at all: it folds assistant `timing`, which the live transcript adapter
only began attaching in this branch, so the group was previously dead in Chat.

Verified by running the lane in replay three times after the refresh: 41/41
files green each time, goldens untouched. Before this change two consecutive
runs disagreed on both the values and the failure count.
2026-08-05 17:55:49 +08:00
Yichen Jiang 8745365547 docs(i18n): re-record the pairs the master merge left stale
The merge staged the `--ours` consistency records before the merged prose was
re-recorded, so the committed hashes still describe the pre-merge content and
`verify-translation-pairing` rejects the pair. Re-record all three against
what actually merged.
2026-08-05 17:55:36 +08:00
Huanqi Cao 8fcb392fe1 Merge origin/master into feat/pwsh-ui-parity 2026-08-05 17:41:03 +08:00
Yichen Jiang e43b08d7b8 Merge remote-tracking branch 'origin/master' into feat/add-session-data-preview
# Conflicts:
#	docs/core-data-structures/session.i18n.yaml
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/client/ui-conversation/README.md
#	packages/llm/token-meter/README.i18n.yaml
#	packages/llm/token-meter/README.md
#	packages/llm/token-meter/README.zh.md
#	packages/llm/token-meter/src/projection.ts
2026-08-05 17:11:16 +08:00
Yichen Jiang 038699bcb4 fix(web): let the context meter see a compaction
The composer ring, percentage, and `~used / capacity` header read
`contextPressure.pressureTokens`, which moves only when a request reports
usage. Compaction reports none — compact-basic summarizes through a direct
`ctx.llm.stream()` call and appends only its own `compact/*` records plus the
replacement `user/message` — so the meter was frozen across the one action
taken to change it. Driving a real `compactNow` through the agent loop:

    BEFORE compact:  ring=4%  header=~4227/100000  rows=[18, 0, 4365]
    AFTER  compact:  ring=4%  header=~4227/100000  rows=[18, 0,  286]

The composition rows fell 93%; the ring did not move, and would not until an
entire further turn completed. The panel then contradicted itself by more than
an order of magnitude at exactly the moment a reader opens it.

`contextPressure` now also publishes `projectedTokens`: the provider sample
plus the heuristic repricing of everything the surface gained or lost since
that sample, clamped at zero, folded through the shared `surface-fold.ts`. The
sample is stamped before the same event joins the surface, so an
`assistant/message` anchors against the surface its own request carried. Only
the delta is estimated, so the figure stays provider-anchored — the estimator's
CJK and JSON-schema underpricing stays out of the occupancy number — while
reacting the moment content lands or a span is shadowed. Same run after:

    BEFORE compact:  ring=4%  header=~4323/100000  (pressure=4227, projected=4323)
    AFTER  compact:  ring=0%  header=~ 244/100000  (pressure=4227, projected= 244)

`contextOccupancy` prefers the projected figure and falls back to the bare
sample, so a projection restored from a pre-field checkpoint degrades to the
old behavior rather than disappearing. `stateVersion` moves to 3.
2026-08-05 17:00:48 +08:00
_Kerman a006d19bde Merge remote-tracking branch 'origin/master' into fix/workspace-blank-session-reuse-membership
# Conflicts:
#	packages/client/runtime/README.i18n.yaml
2026-08-05 16:58:36 +08:00
_Kerman 829539a11b Merge remote-tracking branch 'origin/master' into xtr/trajectory-virtual-scroll 2026-08-05 16:57:08 +08:00
creatixchu e627c156f6 Merge remote-tracking branch 'origin/master' into worktree/composer-scrollbar-gutter
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
2026-08-05 16:55:12 +08:00
_Kerman c8b36a91b7 chore: retrigger CI after dropped force-push event 2026-08-05 16:53:27 +08:00
_Kerman c634fc2917 fix(trajectory): show exact millisecond durations consistently
Drop the details-panel Duration toggle: Duration rows always show
integer milliseconds, matching the cell time column. Timeline labels
(Total/TTFT/Decoding) and step-group descriptions previously fell back
to second labels at or above one second; they now also show exact
milliseconds via the shared formatDurationMillis formatter.
2026-08-05 16:46:23 +08:00
Turtle 7b14efb2b2 Merge pull request #1358 from deepseek-harness/codex/document-structure-standard
docs: define and apply documentation hierarchy
2026-08-05 16:43:57 +08:00
Yichen Jiang e62cbe12e4 refactor(token-meter): fold the surface once for the meter and the projection
`contextBreakdown.messageTokens` and `measure().surfaceTokens` answer the same
question in the same heuristic vocabulary, and the panel's composition rows are
only honest while they agree. Each owner carried its own copy of the positional
fold — same pricing, same `{seq, tokens}` node list, same replace-range lookup
and guard, differing only in mutable versus immutable application — so an edit
to either one would have moved the panel away from `measure()` with both sides
still green. The duplication gate caught the shared 62 tokens.

`src/surface-fold.ts` now owns `foldSurfaceTokens`: total, allocation-fresh,
returning the event's price, the next surface, and the signed total delta. The
service assigns that result where it used to prepare a commit closure, which
keeps its validate-before-mutate replay transaction intact — the fold throws
before any state is touched, so a malformed event still fails identically on
every retry. `_prepareSurfaceMutation` and `_estimateSurfaceEvent` go away with
it, and the projection's apply drops to one call.

Covers the identity with a session that appends and then compacts, asserting
the projection figure equals the service surface at each boundary; the test
fails when either side of the fold is perturbed.
2026-08-05 16:29:51 +08:00
_Kerman 857bf8c5f8 Merge remote-tracking branch 'origin/master' into xtr/react-loop-simplification
# Conflicts:
#	packages/host/apiproxy/README.i18n.yaml
2026-08-05 16:22:54 +08:00
creatixchu ecaf3095fc Merge remote-tracking branch 'origin/master' into worktree/composer-scrollbar-gutter 2026-08-05 16:19:52 +08:00
Turtle c991a7cc79 docs: finish hierarchy rescan after rebase 2026-08-05 16:18:58 +08:00
_Kerman b54d1c5c99 test(web): pin the single-request workspace projection in the dev smoke
The react-loop simplification folds the workspace baseline into the first
entering request, so the --dev CLI smoke no longer sees a workspace-free
probe request before the projected one. Resolve on the first provider request
and drop the obsolete no-workspace initial assertions.
2026-08-05 16:18:48 +08:00
Turtle 82218e0c36 test: refresh translation prompt snapshot 2026-08-05 16:16:58 +08:00
Turtle 8af3babaea docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
Turtle 012bb0a549 docs: address review feedback 2026-08-05 16:13:28 +08:00
Turtle 5634c08088 docs: restore architecture turn flow 2026-08-05 16:13:28 +08:00