Commit Graph
5901 Commits
Author SHA1 Message Date
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
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
_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
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
_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 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
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 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
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
Turtle 8af3babaea docs: rescan rebased documentation hierarchy 2026-08-05 16:16:57 +08:00
Turtle dd8d446286 docs: apply hierarchy across the corpus 2026-08-05 16:13:28 +08:00
_Kerman 7e9fa76bf9 test(spine): fold workspace instructions into the first request
The react-loop simplification enters the workspace baseline with the first
request instead of queueing it for a second step, and the acp-agent sandbox
scenarios now replay the branch's inbox event flow. Update the agent-spine-demo
assertions to the single-request shape (workspace rule ahead of the skill
catalog, matching registration order) and refresh the two keyless sandbox
snapshots against the merged runtime.
2026-08-05 16:02:58 +08:00
Yichen Jiang 46562b2c30 fix(web): localize the context panel headline order and drop empty bar parts
The panel header concatenated a `45%` span with a `context.used` fragment, so
Chinese rendered "45% 上下文已用" against the ring's own "上下文已用 45%". The
header now renders the one localized `context.aria` sentence split around its
`{percent}` slot: each locale owns the reading's position while the reading
keeps its primary tone, and the side a locale leaves empty collapses through
`.headline:empty` instead of spending a header gap.

The bar mapped every composition row to a segment unconditionally, and
`.segment`'s 2px min-width kept each one visible, so a 0% occupancy panel
painted an ~8px filled bar over an empty context. Parts are now computed with
their widths and zero-width parts are filtered out, which also collapses the
plain and segmented branches into one map.
2026-08-05 15:59:24 +08:00
Yichen Jiang d2aafc2a33 Merge remote-tracking branch 'origin/master' into feat/add-session-data-preview
# Conflicts:
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/session.i18n.yaml
#	packages/client/ui-conversation/README.i18n.yaml
#	packages/llm/token-meter/README.i18n.yaml
2026-08-05 15:51:34 +08:00
_Kerman a00b11be76 Merge remote-tracking branch 'origin/master' into xtr/trajectory-virtual-scroll
# Conflicts:
#	docs/core-data-structures/session.i18n.yaml
#	packages/client/ui-trajectory/README.i18n.yaml
#	packages/client/ui-trajectory/README.zh.md
#	packages/core/session/README.i18n.yaml
#	packages/core/session/README.zh.md
2026-08-05 15:41:23 +08:00
creatixchu 1ed62688ab Merge remote-tracking branch 'origin/master' into worktree/composer-scrollbar-gutter
# Conflicts:
#	packages/client/ui-conversation/README.i18n.yaml
2026-08-05 15:36:06 +08:00
Yichen Jiang cc6e2382cb Merge remote-tracking branch 'origin/master' into worktree/open-settings-config-file
# Conflicts:
#	.agents/notes/implemented/architecture/2026-07-30-web-config-plane.i18n.yaml
#	.agents/notes/implemented/architecture/2026-07-30-web-config-plane.md
#	.agents/notes/implemented/architecture/2026-07-30-web-config-plane.zh.md
#	packages/client/ui-settings/README.i18n.yaml
#	packages/host/apiproxy/README.i18n.yaml
#	packages/host/apiproxy/README.zh.md
2026-08-05 15:34:51 +08:00
_Kerman 289a23421d Merge remote-tracking branch 'origin/master' into xtr/react-loop-simplification
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-06-sandbox.i18n.yaml
#	.agents/notes/implemented/feature/2026-07-06-sandbox.md
#	.agents/notes/implemented/feature/2026-07-06-sandbox.zh.md
#	packages/host/apiproxy/README.i18n.yaml
2026-08-05 15:34:19 +08:00
_Kerman afb6ee2c9b fix(trajectory): display sub-second durations as exact milliseconds
formatElapsedSeconds rounded every duration to one decimal, so calls
under 50 ms rendered as 0 s. Durations below one second now show integer
milliseconds (29 ms); at or above one second the tenth-of-a-second label
is unchanged (1.5 s). Step group descriptions reuse the same formatter.

The details-panel Duration rows toggle between the readable label and
exact milliseconds on click, mirroring the StartedAt toggle; the shared
text-selection guard is extracted for both. tabular-nums is dropped from
detail values and the toggle buttons because SF's tnum feature widens
the decimal point and leaves excessive space after it.
2026-08-05 15:18:39 +08:00
_Kerman 34650059ef fix(trajectory): reveal summary scrollbar thumbs on hover or focus
Summary scroll regions keep their scrollbar thumbs transparent until the
region is hovered or contains keyboard focus, without changing the
reserved scroll geometry. Updates the package README pair and the
inspection-ledger Agent Note together.
2026-08-05 15:18:38 +08:00
fz 09a2e120f3 test(ui): strengthen TeX parser boundaries 2026-08-05 15:11:47 +08:00
fz 7c90422f34 fix(ui): harden TeX delimiter parsing 2026-08-05 15:06:38 +08:00
_Kerman 757adac62d refactor(workspace-context): fold context into the entering pre-step batch 2026-08-05 14:46:48 +08:00
fz 3b86568577 test(ui): keep TeX delimiters out of code fences 2026-08-05 14:28:16 +08:00
fz d68ee2fb0e test(web): cover TeX math rendering 2026-08-05 14:19:19 +08:00
fz 872b464ec2 Merge remote-tracking branch 'origin/master' into codex/fix-math-rendering 2026-08-05 14:09:10 +08:00