Commit Graph
22517 Commits
Author SHA1 Message Date
imccyu f230fc2fc2 refactor(session-projection): review fixes for the summary key set
- Export `ProjectionKeySelection` (the read faces' key selection) and reuse it
  from the projection cache instead of restating the union twice. The Cordis
  catalog can now resolve the type its generated signatures reference.
- Make `wire.summary` a plain boolean: omitted means `true`, and a key whose
  map entry carries the summary mark declares `false` so the runtime key set
  and the client view type agree. The type no longer forbids a declaration.
- Describe the mark accurately: it has no runtime representation; `wire.view`
  and `viewSchema` are typed with `SessionProjectionViewValue`, which strips it,
  so the registration erase only widens the state type.
- Say plainly in the package README, the subsystem page, the client field
  comments, and the Agent Note that a list row carries the summary projection
  and never the full projection: a connected Session's store may hold more
  values, but those are outside the list contract.
- Document the summary vocabulary on the subsystem page with `ts type-equiv`
  blocks for the mark, its stripping, the excluded-key test, the summary value
  type, and the key selection; split the prose paragraph.
- Revert the behavior-neutral cache-double refactors in three specs, and record
  in the Agent Note why no upgrade guide accompanies the wire change and how a
  consumer migrates.
2026-10-19 01:13:24 +08:00
imccyu 64a1d1e95f chore(docs): regenerate the event graph after the line shift
The producer/consumer matrix points at the declaring line of each event. Adding
the `imageLimits` JSDoc and map-entry wrap moved the `api-session/*` declarations
in `packages/api/session-controller/src/types.ts` down by four lines, so the
graph pair is regenerated. Only source locations change.
2026-10-18 23:12:27 +08:00
imccyu 8e2dd67de8 perf(session-controller): exclude the shared image limits from session summaries
`imageLimits` is a boot constant every Session shares: the unit stores no
per-Session state (`stateSchema: z.null()`, `apply: state => state`) and its
view returns `ctx.attachments.imageLimits`. A list row therefore repeated one
host-wide capability fact on every row. It now carries the summary mark like
the three log-derived units, so a summary read skips it while an opened Session
still receives it through `session/follow`, the control baseline, and
`session.projections`.

No other logic changes: the registration, its schema, its constant view, and
the host-side prompt validation keep reading `ctx.attachments` directly.
2026-10-18 23:04:29 +08:00
imccyu ef446fc85f docs(agent-notes): record the session-list summary projection decision
The note records why a Session-list row carries a summary key set instead of
every registered client view: the type-only exclusion mark with its
registration interlock, the derived stable key set reused through the existing
key-taking read faces, the nullable-wrapper rule for `todos`, and the estimated
payload effect of omitting `turnOutline`, `sessionStats`, and `todos`. It lists
the rejected alternatives (a summary-specific read face, a hardcoded key list,
post-hoc filtering, opt-in summaries, and lazy per-value reads) and the costs
the decision accepts.
2026-10-18 22:39:21 +08:00
imccyu 0e1ffcb3a6 chore(persistence): regenerate the event catalog after the line shift
The catalog pages embed the declaring source location of each documented type.
Adding the summary-exclusion import and map-entry JSDoc to
`packages/todo/tool-todo/src/types.ts` moved `TodoItem` and `todo/write` two
lines down, so both catalog languages and their pairing record are regenerated.
No type fingerprint changes: `verify-persistence-changes` still reports 65
roots matching 16 history records.

A second `gen-persistence-catalog` run is required after a schema change: the
page and the machine inventory are generated in one pass, and the page reads
the inventory as it was on disk.
2026-10-18 22:39:11 +08:00
imccyu 0def172a02 chore(persistence): refresh source line references in the schema catalog
`docs/persistence-schema.json` records the declaring source location of every
persisted type. Adding the summary-exclusion import and map-entry JSDoc to
`packages/todo/tool-todo/src/types.ts` moved two declarations down by two
lines, so the generated catalog is regenerated. No persisted type, field, or
history record changes: `verify-persistence-changes` reports 65 roots matching
16 history records, and the release/format catalogs are unchanged.
2026-10-18 22:23:15 +08:00
imccyu 92f9e79fac perf(session-projection): serve session-list rows from a summary key set
A Session-list row no longer carries every registered client view: the three
units whose values a list row never renders (`turnOutline`, `sessionStats`,
and `todos`) are excluded, which removes the whole-log turn outline and the
figure and todo payloads from every row. An opened Session is unchanged —
`session/follow`, the `session/control` baseline, and `session.projections`
still serve every projected key.

The exclusion is one type-level mark plus one registration interlock:
`SessionProjectionSummaryExcluded<T>` marks a map entry, and
`ProjectionDefinition.wire` requires `summary: false` exactly on a marked key
and rejects it everywhere else, so the mark and the declaration cannot drift.
A nullable entry keeps `null` outside the wrapper, so `todos` stays
`TodoItem[] | null`. `summaryKeys()` returns the derived set, stable until a
registration or its disposal changes the key table, and the existing
key-taking read faces (`cachedSnapshot`, `viewCheckpoint`) accept that set
directly, so summaries need no separate read face and no per-read key copy.
`packages/api/session-controller/src/list.ts` passes the set to the live and
cold cached faces; `cachedPredecessorTitle` is untouched.

Client types only: `SessionSummary.projectionValues` narrows to
`SessionProjectionSummaryValues`, `SessionProjectionSnapshot.values` keeps
every view value with the mark stripped, and no wire field or client name
changed. The cache, subsystem page, and package README document the summary
rule and the two read faces.
2026-10-18 22:13:18 +08:00
Tianyi Cui aab314e40e Merge pull request #6465 from deepseek-harness/worktree/unsigned-desktop-local-branding
feat(desktop): use local branding for unsigned packages
2026-10-18 16:15:21 +08:00
imccyu 586e3a3f59 Merge pull request #6321 from deepseek-harness/worktree-chatwhalepos
feat(ui-chat): anchor running status to the running turn tail
2026-10-18 16:00:42 +08:00
Tianyi Cui 5d98573852 Merge remote-tracking branch 'origin/master' into worktree/unsigned-desktop-local-branding
# Conflicts:
#	docs/development.i18n.yaml
2026-10-18 15:53:01 +08:00
imccyu bde15f201b fix(ui-chat): keep echoes after a running Turn's empty control at the input gap
After a stop, steering still pending is claimed with the next prompt and the
AgentLoop logs it first. Once the first of those rows is durable, the
remaining echoes follow the new Turn's process control, which renders empty
while the Turn runs. The 16px clearance after that control applied to them
and moved each echo by 10px before its durable row replaced it. The clearance
now applies after a visible control to every row, and after any control only
to rows that are not local echoes, so the echoes keep the input gap.

Also state that a switch lifted within a move's duration plays the rest of
it, that the steering entrance approximates the status's previous position,
and that the runtime-context notice placement follows from the README rule.
2026-10-18 15:45:57 +08:00
Tianyi Cui b98127cf02 Merge pull request #6457 from deepseek-harness/worktree/session-build-generation-prototype
build: generate metadata before package compilation
2026-10-18 15:45:48 +08:00
ZiyaandZiyaZhang 114da79e42 fix(agent-instructions): budget the user-global and project chains separately (#6400)
* fix(agent-instructions): budget the user-global and project chains separately

The user-global and project instruction files shared one maxBytes and the user-global files were the broadest, so a large project chain omitted them first. Each chain now renders under maxBytes on its own and the results share one system-reminder frame: unchanged output when everything fits or one chain is empty, at most twice maxBytes otherwise. The project chain keeps its omit-broadest-first, truncate-last rule; reconciliation batches follow the same split; the maxBytes key and the baseline identity are unchanged.

Tests cover the fast paths, both chains fitting only separately, each chain over its own budget, the 2 × maxBytes boundary at exact and tiny limits, multibyte content, reconciliation batches, and a resumed single-budget baseline receiving the user-global file as one transition. The agent-instructions-budget snapshot is refreshed and agent-instructions-budget-chains is added. README, Config.maxBytes JSDoc, the configuration catalog, a new Agent Note, and an upgrade guide state the per-chain bound.

* fix(agent-instructions): keep loaded order in merged frames and note the unshared chain budget

A merged frame now lists sections, omissions and truncations in the loaded order, so a reconciliation batch renders its items in one order whether or not it fits a single budget. The guard comment states only the invariant and points to the Agent Note; the intro selection states its rule. The README names the unshared budget between chains.

---------

Co-authored-by: ZiyaZhang <[email protected]>
2026-10-18 00:45:39 -07:00
Tianyi Cui f4260fc2f7 test(desktop): cover unsigned packaging failure and cleanup 2026-10-18 15:31:23 +08:00
Turtle d2552daf45 Merge pull request #6152 from deepseek-harness/turtle/code-link-highlight-239ff7746b50
feat(client): fade the navigated line's highlight in document previews
2026-10-18 15:19:32 +08:00
imccyu 11bc10f621 test(web): refresh steering snapshots for the running status position
The running status now renders after the transcript rows and before the
steering echoes that are still waiting, so the mid-steer accessibility
snapshots list the status ahead of the interjection echo. Refreshed with
DSH_SNAPSHOT=refresh on the steering scenarios; no other golden changed.
2026-10-18 15:14:16 +08:00
imccyu 39323bbc5f fix(ui-chat): keep the steering entrance while the tail is pinned
A pinned tail zeroed both running status moves. Following scrolls absorb
output growth, so the status keeps its on-screen position for the first
output, but admitted steering still moves the status past its pending
echo below it: in a long transcript at the floor the status jumped the
height of that echo with no motion. The input-fold switch keeps zeroing
both moves; the pinned switch now repeats only the first-output slide's
structure, so the entrance after an admitted steering row keeps its
duration while the page scrolls by the added slot. Update the README and
the CSS check that the pin applies to the slide structure alone.
2026-10-18 15:14:16 +08:00
imccyu 3cea71bd94 fix(ui-chat): keep the running status moves from replaying when a switch lifts
The steering entrance and the first-output slide were selected through
`:not([data-input-fold]):not([data-chat-tail-pinned])`. Removing either
attribute added the animation name back while the structure still
matched, so a finished move replayed: scrolling away from a long running
transcript and back short of the floor, or the end of any fold batch,
faded the status in again and slid it one row. The structure alone now
names each move, wrapped in `:where()`, and the two switches only set
`animation-duration: 0s`; turning a switch off changes the duration of a
move that already finished, and turning it on completes a running one.

The tail pin now uses the test fold batches use for a tail landing:
follow intent with no unsampled reader movement, over content that
overflows the scrollport excluding fold room. A reader scroll keeps follow
intent until its 500ms sample settles while growth is not followed, so
the old pin claimed a held status there and skipped a needed move.
ChatReading recomputes the pin where follow intent and sampling settle,
the viewport recomputes it after scroll, scrollend, and each resize's own
follow scroll, reusing the scroll metrics or the resize's clean-layout
measurement, and the attribute is written only when the pin changes.

Record the decision to precompute the steering batch start in Definition
state with process-evidence and reader.previous as an Agent Note.
2026-10-18 15:14:16 +08:00
imccyu 8a3b0be658 fix(ui-chat): hold the running status still while the tail is pinned
The first-output slide set its 6px default through a selector that
outranked both variants, so a response (12px) and a new Turn's first
output after the empty process control (16px) travelled 6px and started
with a 6px or 10px jump. The default now sits on the single-class
`.running` rule, which every variant outranks.

When the transcript overflows the viewport and follows its bottom, the
follow scroll of the same resize absorbs new rows and the status keeps its
on-screen position; replaying a move there lifted the status 28-44px and
slid it back. The viewport now marks the column `data-chat-tail-pinned`
while the reader follows overflowing content, updated after each resize's
follow scroll and on scroll, and neither the steering entrance nor the
first-output slide plays under that mark. Update the README and add
viewport and CSS checks.
2026-10-18 15:14:16 +08:00
imccyu ed9a92d1a8 fix(ui-chat): slide the running status below a Step's first output
While a Step has no output yet, the running status sits directly below its
input. When the first process row, group header, or response appears, the
status now slides from that position into its slot below the row instead of
jumping. It travels the row's gap plus one font-scaled 24px row: 6px for a
process row or group header, 12px for a response, and 16px after the running
Turn's process control, which renders empty until the Turn closes. The move
reuses the steering entrance technique with the standard easing over 110ms,
runs once per input-to-output change, and is skipped under reduced motion and
during an input fold.

Group header titles take the process-row line height, so the travel matches
the inserted row in every display mode and font size. Update the README and
the CSS checks that keep the travel equal to the rows that cause it.
2026-10-18 15:14:16 +08:00
imccyu b4fcdd6e94 fix(ui-chat): keep queued steering echoes ahead of the opening submission
After a stop, steering still waiting in the next-step queue is claimed
together with the next idle submission, and the AgentLoop logs it first.
Echoes before the first transcript echo now render with that submission as
the next Turn's opening inputs above the running status, and move ahead of
the new Turn's empty process control together, so the echo order matches the
durable rows. Update the flow-tail spec and README for the echo order.
2026-10-18 15:14:15 +08:00
imccyu c538d65adb feat(ui-chat): anchor the running status to the running turn tail
Render the running status after the transcript rows and opening echoes and
before steering or Inbox echoes, so its position shows whether a waiting
steering message has been consumed. The status uses the completed Turn's
actions-row slot, its divider no longer takes layout space, and it hides once
the Turn tail is rendered.

The first steering row of each next-step claim keeps that 44px slot above it.
A state-only process-evidence Definition records each Step with durable
visible output, and the message Definition marks a claim's first human
message as a batch start when the latest earlier evidence belongs to the same
Turn. Rows claimed together stay 6px apart.
2026-10-18 15:14:15 +08:00
Tianyi Cui 091d6ed6be feat(desktop): use local branding for unsigned packages 2026-10-18 15:06:16 +08:00
Tianyi Cui 4d33f27225 Prepare metadata in public library builds 2026-10-18 14:29:23 +08:00
Tianyi Cui 1badf91762 Reuse source alias setup in metadata regression tests 2026-10-18 14:29:23 +08:00
Tianyi Cui 9b310b2b4b Generate source metadata before package compilation 2026-10-18 14:29:23 +08:00
Tianyi Cui dfa1482c75 Merge pull request #6456 from deepseek-harness/worktree/review-local-simplification
docs(review): test necessity before choosing feature ownership
2026-10-18 14:14:42 +08:00
Tianyi Cui 29a0861375 Merge pull request #6450 from deepseek-harness/worktree/headless-auto-review
feat(headless): support unattended Auto review
2026-10-18 11:59:31 +08:00
Tianyi Cui f38b890cc5 fix(auto-review): keep inherited creation prompts as facts 2026-10-18 11:44:14 +08:00
Tianyi Cui bdba350b47 test(auto-review): align Web checks with unified user authority 2026-10-18 11:44:14 +08:00
Tianyi Cui dee2989782 docs(headless): record remaining simplification proposals 2026-10-18 11:44:14 +08:00
Tianyi Cui 55fddb3424 refactor(auto-review): recognize existing user task sources 2026-10-18 11:44:14 +08:00
Tianyi Cui a8963e75a0 docs(headless): record preserved Auto policy on resume 2026-10-18 11:44:14 +08:00
Tianyi Cui e0dffac6fa fix(headless): refine Auto policy reporting and fixtures 2026-10-18 11:44:14 +08:00
Tianyi Cui 04e7e1b45d docs(headless): refresh approval dependency graph 2026-10-18 11:44:14 +08:00
Tianyi Cui 7181effc69 feat(headless): support unattended experimental Auto review 2026-10-18 11:44:14 +08:00
Tianyi Cui d6e6550caf test(auto-review): type the restore timestamp assertion 2026-10-18 11:44:13 +08:00
Tianyi Cui 928c3a872b test(auto-review): pin restore and live reload behavior 2026-10-18 11:44:13 +08:00
Tianyi Cui 4923f3cb4c fix(auto-review): preserve Auto during application shutdown 2026-10-18 11:44:13 +08:00
Tianyi Cui 6403904c3e test(headless): configure policy for the OAR Loader fixture 2026-10-18 11:43:32 +08:00
Tianyi Cui 4db9ed50f8 test(headless): assert parsed policy without config mirrors 2026-10-18 11:13:48 +08:00
Tianyi Cui 5c06a1b917 refactor(headless): read CLI permission selection directly 2026-10-18 11:13:48 +08:00
Tianyi Cui 3ca9c5e623 fix(headless): preserve explicit policy flags in custom profiles 2026-10-18 11:13:48 +08:00
Tianyi Cui 9db5b1e36a test(headless): use typed startup service without a cast 2026-10-18 11:13:48 +08:00
Tianyi Cui cec41e73e0 fix(headless): validate invocation policy across custom profiles 2026-10-18 11:13:48 +08:00
Tianyi Cui 29630d9fa6 feat(headless): support supervised worktree tasks 2026-10-18 11:13:48 +08:00
Tianyi Cui 82e5580545 test(sandbox): cover unsupported policy errors on every host 2026-10-18 11:10:00 +08:00
Tianyi Cui 86baf0c240 test(sandbox): accept bind-mount prevention of root replacement 2026-10-18 11:10:00 +08:00
Tianyi Cui dde160f092 test(sandbox): retain the session workspace regression boundary 2026-10-18 11:10:00 +08:00
Tianyi Cui 64ece4cac1 fix(sandbox): reject redirected and unsupported write grants 2026-10-18 11:10:00 +08:00