@khorsheed/dsh-file-preview 0.1.1 → 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/CHANGELOG.md +26 -0
- package/README.en.md +20 -13
- package/README.i18n.yaml +2 -2
- package/README.md +34 -27
- package/lib/index.js +238 -86
- package/lib/typert.host.js +249 -49
- package/lib/typert.remote-client.d.ts +6 -1
- package/lib/typert.remote-client.js +83 -5
- package/lib/types/bash-writes.js +1 -1
- package/lib/types/fold.d.ts +12 -9
- package/lib/types/fold.js +26 -15
- package/lib/types/index.d.ts +51 -10
- package/lib/types/index.js +131 -68
- package/lib/types/open-external.d.ts +37 -0
- package/lib/types/open-external.js +61 -0
- package/lib/types/types.d.ts +11 -1
- package/package.json +14 -14
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/typert.remote-client.d.ts.map +0 -1
- package/lib/types/bash-writes.d.ts.map +0 -1
- package/lib/types/fold.d.ts.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/invariant.d.ts.map +0 -1
- package/lib/types/reveal.d.ts.map +0 -1
- package/lib/types/types.d.ts.map +0 -1
- package/skills/3d-artifact/SKILL.md +0 -52
package/lib/typert.host.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
|
|
2
2
|
import { z } from 'zod'
|
|
3
3
|
|
|
4
|
+
const _khorsheed_dsh_file_preview_filePreview_capabilities_result$schema = z.object({
|
|
5
|
+
'protocolVersion': z.literal(1),
|
|
6
|
+
})
|
|
4
7
|
const _khorsheed_dsh_file_preview_filePreview_list_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
5
8
|
const _khorsheed_dsh_file_preview_filePreview_list_result$schema = z.object({
|
|
6
9
|
'entries': z.array(z.object({
|
|
@@ -24,11 +27,20 @@ const _khorsheed_dsh_file_preview_filePreview_list_result$schema = z.object({
|
|
|
24
27
|
'asOfSeq': z.number().readonly(),
|
|
25
28
|
'truncated': z.boolean().readonly(),
|
|
26
29
|
})
|
|
30
|
+
const _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
31
|
+
const _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1$schema = z.string()
|
|
32
|
+
const _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2$schema = z.string()
|
|
33
|
+
const _khorsheed_dsh_file_preview_filePreview_openExternal_result$schema = z.union([z.object({
|
|
34
|
+
'opened': z.literal(true).readonly(),
|
|
35
|
+
}), z.object({
|
|
36
|
+
'opened': z.literal(false).readonly(),
|
|
37
|
+
'reason': z.union([z.literal("missing"), z.literal("unknown-app"), z.literal("unsupported-platform"), z.literal("launch-failed")]).readonly(),
|
|
38
|
+
})])
|
|
27
39
|
const _khorsheed_dsh_file_preview_filePreview_read_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
28
40
|
const _khorsheed_dsh_file_preview_filePreview_read_parameter_1$schema = z.string()
|
|
29
41
|
const _khorsheed_dsh_file_preview_filePreview_read_result$schema = z.object({
|
|
30
42
|
'path': z.string().readonly(),
|
|
31
|
-
'kind': z.union([z.literal("
|
|
43
|
+
'kind': z.union([z.literal("missing"), z.literal("error"), z.literal("text"), z.literal("image"), z.literal("binary"), z.literal("too-large")]).readonly(),
|
|
32
44
|
'content': z.string().readonly().optional(),
|
|
33
45
|
'url': z.string().readonly().optional(),
|
|
34
46
|
'truncated': z.boolean().readonly().optional(),
|
|
@@ -65,6 +77,21 @@ export const TYPERT = {
|
|
|
65
77
|
schemas: [
|
|
66
78
|
],
|
|
67
79
|
invocations: [
|
|
80
|
+
{
|
|
81
|
+
id: '@khorsheed/dsh-file-preview#filePreview/capabilities',
|
|
82
|
+
service: 'filePreview',
|
|
83
|
+
namespace: 'filePreview',
|
|
84
|
+
method: 'capabilities',
|
|
85
|
+
invocation: { kind: 'direct' },
|
|
86
|
+
parameters: [
|
|
87
|
+
],
|
|
88
|
+
result: {
|
|
89
|
+
mode: 'strict',
|
|
90
|
+
typeSymbol: '@khorsheed/dsh-file-preview#filePreview/capabilities:result',
|
|
91
|
+
schema: _khorsheed_dsh_file_preview_filePreview_capabilities_result$schema,
|
|
92
|
+
},
|
|
93
|
+
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":191,"column":3},
|
|
94
|
+
},
|
|
68
95
|
{
|
|
69
96
|
id: '@khorsheed/dsh-file-preview#filePreview/list',
|
|
70
97
|
service: 'filePreview',
|
|
@@ -93,7 +120,58 @@ export const TYPERT = {
|
|
|
93
120
|
typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewList',
|
|
94
121
|
schema: _khorsheed_dsh_file_preview_filePreview_list_result$schema,
|
|
95
122
|
},
|
|
96
|
-
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":
|
|
123
|
+
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":311,"column":9},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: '@khorsheed/dsh-file-preview#filePreview/openExternal',
|
|
127
|
+
service: 'filePreview',
|
|
128
|
+
namespace: 'filePreview',
|
|
129
|
+
method: 'openExternal',
|
|
130
|
+
invocation: { kind: 'direct' },
|
|
131
|
+
scope: {
|
|
132
|
+
context: 'agent',
|
|
133
|
+
wire: 'agentId',
|
|
134
|
+
},
|
|
135
|
+
parameters: [
|
|
136
|
+
{
|
|
137
|
+
name: 'agent',
|
|
138
|
+
wire: 'agentId',
|
|
139
|
+
source: 'lookup',
|
|
140
|
+
lookup: 'agent',
|
|
141
|
+
codec: {
|
|
142
|
+
mode: 'strict',
|
|
143
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
144
|
+
schema: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0$schema,
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: 'path',
|
|
149
|
+
wire: 'path',
|
|
150
|
+
source: 'json',
|
|
151
|
+
codec: {
|
|
152
|
+
mode: 'strict',
|
|
153
|
+
typeSymbol: '@khorsheed/dsh-file-preview#filePreview/openExternal:path',
|
|
154
|
+
schema: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1$schema,
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'app',
|
|
159
|
+
wire: 'app',
|
|
160
|
+
source: 'json',
|
|
161
|
+
codec: {
|
|
162
|
+
mode: 'strict',
|
|
163
|
+
typeSymbol: '@khorsheed/dsh-file-preview#filePreview/openExternal:app',
|
|
164
|
+
schema: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2$schema,
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
cancellation: { parameter: 'signal' },
|
|
169
|
+
result: {
|
|
170
|
+
mode: 'strict',
|
|
171
|
+
typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewOpenExternal',
|
|
172
|
+
schema: _khorsheed_dsh_file_preview_filePreview_openExternal_result$schema,
|
|
173
|
+
},
|
|
174
|
+
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":528,"column":9},
|
|
97
175
|
},
|
|
98
176
|
{
|
|
99
177
|
id: '@khorsheed/dsh-file-preview#filePreview/read',
|
|
@@ -134,7 +212,7 @@ export const TYPERT = {
|
|
|
134
212
|
typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewRead',
|
|
135
213
|
schema: _khorsheed_dsh_file_preview_filePreview_read_result$schema,
|
|
136
214
|
},
|
|
137
|
-
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":
|
|
215
|
+
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":401,"column":9},
|
|
138
216
|
},
|
|
139
217
|
{
|
|
140
218
|
id: '@khorsheed/dsh-file-preview#filePreview/reveal',
|
|
@@ -175,7 +253,7 @@ export const TYPERT = {
|
|
|
175
253
|
typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewReveal',
|
|
176
254
|
schema: _khorsheed_dsh_file_preview_filePreview_reveal_result$schema,
|
|
177
255
|
},
|
|
178
|
-
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":
|
|
256
|
+
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":478,"column":9},
|
|
179
257
|
},
|
|
180
258
|
{
|
|
181
259
|
id: '@khorsheed/dsh-file-preview#filePreview/turnFiles',
|
|
@@ -205,32 +283,39 @@ export const TYPERT = {
|
|
|
205
283
|
typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewTurnMap',
|
|
206
284
|
schema: _khorsheed_dsh_file_preview_filePreview_turnFiles_result$schema,
|
|
207
285
|
},
|
|
208
|
-
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":
|
|
286
|
+
sourceLocation: {"file":"packages/file-preview/src/index.ts","line":348,"column":9},
|
|
209
287
|
},
|
|
210
288
|
],
|
|
211
289
|
model: {
|
|
212
290
|
"services": [
|
|
213
291
|
{
|
|
214
|
-
"description": "The `filePreview` Remote service: session-scoped read-only file inspection for web surfaces. `list` is a
|
|
292
|
+
"description": "The `filePreview` Remote service: session-scoped read-only file inspection for web surfaces. `list` is a fold over the session log, then filtered to the paths that still exist on disk (resolved against the session cwd and stat-ed per call); `read` resolves the path against the session cwd and serves current text content through `ctx.fs` (or a browser URL for images), capped by config. Image bytes ride a dedicated host route so the browser loads them natively without bloating the RPC channel.",
|
|
215
293
|
"summary": "The `filePreview` Remote service: session-scoped read-only file inspection for web surfaces.",
|
|
216
294
|
"tags": [],
|
|
217
|
-
"jsDoc": "/**\n * The `filePreview` Remote service: session-scoped read-only file inspection\n * for web surfaces. `list` is a
|
|
295
|
+
"jsDoc": "/**\n * The `filePreview` Remote service: session-scoped read-only file inspection\n * for web surfaces. `list` is a fold over the session log, then filtered to the\n * paths that still exist on disk (resolved against the session cwd and stat-ed\n * per call); `read` resolves the path against the session cwd and serves current\n * text content through `ctx.fs` (or a browser URL for images), capped by\n * config. Image bytes ride a dedicated host route so the browser loads them\n * natively without bloating the RPC channel.\n */",
|
|
218
296
|
"key": "filePreview",
|
|
219
297
|
"exportName": "FilePreviewService",
|
|
220
298
|
"members": [
|
|
299
|
+
{
|
|
300
|
+
"kind": "method",
|
|
301
|
+
"name": "capabilities",
|
|
302
|
+
"signature": "@Remote('capabilities') capabilities(): { protocolVersion: 1 }",
|
|
303
|
+
"summary": "Zero-session availability handshake for browser companions.",
|
|
304
|
+
"jsDoc": "/** Zero-session availability handshake for browser companions. */"
|
|
305
|
+
},
|
|
221
306
|
{
|
|
222
307
|
"kind": "method",
|
|
223
308
|
"name": "list",
|
|
224
|
-
"signature": "@Remote('list') list(agent: Agent): FilePreviewList",
|
|
309
|
+
"signature": "@Remote('list') async list(agent: Agent): Promise<FilePreviewList>",
|
|
225
310
|
"summary": "List the files one session wrote or edited: the log fold plus any bash-written files the collector verified (the S2 seam), merged so a captured path the fold already knows keeps its log-derived entry.",
|
|
226
|
-
"jsDoc": "/**\n * List the files one session wrote or edited: the log fold plus any\n * bash-written files the collector verified (the S2 seam), merged so a\n * captured path the fold already knows keeps its log-derived entry.\n * @param agent - owning live agent; its session log is the data source.\n * @returns first-seen files capped by `maxFiles`, with the log watermark.\n */"
|
|
311
|
+
"jsDoc": "/**\n * List the files one session wrote or edited: the log fold plus any\n * bash-written files the collector verified (the S2 seam), merged so a\n * captured path the fold already knows keeps its log-derived entry. Only\n * paths that currently exist on disk are returned — a file the session\n * wrote and later deleted is history, not a product.\n * @param agent - owning live agent; its session log is the data source.\n * @returns existing first-seen files capped by `maxFiles`, with the log watermark.\n */"
|
|
227
312
|
},
|
|
228
313
|
{
|
|
229
314
|
"kind": "method",
|
|
230
315
|
"name": "turnFiles",
|
|
231
|
-
"signature": "@Remote('turnFiles') turnFiles(agent: Agent): FilePreviewTurnMap",
|
|
316
|
+
"signature": "@Remote('turnFiles') async turnFiles(agent: Agent): Promise<FilePreviewTurnMap>",
|
|
232
317
|
"summary": "Every turn's file mutations for the turn-tail card — the single source of truth the card renders (the client's old write/edit-only fold retired).",
|
|
233
|
-
"jsDoc": "/**\n * Every turn's file mutations for the turn-tail card — the single source of\n * truth the card renders (the client's old write/edit-only fold retired).\n * Built by folding the session log per turn (write/edit calls,
|
|
318
|
+
"jsDoc": "/**\n * Every turn's file mutations for the turn-tail card — the single source of\n * truth the card renders (the client's old write/edit-only fold retired).\n * Built by folding the session log per turn (write/edit calls, PTC\n * dispatches borrowing the root call's turn, and render-intent paths from\n * result diff meta) and merging the collector's bash-written captures by\n * their own turn. The fold is cached per session and invalidated by the log\n * watermark, so repeated card fetches do not refold. A path touched in two\n * turns appears in BOTH turn groups — per-turn attribution is exact. Only\n * paths that currently exist on disk are returned (a deleted temp script is\n * history, not a product); existence is probed fresh on every call, so the\n * cached fold is filtered per request rather than cached.\n * @param agent - owning live agent; its session log is the data source.\n * @returns existing per-turn file groups plus the scanned watermark.\n */"
|
|
234
319
|
},
|
|
235
320
|
{
|
|
236
321
|
"kind": "method",
|
|
@@ -245,6 +330,13 @@ export const TYPERT = {
|
|
|
245
330
|
"signature": "@Remote('reveal') async reveal(agent: Agent, path: string, signal: AbortSignal): Promise<FilePreviewReveal>",
|
|
246
331
|
"summary": "Reveal one recorded file in the host file manager — open its folder and select the file (macOS Finder, Windows Explorer, or a select-capable desktop file manager).",
|
|
247
332
|
"jsDoc": "/**\n * Reveal one recorded file in the host file manager — open its folder and\n * select the file (macOS Finder, Windows Explorer, or a select-capable\n * desktop file manager). The display path resolves against the session cwd;\n * the native reveal runs on the host. A path that does not resolve to an\n * existing target, or a platform that cannot select, answers `revealed:\n * false` and the caller opens the parent folder instead (the pre-reveal\n * \"show in folder\" behavior), so the gesture always lands somewhere visible.\n * @param agent - owning live agent; its session cwd anchors relative paths.\n * @param path - the display path recorded by the read/write/edit tool call.\n * @param signal - cooperative cancellation from the calling UI request.\n * @returns whether the file manager selected the file, or why not.\n */"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"kind": "method",
|
|
336
|
+
"name": "openExternal",
|
|
337
|
+
"signature": "@Remote('openExternal') async openExternal(agent: Agent, path: string, app: string, signal: AbortSignal): Promise<FilePreviewOpenExternal>",
|
|
338
|
+
"summary": "Open one recorded file in a specific host application (the \"open in IDE\" gesture).",
|
|
339
|
+
"jsDoc": "/**\n * Open one recorded file in a specific host application (the \"open in IDE\"\n * gesture). The official open-in-app route only accepts directories — a\n * file path 404s — so file-exact opens go through this method: macOS\n * `open -a <App> <path>` via the same native-command runner reveal uses.\n * The browser names the application by official open-in-app catalog id\n * (probed from `/open-in-app/apps`); the id → app-name map lives in\n * open-external.ts. Non-macOS hosts and unknown ids answer without\n * launching, and the client hides the gesture.\n * @param agent - owning live agent; its session cwd anchors relative paths.\n * @param path - the display path recorded by the read/write/edit tool call.\n * @param app - official open-in-app catalog id (e.g. `cursor`).\n * @param signal - cooperative cancellation from the calling UI request.\n * @returns whether the application launched, or why not.\n */"
|
|
248
340
|
}
|
|
249
341
|
],
|
|
250
342
|
"types": [
|
|
@@ -256,9 +348,13 @@ export const TYPERT = {
|
|
|
256
348
|
"name": "AgentCancelCause",
|
|
257
349
|
"declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
|
|
258
350
|
},
|
|
351
|
+
{
|
|
352
|
+
"name": "AgentMessageSource",
|
|
353
|
+
"declaration": "export interface AgentMessageSource {\n readonly kind: 'agent-message';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
|
|
354
|
+
},
|
|
259
355
|
{
|
|
260
356
|
"name": "AgentOptions",
|
|
261
|
-
"declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n maxTokens?: number;\n subagentDepth?: number;\n}"
|
|
357
|
+
"declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n subagentDepth?: number;\n}"
|
|
262
358
|
},
|
|
263
359
|
{
|
|
264
360
|
"name": "AgentStatus",
|
|
@@ -284,6 +380,10 @@ export const TYPERT = {
|
|
|
284
380
|
"name": "AssistantProvenance",
|
|
285
381
|
"declaration": "export interface AssistantProvenance {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
|
|
286
382
|
},
|
|
383
|
+
{
|
|
384
|
+
"name": "AssistantStreamRecord",
|
|
385
|
+
"declaration": "export type AssistantStreamRecord = { readonly type: 'text-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly texts: readonly string[]; } | { readonly type: 'reasoning-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly texts: readonly string[]; } | { readonly type: 'tool-call-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly id: ToolCallId; readonly name?: string; readonly args: readonly string[]; } | { readonly type: 'chunk'; readonly time: number; readonly chunk: StreamChunk; };"
|
|
386
|
+
},
|
|
287
387
|
{
|
|
288
388
|
"name": "AttachmentId",
|
|
289
389
|
"declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
|
|
@@ -293,21 +393,13 @@ export const TYPERT = {
|
|
|
293
393
|
"declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
|
|
294
394
|
},
|
|
295
395
|
{
|
|
296
|
-
"name": "
|
|
297
|
-
"declaration": "export type
|
|
396
|
+
"name": "BrandedNumber",
|
|
397
|
+
"declaration": "export type BrandedNumber<B extends string> = number & { readonly [BRAND]: B; };"
|
|
298
398
|
},
|
|
299
399
|
{
|
|
300
400
|
"name": "CancelOptions",
|
|
301
401
|
"declaration": "export interface CancelOptions {\n keepInbox?: boolean | undefined;\n}"
|
|
302
402
|
},
|
|
303
|
-
{
|
|
304
|
-
"name": "CodeDispatchEventData",
|
|
305
|
-
"declaration": "export interface CodeDispatchEventData extends CodeDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n}"
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
"name": "CodeDispatchStartEventData",
|
|
309
|
-
"declaration": "export interface CodeDispatchStartEventData {\n rootCallId: CallId;\n parentCallId: CallId;\n subCallId: CallId;\n name: string;\n arguments: unknown;\n}"
|
|
310
|
-
},
|
|
311
403
|
{
|
|
312
404
|
"name": "CommandId",
|
|
313
405
|
"declaration": "export type CommandId = Branded<'CommandId'>;"
|
|
@@ -326,7 +418,7 @@ export const TYPERT = {
|
|
|
326
418
|
},
|
|
327
419
|
{
|
|
328
420
|
"name": "ContentBlockMap",
|
|
329
|
-
"declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n 'tool-call': ToolCallBlock;\n 'tool-result': ToolResultBlock;\n}"
|
|
421
|
+
"declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n file: FileBlock;\n 'tool-call': ToolCallBlock;\n 'tool-result': ToolResultBlock;\n}"
|
|
330
422
|
},
|
|
331
423
|
{
|
|
332
424
|
"name": "ContentBlockType",
|
|
@@ -342,15 +434,19 @@ export const TYPERT = {
|
|
|
342
434
|
},
|
|
343
435
|
{
|
|
344
436
|
"name": "ContinuableSubagentDescriptorData",
|
|
345
|
-
"declaration": "export interface ContinuableSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'continuable';\n readonly label: string;\n readonly agentProvider?: string;\n readonly agentModel?: string;\n readonly persona?: string;\n readonly toolFilter?: ToolRestriction;\n}"
|
|
437
|
+
"declaration": "export interface ContinuableSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'continuable';\n readonly label: string;\n readonly agentProvider?: string;\n readonly agentModel?: string;\n readonly agentReasoningEffort?: ReasoningEffortId;\n readonly persona?: string;\n readonly toolFilter?: ToolRestriction;\n}"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"name": "EpochHeader",
|
|
441
|
+
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n}"
|
|
346
442
|
},
|
|
347
443
|
{
|
|
348
|
-
"name": "
|
|
349
|
-
"declaration": "export interface
|
|
444
|
+
"name": "FileAttachmentRef",
|
|
445
|
+
"declaration": "export interface FileAttachmentRef {\n attachmentId: AttachmentId;\n name: string;\n bytes: number;\n}"
|
|
350
446
|
},
|
|
351
447
|
{
|
|
352
|
-
"name": "
|
|
353
|
-
"declaration": "export interface
|
|
448
|
+
"name": "FileBlock",
|
|
449
|
+
"declaration": "export interface FileBlock {\n type: 'file';\n attachment: FileAttachmentRef;\n}"
|
|
354
450
|
},
|
|
355
451
|
{
|
|
356
452
|
"name": "FilePreviewDiff",
|
|
@@ -368,6 +464,10 @@ export const TYPERT = {
|
|
|
368
464
|
"name": "FilePreviewOp",
|
|
369
465
|
"declaration": "export type FilePreviewOp = 'read' | 'write' | 'edit';"
|
|
370
466
|
},
|
|
467
|
+
{
|
|
468
|
+
"name": "FilePreviewOpenExternal",
|
|
469
|
+
"declaration": "export type FilePreviewOpenExternal = { readonly opened: true; } | { readonly opened: false; readonly reason: 'missing' | 'unknown-app' | 'unsupported-platform' | 'launch-failed'; };"
|
|
470
|
+
},
|
|
371
471
|
{
|
|
372
472
|
"name": "FilePreviewRead",
|
|
373
473
|
"declaration": "export interface FilePreviewRead {\n readonly path: string;\n readonly kind: FilePreviewReadKind;\n readonly content?: string;\n readonly url?: string;\n readonly truncated?: boolean;\n readonly htmlScripted?: boolean;\n readonly size?: number;\n readonly message?: string;\n}"
|
|
@@ -414,7 +514,7 @@ export const TYPERT = {
|
|
|
414
514
|
},
|
|
415
515
|
{
|
|
416
516
|
"name": "Inbox",
|
|
417
|
-
"declaration": "export
|
|
517
|
+
"declaration": "export interface Inbox {\n readonly nextTurn: readonly UserMessage[];\n readonly nextStep: readonly UserMessage[];\n clear(): void;\n append(target: InboxTarget, message: UserMessage): void;\n prepend(target: InboxTarget, message: UserMessage): void;\n replace(messageId: MessageId, newMessage: UserMessage): boolean;\n remove(messageId: MessageId): boolean;\n splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];\n}"
|
|
418
518
|
},
|
|
419
519
|
{
|
|
420
520
|
"name": "InboxTarget",
|
|
@@ -450,7 +550,7 @@ export const TYPERT = {
|
|
|
450
550
|
},
|
|
451
551
|
{
|
|
452
552
|
"name": "MessageSourceMap",
|
|
453
|
-
"declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n plugin: { kind: 'plugin'; plugin: string; } & ContextFormed;\n model: ModelMessageSource;\n tool: ToolMessageSource;\n
|
|
553
|
+
"declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n plugin: { kind: 'plugin'; plugin: string; } & ContextFormed;\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n}"
|
|
454
554
|
},
|
|
455
555
|
{
|
|
456
556
|
"name": "ModelMessageSource",
|
|
@@ -464,6 +564,14 @@ export const TYPERT = {
|
|
|
464
564
|
"name": "ProviderRequestId",
|
|
465
565
|
"declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
|
|
466
566
|
},
|
|
567
|
+
{
|
|
568
|
+
"name": "PtcDispatchEventData",
|
|
569
|
+
"declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n}"
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
"name": "PtcDispatchStartEventData",
|
|
573
|
+
"declaration": "export interface PtcDispatchStartEventData {\n rootCallId: ToolCallId;\n parentCallId: ToolCallId;\n subCallId: ToolCallId;\n name: string;\n arguments: unknown;\n}"
|
|
574
|
+
},
|
|
467
575
|
{
|
|
468
576
|
"name": "ReasoningBlock",
|
|
469
577
|
"declaration": "export interface ReasoningBlock {\n type: 'reasoning';\n text: string;\n}"
|
|
@@ -478,11 +586,67 @@ export const TYPERT = {
|
|
|
478
586
|
},
|
|
479
587
|
{
|
|
480
588
|
"name": "RequestContext",
|
|
481
|
-
"declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n}"
|
|
589
|
+
"declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n systemPromptUpdate?: SystemPromptUpdate;\n}"
|
|
482
590
|
},
|
|
483
591
|
{
|
|
484
592
|
"name": "RequestHeaderReason",
|
|
485
|
-
"declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change';"
|
|
593
|
+
"declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
"name": "RoomCreatedEvent",
|
|
597
|
+
"declaration": "export interface RoomCreatedEvent {\n readonly version: 1;\n}"
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"name": "RoomDispatchEvent",
|
|
601
|
+
"declaration": "export interface RoomDispatchEvent {\n readonly targets: readonly string[];\n readonly text: string;\n}"
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
"name": "RoomGoalEvent",
|
|
605
|
+
"declaration": "export interface RoomGoalEvent {\n readonly text: string;\n}"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"name": "RoomJsonValue",
|
|
609
|
+
"declaration": "export type RoomJsonValue = null | boolean | number | string | RoomJsonValue[] | { [key: string]: RoomJsonValue; };"
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
"name": "RoomMemberAddedEvent",
|
|
613
|
+
"declaration": "export interface RoomMemberAddedEvent {\n readonly name: string;\n readonly kind: 'main-agent' | 'cli';\n readonly provider?: string;\n readonly instructions?: string;\n readonly invitedBy: 'human' | 'agent';\n readonly cwd?: string;\n readonly model?: string;\n readonly childSessionId?: SessionId;\n}"
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"name": "RoomMemberRemovedEvent",
|
|
617
|
+
"declaration": "export interface RoomMemberRemovedEvent {\n readonly name: string;\n}"
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
"name": "RoomMemberUpdatedEvent",
|
|
621
|
+
"declaration": "export interface RoomMemberUpdatedEvent {\n readonly name: string;\n readonly rename?: string;\n readonly instructions?: string | null;\n readonly cwd?: string | null;\n readonly model?: string | null;\n readonly childSessionId?: SessionId;\n}"
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
"name": "RoomRelayEvent",
|
|
625
|
+
"declaration": "export interface RoomRelayEvent {\n readonly id: string;\n readonly from: string;\n readonly to: string;\n readonly content: string;\n readonly provenance?: Record<string, RoomJsonValue>;\n}"
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"name": "RoomRelayResolvedEvent",
|
|
629
|
+
"declaration": "export interface RoomRelayResolvedEvent {\n readonly id: string;\n readonly state: 'confirmed' | 'dismissed' | 'sent';\n}"
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"name": "RoomRunStateEvent",
|
|
633
|
+
"declaration": "export interface RoomRunStateEvent {\n readonly member: string;\n readonly state: 'running' | 'done' | 'cancelled' | 'failed';\n readonly startedAt: number;\n readonly elapsedMs?: number;\n readonly error?: string;\n}"
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"name": "RoomSpeechEvent",
|
|
637
|
+
"declaration": "export interface RoomSpeechEvent {\n readonly member: string;\n readonly text: string;\n readonly childSessionId?: SessionId;\n readonly durationMs?: number;\n}"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"name": "RoomTaskAddedEvent",
|
|
641
|
+
"declaration": "export interface RoomTaskAddedEvent {\n readonly id: string;\n readonly member: string;\n readonly title: string;\n readonly status: 'pending' | 'in_progress';\n readonly blockedBy?: string;\n}"
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"name": "RoomTaskEditedEvent",
|
|
645
|
+
"declaration": "export interface RoomTaskEditedEvent {\n readonly id: string;\n readonly title?: string;\n readonly blockedBy?: string | null;\n}"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"name": "RoomTaskUpdatedEvent",
|
|
649
|
+
"declaration": "export interface RoomTaskUpdatedEvent {\n readonly id: string;\n readonly status: 'in_progress' | 'done' | 'cancelled' | 'failed';\n}"
|
|
486
650
|
},
|
|
487
651
|
{
|
|
488
652
|
"name": "SandboxMode",
|
|
@@ -490,15 +654,15 @@ export const TYPERT = {
|
|
|
490
654
|
},
|
|
491
655
|
{
|
|
492
656
|
"name": "Session",
|
|
493
|
-
"declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n get id(): SessionId;\n readonly firstLiveSeq:
|
|
657
|
+
"declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n get id(): SessionId;\n readonly firstLiveSeq: SessionLogOffset;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
|
|
494
658
|
},
|
|
495
659
|
{
|
|
496
660
|
"name": "SessionEvent",
|
|
497
|
-
"declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq:
|
|
661
|
+
"declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: SessionSeq; time: number; data: SessionEventMap[K]; ignorable?: true; } & (K extends SurfaceEventType ? SurfaceIntent<K> : { surfaceOp?: never; sourceEventSeqs?: never; }) }[T];"
|
|
498
662
|
},
|
|
499
663
|
{
|
|
500
664
|
"name": "SessionEventMap",
|
|
501
|
-
"declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n '
|
|
665
|
+
"declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'subagent/descriptor': SubagentDescriptorData;\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'agent-preset/selected': { agentPreset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'room/created': RoomCreatedEvent;\n 'room/member-added': RoomMemberAddedEvent;\n 'room/member-updated': RoomMemberUpdatedEvent;\n 'room/member-removed': RoomMemberRemovedEvent;\n 'room/dispatch': RoomDispatchEvent;\n 'room/speech': RoomSpeechEvent;\n 'room/run-state': RoomRunStateEvent;\n 'room/relay': RoomRelayEvent;\n 'room/relay-resolved': RoomRelayResolvedEvent;\n 'room/task-added': RoomTaskAddedEvent;\n 'room/task-updated': RoomTaskUpdatedEvent;\n 'room/task-edited': RoomTaskEditedEvent;\n 'room/goal': RoomGoalEvent;\n}"
|
|
502
666
|
},
|
|
503
667
|
{
|
|
504
668
|
"name": "SessionEventType",
|
|
@@ -506,19 +670,47 @@ export const TYPERT = {
|
|
|
506
670
|
},
|
|
507
671
|
{
|
|
508
672
|
"name": "SessionHeader",
|
|
509
|
-
"declaration": "export interface SessionHeader {\n readonly version:
|
|
673
|
+
"declaration": "export interface SessionHeader {\n readonly version: typeof SESSION_FORMAT_VERSION;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly isSeeded: boolean;\n readonly origin?: 'subagent';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n}"
|
|
510
674
|
},
|
|
511
675
|
{
|
|
512
676
|
"name": "SessionId",
|
|
513
677
|
"declaration": "export type SessionId = Branded<'SessionId'>;"
|
|
514
678
|
},
|
|
679
|
+
{
|
|
680
|
+
"name": "SessionLogOffset",
|
|
681
|
+
"declaration": "export type SessionLogOffset = BrandedNumber<'SessionLogOffset'>;"
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
"name": "SessionSeq",
|
|
685
|
+
"declaration": "export type SessionSeq = BrandedNumber<'SessionSeq'>;"
|
|
686
|
+
},
|
|
515
687
|
{
|
|
516
688
|
"name": "SessionSurface",
|
|
517
|
-
"declaration": "export interface SessionSurface {\n readonly nodes: readonly
|
|
689
|
+
"declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n}"
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"name": "SessionTitleEventData",
|
|
693
|
+
"declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
"name": "SessionTitleModelProvenance",
|
|
697
|
+
"declaration": "export interface SessionTitleModelProvenance {\n readonly provider: string;\n readonly model: string;\n}"
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
"name": "SessionTitleProviderId",
|
|
701
|
+
"declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
"name": "SessionTitleSource",
|
|
705
|
+
"declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelProvenance; } | { readonly kind: 'user'; };"
|
|
518
706
|
},
|
|
519
707
|
{
|
|
520
708
|
"name": "StreamChunk",
|
|
521
|
-
"declaration": "export type StreamChunk = { type: 'block-start'; index: number; blockType: ContentBlockType; } | { type: 'text-delta'; index: number; text: string; } | { type: 'reasoning-delta'; index: number; text: string; } | { type: 'tool-call-delta'; index: number; id:
|
|
709
|
+
"declaration": "export type StreamChunk = { type: 'block-start'; index: number; blockType: ContentBlockType; } | { type: 'text-delta'; index: number; text: string; } | { type: 'reasoning-delta'; index: number; text: string; } | { type: 'tool-call-delta'; index: number; id: ToolCallId; name?: string; argumentsDelta: string; } | { type: 'block-end'; index: number; block: ContentBlock; } | { type: 'usage'; usage: TokenUsage; } | { type: 'finish'; reason: FinishReason; replayState?: ReplayEnvelope; };"
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"name": "SubagentCatalogEvent",
|
|
713
|
+
"declaration": "export type SubagentCatalogEvent = { readonly version: 0; readonly childId: SessionId; readonly childCreatedAt: number; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; });"
|
|
522
714
|
},
|
|
523
715
|
{
|
|
524
716
|
"name": "SubagentDescriptorBase",
|
|
@@ -528,25 +720,29 @@ export const TYPERT = {
|
|
|
528
720
|
"name": "SubagentDescriptorData",
|
|
529
721
|
"declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
|
|
530
722
|
},
|
|
531
|
-
{
|
|
532
|
-
"name": "SubagentReportMessageSource",
|
|
533
|
-
"declaration": "export interface SubagentReportMessageSource {\n readonly kind: 'subagent-report';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
|
|
534
|
-
},
|
|
535
723
|
{
|
|
536
724
|
"name": "SubagentSettledMessageSource",
|
|
537
725
|
"declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
|
|
538
726
|
},
|
|
539
727
|
{
|
|
540
728
|
"name": "SurfaceEventType",
|
|
541
|
-
"declaration": "export type SurfaceEventType = 'user/message' | 'assistant/message' | 'tool/result';"
|
|
729
|
+
"declaration": "export type SurfaceEventType = 'system/message' | 'user/message' | 'assistant/message' | 'tool/result';"
|
|
542
730
|
},
|
|
543
731
|
{
|
|
544
732
|
"name": "SurfaceIntent",
|
|
545
|
-
"declaration": "export
|
|
733
|
+
"declaration": "export type SurfaceIntent<T extends SurfaceEventType = SurfaceEventType> = { surfaceOp: SurfaceOp; } & (T extends 'assistant/message' ? { sourceEventSeqs?: never; } : { sourceEventSeqs?: SessionSeq[]; });"
|
|
546
734
|
},
|
|
547
735
|
{
|
|
548
736
|
"name": "SurfaceOp",
|
|
549
|
-
"declaration": "export type SurfaceOp = 'append' | { op: 'replace';
|
|
737
|
+
"declaration": "export type SurfaceOp = 'append' | { op: 'replace'; startSeq: SessionSeq; endSeq: SessionSeq; };"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"name": "SystemMessage",
|
|
741
|
+
"declaration": "export interface SystemMessage extends Message {\n readonly role: 'system';\n readonly source: MessageSourceMap['plugin'];\n}"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"name": "SystemPromptUpdate",
|
|
745
|
+
"declaration": "export type SystemPromptUpdate = 'in-history';"
|
|
550
746
|
},
|
|
551
747
|
{
|
|
552
748
|
"name": "TextBlock",
|
|
@@ -558,15 +754,19 @@ export const TYPERT = {
|
|
|
558
754
|
},
|
|
559
755
|
{
|
|
560
756
|
"name": "TokenUsage",
|
|
561
|
-
"declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
|
|
757
|
+
"declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
|
|
562
758
|
},
|
|
563
759
|
{
|
|
564
760
|
"name": "ToolCallBlock",
|
|
565
|
-
"declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id:
|
|
761
|
+
"declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"name": "ToolCallId",
|
|
765
|
+
"declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
|
|
566
766
|
},
|
|
567
767
|
{
|
|
568
768
|
"name": "ToolMessageSource",
|
|
569
|
-
"declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId:
|
|
769
|
+
"declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
|
|
570
770
|
},
|
|
571
771
|
{
|
|
572
772
|
"name": "ToolRestriction",
|
|
@@ -574,7 +774,7 @@ export const TYPERT = {
|
|
|
574
774
|
},
|
|
575
775
|
{
|
|
576
776
|
"name": "ToolResultBlock",
|
|
577
|
-
"declaration": "export interface ToolResultBlock {\n type: 'tool-result';\n toolCallId:
|
|
777
|
+
"declaration": "export interface ToolResultBlock {\n type: 'tool-result';\n toolCallId: ToolCallId;\n content: ContentBlock[];\n isError?: boolean;\n}"
|
|
578
778
|
},
|
|
579
779
|
{
|
|
580
780
|
"name": "ToolResultMessage",
|
|
@@ -4,17 +4,21 @@ import type {
|
|
|
4
4
|
TypertRemoteContribution,
|
|
5
5
|
} from '@deepseek-ai/dsh-typert-protocol'
|
|
6
6
|
import type { SessionId } from '@deepseek-ai/dsh-session/types'
|
|
7
|
-
import type { FilePreviewList, FilePreviewRead, FilePreviewReveal, FilePreviewTurnMap } from '@khorsheed/dsh-file-preview/types'
|
|
7
|
+
import type { FilePreviewList, FilePreviewOpenExternal, FilePreviewRead, FilePreviewReveal, FilePreviewTurnMap } from '@khorsheed/dsh-file-preview/types'
|
|
8
8
|
|
|
9
9
|
declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
10
10
|
interface TypertRemoteNamespace$66696c6550726576696577 {
|
|
11
|
+
capabilities: () => Promise<RemoteResult<{ protocolVersion: 1; }>>
|
|
11
12
|
list: (agentId: SessionId) => Promise<RemoteResult<FilePreviewList>>
|
|
13
|
+
openExternal: (agentId: SessionId, path: string, app: string, signal?: AbortSignal) => Promise<RemoteResult<FilePreviewOpenExternal>>
|
|
12
14
|
read: (agentId: SessionId, path: string, signal?: AbortSignal) => Promise<RemoteResult<FilePreviewRead>>
|
|
13
15
|
reveal: (agentId: SessionId, path: string, signal?: AbortSignal) => Promise<RemoteResult<FilePreviewReveal>>
|
|
14
16
|
turnFiles: (agentId: SessionId) => Promise<RemoteResult<FilePreviewTurnMap>>
|
|
15
17
|
}
|
|
16
18
|
interface TypertRemoteMap {
|
|
19
|
+
'filePreview/capabilities': () => Promise<RemoteResult<{ protocolVersion: 1; }>>
|
|
17
20
|
'filePreview/list': (agentId: SessionId) => Promise<RemoteResult<FilePreviewList>>
|
|
21
|
+
'filePreview/openExternal': (agentId: SessionId, path: string, app: string, signal?: AbortSignal) => Promise<RemoteResult<FilePreviewOpenExternal>>
|
|
18
22
|
'filePreview/read': (agentId: SessionId, path: string, signal?: AbortSignal) => Promise<RemoteResult<FilePreviewRead>>
|
|
19
23
|
'filePreview/reveal': (agentId: SessionId, path: string, signal?: AbortSignal) => Promise<RemoteResult<FilePreviewReveal>>
|
|
20
24
|
'filePreview/turnFiles': (agentId: SessionId) => Promise<RemoteResult<FilePreviewTurnMap>>
|
|
@@ -24,6 +28,7 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
|
24
28
|
}
|
|
25
29
|
interface TypertRemoteScopeMap {
|
|
26
30
|
'agent:filePreview/list': () => Promise<RemoteResult<FilePreviewList>>
|
|
31
|
+
'agent:filePreview/openExternal': (path: string, app: string, signal?: AbortSignal) => Promise<RemoteResult<FilePreviewOpenExternal>>
|
|
27
32
|
'agent:filePreview/read': (path: string, signal?: AbortSignal) => Promise<RemoteResult<FilePreviewRead>>
|
|
28
33
|
'agent:filePreview/reveal': (path: string, signal?: AbortSignal) => Promise<RemoteResult<FilePreviewReveal>>
|
|
29
34
|
'agent:filePreview/turnFiles': () => Promise<RemoteResult<FilePreviewTurnMap>>
|