dsh-pause-session 0.1.0 → 0.2.1

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +51 -20
  2. package/DEVELOPMENT.md +25 -2
  3. package/README.md +41 -31
  4. package/README.zh.md +31 -21
  5. package/REHEARSAL.md +6 -6
  6. package/lib/client.js +1125 -1375
  7. package/lib/client.js.map +1 -1
  8. package/lib/index.js +1107 -1081
  9. package/lib/index.js.map +1 -1
  10. package/lib/typert.host.d.ts +3 -0
  11. package/lib/typert.host.js +339 -0
  12. package/lib/typert.remote-client.d.ts +38 -0
  13. package/lib/typert.remote-client.d.ts.map +1 -0
  14. package/lib/typert.remote-client.js +244 -0
  15. package/lib/types/client/control.d.ts +25 -158
  16. package/lib/types/client/global.d.ts +39 -239
  17. package/lib/types/client/index.d.ts +6 -5
  18. package/lib/types/client/locales.d.ts +3 -4
  19. package/lib/types/client/pill.d.ts +5 -5
  20. package/lib/types/client/remote.d.ts +77 -0
  21. package/lib/types/client/view.d.ts +19 -5
  22. package/lib/types/coldlog.d.ts +1 -1
  23. package/lib/types/composition.d.ts +35 -61
  24. package/lib/types/control.d.ts +41 -60
  25. package/lib/types/global.d.ts +6 -4
  26. package/lib/types/index.d.ts +2 -2
  27. package/lib/types/park-state.d.ts +51 -0
  28. package/lib/types/registry.d.ts +1 -1
  29. package/lib/types/release-order.d.ts +25 -0
  30. package/lib/types/remote-adapter.d.ts +22 -0
  31. package/lib/types/remote.d.ts +158 -0
  32. package/lib/types/resume-activation.d.ts +36 -0
  33. package/lib/types/resume-text.d.ts +67 -0
  34. package/lib/types/resume.d.ts +7 -104
  35. package/lib/types/shared.d.ts +20 -123
  36. package/lib/types/snapshot.d.ts +29 -0
  37. package/lib/types/triage.d.ts +8 -9
  38. package/package.json +38 -19
  39. package/lib/types/client/burst.d.ts +0 -253
@@ -0,0 +1,3 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
+
3
+ export declare const TYPERT: unknown
@@ -0,0 +1,339 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
+ import { z } from 'zod'
3
+
4
+ import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
5
+
6
+ let dsh_pause_session_pauseSession_act_parameter_0$schema$value
7
+ const dsh_pause_session_pauseSession_act_parameter_0$schema = () => (dsh_pause_session_pauseSession_act_parameter_0$schema$value ??= z.object({
8
+ 'action': z.union([z.literal("pause"), z.literal("resume"), z.literal("pause-all"), z.literal("resume-all"), z.literal("cancel-all"), z.literal("goal")]).readonly(),
9
+ 'sessionId': z.string().readonly().describe('The Session the control is addressed through.'),
10
+ }))
11
+ let dsh_pause_session_pauseSession_act_result$schema$value
12
+ const dsh_pause_session_pauseSession_act_result$schema = () => (dsh_pause_session_pauseSession_act_result$schema$value ??= z.object({
13
+ 'ok': z.boolean().readonly(),
14
+ 'message': z.string().readonly(),
15
+ }))
16
+ let dsh_pause_session_pauseSession_decide_parameter_0$schema$value
17
+ const dsh_pause_session_pauseSession_decide_parameter_0$schema = () => (dsh_pause_session_pauseSession_decide_parameter_0$schema$value ??= z.object({
18
+ 'caller': z.string().readonly(),
19
+ 'target': z.string().readonly(),
20
+ 'decision': z.union([z.literal("goal"), z.literal("continue"), z.literal("note"), z.literal("review"), z.literal("leave")]).readonly(),
21
+ }))
22
+ let dsh_pause_session_pauseSession_decide_result$schema$value
23
+ const dsh_pause_session_pauseSession_decide_result$schema = () => (dsh_pause_session_pauseSession_decide_result$schema$value ??= z.object({
24
+ 'ok': z.boolean().readonly(),
25
+ 'message': z.string().readonly(),
26
+ }))
27
+ let dsh_pause_session_pauseSession_observe_result$schema$value
28
+ const dsh_pause_session_pauseSession_observe_result$schema = () => (dsh_pause_session_pauseSession_observe_result$schema$value ??= z.object({
29
+ 'global': z.object({
30
+ 'verdict': z.union([z.literal("idle"), z.literal("waiting"), z.literal("safe")]).readonly(),
31
+ 'registered': z.number().readonly(),
32
+ 'safe': z.number().readonly(),
33
+ 'parkedAt': z.union([z.undefined(), z.string()]).readonly().optional(),
34
+ 'draining': z.array(z.string()).readonly(),
35
+ 'parking': z.number().readonly(),
36
+ 'stalled': z.array(z.string()).readonly(),
37
+ 'unresumable': z.array(z.string()).readonly(),
38
+ 'unreadTrees': z.array(z.string()).readonly(),
39
+ 'jobs': z.array(z.string()).readonly(),
40
+ 'blind': z.array(z.string()).readonly(),
41
+ }).readonly(),
42
+ 'sessions': z.record(z.string(), z.object({
43
+ 'phase': z.union([z.literal("safe"), z.literal("active"), z.literal("draining"), z.literal("parking"), z.literal("flush-failed")]).readonly(),
44
+ 'runningTools': z.array(z.string()).readonly(),
45
+ 'rearmGoal': z.union([z.undefined(), z.literal(false), z.literal(true)]).readonly().optional(),
46
+ })).readonly().readonly(),
47
+ }))
48
+ let dsh_pause_session_pauseSession_snapshot_result$schema$value
49
+ const dsh_pause_session_pauseSession_snapshot_result$schema = () => (dsh_pause_session_pauseSession_snapshot_result$schema$value ??= z.object({
50
+ 'global': z.object({
51
+ 'verdict': z.union([z.literal("idle"), z.literal("waiting"), z.literal("safe")]).readonly(),
52
+ 'registered': z.number().readonly(),
53
+ 'safe': z.number().readonly(),
54
+ 'parkedAt': z.union([z.undefined(), z.string()]).readonly().optional(),
55
+ 'draining': z.array(z.string()).readonly(),
56
+ 'parking': z.number().readonly(),
57
+ 'stalled': z.array(z.string()).readonly(),
58
+ 'unresumable': z.array(z.string()).readonly(),
59
+ 'unreadTrees': z.array(z.string()).readonly(),
60
+ 'jobs': z.array(z.string()).readonly(),
61
+ 'blind': z.array(z.string()).readonly(),
62
+ }).readonly(),
63
+ 'sessions': z.record(z.string(), z.object({
64
+ 'phase': z.union([z.literal("safe"), z.literal("active"), z.literal("draining"), z.literal("parking"), z.literal("flush-failed")]).readonly(),
65
+ 'runningTools': z.array(z.string()).readonly(),
66
+ 'rearmGoal': z.union([z.undefined(), z.literal(false), z.literal(true)]).readonly().optional(),
67
+ })).readonly().readonly(),
68
+ }))
69
+ let dsh_pause_session_pauseSession_triage_parameter_0$schema$value
70
+ const dsh_pause_session_pauseSession_triage_parameter_0$schema = () => (dsh_pause_session_pauseSession_triage_parameter_0$schema$value ??= z.object({
71
+ 'caller': z.string().readonly(),
72
+ }))
73
+ let dsh_pause_session_pauseSession_triage_result$schema$value
74
+ const dsh_pause_session_pauseSession_triage_result$schema = () => (dsh_pause_session_pauseSession_triage_result$schema$value ??= z.array(z.object({
75
+ 'sessionId': z.string().readonly(),
76
+ 'phase': z.union([z.literal("draining"), z.literal("parking"), z.literal("flush-failed")]).readonly(),
77
+ 'updatedAt': z.number().readonly(),
78
+ 'reading': z.union([z.literal("read"), z.literal("unreadable")]).readonly(),
79
+ 'lastEvent': z.union([z.undefined(), z.string()]).readonly().optional(),
80
+ 'turn': z.union([z.undefined(), z.number()]).readonly().optional(),
81
+ 'step': z.union([z.undefined(), z.number()]).readonly().optional(),
82
+ 'traces': z.array(z.object({
83
+ 'tool': z.string().readonly(),
84
+ 'callId': z.string().readonly(),
85
+ })).readonly(),
86
+ 'owed': z.boolean().readonly(),
87
+ 'wakeable': z.boolean().readonly(),
88
+ 'rearmGoal': z.boolean().readonly(),
89
+ })))
90
+ let dsh_pause_session_pauseSession_act_parameter_0_strict$schema$value
91
+ const dsh_pause_session_pauseSession_act_parameter_0_strict$schema = () => (dsh_pause_session_pauseSession_act_parameter_0_strict$schema$value ??= z.strictObject({
92
+ 'action': z.union([z.literal("pause"), z.literal("resume"), z.literal("pause-all"), z.literal("resume-all"), z.literal("cancel-all"), z.literal("goal")]).readonly(),
93
+ 'sessionId': z.string().readonly().describe('The Session the control is addressed through.'),
94
+ }))
95
+ let dsh_pause_session_pauseSession_decide_parameter_0_strict$schema$value
96
+ const dsh_pause_session_pauseSession_decide_parameter_0_strict$schema = () => (dsh_pause_session_pauseSession_decide_parameter_0_strict$schema$value ??= z.strictObject({
97
+ 'caller': z.string().readonly(),
98
+ 'target': z.string().readonly(),
99
+ 'decision': z.union([z.literal("goal"), z.literal("continue"), z.literal("note"), z.literal("review"), z.literal("leave")]).readonly(),
100
+ }))
101
+ let dsh_pause_session_pauseSession_triage_parameter_0_strict$schema$value
102
+ const dsh_pause_session_pauseSession_triage_parameter_0_strict$schema = () => (dsh_pause_session_pauseSession_triage_parameter_0_strict$schema$value ??= z.strictObject({
103
+ 'caller': z.string().readonly(),
104
+ }))
105
+
106
+ const $remote = createTypertRemoteInfo({
107
+ package: 'dsh-pause-session',
108
+ methods: {
109
+ 'pauseSession/act': {
110
+ service: 'pauseSession',
111
+ description: 'Pause, resume, press every tree, resume every clean park, or flip one Session\'s goal re-arm.',
112
+ invocation: { kind: 'direct' },
113
+ parameters: [
114
+ {
115
+ name: 'request',
116
+ description: 'the button action.',
117
+ source: 'json',
118
+ codec: {
119
+ mode: 'strict',
120
+ typeSymbol: 'dsh-pause-session/types#PauseActionRequest',
121
+ create: dsh_pause_session_pauseSession_act_parameter_0$schema,
122
+ jsonSchema: {"type":"object","properties":{"action":{"type":"string","enum":["pause","resume","pause-all","resume-all","cancel-all","goal"]},"sessionId":{"type":"string","description":"The Session the control is addressed through."}},"required":["action","sessionId"],"additionalProperties":true},
123
+ },
124
+ strictCodec: {
125
+ mode: 'strict',
126
+ typeSymbol: 'dsh-pause-session/types#PauseActionRequest',
127
+ create: dsh_pause_session_pauseSession_act_parameter_0_strict$schema,
128
+ jsonSchema: {"type":"object","properties":{"action":{"type":"string","enum":["pause","resume","pause-all","resume-all","cancel-all","goal"]},"sessionId":{"type":"string","description":"The Session the control is addressed through."}},"required":["action","sessionId"],"additionalProperties":false},
129
+ },
130
+ },
131
+ ],
132
+ cancellation: { parameter: 'signal' },
133
+ result: {
134
+ mode: 'strict',
135
+ typeSymbol: 'dsh-pause-session/types#PauseActionResultWire',
136
+ create: dsh_pause_session_pauseSession_act_result$schema,
137
+ description: 'the user-facing outcome.',
138
+ jsonSchema: {"type":"object","properties":{"ok":{"type":"boolean"},"message":{"type":"string"}},"required":["ok","message"],"additionalProperties":true},
139
+ },
140
+ sourceLocation: {"file":"packages/dsh-pause-session/src/remote.ts","line":239,"column":9},
141
+ },
142
+ 'pauseSession/decide': {
143
+ service: 'pauseSession',
144
+ description: 'Take one decision on one listed Session.',
145
+ invocation: { kind: 'direct' },
146
+ parameters: [
147
+ {
148
+ name: 'request',
149
+ description: 'the caller, target, and decision.',
150
+ source: 'json',
151
+ codec: {
152
+ mode: 'strict',
153
+ typeSymbol: 'dsh-pause-session/types#PauseDecisionRequest',
154
+ create: dsh_pause_session_pauseSession_decide_parameter_0$schema,
155
+ jsonSchema: {"type":"object","properties":{"caller":{"type":"string"},"target":{"type":"string"},"decision":{"type":"string","enum":["goal","continue","note","review","leave"]}},"required":["caller","target","decision"],"additionalProperties":true},
156
+ },
157
+ strictCodec: {
158
+ mode: 'strict',
159
+ typeSymbol: 'dsh-pause-session/types#PauseDecisionRequest',
160
+ create: dsh_pause_session_pauseSession_decide_parameter_0_strict$schema,
161
+ jsonSchema: {"type":"object","properties":{"caller":{"type":"string"},"target":{"type":"string"},"decision":{"type":"string","enum":["goal","continue","note","review","leave"]}},"required":["caller","target","decision"],"additionalProperties":false},
162
+ },
163
+ },
164
+ ],
165
+ cancellation: { parameter: 'signal' },
166
+ result: {
167
+ mode: 'strict',
168
+ typeSymbol: 'dsh-pause-session/types#PauseActionResultWire',
169
+ create: dsh_pause_session_pauseSession_decide_result$schema,
170
+ description: 'the user-facing outcome.',
171
+ jsonSchema: {"type":"object","properties":{"ok":{"type":"boolean"},"message":{"type":"string"}},"required":["ok","message"],"additionalProperties":true},
172
+ },
173
+ sourceLocation: {"file":"packages/dsh-pause-session/src/remote.ts","line":264,"column":9},
174
+ },
175
+ 'pauseSession/observe': {
176
+ service: 'pauseSession',
177
+ description: 'Live status: the opening snapshot, then one new snapshot whenever the host reports a change.',
178
+ mode: 'stream',
179
+ invocation: { kind: 'direct' },
180
+ parameters: [
181
+ ],
182
+ cancellation: { parameter: 'signal' },
183
+ result: {
184
+ mode: 'strict',
185
+ typeSymbol: 'dsh-pause-session/types#PauseSnapshotWire',
186
+ create: dsh_pause_session_pauseSession_observe_result$schema,
187
+ description: 'the snapshot stream.',
188
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
189
+ },
190
+ sourceLocation: {"file":"packages/dsh-pause-session/src/remote.ts","line":201,"column":10},
191
+ },
192
+ 'pauseSession/snapshot': {
193
+ service: 'pauseSession',
194
+ description: 'One exact snapshot, used by tests and by a reconnect that cannot wait for the first stream item.',
195
+ invocation: { kind: 'direct' },
196
+ parameters: [
197
+ ],
198
+ cancellation: { parameter: 'signal' },
199
+ result: {
200
+ mode: 'strict',
201
+ typeSymbol: 'dsh-pause-session/types#PauseSnapshotWire',
202
+ create: dsh_pause_session_pauseSession_snapshot_result$schema,
203
+ description: 'the current aggregate and session states.',
204
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
205
+ },
206
+ sourceLocation: {"file":"packages/dsh-pause-session/src/remote.ts","line":175,"column":9},
207
+ },
208
+ 'pauseSession/triage': {
209
+ service: 'pauseSession',
210
+ description: 'Read the morning decision list.',
211
+ invocation: { kind: 'direct' },
212
+ parameters: [
213
+ {
214
+ name: 'request',
215
+ description: 'the calling Session whose list is read.',
216
+ source: 'json',
217
+ codec: {
218
+ mode: 'strict',
219
+ typeSymbol: 'dsh-pause-session/types#PauseTriageRequest',
220
+ create: dsh_pause_session_pauseSession_triage_parameter_0$schema,
221
+ jsonSchema: {"type":"object","properties":{"caller":{"type":"string"}},"required":["caller"],"additionalProperties":true},
222
+ },
223
+ strictCodec: {
224
+ mode: 'strict',
225
+ typeSymbol: 'dsh-pause-session/types#PauseTriageRequest',
226
+ create: dsh_pause_session_pauseSession_triage_parameter_0_strict$schema,
227
+ jsonSchema: {"type":"object","properties":{"caller":{"type":"string"}},"required":["caller"],"additionalProperties":false},
228
+ },
229
+ },
230
+ ],
231
+ cancellation: { parameter: 'signal' },
232
+ result: {
233
+ mode: 'strict',
234
+ typeSymbol: 'dsh-pause-session#pauseSession/triage:result',
235
+ create: dsh_pause_session_pauseSession_triage_result$schema,
236
+ description: 'the listed rows.',
237
+ jsonSchema: {"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string"},"phase":{"type":"string","enum":["draining","parking","flush-failed"]},"updatedAt":{"type":"number"},"reading":{"type":"string","enum":["read","unreadable"]},"lastEvent":{"type":"string"},"turn":{"type":"number"},"step":{"type":"number"},"traces":{"type":"array","items":{"type":"object","properties":{"tool":{"type":"string"},"callId":{"type":"string"}},"required":["tool","callId"],"additionalProperties":true}},"owed":{"type":"boolean"},"wakeable":{"type":"boolean"},"rearmGoal":{"type":"boolean"}},"required":["sessionId","phase","updatedAt","reading","traces","owed","wakeable","rearmGoal"],"additionalProperties":true}},
238
+ },
239
+ sourceLocation: {"file":"packages/dsh-pause-session/src/remote.ts","line":252,"column":9},
240
+ },
241
+ },
242
+ }, z)
243
+
244
+ export const TYPERT = {
245
+ package: 'dsh-pause-session',
246
+ face: 'host',
247
+ schemas: [
248
+ ],
249
+ get invocations() { return $remote.descriptors },
250
+ model: {
251
+ "services": [
252
+ {
253
+ "description": "Host service exposed to the browser as the `pauseSession` Remote namespace.",
254
+ "summary": "Host service exposed to the browser as the `pauseSession` Remote namespace.",
255
+ "tags": [],
256
+ "jsDoc": "/** Host service exposed to the browser as the `pauseSession` Remote namespace. */",
257
+ "key": "pauseSession",
258
+ "exportName": "PauseRemote",
259
+ "members": [
260
+ {
261
+ "kind": "method",
262
+ "name": "snapshot",
263
+ "signature": "@Remote('snapshot') async snapshot(signal?: AbortSignal): Promise<PauseSnapshotWire>",
264
+ "summary": "One exact snapshot, used by tests and by a reconnect that cannot wait for the first stream item.",
265
+ "jsDoc": "/**\n * One exact snapshot, used by tests and by a reconnect that cannot wait for\n * the first stream item.\n * @param signal - carrier cancellation.\n * @returns the current aggregate and session states.\n */"
266
+ },
267
+ {
268
+ "kind": "method",
269
+ "name": "observe",
270
+ "signature": "@Remote({ mode: 'stream' }) async *observe(signal?: AbortSignal): AsyncIterable<PauseSnapshotWire>",
271
+ "summary": "Live status: the opening snapshot, then one new snapshot whenever the host reports a change.",
272
+ "jsDoc": "/**\n * Live status: the opening snapshot, then one new snapshot whenever the host\n * reports a change.\n * @param signal - stream cancellation.\n * @returns the snapshot stream.\n */"
273
+ },
274
+ {
275
+ "kind": "method",
276
+ "name": "act",
277
+ "signature": "@Remote('act') async act(request: PauseActionRequest, signal?: AbortSignal): Promise<PauseActionResultWire>",
278
+ "summary": "Pause, resume, press every tree, resume every clean park, or flip one Session's goal re-arm.",
279
+ "jsDoc": "/**\n * Pause, resume, press every tree, resume every clean park, or flip one\n * Session's goal re-arm.\n * @param request - the button action.\n * @param signal - carrier cancellation.\n * @returns the user-facing outcome.\n */"
280
+ },
281
+ {
282
+ "kind": "method",
283
+ "name": "triage",
284
+ "signature": "@Remote('triage') async triage(request: PauseTriageRequest, signal?: AbortSignal): Promise<readonly TriageRowWire[]>",
285
+ "summary": "Read the morning decision list.",
286
+ "jsDoc": "/**\n * Read the morning decision list.\n * @param request - the calling Session whose list is read.\n * @param signal - read cancellation.\n * @returns the listed rows.\n */"
287
+ },
288
+ {
289
+ "kind": "method",
290
+ "name": "decide",
291
+ "signature": "@Remote('decide') async decide(request: PauseDecisionRequest, signal?: AbortSignal): Promise<PauseActionResultWire>",
292
+ "summary": "Take one decision on one listed Session.",
293
+ "jsDoc": "/**\n * Take one decision on one listed Session.\n * @param request - the caller, target, and decision.\n * @param signal - load cancellation.\n * @returns the user-facing outcome.\n */"
294
+ }
295
+ ],
296
+ "types": [
297
+ {
298
+ "name": "GlobalStatusWire",
299
+ "declaration": "export interface GlobalStatusWire {\n readonly verdict: 'idle' | 'waiting' | 'safe';\n readonly registered: number;\n readonly safe: number;\n readonly parkedAt?: string;\n readonly draining: readonly string[];\n readonly parking: number;\n readonly stalled: readonly string[];\n readonly unresumable: readonly string[];\n readonly unreadTrees: readonly string[];\n readonly jobs: readonly string[];\n readonly blind: readonly string[];\n}"
300
+ },
301
+ {
302
+ "name": "PauseActionRequest",
303
+ "declaration": "export interface PauseActionRequest {\n readonly action: 'pause' | 'resume' | 'pause-all' | 'resume-all' | 'cancel-all' | 'goal';\n readonly sessionId: string;\n}"
304
+ },
305
+ {
306
+ "name": "PauseActionResultWire",
307
+ "declaration": "export interface PauseActionResultWire {\n readonly ok: boolean;\n readonly message: string;\n}"
308
+ },
309
+ {
310
+ "name": "PauseDecisionRequest",
311
+ "declaration": "export interface PauseDecisionRequest {\n readonly caller: string;\n readonly target: string;\n readonly decision: 'continue' | 'note' | 'review' | 'leave' | 'goal';\n}"
312
+ },
313
+ {
314
+ "name": "PausePhaseWire",
315
+ "declaration": "export type PausePhaseWire = 'active' | 'draining' | 'parking' | 'safe' | 'flush-failed';"
316
+ },
317
+ {
318
+ "name": "PauseSnapshotWire",
319
+ "declaration": "export interface PauseSnapshotWire {\n readonly global: GlobalStatusWire;\n readonly sessions: Readonly<Record<string, SessionStatusWire>>;\n}"
320
+ },
321
+ {
322
+ "name": "PauseTriageRequest",
323
+ "declaration": "export interface PauseTriageRequest {\n readonly caller: string;\n}"
324
+ },
325
+ {
326
+ "name": "SessionStatusWire",
327
+ "declaration": "export interface SessionStatusWire {\n readonly phase: PausePhaseWire;\n readonly runningTools: readonly string[];\n readonly rearmGoal?: boolean;\n}"
328
+ },
329
+ {
330
+ "name": "TriageRowWire",
331
+ "declaration": "export interface TriageRowWire {\n readonly sessionId: string;\n readonly phase: 'draining' | 'parking' | 'flush-failed';\n readonly updatedAt: number;\n readonly reading: 'read' | 'unreadable';\n readonly lastEvent?: string;\n readonly turn?: number;\n readonly step?: number;\n readonly traces: readonly { readonly tool: string; readonly callId: string; }[];\n readonly owed: boolean;\n readonly wakeable: boolean;\n readonly rearmGoal: boolean;\n}"
332
+ }
333
+ ]
334
+ }
335
+ ],
336
+ "events": [],
337
+ "objects": []
338
+ },
339
+ }
@@ -0,0 +1,38 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
2
+ import type {
3
+ RemoteResult,
4
+ RemoteStreamHandle,
5
+ TypertRemoteInfo,
6
+ TypertRemoteMethod,
7
+ } from '@deepseek-ai/dsh-typert-protocol'
8
+ import type { PauseActionRequest, PauseActionResultWire, PauseDecisionRequest, PauseSnapshotWire, PauseTriageRequest, TriageRowWire } from 'dsh-pause-session/types'
9
+
10
+ declare module '@deepseek-ai/dsh-typert-protocol' {
11
+ interface TypertRemoteNamespace$706175736553657373696f6e {
12
+ act: (request: PauseActionRequest, signal?: AbortSignal) => Promise<RemoteResult<PauseActionResultWire>>
13
+ decide: (request: PauseDecisionRequest, signal?: AbortSignal) => Promise<RemoteResult<PauseActionResultWire>>
14
+ observe: (signal?: AbortSignal) => RemoteStreamHandle<PauseSnapshotWire, never>
15
+ snapshot: (signal?: AbortSignal) => Promise<RemoteResult<PauseSnapshotWire>>
16
+ triage: (request: PauseTriageRequest, signal?: AbortSignal) => Promise<RemoteResult<readonly TriageRowWire[]>>
17
+ }
18
+ interface TypertRemoteMap {
19
+ 'pauseSession/act': (request: PauseActionRequest, signal?: AbortSignal) => Promise<RemoteResult<PauseActionResultWire>>
20
+ 'pauseSession/decide': (request: PauseDecisionRequest, signal?: AbortSignal) => Promise<RemoteResult<PauseActionResultWire>>
21
+ 'pauseSession/observe': (signal?: AbortSignal) => RemoteStreamHandle<PauseSnapshotWire, never>
22
+ 'pauseSession/snapshot': (signal?: AbortSignal) => Promise<RemoteResult<PauseSnapshotWire>>
23
+ 'pauseSession/triage': (request: PauseTriageRequest, signal?: AbortSignal) => Promise<RemoteResult<readonly TriageRowWire[]>>
24
+ }
25
+ interface TypertRemoteNamespaceMap {
26
+ 'pauseSession': TypertRemoteNamespace$706175736553657373696f6e
27
+ }
28
+ }
29
+
30
+ export declare const TYPERT_REMOTE: TypertRemoteInfo<{
31
+ readonly 'pauseSession/act': TypertRemoteMethod<{ readonly 'request': PauseActionRequest }, PauseActionResultWire>
32
+ readonly 'pauseSession/decide': TypertRemoteMethod<{ readonly 'request': PauseDecisionRequest }, PauseActionResultWire>
33
+ readonly 'pauseSession/observe': TypertRemoteMethod<{ }, PauseSnapshotWire, 'stream'>
34
+ readonly 'pauseSession/snapshot': TypertRemoteMethod<{ }, PauseSnapshotWire>
35
+ readonly 'pauseSession/triage': TypertRemoteMethod<{ readonly 'request': PauseTriageRequest }, readonly TriageRowWire[]>
36
+ }>
37
+ export default TYPERT_REMOTE
38
+ //# sourceMappingURL=typert.remote-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typert.remote-client.d.ts","names":["act","decide","observe","snapshot","triage"],"sources":["../src/remote.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;IA8OQA,G;IAyBAC,M;IA/DCC,O;IA1BDC,Q;IA6EAC,M;;;IAbAJ,kB;IAyBAC,qB;IA/DCC,sB;IA1BDC,uB;IA6EAC,qB","ignoreList":[]}
@@ -0,0 +1,244 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
2
+ import { z } from 'zod'
3
+
4
+ import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
5
+
6
+ let dsh_pause_session_pauseSession_act_parameter_0$schema$value
7
+ const dsh_pause_session_pauseSession_act_parameter_0$schema = () => (dsh_pause_session_pauseSession_act_parameter_0$schema$value ??= z.object({
8
+ 'action': z.union([z.literal("pause"), z.literal("resume"), z.literal("pause-all"), z.literal("resume-all"), z.literal("cancel-all"), z.literal("goal")]).readonly(),
9
+ 'sessionId': z.string().readonly().describe('The Session the control is addressed through.'),
10
+ }))
11
+ let dsh_pause_session_pauseSession_act_result$schema$value
12
+ const dsh_pause_session_pauseSession_act_result$schema = () => (dsh_pause_session_pauseSession_act_result$schema$value ??= z.object({
13
+ 'ok': z.boolean().readonly(),
14
+ 'message': z.string().readonly(),
15
+ }))
16
+ let dsh_pause_session_pauseSession_decide_parameter_0$schema$value
17
+ const dsh_pause_session_pauseSession_decide_parameter_0$schema = () => (dsh_pause_session_pauseSession_decide_parameter_0$schema$value ??= z.object({
18
+ 'caller': z.string().readonly(),
19
+ 'target': z.string().readonly(),
20
+ 'decision': z.union([z.literal("goal"), z.literal("continue"), z.literal("note"), z.literal("review"), z.literal("leave")]).readonly(),
21
+ }))
22
+ let dsh_pause_session_pauseSession_decide_result$schema$value
23
+ const dsh_pause_session_pauseSession_decide_result$schema = () => (dsh_pause_session_pauseSession_decide_result$schema$value ??= z.object({
24
+ 'ok': z.boolean().readonly(),
25
+ 'message': z.string().readonly(),
26
+ }))
27
+ let dsh_pause_session_pauseSession_observe_result$schema$value
28
+ const dsh_pause_session_pauseSession_observe_result$schema = () => (dsh_pause_session_pauseSession_observe_result$schema$value ??= z.object({
29
+ 'global': z.object({
30
+ 'verdict': z.union([z.literal("idle"), z.literal("waiting"), z.literal("safe")]).readonly(),
31
+ 'registered': z.number().readonly(),
32
+ 'safe': z.number().readonly(),
33
+ 'parkedAt': z.union([z.undefined(), z.string()]).readonly().optional(),
34
+ 'draining': z.array(z.string()).readonly(),
35
+ 'parking': z.number().readonly(),
36
+ 'stalled': z.array(z.string()).readonly(),
37
+ 'unresumable': z.array(z.string()).readonly(),
38
+ 'unreadTrees': z.array(z.string()).readonly(),
39
+ 'jobs': z.array(z.string()).readonly(),
40
+ 'blind': z.array(z.string()).readonly(),
41
+ }).readonly(),
42
+ 'sessions': z.record(z.string(), z.object({
43
+ 'phase': z.union([z.literal("safe"), z.literal("active"), z.literal("draining"), z.literal("parking"), z.literal("flush-failed")]).readonly(),
44
+ 'runningTools': z.array(z.string()).readonly(),
45
+ 'rearmGoal': z.union([z.undefined(), z.literal(false), z.literal(true)]).readonly().optional(),
46
+ })).readonly().readonly(),
47
+ }))
48
+ let dsh_pause_session_pauseSession_snapshot_result$schema$value
49
+ const dsh_pause_session_pauseSession_snapshot_result$schema = () => (dsh_pause_session_pauseSession_snapshot_result$schema$value ??= z.object({
50
+ 'global': z.object({
51
+ 'verdict': z.union([z.literal("idle"), z.literal("waiting"), z.literal("safe")]).readonly(),
52
+ 'registered': z.number().readonly(),
53
+ 'safe': z.number().readonly(),
54
+ 'parkedAt': z.union([z.undefined(), z.string()]).readonly().optional(),
55
+ 'draining': z.array(z.string()).readonly(),
56
+ 'parking': z.number().readonly(),
57
+ 'stalled': z.array(z.string()).readonly(),
58
+ 'unresumable': z.array(z.string()).readonly(),
59
+ 'unreadTrees': z.array(z.string()).readonly(),
60
+ 'jobs': z.array(z.string()).readonly(),
61
+ 'blind': z.array(z.string()).readonly(),
62
+ }).readonly(),
63
+ 'sessions': z.record(z.string(), z.object({
64
+ 'phase': z.union([z.literal("safe"), z.literal("active"), z.literal("draining"), z.literal("parking"), z.literal("flush-failed")]).readonly(),
65
+ 'runningTools': z.array(z.string()).readonly(),
66
+ 'rearmGoal': z.union([z.undefined(), z.literal(false), z.literal(true)]).readonly().optional(),
67
+ })).readonly().readonly(),
68
+ }))
69
+ let dsh_pause_session_pauseSession_triage_parameter_0$schema$value
70
+ const dsh_pause_session_pauseSession_triage_parameter_0$schema = () => (dsh_pause_session_pauseSession_triage_parameter_0$schema$value ??= z.object({
71
+ 'caller': z.string().readonly(),
72
+ }))
73
+ let dsh_pause_session_pauseSession_triage_result$schema$value
74
+ const dsh_pause_session_pauseSession_triage_result$schema = () => (dsh_pause_session_pauseSession_triage_result$schema$value ??= z.array(z.object({
75
+ 'sessionId': z.string().readonly(),
76
+ 'phase': z.union([z.literal("draining"), z.literal("parking"), z.literal("flush-failed")]).readonly(),
77
+ 'updatedAt': z.number().readonly(),
78
+ 'reading': z.union([z.literal("read"), z.literal("unreadable")]).readonly(),
79
+ 'lastEvent': z.union([z.undefined(), z.string()]).readonly().optional(),
80
+ 'turn': z.union([z.undefined(), z.number()]).readonly().optional(),
81
+ 'step': z.union([z.undefined(), z.number()]).readonly().optional(),
82
+ 'traces': z.array(z.object({
83
+ 'tool': z.string().readonly(),
84
+ 'callId': z.string().readonly(),
85
+ })).readonly(),
86
+ 'owed': z.boolean().readonly(),
87
+ 'wakeable': z.boolean().readonly(),
88
+ 'rearmGoal': z.boolean().readonly(),
89
+ })))
90
+ let dsh_pause_session_pauseSession_act_parameter_0_strict$schema$value
91
+ const dsh_pause_session_pauseSession_act_parameter_0_strict$schema = () => (dsh_pause_session_pauseSession_act_parameter_0_strict$schema$value ??= z.strictObject({
92
+ 'action': z.union([z.literal("pause"), z.literal("resume"), z.literal("pause-all"), z.literal("resume-all"), z.literal("cancel-all"), z.literal("goal")]).readonly(),
93
+ 'sessionId': z.string().readonly().describe('The Session the control is addressed through.'),
94
+ }))
95
+ let dsh_pause_session_pauseSession_decide_parameter_0_strict$schema$value
96
+ const dsh_pause_session_pauseSession_decide_parameter_0_strict$schema = () => (dsh_pause_session_pauseSession_decide_parameter_0_strict$schema$value ??= z.strictObject({
97
+ 'caller': z.string().readonly(),
98
+ 'target': z.string().readonly(),
99
+ 'decision': z.union([z.literal("goal"), z.literal("continue"), z.literal("note"), z.literal("review"), z.literal("leave")]).readonly(),
100
+ }))
101
+ let dsh_pause_session_pauseSession_triage_parameter_0_strict$schema$value
102
+ const dsh_pause_session_pauseSession_triage_parameter_0_strict$schema = () => (dsh_pause_session_pauseSession_triage_parameter_0_strict$schema$value ??= z.strictObject({
103
+ 'caller': z.string().readonly(),
104
+ }))
105
+
106
+ export const TYPERT_REMOTE = createTypertRemoteInfo({
107
+ package: 'dsh-pause-session',
108
+ methods: {
109
+ 'pauseSession/act': {
110
+ service: 'pauseSession',
111
+ description: 'Pause, resume, press every tree, resume every clean park, or flip one Session\'s goal re-arm.',
112
+ invocation: { kind: 'direct' },
113
+ parameters: [
114
+ {
115
+ name: 'request',
116
+ description: 'the button action.',
117
+ source: 'json',
118
+ codec: {
119
+ mode: 'strict',
120
+ typeSymbol: 'dsh-pause-session/types#PauseActionRequest',
121
+ create: dsh_pause_session_pauseSession_act_parameter_0$schema,
122
+ jsonSchema: {"type":"object","properties":{"action":{"type":"string","enum":["pause","resume","pause-all","resume-all","cancel-all","goal"]},"sessionId":{"type":"string","description":"The Session the control is addressed through."}},"required":["action","sessionId"],"additionalProperties":true},
123
+ },
124
+ strictCodec: {
125
+ mode: 'strict',
126
+ typeSymbol: 'dsh-pause-session/types#PauseActionRequest',
127
+ create: dsh_pause_session_pauseSession_act_parameter_0_strict$schema,
128
+ jsonSchema: {"type":"object","properties":{"action":{"type":"string","enum":["pause","resume","pause-all","resume-all","cancel-all","goal"]},"sessionId":{"type":"string","description":"The Session the control is addressed through."}},"required":["action","sessionId"],"additionalProperties":false},
129
+ },
130
+ },
131
+ ],
132
+ cancellation: { parameter: 'signal' },
133
+ result: {
134
+ mode: 'strict',
135
+ typeSymbol: 'dsh-pause-session/types#PauseActionResultWire',
136
+ create: dsh_pause_session_pauseSession_act_result$schema,
137
+ description: 'the user-facing outcome.',
138
+ jsonSchema: {"type":"object","properties":{"ok":{"type":"boolean"},"message":{"type":"string"}},"required":["ok","message"],"additionalProperties":true},
139
+ },
140
+ sourceLocation: {"file":"packages/dsh-pause-session/src/remote.ts","line":239,"column":9},
141
+ },
142
+ 'pauseSession/decide': {
143
+ service: 'pauseSession',
144
+ description: 'Take one decision on one listed Session.',
145
+ invocation: { kind: 'direct' },
146
+ parameters: [
147
+ {
148
+ name: 'request',
149
+ description: 'the caller, target, and decision.',
150
+ source: 'json',
151
+ codec: {
152
+ mode: 'strict',
153
+ typeSymbol: 'dsh-pause-session/types#PauseDecisionRequest',
154
+ create: dsh_pause_session_pauseSession_decide_parameter_0$schema,
155
+ jsonSchema: {"type":"object","properties":{"caller":{"type":"string"},"target":{"type":"string"},"decision":{"type":"string","enum":["goal","continue","note","review","leave"]}},"required":["caller","target","decision"],"additionalProperties":true},
156
+ },
157
+ strictCodec: {
158
+ mode: 'strict',
159
+ typeSymbol: 'dsh-pause-session/types#PauseDecisionRequest',
160
+ create: dsh_pause_session_pauseSession_decide_parameter_0_strict$schema,
161
+ jsonSchema: {"type":"object","properties":{"caller":{"type":"string"},"target":{"type":"string"},"decision":{"type":"string","enum":["goal","continue","note","review","leave"]}},"required":["caller","target","decision"],"additionalProperties":false},
162
+ },
163
+ },
164
+ ],
165
+ cancellation: { parameter: 'signal' },
166
+ result: {
167
+ mode: 'strict',
168
+ typeSymbol: 'dsh-pause-session/types#PauseActionResultWire',
169
+ create: dsh_pause_session_pauseSession_decide_result$schema,
170
+ description: 'the user-facing outcome.',
171
+ jsonSchema: {"type":"object","properties":{"ok":{"type":"boolean"},"message":{"type":"string"}},"required":["ok","message"],"additionalProperties":true},
172
+ },
173
+ sourceLocation: {"file":"packages/dsh-pause-session/src/remote.ts","line":264,"column":9},
174
+ },
175
+ 'pauseSession/observe': {
176
+ service: 'pauseSession',
177
+ description: 'Live status: the opening snapshot, then one new snapshot whenever the host reports a change.',
178
+ mode: 'stream',
179
+ invocation: { kind: 'direct' },
180
+ parameters: [
181
+ ],
182
+ cancellation: { parameter: 'signal' },
183
+ result: {
184
+ mode: 'strict',
185
+ typeSymbol: 'dsh-pause-session/types#PauseSnapshotWire',
186
+ create: dsh_pause_session_pauseSession_observe_result$schema,
187
+ description: 'the snapshot stream.',
188
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
189
+ },
190
+ sourceLocation: {"file":"packages/dsh-pause-session/src/remote.ts","line":201,"column":10},
191
+ },
192
+ 'pauseSession/snapshot': {
193
+ service: 'pauseSession',
194
+ description: 'One exact snapshot, used by tests and by a reconnect that cannot wait for the first stream item.',
195
+ invocation: { kind: 'direct' },
196
+ parameters: [
197
+ ],
198
+ cancellation: { parameter: 'signal' },
199
+ result: {
200
+ mode: 'strict',
201
+ typeSymbol: 'dsh-pause-session/types#PauseSnapshotWire',
202
+ create: dsh_pause_session_pauseSession_snapshot_result$schema,
203
+ description: 'the current aggregate and session states.',
204
+ jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
205
+ },
206
+ sourceLocation: {"file":"packages/dsh-pause-session/src/remote.ts","line":175,"column":9},
207
+ },
208
+ 'pauseSession/triage': {
209
+ service: 'pauseSession',
210
+ description: 'Read the morning decision list.',
211
+ invocation: { kind: 'direct' },
212
+ parameters: [
213
+ {
214
+ name: 'request',
215
+ description: 'the calling Session whose list is read.',
216
+ source: 'json',
217
+ codec: {
218
+ mode: 'strict',
219
+ typeSymbol: 'dsh-pause-session/types#PauseTriageRequest',
220
+ create: dsh_pause_session_pauseSession_triage_parameter_0$schema,
221
+ jsonSchema: {"type":"object","properties":{"caller":{"type":"string"}},"required":["caller"],"additionalProperties":true},
222
+ },
223
+ strictCodec: {
224
+ mode: 'strict',
225
+ typeSymbol: 'dsh-pause-session/types#PauseTriageRequest',
226
+ create: dsh_pause_session_pauseSession_triage_parameter_0_strict$schema,
227
+ jsonSchema: {"type":"object","properties":{"caller":{"type":"string"}},"required":["caller"],"additionalProperties":false},
228
+ },
229
+ },
230
+ ],
231
+ cancellation: { parameter: 'signal' },
232
+ result: {
233
+ mode: 'strict',
234
+ typeSymbol: 'dsh-pause-session#pauseSession/triage:result',
235
+ create: dsh_pause_session_pauseSession_triage_result$schema,
236
+ description: 'the listed rows.',
237
+ jsonSchema: {"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string"},"phase":{"type":"string","enum":["draining","parking","flush-failed"]},"updatedAt":{"type":"number"},"reading":{"type":"string","enum":["read","unreadable"]},"lastEvent":{"type":"string"},"turn":{"type":"number"},"step":{"type":"number"},"traces":{"type":"array","items":{"type":"object","properties":{"tool":{"type":"string"},"callId":{"type":"string"}},"required":["tool","callId"],"additionalProperties":true}},"owed":{"type":"boolean"},"wakeable":{"type":"boolean"},"rearmGoal":{"type":"boolean"}},"required":["sessionId","phase","updatedAt","reading","traces","owed","wakeable","rearmGoal"],"additionalProperties":true}},
238
+ },
239
+ sourceLocation: {"file":"packages/dsh-pause-session/src/remote.ts","line":252,"column":9},
240
+ },
241
+ },
242
+ }, z)
243
+
244
+ export default TYPERT_REMOTE