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.
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
"@deepseek-ai/dsh-host-apiproxy": "workspace:^",
|
"@deepseek-ai/dsh-host-apiproxy": "workspace:^",
|
||||||
"@deepseek-ai/dsh-llm": "workspace:^",
|
"@deepseek-ai/dsh-llm": "workspace:^",
|
||||||
"@deepseek-ai/dsh-session": "workspace:^",
|
"@deepseek-ai/dsh-session": "workspace:^",
|
||||||
|
"@deepseek-ai/dsh-session-projection": "workspace:^",
|
||||||
"immer": "^10.1.1",
|
"immer": "^10.1.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"zustand": "~4.4.7"
|
"zustand": "~4.4.7"
|
||||||
|
|||||||
@@ -8,21 +8,17 @@
|
|||||||
* (useProjection) happens in web-react.
|
* (useProjection) happens in web-react.
|
||||||
*/
|
*/
|
||||||
import type { SessionEvent } from '@deepseek-ai/dsh-session/types'
|
import type { SessionEvent } from '@deepseek-ai/dsh-session/types'
|
||||||
|
import type { SessionProjectionMap } from '@deepseek-ai/dsh-session-projection/types'
|
||||||
import type { ObservableSnapshot } from '../contract/store.ts'
|
import type { ObservableSnapshot } from '../contract/store.ts'
|
||||||
import { Notifier } from './notifier.ts'
|
import { Notifier } from './notifier.ts'
|
||||||
|
|
||||||
/**
|
// The single projection type table, typed end to end (host provider, wire
|
||||||
* The single projection type table, typed end to end (host provider, wire
|
// block, client cell, React hook) — the interface package's pure-type outlet
|
||||||
* block, client cell, React hook). Domain packages merge their keys in.
|
// (`/types`, zero imports), never the package root: the root's dsh-agent →
|
||||||
*
|
// dsh-session chain would drag the host `Context.sessions` merge into the
|
||||||
* TODO(gui): switch to `import type { SessionProjectionMap } from
|
// client program (one program must not hold both sides). No second
|
||||||
* '@deepseek-ai/dsh-session-projection'` (pure type-only edge) once the host
|
// client-side "views" table (user ruling, RFC Alternatives).
|
||||||
* interface package lands; this placeholder is structurally identical and
|
export type { SessionProjectionMap } from '@deepseek-ai/dsh-session-projection/types'
|
||||||
* exists only because the two bases are built in parallel. No second
|
|
||||||
* client-side "views" table — one map end to end (user ruling, RFC
|
|
||||||
* Alternatives).
|
|
||||||
*/
|
|
||||||
export interface SessionProjectionMap {}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Minimal validating-schema face (zod-compatible: `ZodType<T>` satisfies it
|
* Minimal validating-schema face (zod-compatible: `ZodType<T>` satisfies it
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ import { SessionsService } from '../src/client/sessions/service.ts'
|
|||||||
import { FakeApiClient, ok } from './fake-api.ts'
|
import { FakeApiClient, ok } from './fake-api.ts'
|
||||||
import { entries, plainTurn } from './event-script.ts'
|
import { entries, plainTurn } from './event-script.ts'
|
||||||
|
|
||||||
// Test-domain key merged into the (placeholder) projection map: a whole-value
|
// Test-domain key merged into the projection map (the interface package's
|
||||||
// marker list, the smallest last-wins shape.
|
// pure-type outlet): a whole-value marker list, the smallest last-wins shape.
|
||||||
declare module '../src/client/sessions/projection-cell.ts' {
|
declare module '@deepseek-ai/dsh-session-projection/types' {
|
||||||
interface SessionProjectionMap {
|
interface SessionProjectionMap {
|
||||||
'test/marks': { marks: string[] }
|
'test/marks': { marks: string[] }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,9 @@
|
|||||||
{
|
{
|
||||||
"path": "../../host/apiproxy"
|
"path": "../../host/apiproxy"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "../../session-projection/session-projection"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "../../llm/llm"
|
"path": "../../llm/llm"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user