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).
This commit is contained in:
imccyu
2026-07-27 22:32:36 +08:00
parent dcd9789226
commit a91f908e11
10 changed files with 23 additions and 17 deletions
@@ -8,18 +8,11 @@
import { useId, useState } from 'react'
import type { Context } from 'cordis'
import type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'
import type { TodoItem } from '@deepseek-ai/dsh-client-runtime/client'
// Client-side view of the todos projection key. The authoritative merge lives
// with the domain host unit (tool-todo), whose program never overlaps the
// client's, so this consumer restates the identical member through the same
// pure-type outlet (any program holding both merges rejects drift).
declare module '@deepseek-ai/dsh-session-projection/types' {
interface SessionProjectionMap {
/** The agent's current whole todo list (latest `todo/write` snapshot), or `null` before the first write. */
todos: TodoItem[] | null
}
}
// The domain's client-namespace pure-type outlet: one import edge delivers
// the `todos` projection-key merge (single source, no consumer-side restated
// declare) and the payload type. Type-only by construction — the outlet is
// free of host value imports, so no host Context merge enters this program.
import type { TodoItem } from '@deepseek-ai/dsh-tool-todo/client'
import { IconChevronDownOutline14, IconChevronUpOutline14 } from '@deepseek-ai/dsh-client-ui-primitives'
import css from './TodoPanel.module.css'