diff --git a/packages/host/apiproxy/src/api/sessions.ts b/packages/host/apiproxy/src/api/sessions.ts index 00e2511862..5579e638ee 100644 --- a/packages/host/apiproxy/src/api/sessions.ts +++ b/packages/host/apiproxy/src/api/sessions.ts @@ -6,7 +6,9 @@ import type { ContentBlock } from '@deepseek-ai/dsh-llm/types' import type { SessionEvent, SessionId, TodoItem } from '@deepseek-ai/dsh-session/types' -import type { SessionProjectionMap } from '@deepseek-ai/dsh-session-projection' +// The pure-type outlet: api/ is browser-importable, and the package root's +// cordis Context merge (via dsh-agent) must not enter client aggregates. +import type { SessionProjectionMap } from '@deepseek-ai/dsh-session-projection/types' import type { RpcId, RpcRequest, RpcResponse } from './rpc.ts' import type { ToolEventView } from './events.ts' import type { WorkspaceId } from './workspace.ts' diff --git a/packages/session-projection/session-projection/package.json b/packages/session-projection/session-projection/package.json index 8066645272..d4da79599d 100644 --- a/packages/session-projection/session-projection/package.json +++ b/packages/session-projection/session-projection/package.json @@ -15,12 +15,17 @@ "types": "./lib/types/invariant.d.ts", "default": "./lib/invariant.js" }, + "./types": { + "types": "./lib/types/types.d.ts", + "default": "./lib/types/types.js" + }, "./src/*": "./src/*", "./package.json": "./package.json" }, "files": [ "lib/index.js", "lib/invariant.js", + "lib/types/**/*.js", "lib/types/**/*.d.ts", "lib/types/**/*.d.ts.map", "src" diff --git a/packages/session-projection/session-projection/src/index.ts b/packages/session-projection/session-projection/src/index.ts index 41d2793166..47f66e98ea 100644 --- a/packages/session-projection/session-projection/src/index.ts +++ b/packages/session-projection/session-projection/src/index.ts @@ -25,13 +25,9 @@ declare module 'cordis' { } } -/** - * The single projection type table for the whole chain (host provider, wire - * block, client cell, React hook). Domain packages merge their key here via - * declaration merging; values are wire-JSON whole values. How a value is - * rendered is the slot system's business, never this layer's. - */ -export interface SessionProjectionMap {} +import type { SessionProjectionMap } from './types.ts' + +export type { SessionProjectionMap } from './types.ts' /** * One domain's host-side contribution: the current whole value of its diff --git a/packages/session-projection/session-projection/src/types.ts b/packages/session-projection/session-projection/src/types.ts new file mode 100644 index 0000000000..39f2aa24e2 --- /dev/null +++ b/packages/session-projection/session-projection/src/types.ts @@ -0,0 +1,17 @@ +/** + * Pure-type outlet of the session-projection seam: the one projection type + * table, importable from client aggregates without dragging the host-side + * cordis Context merges of the package root (dsh-agent → dsh-session). Domain + * packages may declare-merge through either the package root or this outlet — + * re-export preserves symbol identity, so both land on the same table. + * + * @module @deepseek-ai/dsh-session-projection/types + */ + +/** + * The single projection type table for the whole chain (host provider, wire + * block, client cell, React hook). Domain packages merge their key here via + * declaration merging; values are wire-JSON whole values. How a value is + * rendered is the slot system's business, never this layer's. + */ +export interface SessionProjectionMap {} diff --git a/tsconfig.base.json b/tsconfig.base.json index 46b9e07203..f2f42116be 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -41,6 +41,7 @@ "@deepseek-ai/dsh-session/invariant": ["./packages/core/session/src/invariant.ts"], "@deepseek-ai/dsh-session/types": ["./packages/core/session/src/types.ts"], "@deepseek-ai/dsh-session/surface": ["./packages/core/session/src/surface.ts"], + "@deepseek-ai/dsh-session-projection/types": ["./packages/session-projection/session-projection/src/types.ts"], "@deepseek-ai/dsh-llm/types": ["./packages/llm/llm/src/types.ts"], "@deepseek-ai/dsh-llm/brand": ["./packages/llm/llm/src/brand.ts"], "@deepseek-ai/dsh-tools/presentation": ["./packages/core/tools/src/presentation.ts"],