@iniesta8888/agent-live-dsh-adapter 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,53 @@
1
+ import type { OfficeEvent } from "../../src/core/protocol.ts";
2
+ export interface DshMessageRecord {
3
+ key: string;
4
+ kind: "user" | "assistant" | "turn-error";
5
+ text?: string;
6
+ at: number;
7
+ tokens?: number;
8
+ }
9
+ export interface DshToolRecord {
10
+ callId: string;
11
+ name: string;
12
+ args: Record<string, unknown>;
13
+ at: number;
14
+ running: boolean;
15
+ ok?: boolean;
16
+ }
17
+ export interface DshChildRecord {
18
+ id: string;
19
+ name: string;
20
+ task?: string;
21
+ running: boolean;
22
+ }
23
+ export interface DshObservation {
24
+ sessionId: string;
25
+ running: boolean;
26
+ turns: number;
27
+ model?: string;
28
+ thinkingLevel?: string;
29
+ tokens?: number;
30
+ messages: readonly DshMessageRecord[];
31
+ tools: readonly DshToolRecord[];
32
+ children: readonly DshChildRecord[];
33
+ }
34
+ /** Stateful diff cursor over DSH's already-deduplicated public client snapshots. */
35
+ export declare class DshSnapshotAdapter {
36
+ private static readonly SEEN_LIMIT;
37
+ private readonly startedAt;
38
+ private initialized;
39
+ private previousSession;
40
+ private previousSessionView;
41
+ private previousState;
42
+ private previousTokens;
43
+ private readonly seenMessages;
44
+ private readonly seenTools;
45
+ private readonly activeTools;
46
+ private readonly visibleChildren;
47
+ constructor(now?: number);
48
+ update(input: DshObservation): OfficeEvent[];
49
+ private trimSeen;
50
+ private bootstrap;
51
+ private syncChildren;
52
+ private childView;
53
+ }
@@ -0,0 +1,4 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ export declare const inject: string[];
3
+ /** Register one session-scoped DSH conversation view; DSH retains all controls. */
4
+ export declare function apply(ctx: Context): void;
@@ -0,0 +1,14 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ export interface AgentLiveOfficeProjection {
3
+ revision: number;
4
+ content: unknown;
5
+ }
6
+ declare module "@deepseek-ai/dsh-session-projection/types" {
7
+ interface SessionProjectionStateMap {
8
+ agentLiveOffice: AgentLiveOfficeProjection | null;
9
+ }
10
+ interface SessionProjectionMap {
11
+ agentLiveOffice: AgentLiveOfficeProjection | null;
12
+ }
13
+ }
14
+ export declare function registerCreator(ctx: Context): Promise<void>;