@khorsheed/dsh-file-preview 0.4.1 → 0.4.2

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.
@@ -1,102 +1,117 @@
1
1
  /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
2
  import { z } from 'zod'
3
3
 
4
+ import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
5
+
4
6
  let _khorsheed_dsh_file_preview_filePreview_capabilities_result$schema$value
5
7
  const _khorsheed_dsh_file_preview_filePreview_capabilities_result$schema = () => (_khorsheed_dsh_file_preview_filePreview_capabilities_result$schema$value ??= z.object({
6
8
  'protocolVersion': z.literal(1),
7
9
  }))
8
10
  let _khorsheed_dsh_file_preview_filePreview_list_parameter_0$schema$value
9
- const _khorsheed_dsh_file_preview_filePreview_list_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_list_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
11
+ const _khorsheed_dsh_file_preview_filePreview_list_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_list_parameter_0$schema$value ??= z.string())
10
12
  let _khorsheed_dsh_file_preview_filePreview_list_result$schema$value
11
13
  const _khorsheed_dsh_file_preview_filePreview_list_result$schema = () => (_khorsheed_dsh_file_preview_filePreview_list_result$schema$value ??= z.object({
12
14
  'entries': z.array(z.object({
13
- 'path': z.string().readonly(),
14
- 'op': z.union([z.literal("read"), z.literal("write"), z.literal("edit")]).readonly(),
15
- 'seq': z.number().readonly(),
16
- 'turn': z.number().readonly(),
17
- 'step': z.number().readonly(),
15
+ 'path': z.string().readonly().describe('Display path exactly as the tool call recorded it (relative to the session cwd when it was).'),
16
+ 'op': z.union([z.literal("edit"), z.literal("write"), z.literal("read")]).readonly().describe('The last recorded operation.'),
17
+ 'seq': z.number().readonly().describe('Seq of the last `tool/call` event recorded for this path.'),
18
+ 'turn': z.number().readonly().describe('Turn of the last occurrence.'),
19
+ 'step': z.number().readonly().describe('Step of the last occurrence.'),
18
20
  'diffs': z.array(z.object({
19
- 'seq': z.number().readonly(),
20
- 'turn': z.number().readonly(),
21
- 'step': z.number().readonly(),
22
- 'oldText': z.union([z.literal(null), z.string()]).readonly(),
23
- 'newText': z.string().readonly(),
24
- })).readonly(),
21
+ 'seq': z.number().readonly().describe('Seq of the `tool/result` event whose meta carried this diff.'),
22
+ 'turn': z.number().readonly().describe('Turn of the change.'),
23
+ 'step': z.number().readonly().describe('Step of the change.'),
24
+ 'oldText': z.union([z.literal(null), z.string()]).readonly().describe('Prior content, or null for a new file / an overwrite.'),
25
+ 'newText': z.string().readonly().describe('Content after the change.'),
26
+ })).readonly().describe('Each write/edit change\'s diff, captured from the tool results\' presentation meta, in event order.'),
25
27
  'lastDiff': z.union([z.undefined(), z.object({
26
28
  'oldText': z.union([z.literal(null), z.string()]).readonly(),
27
29
  'newText': z.string().readonly(),
28
- })]).readonly().optional(),
29
- })).readonly(),
30
- 'asOfSeq': z.number().readonly(),
31
- 'truncated': z.boolean().readonly(),
30
+ })]).readonly().optional().describe('The last write/edit change\'s diff (the final `diffs` entry, for callers that want just the latest).'),
31
+ })).readonly().describe('Files in first-seen order, deduplicated by display path.'),
32
+ 'asOfSeq': z.number().readonly().describe('Seq of the last scanned session event (`-1` for an empty log).'),
33
+ 'truncated': z.boolean().readonly().describe('Whether the list was capped at the service\'s `maxFiles` limit.'),
32
34
  }))
33
35
  let _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0$schema$value
34
- const _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
36
+ const _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0$schema$value ??= z.string())
35
37
  let _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1$schema$value
36
38
  const _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1$schema = () => (_khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1$schema$value ??= z.string())
37
39
  let _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2$schema$value
38
40
  const _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2$schema = () => (_khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2$schema$value ??= z.string())
39
41
  let _khorsheed_dsh_file_preview_filePreview_openExternal_result$schema$value
40
42
  const _khorsheed_dsh_file_preview_filePreview_openExternal_result$schema = () => (_khorsheed_dsh_file_preview_filePreview_openExternal_result$schema$value ??= z.union([z.object({
41
- 'opened': z.literal(true).readonly(),
43
+ 'opened': z.literal(true).readonly().describe('The application launched on the file.'),
42
44
  }), z.object({
43
- 'opened': z.literal(false).readonly(),
44
- 'reason': z.union([z.literal("missing"), z.literal("unknown-app"), z.literal("unsupported-platform"), z.literal("launch-failed")]).readonly(),
45
+ 'opened': z.literal(false).readonly().describe('The file could not be opened in the named application.'),
46
+ 'reason': z.union([z.literal("missing"), z.literal("unknown-app"), z.literal("unsupported-platform"), z.literal("launch-failed")]).readonly().describe('Why: `missing` = the recorded path does not resolve to an existing target; `unknown-app` = the catalog id is not mapped; `unsupported-platform` = the host is not macOS; `launch-failed` = the native launch rejected.'),
45
47
  })]))
46
48
  let _khorsheed_dsh_file_preview_filePreview_read_parameter_0$schema$value
47
- const _khorsheed_dsh_file_preview_filePreview_read_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_read_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
49
+ const _khorsheed_dsh_file_preview_filePreview_read_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_read_parameter_0$schema$value ??= z.string())
48
50
  let _khorsheed_dsh_file_preview_filePreview_read_parameter_1$schema$value
49
51
  const _khorsheed_dsh_file_preview_filePreview_read_parameter_1$schema = () => (_khorsheed_dsh_file_preview_filePreview_read_parameter_1$schema$value ??= z.string())
50
52
  let _khorsheed_dsh_file_preview_filePreview_read_result$schema$value
51
53
  const _khorsheed_dsh_file_preview_filePreview_read_result$schema = () => (_khorsheed_dsh_file_preview_filePreview_read_result$schema$value ??= z.object({
52
- 'path': z.string().readonly(),
53
- 'kind': z.union([z.literal("missing"), z.literal("too-large"), z.literal("error"), z.literal("text"), z.literal("binary"), z.literal("image")]).readonly(),
54
- 'content': z.string().readonly().optional(),
55
- 'url': z.string().readonly().optional(),
56
- 'truncated': z.boolean().readonly().optional(),
57
- 'htmlScripted': z.boolean().readonly().optional(),
58
- 'size': z.number().readonly().optional(),
59
- 'message': z.string().readonly().optional(),
54
+ 'path': z.string().readonly().describe('The resolved display path of the read target.'),
55
+ 'kind': z.union([z.literal("text"), z.literal("image"), z.literal("error"), z.literal("missing"), z.literal("too-large"), z.literal("binary")]).readonly().describe('Outcome classification; `text`/`image` carry a renderable value, `error` carries message.'),
56
+ 'content': z.string().readonly().optional().describe('Current text content for `text` reads, capped by the service\'s `maxReadBytes` (HTML files by `htmlMaxReadBytes`).'),
57
+ 'url': z.string().readonly().optional().describe('Browser-loadable URL for `image` reads (host-served bytes, session-scoped).'),
58
+ 'truncated': z.boolean().readonly().optional().describe('Whether `content` was truncated to the byte cap.'),
59
+ 'htmlScripted': z.boolean().readonly().optional().describe('HTML files only: best-effort hint that the document contains scripts (`<script>` tags, inline event handlers, or `javascript:` URLs). A hint for default-mode selection and warning — never a trust decision; the sandbox and CSP are the real boundary. Absent for non-HTML reads and for HTML without script markers.'),
60
+ 'size': z.number().readonly().optional().describe('Byte size of the file when the backend reported one.'),
61
+ 'message': z.string().readonly().optional().describe('Human-readable failure detail for `error` reads.'),
60
62
  }))
61
63
  let _khorsheed_dsh_file_preview_filePreview_reveal_parameter_0$schema$value
62
- const _khorsheed_dsh_file_preview_filePreview_reveal_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_reveal_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
64
+ const _khorsheed_dsh_file_preview_filePreview_reveal_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_reveal_parameter_0$schema$value ??= z.string())
63
65
  let _khorsheed_dsh_file_preview_filePreview_reveal_parameter_1$schema$value
64
66
  const _khorsheed_dsh_file_preview_filePreview_reveal_parameter_1$schema = () => (_khorsheed_dsh_file_preview_filePreview_reveal_parameter_1$schema$value ??= z.string())
65
67
  let _khorsheed_dsh_file_preview_filePreview_reveal_result$schema$value
66
68
  const _khorsheed_dsh_file_preview_filePreview_reveal_result$schema = () => (_khorsheed_dsh_file_preview_filePreview_reveal_result$schema$value ??= z.union([z.object({
67
- 'revealed': z.literal(true).readonly(),
69
+ 'revealed': z.literal(true).readonly().describe('The host file manager opened the file\'s folder with the file selected.'),
68
70
  }), z.object({
69
- 'revealed': z.literal(false).readonly(),
70
- 'reason': z.union([z.literal("missing"), z.literal("select-failed")]).readonly(),
71
+ 'revealed': z.literal(false).readonly().describe('The file could not be revealed; the caller opens the parent folder instead.'),
72
+ 'reason': z.union([z.literal("missing"), z.literal("select-failed")]).readonly().describe('Why: `missing` = the recorded path does not resolve to an existing target; `select-failed` = the host could not select the file.'),
71
73
  })]))
72
74
  let _khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0$schema$value
73
- const _khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
75
+ const _khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0$schema = () => (_khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0$schema$value ??= z.string())
74
76
  let _khorsheed_dsh_file_preview_filePreview_turnFiles_result$schema$value
75
77
  const _khorsheed_dsh_file_preview_filePreview_turnFiles_result$schema = () => (_khorsheed_dsh_file_preview_filePreview_turnFiles_result$schema$value ??= z.object({
76
78
  'turns': z.array(z.object({
77
79
  'turn': z.number().readonly(),
78
80
  'files': z.array(z.object({
79
- 'path': z.string().readonly(),
80
- 'seq': z.number().readonly(),
81
+ 'path': z.string().readonly().describe('The display path (absolute for bash-captured writes; as-recorded otherwise).'),
82
+ 'seq': z.number().readonly().describe('Seq of the first mutation recorded for this path in this turn (stable ordering).'),
81
83
  'step': z.number().readonly(),
82
- 'added': z.number().readonly().optional(),
83
- 'removed': z.number().readonly().optional(),
84
+ 'added': z.number().readonly().optional().describe('Lines added across the turn\'s mutations of this path.'),
85
+ 'removed': z.number().readonly().optional().describe('Lines removed; 0 for a create; absent when an uncounted mutation (a write whose prior content was not diffable, a PTC dispatch) reported no total.'),
84
86
  })).readonly(),
85
- })).readonly(),
86
- 'asOfSeq': z.number().readonly(),
87
+ })).readonly().describe('Files mutated per turn, in event order within each turn.'),
88
+ 'asOfSeq': z.number().readonly().describe('Seq of the last scanned session event (cache invalidation watermark).'),
87
89
  }))
90
+ let _khorsheed_dsh_file_preview_filePreview_list_parameter_0_strict$schema$value
91
+ const _khorsheed_dsh_file_preview_filePreview_list_parameter_0_strict$schema = () => (_khorsheed_dsh_file_preview_filePreview_list_parameter_0_strict$schema$value ??= z.string())
92
+ let _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0_strict$schema$value
93
+ const _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0_strict$schema = () => (_khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0_strict$schema$value ??= z.string())
94
+ let _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1_strict$schema$value
95
+ const _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1_strict$schema = () => (_khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1_strict$schema$value ??= z.string())
96
+ let _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2_strict$schema$value
97
+ const _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2_strict$schema = () => (_khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2_strict$schema$value ??= z.string())
98
+ let _khorsheed_dsh_file_preview_filePreview_read_parameter_0_strict$schema$value
99
+ const _khorsheed_dsh_file_preview_filePreview_read_parameter_0_strict$schema = () => (_khorsheed_dsh_file_preview_filePreview_read_parameter_0_strict$schema$value ??= z.string())
100
+ let _khorsheed_dsh_file_preview_filePreview_read_parameter_1_strict$schema$value
101
+ const _khorsheed_dsh_file_preview_filePreview_read_parameter_1_strict$schema = () => (_khorsheed_dsh_file_preview_filePreview_read_parameter_1_strict$schema$value ??= z.string())
102
+ let _khorsheed_dsh_file_preview_filePreview_reveal_parameter_0_strict$schema$value
103
+ const _khorsheed_dsh_file_preview_filePreview_reveal_parameter_0_strict$schema = () => (_khorsheed_dsh_file_preview_filePreview_reveal_parameter_0_strict$schema$value ??= z.string())
104
+ let _khorsheed_dsh_file_preview_filePreview_reveal_parameter_1_strict$schema$value
105
+ const _khorsheed_dsh_file_preview_filePreview_reveal_parameter_1_strict$schema = () => (_khorsheed_dsh_file_preview_filePreview_reveal_parameter_1_strict$schema$value ??= z.string())
106
+ let _khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0_strict$schema$value
107
+ const _khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0_strict$schema = () => (_khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0_strict$schema$value ??= z.string())
88
108
 
89
- export const TYPERT = {
109
+ const $remote = createTypertRemoteInfo({
90
110
  package: '@khorsheed/dsh-file-preview',
91
- face: 'host',
92
- schemas: [
93
- ],
94
- invocations: [
95
- {
96
- id: '@khorsheed/dsh-file-preview#filePreview/capabilities',
111
+ methods: {
112
+ 'filePreview/capabilities': {
97
113
  service: 'filePreview',
98
- namespace: 'filePreview',
99
- method: 'capabilities',
114
+ description: 'Zero-session availability handshake for browser companions.',
100
115
  invocation: { kind: 'direct' },
101
116
  parameters: [
102
117
  ],
@@ -105,14 +120,13 @@ export const TYPERT = {
105
120
  typeSymbol: '@khorsheed/dsh-file-preview#filePreview/capabilities:result',
106
121
  create: _khorsheed_dsh_file_preview_filePreview_capabilities_result$schema,
107
122
  schema: _khorsheed_dsh_file_preview_filePreview_capabilities_result$schema(),
123
+ jsonSchema: {"type":"object","properties":{"protocolVersion":{"type":"number","const":1}},"required":["protocolVersion"],"additionalProperties":true},
108
124
  },
109
- sourceLocation: {"file":"packages/file-preview/src/index.ts","line":196,"column":3},
125
+ sourceLocation: {"file":"packages/file-preview/src/index.ts","line":135,"column":3},
110
126
  },
111
- {
112
- id: '@khorsheed/dsh-file-preview#filePreview/list',
127
+ 'filePreview/list': {
113
128
  service: 'filePreview',
114
- namespace: 'filePreview',
115
- method: 'list',
129
+ description: '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. Only paths that currently exist on disk are returned — a file the session wrote and later deleted is history, not a product.',
116
130
  invocation: { kind: 'direct' },
117
131
  scope: {
118
132
  context: 'agent',
@@ -122,6 +136,7 @@ export const TYPERT = {
122
136
  {
123
137
  name: 'agent',
124
138
  wire: 'agentId',
139
+ description: 'owning live agent; its session log is the data source.',
125
140
  source: 'lookup',
126
141
  lookup: 'agent',
127
142
  codec: {
@@ -129,6 +144,14 @@ export const TYPERT = {
129
144
  typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
130
145
  create: _khorsheed_dsh_file_preview_filePreview_list_parameter_0$schema,
131
146
  schema: _khorsheed_dsh_file_preview_filePreview_list_parameter_0$schema(),
147
+ jsonSchema: {"type":"string"},
148
+ },
149
+ strictCodec: {
150
+ mode: 'strict',
151
+ typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
152
+ create: _khorsheed_dsh_file_preview_filePreview_list_parameter_0_strict$schema,
153
+ schema: _khorsheed_dsh_file_preview_filePreview_list_parameter_0_strict$schema(),
154
+ jsonSchema: {"type":"string"},
132
155
  },
133
156
  },
134
157
  ],
@@ -137,14 +160,14 @@ export const TYPERT = {
137
160
  typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewList',
138
161
  create: _khorsheed_dsh_file_preview_filePreview_list_result$schema,
139
162
  schema: _khorsheed_dsh_file_preview_filePreview_list_result$schema(),
163
+ description: 'existing first-seen files capped by `maxFiles`, with the log watermark.',
164
+ jsonSchema: {"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Display path exactly as the tool call recorded it (relative to the session cwd when it was)."},"op":{"type":"string","enum":["edit","write","read"],"description":"The last recorded operation."},"seq":{"type":"number","description":"Seq of the last `tool/call` event recorded for this path."},"turn":{"type":"number","description":"Turn of the last occurrence."},"step":{"type":"number","description":"Step of the last occurrence."},"diffs":{"type":"array","items":{"type":"object","properties":{"seq":{"type":"number","description":"Seq of the `tool/result` event whose meta carried this diff."},"turn":{"type":"number","description":"Turn of the change."},"step":{"type":"number","description":"Step of the change."},"oldText":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"Prior content, or null for a new file / an overwrite."},"newText":{"type":"string","description":"Content after the change."}},"required":["seq","turn","step","oldText","newText"],"additionalProperties":true},"description":"Each write/edit change's diff, captured from the tool results' presentation meta, in event order."},"lastDiff":{"type":"object","properties":{"oldText":{"oneOf":[{"type":"null","const":null},{"type":"string"}]},"newText":{"type":"string"}},"required":["oldText","newText"],"additionalProperties":true,"description":"The last write/edit change's diff (the final `diffs` entry, for callers that want just the latest)."}},"required":["path","op","seq","turn","step","diffs"],"additionalProperties":true},"description":"Files in first-seen order, deduplicated by display path."},"asOfSeq":{"type":"number","description":"Seq of the last scanned session event (`-1` for an empty log)."},"truncated":{"type":"boolean","description":"Whether the list was capped at the service's `maxFiles` limit."}},"required":["entries","asOfSeq","truncated"],"additionalProperties":true},
140
165
  },
141
- sourceLocation: {"file":"packages/file-preview/src/index.ts","line":316,"column":9},
166
+ sourceLocation: {"file":"packages/file-preview/src/index.ts","line":227,"column":9},
142
167
  },
143
- {
144
- id: '@khorsheed/dsh-file-preview#filePreview/openExternal',
168
+ 'filePreview/openExternal': {
145
169
  service: 'filePreview',
146
- namespace: 'filePreview',
147
- method: 'openExternal',
170
+ description: 'Open one recorded file in a specific host application (the "open in IDE" gesture). The official open-in-app route only accepts directories — a file path 404s — so file-exact opens go through this method: macOS `open -a <App> <path>` via the same native-command runner reveal uses. The browser names the application by official open-in-app catalog id (probed from `/open-in-app/apps`); the id → app-name map lives in open-external.ts. Non-macOS hosts and unknown ids answer without launching, and the client hides the gesture.',
148
171
  invocation: { kind: 'direct' },
149
172
  scope: {
150
173
  context: 'agent',
@@ -154,6 +177,7 @@ export const TYPERT = {
154
177
  {
155
178
  name: 'agent',
156
179
  wire: 'agentId',
180
+ description: 'owning live agent; its session cwd anchors relative paths.',
157
181
  source: 'lookup',
158
182
  lookup: 'agent',
159
183
  codec: {
@@ -161,28 +185,52 @@ export const TYPERT = {
161
185
  typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
162
186
  create: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0$schema,
163
187
  schema: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0$schema(),
188
+ jsonSchema: {"type":"string"},
189
+ },
190
+ strictCodec: {
191
+ mode: 'strict',
192
+ typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
193
+ create: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0_strict$schema,
194
+ schema: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_0_strict$schema(),
195
+ jsonSchema: {"type":"string"},
164
196
  },
165
197
  },
166
198
  {
167
199
  name: 'path',
168
- wire: 'path',
200
+ description: 'the display path recorded by the read/write/edit tool call.',
169
201
  source: 'json',
170
202
  codec: {
171
203
  mode: 'strict',
172
204
  typeSymbol: '@khorsheed/dsh-file-preview#filePreview/openExternal:path',
173
205
  create: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1$schema,
174
206
  schema: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1$schema(),
207
+ jsonSchema: {"type":"string"},
208
+ },
209
+ strictCodec: {
210
+ mode: 'strict',
211
+ typeSymbol: '@khorsheed/dsh-file-preview#filePreview/openExternal:path',
212
+ create: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1_strict$schema,
213
+ schema: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_1_strict$schema(),
214
+ jsonSchema: {"type":"string"},
175
215
  },
176
216
  },
177
217
  {
178
218
  name: 'app',
179
- wire: 'app',
219
+ description: 'official open-in-app catalog id (e.g. `cursor`).',
180
220
  source: 'json',
181
221
  codec: {
182
222
  mode: 'strict',
183
223
  typeSymbol: '@khorsheed/dsh-file-preview#filePreview/openExternal:app',
184
224
  create: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2$schema,
185
225
  schema: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2$schema(),
226
+ jsonSchema: {"type":"string"},
227
+ },
228
+ strictCodec: {
229
+ mode: 'strict',
230
+ typeSymbol: '@khorsheed/dsh-file-preview#filePreview/openExternal:app',
231
+ create: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2_strict$schema,
232
+ schema: _khorsheed_dsh_file_preview_filePreview_openExternal_parameter_2_strict$schema(),
233
+ jsonSchema: {"type":"string"},
186
234
  },
187
235
  },
188
236
  ],
@@ -192,14 +240,14 @@ export const TYPERT = {
192
240
  typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewOpenExternal',
193
241
  create: _khorsheed_dsh_file_preview_filePreview_openExternal_result$schema,
194
242
  schema: _khorsheed_dsh_file_preview_filePreview_openExternal_result$schema(),
243
+ description: 'whether the application launched, or why not.',
244
+ jsonSchema: {"oneOf":[{"type":"object","properties":{"opened":{"type":"boolean","const":true,"description":"The application launched on the file."}},"required":["opened"],"additionalProperties":true},{"type":"object","properties":{"opened":{"type":"boolean","const":false,"description":"The file could not be opened in the named application."},"reason":{"type":"string","enum":["missing","unknown-app","unsupported-platform","launch-failed"],"description":"Why: `missing` = the recorded path does not resolve to an existing target; `unknown-app` = the catalog id is not mapped; `unsupported-platform` = the host is not macOS; `launch-failed` = the native launch rejected."}},"required":["opened","reason"],"additionalProperties":true}]},
195
245
  },
196
- sourceLocation: {"file":"packages/file-preview/src/index.ts","line":539,"column":9},
246
+ sourceLocation: {"file":"packages/file-preview/src/index.ts","line":369,"column":9},
197
247
  },
198
- {
199
- id: '@khorsheed/dsh-file-preview#filePreview/read',
248
+ 'filePreview/read': {
200
249
  service: 'filePreview',
201
- namespace: 'filePreview',
202
- method: 'read',
250
+ description: 'Read the current content of one recorded file, resolved against the session cwd and capped by `maxReadBytes`. The text read is a bounded byte window (`readByteRange` of cap + 1 bytes), so an oversized file costs the cap, never its full size; a known oversized stat still short-circuits to `too-large` before any bytes move.',
203
251
  invocation: { kind: 'direct' },
204
252
  scope: {
205
253
  context: 'agent',
@@ -209,6 +257,7 @@ export const TYPERT = {
209
257
  {
210
258
  name: 'agent',
211
259
  wire: 'agentId',
260
+ description: 'owning live agent; its session cwd anchors relative paths.',
212
261
  source: 'lookup',
213
262
  lookup: 'agent',
214
263
  codec: {
@@ -216,17 +265,33 @@ export const TYPERT = {
216
265
  typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
217
266
  create: _khorsheed_dsh_file_preview_filePreview_read_parameter_0$schema,
218
267
  schema: _khorsheed_dsh_file_preview_filePreview_read_parameter_0$schema(),
268
+ jsonSchema: {"type":"string"},
269
+ },
270
+ strictCodec: {
271
+ mode: 'strict',
272
+ typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
273
+ create: _khorsheed_dsh_file_preview_filePreview_read_parameter_0_strict$schema,
274
+ schema: _khorsheed_dsh_file_preview_filePreview_read_parameter_0_strict$schema(),
275
+ jsonSchema: {"type":"string"},
219
276
  },
220
277
  },
221
278
  {
222
279
  name: 'path',
223
- wire: 'path',
280
+ description: 'the display path recorded by the write/edit tool call.',
224
281
  source: 'json',
225
282
  codec: {
226
283
  mode: 'strict',
227
284
  typeSymbol: '@khorsheed/dsh-file-preview#filePreview/read:path',
228
285
  create: _khorsheed_dsh_file_preview_filePreview_read_parameter_1$schema,
229
286
  schema: _khorsheed_dsh_file_preview_filePreview_read_parameter_1$schema(),
287
+ jsonSchema: {"type":"string"},
288
+ },
289
+ strictCodec: {
290
+ mode: 'strict',
291
+ typeSymbol: '@khorsheed/dsh-file-preview#filePreview/read:path',
292
+ create: _khorsheed_dsh_file_preview_filePreview_read_parameter_1_strict$schema,
293
+ schema: _khorsheed_dsh_file_preview_filePreview_read_parameter_1_strict$schema(),
294
+ jsonSchema: {"type":"string"},
230
295
  },
231
296
  },
232
297
  ],
@@ -236,14 +301,14 @@ export const TYPERT = {
236
301
  typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewRead',
237
302
  create: _khorsheed_dsh_file_preview_filePreview_read_result$schema,
238
303
  schema: _khorsheed_dsh_file_preview_filePreview_read_result$schema(),
304
+ description: 'the classified read; `text` carries content, `image` carries a browser URL, other kinds carry the size or a human-readable reason.',
305
+ jsonSchema: {"type":"object","properties":{"path":{"type":"string","description":"The resolved display path of the read target."},"kind":{"type":"string","enum":["text","image","error","missing","too-large","binary"],"description":"Outcome classification; `text`/`image` carry a renderable value, `error` carries message."},"content":{"type":"string","description":"Current text content for `text` reads, capped by the service's `maxReadBytes` (HTML files by `htmlMaxReadBytes`)."},"url":{"type":"string","description":"Browser-loadable URL for `image` reads (host-served bytes, session-scoped)."},"truncated":{"type":"boolean","description":"Whether `content` was truncated to the byte cap."},"htmlScripted":{"type":"boolean","description":"HTML files only: best-effort hint that the document contains scripts (`<script>` tags, inline event handlers, or `javascript:` URLs). A hint for default-mode selection and warning — never a trust decision; the sandbox and CSP are the real boundary. Absent for non-HTML reads and for HTML without script markers."},"size":{"type":"number","description":"Byte size of the file when the backend reported one."},"message":{"type":"string","description":"Human-readable failure detail for `error` reads."}},"required":["path","kind"],"additionalProperties":true},
239
306
  },
240
- sourceLocation: {"file":"packages/file-preview/src/index.ts","line":409,"column":9},
307
+ sourceLocation: {"file":"packages/file-preview/src/index.ts","line":286,"column":9},
241
308
  },
242
- {
243
- id: '@khorsheed/dsh-file-preview#filePreview/reveal',
309
+ 'filePreview/reveal': {
244
310
  service: 'filePreview',
245
- namespace: 'filePreview',
246
- method: 'reveal',
311
+ description: '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). The display path resolves against the session cwd; the native reveal runs on the host. A path that does not resolve to an existing target, or a platform that cannot select, answers `revealed: false` and the caller opens the parent folder instead (the pre-reveal "show in folder" behavior), so the gesture always lands somewhere visible.',
247
312
  invocation: { kind: 'direct' },
248
313
  scope: {
249
314
  context: 'agent',
@@ -253,6 +318,7 @@ export const TYPERT = {
253
318
  {
254
319
  name: 'agent',
255
320
  wire: 'agentId',
321
+ description: 'owning live agent; its session cwd anchors relative paths.',
256
322
  source: 'lookup',
257
323
  lookup: 'agent',
258
324
  codec: {
@@ -260,17 +326,33 @@ export const TYPERT = {
260
326
  typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
261
327
  create: _khorsheed_dsh_file_preview_filePreview_reveal_parameter_0$schema,
262
328
  schema: _khorsheed_dsh_file_preview_filePreview_reveal_parameter_0$schema(),
329
+ jsonSchema: {"type":"string"},
330
+ },
331
+ strictCodec: {
332
+ mode: 'strict',
333
+ typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
334
+ create: _khorsheed_dsh_file_preview_filePreview_reveal_parameter_0_strict$schema,
335
+ schema: _khorsheed_dsh_file_preview_filePreview_reveal_parameter_0_strict$schema(),
336
+ jsonSchema: {"type":"string"},
263
337
  },
264
338
  },
265
339
  {
266
340
  name: 'path',
267
- wire: 'path',
341
+ description: 'the display path recorded by the read/write/edit tool call.',
268
342
  source: 'json',
269
343
  codec: {
270
344
  mode: 'strict',
271
345
  typeSymbol: '@khorsheed/dsh-file-preview#filePreview/reveal:path',
272
346
  create: _khorsheed_dsh_file_preview_filePreview_reveal_parameter_1$schema,
273
347
  schema: _khorsheed_dsh_file_preview_filePreview_reveal_parameter_1$schema(),
348
+ jsonSchema: {"type":"string"},
349
+ },
350
+ strictCodec: {
351
+ mode: 'strict',
352
+ typeSymbol: '@khorsheed/dsh-file-preview#filePreview/reveal:path',
353
+ create: _khorsheed_dsh_file_preview_filePreview_reveal_parameter_1_strict$schema,
354
+ schema: _khorsheed_dsh_file_preview_filePreview_reveal_parameter_1_strict$schema(),
355
+ jsonSchema: {"type":"string"},
274
356
  },
275
357
  },
276
358
  ],
@@ -280,14 +362,14 @@ export const TYPERT = {
280
362
  typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewReveal',
281
363
  create: _khorsheed_dsh_file_preview_filePreview_reveal_result$schema,
282
364
  schema: _khorsheed_dsh_file_preview_filePreview_reveal_result$schema(),
365
+ description: 'whether the file manager selected the file, or why not.',
366
+ jsonSchema: {"oneOf":[{"type":"object","properties":{"revealed":{"type":"boolean","const":true,"description":"The host file manager opened the file's folder with the file selected."}},"required":["revealed"],"additionalProperties":true},{"type":"object","properties":{"revealed":{"type":"boolean","const":false,"description":"The file could not be revealed; the caller opens the parent folder instead."},"reason":{"type":"string","enum":["missing","select-failed"],"description":"Why: `missing` = the recorded path does not resolve to an existing target; `select-failed` = the host could not select the file."}},"required":["revealed","reason"],"additionalProperties":true}]},
283
367
  },
284
- sourceLocation: {"file":"packages/file-preview/src/index.ts","line":489,"column":9},
368
+ sourceLocation: {"file":"packages/file-preview/src/index.ts","line":319,"column":9},
285
369
  },
286
- {
287
- id: '@khorsheed/dsh-file-preview#filePreview/turnFiles',
370
+ 'filePreview/turnFiles': {
288
371
  service: 'filePreview',
289
- namespace: 'filePreview',
290
- method: 'turnFiles',
372
+ description: '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). Built by folding the session log per turn (write/edit calls, PTC dispatches borrowing the root call\'s turn, and render-intent paths from result diff meta) and merging the collector\'s bash-written captures by their own turn. The fold is cached per session and invalidated by the log watermark, so repeated card fetches do not refold. A path touched in two turns appears in BOTH turn groups — per-turn attribution is exact. Only paths that currently exist on disk are returned (a deleted temp script is history, not a product); existence is probed fresh on every call, so the cached fold is filtered per request rather than cached.',
291
373
  invocation: { kind: 'direct' },
292
374
  scope: {
293
375
  context: 'agent',
@@ -297,6 +379,7 @@ export const TYPERT = {
297
379
  {
298
380
  name: 'agent',
299
381
  wire: 'agentId',
382
+ description: 'owning live agent; its session log is the data source.',
300
383
  source: 'lookup',
301
384
  lookup: 'agent',
302
385
  codec: {
@@ -304,6 +387,14 @@ export const TYPERT = {
304
387
  typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
305
388
  create: _khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0$schema,
306
389
  schema: _khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0$schema(),
390
+ jsonSchema: {"type":"string"},
391
+ },
392
+ strictCodec: {
393
+ mode: 'strict',
394
+ typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
395
+ create: _khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0_strict$schema,
396
+ schema: _khorsheed_dsh_file_preview_filePreview_turnFiles_parameter_0_strict$schema(),
397
+ jsonSchema: {"type":"string"},
307
398
  },
308
399
  },
309
400
  ],
@@ -312,10 +403,20 @@ export const TYPERT = {
312
403
  typeSymbol: '@khorsheed/dsh-file-preview/types#FilePreviewTurnMap',
313
404
  create: _khorsheed_dsh_file_preview_filePreview_turnFiles_result$schema,
314
405
  schema: _khorsheed_dsh_file_preview_filePreview_turnFiles_result$schema(),
406
+ description: 'existing per-turn file groups plus the scanned watermark.',
407
+ jsonSchema: {"type":"object","properties":{"turns":{"type":"array","items":{"type":"object","properties":{"turn":{"type":"number"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The display path (absolute for bash-captured writes; as-recorded otherwise)."},"seq":{"type":"number","description":"Seq of the first mutation recorded for this path in this turn (stable ordering)."},"step":{"type":"number"},"added":{"type":"number","description":"Lines added across the turn's mutations of this path."},"removed":{"type":"number","description":"Lines removed; 0 for a create; absent when an uncounted mutation (a write whose prior content was not diffable, a PTC dispatch) reported no total."}},"required":["path","seq","step"],"additionalProperties":true}}},"required":["turn","files"],"additionalProperties":true},"description":"Files mutated per turn, in event order within each turn."},"asOfSeq":{"type":"number","description":"Seq of the last scanned session event (cache invalidation watermark)."}},"required":["turns","asOfSeq"],"additionalProperties":true},
315
408
  },
316
- sourceLocation: {"file":"packages/file-preview/src/index.ts","line":353,"column":9},
409
+ sourceLocation: {"file":"packages/file-preview/src/index.ts","line":253,"column":9},
317
410
  },
411
+ },
412
+ }, z)
413
+
414
+ export const TYPERT = {
415
+ package: '@khorsheed/dsh-file-preview',
416
+ face: 'host',
417
+ schemas: [
318
418
  ],
419
+ get invocations() { return $remote.descriptors },
319
420
  model: {
320
421
  "services": [
321
422
  {
@@ -370,6 +471,10 @@ export const TYPERT = {
370
471
  }
371
472
  ],
372
473
  "types": [
474
+ {
475
+ "name": "AfterScheduleRecord",
476
+ "declaration": "export interface AfterScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'after';\n readonly title: string;\n readonly prompt: string;\n readonly afterSeconds: number;\n readonly scheduledAt: string;\n}"
477
+ },
373
478
  {
374
479
  "name": "Agent",
375
480
  "declaration": "export interface Agent {\n readonly id: SessionId;\n readonly options: AgentOptions;\n readonly session: Session;\n readonly inbox: Inbox;\n readonly status: AgentStatus;\n readonly ctx: Context;\n cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n whenIdle(): Promise<void>;\n runMaintenance<T>(task: (signal: AbortSignal) => Promise<T>): Promise<T>;\n send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;\n followup(message: UserMessage): void;\n steer(message: UserMessage): void;\n inject(message: UserMessage): void;\n}"
@@ -390,6 +495,10 @@ export const TYPERT = {
390
495
  "name": "AgentStatus",
391
496
  "declaration": "export type AgentStatus = 'idle' | 'running';"
392
497
  },
498
+ {
499
+ "name": "AllowedModelRoute",
500
+ "declaration": "export interface AllowedModelRoute {\n readonly provider: string;\n readonly model: string;\n}"
501
+ },
393
502
  {
394
503
  "name": "ApprovalOutcome",
395
504
  "declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
@@ -414,6 +523,10 @@ export const TYPERT = {
414
523
  "name": "AssistantStreamRecord",
415
524
  "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; };"
416
525
  },
526
+ {
527
+ "name": "AtScheduleRecord",
528
+ "declaration": "export interface AtScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'at';\n readonly title: string;\n readonly prompt: string;\n readonly scheduledAt: string;\n}"
529
+ },
417
530
  {
418
531
  "name": "AttachmentId",
419
532
  "declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
@@ -442,6 +555,14 @@ export const TYPERT = {
442
555
  "name": "CommandSourceMap",
443
556
  "declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
444
557
  },
558
+ {
559
+ "name": "CompactionCheckpointSource",
560
+ "declaration": "export type CompactionCheckpointSource = typeof COMPACT_CHECKPOINT_MARKER & { readonly compactionId: CompactionId; readonly sourceCommandId?: CommandId; };"
561
+ },
562
+ {
563
+ "name": "CompactionId",
564
+ "declaration": "export type CompactionId = Branded<'CompactionId'>;"
565
+ },
445
566
  {
446
567
  "name": "ContentBlock",
447
568
  "declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
@@ -474,6 +595,22 @@ export const TYPERT = {
474
595
  "name": "EpochHeader",
475
596
  "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n system?: never;\n}"
476
597
  },
598
+ {
599
+ "name": "EveryScheduleDispatchChange",
600
+ "declaration": "export interface EveryScheduleDispatchChange {\n readonly version: 1;\n readonly operation: 'dispatch';\n readonly id: ScheduleId;\n readonly acceptedAt: string;\n}"
601
+ },
602
+ {
603
+ "name": "EveryScheduleRecord",
604
+ "declaration": "export interface EveryScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'every';\n readonly title: string;\n readonly prompt: string;\n readonly everySeconds: number;\n readonly scheduledAt: string;\n}"
605
+ },
606
+ {
607
+ "name": "FeedbackCategory",
608
+ "declaration": "export type FeedbackCategory = 'task-result' | 'instruction-following' | 'product-interaction' | 'service-stability' | 'resource-cost' | 'security-privacy-permission' | 'other';"
609
+ },
610
+ {
611
+ "name": "FeedbackRecord",
612
+ "declaration": "export interface FeedbackRecord {\n readonly text?: string;\n readonly category?: FeedbackCategory;\n}"
613
+ },
477
614
  {
478
615
  "name": "FileAttachmentRef",
479
616
  "declaration": "export interface FileAttachmentRef {\n attachmentId: AttachmentId;\n name: string;\n bytes: number;\n}"
@@ -534,6 +671,50 @@ export const TYPERT = {
534
671
  "name": "FinishReasonMap",
535
672
  "declaration": "export interface FinishReasonMap {\n stop: { kind: 'stop'; };\n 'tool-calls': { kind: 'tool-calls'; };\n 'max-tokens': { kind: 'max-tokens'; };\n aborted: { kind: 'aborted'; failure: LlmFailure; };\n error: { kind: 'error'; failure: LlmFailure; };\n}"
536
673
  },
674
+ {
675
+ "name": "GameMessageOp",
676
+ "declaration": "export type GameMessageOp = { readonly op: 'check-failed'; readonly attempt: number; readonly cap: number; readonly failures: readonly { where: string; message: string; }[]; } | { readonly op: 'attached'; readonly items: readonly string[]; };"
677
+ },
678
+ {
679
+ "name": "GoalBlockReason",
680
+ "declaration": "export interface GoalBlockReason {\n readonly code: string;\n readonly message: string;\n}"
681
+ },
682
+ {
683
+ "name": "GoalChangeMeta",
684
+ "declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
685
+ },
686
+ {
687
+ "name": "GoalClearChangeMeta",
688
+ "declaration": "export interface GoalClearChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: 'clear';\n readonly cleared: GoalRef;\n readonly clearedAt: number;\n}"
689
+ },
690
+ {
691
+ "name": "GoalId",
692
+ "declaration": "export type GoalId = Branded<'GoalId'>;"
693
+ },
694
+ {
695
+ "name": "GoalMessageSource",
696
+ "declaration": "export interface GoalMessageSource {\n readonly kind: 'goal';\n readonly goalId: GoalId;\n readonly revision: number;\n readonly round: number;\n}"
697
+ },
698
+ {
699
+ "name": "GoalOperation",
700
+ "declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
701
+ },
702
+ {
703
+ "name": "GoalPhase",
704
+ "declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
705
+ },
706
+ {
707
+ "name": "GoalRef",
708
+ "declaration": "export interface GoalRef {\n readonly id: GoalId;\n readonly revision: number;\n}"
709
+ },
710
+ {
711
+ "name": "GoalSnapshot",
712
+ "declaration": "export interface GoalSnapshot extends GoalRef {\n readonly objective: string;\n readonly phase: GoalPhase;\n readonly blockedReason?: GoalBlockReason;\n readonly maxGoalRounds: number;\n}"
713
+ },
714
+ {
715
+ "name": "GoalSnapshotChangeMeta",
716
+ "declaration": "export interface GoalSnapshotChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: Exclude<GoalOperation, 'clear'>;\n readonly goal: GoalSnapshot;\n readonly roundsStarted: number;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
717
+ },
537
718
  {
538
719
  "name": "ImageAttachmentRef",
539
720
  "declaration": "export interface ImageAttachmentRef {\n attachmentId: AttachmentId;\n mediaType: ImageMediaType;\n bytes: number;\n width: number;\n height: number;\n name?: string;\n originalDimensions?: { width: number; height: number; };\n}"
@@ -558,6 +739,30 @@ export const TYPERT = {
558
739
  "name": "InboxTarget",
559
740
  "declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
560
741
  },
742
+ {
743
+ "name": "JobId",
744
+ "declaration": "export type JobId = Branded<'JobId'>;"
745
+ },
746
+ {
747
+ "name": "JobOutcome",
748
+ "declaration": "export interface JobOutcome {\n status: 'completed' | 'killed' | 'failed';\n detail?: string;\n result?: string;\n}"
749
+ },
750
+ {
751
+ "name": "JobRegisteredData",
752
+ "declaration": "export interface JobRegisteredData {\n readonly jobId: JobId;\n readonly owner: SessionId;\n readonly kind: string;\n readonly label: string;\n readonly startedAt: number;\n readonly toolCall?: JobToolCall;\n}"
753
+ },
754
+ {
755
+ "name": "JobSettleCause",
756
+ "declaration": "export type JobSettleCause = 'producer' | 'kill' | 'teardown';"
757
+ },
758
+ {
759
+ "name": "JobSettledData",
760
+ "declaration": "export interface JobSettledData extends JobRegisteredData {\n readonly finishedAt: number;\n readonly status: JobOutcome['status'];\n readonly cause: JobSettleCause;\n readonly producerReported: boolean;\n readonly detail?: string;\n}"
761
+ },
762
+ {
763
+ "name": "JobToolCall",
764
+ "declaration": "export interface JobToolCall {\n readonly callId: SessionEventMap['tool/call']['callId'];\n readonly rootCallId: SessionEventMap['tool/call']['callId'];\n}"
765
+ },
561
766
  {
562
767
  "name": "JsonValue",
563
768
  "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
@@ -566,18 +771,46 @@ export const TYPERT = {
566
771
  "name": "KnownCatalogMode",
567
772
  "declaration": "export type KnownCatalogMode = { readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; };"
568
773
  },
774
+ {
775
+ "name": "LegacyAfterScheduleRecord",
776
+ "declaration": "export interface LegacyAfterScheduleRecord extends Omit<AfterScheduleRecord, 'title'> {\n readonly title?: string;\n}"
777
+ },
778
+ {
779
+ "name": "LegacyAtScheduleRecord",
780
+ "declaration": "export interface LegacyAtScheduleRecord extends Omit<AtScheduleRecord, 'title'> {\n readonly title?: string;\n}"
781
+ },
782
+ {
783
+ "name": "LegacyEveryScheduleRecord",
784
+ "declaration": "export interface LegacyEveryScheduleRecord extends Omit<EveryScheduleRecord, 'title'> {\n readonly title?: string;\n}"
785
+ },
786
+ {
787
+ "name": "LegacyScheduleRecord",
788
+ "declaration": "export type LegacyScheduleRecord = LegacyAfterScheduleRecord | LegacyAtScheduleRecord | LegacyEveryScheduleRecord;"
789
+ },
569
790
  {
570
791
  "name": "LlmCallConfig",
571
- "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
792
+ "declaration": "export interface LlmCallConfig extends LlmCallControls {\n provider: string;\n model: string;\n}"
572
793
  },
573
794
  {
574
795
  "name": "LlmCallConfigAdapterDefaults",
575
796
  "declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
576
797
  },
798
+ {
799
+ "name": "LlmCallControls",
800
+ "declaration": "export interface LlmCallControls {\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
801
+ },
577
802
  {
578
803
  "name": "LlmFailure",
579
804
  "declaration": "export interface LlmFailure {\n readonly message: string;\n readonly code: string;\n readonly status?: number;\n readonly providerRetryAfterMs?: number;\n readonly requestId?: ProviderRequestId;\n readonly offloadImages?: number;\n}"
580
805
  },
806
+ {
807
+ "name": "LlmRetryEventData",
808
+ "declaration": "export type LlmRetryEventData = { retryId: RetryId; turn: number; step: number; provider: string; mode: 'normal'; policyKey: string; retry: number; maxRetries: number; delayMs: number; failure: LlmFailure; } | { retryId: RetryId; turn: number; step: number; provider: string; mode: 'always'; policyKey: string; retry: number; delayMs: number; failure: LlmFailure; };"
809
+ },
810
+ {
811
+ "name": "LlmRetryStartedEventData",
812
+ "declaration": "export interface LlmRetryStartedEventData {\n retryId: RetryId;\n turn: number;\n step: number;\n retry: number;\n}"
813
+ },
581
814
  {
582
815
  "name": "LocalAgentStreamCheckpoint",
583
816
  "declaration": "export interface LocalAgentStreamCheckpoint extends Omit<LocalAgentStreamItem, 'revision'> {\n sessionId: string;\n opening?: boolean;\n closed?: boolean;\n append: boolean;\n}"
@@ -594,6 +827,26 @@ export const TYPERT = {
594
827
  "name": "MessageBase",
595
828
  "declaration": "export interface MessageBase {\n readonly id: MessageId;\n readonly content: readonly ContentBlock[];\n readonly source: MessageSource;\n}"
596
829
  },
830
+ {
831
+ "name": "MessageFeedbackDelete",
832
+ "declaration": "export interface MessageFeedbackDelete {\n readonly sessionId: SessionId;\n readonly messageId: MessageId;\n}"
833
+ },
834
+ {
835
+ "name": "MessageFeedbackItem",
836
+ "declaration": "export interface MessageFeedbackItem {\n readonly messageId: MessageId;\n readonly rating: MessageFeedbackRating;\n readonly note?: string;\n readonly category?: FeedbackCategory;\n readonly version: MessageFeedbackVersion;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
837
+ },
838
+ {
839
+ "name": "MessageFeedbackPut",
840
+ "declaration": "export interface MessageFeedbackPut {\n readonly sessionId: SessionId;\n readonly item: MessageFeedbackItem;\n}"
841
+ },
842
+ {
843
+ "name": "MessageFeedbackRating",
844
+ "declaration": "export type MessageFeedbackRating = 'positive' | 'negative';"
845
+ },
846
+ {
847
+ "name": "MessageFeedbackVersion",
848
+ "declaration": "export type MessageFeedbackVersion = Branded<'MessageFeedbackVersion'>;"
849
+ },
597
850
  {
598
851
  "name": "MessageId",
599
852
  "declaration": "export type MessageId = Branded<'MessageId'>;"
@@ -608,7 +861,7 @@ export const TYPERT = {
608
861
  },
609
862
  {
610
863
  "name": "MessageSourceMap",
611
- "declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'system-prompt': SystemPromptMessageSource;\n 'model-selection': { kind: 'model-selection'; } & ContextFormed;\n 'user-approval': { kind: 'user-approval'; } & ContextFormed;\n 'ptc-mode': { kind: 'ptc-mode'; };\n 'tool-registry': { kind: 'tool-registry'; };\n 'skill-invocation': SkillInvocationSource;\n 'message-tools': { kind: 'message-tools'; readonly op?: MessageToolsOp; } & ContextFormed;\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n room: { kind: 'room'; } & ContextFormed;\n sidechat: { kind: 'sidechat'; } & ContextFormed;\n worktrees: { kind: 'worktrees'; } & ContextFormed;\n}"
864
+ "declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'system-prompt': SystemPromptMessageSource;\n 'model-selection': { kind: 'model-selection'; } & ContextFormed;\n 'runtime-context': { kind: 'runtime-context'; } & ContextFormed;\n 'working-directory': { kind: 'working-directory'; };\n 'user-approval': { kind: 'user-approval'; } & ContextFormed;\n 'ptc-mode': { kind: 'ptc-mode'; };\n 'tool-registry': { kind: 'tool-registry'; };\n 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; principal?: Principal; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'compact-checkpoint': CompactionCheckpointSource;\n 'cordis-host-runner': { kind: 'cordis-host-runner'; };\n 'team-message': TeamMessageSource;\n 'user-question-reply': { kind: 'user-question-reply'; callId: ToolCallId; outcome: 'answered'; };\n goal: GoalMessageSource;\n 'plan-mode': { kind: 'plan-mode'; } & ContextFormed;\n schedule: { kind: 'schedule'; } & ContextFormed;\n 'session-reference': SessionReferenceSource;\n webhook: { readonly kind: 'webhook'; readonly provider: string; readonly source: WebhookSourceId; readonly deliveryId: WebhookDeliveryId; readonly ruleId: WebhookRuleId; readonly form: 'notice'; readonly summary: string; };\n 'message-tools': { kind: 'message-tools'; readonly op?: MessageToolsOp; } & ContextFormed;\n 'dsh-game': { kind: 'dsh-game'; plugin: '@khorsheed/dsh-game'; } & ContextFormed & Partial<GameMessageOp>;\n room: { kind: 'room'; } & ContextFormed;\n sidechat: { kind: 'sidechat'; } & ContextFormed;\n worktrees: { kind: 'worktrees'; } & ContextFormed;\n}"
612
865
  },
613
866
  {
614
867
  "name": "MessageToolsOp",
@@ -618,10 +871,22 @@ export const TYPERT = {
618
871
  "name": "ModelMessageSource",
619
872
  "declaration": "export interface ModelMessageSource extends AssistantProviderMetadata {\n kind: 'model';\n}"
620
873
  },
874
+ {
875
+ "name": "ModelSelection",
876
+ "declaration": "export interface ModelSelection {\n readonly provider: string;\n readonly model: string;\n readonly reasoningEffort?: string;\n}"
877
+ },
878
+ {
879
+ "name": "OneShotScheduleDispatchChange",
880
+ "declaration": "export interface OneShotScheduleDispatchChange {\n readonly version: 1;\n readonly operation: 'dispatch';\n readonly id: ScheduleId;\n}"
881
+ },
621
882
  {
622
883
  "name": "OneShotSubagentDescriptorData",
623
884
  "declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
624
885
  },
886
+ {
887
+ "name": "OptionalSessionSeq",
888
+ "declaration": "export type OptionalSessionSeq = SessionSeq | null;"
889
+ },
625
890
  {
626
891
  "name": "PlanAttempt",
627
892
  "declaration": "export interface PlanAttempt {\n id: string;\n deliveryId: string;\n number: number;\n status: 'queued' | 'running' | 'submitted' | 'accepted' | 'rejected' | 'failed' | 'cancelled' | 'uncertain';\n createdAt: number;\n startedAt?: number;\n settledAt?: number;\n submission?: PlanEvidence;\n review?: { decision: 'accepted' | 'rework'; by: string; reason: string; references: string[]; time: number; };\n error?: string;\n retry?: { by: string; reason: string; time: number; };\n}"
@@ -638,13 +903,21 @@ export const TYPERT = {
638
903
  "name": "PlanTask",
639
904
  "declaration": "export interface PlanTask {\n id: string;\n title: string;\n stageId: string;\n parentId?: string;\n kind: 'group' | 'task';\n ownerMemberId?: string;\n instruction: string;\n criteria: string[];\n inputRefs: string[];\n artifactPaths: string[];\n dependsOn: string[];\n status: 'pending' | 'running' | 'submitted' | 'accepted' | 'failed' | 'cancelled';\n attempts: PlanAttempt[];\n}"
640
905
  },
906
+ {
907
+ "name": "Principal",
908
+ "declaration": "export type Principal = PrincipalMap[keyof PrincipalMap];"
909
+ },
910
+ {
911
+ "name": "PrincipalMap",
912
+ "declaration": "export interface PrincipalMap {\n owner: { readonly kind: 'owner'; };\n}"
913
+ },
641
914
  {
642
915
  "name": "ProviderRequestId",
643
916
  "declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
644
917
  },
645
918
  {
646
919
  "name": "PtcDispatchEventData",
647
- "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n error?: { name: string; code: string; reason?: string; };\n}"
920
+ "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n meta?: JsonValue;\n error?: { name: string; code: string; reason?: string; };\n}"
648
921
  },
649
922
  {
650
923
  "name": "PtcDispatchStartEventData",
@@ -670,6 +943,10 @@ export const TYPERT = {
670
943
  "name": "RequestHeaderReason",
671
944
  "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
672
945
  },
946
+ {
947
+ "name": "RetryId",
948
+ "declaration": "export type RetryId = Branded<'RetryId'>;"
949
+ },
673
950
  {
674
951
  "name": "RoomCoordinatorEvent",
675
952
  "declaration": "export interface RoomCoordinatorEvent {\n readonly version: 1;\n readonly memberId: string;\n readonly revision: number;\n readonly previousMemberId: string;\n readonly handoff: string;\n}"
@@ -746,6 +1023,26 @@ export const TYPERT = {
746
1023
  "name": "SandboxMode",
747
1024
  "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
748
1025
  },
1026
+ {
1027
+ "name": "ScheduleChange",
1028
+ "declaration": "export type ScheduleChange = ScheduleCreateChange | ScheduleDeleteChange | ScheduleDispatchChange;"
1029
+ },
1030
+ {
1031
+ "name": "ScheduleCreateChange",
1032
+ "declaration": "export interface ScheduleCreateChange {\n readonly version: 1;\n readonly operation: 'create';\n readonly schedule: LegacyScheduleRecord;\n}"
1033
+ },
1034
+ {
1035
+ "name": "ScheduleDeleteChange",
1036
+ "declaration": "export interface ScheduleDeleteChange {\n readonly version: 1;\n readonly operation: 'delete';\n readonly id: ScheduleId;\n}"
1037
+ },
1038
+ {
1039
+ "name": "ScheduleDispatchChange",
1040
+ "declaration": "export type ScheduleDispatchChange = OneShotScheduleDispatchChange | EveryScheduleDispatchChange;"
1041
+ },
1042
+ {
1043
+ "name": "ScheduleId",
1044
+ "declaration": "export type ScheduleId = Branded<'ScheduleId'>;"
1045
+ },
749
1046
  {
750
1047
  "name": "Session",
751
1048
  "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 readonly firstLifecycleSeq: 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 toolHistory(): ToolHistory;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
@@ -756,7 +1053,7 @@ export const TYPERT = {
756
1053
  },
757
1054
  {
758
1055
  "name": "SessionEventMap",
759
- "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 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\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; reason?: 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 'agent-preset/selected': { agentPreset: string; };\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 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'permission/preset': { preset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'local-agent/stream': LocalAgentStreamCheckpoint;\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/execution-metadata': RoomExecutionMetadataEvent;\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 'room/plan-state': RoomPlan;\n 'room/coordinator': RoomCoordinatorEvent;\n 'room/delivery-state': RoomDeliveryStateEvent;\n}"
1056
+ "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 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\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; reason?: 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 'working-directory/change': { cwd: string; };\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 'agent-preset/selected': { agentPreset: string; };\n 'job/registered': JobRegisteredData;\n 'job/settled': JobSettledData;\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 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'permission/preset': { preset: string; };\n 'subagent/descriptor': SubagentDescriptorData;\n 'subagent/catalog': SubagentCatalogEvent;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n 'feedback/record': FeedbackRecord;\n 'llm/retry': LlmRetryEventData;\n 'llm/retry-started': LlmRetryStartedEventData;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'plan/mode': { active: boolean; };\n 'schedule/change': ScheduleChange;\n 'subagent/model-selection-policy': { allowedModels: AllowedModelRoute[]; };\n 'workspace/changes': { turn: number; };\n 'local-agent/stream': LocalAgentStreamCheckpoint;\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/execution-metadata': RoomExecutionMetadataEvent;\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 'room/plan-state': RoomPlan;\n 'room/coordinator': RoomCoordinatorEvent;\n 'room/delivery-state': RoomDeliveryStateEvent;\n}"
760
1057
  },
761
1058
  {
762
1059
  "name": "SessionEventType",
@@ -774,6 +1071,14 @@ export const TYPERT = {
774
1071
  "name": "SessionLogOffset",
775
1072
  "declaration": "export type SessionLogOffset = BrandedNumber<'SessionLogOffset'>;"
776
1073
  },
1074
+ {
1075
+ "name": "SessionReferenceSource",
1076
+ "declaration": "export interface SessionReferenceSource {\n kind: 'session-reference';\n form: 'recall';\n version: 1;\n references: { sessionId: string; label: string; capturedFormatVersion?: number; capturedThroughSeq: OptionalSessionSeq; compacted: boolean; originalMessages: number; retainedMessages: number; omittedMessages: number; omittedBytes: number; truncated: boolean; inputIndex: number; }[];\n}"
1077
+ },
1078
+ {
1079
+ "name": "SessionRequestId",
1080
+ "declaration": "export type SessionRequestId = Branded<'session-request-id'>;"
1081
+ },
777
1082
  {
778
1083
  "name": "SessionSeq",
779
1084
  "declaration": "export type SessionSeq = BrandedNumber<'SessionSeq'>;"
@@ -808,7 +1113,7 @@ export const TYPERT = {
808
1113
  },
809
1114
  {
810
1115
  "name": "SubagentCatalogEvent",
811
- "declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })));"
1116
+ "declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })) | { readonly version: 2; readonly mode: 'external'; readonly label?: string; });"
812
1117
  },
813
1118
  {
814
1119
  "name": "SubagentDescriptorBase",
@@ -846,6 +1151,42 @@ export const TYPERT = {
846
1151
  "name": "SystemPromptUpdate",
847
1152
  "declaration": "export type SystemPromptUpdate = 'in-history';"
848
1153
  },
1154
+ {
1155
+ "name": "TeamId",
1156
+ "declaration": "export type TeamId = Branded<'TeamId'>;"
1157
+ },
1158
+ {
1159
+ "name": "TeamMemberPhase",
1160
+ "declaration": "export type TeamMemberPhase = 'provisioning' | 'active' | 'failed';"
1161
+ },
1162
+ {
1163
+ "name": "TeamMemberSnapshot",
1164
+ "declaration": "export interface TeamMemberSnapshot {\n readonly id: SessionId;\n readonly name: string;\n readonly description: string;\n readonly provider: string;\n readonly context: 'fresh' | 'fork';\n readonly phase: TeamMemberPhase;\n readonly error?: string;\n}"
1165
+ },
1166
+ {
1167
+ "name": "TeamMessageId",
1168
+ "declaration": "export type TeamMessageId = Branded<'TeamMessageId'>;"
1169
+ },
1170
+ {
1171
+ "name": "TeamMessageSnapshot",
1172
+ "declaration": "export interface TeamMessageSnapshot {\n readonly id: TeamMessageId;\n readonly senderId: SessionId;\n readonly senderName: string;\n readonly targetId: SessionId;\n readonly content: ContentBlock[];\n}"
1173
+ },
1174
+ {
1175
+ "name": "TeamMessageSource",
1176
+ "declaration": "export interface TeamMessageSource {\n readonly kind: 'team-message';\n readonly teamId: TeamId;\n readonly messageId: TeamMessageId;\n readonly senderId: SessionId;\n readonly senderName: string;\n}"
1177
+ },
1178
+ {
1179
+ "name": "TeamTaskId",
1180
+ "declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
1181
+ },
1182
+ {
1183
+ "name": "TeamTaskSnapshot",
1184
+ "declaration": "export interface TeamTaskSnapshot {\n readonly id: TeamTaskId;\n readonly revision: number;\n readonly subject: string;\n readonly description: string;\n readonly status: TeamTaskStatus;\n readonly ownerId?: SessionId;\n readonly blockedBy: TeamTaskId[];\n readonly writeScopes: string[];\n}"
1185
+ },
1186
+ {
1187
+ "name": "TeamTaskStatus",
1188
+ "declaration": "export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed' | 'deleted';"
1189
+ },
849
1190
  {
850
1191
  "name": "TextBlock",
851
1192
  "declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
@@ -909,6 +1250,18 @@ export const TYPERT = {
909
1250
  {
910
1251
  "name": "UserMessage",
911
1252
  "declaration": "export interface UserMessage extends MessageBase {\n readonly role: 'user';\n}"
1253
+ },
1254
+ {
1255
+ "name": "WebhookDeliveryId",
1256
+ "declaration": "export type WebhookDeliveryId = Branded<'WebhookDeliveryId'>;"
1257
+ },
1258
+ {
1259
+ "name": "WebhookRuleId",
1260
+ "declaration": "export type WebhookRuleId = Branded<'WebhookRuleId'>;"
1261
+ },
1262
+ {
1263
+ "name": "WebhookSourceId",
1264
+ "declaration": "export type WebhookSourceId = Branded<'WebhookSourceId'>;"
912
1265
  }
913
1266
  ]
914
1267
  }