@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.
- package/README.md +23 -0
- package/cordis.patch.yml +3 -0
- package/lib/client.js +539 -0
- package/lib/index.js +1342 -0
- package/lib/types/dsh/src/adapter.d.ts +53 -0
- package/lib/types/dsh/src/client.d.ts +4 -0
- package/lib/types/dsh/src/creator.d.ts +14 -0
- package/lib/types/dsh/src/frame-runtime.d.ts +1046 -0
- package/lib/types/dsh/src/index.d.ts +4 -0
- package/lib/types/src/content/compiler.d.ts +30 -0
- package/lib/types/src/content/graph-validator.d.ts +55 -0
- package/lib/types/src/content/library.d.ts +3 -0
- package/lib/types/src/content/registry.d.ts +33 -0
- package/lib/types/src/content/runtime-content.d.ts +62 -0
- package/lib/types/src/content/schema.d.ts +141 -0
- package/lib/types/src/content/validator.d.ts +34 -0
- package/lib/types/src/core/limits.d.ts +14 -0
- package/lib/types/src/core/mapping.d.ts +16 -0
- package/lib/types/src/core/protocol.d.ts +104 -0
- package/lib/types/src/creator/commands.d.ts +18 -0
- package/lib/types/src/creator/mode.d.ts +9 -0
- package/lib/types/src/creator/service.d.ts +198 -0
- package/lib/types/src/runtime/content-service.d.ts +74 -0
- package/package.json +89 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import type { OfficeSpec } from "../content/schema.ts";
|
|
2
|
+
import type { ComponentLibraryView } from "../content/validator.ts";
|
|
3
|
+
import { OfficeRegistry } from "../content/registry.ts";
|
|
4
|
+
export declare const COMPONENT_CATEGORIES: readonly ["summary", "room", "npcs", "props", "activities", "appearance", "environment", "all"];
|
|
5
|
+
export type ComponentCategory = typeof COMPONENT_CATEGORIES[number];
|
|
6
|
+
export declare class CreatorService {
|
|
7
|
+
#private;
|
|
8
|
+
constructor(registry: OfficeRegistry, library: ComponentLibraryView);
|
|
9
|
+
listOffices(): Promise<import("../content/registry.ts").RegistryEntry[]>;
|
|
10
|
+
selectOffice(id: string): Promise<{
|
|
11
|
+
selected: false;
|
|
12
|
+
error: string;
|
|
13
|
+
office?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
selected: true;
|
|
16
|
+
office: OfficeSpec;
|
|
17
|
+
error?: undefined;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Capabilities the model may map a request onto. `room` describes the room of
|
|
21
|
+
* the currently selected Office only — zones, placement slots and NPC spawns —
|
|
22
|
+
* because "add a plant" or "put a water cooler in the lounge" is only reliable
|
|
23
|
+
* when the model can see what this Office actually offers. Rooms are never
|
|
24
|
+
* presented as a choice.
|
|
25
|
+
*/
|
|
26
|
+
listComponents(category?: ComponentCategory): Promise<{
|
|
27
|
+
room: {
|
|
28
|
+
name: any;
|
|
29
|
+
zones: any;
|
|
30
|
+
slots: any;
|
|
31
|
+
npcSpawns: any;
|
|
32
|
+
textSlots: any;
|
|
33
|
+
placements: {
|
|
34
|
+
orientation?: "horizontal" | "vertical" | undefined;
|
|
35
|
+
id: string;
|
|
36
|
+
component: string;
|
|
37
|
+
slot: string;
|
|
38
|
+
}[];
|
|
39
|
+
} | null;
|
|
40
|
+
styles: any[];
|
|
41
|
+
agentSkins: any[];
|
|
42
|
+
props: any[];
|
|
43
|
+
npcTemplates: any[];
|
|
44
|
+
agentProfileTemplates: any[];
|
|
45
|
+
activities: any[];
|
|
46
|
+
atmospheres: any[];
|
|
47
|
+
environments: any[];
|
|
48
|
+
} | {
|
|
49
|
+
room: {
|
|
50
|
+
name: any;
|
|
51
|
+
zones: any;
|
|
52
|
+
slots: any;
|
|
53
|
+
npcSpawns: any;
|
|
54
|
+
textSlots: any;
|
|
55
|
+
placements: {
|
|
56
|
+
orientation?: "horizontal" | "vertical" | undefined;
|
|
57
|
+
id: string;
|
|
58
|
+
component: string;
|
|
59
|
+
slot: string;
|
|
60
|
+
}[];
|
|
61
|
+
} | null;
|
|
62
|
+
npcTemplates?: undefined;
|
|
63
|
+
props?: undefined;
|
|
64
|
+
activities?: undefined;
|
|
65
|
+
styles?: undefined;
|
|
66
|
+
agentSkins?: undefined;
|
|
67
|
+
agentProfileTemplates?: undefined;
|
|
68
|
+
atmospheres?: undefined;
|
|
69
|
+
environments?: undefined;
|
|
70
|
+
office?: undefined;
|
|
71
|
+
counts?: undefined;
|
|
72
|
+
categories?: undefined;
|
|
73
|
+
} | {
|
|
74
|
+
npcTemplates: any[];
|
|
75
|
+
room?: undefined;
|
|
76
|
+
props?: undefined;
|
|
77
|
+
activities?: undefined;
|
|
78
|
+
styles?: undefined;
|
|
79
|
+
agentSkins?: undefined;
|
|
80
|
+
agentProfileTemplates?: undefined;
|
|
81
|
+
atmospheres?: undefined;
|
|
82
|
+
environments?: undefined;
|
|
83
|
+
office?: undefined;
|
|
84
|
+
counts?: undefined;
|
|
85
|
+
categories?: undefined;
|
|
86
|
+
} | {
|
|
87
|
+
room: {
|
|
88
|
+
name: any;
|
|
89
|
+
zones: any;
|
|
90
|
+
slots: any;
|
|
91
|
+
npcSpawns: any;
|
|
92
|
+
textSlots: any;
|
|
93
|
+
placements: {
|
|
94
|
+
orientation?: "horizontal" | "vertical" | undefined;
|
|
95
|
+
id: string;
|
|
96
|
+
component: string;
|
|
97
|
+
slot: string;
|
|
98
|
+
}[];
|
|
99
|
+
} | null;
|
|
100
|
+
props: any[];
|
|
101
|
+
npcTemplates?: undefined;
|
|
102
|
+
activities?: undefined;
|
|
103
|
+
styles?: undefined;
|
|
104
|
+
agentSkins?: undefined;
|
|
105
|
+
agentProfileTemplates?: undefined;
|
|
106
|
+
atmospheres?: undefined;
|
|
107
|
+
environments?: undefined;
|
|
108
|
+
office?: undefined;
|
|
109
|
+
counts?: undefined;
|
|
110
|
+
categories?: undefined;
|
|
111
|
+
} | {
|
|
112
|
+
activities: any[];
|
|
113
|
+
room?: undefined;
|
|
114
|
+
npcTemplates?: undefined;
|
|
115
|
+
props?: undefined;
|
|
116
|
+
styles?: undefined;
|
|
117
|
+
agentSkins?: undefined;
|
|
118
|
+
agentProfileTemplates?: undefined;
|
|
119
|
+
atmospheres?: undefined;
|
|
120
|
+
environments?: undefined;
|
|
121
|
+
office?: undefined;
|
|
122
|
+
counts?: undefined;
|
|
123
|
+
categories?: undefined;
|
|
124
|
+
} | {
|
|
125
|
+
styles: any[];
|
|
126
|
+
agentSkins: any[];
|
|
127
|
+
agentProfileTemplates: any[];
|
|
128
|
+
room?: undefined;
|
|
129
|
+
npcTemplates?: undefined;
|
|
130
|
+
props?: undefined;
|
|
131
|
+
activities?: undefined;
|
|
132
|
+
atmospheres?: undefined;
|
|
133
|
+
environments?: undefined;
|
|
134
|
+
office?: undefined;
|
|
135
|
+
counts?: undefined;
|
|
136
|
+
categories?: undefined;
|
|
137
|
+
} | {
|
|
138
|
+
atmospheres: any[];
|
|
139
|
+
environments: any[];
|
|
140
|
+
room?: undefined;
|
|
141
|
+
npcTemplates?: undefined;
|
|
142
|
+
props?: undefined;
|
|
143
|
+
activities?: undefined;
|
|
144
|
+
styles?: undefined;
|
|
145
|
+
agentSkins?: undefined;
|
|
146
|
+
agentProfileTemplates?: undefined;
|
|
147
|
+
office?: undefined;
|
|
148
|
+
counts?: undefined;
|
|
149
|
+
categories?: undefined;
|
|
150
|
+
} | {
|
|
151
|
+
office: {
|
|
152
|
+
id: string;
|
|
153
|
+
name: string;
|
|
154
|
+
origin: "official" | "custom";
|
|
155
|
+
agentProfile: import("../content/schema.ts").AgentProfile | null;
|
|
156
|
+
texts: Record<string, string>;
|
|
157
|
+
npcs: {
|
|
158
|
+
id: string;
|
|
159
|
+
template: string | undefined;
|
|
160
|
+
name: string | undefined;
|
|
161
|
+
title: string | undefined;
|
|
162
|
+
gender: "female" | "male" | "nonbinary" | "unspecified" | undefined;
|
|
163
|
+
spawn: string | undefined;
|
|
164
|
+
}[];
|
|
165
|
+
};
|
|
166
|
+
counts: {
|
|
167
|
+
styles: number;
|
|
168
|
+
agentSkins: number;
|
|
169
|
+
props: number;
|
|
170
|
+
npcTemplates: number;
|
|
171
|
+
activities: number;
|
|
172
|
+
atmospheres: number;
|
|
173
|
+
environments: number;
|
|
174
|
+
};
|
|
175
|
+
categories: ("npcs" | "props" | "activities" | "environment" | "appearance" | "room" | "all")[];
|
|
176
|
+
room?: undefined;
|
|
177
|
+
npcTemplates?: undefined;
|
|
178
|
+
props?: undefined;
|
|
179
|
+
activities?: undefined;
|
|
180
|
+
styles?: undefined;
|
|
181
|
+
agentSkins?: undefined;
|
|
182
|
+
agentProfileTemplates?: undefined;
|
|
183
|
+
atmospheres?: undefined;
|
|
184
|
+
environments?: undefined;
|
|
185
|
+
}>;
|
|
186
|
+
/** Validate, persist and select one customization without exposing draft state. */
|
|
187
|
+
customize(patchInput: unknown, baseOffice?: string): Promise<{
|
|
188
|
+
saved: boolean;
|
|
189
|
+
errors: import("../content/validator.ts").ValidationIssue[];
|
|
190
|
+
adjustments: import("../content/compiler.ts").CompileAdjustment[];
|
|
191
|
+
office?: undefined;
|
|
192
|
+
} | {
|
|
193
|
+
saved: boolean;
|
|
194
|
+
office: OfficeSpec;
|
|
195
|
+
errors: never[];
|
|
196
|
+
adjustments: import("../content/compiler.ts").CompileAdjustment[];
|
|
197
|
+
}>;
|
|
198
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { loadComponentLibrary } from "../content/library.ts";
|
|
2
|
+
import { OfficeRegistry } from "../content/registry.ts";
|
|
3
|
+
export declare class OfficeContentService {
|
|
4
|
+
#private;
|
|
5
|
+
readonly registry: OfficeRegistry;
|
|
6
|
+
readonly library: Awaited<ReturnType<typeof loadComponentLibrary>>;
|
|
7
|
+
private constructor();
|
|
8
|
+
static create(options?: {
|
|
9
|
+
dataRoot?: string;
|
|
10
|
+
contentRoot?: string;
|
|
11
|
+
}): Promise<OfficeContentService>;
|
|
12
|
+
list(): Promise<import("../content/registry.ts").RegistryEntry[]>;
|
|
13
|
+
select(id: string): Promise<void>;
|
|
14
|
+
resolve(id?: string): Promise<{
|
|
15
|
+
preset: Record<string, unknown>;
|
|
16
|
+
style: any;
|
|
17
|
+
layout: any;
|
|
18
|
+
agentSkin: any;
|
|
19
|
+
agentProfile: {
|
|
20
|
+
appearance: any;
|
|
21
|
+
title?: string | undefined;
|
|
22
|
+
name?: string | undefined;
|
|
23
|
+
template: any;
|
|
24
|
+
};
|
|
25
|
+
props: {
|
|
26
|
+
schemaVersion: number;
|
|
27
|
+
kind: string;
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
version: string;
|
|
31
|
+
contract: string;
|
|
32
|
+
types: {
|
|
33
|
+
[k: string]: {
|
|
34
|
+
size: any;
|
|
35
|
+
capabilities: any;
|
|
36
|
+
renderer: any;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
npcs: {
|
|
41
|
+
schemaVersion: number;
|
|
42
|
+
kind: string;
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
version: string;
|
|
46
|
+
contract: string;
|
|
47
|
+
entries: {
|
|
48
|
+
role: any;
|
|
49
|
+
id: string;
|
|
50
|
+
template?: string;
|
|
51
|
+
profile?: string;
|
|
52
|
+
name?: string;
|
|
53
|
+
title?: string;
|
|
54
|
+
gender?: import("../content/schema.ts").Gender;
|
|
55
|
+
appearance?: import("../content/schema.ts").Appearance;
|
|
56
|
+
spawn?: string;
|
|
57
|
+
shift?: import("../content/schema.ts").Shift;
|
|
58
|
+
pose?: import("../content/schema.ts").NpcPose;
|
|
59
|
+
}[];
|
|
60
|
+
};
|
|
61
|
+
lifeActivities: {
|
|
62
|
+
schemaVersion: number;
|
|
63
|
+
kind: string;
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
version: string;
|
|
67
|
+
contract: string;
|
|
68
|
+
entries: any[];
|
|
69
|
+
};
|
|
70
|
+
atmosphere: any;
|
|
71
|
+
environment: any;
|
|
72
|
+
}>;
|
|
73
|
+
subscribe(listener: (change: unknown) => void): () => import("events")<[never]>;
|
|
74
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@iniesta8888/agent-live-dsh-adapter",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Agent Live native conversation view for DeepSeek Harness",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"types": "lib/types/dsh/src/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/types/dsh/src/index.d.ts",
|
|
11
|
+
"default": "./lib/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./client": {
|
|
14
|
+
"types": "./lib/types/dsh/src/client.d.ts",
|
|
15
|
+
"default": "./lib/client.js"
|
|
16
|
+
},
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
"dsh": {
|
|
20
|
+
"bundle": {
|
|
21
|
+
"patch": "./cordis.patch.yml"
|
|
22
|
+
},
|
|
23
|
+
"client": {
|
|
24
|
+
"inject": [
|
|
25
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
26
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
27
|
+
"@deepseek-ai/dsh-client-ui-session",
|
|
28
|
+
"@deepseek-ai/dsh-client-ui-chat"
|
|
29
|
+
],
|
|
30
|
+
"platform": "web"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"cordis.patch.yml",
|
|
35
|
+
"lib/index.js",
|
|
36
|
+
"lib/client.js",
|
|
37
|
+
"lib/types/**/*.d.ts",
|
|
38
|
+
"README.md"
|
|
39
|
+
],
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "node clean.mjs && tsc --emitDeclarationOnly && node build.mjs",
|
|
42
|
+
"typecheck": "tsc --noEmit",
|
|
43
|
+
"check": "npm run typecheck && npm run build && node scripts/validate-frame.mjs && npm pack --dry-run --ignore-scripts"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
47
|
+
"@deepseek-ai/dsh-agent": "^0.1.5-rc.1",
|
|
48
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.5-rc.1",
|
|
49
|
+
"@deepseek-ai/dsh-commands": "^0.1.5-rc.1",
|
|
50
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.5-rc.1",
|
|
51
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.1.5-rc.1",
|
|
52
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.5-rc.1",
|
|
53
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.5-rc.1",
|
|
54
|
+
"@deepseek-ai/dsh-subagent": "^0.1.5-rc.1",
|
|
55
|
+
"@deepseek-ai/dsh-skill": "^0.1.5-rc.1",
|
|
56
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.5-rc.1",
|
|
57
|
+
"@deepseek-ai/dsh-session": "^0.1.5-rc.1",
|
|
58
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.5-rc.1",
|
|
59
|
+
"@deepseek-ai/dsh-tools": "^0.1.5-rc.1",
|
|
60
|
+
"react": "^18.2.0",
|
|
61
|
+
"zod": "^4.0.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
65
|
+
"@deepseek-ai/dsh-agent": "0.1.5-rc.1",
|
|
66
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.5-rc.1",
|
|
67
|
+
"@deepseek-ai/dsh-commands": "0.1.5-rc.1",
|
|
68
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.1.5-rc.1",
|
|
69
|
+
"@deepseek-ai/dsh-client-ui-chat": "0.1.5-rc.1",
|
|
70
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.5-rc.1",
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-session": "0.1.5-rc.1",
|
|
72
|
+
"@deepseek-ai/dsh-subagent": "0.1.5-rc.1",
|
|
73
|
+
"@deepseek-ai/dsh-skill": "0.1.5-rc.1",
|
|
74
|
+
"@deepseek-ai/dsh-session-projection": "0.1.5-rc.1",
|
|
75
|
+
"@deepseek-ai/dsh-session": "0.1.5-rc.1",
|
|
76
|
+
"@deepseek-ai/dsh-system-prompt": "0.1.5-rc.1",
|
|
77
|
+
"@deepseek-ai/dsh-tools": "0.1.5-rc.1",
|
|
78
|
+
"@types/react": "^18.3.0",
|
|
79
|
+
"@types/node": "^22.0.0",
|
|
80
|
+
"esbuild": "^0.25.0",
|
|
81
|
+
"react": "^18.2.0",
|
|
82
|
+
"typescript": "^5.8.0",
|
|
83
|
+
"zod": "^4.0.0"
|
|
84
|
+
},
|
|
85
|
+
"engines": {
|
|
86
|
+
"node": ">=22"
|
|
87
|
+
},
|
|
88
|
+
"license": "MIT"
|
|
89
|
+
}
|