Commit Graph

3545 Commits

Author SHA1 Message Date
imccyu
c10edbbc85 docs: regenerate catalogs and graphs for the projection seam; classify its types
gen-cordis-catalog type-link rows for the ProjectionDefinition surface and
CommandExecution; a sessionProjections service-role row for gen-doc-graphs;
regenerated module graph, persistence/config/cordis catalogs and api-catalog;
packages/README rows condensed back under the word ceiling; the RFC's sketch
fences marked ignore-check on both language sides (pairing re-recorded).
2026-07-28 01:09:55 +08:00
imccyu
b1bcb428a7 fix: re-derive the turn number from the log at turn open
An out-of-band zero-step turn (durable command lifecycle on an idle log)
advances the log's turn numbering behind ReactLoopAgent's cached lastTurn,
so the next real turn reused a stale number and tripped the session
invariant (turn/start expected N, got 1) — hanging the TUI after any idle
slash command. The log is the numbering authority: take max(cached, logged)
+ 1 at open. The command-goal stub's inject helper also gains the one-shot
injection turn wrap the real agent performs, restoring turn enclosure in
its log assertions.
2026-07-28 01:09:54 +08:00
imccyu
e78edd6ae4 refactor: retire the session/title frame and the todos history rider from the wire 2026-07-27 23:07:46 +08:00
imccyu
e0577fe8c5 refactor: domain client outlet collapses to ./client (src/client.ts pure re-export) 2026-07-27 23:07:45 +08:00
imccyu
a91f908e11 refactor(gui): projection keys import the domain packages' client outlets (single source)
The consumer-side restated declare-merges retire (user ruling: one home per
projection key): TodoPanel imports the todos merge and TodoItem through
@deepseek-ai/dsh-tool-todo/client, and the manager takes the title merge
through @deepseek-ai/dsh-session-title/client — both pure-type outlets
re-exporting the domain's single-source types.ts, so no host value import or
Context merge enters the client program (type-only edges, exempt from the
plugin value-import ban). Workspace deps and tsconfig references added.
Also aligns the fixture's empty-log tail block with the host convention
(asOfSeq -1 with empty values, block always present on tail requests).
2026-07-27 23:07:45 +08:00
imccyu
dcd9789226 refactor: client-namespace projection file named client/types.ts (layout ruling) 2026-07-27 23:07:44 +08:00
imccyu
38ffb78e1c refactor: projection-key home moves to src/types.ts with /types + /client/types dual outlets 2026-07-27 23:07:44 +08:00
imccyu
75ea589976 feat: single-source projection keys via domain ./client/types pure outlets 2026-07-27 23:07:44 +08:00
imccyu
f42943a14c refactor(gui): session titles ride the generic projection pair; title-snapshot map retired
The manager's titleSnapshots Map and its session/title frame consumption
dissolve into resident per-session ProjectionValueStores (create-on-demand,
outliving instantiation — the same role the snapshot map played): a
session/projection frame lands whether or not the Session exists, list rows
read the store's 'title' key, subscribed baselines truncate phantom rows, and
session-removed drops the store. The fixture converts to the host parallel:
a projections block on the tail page (title + todos units), push frames on
unit-advancing events, and a post-subscribe projection baseline replacing the
bespoke title control frame.
2026-07-27 23:07:44 +08:00
imccyu
d9d7e523f9 refactor(gui): todos ride the generic projection pair; ConversationSnapshot evacuated
TodoDock reads useProjection('todos') (whole list or null pre-first-write;
absent renders nothing) and declare-merges the todos key through the pure-type
outlet — the identical member the tool-todo host unit owns, drift rejected by
any program holding both. The core Session's todos field, its todo/write case,
and the snapshot member retire; the client folds nothing. Session specs for
the retired client fold move to the value-store spec's seq coverage; snapshot
literals across component specs drop the field.
2026-07-27 23:07:43 +08:00
imccyu
913125294b refactor(gui): retire the client-side projection cell machinery (zero shim)
Client-side domain folding is gone (RFC final: the host is the only
computation site): ProjectionCellSpec/fromEvent, ProjectionCellSet, the
SessionsService cell roster, and the Session event-dispatch projection hooks
all delete; Session.projections becomes the generic value store (manager-owned
via SessionOptions so frames landing before instantiation and the history
baseline converge on one row set), and installWindow only seeds the store from
a carried block. The cell specs retire with the machinery — the value store's
own spec owns the seq semantics now.
2026-07-27 23:07:43 +08:00
imccyu
531eb7cf0e feat(gui): generic projection value store — host-pushed whole values, higher-seq-wins
The push-model client base (session-projection RFC final): ProjectionValueStore
holds key → {value, seq} per session, seeded by the tail page's projections
block and updated by session/projection frames under one rule — higher seq
wins on both paths (stale baseline cannot overwrite a newer frame; replayed
frames cannot regress; an omitting fresh baseline clears = capability absent);
truncate() drops phantom rows past a subscribed durable baseline. Per-key
identity-stable faces (always defined; absence is an undefined snapshot) feed
useProjection; the renderer contract's projections member becomes faceOf.
12 store specs cover both seq directions, absence, truncation, and batching.
2026-07-27 23:07:42 +08:00
imccyu
1097330df2 feat: title projection unit in dsh-session-title (key 'title', last-wins over session/title) 2026-07-27 23:07:40 +08:00
imccyu
7bf9051b94 refactor: tool-todo registers the todos unit (init/apply/view); backscan removed 2026-07-27 23:07:16 +08:00
imccyu
6f47df0913 feat: session/projection push frame; tail block reads the watermark snapshot 2026-07-27 23:07:16 +08:00
imccyu
708d3132cf feat: reshape dsh-session-projection to state-driven units with eager drive 2026-07-27 23:07:16 +08:00
imccyu
6d2e5a7cd7 feat: command.execute returns the lifecycle pairing id ({matched, commandId?})
CommandService.execute now returns a CommandExecution — the normalized
result plus the commandId minted for its command/run/command/done records —
and the wire admission value carries commandId exactly when matched, so the
issuing client can correlate its RPC acknowledgment with the flow node the
lifecycle events produce. apiproxy api/schema/handler, the connection
fixture, and the TUI/plan/goal consumers follow the new shape.
2026-07-27 23:07:13 +08:00
imccyu
2ebaa30c6d refactor: structured command/run payload {commandId, name, args, source}
The line field is deleted (pre-release, no shim): name and args are
parseCommand's own split — name plus verbatim rawInput with its separator
whitespace — so a consumer (a projection unit folding its own command
records, a rich command card) never re-parses a line. CommandNode mirrors
the split (name/args, both null on a run-less cross-window node); the
generic card rebuilds its display line as /name + args. The connection
fixture logs the same structured payload.
2026-07-27 23:06:52 +08:00
imccyu
4fcfcf32d5 test: replace tuple casts with structural lifecycle assertions in command specs
Two aggregate-typecheck errors the package-level tsc -b (rootDir=src) never
saw: the commands spec's two-tuple as-cast over the lifecycle slice
(TS2352, host aggregate) becomes a plain commandId projection, and the
fixture spec still read the deleted result member off the pure-admission
execute value (TS2339, client aggregate) — the matched bit is now asserted
as the whole response shape.
2026-07-27 23:06:52 +08:00
imccyu
4ddec0ba2f refactor: command.execute degrades to pure admission; composer notice channel retired
The wire response now carries only the matched bit — CommandExecuteResult
is deleted from the api, schema, and client mirrors (pre-release, no shim);
outcomes ride the durably logged command/run/command/done pair broadcast on
the mux stream and render as flow nodes. ui-command's runDetached→noticeFor
outcome routing is retired: admitted commands surface nothing through the
composer, while admission misses (matched:false, syntax feedback) and
transport failures keep their immediate notice. The connection fixture
mirrors the host: an admitted command appends the lifecycle pair to the
session log instead of returning result text.
2026-07-27 23:06:49 +08:00
imccyu
ba928c5517 feat(gui): generic command flow node and the conversation.chat.commandview keyed slot
The FoldAdapter folds the log-only command/run + command/done pair (paired
by commandId) into a CommandNode outside the surface fold and merges the
nodes into the flow by seq; cross-window cuts soft-fall like tool pairs (a
done-only window builds the node from the done, a run with no done renders
as still executing). ChatView renders command nodes through the new keyed
'conversation.chat.commandview' hole (key = command name) with
GenericCommandCard — a stripped-down GenericToolCard showing the command
line and outcome text — as the render-site fallback, so any slash command
renders durably with zero registration and survives refresh, other tabs,
and resume via the mux-broadcast events.
2026-07-27 23:05:21 +08:00
imccyu
4e50369eb6 feat: durable command lifecycle logging in the executor (command/run + command/done)
CommandService.execute appends the log-only pair around every resolved
handler — run before invocation, done at settlement, including thrown and
aborted handlers (kind:'error'); admission misses log nothing. commandId is
minted monotonically per instance; per-session appends serialize through a
tail queue over SessionStore.appendOutOfBand (zero-step wrap on an idle log,
direct join inside an open turn). The invariant companion now asserts the
pairing relation (unique run ids; a done requires a prior in-log run).
CommandSource is a minimal merge-extensible map (user variant only).
Dependent benches mount SessionStore; TUI/e2e snapshots re-recorded for the
executor's durable-append timing and the /status event counts.
2026-07-27 23:04:57 +08:00
imccyu
e900ebd4c6 feat: todos session-projection provider in tool-todo (knife-4 domain probe) 2026-07-27 22:58:58 +08:00
imccyu
555a6aa7cc refactor(gui): read the typed projections block off the history response
The wire type now carries projections?: SessionProjectionsBlock (host-base
landed), so the structural projectionsOf narrowing and its TODO(gui) go away —
Session reads result.value.projections directly at all three installWindow
sites. ProjectionsBaseline stays as the cell framework's structural twin
(React-free layer keeps depending on the type table only) with values typed
Partial<SessionProjectionMap>; the erased walk moves inside resetBaseline
where per-key typing is re-established by schema.parse.
2026-07-27 22:58:57 +08:00
imccyu
95a3794e68 refactor(gui): source SessionProjectionMap from the interface package's pure-type outlet
Swap the client runtime's parallel-construction placeholder for
import type from @deepseek-ai/dsh-session-projection/types — the zero-import
outlet, never the package root, whose dsh-agent → dsh-session chain would drag
the host Context.sessions merge into the client program. One type table end to
end (host provider, wire block, client cell, React hook); the spec's test key
now declare-merges the real module. Adds the workspace dep and the tsconfig
project reference.
2026-07-27 22:58:57 +08:00
imccyu
70cc77eab0 feat: pure-type /types outlet for dsh-session-projection (client-aggregate import path) 2026-07-27 22:58:57 +08:00
imccyu
65e41f1cb0 feat: projections block on the session.history tail page 2026-07-27 22:58:56 +08:00
imccyu
fa331c6399 feat: dsh-session-projection seam package (ctx.sessionProjections registry) 2026-07-27 22:58:56 +08:00
imccyu
90addbf53c feat(gui): useProjection — the fifth framework hook seat through the standard kit
React half of the session-projection client base: the renderer contract gains
an open-key projections face on SessionMaybeProvideInfo (cellOf(key), distinct
from the static hooks roster), web-react mints projectionHook (per-bundle cache;
per-cell uSES binding via the shared observableHook cache; unresolved keys read
undefined through the absent source so hook order stays constant), standardKit
delivers kit.useProjection, and the runtime merges UseProjection into
SessionStandardProps/SessionMaybeStandardProps (overloads mirror useSession).
3 jsdom specs (kit delivery + live re-render, selector over undefined, faceless
bundle = all absent); existing direct-prop-feed specs gain the one-line stub the
new required seat mandates.
2026-07-27 22:58:53 +08:00
imccyu
fbebe1757a feat(gui): client projection cells — session dispatch seam, one-watermark fold, service roster
Object layer of the session-projection RFC client base: ProjectionCellSpec/
ProjectionCell/ProjectionCellSet with the single seq-watermark rule (live and
window-replace events share one filter; baseline reset re-seeds value+watermark
unless a newer commit applied; absent key = capability absent), Session
dispatch at appendLive/installWindow (projections block read structurally,
TODO(gui) switch to the interface package), SessionsService.registerProjectionCell
roster (live scopes now + future scopes at mint; disposer sweeps every session),
and the provideInfo projections face (key-addressed bare cell sources).
15 object-layer specs: watermark no-rollback, late-baseline seq rule,
capability absence, schema-failure degrade, duplicate-key throw, resync e2e.
2026-07-27 22:56:58 +08:00
Tianyi Cui
096d2dc06a Merge branch 'master' into xtr/agent-loop-message-machine 2026-07-27 22:34:21 +08:00
imccyu
cdd4d59ea0 chore(lint): clear the semantic .tsx backlog
Hand fixes for the findings --fix cannot touch, mirroring the fixes
already applied on the fe-docs feature branch (same file, same shape)
so its eventual rebase resolves cleanly:

- restore the return the no-confusing-void-expression autofix ate in
  useAbsentSnapshot (typed S | undefined; hook call kept for hook-order
  stability, undefined returned explicitly);
- re-type DOM queries the no-unnecessary-type-assertion autofix broke:
  getByRole<HTMLButtonElement>(...) generics instead of the removed
  as-casts (the eslint program and the client tsconfig aggregate
  disagree about these casts; the generic form satisfies both);
- justified eslint-disable for the deliberate legacy paths: keyCode 229
  IME-composition detection, execCommand clipboard fallbacks, lib.dom
  clipboard optionality, and the any-typed Reflect.get/this probes in
  test fakes;
- drop the dead react/no-danger directive (eslint-plugin-react is not
  loaded, so the rule never applied) keeping its shiki rationale;
- delete the tautological 'Z' comparison and the renameTarget null
  check already implied by renameBlocked;
- css-module non-null assertions replaced by type widening
  (Button className, TAG_CLASS Record) per the established pattern;
- misc: max-len comment wraps, void generic drop in the deferred test
  helper, unused type imports, floating selectWorkspace promises voided,
  member-delimiter newlines in inline type literals.
2026-07-27 22:23:41 +08:00
imccyu
2adf44fb80 chore(lint): declare contract callbacks property-style
unbound-method flags destructuring a method-style member (method
signatures are bivariant and exempt from the this-context check).
These contract members are all plain callbacks — declare them as
property-style function types so consumers can destructure them
without a false this-binding hazard. Type-level only.
2026-07-27 22:23:10 +08:00
_Kerman
fb1dc6d117 Merge remote-tracking branch 'origin/master' into xtr/agent-loop-message-machine
# Conflicts:
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/session.i18n.yaml
#	docs/event-producer-consumer.md
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
2026-07-27 21:51:37 +08:00
imccyu
49c2e85ac7 chore(lint): apply eslint auto-fixes across the .tsx backlog
Mechanical --fix output over the newly linted .tsx files (indent,
arrow-parens, comma-dangle, member-delimiter-style, unnecessary type
assertions), plus the three generic-arrow test hooks converted to
function declarations up front: the comma-dangle fixer strips the
<T,> disambiguation comma and turns them into parse errors otherwise.
2026-07-27 21:49:40 +08:00
Tianyi Cui
605df45928 Merge remote-tracking branch 'origin/master' into feat/telemetry-otel-plugin 2026-07-27 21:32:50 +08:00
Tianyi Cui
0af16387ae fix(telemetry): rename record waterfall 2026-07-27 21:30:28 +08:00
_Kerman
ed67ad53d2 refactor(agent): return request retry action 2026-07-27 21:17:49 +08:00
Chinesezjc
207bab0c21 Merge remote-tracking branch 'origin/master' into fix/question-composer-row-shrink 2026-07-27 21:11:15 +08:00
kingwl
7d4b984037 Merge remote-tracking branch 'origin/master' into feat/telemetry-otel-plugin
Resolutions: regenerate the conflicted generated docs (cordis services
catalog, event-producer-consumer, module-graph); take master's
packages/README pair and re-insert the telemetry row on both sides;
re-record the README and session-doc translation pairs.
2026-07-27 20:26:21 +08:00
Chinesezjc
82f66f8fde Merge remote-tracking branch 'origin/master' into fix/question-composer-row-shrink 2026-07-27 20:20:16 +08:00
kingwl
bf76c52d76 fix(telemetry): reject non-positive maxExportBatchSize at plugin load
Review finding, pinned red-first: the SDK accepts
processor.maxExportBatchSize <= 0 (or fractional), but its shutdown
drain then splices empty batches without consuming the queue —
disposing telemetry hangs forever whenever records are queued. The
constructor now rejects a non-positive-integer batch size before
building the SDK processor, per the misconfiguration-fails-loud rule;
everything else in the processor block remains the SDK's verbatim
passthrough.
2026-07-27 20:11:30 +08:00
Ziya
91d85773ac Merge branch 'master' into feat/workspace-native-folder-picker 2026-07-27 08:06:44 -04:00
Tianyi Cui
08851a1a3e Merge branch 'master' into turtle1999-patch-1 2026-07-27 19:57:43 +08:00
_Kerman
c6073f07c2 Merge remote-tracking branch 'origin/master' into xtr/agent-loop-message-machine
# Conflicts:
#	docs/architecture.i18n.yaml
#	docs/architecture.md
#	docs/architecture.zh.md
#	docs/core-data-structures/core.i18n.yaml
2026-07-27 19:55:55 +08:00
kingwl
a72436105b docs(telemetry): state the crash-repair export semantics for resumed streams
Review finding: synthetic turn closers written by SessionPersistence
.load() at crash-resume sit below firstLiveSeq and are never exported,
leaving the remote turn unbalanced. Kept deliberately — exporting a
synthetic closer cannot complete a turn whose real tail records died
in the crashed process's queue; it can only make an incomplete turn
look closed. The OTel README now states the receiver rule (a
never-closed turn on a resumed stream marks the previous process dying
inside it; a later clean shutdown marker attests only to the resumed
process's exit), and the revival Agent Note records why the repair
suffix stays local.
2026-07-27 19:49:19 +08:00
Chinesezjc
0701245007 Merge remote-tracking branch 'origin/master' into fix/pty-raw-ready-wait 2026-07-27 19:44:10 +08:00
ZiyaZhang
a5239b0f64 test(gui): cover native workspace picker branches 2026-07-27 04:37:24 -07:00
Tianyi Cui
dd03c88083 Merge commit 'refs/codex-unblock/20260727/pr660-master' into worktree/pr660-merge-20260727
# Conflicts:
#	scripts/doc-budgets.manifest.json
2026-07-27 19:34:55 +08:00
Chinesezjc
9dd57a25c5 fix(ui-question): stop option rows absorbing the capped card's shortfall
The question composer card is capped against the viewport and scrolls its
option list. `.options` is a flex column whose children defaulted to
`flex-shrink: 1`, so a short seat shrank the rows before overflowing the
scroll container: a row collapsed to its 42px minimum while `.optionCopy`
kept the taller height its wrapped copy needs, and `align-items: center`
then painted that copy outside the row's border box — over the question
title above and the next row below. Measured 6.5px of spill at 900x440 on
the shipped client, 10px at 380px tall, with `.options` reporting
scrollHeight === clientHeight and therefore offering no scrollbar.

`.option` and `.custom` now declare `flex-shrink: 0`, so the shortfall
reaches the scroll container that already owns `overflow-y: auto` — the
behavior the cap was designed for. Only rows whose copy wraps could
reproduce this, which is why the recorded scenario now asks a question
with long option descriptions; the web e2e asserts at three squeezed seat
heights that every row's children stay inside its border box, guarded
against holding vacuously by requiring a wrapped row and a scrolling list.
2026-07-27 19:20:33 +08:00