feat: pure-type /types outlet for dsh-session-projection (client-aggregate import path)

This commit is contained in:
imccyu
2026-07-27 16:11:33 +08:00
parent 65e41f1cb0
commit 70cc77eab0
5 changed files with 29 additions and 8 deletions

View File

@@ -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'

View File

@@ -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"

View File

@@ -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

View File

@@ -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 {}

View File

@@ -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"],