@deepseek-ai/dsh-api-session-controller 0.2.1-alpha.2 → 0.2.1-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +3 -1
- package/README.zh.md +3 -1
- package/lib/client.js +11 -6
- package/lib/index.js +222 -97
- package/lib/typert.host.js +1243 -691
- package/lib/typert.remote-client.d.ts +25 -2
- package/lib/typert.remote-client.js +1039 -676
- package/lib/types/agent.d.ts +61 -17
- package/lib/types/agent.js +148 -84
- package/lib/types/client/contract/sessions.d.ts +6 -3
- package/lib/types/client/sessions/manager.d.ts +3 -2
- package/lib/types/client/sessions/manager.js +6 -3
- package/lib/types/client/sessions/service.d.ts +3 -2
- package/lib/types/client/sessions/service.js +2 -2
- package/lib/types/client/sessions/session.js +1 -1
- package/lib/types/commands.d.ts +20 -6
- package/lib/types/commands.js +28 -34
- package/lib/types/index.d.ts +6 -4
- package/lib/types/index.js +65 -15
- package/lib/types/types.d.ts +14 -3
- package/locale/en.json +5 -0
- package/locale/zh.json +6 -0
- package/package.json +83 -80
package/lib/typert.host.js
CHANGED
|
@@ -1,49 +1,41 @@
|
|
|
1
1
|
/* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
|
|
2
2
|
import { z } from 'zod'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
let JsonValueRemoteCodec$schema2$value
|
|
7
|
-
const JsonValueRemoteCodec$schema2 = () => (JsonValueRemoteCodec$schema2$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema2())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema2()))]))
|
|
8
|
-
let JsonValueRemoteCodec$schema3$value
|
|
9
|
-
const JsonValueRemoteCodec$schema3 = () => (JsonValueRemoteCodec$schema3$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema3())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema3()))]))
|
|
10
|
-
let JsonValueRemoteCodec$schema4$value
|
|
11
|
-
const JsonValueRemoteCodec$schema4 = () => (JsonValueRemoteCodec$schema4$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema4())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema4()))]))
|
|
12
|
-
let JsonValueRemoteCodec$schema5$value
|
|
13
|
-
const JsonValueRemoteCodec$schema5 = () => (JsonValueRemoteCodec$schema5$value ??= z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema5())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema5()))]))
|
|
4
|
+
import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
|
|
5
|
+
|
|
14
6
|
let _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0$schema$value
|
|
15
|
-
const _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0$schema$value ??= z.
|
|
7
|
+
const _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0$schema$value ??= z.string())
|
|
16
8
|
let _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_1$schema$value
|
|
17
9
|
const _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_1$schema = () => (_deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_1$schema$value ??= z.string())
|
|
18
10
|
let _deepseek_ai_dsh_api_session_controller_fileReferences_list_result$schema$value
|
|
19
11
|
const _deepseek_ai_dsh_api_session_controller_fileReferences_list_result$schema = () => (_deepseek_ai_dsh_api_session_controller_fileReferences_list_result$schema$value ??= z.array(z.object({
|
|
20
|
-
'path': z.string(),
|
|
21
|
-
'kind': z.union([z.literal("file"), z.literal("directory")]),
|
|
12
|
+
'path': z.string().describe('User-facing path accepted by normal prompts and filesystem tools.'),
|
|
13
|
+
'kind': z.union([z.literal("file"), z.literal("directory")]).describe('Directories keep completion open; files finish the mention.'),
|
|
22
14
|
})))
|
|
23
15
|
let _deepseek_ai_dsh_api_session_controller_session_attachment_parameter_0$schema$value
|
|
24
16
|
const _deepseek_ai_dsh_api_session_controller_session_attachment_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_attachment_parameter_0$schema$value ??= z.object({
|
|
25
|
-
'sessionId': z.
|
|
26
|
-
'attachmentId': z.
|
|
17
|
+
'sessionId': z.string().readonly(),
|
|
18
|
+
'attachmentId': z.string().readonly(),
|
|
27
19
|
}))
|
|
28
20
|
let _deepseek_ai_dsh_api_session_controller_session_attachment_result$schema$value
|
|
29
21
|
const _deepseek_ai_dsh_api_session_controller_session_attachment_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_attachment_result$schema$value ??= z.object({
|
|
30
22
|
'attachment': z.object({
|
|
31
|
-
'attachmentId': z.
|
|
32
|
-
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
|
|
33
|
-
'bytes': z.number(),
|
|
34
|
-
'width': z.number(),
|
|
35
|
-
'height': z.number(),
|
|
36
|
-
'name': z.string().optional(),
|
|
23
|
+
'attachmentId': z.string().describe('Opaque storage identifier; never a filesystem path or bearer URL.'),
|
|
24
|
+
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]).describe('Media type verified from the stored bytes.'),
|
|
25
|
+
'bytes': z.number().describe('Exact encoded byte length.'),
|
|
26
|
+
'width': z.number().describe('Intrinsic encoded width in pixels.'),
|
|
27
|
+
'height': z.number().describe('Intrinsic encoded height in pixels.'),
|
|
28
|
+
'name': z.string().optional().describe('Optional display name stripped of local path information.'),
|
|
37
29
|
'originalDimensions': z.object({
|
|
38
30
|
'width': z.number(),
|
|
39
31
|
'height': z.number(),
|
|
40
|
-
}).optional(),
|
|
32
|
+
}).optional().describe('Input dimensions after applying EXIF orientation and before normalization scaling. Present only when normalization reduced the image.'),
|
|
41
33
|
}).readonly(),
|
|
42
34
|
'data': z.string().readonly(),
|
|
43
35
|
}))
|
|
44
36
|
let _deepseek_ai_dsh_api_session_controller_session_cancel_parameter_0$schema$value
|
|
45
37
|
const _deepseek_ai_dsh_api_session_controller_session_cancel_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_cancel_parameter_0$schema$value ??= z.object({
|
|
46
|
-
'sessionId': z.
|
|
38
|
+
'sessionId': z.string().readonly(),
|
|
47
39
|
}))
|
|
48
40
|
let _deepseek_ai_dsh_api_session_controller_session_cancel_result$schema$value
|
|
49
41
|
const _deepseek_ai_dsh_api_session_controller_session_cancel_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_cancel_result$schema$value ??= z.object({
|
|
@@ -55,191 +47,212 @@ let _deepseek_ai_dsh_api_session_controller_session_control_result$schema$value
|
|
|
55
47
|
const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_control_result$schema$value ??= z.union([z.object({
|
|
56
48
|
'type': z.literal("baseline").readonly(),
|
|
57
49
|
'value': z.object({
|
|
58
|
-
'projections': z.record(z.
|
|
50
|
+
'projections': z.record(z.string(), z.object({
|
|
59
51
|
'asOfSeq': z.number().readonly(),
|
|
60
52
|
'values': z.intersection(z.object({
|
|
61
53
|
'inbox': z.object({
|
|
62
|
-
'next-turn': z.array(z.
|
|
63
|
-
'next-step': z.array(z.
|
|
64
|
-
}).optional(),
|
|
65
|
-
'workingDirectory': z.union([z.literal(null), z.string()]).optional(),
|
|
66
|
-
'agentPreset': z.union([z.literal(null), z.string()]).optional(),
|
|
67
|
-
'title': z.union([z.literal(null), z.string()]).optional(),
|
|
54
|
+
'next-turn': z.array(z.json()).readonly(),
|
|
55
|
+
'next-step': z.array(z.json()).readonly(),
|
|
56
|
+
}).optional().describe('Pending agent input reconstructed from durable inbox splices.'),
|
|
57
|
+
'workingDirectory': z.union([z.literal(null), z.string()]).optional().describe('Recorded current directory for Session observations, or null when none is recorded.'),
|
|
58
|
+
'agentPreset': z.union([z.literal(null), z.string()]).optional().describe('Preset the Session runs, or null when the deployment composes none.'),
|
|
59
|
+
'title': z.union([z.literal(null), z.string()]).optional().describe('The session\'s current normalized title — the latest `session/title` event\'s text (last-wins), or `null` before the first title lands. A plain string: the shape the client list rows consume.'),
|
|
68
60
|
'todos': z.union([z.literal(null), z.array(z.object({
|
|
69
|
-
'content': z.string(),
|
|
70
|
-
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]),
|
|
71
|
-
}))]).optional(),
|
|
61
|
+
'content': z.string().describe('What this task is — a short imperative line shown in the UI.'),
|
|
62
|
+
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]).describe('Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several.'),
|
|
63
|
+
}))]).optional().describe('The agent\'s current whole todo list (the latest `todo/write` snapshot), or `null` before the first write. Whole-value rule: every `todo/write` carries the complete replacement list, so the fold is last-wins.'),
|
|
72
64
|
'sessionListMetadata': z.object({
|
|
73
|
-
'blank': z.boolean().readonly(),
|
|
74
|
-
'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
|
|
75
|
-
}).optional(),
|
|
65
|
+
'blank': z.boolean().readonly().describe('Whether the folded prefix contains no turn.'),
|
|
66
|
+
'lastPromptAt': z.union([z.literal(null), z.number()]).readonly().describe('Latest human-authored prompt time in the folded prefix.'),
|
|
67
|
+
}).optional().describe('Persisted facts used to summarize a Session without activating it.'),
|
|
76
68
|
'imageLimits': z.object({
|
|
77
69
|
'maxImageBytes': z.number(),
|
|
78
70
|
'maxImagesPerMessage': z.number(),
|
|
79
71
|
'maxMessageImageBytes': z.number(),
|
|
80
72
|
'maxImagePixels': z.number(),
|
|
81
|
-
'maxImageDimension': z.number(),
|
|
73
|
+
'maxImageDimension': z.number().describe('Maximum intrinsic width and maximum intrinsic height in pixels for one image.'),
|
|
82
74
|
'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
|
|
83
|
-
}).optional(),
|
|
75
|
+
}).optional().describe('Image-intake limits enforced by the Session prompt endpoint.'),
|
|
84
76
|
'modelSelection': z.object({
|
|
85
77
|
'lastUsed': z.union([z.literal(null), z.object({
|
|
86
78
|
'provider': z.string().readonly(),
|
|
87
79
|
'model': z.string().readonly(),
|
|
88
80
|
'reasoningEffort': z.string().readonly().optional(),
|
|
89
|
-
})]).readonly(),
|
|
81
|
+
})]).readonly().describe('Selection consumed by the latest recorded model request.'),
|
|
90
82
|
'next': z.union([z.literal(null), z.object({
|
|
91
83
|
'provider': z.string().readonly(),
|
|
92
84
|
'model': z.string().readonly(),
|
|
93
85
|
'reasoningEffort': z.string().readonly().optional(),
|
|
94
|
-
})]).readonly(),
|
|
95
|
-
}).optional(),
|
|
86
|
+
})]).readonly().describe('Selection the next request should use, falling back to {@link lastUsed}.'),
|
|
87
|
+
}).optional().describe('Durable model selection already used and selected for the next request.'),
|
|
96
88
|
'permissions': z.object({
|
|
97
|
-
'currentValue': z.string(),
|
|
98
|
-
}).optional(),
|
|
99
|
-
'subagentCatalog': z.array(z.union([z.
|
|
100
|
-
'id': z.
|
|
89
|
+
'currentValue': z.string().describe('The effective current value: a configured preset key, `auto`, or `custom`.'),
|
|
90
|
+
}).optional().describe('The session\'s current permission, folded from the three whole-value knob events (`permission/preset`, `sandbox/mode`, `approval/policy`) over the composition defaults. Selectable options come from the process-level catalog Remote. Key absence means no permission service is composed — clients hide the control.'),
|
|
91
|
+
'subagentCatalog': z.array(z.union([z.object({
|
|
92
|
+
'id': z.string().readonly(),
|
|
101
93
|
'createdAt': z.number().readonly(),
|
|
102
|
-
}), z.object({
|
|
103
94
|
'mode': z.literal("one-shot").readonly(),
|
|
104
95
|
'label': z.string().readonly().optional(),
|
|
105
|
-
})), z.intersection(z.object({
|
|
106
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
107
|
-
'createdAt': z.number().readonly(),
|
|
108
96
|
}), z.object({
|
|
97
|
+
'id': z.string().readonly(),
|
|
98
|
+
'createdAt': z.number().readonly(),
|
|
109
99
|
'mode': z.literal("external").readonly(),
|
|
110
100
|
'label': z.string().readonly().optional(),
|
|
111
|
-
})), z.intersection(z.object({
|
|
112
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
113
|
-
'createdAt': z.number().readonly(),
|
|
114
101
|
}), z.object({
|
|
102
|
+
'id': z.string().readonly(),
|
|
103
|
+
'createdAt': z.number().readonly(),
|
|
115
104
|
'mode': z.literal("continuable").readonly(),
|
|
116
105
|
'label': z.string().readonly(),
|
|
117
|
-
})), z.intersection(z.object({
|
|
118
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
119
|
-
'createdAt': z.number().readonly(),
|
|
120
106
|
}), z.object({
|
|
107
|
+
'id': z.string().readonly(),
|
|
108
|
+
'createdAt': z.number().readonly(),
|
|
121
109
|
'mode': z.literal("unknown").readonly(),
|
|
122
110
|
'label': z.string().readonly().optional(),
|
|
123
|
-
})
|
|
111
|
+
})])).optional().describe('Direct children in parent catalog event order, excluding fork-inherited facts.'),
|
|
124
112
|
'subagentTiming': z.object({
|
|
125
|
-
'settledMs': z.number(),
|
|
113
|
+
'settledMs': z.number().describe('Milliseconds accumulated across completed turns after the child\'s own descriptor.'),
|
|
126
114
|
'active': z.object({
|
|
127
|
-
'since': z.number(),
|
|
128
|
-
'through': z.number(),
|
|
129
|
-
}).optional(),
|
|
130
|
-
'lastTurnCompleted': z.boolean().optional(),
|
|
131
|
-
}).optional(),
|
|
115
|
+
'since': z.number().describe('Start of the open turn.'),
|
|
116
|
+
'through': z.number().describe('Latest event time folded into this projection cut.'),
|
|
117
|
+
}).optional().describe('Same-cut bounds of the currently open turn, when one has not reached `turn/end`.'),
|
|
118
|
+
'lastTurnCompleted': z.boolean().optional().describe('Whether the latest closed turn after the child\'s own descriptor completed normally; absent while a turn is open or before one closes.'),
|
|
119
|
+
}).optional().describe('Active-turn duration and latest closed-turn completion for a descriptor-backed subagent session.'),
|
|
132
120
|
'subagent': z.union([z.literal(null), z.object({
|
|
133
|
-
'mode': z.literal("one-shot"),
|
|
134
|
-
'label': z.string().optional(),
|
|
135
|
-
'seq': z.
|
|
121
|
+
'mode': z.literal("one-shot").describe('A terminal one-shot child.'),
|
|
122
|
+
'label': z.string().optional().describe('Optional durable creation label from the child\'s descriptor.'),
|
|
123
|
+
'seq': z.number().describe('Seq of the `subagent/descriptor` event this identity was folded from. `session.isOwnSeq(seq)` proves the identity comes from the child\'s OWN log suffix — where a descriptor is immutable once appended — and not from a fork seed\'s replayed ancestor descriptor.'),
|
|
136
124
|
}), z.object({
|
|
137
|
-
'mode': z.literal("continuable"),
|
|
138
|
-
'label': z.string(),
|
|
139
|
-
'seq': z.
|
|
140
|
-
})]).optional(),
|
|
125
|
+
'mode': z.literal("continuable").describe('A resumable conversation.'),
|
|
126
|
+
'label': z.string().describe('Durable creation label from the child\'s descriptor.'),
|
|
127
|
+
'seq': z.number().describe('Seq of the folded descriptor event; see the one-shot arm for the own-suffix proof.'),
|
|
128
|
+
})]).optional().describe('Identity of a descriptor-backed subagent session. `null` ⟺ no valid descriptor (missing, malformed, or unrecognized-version — deliberately undistinguished). The sentinel is deliberately serializable: a value pushed over JSON transports must survive `JSON.stringify` losslessly, where an `undefined` field would be dropped and a stale identity would survive on the receiving side. The entry itself stays non-optional.'),
|
|
141
129
|
'tokenUsage': z.object({
|
|
142
130
|
'uncachedInputTokens': z.number(),
|
|
143
131
|
'outputTokens': z.number(),
|
|
144
132
|
'cacheReadTokens': z.number(),
|
|
145
133
|
'cacheWriteTokens': z.number(),
|
|
146
|
-
}).optional(),
|
|
134
|
+
}).optional().describe('Provider-reported usage accumulated across the complete durable log.'),
|
|
147
135
|
'contextPressure': z.object({
|
|
148
|
-
'pressureTokens': z.number().optional(),
|
|
149
|
-
'projectedTokens': z.number().optional(),
|
|
150
|
-
'contextWindow': z.number().optional(),
|
|
151
|
-
}).optional(),
|
|
136
|
+
'pressureTokens': z.number().optional().describe('Provider-reported prompt size of the most recent request: uncached input plus cache reads and writes. Response output is excluded, so this does not grow as the current turn streams. Absent until a provider reports usage.'),
|
|
137
|
+
'projectedTokens': z.number().optional().describe('What the NEXT request\'s prompt would cost: {@link pressureTokens} plus the heuristic repricing of everything the surface gained or lost since that sample. Only the delta is estimated, so the figure stays anchored to the provider while still reacting the moment a compaction shadows a span — which `pressureTokens` alone cannot do, since compaction reports no usage of its own. Absent until a provider reports usage.'),
|
|
138
|
+
'contextWindow': z.number().optional().describe('Newest recorded route capacity; absent when no adapter advertised one.'),
|
|
139
|
+
}).optional().describe('Newest request pressure paired with the newest known route capacity.'),
|
|
152
140
|
'contextBreakdown': z.object({
|
|
153
|
-
'systemTokens': z.number(),
|
|
154
|
-
'toolsTokens': z.number(),
|
|
155
|
-
'messageTokens': z.number(),
|
|
156
|
-
}).optional(),
|
|
141
|
+
'systemTokens': z.number().describe('Heuristic tokens of the last nonempty surviving system prompt in surface order; 0 when none exists.'),
|
|
142
|
+
'toolsTokens': z.number().describe('Heuristic tokens of the newest request envelope\'s tool schemas; 0 before any request.'),
|
|
143
|
+
'messageTokens': z.number().describe('Heuristic tokens of every other visible surface node, including superseded system prompts.'),
|
|
144
|
+
}).optional().describe('Heuristic system/tools/message composition of the next request.'),
|
|
145
|
+
'agentTeam': z.object({
|
|
146
|
+
'members': z.array(z.object({
|
|
147
|
+
'id': z.string().readonly(),
|
|
148
|
+
'name': z.string().readonly(),
|
|
149
|
+
'role': z.union([z.literal("lead"), z.literal("teammate")]).readonly(),
|
|
150
|
+
'phase': z.union([z.literal("failed"), z.literal("provisioning"), z.literal("active")]).readonly().describe('Durable lifecycle; the Lead row is always `active`. Turn activity comes from Session status.'),
|
|
151
|
+
'error': z.string().readonly().optional(),
|
|
152
|
+
})).readonly(),
|
|
153
|
+
'tasks': z.array(z.object({
|
|
154
|
+
'id': z.string().readonly(),
|
|
155
|
+
'revision': z.number().readonly(),
|
|
156
|
+
'subject': z.string().readonly(),
|
|
157
|
+
'description': z.string().readonly(),
|
|
158
|
+
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress"), z.literal("deleted")]).readonly(),
|
|
159
|
+
'blockedBy': z.array(z.string()).readonly(),
|
|
160
|
+
'writeScopes': z.array(z.string()).readonly(),
|
|
161
|
+
'ownerName': z.string().readonly().optional(),
|
|
162
|
+
'ready': z.boolean().readonly(),
|
|
163
|
+
'writeScopeWarnings': z.array(z.string()).readonly(),
|
|
164
|
+
})).readonly(),
|
|
165
|
+
'failure': z.string().readonly().optional(),
|
|
166
|
+
}).optional().describe('Durable roster and non-deleted task board of the Team rooted at the projected Session.'),
|
|
157
167
|
'userQuestions': z.object({
|
|
158
168
|
'active': z.array(z.object({
|
|
159
|
-
'callId': z.
|
|
169
|
+
'callId': z.string().readonly(),
|
|
160
170
|
'questions': z.array(z.object({
|
|
161
|
-
'id': z.string(),
|
|
162
|
-
'question': z.string(),
|
|
163
|
-
'detail': z.string().optional(),
|
|
164
|
-
'header': z.string().optional(),
|
|
171
|
+
'id': z.string().describe('Stable caller-provided question id, echoed in the answer.'),
|
|
172
|
+
'question': z.string().describe('The question to display.'),
|
|
173
|
+
'detail': z.string().optional().describe('Optional supporting detail rendered with the question but kept out of option labels.'),
|
|
174
|
+
'header': z.string().optional().describe('Optional short heading/group label.'),
|
|
165
175
|
'options': z.array(z.object({
|
|
166
|
-
'label': z.string(),
|
|
167
|
-
'description': z.string().optional(),
|
|
168
|
-
})).optional(),
|
|
169
|
-
'multiSelect': z.boolean().optional(),
|
|
176
|
+
'label': z.string().describe('User-facing label.'),
|
|
177
|
+
'description': z.string().optional().describe('Optional extra context rendered by capable UIs.'),
|
|
178
|
+
})).optional().describe('Optional choices the UI can render as a menu.'),
|
|
179
|
+
'multiSelect': z.boolean().optional().describe('Whether more than one option may be selected. Defaults to single-select.'),
|
|
170
180
|
'intent': z.object({
|
|
171
|
-
'kind': z.literal("plan-review"),
|
|
172
|
-
'approve': z.string(),
|
|
173
|
-
'callId': z.
|
|
174
|
-
}).optional(),
|
|
181
|
+
'kind': z.literal("plan-review").describe('A plan submitted for review: `detail` is the plan markdown `ask()` requires, and the decision approves or declines it.'),
|
|
182
|
+
'approve': z.string().describe('The option label that approves the plan; every other option declines it. Named rather than positional so no UI infers the verdict from option order. An `approve` naming no option of its own question is rejected at `ask()`.'),
|
|
183
|
+
'callId': z.string().optional().describe('Logged tool invocation whose arguments contain the reviewed plan.'),
|
|
184
|
+
}).optional().describe('Optional presentation intent for capable UIs; absent asks for the generic option list.'),
|
|
175
185
|
})).readonly(),
|
|
176
186
|
'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
|
|
177
|
-
})).readonly(),
|
|
187
|
+
})).readonly().describe('Calls that can still take an answer, in ask order.'),
|
|
178
188
|
'settled': z.array(z.object({
|
|
179
|
-
'callId': z.
|
|
189
|
+
'callId': z.string().readonly().describe('The settled call.'),
|
|
180
190
|
'answers': z.array(z.object({
|
|
181
|
-
'id': z.string(),
|
|
182
|
-
'selected': z.array(z.string()),
|
|
183
|
-
'custom': z.string().optional(),
|
|
184
|
-
})).readonly(),
|
|
185
|
-
})).readonly(),
|
|
186
|
-
}).optional(),
|
|
191
|
+
'id': z.string().describe('The answered question id.'),
|
|
192
|
+
'selected': z.array(z.string()).describe('Selected option labels. May accompany custom text for a multi-select question.'),
|
|
193
|
+
'custom': z.string().optional().describe('Optional free-text "Other" answer.'),
|
|
194
|
+
})).readonly().describe('The recorded batch, one entry per question; empty when the late reply carried none.'),
|
|
195
|
+
})).readonly().describe('Calls an answer settled, in settlement order.'),
|
|
196
|
+
}).optional().describe('Timed questions that remain answerable in this Session, and the ones a late reply settled.'),
|
|
187
197
|
'goal': z.union([z.literal(null), z.object({
|
|
188
198
|
'goal': z.object({
|
|
189
|
-
'objective': z.string().readonly(),
|
|
190
|
-
'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
|
|
199
|
+
'objective': z.string().readonly().describe('Human-requested completion objective.'),
|
|
200
|
+
'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly().describe('Durable lifecycle phase.'),
|
|
191
201
|
'blockedReason': z.object({
|
|
192
|
-
'code': z.string().readonly(),
|
|
193
|
-
'message': z.string().readonly(),
|
|
194
|
-
}).readonly().optional(),
|
|
195
|
-
'maxGoalRounds': z.number().readonly(),
|
|
196
|
-
'id': z.
|
|
197
|
-
'revision': z.number().readonly(),
|
|
198
|
-
}).readonly(),
|
|
199
|
-
'roundsStarted': z.number().readonly(),
|
|
200
|
-
'createdAt': z.number().readonly(),
|
|
201
|
-
'updatedAt': z.number().readonly(),
|
|
202
|
-
})]).optional(),
|
|
203
|
-
|
|
202
|
+
'code': z.string().readonly().describe('Stable lower-kebab-case classification chosen by the blocking policy.'),
|
|
203
|
+
'message': z.string().readonly().describe('Non-empty explanation shown to humans and models.'),
|
|
204
|
+
}).readonly().optional().describe('Present exactly while `phase` is `blocked`.'),
|
|
205
|
+
'maxGoalRounds': z.number().readonly().describe('Total admitted goal-round cap.'),
|
|
206
|
+
'id': z.string().readonly().describe('Stable goal identity.'),
|
|
207
|
+
'revision': z.number().readonly().describe('Positive revision; every durable mutation increments it.'),
|
|
208
|
+
}).readonly().describe('Current durable goal snapshot (the CAS ref for mutations rides on it).'),
|
|
209
|
+
'roundsStarted': z.number().readonly().describe('Highest admitted round number for this goal.'),
|
|
210
|
+
'createdAt': z.number().readonly().describe('Epoch milliseconds of the create mutation.'),
|
|
211
|
+
'updatedAt': z.number().readonly().describe('Epoch milliseconds of the latest mutation.'),
|
|
212
|
+
})]).optional().describe('The session\'s current goal and admitted-round count, or `null` before the first create and after a clear tombstone. `goal/change` supplies the whole lifecycle value; matching admitted `user/message` events advance `roundsStarted`.'),
|
|
213
|
+
'plan': z.object({
|
|
214
|
+
'active': z.boolean(),
|
|
215
|
+
'pending': z.boolean(),
|
|
216
|
+
}).optional().describe('Plan collaboration state folded from the plan command lifecycle and `plan/mode` events.'),
|
|
217
|
+
}), z.record(z.string(), z.json()).readonly()).readonly().describe('Provider-validated values; omitted keys are absent capabilities at this cut.'),
|
|
204
218
|
})).readonly().readonly(),
|
|
205
219
|
}).readonly(),
|
|
206
|
-
}), z.intersection(z.object({
|
|
207
|
-
'type': z.literal("projection").readonly(),
|
|
208
220
|
}), z.object({
|
|
209
|
-
'
|
|
221
|
+
'type': z.literal("projection").readonly(),
|
|
222
|
+
'sessionId': z.string().readonly(),
|
|
210
223
|
'key': z.string().readonly(),
|
|
211
|
-
'value': z.
|
|
224
|
+
'value': z.json().readonly(),
|
|
212
225
|
'seq': z.number().readonly(),
|
|
213
|
-
})
|
|
226
|
+
})]))
|
|
214
227
|
let _deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema$value
|
|
215
228
|
const _deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema$value ??= z.object({
|
|
216
|
-
'workspaceId': z.
|
|
217
|
-
'cwd': z.string().readonly().optional(),
|
|
218
|
-
'sessionId': z.
|
|
219
|
-
'agentPreset': z.string().readonly().optional(),
|
|
229
|
+
'workspaceId': z.string().readonly().optional().describe('Workspace the Session joins; exclusive with `cwd`.'),
|
|
230
|
+
'cwd': z.string().readonly().optional().describe('Directory the Session owns when no Workspace is named.'),
|
|
231
|
+
'sessionId': z.string().readonly().optional().describe('Blank Session to reuse while it is reusable, or the identity of a new Session when none is stored under it.'),
|
|
232
|
+
'agentPreset': z.string().readonly().optional().describe('Preset the Session runs, replacing a reused Session\'s recorded preset; the configured default when omitted.'),
|
|
220
233
|
}))
|
|
221
234
|
let _deepseek_ai_dsh_api_session_controller_session_create_result$schema$value
|
|
222
235
|
const _deepseek_ai_dsh_api_session_controller_session_create_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_create_result$schema$value ??= z.object({
|
|
223
|
-
'sessionId': z.
|
|
224
|
-
'agentPreset': z.string().readonly().optional(),
|
|
236
|
+
'sessionId': z.string().readonly().describe('The created or reused Session, which may differ from the requested `sessionId`.'),
|
|
237
|
+
'agentPreset': z.string().readonly().optional().describe('Preset the Session runs, when the deployment composes a preset roster.'),
|
|
225
238
|
}))
|
|
226
239
|
let _deepseek_ai_dsh_api_session_controller_session_follow_parameter_0$schema$value
|
|
227
240
|
const _deepseek_ai_dsh_api_session_controller_session_follow_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_follow_parameter_0$schema$value ??= z.object({
|
|
228
241
|
'address': z.union([z.object({
|
|
229
242
|
'kind': z.literal("session").readonly(),
|
|
230
|
-
'sessionId': z.
|
|
243
|
+
'sessionId': z.string().readonly(),
|
|
231
244
|
}), z.object({
|
|
232
245
|
'kind': z.literal("subagent").readonly(),
|
|
233
|
-
'parentSessionId': z.
|
|
234
|
-
'childSessionId': z.
|
|
246
|
+
'parentSessionId': z.string().readonly(),
|
|
247
|
+
'childSessionId': z.string().readonly(),
|
|
235
248
|
'mode': z.union([z.literal("one-shot"), z.literal("continuable"), z.literal("unknown")]).readonly(),
|
|
236
249
|
})]).readonly(),
|
|
237
|
-
'assistantStream': z.literal(true).readonly().optional(),
|
|
250
|
+
'assistantStream': z.literal(true).readonly().optional().describe('Include process-local assistant presentation frames for the Web client.'),
|
|
238
251
|
'maxMessages': z.number().readonly().optional(),
|
|
239
252
|
'turnWindow': z.object({
|
|
240
|
-
'minMessages': z.number().readonly(),
|
|
241
|
-
'minTurns': z.number().readonly(),
|
|
242
|
-
}).readonly().optional(),
|
|
253
|
+
'minMessages': z.number().readonly().describe('Minimum append-origin user/assistant messages; must not exceed maxMessages.'),
|
|
254
|
+
'minTurns': z.number().readonly().describe('Minimum Turn starts crossed, including the partial Turn at beforeSeq.'),
|
|
255
|
+
}).readonly().optional().describe('Stop at a Turn start after both minima, unless maxMessages or history exhaustion wins.'),
|
|
243
256
|
}))
|
|
244
257
|
let _deepseek_ai_dsh_api_session_controller_session_follow_result$schema$value
|
|
245
258
|
const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_follow_result$schema$value ??= z.union([z.object({
|
|
@@ -248,20 +261,20 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
|
|
|
248
261
|
'type': z.string().readonly(),
|
|
249
262
|
'seq': z.number().readonly(),
|
|
250
263
|
'time': z.number().readonly(),
|
|
251
|
-
'data': z.
|
|
264
|
+
'data': z.json().readonly(),
|
|
252
265
|
'ignorable': z.literal(true).readonly().optional(),
|
|
253
|
-
'sourceEventSeqs': z.
|
|
254
|
-
'surfaceOp': z.
|
|
266
|
+
'sourceEventSeqs': z.json().readonly().optional().describe('Earlier sources on current surface events; opaque JSON on unknown ignorable events.'),
|
|
267
|
+
'surfaceOp': z.json().readonly().optional().describe('Canonical placement on current surface events; opaque JSON on unknown ignorable events.'),
|
|
255
268
|
}).readonly(),
|
|
256
269
|
}), z.object({
|
|
257
270
|
'type': z.literal("snapshot").readonly(),
|
|
258
271
|
'header': z.object({
|
|
259
272
|
'version': z.number().readonly(),
|
|
260
|
-
'id': z.
|
|
273
|
+
'id': z.string().readonly(),
|
|
261
274
|
'createdAt': z.number().readonly(),
|
|
262
275
|
'cwd': z.string().readonly().optional(),
|
|
263
|
-
'parentSession': z.
|
|
264
|
-
'isSeeded': z.boolean().readonly(),
|
|
276
|
+
'parentSession': z.string().readonly().optional(),
|
|
277
|
+
'isSeeded': z.boolean().readonly().describe('Whether the Session contains a fork-inherited prefix.'),
|
|
265
278
|
'origin': z.literal("subagent").readonly().optional(),
|
|
266
279
|
'delegationDepth': z.number().readonly().optional(),
|
|
267
280
|
'agentPreset': z.string().readonly().optional(),
|
|
@@ -273,10 +286,10 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
|
|
|
273
286
|
'type': z.string().readonly(),
|
|
274
287
|
'seq': z.number().readonly(),
|
|
275
288
|
'time': z.number().readonly(),
|
|
276
|
-
'data': z.
|
|
289
|
+
'data': z.json().readonly(),
|
|
277
290
|
'ignorable': z.literal(true).readonly().optional(),
|
|
278
|
-
'sourceEventSeqs': z.
|
|
279
|
-
'surfaceOp': z.
|
|
291
|
+
'sourceEventSeqs': z.json().readonly().optional().describe('Earlier sources on current surface events; opaque JSON on unknown ignorable events.'),
|
|
292
|
+
'surfaceOp': z.json().readonly().optional().describe('Canonical placement on current surface events; opaque JSON on unknown ignorable events.'),
|
|
280
293
|
}).readonly(),
|
|
281
294
|
})).readonly(),
|
|
282
295
|
'hasMore': z.boolean().readonly(),
|
|
@@ -284,181 +297,203 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
|
|
|
284
297
|
'asOfSeq': z.number().readonly(),
|
|
285
298
|
'values': z.intersection(z.object({
|
|
286
299
|
'inbox': z.object({
|
|
287
|
-
'next-turn': z.array(z.
|
|
288
|
-
'next-step': z.array(z.
|
|
289
|
-
}).optional(),
|
|
290
|
-
'workingDirectory': z.union([z.literal(null), z.string()]).optional(),
|
|
291
|
-
'agentPreset': z.union([z.literal(null), z.string()]).optional(),
|
|
292
|
-
'title': z.union([z.literal(null), z.string()]).optional(),
|
|
300
|
+
'next-turn': z.array(z.json()).readonly(),
|
|
301
|
+
'next-step': z.array(z.json()).readonly(),
|
|
302
|
+
}).optional().describe('Pending agent input reconstructed from durable inbox splices.'),
|
|
303
|
+
'workingDirectory': z.union([z.literal(null), z.string()]).optional().describe('Recorded current directory for Session observations, or null when none is recorded.'),
|
|
304
|
+
'agentPreset': z.union([z.literal(null), z.string()]).optional().describe('Preset the Session runs, or null when the deployment composes none.'),
|
|
305
|
+
'title': z.union([z.literal(null), z.string()]).optional().describe('The session\'s current normalized title — the latest `session/title` event\'s text (last-wins), or `null` before the first title lands. A plain string: the shape the client list rows consume.'),
|
|
293
306
|
'todos': z.union([z.literal(null), z.array(z.object({
|
|
294
|
-
'content': z.string(),
|
|
295
|
-
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]),
|
|
296
|
-
}))]).optional(),
|
|
307
|
+
'content': z.string().describe('What this task is — a short imperative line shown in the UI.'),
|
|
308
|
+
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]).describe('Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several.'),
|
|
309
|
+
}))]).optional().describe('The agent\'s current whole todo list (the latest `todo/write` snapshot), or `null` before the first write. Whole-value rule: every `todo/write` carries the complete replacement list, so the fold is last-wins.'),
|
|
297
310
|
'sessionListMetadata': z.object({
|
|
298
|
-
'blank': z.boolean().readonly(),
|
|
299
|
-
'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
|
|
300
|
-
}).optional(),
|
|
311
|
+
'blank': z.boolean().readonly().describe('Whether the folded prefix contains no turn.'),
|
|
312
|
+
'lastPromptAt': z.union([z.literal(null), z.number()]).readonly().describe('Latest human-authored prompt time in the folded prefix.'),
|
|
313
|
+
}).optional().describe('Persisted facts used to summarize a Session without activating it.'),
|
|
301
314
|
'imageLimits': z.object({
|
|
302
315
|
'maxImageBytes': z.number(),
|
|
303
316
|
'maxImagesPerMessage': z.number(),
|
|
304
317
|
'maxMessageImageBytes': z.number(),
|
|
305
318
|
'maxImagePixels': z.number(),
|
|
306
|
-
'maxImageDimension': z.number(),
|
|
319
|
+
'maxImageDimension': z.number().describe('Maximum intrinsic width and maximum intrinsic height in pixels for one image.'),
|
|
307
320
|
'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
|
|
308
|
-
}).optional(),
|
|
321
|
+
}).optional().describe('Image-intake limits enforced by the Session prompt endpoint.'),
|
|
309
322
|
'modelSelection': z.object({
|
|
310
323
|
'lastUsed': z.union([z.literal(null), z.object({
|
|
311
324
|
'provider': z.string().readonly(),
|
|
312
325
|
'model': z.string().readonly(),
|
|
313
326
|
'reasoningEffort': z.string().readonly().optional(),
|
|
314
|
-
})]).readonly(),
|
|
327
|
+
})]).readonly().describe('Selection consumed by the latest recorded model request.'),
|
|
315
328
|
'next': z.union([z.literal(null), z.object({
|
|
316
329
|
'provider': z.string().readonly(),
|
|
317
330
|
'model': z.string().readonly(),
|
|
318
331
|
'reasoningEffort': z.string().readonly().optional(),
|
|
319
|
-
})]).readonly(),
|
|
320
|
-
}).optional(),
|
|
332
|
+
})]).readonly().describe('Selection the next request should use, falling back to {@link lastUsed}.'),
|
|
333
|
+
}).optional().describe('Durable model selection already used and selected for the next request.'),
|
|
321
334
|
'permissions': z.object({
|
|
322
|
-
'currentValue': z.string(),
|
|
323
|
-
}).optional(),
|
|
324
|
-
'subagentCatalog': z.array(z.union([z.
|
|
325
|
-
'id': z.
|
|
335
|
+
'currentValue': z.string().describe('The effective current value: a configured preset key, `auto`, or `custom`.'),
|
|
336
|
+
}).optional().describe('The session\'s current permission, folded from the three whole-value knob events (`permission/preset`, `sandbox/mode`, `approval/policy`) over the composition defaults. Selectable options come from the process-level catalog Remote. Key absence means no permission service is composed — clients hide the control.'),
|
|
337
|
+
'subagentCatalog': z.array(z.union([z.object({
|
|
338
|
+
'id': z.string().readonly(),
|
|
326
339
|
'createdAt': z.number().readonly(),
|
|
327
|
-
}), z.object({
|
|
328
340
|
'mode': z.literal("one-shot").readonly(),
|
|
329
341
|
'label': z.string().readonly().optional(),
|
|
330
|
-
})), z.intersection(z.object({
|
|
331
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
332
|
-
'createdAt': z.number().readonly(),
|
|
333
342
|
}), z.object({
|
|
343
|
+
'id': z.string().readonly(),
|
|
344
|
+
'createdAt': z.number().readonly(),
|
|
334
345
|
'mode': z.literal("external").readonly(),
|
|
335
346
|
'label': z.string().readonly().optional(),
|
|
336
|
-
})), z.intersection(z.object({
|
|
337
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
338
|
-
'createdAt': z.number().readonly(),
|
|
339
347
|
}), z.object({
|
|
348
|
+
'id': z.string().readonly(),
|
|
349
|
+
'createdAt': z.number().readonly(),
|
|
340
350
|
'mode': z.literal("continuable").readonly(),
|
|
341
351
|
'label': z.string().readonly(),
|
|
342
|
-
})), z.intersection(z.object({
|
|
343
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
344
|
-
'createdAt': z.number().readonly(),
|
|
345
352
|
}), z.object({
|
|
353
|
+
'id': z.string().readonly(),
|
|
354
|
+
'createdAt': z.number().readonly(),
|
|
346
355
|
'mode': z.literal("unknown").readonly(),
|
|
347
356
|
'label': z.string().readonly().optional(),
|
|
348
|
-
})
|
|
357
|
+
})])).optional().describe('Direct children in parent catalog event order, excluding fork-inherited facts.'),
|
|
349
358
|
'subagentTiming': z.object({
|
|
350
|
-
'settledMs': z.number(),
|
|
359
|
+
'settledMs': z.number().describe('Milliseconds accumulated across completed turns after the child\'s own descriptor.'),
|
|
351
360
|
'active': z.object({
|
|
352
|
-
'since': z.number(),
|
|
353
|
-
'through': z.number(),
|
|
354
|
-
}).optional(),
|
|
355
|
-
'lastTurnCompleted': z.boolean().optional(),
|
|
356
|
-
}).optional(),
|
|
361
|
+
'since': z.number().describe('Start of the open turn.'),
|
|
362
|
+
'through': z.number().describe('Latest event time folded into this projection cut.'),
|
|
363
|
+
}).optional().describe('Same-cut bounds of the currently open turn, when one has not reached `turn/end`.'),
|
|
364
|
+
'lastTurnCompleted': z.boolean().optional().describe('Whether the latest closed turn after the child\'s own descriptor completed normally; absent while a turn is open or before one closes.'),
|
|
365
|
+
}).optional().describe('Active-turn duration and latest closed-turn completion for a descriptor-backed subagent session.'),
|
|
357
366
|
'subagent': z.union([z.literal(null), z.object({
|
|
358
|
-
'mode': z.literal("one-shot"),
|
|
359
|
-
'label': z.string().optional(),
|
|
360
|
-
'seq': z.
|
|
367
|
+
'mode': z.literal("one-shot").describe('A terminal one-shot child.'),
|
|
368
|
+
'label': z.string().optional().describe('Optional durable creation label from the child\'s descriptor.'),
|
|
369
|
+
'seq': z.number().describe('Seq of the `subagent/descriptor` event this identity was folded from. `session.isOwnSeq(seq)` proves the identity comes from the child\'s OWN log suffix — where a descriptor is immutable once appended — and not from a fork seed\'s replayed ancestor descriptor.'),
|
|
361
370
|
}), z.object({
|
|
362
|
-
'mode': z.literal("continuable"),
|
|
363
|
-
'label': z.string(),
|
|
364
|
-
'seq': z.
|
|
365
|
-
})]).optional(),
|
|
371
|
+
'mode': z.literal("continuable").describe('A resumable conversation.'),
|
|
372
|
+
'label': z.string().describe('Durable creation label from the child\'s descriptor.'),
|
|
373
|
+
'seq': z.number().describe('Seq of the folded descriptor event; see the one-shot arm for the own-suffix proof.'),
|
|
374
|
+
})]).optional().describe('Identity of a descriptor-backed subagent session. `null` ⟺ no valid descriptor (missing, malformed, or unrecognized-version — deliberately undistinguished). The sentinel is deliberately serializable: a value pushed over JSON transports must survive `JSON.stringify` losslessly, where an `undefined` field would be dropped and a stale identity would survive on the receiving side. The entry itself stays non-optional.'),
|
|
366
375
|
'tokenUsage': z.object({
|
|
367
376
|
'uncachedInputTokens': z.number(),
|
|
368
377
|
'outputTokens': z.number(),
|
|
369
378
|
'cacheReadTokens': z.number(),
|
|
370
379
|
'cacheWriteTokens': z.number(),
|
|
371
|
-
}).optional(),
|
|
380
|
+
}).optional().describe('Provider-reported usage accumulated across the complete durable log.'),
|
|
372
381
|
'contextPressure': z.object({
|
|
373
|
-
'pressureTokens': z.number().optional(),
|
|
374
|
-
'projectedTokens': z.number().optional(),
|
|
375
|
-
'contextWindow': z.number().optional(),
|
|
376
|
-
}).optional(),
|
|
382
|
+
'pressureTokens': z.number().optional().describe('Provider-reported prompt size of the most recent request: uncached input plus cache reads and writes. Response output is excluded, so this does not grow as the current turn streams. Absent until a provider reports usage.'),
|
|
383
|
+
'projectedTokens': z.number().optional().describe('What the NEXT request\'s prompt would cost: {@link pressureTokens} plus the heuristic repricing of everything the surface gained or lost since that sample. Only the delta is estimated, so the figure stays anchored to the provider while still reacting the moment a compaction shadows a span — which `pressureTokens` alone cannot do, since compaction reports no usage of its own. Absent until a provider reports usage.'),
|
|
384
|
+
'contextWindow': z.number().optional().describe('Newest recorded route capacity; absent when no adapter advertised one.'),
|
|
385
|
+
}).optional().describe('Newest request pressure paired with the newest known route capacity.'),
|
|
377
386
|
'contextBreakdown': z.object({
|
|
378
|
-
'systemTokens': z.number(),
|
|
379
|
-
'toolsTokens': z.number(),
|
|
380
|
-
'messageTokens': z.number(),
|
|
381
|
-
}).optional(),
|
|
387
|
+
'systemTokens': z.number().describe('Heuristic tokens of the last nonempty surviving system prompt in surface order; 0 when none exists.'),
|
|
388
|
+
'toolsTokens': z.number().describe('Heuristic tokens of the newest request envelope\'s tool schemas; 0 before any request.'),
|
|
389
|
+
'messageTokens': z.number().describe('Heuristic tokens of every other visible surface node, including superseded system prompts.'),
|
|
390
|
+
}).optional().describe('Heuristic system/tools/message composition of the next request.'),
|
|
391
|
+
'agentTeam': z.object({
|
|
392
|
+
'members': z.array(z.object({
|
|
393
|
+
'id': z.string().readonly(),
|
|
394
|
+
'name': z.string().readonly(),
|
|
395
|
+
'role': z.union([z.literal("lead"), z.literal("teammate")]).readonly(),
|
|
396
|
+
'phase': z.union([z.literal("failed"), z.literal("provisioning"), z.literal("active")]).readonly().describe('Durable lifecycle; the Lead row is always `active`. Turn activity comes from Session status.'),
|
|
397
|
+
'error': z.string().readonly().optional(),
|
|
398
|
+
})).readonly(),
|
|
399
|
+
'tasks': z.array(z.object({
|
|
400
|
+
'id': z.string().readonly(),
|
|
401
|
+
'revision': z.number().readonly(),
|
|
402
|
+
'subject': z.string().readonly(),
|
|
403
|
+
'description': z.string().readonly(),
|
|
404
|
+
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress"), z.literal("deleted")]).readonly(),
|
|
405
|
+
'blockedBy': z.array(z.string()).readonly(),
|
|
406
|
+
'writeScopes': z.array(z.string()).readonly(),
|
|
407
|
+
'ownerName': z.string().readonly().optional(),
|
|
408
|
+
'ready': z.boolean().readonly(),
|
|
409
|
+
'writeScopeWarnings': z.array(z.string()).readonly(),
|
|
410
|
+
})).readonly(),
|
|
411
|
+
'failure': z.string().readonly().optional(),
|
|
412
|
+
}).optional().describe('Durable roster and non-deleted task board of the Team rooted at the projected Session.'),
|
|
382
413
|
'userQuestions': z.object({
|
|
383
414
|
'active': z.array(z.object({
|
|
384
|
-
'callId': z.
|
|
415
|
+
'callId': z.string().readonly(),
|
|
385
416
|
'questions': z.array(z.object({
|
|
386
|
-
'id': z.string(),
|
|
387
|
-
'question': z.string(),
|
|
388
|
-
'detail': z.string().optional(),
|
|
389
|
-
'header': z.string().optional(),
|
|
417
|
+
'id': z.string().describe('Stable caller-provided question id, echoed in the answer.'),
|
|
418
|
+
'question': z.string().describe('The question to display.'),
|
|
419
|
+
'detail': z.string().optional().describe('Optional supporting detail rendered with the question but kept out of option labels.'),
|
|
420
|
+
'header': z.string().optional().describe('Optional short heading/group label.'),
|
|
390
421
|
'options': z.array(z.object({
|
|
391
|
-
'label': z.string(),
|
|
392
|
-
'description': z.string().optional(),
|
|
393
|
-
})).optional(),
|
|
394
|
-
'multiSelect': z.boolean().optional(),
|
|
422
|
+
'label': z.string().describe('User-facing label.'),
|
|
423
|
+
'description': z.string().optional().describe('Optional extra context rendered by capable UIs.'),
|
|
424
|
+
})).optional().describe('Optional choices the UI can render as a menu.'),
|
|
425
|
+
'multiSelect': z.boolean().optional().describe('Whether more than one option may be selected. Defaults to single-select.'),
|
|
395
426
|
'intent': z.object({
|
|
396
|
-
'kind': z.literal("plan-review"),
|
|
397
|
-
'approve': z.string(),
|
|
398
|
-
'callId': z.
|
|
399
|
-
}).optional(),
|
|
427
|
+
'kind': z.literal("plan-review").describe('A plan submitted for review: `detail` is the plan markdown `ask()` requires, and the decision approves or declines it.'),
|
|
428
|
+
'approve': z.string().describe('The option label that approves the plan; every other option declines it. Named rather than positional so no UI infers the verdict from option order. An `approve` naming no option of its own question is rejected at `ask()`.'),
|
|
429
|
+
'callId': z.string().optional().describe('Logged tool invocation whose arguments contain the reviewed plan.'),
|
|
430
|
+
}).optional().describe('Optional presentation intent for capable UIs; absent asks for the generic option list.'),
|
|
400
431
|
})).readonly(),
|
|
401
432
|
'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
|
|
402
|
-
})).readonly(),
|
|
433
|
+
})).readonly().describe('Calls that can still take an answer, in ask order.'),
|
|
403
434
|
'settled': z.array(z.object({
|
|
404
|
-
'callId': z.
|
|
435
|
+
'callId': z.string().readonly().describe('The settled call.'),
|
|
405
436
|
'answers': z.array(z.object({
|
|
406
|
-
'id': z.string(),
|
|
407
|
-
'selected': z.array(z.string()),
|
|
408
|
-
'custom': z.string().optional(),
|
|
409
|
-
})).readonly(),
|
|
410
|
-
})).readonly(),
|
|
411
|
-
}).optional(),
|
|
437
|
+
'id': z.string().describe('The answered question id.'),
|
|
438
|
+
'selected': z.array(z.string()).describe('Selected option labels. May accompany custom text for a multi-select question.'),
|
|
439
|
+
'custom': z.string().optional().describe('Optional free-text "Other" answer.'),
|
|
440
|
+
})).readonly().describe('The recorded batch, one entry per question; empty when the late reply carried none.'),
|
|
441
|
+
})).readonly().describe('Calls an answer settled, in settlement order.'),
|
|
442
|
+
}).optional().describe('Timed questions that remain answerable in this Session, and the ones a late reply settled.'),
|
|
412
443
|
'goal': z.union([z.literal(null), z.object({
|
|
413
444
|
'goal': z.object({
|
|
414
|
-
'objective': z.string().readonly(),
|
|
415
|
-
'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
|
|
445
|
+
'objective': z.string().readonly().describe('Human-requested completion objective.'),
|
|
446
|
+
'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly().describe('Durable lifecycle phase.'),
|
|
416
447
|
'blockedReason': z.object({
|
|
417
|
-
'code': z.string().readonly(),
|
|
418
|
-
'message': z.string().readonly(),
|
|
419
|
-
}).readonly().optional(),
|
|
420
|
-
'maxGoalRounds': z.number().readonly(),
|
|
421
|
-
'id': z.
|
|
422
|
-
'revision': z.number().readonly(),
|
|
423
|
-
}).readonly(),
|
|
424
|
-
'roundsStarted': z.number().readonly(),
|
|
425
|
-
'createdAt': z.number().readonly(),
|
|
426
|
-
'updatedAt': z.number().readonly(),
|
|
427
|
-
})]).optional(),
|
|
428
|
-
|
|
448
|
+
'code': z.string().readonly().describe('Stable lower-kebab-case classification chosen by the blocking policy.'),
|
|
449
|
+
'message': z.string().readonly().describe('Non-empty explanation shown to humans and models.'),
|
|
450
|
+
}).readonly().optional().describe('Present exactly while `phase` is `blocked`.'),
|
|
451
|
+
'maxGoalRounds': z.number().readonly().describe('Total admitted goal-round cap.'),
|
|
452
|
+
'id': z.string().readonly().describe('Stable goal identity.'),
|
|
453
|
+
'revision': z.number().readonly().describe('Positive revision; every durable mutation increments it.'),
|
|
454
|
+
}).readonly().describe('Current durable goal snapshot (the CAS ref for mutations rides on it).'),
|
|
455
|
+
'roundsStarted': z.number().readonly().describe('Highest admitted round number for this goal.'),
|
|
456
|
+
'createdAt': z.number().readonly().describe('Epoch milliseconds of the create mutation.'),
|
|
457
|
+
'updatedAt': z.number().readonly().describe('Epoch milliseconds of the latest mutation.'),
|
|
458
|
+
})]).optional().describe('The session\'s current goal and admitted-round count, or `null` before the first create and after a clear tombstone. `goal/change` supplies the whole lifecycle value; matching admitted `user/message` events advance `roundsStarted`.'),
|
|
459
|
+
'plan': z.object({
|
|
460
|
+
'active': z.boolean(),
|
|
461
|
+
'pending': z.boolean(),
|
|
462
|
+
}).optional().describe('Plan collaboration state folded from the plan command lifecycle and `plan/mode` events.'),
|
|
463
|
+
}), z.record(z.string(), z.json()).readonly()).readonly().describe('Provider-validated values; omitted keys are absent capabilities at this cut.'),
|
|
429
464
|
}).readonly(),
|
|
430
465
|
'assistantStream': z.object({
|
|
431
466
|
'revision': z.number().readonly(),
|
|
432
467
|
'activeAttempt': z.object({
|
|
433
|
-
'attemptId': z.
|
|
434
|
-
'startedAfterSeq': z.union([z.
|
|
468
|
+
'attemptId': z.string().readonly(),
|
|
469
|
+
'startedAfterSeq': z.union([z.number(), z.literal(-1)]).readonly().describe('Last durable Session seq observed when this attempt started.'),
|
|
435
470
|
'turn': z.number().readonly(),
|
|
436
471
|
'step': z.number().readonly(),
|
|
437
|
-
'nextIndex': z.number().readonly(),
|
|
438
|
-
'stream': z.array(z.
|
|
472
|
+
'nextIndex': z.number().readonly().describe('Dense position expected for the next live chunk frame.'),
|
|
473
|
+
'stream': z.array(z.json()).readonly().describe('Compact detached stream accumulated at this opening revision.'),
|
|
439
474
|
}).readonly().optional(),
|
|
440
475
|
}).readonly().optional(),
|
|
441
476
|
}), z.object({
|
|
442
477
|
'type': z.literal("assistant-stream").readonly(),
|
|
443
478
|
'frame': z.union([z.object({
|
|
444
479
|
'type': z.literal("start").readonly(),
|
|
445
|
-
'attemptId': z.
|
|
480
|
+
'attemptId': z.string().readonly(),
|
|
446
481
|
'revision': z.number().readonly(),
|
|
447
|
-
'startedAfterSeq': z.union([z.
|
|
482
|
+
'startedAfterSeq': z.union([z.number(), z.literal(-1)]).readonly(),
|
|
448
483
|
'turn': z.number().readonly(),
|
|
449
484
|
'step': z.number().readonly(),
|
|
450
485
|
}), z.object({
|
|
451
486
|
'type': z.literal("chunk").readonly(),
|
|
452
|
-
'attemptId': z.
|
|
487
|
+
'attemptId': z.string().readonly(),
|
|
453
488
|
'revision': z.number().readonly(),
|
|
454
489
|
'index': z.number().readonly(),
|
|
455
490
|
'time': z.number().readonly(),
|
|
456
|
-
'chunk': z.
|
|
491
|
+
'chunk': z.json().readonly(),
|
|
457
492
|
}), z.object({
|
|
458
493
|
'type': z.literal("end").readonly(),
|
|
459
|
-
'attemptId': z.
|
|
494
|
+
'attemptId': z.string().readonly(),
|
|
460
495
|
'revision': z.number().readonly(),
|
|
461
|
-
'index': z.number().readonly(),
|
|
496
|
+
'index': z.number().readonly().describe('Number of chunk frames represented by this terminal marker.'),
|
|
462
497
|
'outcome': z.union([z.object({
|
|
463
498
|
'kind': z.literal("committed").readonly(),
|
|
464
499
|
'eventType': z.union([z.literal("assistant/message"), z.literal("assistant/attempt")]).readonly(),
|
|
@@ -470,13 +505,13 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
|
|
|
470
505
|
})]))
|
|
471
506
|
let _deepseek_ai_dsh_api_session_controller_session_fork_parameter_0$schema$value
|
|
472
507
|
const _deepseek_ai_dsh_api_session_controller_session_fork_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_fork_parameter_0$schema$value ??= z.object({
|
|
473
|
-
'sessionId': z.
|
|
474
|
-
'atSeq': z.number().readonly().optional(),
|
|
475
|
-
'allowMigration': z.boolean().readonly().optional(),
|
|
508
|
+
'sessionId': z.string().readonly(),
|
|
509
|
+
'atSeq': z.number().readonly().optional().describe('Exact inclusive source event seq; omission selects the latest completed-turn prefix.'),
|
|
510
|
+
'allowMigration': z.boolean().readonly().optional().describe('False asks the Host to check for required migration before forking. Defaults to true.'),
|
|
476
511
|
}))
|
|
477
512
|
let _deepseek_ai_dsh_api_session_controller_session_fork_result$schema$value
|
|
478
513
|
const _deepseek_ai_dsh_api_session_controller_session_fork_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_fork_result$schema$value ??= z.object({
|
|
479
|
-
'sessionId': z.
|
|
514
|
+
'sessionId': z.string().readonly(),
|
|
480
515
|
}))
|
|
481
516
|
let _deepseek_ai_dsh_api_session_controller_session_initializeDefaultModel_result$schema$value
|
|
482
517
|
const _deepseek_ai_dsh_api_session_controller_session_initializeDefaultModel_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_initializeDefaultModel_result$schema$value ??= z.void())
|
|
@@ -487,162 +522,184 @@ const _deepseek_ai_dsh_api_session_controller_session_list_parameter_0$schema =
|
|
|
487
522
|
let _deepseek_ai_dsh_api_session_controller_session_list_result$schema$value
|
|
488
523
|
const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_list_result$schema$value ??= z.object({
|
|
489
524
|
'items': z.array(z.object({
|
|
490
|
-
'agentAvailable': z.boolean().readonly(),
|
|
491
|
-
'formatStatus': z.union([z.literal("current"), z.literal("migration-required")]).readonly().optional(),
|
|
492
|
-
'sessionId': z.
|
|
525
|
+
'agentAvailable': z.boolean().readonly().describe('Whether this Session currently owns a live Agent.'),
|
|
526
|
+
'formatStatus': z.union([z.literal("current"), z.literal("migration-required")]).readonly().optional().describe('Current for attached Sessions; otherwise the persistence format status when reported.'),
|
|
527
|
+
'sessionId': z.string().readonly(),
|
|
493
528
|
'updatedAt': z.number().readonly(),
|
|
494
529
|
'running': z.boolean().readonly(),
|
|
495
530
|
'blank': z.boolean().readonly(),
|
|
496
|
-
'parentSessionId': z.
|
|
531
|
+
'parentSessionId': z.string().readonly().optional(),
|
|
497
532
|
'origin': z.literal("subagent").readonly().optional(),
|
|
498
533
|
'cwd': z.string().readonly().optional(),
|
|
499
534
|
'projections': z.object({
|
|
500
|
-
'kind': z.union([z.literal("cached"), z.literal("sequenced")]).readonly(),
|
|
501
|
-
'asOfSeq': z.number().readonly(),
|
|
535
|
+
'kind': z.union([z.literal("cached"), z.literal("sequenced")]).readonly().describe('`sequenced`: the Host\'s live registry produced the block for an attached Session, so `asOfSeq` is comparable with baselines and frames of the same connection. `cached`: a header-only listing viewed the block from the persisted projection cache, so `asOfSeq` is the stored record\'s own watermark and must not be compared with the connected Session\'s values.'),
|
|
536
|
+
'asOfSeq': z.number().readonly().describe('Watermark of the block in the sequence space named by `kind`.'),
|
|
502
537
|
'values': z.intersection(z.object({
|
|
503
538
|
'inbox': z.object({
|
|
504
|
-
'next-turn': z.array(z.
|
|
505
|
-
'next-step': z.array(z.
|
|
506
|
-
}).optional(),
|
|
507
|
-
'workingDirectory': z.union([z.literal(null), z.string()]).optional(),
|
|
508
|
-
'agentPreset': z.union([z.literal(null), z.string()]).optional(),
|
|
509
|
-
'title': z.union([z.literal(null), z.string()]).optional(),
|
|
539
|
+
'next-turn': z.array(z.json()).readonly(),
|
|
540
|
+
'next-step': z.array(z.json()).readonly(),
|
|
541
|
+
}).optional().describe('Pending agent input reconstructed from durable inbox splices.'),
|
|
542
|
+
'workingDirectory': z.union([z.literal(null), z.string()]).optional().describe('Recorded current directory for Session observations, or null when none is recorded.'),
|
|
543
|
+
'agentPreset': z.union([z.literal(null), z.string()]).optional().describe('Preset the Session runs, or null when the deployment composes none.'),
|
|
544
|
+
'title': z.union([z.literal(null), z.string()]).optional().describe('The session\'s current normalized title — the latest `session/title` event\'s text (last-wins), or `null` before the first title lands. A plain string: the shape the client list rows consume.'),
|
|
510
545
|
'todos': z.union([z.literal(null), z.array(z.object({
|
|
511
|
-
'content': z.string(),
|
|
512
|
-
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]),
|
|
513
|
-
}))]).optional(),
|
|
546
|
+
'content': z.string().describe('What this task is — a short imperative line shown in the UI.'),
|
|
547
|
+
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]).describe('Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several.'),
|
|
548
|
+
}))]).optional().describe('The agent\'s current whole todo list (the latest `todo/write` snapshot), or `null` before the first write. Whole-value rule: every `todo/write` carries the complete replacement list, so the fold is last-wins.'),
|
|
514
549
|
'sessionListMetadata': z.object({
|
|
515
|
-
'blank': z.boolean().readonly(),
|
|
516
|
-
'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
|
|
517
|
-
}).optional(),
|
|
550
|
+
'blank': z.boolean().readonly().describe('Whether the folded prefix contains no turn.'),
|
|
551
|
+
'lastPromptAt': z.union([z.literal(null), z.number()]).readonly().describe('Latest human-authored prompt time in the folded prefix.'),
|
|
552
|
+
}).optional().describe('Persisted facts used to summarize a Session without activating it.'),
|
|
518
553
|
'imageLimits': z.object({
|
|
519
554
|
'maxImageBytes': z.number(),
|
|
520
555
|
'maxImagesPerMessage': z.number(),
|
|
521
556
|
'maxMessageImageBytes': z.number(),
|
|
522
557
|
'maxImagePixels': z.number(),
|
|
523
|
-
'maxImageDimension': z.number(),
|
|
558
|
+
'maxImageDimension': z.number().describe('Maximum intrinsic width and maximum intrinsic height in pixels for one image.'),
|
|
524
559
|
'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
|
|
525
|
-
}).optional(),
|
|
560
|
+
}).optional().describe('Image-intake limits enforced by the Session prompt endpoint.'),
|
|
526
561
|
'modelSelection': z.object({
|
|
527
562
|
'lastUsed': z.union([z.literal(null), z.object({
|
|
528
563
|
'provider': z.string().readonly(),
|
|
529
564
|
'model': z.string().readonly(),
|
|
530
565
|
'reasoningEffort': z.string().readonly().optional(),
|
|
531
|
-
})]).readonly(),
|
|
566
|
+
})]).readonly().describe('Selection consumed by the latest recorded model request.'),
|
|
532
567
|
'next': z.union([z.literal(null), z.object({
|
|
533
568
|
'provider': z.string().readonly(),
|
|
534
569
|
'model': z.string().readonly(),
|
|
535
570
|
'reasoningEffort': z.string().readonly().optional(),
|
|
536
|
-
})]).readonly(),
|
|
537
|
-
}).optional(),
|
|
571
|
+
})]).readonly().describe('Selection the next request should use, falling back to {@link lastUsed}.'),
|
|
572
|
+
}).optional().describe('Durable model selection already used and selected for the next request.'),
|
|
538
573
|
'permissions': z.object({
|
|
539
|
-
'currentValue': z.string(),
|
|
540
|
-
}).optional(),
|
|
541
|
-
'subagentCatalog': z.array(z.union([z.
|
|
542
|
-
'id': z.
|
|
574
|
+
'currentValue': z.string().describe('The effective current value: a configured preset key, `auto`, or `custom`.'),
|
|
575
|
+
}).optional().describe('The session\'s current permission, folded from the three whole-value knob events (`permission/preset`, `sandbox/mode`, `approval/policy`) over the composition defaults. Selectable options come from the process-level catalog Remote. Key absence means no permission service is composed — clients hide the control.'),
|
|
576
|
+
'subagentCatalog': z.array(z.union([z.object({
|
|
577
|
+
'id': z.string().readonly(),
|
|
543
578
|
'createdAt': z.number().readonly(),
|
|
544
|
-
}), z.object({
|
|
545
579
|
'mode': z.literal("one-shot").readonly(),
|
|
546
580
|
'label': z.string().readonly().optional(),
|
|
547
|
-
})), z.intersection(z.object({
|
|
548
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
549
|
-
'createdAt': z.number().readonly(),
|
|
550
581
|
}), z.object({
|
|
582
|
+
'id': z.string().readonly(),
|
|
583
|
+
'createdAt': z.number().readonly(),
|
|
551
584
|
'mode': z.literal("external").readonly(),
|
|
552
585
|
'label': z.string().readonly().optional(),
|
|
553
|
-
})), z.intersection(z.object({
|
|
554
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
555
|
-
'createdAt': z.number().readonly(),
|
|
556
586
|
}), z.object({
|
|
587
|
+
'id': z.string().readonly(),
|
|
588
|
+
'createdAt': z.number().readonly(),
|
|
557
589
|
'mode': z.literal("continuable").readonly(),
|
|
558
590
|
'label': z.string().readonly(),
|
|
559
|
-
})), z.intersection(z.object({
|
|
560
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
561
|
-
'createdAt': z.number().readonly(),
|
|
562
591
|
}), z.object({
|
|
592
|
+
'id': z.string().readonly(),
|
|
593
|
+
'createdAt': z.number().readonly(),
|
|
563
594
|
'mode': z.literal("unknown").readonly(),
|
|
564
595
|
'label': z.string().readonly().optional(),
|
|
565
|
-
})
|
|
596
|
+
})])).optional().describe('Direct children in parent catalog event order, excluding fork-inherited facts.'),
|
|
566
597
|
'subagentTiming': z.object({
|
|
567
|
-
'settledMs': z.number(),
|
|
598
|
+
'settledMs': z.number().describe('Milliseconds accumulated across completed turns after the child\'s own descriptor.'),
|
|
568
599
|
'active': z.object({
|
|
569
|
-
'since': z.number(),
|
|
570
|
-
'through': z.number(),
|
|
571
|
-
}).optional(),
|
|
572
|
-
'lastTurnCompleted': z.boolean().optional(),
|
|
573
|
-
}).optional(),
|
|
600
|
+
'since': z.number().describe('Start of the open turn.'),
|
|
601
|
+
'through': z.number().describe('Latest event time folded into this projection cut.'),
|
|
602
|
+
}).optional().describe('Same-cut bounds of the currently open turn, when one has not reached `turn/end`.'),
|
|
603
|
+
'lastTurnCompleted': z.boolean().optional().describe('Whether the latest closed turn after the child\'s own descriptor completed normally; absent while a turn is open or before one closes.'),
|
|
604
|
+
}).optional().describe('Active-turn duration and latest closed-turn completion for a descriptor-backed subagent session.'),
|
|
574
605
|
'subagent': z.union([z.literal(null), z.object({
|
|
575
|
-
'mode': z.literal("one-shot"),
|
|
576
|
-
'label': z.string().optional(),
|
|
577
|
-
'seq': z.
|
|
606
|
+
'mode': z.literal("one-shot").describe('A terminal one-shot child.'),
|
|
607
|
+
'label': z.string().optional().describe('Optional durable creation label from the child\'s descriptor.'),
|
|
608
|
+
'seq': z.number().describe('Seq of the `subagent/descriptor` event this identity was folded from. `session.isOwnSeq(seq)` proves the identity comes from the child\'s OWN log suffix — where a descriptor is immutable once appended — and not from a fork seed\'s replayed ancestor descriptor.'),
|
|
578
609
|
}), z.object({
|
|
579
|
-
'mode': z.literal("continuable"),
|
|
580
|
-
'label': z.string(),
|
|
581
|
-
'seq': z.
|
|
582
|
-
})]).optional(),
|
|
610
|
+
'mode': z.literal("continuable").describe('A resumable conversation.'),
|
|
611
|
+
'label': z.string().describe('Durable creation label from the child\'s descriptor.'),
|
|
612
|
+
'seq': z.number().describe('Seq of the folded descriptor event; see the one-shot arm for the own-suffix proof.'),
|
|
613
|
+
})]).optional().describe('Identity of a descriptor-backed subagent session. `null` ⟺ no valid descriptor (missing, malformed, or unrecognized-version — deliberately undistinguished). The sentinel is deliberately serializable: a value pushed over JSON transports must survive `JSON.stringify` losslessly, where an `undefined` field would be dropped and a stale identity would survive on the receiving side. The entry itself stays non-optional.'),
|
|
583
614
|
'tokenUsage': z.object({
|
|
584
615
|
'uncachedInputTokens': z.number(),
|
|
585
616
|
'outputTokens': z.number(),
|
|
586
617
|
'cacheReadTokens': z.number(),
|
|
587
618
|
'cacheWriteTokens': z.number(),
|
|
588
|
-
}).optional(),
|
|
619
|
+
}).optional().describe('Provider-reported usage accumulated across the complete durable log.'),
|
|
589
620
|
'contextPressure': z.object({
|
|
590
|
-
'pressureTokens': z.number().optional(),
|
|
591
|
-
'projectedTokens': z.number().optional(),
|
|
592
|
-
'contextWindow': z.number().optional(),
|
|
593
|
-
}).optional(),
|
|
621
|
+
'pressureTokens': z.number().optional().describe('Provider-reported prompt size of the most recent request: uncached input plus cache reads and writes. Response output is excluded, so this does not grow as the current turn streams. Absent until a provider reports usage.'),
|
|
622
|
+
'projectedTokens': z.number().optional().describe('What the NEXT request\'s prompt would cost: {@link pressureTokens} plus the heuristic repricing of everything the surface gained or lost since that sample. Only the delta is estimated, so the figure stays anchored to the provider while still reacting the moment a compaction shadows a span — which `pressureTokens` alone cannot do, since compaction reports no usage of its own. Absent until a provider reports usage.'),
|
|
623
|
+
'contextWindow': z.number().optional().describe('Newest recorded route capacity; absent when no adapter advertised one.'),
|
|
624
|
+
}).optional().describe('Newest request pressure paired with the newest known route capacity.'),
|
|
594
625
|
'contextBreakdown': z.object({
|
|
595
|
-
'systemTokens': z.number(),
|
|
596
|
-
'toolsTokens': z.number(),
|
|
597
|
-
'messageTokens': z.number(),
|
|
598
|
-
}).optional(),
|
|
626
|
+
'systemTokens': z.number().describe('Heuristic tokens of the last nonempty surviving system prompt in surface order; 0 when none exists.'),
|
|
627
|
+
'toolsTokens': z.number().describe('Heuristic tokens of the newest request envelope\'s tool schemas; 0 before any request.'),
|
|
628
|
+
'messageTokens': z.number().describe('Heuristic tokens of every other visible surface node, including superseded system prompts.'),
|
|
629
|
+
}).optional().describe('Heuristic system/tools/message composition of the next request.'),
|
|
630
|
+
'agentTeam': z.object({
|
|
631
|
+
'members': z.array(z.object({
|
|
632
|
+
'id': z.string().readonly(),
|
|
633
|
+
'name': z.string().readonly(),
|
|
634
|
+
'role': z.union([z.literal("lead"), z.literal("teammate")]).readonly(),
|
|
635
|
+
'phase': z.union([z.literal("failed"), z.literal("provisioning"), z.literal("active")]).readonly().describe('Durable lifecycle; the Lead row is always `active`. Turn activity comes from Session status.'),
|
|
636
|
+
'error': z.string().readonly().optional(),
|
|
637
|
+
})).readonly(),
|
|
638
|
+
'tasks': z.array(z.object({
|
|
639
|
+
'id': z.string().readonly(),
|
|
640
|
+
'revision': z.number().readonly(),
|
|
641
|
+
'subject': z.string().readonly(),
|
|
642
|
+
'description': z.string().readonly(),
|
|
643
|
+
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress"), z.literal("deleted")]).readonly(),
|
|
644
|
+
'blockedBy': z.array(z.string()).readonly(),
|
|
645
|
+
'writeScopes': z.array(z.string()).readonly(),
|
|
646
|
+
'ownerName': z.string().readonly().optional(),
|
|
647
|
+
'ready': z.boolean().readonly(),
|
|
648
|
+
'writeScopeWarnings': z.array(z.string()).readonly(),
|
|
649
|
+
})).readonly(),
|
|
650
|
+
'failure': z.string().readonly().optional(),
|
|
651
|
+
}).optional().describe('Durable roster and non-deleted task board of the Team rooted at the projected Session.'),
|
|
599
652
|
'userQuestions': z.object({
|
|
600
653
|
'active': z.array(z.object({
|
|
601
|
-
'callId': z.
|
|
654
|
+
'callId': z.string().readonly(),
|
|
602
655
|
'questions': z.array(z.object({
|
|
603
|
-
'id': z.string(),
|
|
604
|
-
'question': z.string(),
|
|
605
|
-
'detail': z.string().optional(),
|
|
606
|
-
'header': z.string().optional(),
|
|
656
|
+
'id': z.string().describe('Stable caller-provided question id, echoed in the answer.'),
|
|
657
|
+
'question': z.string().describe('The question to display.'),
|
|
658
|
+
'detail': z.string().optional().describe('Optional supporting detail rendered with the question but kept out of option labels.'),
|
|
659
|
+
'header': z.string().optional().describe('Optional short heading/group label.'),
|
|
607
660
|
'options': z.array(z.object({
|
|
608
|
-
'label': z.string(),
|
|
609
|
-
'description': z.string().optional(),
|
|
610
|
-
})).optional(),
|
|
611
|
-
'multiSelect': z.boolean().optional(),
|
|
661
|
+
'label': z.string().describe('User-facing label.'),
|
|
662
|
+
'description': z.string().optional().describe('Optional extra context rendered by capable UIs.'),
|
|
663
|
+
})).optional().describe('Optional choices the UI can render as a menu.'),
|
|
664
|
+
'multiSelect': z.boolean().optional().describe('Whether more than one option may be selected. Defaults to single-select.'),
|
|
612
665
|
'intent': z.object({
|
|
613
|
-
'kind': z.literal("plan-review"),
|
|
614
|
-
'approve': z.string(),
|
|
615
|
-
'callId': z.
|
|
616
|
-
}).optional(),
|
|
666
|
+
'kind': z.literal("plan-review").describe('A plan submitted for review: `detail` is the plan markdown `ask()` requires, and the decision approves or declines it.'),
|
|
667
|
+
'approve': z.string().describe('The option label that approves the plan; every other option declines it. Named rather than positional so no UI infers the verdict from option order. An `approve` naming no option of its own question is rejected at `ask()`.'),
|
|
668
|
+
'callId': z.string().optional().describe('Logged tool invocation whose arguments contain the reviewed plan.'),
|
|
669
|
+
}).optional().describe('Optional presentation intent for capable UIs; absent asks for the generic option list.'),
|
|
617
670
|
})).readonly(),
|
|
618
671
|
'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
|
|
619
|
-
})).readonly(),
|
|
672
|
+
})).readonly().describe('Calls that can still take an answer, in ask order.'),
|
|
620
673
|
'settled': z.array(z.object({
|
|
621
|
-
'callId': z.
|
|
674
|
+
'callId': z.string().readonly().describe('The settled call.'),
|
|
622
675
|
'answers': z.array(z.object({
|
|
623
|
-
'id': z.string(),
|
|
624
|
-
'selected': z.array(z.string()),
|
|
625
|
-
'custom': z.string().optional(),
|
|
626
|
-
})).readonly(),
|
|
627
|
-
})).readonly(),
|
|
628
|
-
}).optional(),
|
|
676
|
+
'id': z.string().describe('The answered question id.'),
|
|
677
|
+
'selected': z.array(z.string()).describe('Selected option labels. May accompany custom text for a multi-select question.'),
|
|
678
|
+
'custom': z.string().optional().describe('Optional free-text "Other" answer.'),
|
|
679
|
+
})).readonly().describe('The recorded batch, one entry per question; empty when the late reply carried none.'),
|
|
680
|
+
})).readonly().describe('Calls an answer settled, in settlement order.'),
|
|
681
|
+
}).optional().describe('Timed questions that remain answerable in this Session, and the ones a late reply settled.'),
|
|
629
682
|
'goal': z.union([z.literal(null), z.object({
|
|
630
683
|
'goal': z.object({
|
|
631
|
-
'objective': z.string().readonly(),
|
|
632
|
-
'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
|
|
684
|
+
'objective': z.string().readonly().describe('Human-requested completion objective.'),
|
|
685
|
+
'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly().describe('Durable lifecycle phase.'),
|
|
633
686
|
'blockedReason': z.object({
|
|
634
|
-
'code': z.string().readonly(),
|
|
635
|
-
'message': z.string().readonly(),
|
|
636
|
-
}).readonly().optional(),
|
|
637
|
-
'maxGoalRounds': z.number().readonly(),
|
|
638
|
-
'id': z.
|
|
639
|
-
'revision': z.number().readonly(),
|
|
640
|
-
}).readonly(),
|
|
641
|
-
'roundsStarted': z.number().readonly(),
|
|
642
|
-
'createdAt': z.number().readonly(),
|
|
643
|
-
'updatedAt': z.number().readonly(),
|
|
644
|
-
})]).optional(),
|
|
645
|
-
|
|
687
|
+
'code': z.string().readonly().describe('Stable lower-kebab-case classification chosen by the blocking policy.'),
|
|
688
|
+
'message': z.string().readonly().describe('Non-empty explanation shown to humans and models.'),
|
|
689
|
+
}).readonly().optional().describe('Present exactly while `phase` is `blocked`.'),
|
|
690
|
+
'maxGoalRounds': z.number().readonly().describe('Total admitted goal-round cap.'),
|
|
691
|
+
'id': z.string().readonly().describe('Stable goal identity.'),
|
|
692
|
+
'revision': z.number().readonly().describe('Positive revision; every durable mutation increments it.'),
|
|
693
|
+
}).readonly().describe('Current durable goal snapshot (the CAS ref for mutations rides on it).'),
|
|
694
|
+
'roundsStarted': z.number().readonly().describe('Highest admitted round number for this goal.'),
|
|
695
|
+
'createdAt': z.number().readonly().describe('Epoch milliseconds of the create mutation.'),
|
|
696
|
+
'updatedAt': z.number().readonly().describe('Epoch milliseconds of the latest mutation.'),
|
|
697
|
+
})]).optional().describe('The session\'s current goal and admitted-round count, or `null` before the first create and after a clear tombstone. `goal/change` supplies the whole lifecycle value; matching admitted `user/message` events advance `roundsStarted`.'),
|
|
698
|
+
'plan': z.object({
|
|
699
|
+
'active': z.boolean(),
|
|
700
|
+
'pending': z.boolean(),
|
|
701
|
+
}).optional().describe('Plan collaboration state folded from the plan command lifecycle and `plan/mode` events.'),
|
|
702
|
+
}), z.record(z.string(), z.json()).readonly()).readonly().describe('Provider-validated values present in the block; omitted keys remain unknown.'),
|
|
646
703
|
}).readonly().optional(),
|
|
647
704
|
})).readonly(),
|
|
648
705
|
}))
|
|
@@ -653,7 +710,7 @@ const _deepseek_ai_dsh_api_session_controller_session_modelCatalog_result$schema
|
|
|
653
710
|
'model': z.string().readonly(),
|
|
654
711
|
'reasoningEffort': z.string().readonly().optional(),
|
|
655
712
|
}).readonly(),
|
|
656
|
-
'routableProviders': z.array(z.string()).readonly(),
|
|
713
|
+
'routableProviders': z.array(z.string()).readonly().describe('Provider routes with at least one currently available catalog model.'),
|
|
657
714
|
'groups': z.array(z.object({
|
|
658
715
|
'id': z.string().readonly(),
|
|
659
716
|
'name': z.string().readonly(),
|
|
@@ -679,9 +736,9 @@ const _deepseek_ai_dsh_api_session_controller_session_modelCatalog_result$schema
|
|
|
679
736
|
}))
|
|
680
737
|
let _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0$schema$value
|
|
681
738
|
const _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0$schema$value ??= z.object({
|
|
682
|
-
'action': z.literal("reveal").readonly().optional(),
|
|
683
|
-
'application': z.string().readonly().optional(),
|
|
684
|
-
'path': z.string().readonly(),
|
|
739
|
+
'action': z.literal("reveal").readonly().optional().describe('File-manager navigation when requested; omission uses the default application.'),
|
|
740
|
+
'application': z.string().readonly().optional().describe('Registered application identifier; ignored for reveal. Omission preserves the operating system default.'),
|
|
741
|
+
'path': z.string().readonly().describe('Path after best-effort Session workspace resolution, in Host filesystem syntax.'),
|
|
685
742
|
}))
|
|
686
743
|
let _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_result$schema$value
|
|
687
744
|
const _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_result$schema$value ??= z.object({
|
|
@@ -691,20 +748,20 @@ let _deepseek_ai_dsh_api_session_controller_session_page_parameter_0$schema$valu
|
|
|
691
748
|
const _deepseek_ai_dsh_api_session_controller_session_page_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_page_parameter_0$schema$value ??= z.object({
|
|
692
749
|
'address': z.union([z.object({
|
|
693
750
|
'kind': z.literal("session").readonly(),
|
|
694
|
-
'sessionId': z.
|
|
751
|
+
'sessionId': z.string().readonly(),
|
|
695
752
|
}), z.object({
|
|
696
753
|
'kind': z.literal("subagent").readonly(),
|
|
697
|
-
'parentSessionId': z.
|
|
698
|
-
'childSessionId': z.
|
|
754
|
+
'parentSessionId': z.string().readonly(),
|
|
755
|
+
'childSessionId': z.string().readonly(),
|
|
699
756
|
'mode': z.union([z.literal("one-shot"), z.literal("continuable"), z.literal("unknown")]).readonly(),
|
|
700
757
|
})]).readonly(),
|
|
701
|
-
'throughSeq': z.number().readonly(),
|
|
758
|
+
'throughSeq': z.number().readonly().describe('Inclusive log cut obtained from the corresponding follow opening frame.'),
|
|
702
759
|
'beforeSeq': z.number().readonly().optional(),
|
|
703
760
|
'maxMessages': z.number().readonly().optional(),
|
|
704
761
|
'turnWindow': z.object({
|
|
705
|
-
'minMessages': z.number().readonly(),
|
|
706
|
-
'minTurns': z.number().readonly(),
|
|
707
|
-
}).readonly().optional(),
|
|
762
|
+
'minMessages': z.number().readonly().describe('Minimum append-origin user/assistant messages; must not exceed maxMessages.'),
|
|
763
|
+
'minTurns': z.number().readonly().describe('Minimum Turn starts crossed, including the partial Turn at beforeSeq.'),
|
|
764
|
+
}).readonly().optional().describe('Stop at a Turn start after both minima, unless maxMessages or history exhaustion wins.'),
|
|
708
765
|
}))
|
|
709
766
|
let _deepseek_ai_dsh_api_session_controller_session_page_result$schema$value
|
|
710
767
|
const _deepseek_ai_dsh_api_session_controller_session_page_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_page_result$schema$value ??= z.object({
|
|
@@ -714,318 +771,361 @@ const _deepseek_ai_dsh_api_session_controller_session_page_result$schema = () =>
|
|
|
714
771
|
'type': z.string().readonly(),
|
|
715
772
|
'seq': z.number().readonly(),
|
|
716
773
|
'time': z.number().readonly(),
|
|
717
|
-
'data': z.
|
|
774
|
+
'data': z.json().readonly(),
|
|
718
775
|
'ignorable': z.literal(true).readonly().optional(),
|
|
719
|
-
'sourceEventSeqs': z.
|
|
720
|
-
'surfaceOp': z.
|
|
776
|
+
'sourceEventSeqs': z.json().readonly().optional().describe('Earlier sources on current surface events; opaque JSON on unknown ignorable events.'),
|
|
777
|
+
'surfaceOp': z.json().readonly().optional().describe('Canonical placement on current surface events; opaque JSON on unknown ignorable events.'),
|
|
721
778
|
}).readonly(),
|
|
722
779
|
})).readonly(),
|
|
723
780
|
'hasMore': z.boolean().readonly(),
|
|
724
781
|
}))
|
|
725
782
|
let _deepseek_ai_dsh_api_session_controller_session_projections_parameter_0$schema$value
|
|
726
783
|
const _deepseek_ai_dsh_api_session_controller_session_projections_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_projections_parameter_0$schema$value ??= z.object({
|
|
727
|
-
'sessionId': z.
|
|
784
|
+
'sessionId': z.string().readonly(),
|
|
728
785
|
}))
|
|
729
786
|
let _deepseek_ai_dsh_api_session_controller_session_projections_result$schema$value
|
|
730
|
-
const _deepseek_ai_dsh_api_session_controller_session_projections_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_projections_result$schema$value ??= z.union([z.literal(null), z.
|
|
787
|
+
const _deepseek_ai_dsh_api_session_controller_session_projections_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_projections_result$schema$value ??= z.union([z.literal(null), z.object({
|
|
731
788
|
'asOfSeq': z.number().readonly(),
|
|
732
789
|
'values': z.intersection(z.object({
|
|
733
790
|
'inbox': z.object({
|
|
734
|
-
'next-turn': z.array(z.
|
|
735
|
-
'next-step': z.array(z.
|
|
736
|
-
}).optional(),
|
|
737
|
-
'workingDirectory': z.union([z.literal(null), z.string()]).optional(),
|
|
738
|
-
'agentPreset': z.union([z.literal(null), z.string()]).optional(),
|
|
739
|
-
'title': z.union([z.literal(null), z.string()]).optional(),
|
|
791
|
+
'next-turn': z.array(z.json()).readonly(),
|
|
792
|
+
'next-step': z.array(z.json()).readonly(),
|
|
793
|
+
}).optional().describe('Pending agent input reconstructed from durable inbox splices.'),
|
|
794
|
+
'workingDirectory': z.union([z.literal(null), z.string()]).optional().describe('Recorded current directory for Session observations, or null when none is recorded.'),
|
|
795
|
+
'agentPreset': z.union([z.literal(null), z.string()]).optional().describe('Preset the Session runs, or null when the deployment composes none.'),
|
|
796
|
+
'title': z.union([z.literal(null), z.string()]).optional().describe('The session\'s current normalized title — the latest `session/title` event\'s text (last-wins), or `null` before the first title lands. A plain string: the shape the client list rows consume.'),
|
|
740
797
|
'todos': z.union([z.literal(null), z.array(z.object({
|
|
741
|
-
'content': z.string(),
|
|
742
|
-
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]),
|
|
743
|
-
}))]).optional(),
|
|
798
|
+
'content': z.string().describe('What this task is — a short imperative line shown in the UI.'),
|
|
799
|
+
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]).describe('Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several.'),
|
|
800
|
+
}))]).optional().describe('The agent\'s current whole todo list (the latest `todo/write` snapshot), or `null` before the first write. Whole-value rule: every `todo/write` carries the complete replacement list, so the fold is last-wins.'),
|
|
744
801
|
'sessionListMetadata': z.object({
|
|
745
|
-
'blank': z.boolean().readonly(),
|
|
746
|
-
'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
|
|
747
|
-
}).optional(),
|
|
802
|
+
'blank': z.boolean().readonly().describe('Whether the folded prefix contains no turn.'),
|
|
803
|
+
'lastPromptAt': z.union([z.literal(null), z.number()]).readonly().describe('Latest human-authored prompt time in the folded prefix.'),
|
|
804
|
+
}).optional().describe('Persisted facts used to summarize a Session without activating it.'),
|
|
748
805
|
'imageLimits': z.object({
|
|
749
806
|
'maxImageBytes': z.number(),
|
|
750
807
|
'maxImagesPerMessage': z.number(),
|
|
751
808
|
'maxMessageImageBytes': z.number(),
|
|
752
809
|
'maxImagePixels': z.number(),
|
|
753
|
-
'maxImageDimension': z.number(),
|
|
810
|
+
'maxImageDimension': z.number().describe('Maximum intrinsic width and maximum intrinsic height in pixels for one image.'),
|
|
754
811
|
'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
|
|
755
|
-
}).optional(),
|
|
812
|
+
}).optional().describe('Image-intake limits enforced by the Session prompt endpoint.'),
|
|
756
813
|
'modelSelection': z.object({
|
|
757
814
|
'lastUsed': z.union([z.literal(null), z.object({
|
|
758
815
|
'provider': z.string().readonly(),
|
|
759
816
|
'model': z.string().readonly(),
|
|
760
817
|
'reasoningEffort': z.string().readonly().optional(),
|
|
761
|
-
})]).readonly(),
|
|
818
|
+
})]).readonly().describe('Selection consumed by the latest recorded model request.'),
|
|
762
819
|
'next': z.union([z.literal(null), z.object({
|
|
763
820
|
'provider': z.string().readonly(),
|
|
764
821
|
'model': z.string().readonly(),
|
|
765
822
|
'reasoningEffort': z.string().readonly().optional(),
|
|
766
|
-
})]).readonly(),
|
|
767
|
-
}).optional(),
|
|
823
|
+
})]).readonly().describe('Selection the next request should use, falling back to {@link lastUsed}.'),
|
|
824
|
+
}).optional().describe('Durable model selection already used and selected for the next request.'),
|
|
768
825
|
'permissions': z.object({
|
|
769
|
-
'currentValue': z.string(),
|
|
770
|
-
}).optional(),
|
|
771
|
-
'subagentCatalog': z.array(z.union([z.
|
|
772
|
-
'id': z.
|
|
826
|
+
'currentValue': z.string().describe('The effective current value: a configured preset key, `auto`, or `custom`.'),
|
|
827
|
+
}).optional().describe('The session\'s current permission, folded from the three whole-value knob events (`permission/preset`, `sandbox/mode`, `approval/policy`) over the composition defaults. Selectable options come from the process-level catalog Remote. Key absence means no permission service is composed — clients hide the control.'),
|
|
828
|
+
'subagentCatalog': z.array(z.union([z.object({
|
|
829
|
+
'id': z.string().readonly(),
|
|
773
830
|
'createdAt': z.number().readonly(),
|
|
774
|
-
}), z.object({
|
|
775
831
|
'mode': z.literal("one-shot").readonly(),
|
|
776
832
|
'label': z.string().readonly().optional(),
|
|
777
|
-
})), z.intersection(z.object({
|
|
778
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
779
|
-
'createdAt': z.number().readonly(),
|
|
780
833
|
}), z.object({
|
|
834
|
+
'id': z.string().readonly(),
|
|
835
|
+
'createdAt': z.number().readonly(),
|
|
781
836
|
'mode': z.literal("external").readonly(),
|
|
782
837
|
'label': z.string().readonly().optional(),
|
|
783
|
-
})), z.intersection(z.object({
|
|
784
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
785
|
-
'createdAt': z.number().readonly(),
|
|
786
838
|
}), z.object({
|
|
839
|
+
'id': z.string().readonly(),
|
|
840
|
+
'createdAt': z.number().readonly(),
|
|
787
841
|
'mode': z.literal("continuable").readonly(),
|
|
788
842
|
'label': z.string().readonly(),
|
|
789
|
-
})), z.intersection(z.object({
|
|
790
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
791
|
-
'createdAt': z.number().readonly(),
|
|
792
843
|
}), z.object({
|
|
844
|
+
'id': z.string().readonly(),
|
|
845
|
+
'createdAt': z.number().readonly(),
|
|
793
846
|
'mode': z.literal("unknown").readonly(),
|
|
794
847
|
'label': z.string().readonly().optional(),
|
|
795
|
-
})
|
|
848
|
+
})])).optional().describe('Direct children in parent catalog event order, excluding fork-inherited facts.'),
|
|
796
849
|
'subagentTiming': z.object({
|
|
797
|
-
'settledMs': z.number(),
|
|
850
|
+
'settledMs': z.number().describe('Milliseconds accumulated across completed turns after the child\'s own descriptor.'),
|
|
798
851
|
'active': z.object({
|
|
799
|
-
'since': z.number(),
|
|
800
|
-
'through': z.number(),
|
|
801
|
-
}).optional(),
|
|
802
|
-
'lastTurnCompleted': z.boolean().optional(),
|
|
803
|
-
}).optional(),
|
|
852
|
+
'since': z.number().describe('Start of the open turn.'),
|
|
853
|
+
'through': z.number().describe('Latest event time folded into this projection cut.'),
|
|
854
|
+
}).optional().describe('Same-cut bounds of the currently open turn, when one has not reached `turn/end`.'),
|
|
855
|
+
'lastTurnCompleted': z.boolean().optional().describe('Whether the latest closed turn after the child\'s own descriptor completed normally; absent while a turn is open or before one closes.'),
|
|
856
|
+
}).optional().describe('Active-turn duration and latest closed-turn completion for a descriptor-backed subagent session.'),
|
|
804
857
|
'subagent': z.union([z.literal(null), z.object({
|
|
805
|
-
'mode': z.literal("one-shot"),
|
|
806
|
-
'label': z.string().optional(),
|
|
807
|
-
'seq': z.
|
|
858
|
+
'mode': z.literal("one-shot").describe('A terminal one-shot child.'),
|
|
859
|
+
'label': z.string().optional().describe('Optional durable creation label from the child\'s descriptor.'),
|
|
860
|
+
'seq': z.number().describe('Seq of the `subagent/descriptor` event this identity was folded from. `session.isOwnSeq(seq)` proves the identity comes from the child\'s OWN log suffix — where a descriptor is immutable once appended — and not from a fork seed\'s replayed ancestor descriptor.'),
|
|
808
861
|
}), z.object({
|
|
809
|
-
'mode': z.literal("continuable"),
|
|
810
|
-
'label': z.string(),
|
|
811
|
-
'seq': z.
|
|
812
|
-
})]).optional(),
|
|
862
|
+
'mode': z.literal("continuable").describe('A resumable conversation.'),
|
|
863
|
+
'label': z.string().describe('Durable creation label from the child\'s descriptor.'),
|
|
864
|
+
'seq': z.number().describe('Seq of the folded descriptor event; see the one-shot arm for the own-suffix proof.'),
|
|
865
|
+
})]).optional().describe('Identity of a descriptor-backed subagent session. `null` ⟺ no valid descriptor (missing, malformed, or unrecognized-version — deliberately undistinguished). The sentinel is deliberately serializable: a value pushed over JSON transports must survive `JSON.stringify` losslessly, where an `undefined` field would be dropped and a stale identity would survive on the receiving side. The entry itself stays non-optional.'),
|
|
813
866
|
'tokenUsage': z.object({
|
|
814
867
|
'uncachedInputTokens': z.number(),
|
|
815
868
|
'outputTokens': z.number(),
|
|
816
869
|
'cacheReadTokens': z.number(),
|
|
817
870
|
'cacheWriteTokens': z.number(),
|
|
818
|
-
}).optional(),
|
|
871
|
+
}).optional().describe('Provider-reported usage accumulated across the complete durable log.'),
|
|
819
872
|
'contextPressure': z.object({
|
|
820
|
-
'pressureTokens': z.number().optional(),
|
|
821
|
-
'projectedTokens': z.number().optional(),
|
|
822
|
-
'contextWindow': z.number().optional(),
|
|
823
|
-
}).optional(),
|
|
873
|
+
'pressureTokens': z.number().optional().describe('Provider-reported prompt size of the most recent request: uncached input plus cache reads and writes. Response output is excluded, so this does not grow as the current turn streams. Absent until a provider reports usage.'),
|
|
874
|
+
'projectedTokens': z.number().optional().describe('What the NEXT request\'s prompt would cost: {@link pressureTokens} plus the heuristic repricing of everything the surface gained or lost since that sample. Only the delta is estimated, so the figure stays anchored to the provider while still reacting the moment a compaction shadows a span — which `pressureTokens` alone cannot do, since compaction reports no usage of its own. Absent until a provider reports usage.'),
|
|
875
|
+
'contextWindow': z.number().optional().describe('Newest recorded route capacity; absent when no adapter advertised one.'),
|
|
876
|
+
}).optional().describe('Newest request pressure paired with the newest known route capacity.'),
|
|
824
877
|
'contextBreakdown': z.object({
|
|
825
|
-
'systemTokens': z.number(),
|
|
826
|
-
'toolsTokens': z.number(),
|
|
827
|
-
'messageTokens': z.number(),
|
|
828
|
-
}).optional(),
|
|
878
|
+
'systemTokens': z.number().describe('Heuristic tokens of the last nonempty surviving system prompt in surface order; 0 when none exists.'),
|
|
879
|
+
'toolsTokens': z.number().describe('Heuristic tokens of the newest request envelope\'s tool schemas; 0 before any request.'),
|
|
880
|
+
'messageTokens': z.number().describe('Heuristic tokens of every other visible surface node, including superseded system prompts.'),
|
|
881
|
+
}).optional().describe('Heuristic system/tools/message composition of the next request.'),
|
|
882
|
+
'agentTeam': z.object({
|
|
883
|
+
'members': z.array(z.object({
|
|
884
|
+
'id': z.string().readonly(),
|
|
885
|
+
'name': z.string().readonly(),
|
|
886
|
+
'role': z.union([z.literal("lead"), z.literal("teammate")]).readonly(),
|
|
887
|
+
'phase': z.union([z.literal("failed"), z.literal("provisioning"), z.literal("active")]).readonly().describe('Durable lifecycle; the Lead row is always `active`. Turn activity comes from Session status.'),
|
|
888
|
+
'error': z.string().readonly().optional(),
|
|
889
|
+
})).readonly(),
|
|
890
|
+
'tasks': z.array(z.object({
|
|
891
|
+
'id': z.string().readonly(),
|
|
892
|
+
'revision': z.number().readonly(),
|
|
893
|
+
'subject': z.string().readonly(),
|
|
894
|
+
'description': z.string().readonly(),
|
|
895
|
+
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress"), z.literal("deleted")]).readonly(),
|
|
896
|
+
'blockedBy': z.array(z.string()).readonly(),
|
|
897
|
+
'writeScopes': z.array(z.string()).readonly(),
|
|
898
|
+
'ownerName': z.string().readonly().optional(),
|
|
899
|
+
'ready': z.boolean().readonly(),
|
|
900
|
+
'writeScopeWarnings': z.array(z.string()).readonly(),
|
|
901
|
+
})).readonly(),
|
|
902
|
+
'failure': z.string().readonly().optional(),
|
|
903
|
+
}).optional().describe('Durable roster and non-deleted task board of the Team rooted at the projected Session.'),
|
|
829
904
|
'userQuestions': z.object({
|
|
830
905
|
'active': z.array(z.object({
|
|
831
|
-
'callId': z.
|
|
906
|
+
'callId': z.string().readonly(),
|
|
832
907
|
'questions': z.array(z.object({
|
|
833
|
-
'id': z.string(),
|
|
834
|
-
'question': z.string(),
|
|
835
|
-
'detail': z.string().optional(),
|
|
836
|
-
'header': z.string().optional(),
|
|
908
|
+
'id': z.string().describe('Stable caller-provided question id, echoed in the answer.'),
|
|
909
|
+
'question': z.string().describe('The question to display.'),
|
|
910
|
+
'detail': z.string().optional().describe('Optional supporting detail rendered with the question but kept out of option labels.'),
|
|
911
|
+
'header': z.string().optional().describe('Optional short heading/group label.'),
|
|
837
912
|
'options': z.array(z.object({
|
|
838
|
-
'label': z.string(),
|
|
839
|
-
'description': z.string().optional(),
|
|
840
|
-
})).optional(),
|
|
841
|
-
'multiSelect': z.boolean().optional(),
|
|
913
|
+
'label': z.string().describe('User-facing label.'),
|
|
914
|
+
'description': z.string().optional().describe('Optional extra context rendered by capable UIs.'),
|
|
915
|
+
})).optional().describe('Optional choices the UI can render as a menu.'),
|
|
916
|
+
'multiSelect': z.boolean().optional().describe('Whether more than one option may be selected. Defaults to single-select.'),
|
|
842
917
|
'intent': z.object({
|
|
843
|
-
'kind': z.literal("plan-review"),
|
|
844
|
-
'approve': z.string(),
|
|
845
|
-
'callId': z.
|
|
846
|
-
}).optional(),
|
|
918
|
+
'kind': z.literal("plan-review").describe('A plan submitted for review: `detail` is the plan markdown `ask()` requires, and the decision approves or declines it.'),
|
|
919
|
+
'approve': z.string().describe('The option label that approves the plan; every other option declines it. Named rather than positional so no UI infers the verdict from option order. An `approve` naming no option of its own question is rejected at `ask()`.'),
|
|
920
|
+
'callId': z.string().optional().describe('Logged tool invocation whose arguments contain the reviewed plan.'),
|
|
921
|
+
}).optional().describe('Optional presentation intent for capable UIs; absent asks for the generic option list.'),
|
|
847
922
|
})).readonly(),
|
|
848
923
|
'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
|
|
849
|
-
})).readonly(),
|
|
924
|
+
})).readonly().describe('Calls that can still take an answer, in ask order.'),
|
|
850
925
|
'settled': z.array(z.object({
|
|
851
|
-
'callId': z.
|
|
926
|
+
'callId': z.string().readonly().describe('The settled call.'),
|
|
852
927
|
'answers': z.array(z.object({
|
|
853
|
-
'id': z.string(),
|
|
854
|
-
'selected': z.array(z.string()),
|
|
855
|
-
'custom': z.string().optional(),
|
|
856
|
-
})).readonly(),
|
|
857
|
-
})).readonly(),
|
|
858
|
-
}).optional(),
|
|
928
|
+
'id': z.string().describe('The answered question id.'),
|
|
929
|
+
'selected': z.array(z.string()).describe('Selected option labels. May accompany custom text for a multi-select question.'),
|
|
930
|
+
'custom': z.string().optional().describe('Optional free-text "Other" answer.'),
|
|
931
|
+
})).readonly().describe('The recorded batch, one entry per question; empty when the late reply carried none.'),
|
|
932
|
+
})).readonly().describe('Calls an answer settled, in settlement order.'),
|
|
933
|
+
}).optional().describe('Timed questions that remain answerable in this Session, and the ones a late reply settled.'),
|
|
859
934
|
'goal': z.union([z.literal(null), z.object({
|
|
860
935
|
'goal': z.object({
|
|
861
|
-
'objective': z.string().readonly(),
|
|
862
|
-
'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
|
|
936
|
+
'objective': z.string().readonly().describe('Human-requested completion objective.'),
|
|
937
|
+
'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly().describe('Durable lifecycle phase.'),
|
|
863
938
|
'blockedReason': z.object({
|
|
864
|
-
'code': z.string().readonly(),
|
|
865
|
-
'message': z.string().readonly(),
|
|
866
|
-
}).readonly().optional(),
|
|
867
|
-
'maxGoalRounds': z.number().readonly(),
|
|
868
|
-
'id': z.
|
|
869
|
-
'revision': z.number().readonly(),
|
|
870
|
-
}).readonly(),
|
|
871
|
-
'roundsStarted': z.number().readonly(),
|
|
872
|
-
'createdAt': z.number().readonly(),
|
|
873
|
-
'updatedAt': z.number().readonly(),
|
|
874
|
-
})]).optional(),
|
|
875
|
-
|
|
876
|
-
|
|
939
|
+
'code': z.string().readonly().describe('Stable lower-kebab-case classification chosen by the blocking policy.'),
|
|
940
|
+
'message': z.string().readonly().describe('Non-empty explanation shown to humans and models.'),
|
|
941
|
+
}).readonly().optional().describe('Present exactly while `phase` is `blocked`.'),
|
|
942
|
+
'maxGoalRounds': z.number().readonly().describe('Total admitted goal-round cap.'),
|
|
943
|
+
'id': z.string().readonly().describe('Stable goal identity.'),
|
|
944
|
+
'revision': z.number().readonly().describe('Positive revision; every durable mutation increments it.'),
|
|
945
|
+
}).readonly().describe('Current durable goal snapshot (the CAS ref for mutations rides on it).'),
|
|
946
|
+
'roundsStarted': z.number().readonly().describe('Highest admitted round number for this goal.'),
|
|
947
|
+
'createdAt': z.number().readonly().describe('Epoch milliseconds of the create mutation.'),
|
|
948
|
+
'updatedAt': z.number().readonly().describe('Epoch milliseconds of the latest mutation.'),
|
|
949
|
+
})]).optional().describe('The session\'s current goal and admitted-round count, or `null` before the first create and after a clear tombstone. `goal/change` supplies the whole lifecycle value; matching admitted `user/message` events advance `roundsStarted`.'),
|
|
950
|
+
'plan': z.object({
|
|
951
|
+
'active': z.boolean(),
|
|
952
|
+
'pending': z.boolean(),
|
|
953
|
+
}).optional().describe('Plan collaboration state folded from the plan command lifecycle and `plan/mode` events.'),
|
|
954
|
+
}), z.record(z.string(), z.json()).readonly()).readonly().describe('Provider-validated values; omitted keys are absent capabilities at this cut.'),
|
|
877
955
|
'kind': z.literal("sequenced").readonly(),
|
|
878
|
-
})
|
|
956
|
+
}), z.object({
|
|
879
957
|
'kind': z.literal("migration-required").readonly(),
|
|
880
958
|
'values': z.intersection(z.object({
|
|
881
959
|
'inbox': z.object({
|
|
882
|
-
'next-turn': z.array(z.
|
|
883
|
-
'next-step': z.array(z.
|
|
884
|
-
}).optional(),
|
|
885
|
-
'workingDirectory': z.union([z.literal(null), z.string()]).optional(),
|
|
886
|
-
'agentPreset': z.union([z.literal(null), z.string()]).optional(),
|
|
887
|
-
'title': z.union([z.literal(null), z.string()]).optional(),
|
|
960
|
+
'next-turn': z.array(z.json()).readonly(),
|
|
961
|
+
'next-step': z.array(z.json()).readonly(),
|
|
962
|
+
}).optional().describe('Pending agent input reconstructed from durable inbox splices.'),
|
|
963
|
+
'workingDirectory': z.union([z.literal(null), z.string()]).optional().describe('Recorded current directory for Session observations, or null when none is recorded.'),
|
|
964
|
+
'agentPreset': z.union([z.literal(null), z.string()]).optional().describe('Preset the Session runs, or null when the deployment composes none.'),
|
|
965
|
+
'title': z.union([z.literal(null), z.string()]).optional().describe('The session\'s current normalized title — the latest `session/title` event\'s text (last-wins), or `null` before the first title lands. A plain string: the shape the client list rows consume.'),
|
|
888
966
|
'todos': z.union([z.literal(null), z.array(z.object({
|
|
889
|
-
'content': z.string(),
|
|
890
|
-
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]),
|
|
891
|
-
}))]).optional(),
|
|
967
|
+
'content': z.string().describe('What this task is — a short imperative line shown in the UI.'),
|
|
968
|
+
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]).describe('Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several.'),
|
|
969
|
+
}))]).optional().describe('The agent\'s current whole todo list (the latest `todo/write` snapshot), or `null` before the first write. Whole-value rule: every `todo/write` carries the complete replacement list, so the fold is last-wins.'),
|
|
892
970
|
'sessionListMetadata': z.object({
|
|
893
|
-
'blank': z.boolean().readonly(),
|
|
894
|
-
'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
|
|
895
|
-
}).optional(),
|
|
971
|
+
'blank': z.boolean().readonly().describe('Whether the folded prefix contains no turn.'),
|
|
972
|
+
'lastPromptAt': z.union([z.literal(null), z.number()]).readonly().describe('Latest human-authored prompt time in the folded prefix.'),
|
|
973
|
+
}).optional().describe('Persisted facts used to summarize a Session without activating it.'),
|
|
896
974
|
'imageLimits': z.object({
|
|
897
975
|
'maxImageBytes': z.number(),
|
|
898
976
|
'maxImagesPerMessage': z.number(),
|
|
899
977
|
'maxMessageImageBytes': z.number(),
|
|
900
978
|
'maxImagePixels': z.number(),
|
|
901
|
-
'maxImageDimension': z.number(),
|
|
979
|
+
'maxImageDimension': z.number().describe('Maximum intrinsic width and maximum intrinsic height in pixels for one image.'),
|
|
902
980
|
'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
|
|
903
|
-
}).optional(),
|
|
981
|
+
}).optional().describe('Image-intake limits enforced by the Session prompt endpoint.'),
|
|
904
982
|
'modelSelection': z.object({
|
|
905
983
|
'lastUsed': z.union([z.literal(null), z.object({
|
|
906
984
|
'provider': z.string().readonly(),
|
|
907
985
|
'model': z.string().readonly(),
|
|
908
986
|
'reasoningEffort': z.string().readonly().optional(),
|
|
909
|
-
})]).readonly(),
|
|
987
|
+
})]).readonly().describe('Selection consumed by the latest recorded model request.'),
|
|
910
988
|
'next': z.union([z.literal(null), z.object({
|
|
911
989
|
'provider': z.string().readonly(),
|
|
912
990
|
'model': z.string().readonly(),
|
|
913
991
|
'reasoningEffort': z.string().readonly().optional(),
|
|
914
|
-
})]).readonly(),
|
|
915
|
-
}).optional(),
|
|
992
|
+
})]).readonly().describe('Selection the next request should use, falling back to {@link lastUsed}.'),
|
|
993
|
+
}).optional().describe('Durable model selection already used and selected for the next request.'),
|
|
916
994
|
'permissions': z.object({
|
|
917
|
-
'currentValue': z.string(),
|
|
918
|
-
}).optional(),
|
|
919
|
-
'subagentCatalog': z.array(z.union([z.
|
|
920
|
-
'id': z.
|
|
995
|
+
'currentValue': z.string().describe('The effective current value: a configured preset key, `auto`, or `custom`.'),
|
|
996
|
+
}).optional().describe('The session\'s current permission, folded from the three whole-value knob events (`permission/preset`, `sandbox/mode`, `approval/policy`) over the composition defaults. Selectable options come from the process-level catalog Remote. Key absence means no permission service is composed — clients hide the control.'),
|
|
997
|
+
'subagentCatalog': z.array(z.union([z.object({
|
|
998
|
+
'id': z.string().readonly(),
|
|
921
999
|
'createdAt': z.number().readonly(),
|
|
922
|
-
}), z.object({
|
|
923
1000
|
'mode': z.literal("one-shot").readonly(),
|
|
924
1001
|
'label': z.string().readonly().optional(),
|
|
925
|
-
})), z.intersection(z.object({
|
|
926
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
927
|
-
'createdAt': z.number().readonly(),
|
|
928
1002
|
}), z.object({
|
|
1003
|
+
'id': z.string().readonly(),
|
|
1004
|
+
'createdAt': z.number().readonly(),
|
|
929
1005
|
'mode': z.literal("external").readonly(),
|
|
930
1006
|
'label': z.string().readonly().optional(),
|
|
931
|
-
})), z.intersection(z.object({
|
|
932
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
933
|
-
'createdAt': z.number().readonly(),
|
|
934
1007
|
}), z.object({
|
|
1008
|
+
'id': z.string().readonly(),
|
|
1009
|
+
'createdAt': z.number().readonly(),
|
|
935
1010
|
'mode': z.literal("continuable").readonly(),
|
|
936
1011
|
'label': z.string().readonly(),
|
|
937
|
-
})), z.intersection(z.object({
|
|
938
|
-
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
939
|
-
'createdAt': z.number().readonly(),
|
|
940
1012
|
}), z.object({
|
|
1013
|
+
'id': z.string().readonly(),
|
|
1014
|
+
'createdAt': z.number().readonly(),
|
|
941
1015
|
'mode': z.literal("unknown").readonly(),
|
|
942
1016
|
'label': z.string().readonly().optional(),
|
|
943
|
-
})
|
|
1017
|
+
})])).optional().describe('Direct children in parent catalog event order, excluding fork-inherited facts.'),
|
|
944
1018
|
'subagentTiming': z.object({
|
|
945
|
-
'settledMs': z.number(),
|
|
1019
|
+
'settledMs': z.number().describe('Milliseconds accumulated across completed turns after the child\'s own descriptor.'),
|
|
946
1020
|
'active': z.object({
|
|
947
|
-
'since': z.number(),
|
|
948
|
-
'through': z.number(),
|
|
949
|
-
}).optional(),
|
|
950
|
-
'lastTurnCompleted': z.boolean().optional(),
|
|
951
|
-
}).optional(),
|
|
1021
|
+
'since': z.number().describe('Start of the open turn.'),
|
|
1022
|
+
'through': z.number().describe('Latest event time folded into this projection cut.'),
|
|
1023
|
+
}).optional().describe('Same-cut bounds of the currently open turn, when one has not reached `turn/end`.'),
|
|
1024
|
+
'lastTurnCompleted': z.boolean().optional().describe('Whether the latest closed turn after the child\'s own descriptor completed normally; absent while a turn is open or before one closes.'),
|
|
1025
|
+
}).optional().describe('Active-turn duration and latest closed-turn completion for a descriptor-backed subagent session.'),
|
|
952
1026
|
'subagent': z.union([z.literal(null), z.object({
|
|
953
|
-
'mode': z.literal("one-shot"),
|
|
954
|
-
'label': z.string().optional(),
|
|
955
|
-
'seq': z.
|
|
1027
|
+
'mode': z.literal("one-shot").describe('A terminal one-shot child.'),
|
|
1028
|
+
'label': z.string().optional().describe('Optional durable creation label from the child\'s descriptor.'),
|
|
1029
|
+
'seq': z.number().describe('Seq of the `subagent/descriptor` event this identity was folded from. `session.isOwnSeq(seq)` proves the identity comes from the child\'s OWN log suffix — where a descriptor is immutable once appended — and not from a fork seed\'s replayed ancestor descriptor.'),
|
|
956
1030
|
}), z.object({
|
|
957
|
-
'mode': z.literal("continuable"),
|
|
958
|
-
'label': z.string(),
|
|
959
|
-
'seq': z.
|
|
960
|
-
})]).optional(),
|
|
1031
|
+
'mode': z.literal("continuable").describe('A resumable conversation.'),
|
|
1032
|
+
'label': z.string().describe('Durable creation label from the child\'s descriptor.'),
|
|
1033
|
+
'seq': z.number().describe('Seq of the folded descriptor event; see the one-shot arm for the own-suffix proof.'),
|
|
1034
|
+
})]).optional().describe('Identity of a descriptor-backed subagent session. `null` ⟺ no valid descriptor (missing, malformed, or unrecognized-version — deliberately undistinguished). The sentinel is deliberately serializable: a value pushed over JSON transports must survive `JSON.stringify` losslessly, where an `undefined` field would be dropped and a stale identity would survive on the receiving side. The entry itself stays non-optional.'),
|
|
961
1035
|
'tokenUsage': z.object({
|
|
962
1036
|
'uncachedInputTokens': z.number(),
|
|
963
1037
|
'outputTokens': z.number(),
|
|
964
1038
|
'cacheReadTokens': z.number(),
|
|
965
1039
|
'cacheWriteTokens': z.number(),
|
|
966
|
-
}).optional(),
|
|
1040
|
+
}).optional().describe('Provider-reported usage accumulated across the complete durable log.'),
|
|
967
1041
|
'contextPressure': z.object({
|
|
968
|
-
'pressureTokens': z.number().optional(),
|
|
969
|
-
'projectedTokens': z.number().optional(),
|
|
970
|
-
'contextWindow': z.number().optional(),
|
|
971
|
-
}).optional(),
|
|
1042
|
+
'pressureTokens': z.number().optional().describe('Provider-reported prompt size of the most recent request: uncached input plus cache reads and writes. Response output is excluded, so this does not grow as the current turn streams. Absent until a provider reports usage.'),
|
|
1043
|
+
'projectedTokens': z.number().optional().describe('What the NEXT request\'s prompt would cost: {@link pressureTokens} plus the heuristic repricing of everything the surface gained or lost since that sample. Only the delta is estimated, so the figure stays anchored to the provider while still reacting the moment a compaction shadows a span — which `pressureTokens` alone cannot do, since compaction reports no usage of its own. Absent until a provider reports usage.'),
|
|
1044
|
+
'contextWindow': z.number().optional().describe('Newest recorded route capacity; absent when no adapter advertised one.'),
|
|
1045
|
+
}).optional().describe('Newest request pressure paired with the newest known route capacity.'),
|
|
972
1046
|
'contextBreakdown': z.object({
|
|
973
|
-
'systemTokens': z.number(),
|
|
974
|
-
'toolsTokens': z.number(),
|
|
975
|
-
'messageTokens': z.number(),
|
|
976
|
-
}).optional(),
|
|
1047
|
+
'systemTokens': z.number().describe('Heuristic tokens of the last nonempty surviving system prompt in surface order; 0 when none exists.'),
|
|
1048
|
+
'toolsTokens': z.number().describe('Heuristic tokens of the newest request envelope\'s tool schemas; 0 before any request.'),
|
|
1049
|
+
'messageTokens': z.number().describe('Heuristic tokens of every other visible surface node, including superseded system prompts.'),
|
|
1050
|
+
}).optional().describe('Heuristic system/tools/message composition of the next request.'),
|
|
1051
|
+
'agentTeam': z.object({
|
|
1052
|
+
'members': z.array(z.object({
|
|
1053
|
+
'id': z.string().readonly(),
|
|
1054
|
+
'name': z.string().readonly(),
|
|
1055
|
+
'role': z.union([z.literal("lead"), z.literal("teammate")]).readonly(),
|
|
1056
|
+
'phase': z.union([z.literal("failed"), z.literal("provisioning"), z.literal("active")]).readonly().describe('Durable lifecycle; the Lead row is always `active`. Turn activity comes from Session status.'),
|
|
1057
|
+
'error': z.string().readonly().optional(),
|
|
1058
|
+
})).readonly(),
|
|
1059
|
+
'tasks': z.array(z.object({
|
|
1060
|
+
'id': z.string().readonly(),
|
|
1061
|
+
'revision': z.number().readonly(),
|
|
1062
|
+
'subject': z.string().readonly(),
|
|
1063
|
+
'description': z.string().readonly(),
|
|
1064
|
+
'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress"), z.literal("deleted")]).readonly(),
|
|
1065
|
+
'blockedBy': z.array(z.string()).readonly(),
|
|
1066
|
+
'writeScopes': z.array(z.string()).readonly(),
|
|
1067
|
+
'ownerName': z.string().readonly().optional(),
|
|
1068
|
+
'ready': z.boolean().readonly(),
|
|
1069
|
+
'writeScopeWarnings': z.array(z.string()).readonly(),
|
|
1070
|
+
})).readonly(),
|
|
1071
|
+
'failure': z.string().readonly().optional(),
|
|
1072
|
+
}).optional().describe('Durable roster and non-deleted task board of the Team rooted at the projected Session.'),
|
|
977
1073
|
'userQuestions': z.object({
|
|
978
1074
|
'active': z.array(z.object({
|
|
979
|
-
'callId': z.
|
|
1075
|
+
'callId': z.string().readonly(),
|
|
980
1076
|
'questions': z.array(z.object({
|
|
981
|
-
'id': z.string(),
|
|
982
|
-
'question': z.string(),
|
|
983
|
-
'detail': z.string().optional(),
|
|
984
|
-
'header': z.string().optional(),
|
|
1077
|
+
'id': z.string().describe('Stable caller-provided question id, echoed in the answer.'),
|
|
1078
|
+
'question': z.string().describe('The question to display.'),
|
|
1079
|
+
'detail': z.string().optional().describe('Optional supporting detail rendered with the question but kept out of option labels.'),
|
|
1080
|
+
'header': z.string().optional().describe('Optional short heading/group label.'),
|
|
985
1081
|
'options': z.array(z.object({
|
|
986
|
-
'label': z.string(),
|
|
987
|
-
'description': z.string().optional(),
|
|
988
|
-
})).optional(),
|
|
989
|
-
'multiSelect': z.boolean().optional(),
|
|
1082
|
+
'label': z.string().describe('User-facing label.'),
|
|
1083
|
+
'description': z.string().optional().describe('Optional extra context rendered by capable UIs.'),
|
|
1084
|
+
})).optional().describe('Optional choices the UI can render as a menu.'),
|
|
1085
|
+
'multiSelect': z.boolean().optional().describe('Whether more than one option may be selected. Defaults to single-select.'),
|
|
990
1086
|
'intent': z.object({
|
|
991
|
-
'kind': z.literal("plan-review"),
|
|
992
|
-
'approve': z.string(),
|
|
993
|
-
'callId': z.
|
|
994
|
-
}).optional(),
|
|
1087
|
+
'kind': z.literal("plan-review").describe('A plan submitted for review: `detail` is the plan markdown `ask()` requires, and the decision approves or declines it.'),
|
|
1088
|
+
'approve': z.string().describe('The option label that approves the plan; every other option declines it. Named rather than positional so no UI infers the verdict from option order. An `approve` naming no option of its own question is rejected at `ask()`.'),
|
|
1089
|
+
'callId': z.string().optional().describe('Logged tool invocation whose arguments contain the reviewed plan.'),
|
|
1090
|
+
}).optional().describe('Optional presentation intent for capable UIs; absent asks for the generic option list.'),
|
|
995
1091
|
})).readonly(),
|
|
996
1092
|
'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
|
|
997
|
-
})).readonly(),
|
|
1093
|
+
})).readonly().describe('Calls that can still take an answer, in ask order.'),
|
|
998
1094
|
'settled': z.array(z.object({
|
|
999
|
-
'callId': z.
|
|
1095
|
+
'callId': z.string().readonly().describe('The settled call.'),
|
|
1000
1096
|
'answers': z.array(z.object({
|
|
1001
|
-
'id': z.string(),
|
|
1002
|
-
'selected': z.array(z.string()),
|
|
1003
|
-
'custom': z.string().optional(),
|
|
1004
|
-
})).readonly(),
|
|
1005
|
-
})).readonly(),
|
|
1006
|
-
}).optional(),
|
|
1097
|
+
'id': z.string().describe('The answered question id.'),
|
|
1098
|
+
'selected': z.array(z.string()).describe('Selected option labels. May accompany custom text for a multi-select question.'),
|
|
1099
|
+
'custom': z.string().optional().describe('Optional free-text "Other" answer.'),
|
|
1100
|
+
})).readonly().describe('The recorded batch, one entry per question; empty when the late reply carried none.'),
|
|
1101
|
+
})).readonly().describe('Calls an answer settled, in settlement order.'),
|
|
1102
|
+
}).optional().describe('Timed questions that remain answerable in this Session, and the ones a late reply settled.'),
|
|
1007
1103
|
'goal': z.union([z.literal(null), z.object({
|
|
1008
1104
|
'goal': z.object({
|
|
1009
|
-
'objective': z.string().readonly(),
|
|
1010
|
-
'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly(),
|
|
1105
|
+
'objective': z.string().readonly().describe('Human-requested completion objective.'),
|
|
1106
|
+
'phase': z.union([z.literal("active"), z.literal("paused"), z.literal("blocked"), z.literal("complete")]).readonly().describe('Durable lifecycle phase.'),
|
|
1011
1107
|
'blockedReason': z.object({
|
|
1012
|
-
'code': z.string().readonly(),
|
|
1013
|
-
'message': z.string().readonly(),
|
|
1014
|
-
}).readonly().optional(),
|
|
1015
|
-
'maxGoalRounds': z.number().readonly(),
|
|
1016
|
-
'id': z.
|
|
1017
|
-
'revision': z.number().readonly(),
|
|
1018
|
-
}).readonly(),
|
|
1019
|
-
'roundsStarted': z.number().readonly(),
|
|
1020
|
-
'createdAt': z.number().readonly(),
|
|
1021
|
-
'updatedAt': z.number().readonly(),
|
|
1022
|
-
})]).optional(),
|
|
1023
|
-
|
|
1108
|
+
'code': z.string().readonly().describe('Stable lower-kebab-case classification chosen by the blocking policy.'),
|
|
1109
|
+
'message': z.string().readonly().describe('Non-empty explanation shown to humans and models.'),
|
|
1110
|
+
}).readonly().optional().describe('Present exactly while `phase` is `blocked`.'),
|
|
1111
|
+
'maxGoalRounds': z.number().readonly().describe('Total admitted goal-round cap.'),
|
|
1112
|
+
'id': z.string().readonly().describe('Stable goal identity.'),
|
|
1113
|
+
'revision': z.number().readonly().describe('Positive revision; every durable mutation increments it.'),
|
|
1114
|
+
}).readonly().describe('Current durable goal snapshot (the CAS ref for mutations rides on it).'),
|
|
1115
|
+
'roundsStarted': z.number().readonly().describe('Highest admitted round number for this goal.'),
|
|
1116
|
+
'createdAt': z.number().readonly().describe('Epoch milliseconds of the create mutation.'),
|
|
1117
|
+
'updatedAt': z.number().readonly().describe('Epoch milliseconds of the latest mutation.'),
|
|
1118
|
+
})]).optional().describe('The session\'s current goal and admitted-round count, or `null` before the first create and after a clear tombstone. `goal/change` supplies the whole lifecycle value; matching admitted `user/message` events advance `roundsStarted`.'),
|
|
1119
|
+
'plan': z.object({
|
|
1120
|
+
'active': z.boolean(),
|
|
1121
|
+
'pending': z.boolean(),
|
|
1122
|
+
}).optional().describe('Plan collaboration state folded from the plan command lifecycle and `plan/mode` events.'),
|
|
1123
|
+
}), z.record(z.string(), z.json()).readonly()).readonly(),
|
|
1024
1124
|
})]))
|
|
1025
1125
|
let _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema$value
|
|
1026
1126
|
const _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema$value ??= z.object({
|
|
1027
|
-
'requestId': z.
|
|
1028
|
-
'sessionId': z.
|
|
1127
|
+
'requestId': z.string().readonly().describe('Client-minted identity persisted on the exact accepted user message.'),
|
|
1128
|
+
'sessionId': z.string().readonly(),
|
|
1029
1129
|
'mode': z.union([z.literal("queue"), z.literal("steer")]).readonly(),
|
|
1030
1130
|
'content': z.array(z.union([z.object({
|
|
1031
1131
|
'type': z.literal("text").readonly(),
|
|
@@ -1037,8 +1137,8 @@ const _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema
|
|
|
1037
1137
|
'name': z.string().readonly().optional(),
|
|
1038
1138
|
}), z.object({
|
|
1039
1139
|
'type': z.literal("file").readonly(),
|
|
1040
|
-
'receiptId': z.
|
|
1041
|
-
})])).readonly(),
|
|
1140
|
+
'receiptId': z.string().readonly(),
|
|
1141
|
+
})])).readonly().describe('At least one non-whitespace text part or attachment.'),
|
|
1042
1142
|
'clientTimeZone': z.string().readonly().optional(),
|
|
1043
1143
|
}))
|
|
1044
1144
|
let _deepseek_ai_dsh_api_session_controller_session_prompt_result$schema$value
|
|
@@ -1047,7 +1147,7 @@ const _deepseek_ai_dsh_api_session_controller_session_prompt_result$schema = ()
|
|
|
1047
1147
|
}))
|
|
1048
1148
|
let _deepseek_ai_dsh_api_session_controller_session_rename_parameter_0$schema$value
|
|
1049
1149
|
const _deepseek_ai_dsh_api_session_controller_session_rename_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_rename_parameter_0$schema$value ??= z.object({
|
|
1050
|
-
'sessionId': z.
|
|
1150
|
+
'sessionId': z.string().readonly(),
|
|
1051
1151
|
'title': z.string().readonly(),
|
|
1052
1152
|
}))
|
|
1053
1153
|
let _deepseek_ai_dsh_api_session_controller_session_rename_result$schema$value
|
|
@@ -1062,14 +1162,14 @@ const _deepseek_ai_dsh_api_session_controller_session_search_parameter_0$schema
|
|
|
1062
1162
|
let _deepseek_ai_dsh_api_session_controller_session_search_result$schema$value
|
|
1063
1163
|
const _deepseek_ai_dsh_api_session_controller_session_search_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_search_result$schema$value ??= z.object({
|
|
1064
1164
|
'items': z.array(z.object({
|
|
1065
|
-
'sessionId': z.
|
|
1165
|
+
'sessionId': z.string().readonly(),
|
|
1066
1166
|
'snippet': z.string().readonly(),
|
|
1067
1167
|
})).readonly(),
|
|
1068
1168
|
'hasMore': z.boolean().readonly(),
|
|
1069
1169
|
}))
|
|
1070
1170
|
let _deepseek_ai_dsh_api_session_controller_session_selectModel_parameter_0$schema$value
|
|
1071
1171
|
const _deepseek_ai_dsh_api_session_controller_session_selectModel_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_selectModel_parameter_0$schema$value ??= z.object({
|
|
1072
|
-
'sessionId': z.
|
|
1172
|
+
'sessionId': z.string().readonly(),
|
|
1073
1173
|
'provider': z.string().readonly(),
|
|
1074
1174
|
'model': z.string().readonly(),
|
|
1075
1175
|
'reasoningEffort': z.string().readonly().optional(),
|
|
@@ -1084,14 +1184,14 @@ const _deepseek_ai_dsh_api_session_controller_session_selectModel_result$schema
|
|
|
1084
1184
|
}))
|
|
1085
1185
|
let _deepseek_ai_dsh_api_session_controller_session_updateQueue_parameter_0$schema$value
|
|
1086
1186
|
const _deepseek_ai_dsh_api_session_controller_session_updateQueue_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_updateQueue_parameter_0$schema$value ??= z.object({
|
|
1087
|
-
'sessionId': z.
|
|
1088
|
-
'itemId': z.
|
|
1187
|
+
'sessionId': z.string().readonly(),
|
|
1188
|
+
'itemId': z.string().readonly(),
|
|
1089
1189
|
'action': z.union([z.object({
|
|
1090
1190
|
'kind': z.literal("edit").readonly(),
|
|
1091
1191
|
'content': z.array(z.object({
|
|
1092
1192
|
'type': z.literal("text"),
|
|
1093
1193
|
'text': z.string(),
|
|
1094
|
-
})).readonly(),
|
|
1194
|
+
})).readonly().describe('Non-empty text-only replacement content.'),
|
|
1095
1195
|
}), z.object({
|
|
1096
1196
|
'kind': z.literal("remove").readonly(),
|
|
1097
1197
|
}), z.object({
|
|
@@ -1108,37 +1208,168 @@ const _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_
|
|
|
1108
1208
|
}))
|
|
1109
1209
|
let _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_result$schema$value
|
|
1110
1210
|
const _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_result$schema$value ??= z.array(z.object({
|
|
1111
|
-
'id': z.string().readonly(),
|
|
1211
|
+
'id': z.string().readonly().describe('OS application identifier; callers must revalidate it against the file\'s current handlers before opening.'),
|
|
1112
1212
|
'name': z.string().readonly(),
|
|
1113
1213
|
'default': z.boolean().readonly(),
|
|
1114
|
-
'icon': z.union([z.literal(null), z.string()]).readonly(),
|
|
1214
|
+
'icon': z.union([z.literal(null), z.string()]).readonly().describe('PNG or SVG data URL, or null when the desktop supplies no icon.'),
|
|
1115
1215
|
})))
|
|
1116
1216
|
let _deepseek_ai_dsh_api_session_controller_skills_list_parameter_0$schema$value
|
|
1117
1217
|
const _deepseek_ai_dsh_api_session_controller_skills_list_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_skills_list_parameter_0$schema$value ??= z.object({
|
|
1118
|
-
'sessionId': z.
|
|
1218
|
+
'sessionId': z.string().readonly(),
|
|
1119
1219
|
}))
|
|
1120
1220
|
let _deepseek_ai_dsh_api_session_controller_skills_list_result$schema$value
|
|
1121
1221
|
const _deepseek_ai_dsh_api_session_controller_skills_list_result$schema = () => (_deepseek_ai_dsh_api_session_controller_skills_list_result$schema$value ??= z.object({
|
|
1122
1222
|
'skills': z.array(z.object({
|
|
1123
|
-
'path': z.string().readonly().optional(),
|
|
1124
|
-
'name': z.string().readonly(),
|
|
1125
|
-
'description': z.string().readonly(),
|
|
1126
|
-
'whenToUse': z.string().readonly().optional(),
|
|
1127
|
-
'modelInvocable': z.boolean().readonly(),
|
|
1223
|
+
'path': z.string().readonly().optional().describe('Absolute SKILL.md path when supplied by a filesystem provider.'),
|
|
1224
|
+
'name': z.string().readonly().describe('Kebab-case identifier referenced as `/name`.'),
|
|
1225
|
+
'description': z.string().readonly().describe('Short routing description.'),
|
|
1226
|
+
'whenToUse': z.string().readonly().optional().describe('Optional extra routing guidance.'),
|
|
1227
|
+
'modelInvocable': z.boolean().readonly().describe('Whether the same skill is also advertised to the model.'),
|
|
1128
1228
|
})).readonly(),
|
|
1129
1229
|
}))
|
|
1230
|
+
let _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0_strict$schema$value
|
|
1231
|
+
const _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0_strict$schema$value ??= z.string())
|
|
1232
|
+
let _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_1_strict$schema$value
|
|
1233
|
+
const _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_1_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_1_strict$schema$value ??= z.string())
|
|
1234
|
+
let _deepseek_ai_dsh_api_session_controller_session_attachment_parameter_0_strict$schema$value
|
|
1235
|
+
const _deepseek_ai_dsh_api_session_controller_session_attachment_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_attachment_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1236
|
+
'sessionId': z.string().readonly(),
|
|
1237
|
+
'attachmentId': z.string().readonly(),
|
|
1238
|
+
}))
|
|
1239
|
+
let _deepseek_ai_dsh_api_session_controller_session_cancel_parameter_0_strict$schema$value
|
|
1240
|
+
const _deepseek_ai_dsh_api_session_controller_session_cancel_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_cancel_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1241
|
+
'sessionId': z.string().readonly(),
|
|
1242
|
+
}))
|
|
1243
|
+
let _deepseek_ai_dsh_api_session_controller_session_create_parameter_0_strict$schema$value
|
|
1244
|
+
const _deepseek_ai_dsh_api_session_controller_session_create_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_create_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1245
|
+
'workspaceId': z.string().readonly().optional().describe('Workspace the Session joins; exclusive with `cwd`.'),
|
|
1246
|
+
'cwd': z.string().readonly().optional().describe('Directory the Session owns when no Workspace is named.'),
|
|
1247
|
+
'sessionId': z.string().readonly().optional().describe('Blank Session to reuse while it is reusable, or the identity of a new Session when none is stored under it.'),
|
|
1248
|
+
'agentPreset': z.string().readonly().optional().describe('Preset the Session runs, replacing a reused Session\'s recorded preset; the configured default when omitted.'),
|
|
1249
|
+
}))
|
|
1250
|
+
let _deepseek_ai_dsh_api_session_controller_session_follow_parameter_0_strict$schema$value
|
|
1251
|
+
const _deepseek_ai_dsh_api_session_controller_session_follow_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_follow_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1252
|
+
'address': z.union([z.strictObject({
|
|
1253
|
+
'kind': z.literal("session").readonly(),
|
|
1254
|
+
'sessionId': z.string().readonly(),
|
|
1255
|
+
}), z.strictObject({
|
|
1256
|
+
'kind': z.literal("subagent").readonly(),
|
|
1257
|
+
'parentSessionId': z.string().readonly(),
|
|
1258
|
+
'childSessionId': z.string().readonly(),
|
|
1259
|
+
'mode': z.union([z.literal("one-shot"), z.literal("continuable"), z.literal("unknown")]).readonly(),
|
|
1260
|
+
})]).readonly(),
|
|
1261
|
+
'assistantStream': z.literal(true).readonly().optional().describe('Include process-local assistant presentation frames for the Web client.'),
|
|
1262
|
+
'maxMessages': z.number().readonly().optional(),
|
|
1263
|
+
'turnWindow': z.strictObject({
|
|
1264
|
+
'minMessages': z.number().readonly().describe('Minimum append-origin user/assistant messages; must not exceed maxMessages.'),
|
|
1265
|
+
'minTurns': z.number().readonly().describe('Minimum Turn starts crossed, including the partial Turn at beforeSeq.'),
|
|
1266
|
+
}).readonly().optional().describe('Stop at a Turn start after both minima, unless maxMessages or history exhaustion wins.'),
|
|
1267
|
+
}))
|
|
1268
|
+
let _deepseek_ai_dsh_api_session_controller_session_fork_parameter_0_strict$schema$value
|
|
1269
|
+
const _deepseek_ai_dsh_api_session_controller_session_fork_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_fork_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1270
|
+
'sessionId': z.string().readonly(),
|
|
1271
|
+
'atSeq': z.number().readonly().optional().describe('Exact inclusive source event seq; omission selects the latest completed-turn prefix.'),
|
|
1272
|
+
'allowMigration': z.boolean().readonly().optional().describe('False asks the Host to check for required migration before forking. Defaults to true.'),
|
|
1273
|
+
}))
|
|
1274
|
+
let _deepseek_ai_dsh_api_session_controller_session_list_parameter_0_strict$schema$value
|
|
1275
|
+
const _deepseek_ai_dsh_api_session_controller_session_list_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_list_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1276
|
+
'cursor': z.string().readonly().optional(),
|
|
1277
|
+
}))
|
|
1278
|
+
let _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0_strict$schema$value
|
|
1279
|
+
const _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1280
|
+
'action': z.literal("reveal").readonly().optional().describe('File-manager navigation when requested; omission uses the default application.'),
|
|
1281
|
+
'application': z.string().readonly().optional().describe('Registered application identifier; ignored for reveal. Omission preserves the operating system default.'),
|
|
1282
|
+
'path': z.string().readonly().describe('Path after best-effort Session workspace resolution, in Host filesystem syntax.'),
|
|
1283
|
+
}))
|
|
1284
|
+
let _deepseek_ai_dsh_api_session_controller_session_page_parameter_0_strict$schema$value
|
|
1285
|
+
const _deepseek_ai_dsh_api_session_controller_session_page_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_page_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1286
|
+
'address': z.union([z.strictObject({
|
|
1287
|
+
'kind': z.literal("session").readonly(),
|
|
1288
|
+
'sessionId': z.string().readonly(),
|
|
1289
|
+
}), z.strictObject({
|
|
1290
|
+
'kind': z.literal("subagent").readonly(),
|
|
1291
|
+
'parentSessionId': z.string().readonly(),
|
|
1292
|
+
'childSessionId': z.string().readonly(),
|
|
1293
|
+
'mode': z.union([z.literal("one-shot"), z.literal("continuable"), z.literal("unknown")]).readonly(),
|
|
1294
|
+
})]).readonly(),
|
|
1295
|
+
'throughSeq': z.number().readonly().describe('Inclusive log cut obtained from the corresponding follow opening frame.'),
|
|
1296
|
+
'beforeSeq': z.number().readonly().optional(),
|
|
1297
|
+
'maxMessages': z.number().readonly().optional(),
|
|
1298
|
+
'turnWindow': z.strictObject({
|
|
1299
|
+
'minMessages': z.number().readonly().describe('Minimum append-origin user/assistant messages; must not exceed maxMessages.'),
|
|
1300
|
+
'minTurns': z.number().readonly().describe('Minimum Turn starts crossed, including the partial Turn at beforeSeq.'),
|
|
1301
|
+
}).readonly().optional().describe('Stop at a Turn start after both minima, unless maxMessages or history exhaustion wins.'),
|
|
1302
|
+
}))
|
|
1303
|
+
let _deepseek_ai_dsh_api_session_controller_session_projections_parameter_0_strict$schema$value
|
|
1304
|
+
const _deepseek_ai_dsh_api_session_controller_session_projections_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_projections_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1305
|
+
'sessionId': z.string().readonly(),
|
|
1306
|
+
}))
|
|
1307
|
+
let _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0_strict$schema$value
|
|
1308
|
+
const _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1309
|
+
'requestId': z.string().readonly().describe('Client-minted identity persisted on the exact accepted user message.'),
|
|
1310
|
+
'sessionId': z.string().readonly(),
|
|
1311
|
+
'mode': z.union([z.literal("queue"), z.literal("steer")]).readonly(),
|
|
1312
|
+
'content': z.array(z.union([z.strictObject({
|
|
1313
|
+
'type': z.literal("text").readonly(),
|
|
1314
|
+
'text': z.string().readonly(),
|
|
1315
|
+
}), z.strictObject({
|
|
1316
|
+
'type': z.literal("image").readonly(),
|
|
1317
|
+
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]).readonly(),
|
|
1318
|
+
'data': z.string().readonly(),
|
|
1319
|
+
'name': z.string().readonly().optional(),
|
|
1320
|
+
}), z.strictObject({
|
|
1321
|
+
'type': z.literal("file").readonly(),
|
|
1322
|
+
'receiptId': z.string().readonly(),
|
|
1323
|
+
})])).readonly().describe('At least one non-whitespace text part or attachment.'),
|
|
1324
|
+
'clientTimeZone': z.string().readonly().optional(),
|
|
1325
|
+
}))
|
|
1326
|
+
let _deepseek_ai_dsh_api_session_controller_session_rename_parameter_0_strict$schema$value
|
|
1327
|
+
const _deepseek_ai_dsh_api_session_controller_session_rename_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_rename_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1328
|
+
'sessionId': z.string().readonly(),
|
|
1329
|
+
'title': z.string().readonly(),
|
|
1330
|
+
}))
|
|
1331
|
+
let _deepseek_ai_dsh_api_session_controller_session_search_parameter_0_strict$schema$value
|
|
1332
|
+
const _deepseek_ai_dsh_api_session_controller_session_search_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_search_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1333
|
+
'query': z.string().readonly(),
|
|
1334
|
+
}))
|
|
1335
|
+
let _deepseek_ai_dsh_api_session_controller_session_selectModel_parameter_0_strict$schema$value
|
|
1336
|
+
const _deepseek_ai_dsh_api_session_controller_session_selectModel_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_selectModel_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1337
|
+
'sessionId': z.string().readonly(),
|
|
1338
|
+
'provider': z.string().readonly(),
|
|
1339
|
+
'model': z.string().readonly(),
|
|
1340
|
+
'reasoningEffort': z.string().readonly().optional(),
|
|
1341
|
+
}))
|
|
1342
|
+
let _deepseek_ai_dsh_api_session_controller_session_updateQueue_parameter_0_strict$schema$value
|
|
1343
|
+
const _deepseek_ai_dsh_api_session_controller_session_updateQueue_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_updateQueue_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1344
|
+
'sessionId': z.string().readonly(),
|
|
1345
|
+
'itemId': z.string().readonly(),
|
|
1346
|
+
'action': z.union([z.strictObject({
|
|
1347
|
+
'kind': z.literal("edit").readonly(),
|
|
1348
|
+
'content': z.array(z.strictObject({
|
|
1349
|
+
'type': z.literal("text"),
|
|
1350
|
+
'text': z.string(),
|
|
1351
|
+
})).readonly().describe('Non-empty text-only replacement content.'),
|
|
1352
|
+
}), z.strictObject({
|
|
1353
|
+
'kind': z.literal("remove").readonly(),
|
|
1354
|
+
}), z.strictObject({
|
|
1355
|
+
'kind': z.literal("steer").readonly(),
|
|
1356
|
+
})]).readonly(),
|
|
1357
|
+
}))
|
|
1358
|
+
let _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_parameter_0_strict$schema$value
|
|
1359
|
+
const _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1360
|
+
'path': z.string().readonly(),
|
|
1361
|
+
}))
|
|
1362
|
+
let _deepseek_ai_dsh_api_session_controller_skills_list_parameter_0_strict$schema$value
|
|
1363
|
+
const _deepseek_ai_dsh_api_session_controller_skills_list_parameter_0_strict$schema = () => (_deepseek_ai_dsh_api_session_controller_skills_list_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1364
|
+
'sessionId': z.string().readonly(),
|
|
1365
|
+
}))
|
|
1130
1366
|
|
|
1131
|
-
|
|
1367
|
+
const $remote = createTypertRemoteInfo({
|
|
1132
1368
|
package: '@deepseek-ai/dsh-api-session-controller',
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
],
|
|
1136
|
-
invocations: [
|
|
1137
|
-
{
|
|
1138
|
-
id: '@deepseek-ai/dsh-api-session-controller#fileReferences/list',
|
|
1369
|
+
methods: {
|
|
1370
|
+
'fileReferences/list': {
|
|
1139
1371
|
service: 'sessionFileReferences',
|
|
1140
|
-
|
|
1141
|
-
method: 'list',
|
|
1372
|
+
description: 'List file and directory candidates for one Agent\'s working directory.',
|
|
1142
1373
|
invocation: { kind: 'direct' },
|
|
1143
1374
|
scope: {
|
|
1144
1375
|
context: 'agent',
|
|
@@ -1148,22 +1379,37 @@ export const TYPERT = {
|
|
|
1148
1379
|
{
|
|
1149
1380
|
name: 'agent',
|
|
1150
1381
|
wire: 'agentId',
|
|
1382
|
+
description: 'target Agent resolved from the Session identity on the wire.',
|
|
1151
1383
|
source: 'lookup',
|
|
1152
1384
|
lookup: 'agent',
|
|
1153
1385
|
codec: {
|
|
1154
1386
|
mode: 'strict',
|
|
1155
1387
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
1156
1388
|
create: _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0$schema,
|
|
1389
|
+
jsonSchema: {"type":"string"},
|
|
1390
|
+
},
|
|
1391
|
+
strictCodec: {
|
|
1392
|
+
mode: 'strict',
|
|
1393
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
1394
|
+
create: _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_0_strict$schema,
|
|
1395
|
+
jsonSchema: {"type":"string"},
|
|
1157
1396
|
},
|
|
1158
1397
|
},
|
|
1159
1398
|
{
|
|
1160
1399
|
name: 'query',
|
|
1161
|
-
|
|
1400
|
+
description: 'path text following `@` or `@"`.',
|
|
1162
1401
|
source: 'json',
|
|
1163
1402
|
codec: {
|
|
1164
1403
|
mode: 'strict',
|
|
1165
1404
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller#fileReferences/list:query',
|
|
1166
1405
|
create: _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_1$schema,
|
|
1406
|
+
jsonSchema: {"type":"string"},
|
|
1407
|
+
},
|
|
1408
|
+
strictCodec: {
|
|
1409
|
+
mode: 'strict',
|
|
1410
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller#fileReferences/list:query',
|
|
1411
|
+
create: _deepseek_ai_dsh_api_session_controller_fileReferences_list_parameter_1_strict$schema,
|
|
1412
|
+
jsonSchema: {"type":"string"},
|
|
1167
1413
|
},
|
|
1168
1414
|
},
|
|
1169
1415
|
],
|
|
@@ -1172,24 +1418,31 @@ export const TYPERT = {
|
|
|
1172
1418
|
mode: 'strict',
|
|
1173
1419
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller#fileReferences/list:result',
|
|
1174
1420
|
create: _deepseek_ai_dsh_api_session_controller_fileReferences_list_result$schema,
|
|
1421
|
+
description: 'deterministic path-only candidates from the composed provider.',
|
|
1422
|
+
jsonSchema: {"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"User-facing path accepted by normal prompts and filesystem tools."},"kind":{"type":"string","enum":["file","directory"],"description":"Directories keep completion open; files finish the mention."}},"required":["path","kind"],"additionalProperties":true}},
|
|
1175
1423
|
},
|
|
1176
1424
|
sourceLocation: {"file":"packages/api/session-controller/src/file-references.ts","line":33,"column":3},
|
|
1177
1425
|
},
|
|
1178
|
-
{
|
|
1179
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/attachment',
|
|
1426
|
+
'session/attachment': {
|
|
1180
1427
|
service: 'sessionController',
|
|
1181
|
-
|
|
1182
|
-
method: 'attachment',
|
|
1428
|
+
description: 'Read one image proven reachable from the addressed Session log.',
|
|
1183
1429
|
invocation: { kind: 'direct' },
|
|
1184
1430
|
parameters: [
|
|
1185
1431
|
{
|
|
1186
1432
|
name: 'request',
|
|
1187
|
-
|
|
1433
|
+
description: 'Session and attachment identities used for authorization.',
|
|
1188
1434
|
source: 'json',
|
|
1189
1435
|
codec: {
|
|
1190
1436
|
mode: 'strict',
|
|
1191
1437
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionAttachmentRequest',
|
|
1192
1438
|
create: _deepseek_ai_dsh_api_session_controller_session_attachment_parameter_0$schema,
|
|
1439
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"},"attachmentId":{"type":"string"}},"required":["sessionId","attachmentId"],"additionalProperties":true},
|
|
1440
|
+
},
|
|
1441
|
+
strictCodec: {
|
|
1442
|
+
mode: 'strict',
|
|
1443
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionAttachmentRequest',
|
|
1444
|
+
create: _deepseek_ai_dsh_api_session_controller_session_attachment_parameter_0_strict$schema,
|
|
1445
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"},"attachmentId":{"type":"string"}},"required":["sessionId","attachmentId"],"additionalProperties":false},
|
|
1193
1446
|
},
|
|
1194
1447
|
},
|
|
1195
1448
|
],
|
|
@@ -1197,24 +1450,31 @@ export const TYPERT = {
|
|
|
1197
1450
|
mode: 'strict',
|
|
1198
1451
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionAttachmentValue',
|
|
1199
1452
|
create: _deepseek_ai_dsh_api_session_controller_session_attachment_result$schema,
|
|
1453
|
+
description: 'the durable attachment reference and base64-encoded bytes.',
|
|
1454
|
+
jsonSchema: {"type":"object","properties":{"attachment":{"type":"object","properties":{"attachmentId":{"type":"string","description":"Opaque storage identifier; never a filesystem path or bearer URL."},"mediaType":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif"],"description":"Media type verified from the stored bytes."},"bytes":{"type":"number","description":"Exact encoded byte length."},"width":{"type":"number","description":"Intrinsic encoded width in pixels."},"height":{"type":"number","description":"Intrinsic encoded height in pixels."},"name":{"type":"string","description":"Optional display name stripped of local path information."},"originalDimensions":{"type":"object","properties":{"width":{"type":"number"},"height":{"type":"number"}},"required":["width","height"],"additionalProperties":true,"description":"Input dimensions after applying EXIF orientation and before normalization scaling. Present only when normalization reduced the image."}},"required":["attachmentId","mediaType","bytes","width","height"],"additionalProperties":true},"data":{"type":"string"}},"required":["attachment","data"],"additionalProperties":true},
|
|
1200
1455
|
},
|
|
1201
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1456
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":494,"column":3},
|
|
1202
1457
|
},
|
|
1203
|
-
{
|
|
1204
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/cancel',
|
|
1458
|
+
'session/cancel': {
|
|
1205
1459
|
service: 'sessionController',
|
|
1206
|
-
|
|
1207
|
-
method: 'cancel',
|
|
1460
|
+
description: 'Cancel one active Agent turn without dropping its pending inbox.',
|
|
1208
1461
|
invocation: { kind: 'direct' },
|
|
1209
1462
|
parameters: [
|
|
1210
1463
|
{
|
|
1211
1464
|
name: 'request',
|
|
1212
|
-
|
|
1465
|
+
description: 'Session whose active Agent turn is cancelled.',
|
|
1213
1466
|
source: 'json',
|
|
1214
1467
|
codec: {
|
|
1215
1468
|
mode: 'strict',
|
|
1216
1469
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCancelRequest',
|
|
1217
1470
|
create: _deepseek_ai_dsh_api_session_controller_session_cancel_parameter_0$schema,
|
|
1471
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"],"additionalProperties":true},
|
|
1472
|
+
},
|
|
1473
|
+
strictCodec: {
|
|
1474
|
+
mode: 'strict',
|
|
1475
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCancelRequest',
|
|
1476
|
+
create: _deepseek_ai_dsh_api_session_controller_session_cancel_parameter_0_strict$schema,
|
|
1477
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"],"additionalProperties":false},
|
|
1218
1478
|
},
|
|
1219
1479
|
},
|
|
1220
1480
|
],
|
|
@@ -1222,14 +1482,14 @@ export const TYPERT = {
|
|
|
1222
1482
|
mode: 'strict',
|
|
1223
1483
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCancelValue',
|
|
1224
1484
|
create: _deepseek_ai_dsh_api_session_controller_session_cancel_result$schema,
|
|
1485
|
+
description: 'acknowledgement that cancellation was requested.',
|
|
1486
|
+
jsonSchema: {"type":"object","properties":{"accepted":{"type":"boolean","const":true}},"required":["accepted"],"additionalProperties":true},
|
|
1225
1487
|
},
|
|
1226
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1488
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":514,"column":3},
|
|
1227
1489
|
},
|
|
1228
|
-
{
|
|
1229
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath',
|
|
1490
|
+
'session/canOpenWorkspacePath': {
|
|
1230
1491
|
service: 'sessionController',
|
|
1231
|
-
|
|
1232
|
-
method: 'canOpenWorkspacePath',
|
|
1492
|
+
description: 'Report whether this deployment can hand a Session workspace path to a native desktop.',
|
|
1233
1493
|
invocation: { kind: 'direct' },
|
|
1234
1494
|
parameters: [
|
|
1235
1495
|
],
|
|
@@ -1237,14 +1497,14 @@ export const TYPERT = {
|
|
|
1237
1497
|
mode: 'strict',
|
|
1238
1498
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/canOpenWorkspacePath:result',
|
|
1239
1499
|
create: _deepseek_ai_dsh_api_session_controller_session_canOpenWorkspacePath_result$schema,
|
|
1500
|
+
description: 'true when the matching open operation is available.',
|
|
1501
|
+
jsonSchema: {"type":"boolean"},
|
|
1240
1502
|
},
|
|
1241
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1503
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":347,"column":3},
|
|
1242
1504
|
},
|
|
1243
|
-
{
|
|
1244
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/control',
|
|
1505
|
+
'session/control': {
|
|
1245
1506
|
service: 'sessionController',
|
|
1246
|
-
|
|
1247
|
-
method: 'control',
|
|
1507
|
+
description: 'Stream a complete live-control baseline followed by replacement frames.',
|
|
1248
1508
|
mode: 'stream',
|
|
1249
1509
|
invocation: { kind: 'direct' },
|
|
1250
1510
|
parameters: [
|
|
@@ -1254,24 +1514,31 @@ export const TYPERT = {
|
|
|
1254
1514
|
mode: 'strict',
|
|
1255
1515
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionControlFrame',
|
|
1256
1516
|
create: _deepseek_ai_dsh_api_session_controller_session_control_result$schema,
|
|
1517
|
+
description: 'one complete baseline followed by live replacement frames.',
|
|
1518
|
+
jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
|
|
1257
1519
|
},
|
|
1258
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1520
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":599,"column":10},
|
|
1259
1521
|
},
|
|
1260
|
-
{
|
|
1261
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/create',
|
|
1522
|
+
'session/create': {
|
|
1262
1523
|
service: 'sessionController',
|
|
1263
|
-
|
|
1264
|
-
method: 'create',
|
|
1524
|
+
description: 'Create one ordinary Session for a new conversation, reusing the named blank Session while it is reusable.',
|
|
1265
1525
|
invocation: { kind: 'direct' },
|
|
1266
1526
|
parameters: [
|
|
1267
1527
|
{
|
|
1268
1528
|
name: 'request',
|
|
1269
|
-
|
|
1529
|
+
description: 'optional blank Session to reuse, location, and Agent preset.',
|
|
1270
1530
|
source: 'json',
|
|
1271
1531
|
codec: {
|
|
1272
1532
|
mode: 'strict',
|
|
1273
1533
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCreateRequest',
|
|
1274
1534
|
create: _deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema,
|
|
1535
|
+
jsonSchema: {"type":"object","properties":{"workspaceId":{"type":"string","description":"Workspace the Session joins; exclusive with `cwd`."},"cwd":{"type":"string","description":"Directory the Session owns when no Workspace is named."},"sessionId":{"type":"string","description":"Blank Session to reuse while it is reusable, or the identity of a new Session when none is stored under it."},"agentPreset":{"type":"string","description":"Preset the Session runs, replacing a reused Session's recorded preset; the configured default when omitted."}},"required":[],"additionalProperties":true},
|
|
1536
|
+
},
|
|
1537
|
+
strictCodec: {
|
|
1538
|
+
mode: 'strict',
|
|
1539
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCreateRequest',
|
|
1540
|
+
create: _deepseek_ai_dsh_api_session_controller_session_create_parameter_0_strict$schema,
|
|
1541
|
+
jsonSchema: {"type":"object","properties":{"workspaceId":{"type":"string","description":"Workspace the Session joins; exclusive with `cwd`."},"cwd":{"type":"string","description":"Directory the Session owns when no Workspace is named."},"sessionId":{"type":"string","description":"Blank Session to reuse while it is reusable, or the identity of a new Session when none is stored under it."},"agentPreset":{"type":"string","description":"Preset the Session runs, replacing a reused Session's recorded preset; the configured default when omitted."}},"required":[],"additionalProperties":false},
|
|
1275
1542
|
},
|
|
1276
1543
|
},
|
|
1277
1544
|
],
|
|
@@ -1279,25 +1546,32 @@ export const TYPERT = {
|
|
|
1279
1546
|
mode: 'strict',
|
|
1280
1547
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionCreateValue',
|
|
1281
1548
|
create: _deepseek_ai_dsh_api_session_controller_session_create_result$schema,
|
|
1549
|
+
description: 'the created or reused Session identity and its preset when configured.',
|
|
1550
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string","description":"The created or reused Session, which may differ from the requested `sessionId`."},"agentPreset":{"type":"string","description":"Preset the Session runs, when the deployment composes a preset roster."}},"required":["sessionId"],"additionalProperties":true},
|
|
1282
1551
|
},
|
|
1283
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1552
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":301,"column":3},
|
|
1284
1553
|
},
|
|
1285
|
-
{
|
|
1286
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/follow',
|
|
1554
|
+
'session/follow': {
|
|
1287
1555
|
service: 'sessionController',
|
|
1288
|
-
|
|
1289
|
-
method: 'follow',
|
|
1556
|
+
description: 'Follow one Session log from its opening or resume cursor.',
|
|
1290
1557
|
mode: 'stream',
|
|
1291
1558
|
invocation: { kind: 'direct' },
|
|
1292
1559
|
parameters: [
|
|
1293
1560
|
{
|
|
1294
1561
|
name: 'request',
|
|
1295
|
-
|
|
1562
|
+
description: 'durable address and last committed sequence already held by the caller.',
|
|
1296
1563
|
source: 'json',
|
|
1297
1564
|
codec: {
|
|
1298
1565
|
mode: 'strict',
|
|
1299
1566
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionFollowRequest',
|
|
1300
1567
|
create: _deepseek_ai_dsh_api_session_controller_session_follow_parameter_0$schema,
|
|
1568
|
+
jsonSchema: {"type":"object","properties":{"address":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"session"},"sessionId":{"type":"string"}},"required":["kind","sessionId"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","const":"subagent"},"parentSessionId":{"type":"string"},"childSessionId":{"type":"string"},"mode":{"type":"string","enum":["one-shot","continuable","unknown"]}},"required":["kind","parentSessionId","childSessionId","mode"],"additionalProperties":true}]},"assistantStream":{"type":"boolean","const":true,"description":"Include process-local assistant presentation frames for the Web client."},"maxMessages":{"type":"number"},"turnWindow":{"type":"object","properties":{"minMessages":{"type":"number","description":"Minimum append-origin user/assistant messages; must not exceed maxMessages."},"minTurns":{"type":"number","description":"Minimum Turn starts crossed, including the partial Turn at beforeSeq."}},"required":["minMessages","minTurns"],"additionalProperties":true,"description":"Stop at a Turn start after both minima, unless maxMessages or history exhaustion wins."}},"required":["address"],"additionalProperties":true},
|
|
1569
|
+
},
|
|
1570
|
+
strictCodec: {
|
|
1571
|
+
mode: 'strict',
|
|
1572
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionFollowRequest',
|
|
1573
|
+
create: _deepseek_ai_dsh_api_session_controller_session_follow_parameter_0_strict$schema,
|
|
1574
|
+
jsonSchema: {"type":"object","properties":{"address":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"session"},"sessionId":{"type":"string"}},"required":["kind","sessionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"subagent"},"parentSessionId":{"type":"string"},"childSessionId":{"type":"string"},"mode":{"type":"string","enum":["one-shot","continuable","unknown"]}},"required":["kind","parentSessionId","childSessionId","mode"],"additionalProperties":false}]},"assistantStream":{"type":"boolean","const":true,"description":"Include process-local assistant presentation frames for the Web client."},"maxMessages":{"type":"number"},"turnWindow":{"type":"object","properties":{"minMessages":{"type":"number","description":"Minimum append-origin user/assistant messages; must not exceed maxMessages."},"minTurns":{"type":"number","description":"Minimum Turn starts crossed, including the partial Turn at beforeSeq."}},"required":["minMessages","minTurns"],"additionalProperties":false,"description":"Stop at a Turn start after both minima, unless maxMessages or history exhaustion wins."}},"required":["address"],"additionalProperties":false},
|
|
1301
1575
|
},
|
|
1302
1576
|
},
|
|
1303
1577
|
],
|
|
@@ -1306,24 +1580,31 @@ export const TYPERT = {
|
|
|
1306
1580
|
mode: 'strict',
|
|
1307
1581
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionFollowFrame',
|
|
1308
1582
|
create: _deepseek_ai_dsh_api_session_controller_session_follow_result$schema,
|
|
1583
|
+
description: 'a complete opening snapshot followed by gap-free durable event frames and optional cursorless assistant-stream frames.',
|
|
1584
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"event"},"event":{"type":"object","properties":{"type":{"type":"string"},"seq":{"type":"number"},"time":{"type":"number"},"data":{},"ignorable":{"type":"boolean","const":true},"sourceEventSeqs":{"description":"Earlier sources on current surface events; opaque JSON on unknown ignorable events."},"surfaceOp":{"description":"Canonical placement on current surface events; opaque JSON on unknown ignorable events."}},"required":["type","seq","time","data"],"additionalProperties":true}},"required":["type","event"],"additionalProperties":true},{"type":"object","properties":{"type":{"type":"string","const":"snapshot"},"header":{"type":"object","properties":{"version":{"type":"number"},"id":{"type":"string"},"createdAt":{"type":"number"},"cwd":{"type":"string"},"parentSession":{"type":"string"},"isSeeded":{"type":"boolean","description":"Whether the Session contains a fork-inherited prefix."},"origin":{"type":"string","const":"subagent"},"delegationDepth":{"type":"number"},"agentPreset":{"type":"string"}},"required":["version","id","createdAt","isSeeded"],"additionalProperties":true},"cursor":{"type":"number"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"event"},"event":{"type":"object","properties":{"type":{"type":"string"},"seq":{"type":"number"},"time":{"type":"number"},"data":{},"ignorable":{"type":"boolean","const":true},"sourceEventSeqs":{"description":"Earlier sources on current surface events; opaque JSON on unknown ignorable events."},"surfaceOp":{"description":"Canonical placement on current surface events; opaque JSON on unknown ignorable events."}},"required":["type","seq","time","data"],"additionalProperties":true}},"required":["type","event"],"additionalProperties":true}},"hasMore":{"type":"boolean"},"projections":{"type":"object","properties":{"asOfSeq":{"type":"number"},"values":{"type":"object","properties":{"inbox":{"type":"object","properties":{"next-turn":{"type":"array","items":{}},"next-step":{"type":"array","items":{}}},"required":["next-turn","next-step"],"additionalProperties":true,"description":"Pending agent input reconstructed from durable inbox splices."},"workingDirectory":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"Recorded current directory for Session observations, or null when none is recorded."},"agentPreset":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"Preset the Session runs, or null when the deployment composes none."},"title":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"The session's current normalized title — the latest `session/title` event's text (last-wins), or `null` before the first title lands. A plain string: the shape the client list rows consume."},"todos":{"oneOf":[{"type":"null","const":null},{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"What this task is — a short imperative line shown in the UI."},"status":{"type":"string","enum":["completed","pending","in_progress"],"description":"Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several."}},"required":["content","status"],"additionalProperties":true}}],"description":"The agent's current whole todo list (the latest `todo/write` snapshot), or `null` before the first write. Whole-value rule: every `todo/write` carries the complete replacement list, so the fold is last-wins."},"sessionListMetadata":{"type":"object","properties":{"blank":{"type":"boolean","description":"Whether the folded prefix contains no turn."},"lastPromptAt":{"oneOf":[{"type":"null","const":null},{"type":"number"}],"description":"Latest human-authored prompt time in the folded prefix."}},"required":["blank","lastPromptAt"],"additionalProperties":true,"description":"Persisted facts used to summarize a Session without activating it."},"imageLimits":{"type":"object","properties":{"maxImageBytes":{"type":"number"},"maxImagesPerMessage":{"type":"number"},"maxMessageImageBytes":{"type":"number"},"maxImagePixels":{"type":"number"},"maxImageDimension":{"type":"number","description":"Maximum intrinsic width and maximum intrinsic height in pixels for one image."},"mediaTypes":{"type":"array","items":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif"]}}},"required":["maxImageBytes","maxImagesPerMessage","maxMessageImageBytes","maxImagePixels","maxImageDimension","mediaTypes"],"additionalProperties":true,"description":"Image-intake limits enforced by the Session prompt endpoint."},"modelSelection":{"type":"object","properties":{"lastUsed":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"}},"required":["provider","model"],"additionalProperties":true}],"description":"Selection consumed by the latest recorded model request."},"next":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"}},"required":["provider","model"],"additionalProperties":true}],"description":"Selection the next request should use, falling back to {@link lastUsed}."}},"required":["lastUsed","next"],"additionalProperties":true,"description":"Durable model selection already used and selected for the next request."},"permissions":{"type":"object","properties":{"currentValue":{"type":"string","description":"The effective current value: a configured preset key, `auto`, or `custom`."}},"required":["currentValue"],"additionalProperties":true,"description":"The session's current permission, folded from the three whole-value knob events (`permission/preset`, `sandbox/mode`, `approval/policy`) over the composition defaults. Selectable options come from the process-level catalog Remote. Key absence means no permission service is composed — clients hide the control."},"subagentCatalog":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"one-shot"},"label":{"type":"string"}},"required":["id","createdAt","mode"],"additionalProperties":true},{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"external"},"label":{"type":"string"}},"required":["id","createdAt","mode"],"additionalProperties":true},{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"continuable"},"label":{"type":"string"}},"required":["id","createdAt","mode","label"],"additionalProperties":true},{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"unknown"},"label":{"type":"string"}},"required":["id","createdAt","mode"],"additionalProperties":true}]},"description":"Direct children in parent catalog event order, excluding fork-inherited facts."},"subagentTiming":{"type":"object","properties":{"settledMs":{"type":"number","description":"Milliseconds accumulated across completed turns after the child's own descriptor."},"active":{"type":"object","properties":{"since":{"type":"number","description":"Start of the open turn."},"through":{"type":"number","description":"Latest event time folded into this projection cut."}},"required":["since","through"],"additionalProperties":true,"description":"Same-cut bounds of the currently open turn, when one has not reached `turn/end`."},"lastTurnCompleted":{"type":"boolean","description":"Whether the latest closed turn after the child's own descriptor completed normally; absent while a turn is open or before one closes."}},"required":["settledMs"],"additionalProperties":true,"description":"Active-turn duration and latest closed-turn completion for a descriptor-backed subagent session."},"subagent":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"mode":{"type":"string","const":"one-shot","description":"A terminal one-shot child."},"label":{"type":"string","description":"Optional durable creation label from the child's descriptor."},"seq":{"type":"number","description":"Seq of the `subagent/descriptor` event this identity was folded from. `session.isOwnSeq(seq)` proves the identity comes from the child's OWN log suffix — where a descriptor is immutable once appended — and not from a fork seed's replayed ancestor descriptor."}},"required":["mode","seq"],"additionalProperties":true},{"type":"object","properties":{"mode":{"type":"string","const":"continuable","description":"A resumable conversation."},"label":{"type":"string","description":"Durable creation label from the child's descriptor."},"seq":{"type":"number","description":"Seq of the folded descriptor event; see the one-shot arm for the own-suffix proof."}},"required":["mode","label","seq"],"additionalProperties":true}],"description":"Identity of a descriptor-backed subagent session. `null` ⟺ no valid descriptor (missing, malformed, or unrecognized-version — deliberately undistinguished). The sentinel is deliberately serializable: a value pushed over JSON transports must survive `JSON.stringify` losslessly, where an `undefined` field would be dropped and a stale identity would survive on the receiving side. The entry itself stays non-optional."},"tokenUsage":{"type":"object","properties":{"uncachedInputTokens":{"type":"number"},"outputTokens":{"type":"number"},"cacheReadTokens":{"type":"number"},"cacheWriteTokens":{"type":"number"}},"required":["uncachedInputTokens","outputTokens","cacheReadTokens","cacheWriteTokens"],"additionalProperties":true,"description":"Provider-reported usage accumulated across the complete durable log."},"contextPressure":{"type":"object","properties":{"pressureTokens":{"type":"number","description":"Provider-reported prompt size of the most recent request: uncached input plus cache reads and writes. Response output is excluded, so this does not grow as the current turn streams. Absent until a provider reports usage."},"projectedTokens":{"type":"number","description":"What the NEXT request's prompt would cost: {@link pressureTokens} plus the heuristic repricing of everything the surface gained or lost since that sample. Only the delta is estimated, so the figure stays anchored to the provider while still reacting the moment a compaction shadows a span — which `pressureTokens` alone cannot do, since compaction reports no usage of its own. Absent until a provider reports usage."},"contextWindow":{"type":"number","description":"Newest recorded route capacity; absent when no adapter advertised one."}},"required":[],"additionalProperties":true,"description":"Newest request pressure paired with the newest known route capacity."},"contextBreakdown":{"type":"object","properties":{"systemTokens":{"type":"number","description":"Heuristic tokens of the last nonempty surviving system prompt in surface order; 0 when none exists."},"toolsTokens":{"type":"number","description":"Heuristic tokens of the newest request envelope's tool schemas; 0 before any request."},"messageTokens":{"type":"number","description":"Heuristic tokens of every other visible surface node, including superseded system prompts."}},"required":["systemTokens","toolsTokens","messageTokens"],"additionalProperties":true,"description":"Heuristic system/tools/message composition of the next request."},"agentTeam":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["lead","teammate"]},"phase":{"type":"string","enum":["failed","provisioning","active"],"description":"Durable lifecycle; the Lead row is always `active`. Turn activity comes from Session status."},"error":{"type":"string"}},"required":["id","name","role","phase"],"additionalProperties":true}},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"number"},"subject":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["completed","pending","in_progress","deleted"]},"blockedBy":{"type":"array","items":{"type":"string"}},"writeScopes":{"type":"array","items":{"type":"string"}},"ownerName":{"type":"string"},"ready":{"type":"boolean"},"writeScopeWarnings":{"type":"array","items":{"type":"string"}}},"required":["id","revision","subject","description","status","blockedBy","writeScopes","ready","writeScopeWarnings"],"additionalProperties":true}},"failure":{"type":"string"}},"required":["members","tasks"],"additionalProperties":true,"description":"Durable roster and non-deleted task board of the Team rooted at the projected Session."},"userQuestions":{"type":"object","properties":{"active":{"type":"array","items":{"type":"object","properties":{"callId":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable caller-provided question id, echoed in the answer."},"question":{"type":"string","description":"The question to display."},"detail":{"type":"string","description":"Optional supporting detail rendered with the question but kept out of option labels."},"header":{"type":"string","description":"Optional short heading/group label."},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"User-facing label."},"description":{"type":"string","description":"Optional extra context rendered by capable UIs."}},"required":["label"],"additionalProperties":true},"description":"Optional choices the UI can render as a menu."},"multiSelect":{"type":"boolean","description":"Whether more than one option may be selected. Defaults to single-select."},"intent":{"type":"object","properties":{"kind":{"type":"string","const":"plan-review","description":"A plan submitted for review: `detail` is the plan markdown `ask()` requires, and the decision approves or declines it."},"approve":{"type":"string","description":"The option label that approves the plan; every other option declines it. Named rather than positional so no UI infers the verdict from option order. An `approve` naming no option of its own question is rejected at `ask()`."},"callId":{"type":"string","description":"Logged tool invocation whose arguments contain the reviewed plan."}},"required":["kind","approve"],"additionalProperties":true,"description":"Optional presentation intent for capable UIs; absent asks for the generic option list."}},"required":["id","question"],"additionalProperties":true}},"state":{"type":"string","enum":["open","continued"]}},"required":["callId","questions","state"],"additionalProperties":true},"description":"Calls that can still take an answer, in ask order."},"settled":{"type":"array","items":{"type":"object","properties":{"callId":{"type":"string","description":"The settled call."},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The answered question id."},"selected":{"type":"array","items":{"type":"string"},"description":"Selected option labels. May accompany custom text for a multi-select question."},"custom":{"type":"string","description":"Optional free-text \"Other\" answer."}},"required":["id","selected"],"additionalProperties":true},"description":"The recorded batch, one entry per question; empty when the late reply carried none."}},"required":["callId","answers"],"additionalProperties":true},"description":"Calls an answer settled, in settlement order."}},"required":["active","settled"],"additionalProperties":true,"description":"Timed questions that remain answerable in this Session, and the ones a late reply settled."},"goal":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"goal":{"type":"object","properties":{"objective":{"type":"string","description":"Human-requested completion objective."},"phase":{"type":"string","enum":["active","paused","blocked","complete"],"description":"Durable lifecycle phase."},"blockedReason":{"type":"object","properties":{"code":{"type":"string","description":"Stable lower-kebab-case classification chosen by the blocking policy."},"message":{"type":"string","description":"Non-empty explanation shown to humans and models."}},"required":["code","message"],"additionalProperties":true,"description":"Present exactly while `phase` is `blocked`."},"maxGoalRounds":{"type":"number","description":"Total admitted goal-round cap."},"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["objective","phase","maxGoalRounds","id","revision"],"additionalProperties":true,"description":"Current durable goal snapshot (the CAS ref for mutations rides on it)."},"roundsStarted":{"type":"number","description":"Highest admitted round number for this goal."},"createdAt":{"type":"number","description":"Epoch milliseconds of the create mutation."},"updatedAt":{"type":"number","description":"Epoch milliseconds of the latest mutation."}},"required":["goal","roundsStarted","createdAt","updatedAt"],"additionalProperties":true}],"description":"The session's current goal and admitted-round count, or `null` before the first create and after a clear tombstone. `goal/change` supplies the whole lifecycle value; matching admitted `user/message` events advance `roundsStarted`."},"plan":{"type":"object","properties":{"active":{"type":"boolean"},"pending":{"type":"boolean"}},"required":["active","pending"],"additionalProperties":true,"description":"Plan collaboration state folded from the plan command lifecycle and `plan/mode` events."}},"required":[],"additionalProperties":true,"description":"Provider-validated values; omitted keys are absent capabilities at this cut."}},"required":["asOfSeq","values"],"additionalProperties":true},"assistantStream":{"type":"object","properties":{"revision":{"type":"number"},"activeAttempt":{"type":"object","properties":{"attemptId":{"type":"string"},"startedAfterSeq":{"type":"number","description":"Last durable Session seq observed when this attempt started."},"turn":{"type":"number"},"step":{"type":"number"},"nextIndex":{"type":"number","description":"Dense position expected for the next live chunk frame."},"stream":{"type":"array","items":{},"description":"Compact detached stream accumulated at this opening revision."}},"required":["attemptId","startedAfterSeq","turn","step","nextIndex","stream"],"additionalProperties":true}},"required":["revision"],"additionalProperties":true}},"required":["type","header","cursor","records","hasMore","projections"],"additionalProperties":true},{"type":"object","properties":{"type":{"type":"string","const":"assistant-stream"},"frame":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"start"},"attemptId":{"type":"string"},"revision":{"type":"number"},"startedAfterSeq":{"type":"number"},"turn":{"type":"number"},"step":{"type":"number"}},"required":["type","attemptId","revision","startedAfterSeq","turn","step"],"additionalProperties":true},{"type":"object","properties":{"type":{"type":"string","const":"chunk"},"attemptId":{"type":"string"},"revision":{"type":"number"},"index":{"type":"number"},"time":{"type":"number"},"chunk":{}},"required":["type","attemptId","revision","index","time","chunk"],"additionalProperties":true},{"type":"object","properties":{"type":{"type":"string","const":"end"},"attemptId":{"type":"string"},"revision":{"type":"number"},"index":{"type":"number","description":"Number of chunk frames represented by this terminal marker."},"outcome":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"committed"},"eventType":{"type":"string","enum":["assistant/message","assistant/attempt"]},"seq":{"type":"number"}},"required":["kind","eventType","seq"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","const":"abandoned"}},"required":["kind"],"additionalProperties":true}]}},"required":["type","attemptId","revision","index","outcome"],"additionalProperties":true}]}},"required":["type","frame"],"additionalProperties":true}]},
|
|
1309
1585
|
},
|
|
1310
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1586
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":537,"column":3},
|
|
1311
1587
|
},
|
|
1312
|
-
{
|
|
1313
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/fork',
|
|
1588
|
+
'session/fork': {
|
|
1314
1589
|
service: 'sessionController',
|
|
1315
|
-
|
|
1316
|
-
method: 'fork',
|
|
1590
|
+
description: 'Fork one cold-readable exact event prefix into a new Session. An omitted boundary selects the latest completed-turn prefix; an open cut receives synthetic fork closers.',
|
|
1317
1591
|
invocation: { kind: 'direct' },
|
|
1318
1592
|
parameters: [
|
|
1319
1593
|
{
|
|
1320
1594
|
name: 'request',
|
|
1321
|
-
|
|
1595
|
+
description: 'source Session, optional exact inclusive event boundary, and migration preflight choice.',
|
|
1322
1596
|
source: 'json',
|
|
1323
1597
|
codec: {
|
|
1324
1598
|
mode: 'strict',
|
|
1325
1599
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionForkRequest',
|
|
1326
1600
|
create: _deepseek_ai_dsh_api_session_controller_session_fork_parameter_0$schema,
|
|
1601
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"},"atSeq":{"type":"number","description":"Exact inclusive source event seq; omission selects the latest completed-turn prefix."},"allowMigration":{"type":"boolean","description":"False asks the Host to check for required migration before forking. Defaults to true."}},"required":["sessionId"],"additionalProperties":true},
|
|
1602
|
+
},
|
|
1603
|
+
strictCodec: {
|
|
1604
|
+
mode: 'strict',
|
|
1605
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionForkRequest',
|
|
1606
|
+
create: _deepseek_ai_dsh_api_session_controller_session_fork_parameter_0_strict$schema,
|
|
1607
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"},"atSeq":{"type":"number","description":"Exact inclusive source event seq; omission selects the latest completed-turn prefix."},"allowMigration":{"type":"boolean","description":"False asks the Host to check for required migration before forking. Defaults to true."}},"required":["sessionId"],"additionalProperties":false},
|
|
1327
1608
|
},
|
|
1328
1609
|
},
|
|
1329
1610
|
],
|
|
@@ -1331,14 +1612,14 @@ export const TYPERT = {
|
|
|
1331
1612
|
mode: 'strict',
|
|
1332
1613
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionForkValue',
|
|
1333
1614
|
create: _deepseek_ai_dsh_api_session_controller_session_fork_result$schema,
|
|
1615
|
+
description: 'the new Session identity.',
|
|
1616
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"],"additionalProperties":true},
|
|
1334
1617
|
},
|
|
1335
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1618
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":443,"column":9},
|
|
1336
1619
|
},
|
|
1337
|
-
{
|
|
1338
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/initializeDefaultModel',
|
|
1620
|
+
'session/initializeDefaultModel': {
|
|
1339
1621
|
service: 'sessionController',
|
|
1340
|
-
|
|
1341
|
-
method: 'initializeDefaultModel',
|
|
1622
|
+
description: 'Select the first available account model after login when no provider API key is configured.',
|
|
1342
1623
|
invocation: { kind: 'direct' },
|
|
1343
1624
|
parameters: [
|
|
1344
1625
|
],
|
|
@@ -1346,24 +1627,31 @@ export const TYPERT = {
|
|
|
1346
1627
|
mode: 'strict',
|
|
1347
1628
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/initializeDefaultModel:result',
|
|
1348
1629
|
create: _deepseek_ai_dsh_api_session_controller_session_initializeDefaultModel_result$schema,
|
|
1630
|
+
description: 'after saving the first available model or retaining the existing default.',
|
|
1631
|
+
jsonSchemaError: 'typert tool schema: unsupported void value',
|
|
1349
1632
|
},
|
|
1350
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1633
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":320,"column":9},
|
|
1351
1634
|
},
|
|
1352
|
-
{
|
|
1353
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/list',
|
|
1635
|
+
'session/list': {
|
|
1354
1636
|
service: 'sessionController',
|
|
1355
|
-
|
|
1356
|
-
method: 'list',
|
|
1637
|
+
description: 'Read all visible Session rows without resuming an Agent.',
|
|
1357
1638
|
invocation: { kind: 'direct' },
|
|
1358
1639
|
parameters: [
|
|
1359
1640
|
{
|
|
1360
1641
|
name: '_request',
|
|
1361
|
-
|
|
1642
|
+
description: 'reserved empty list request.',
|
|
1362
1643
|
source: 'json',
|
|
1363
1644
|
codec: {
|
|
1364
1645
|
mode: 'strict',
|
|
1365
1646
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionListRequest',
|
|
1366
1647
|
create: _deepseek_ai_dsh_api_session_controller_session_list_parameter_0$schema,
|
|
1648
|
+
jsonSchema: {"type":"object","properties":{"cursor":{"type":"string"}},"required":[],"additionalProperties":true},
|
|
1649
|
+
},
|
|
1650
|
+
strictCodec: {
|
|
1651
|
+
mode: 'strict',
|
|
1652
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionListRequest',
|
|
1653
|
+
create: _deepseek_ai_dsh_api_session_controller_session_list_parameter_0_strict$schema,
|
|
1654
|
+
jsonSchema: {"type":"object","properties":{"cursor":{"type":"string"}},"required":[],"additionalProperties":false},
|
|
1367
1655
|
},
|
|
1368
1656
|
},
|
|
1369
1657
|
],
|
|
@@ -1372,14 +1660,14 @@ export const TYPERT = {
|
|
|
1372
1660
|
mode: 'strict',
|
|
1373
1661
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionListValue',
|
|
1374
1662
|
create: _deepseek_ai_dsh_api_session_controller_session_list_result$schema,
|
|
1663
|
+
description: 'visible Session summaries ordered by activity.',
|
|
1664
|
+
jsonSchema: {"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"agentAvailable":{"type":"boolean","description":"Whether this Session currently owns a live Agent."},"formatStatus":{"type":"string","enum":["current","migration-required"],"description":"Current for attached Sessions; otherwise the persistence format status when reported."},"sessionId":{"type":"string"},"updatedAt":{"type":"number"},"running":{"type":"boolean"},"blank":{"type":"boolean"},"parentSessionId":{"type":"string"},"origin":{"type":"string","const":"subagent"},"cwd":{"type":"string"},"projections":{"type":"object","properties":{"kind":{"type":"string","enum":["cached","sequenced"],"description":"`sequenced`: the Host's live registry produced the block for an attached Session, so `asOfSeq` is comparable with baselines and frames of the same connection. `cached`: a header-only listing viewed the block from the persisted projection cache, so `asOfSeq` is the stored record's own watermark and must not be compared with the connected Session's values."},"asOfSeq":{"type":"number","description":"Watermark of the block in the sequence space named by `kind`."},"values":{"type":"object","properties":{"inbox":{"type":"object","properties":{"next-turn":{"type":"array","items":{}},"next-step":{"type":"array","items":{}}},"required":["next-turn","next-step"],"additionalProperties":true,"description":"Pending agent input reconstructed from durable inbox splices."},"workingDirectory":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"Recorded current directory for Session observations, or null when none is recorded."},"agentPreset":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"Preset the Session runs, or null when the deployment composes none."},"title":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"The session's current normalized title — the latest `session/title` event's text (last-wins), or `null` before the first title lands. A plain string: the shape the client list rows consume."},"todos":{"oneOf":[{"type":"null","const":null},{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"What this task is — a short imperative line shown in the UI."},"status":{"type":"string","enum":["completed","pending","in_progress"],"description":"Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several."}},"required":["content","status"],"additionalProperties":true}}],"description":"The agent's current whole todo list (the latest `todo/write` snapshot), or `null` before the first write. Whole-value rule: every `todo/write` carries the complete replacement list, so the fold is last-wins."},"sessionListMetadata":{"type":"object","properties":{"blank":{"type":"boolean","description":"Whether the folded prefix contains no turn."},"lastPromptAt":{"oneOf":[{"type":"null","const":null},{"type":"number"}],"description":"Latest human-authored prompt time in the folded prefix."}},"required":["blank","lastPromptAt"],"additionalProperties":true,"description":"Persisted facts used to summarize a Session without activating it."},"imageLimits":{"type":"object","properties":{"maxImageBytes":{"type":"number"},"maxImagesPerMessage":{"type":"number"},"maxMessageImageBytes":{"type":"number"},"maxImagePixels":{"type":"number"},"maxImageDimension":{"type":"number","description":"Maximum intrinsic width and maximum intrinsic height in pixels for one image."},"mediaTypes":{"type":"array","items":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif"]}}},"required":["maxImageBytes","maxImagesPerMessage","maxMessageImageBytes","maxImagePixels","maxImageDimension","mediaTypes"],"additionalProperties":true,"description":"Image-intake limits enforced by the Session prompt endpoint."},"modelSelection":{"type":"object","properties":{"lastUsed":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"}},"required":["provider","model"],"additionalProperties":true}],"description":"Selection consumed by the latest recorded model request."},"next":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"}},"required":["provider","model"],"additionalProperties":true}],"description":"Selection the next request should use, falling back to {@link lastUsed}."}},"required":["lastUsed","next"],"additionalProperties":true,"description":"Durable model selection already used and selected for the next request."},"permissions":{"type":"object","properties":{"currentValue":{"type":"string","description":"The effective current value: a configured preset key, `auto`, or `custom`."}},"required":["currentValue"],"additionalProperties":true,"description":"The session's current permission, folded from the three whole-value knob events (`permission/preset`, `sandbox/mode`, `approval/policy`) over the composition defaults. Selectable options come from the process-level catalog Remote. Key absence means no permission service is composed — clients hide the control."},"subagentCatalog":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"one-shot"},"label":{"type":"string"}},"required":["id","createdAt","mode"],"additionalProperties":true},{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"external"},"label":{"type":"string"}},"required":["id","createdAt","mode"],"additionalProperties":true},{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"continuable"},"label":{"type":"string"}},"required":["id","createdAt","mode","label"],"additionalProperties":true},{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"unknown"},"label":{"type":"string"}},"required":["id","createdAt","mode"],"additionalProperties":true}]},"description":"Direct children in parent catalog event order, excluding fork-inherited facts."},"subagentTiming":{"type":"object","properties":{"settledMs":{"type":"number","description":"Milliseconds accumulated across completed turns after the child's own descriptor."},"active":{"type":"object","properties":{"since":{"type":"number","description":"Start of the open turn."},"through":{"type":"number","description":"Latest event time folded into this projection cut."}},"required":["since","through"],"additionalProperties":true,"description":"Same-cut bounds of the currently open turn, when one has not reached `turn/end`."},"lastTurnCompleted":{"type":"boolean","description":"Whether the latest closed turn after the child's own descriptor completed normally; absent while a turn is open or before one closes."}},"required":["settledMs"],"additionalProperties":true,"description":"Active-turn duration and latest closed-turn completion for a descriptor-backed subagent session."},"subagent":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"mode":{"type":"string","const":"one-shot","description":"A terminal one-shot child."},"label":{"type":"string","description":"Optional durable creation label from the child's descriptor."},"seq":{"type":"number","description":"Seq of the `subagent/descriptor` event this identity was folded from. `session.isOwnSeq(seq)` proves the identity comes from the child's OWN log suffix — where a descriptor is immutable once appended — and not from a fork seed's replayed ancestor descriptor."}},"required":["mode","seq"],"additionalProperties":true},{"type":"object","properties":{"mode":{"type":"string","const":"continuable","description":"A resumable conversation."},"label":{"type":"string","description":"Durable creation label from the child's descriptor."},"seq":{"type":"number","description":"Seq of the folded descriptor event; see the one-shot arm for the own-suffix proof."}},"required":["mode","label","seq"],"additionalProperties":true}],"description":"Identity of a descriptor-backed subagent session. `null` ⟺ no valid descriptor (missing, malformed, or unrecognized-version — deliberately undistinguished). The sentinel is deliberately serializable: a value pushed over JSON transports must survive `JSON.stringify` losslessly, where an `undefined` field would be dropped and a stale identity would survive on the receiving side. The entry itself stays non-optional."},"tokenUsage":{"type":"object","properties":{"uncachedInputTokens":{"type":"number"},"outputTokens":{"type":"number"},"cacheReadTokens":{"type":"number"},"cacheWriteTokens":{"type":"number"}},"required":["uncachedInputTokens","outputTokens","cacheReadTokens","cacheWriteTokens"],"additionalProperties":true,"description":"Provider-reported usage accumulated across the complete durable log."},"contextPressure":{"type":"object","properties":{"pressureTokens":{"type":"number","description":"Provider-reported prompt size of the most recent request: uncached input plus cache reads and writes. Response output is excluded, so this does not grow as the current turn streams. Absent until a provider reports usage."},"projectedTokens":{"type":"number","description":"What the NEXT request's prompt would cost: {@link pressureTokens} plus the heuristic repricing of everything the surface gained or lost since that sample. Only the delta is estimated, so the figure stays anchored to the provider while still reacting the moment a compaction shadows a span — which `pressureTokens` alone cannot do, since compaction reports no usage of its own. Absent until a provider reports usage."},"contextWindow":{"type":"number","description":"Newest recorded route capacity; absent when no adapter advertised one."}},"required":[],"additionalProperties":true,"description":"Newest request pressure paired with the newest known route capacity."},"contextBreakdown":{"type":"object","properties":{"systemTokens":{"type":"number","description":"Heuristic tokens of the last nonempty surviving system prompt in surface order; 0 when none exists."},"toolsTokens":{"type":"number","description":"Heuristic tokens of the newest request envelope's tool schemas; 0 before any request."},"messageTokens":{"type":"number","description":"Heuristic tokens of every other visible surface node, including superseded system prompts."}},"required":["systemTokens","toolsTokens","messageTokens"],"additionalProperties":true,"description":"Heuristic system/tools/message composition of the next request."},"agentTeam":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["lead","teammate"]},"phase":{"type":"string","enum":["failed","provisioning","active"],"description":"Durable lifecycle; the Lead row is always `active`. Turn activity comes from Session status."},"error":{"type":"string"}},"required":["id","name","role","phase"],"additionalProperties":true}},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"number"},"subject":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["completed","pending","in_progress","deleted"]},"blockedBy":{"type":"array","items":{"type":"string"}},"writeScopes":{"type":"array","items":{"type":"string"}},"ownerName":{"type":"string"},"ready":{"type":"boolean"},"writeScopeWarnings":{"type":"array","items":{"type":"string"}}},"required":["id","revision","subject","description","status","blockedBy","writeScopes","ready","writeScopeWarnings"],"additionalProperties":true}},"failure":{"type":"string"}},"required":["members","tasks"],"additionalProperties":true,"description":"Durable roster and non-deleted task board of the Team rooted at the projected Session."},"userQuestions":{"type":"object","properties":{"active":{"type":"array","items":{"type":"object","properties":{"callId":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable caller-provided question id, echoed in the answer."},"question":{"type":"string","description":"The question to display."},"detail":{"type":"string","description":"Optional supporting detail rendered with the question but kept out of option labels."},"header":{"type":"string","description":"Optional short heading/group label."},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"User-facing label."},"description":{"type":"string","description":"Optional extra context rendered by capable UIs."}},"required":["label"],"additionalProperties":true},"description":"Optional choices the UI can render as a menu."},"multiSelect":{"type":"boolean","description":"Whether more than one option may be selected. Defaults to single-select."},"intent":{"type":"object","properties":{"kind":{"type":"string","const":"plan-review","description":"A plan submitted for review: `detail` is the plan markdown `ask()` requires, and the decision approves or declines it."},"approve":{"type":"string","description":"The option label that approves the plan; every other option declines it. Named rather than positional so no UI infers the verdict from option order. An `approve` naming no option of its own question is rejected at `ask()`."},"callId":{"type":"string","description":"Logged tool invocation whose arguments contain the reviewed plan."}},"required":["kind","approve"],"additionalProperties":true,"description":"Optional presentation intent for capable UIs; absent asks for the generic option list."}},"required":["id","question"],"additionalProperties":true}},"state":{"type":"string","enum":["open","continued"]}},"required":["callId","questions","state"],"additionalProperties":true},"description":"Calls that can still take an answer, in ask order."},"settled":{"type":"array","items":{"type":"object","properties":{"callId":{"type":"string","description":"The settled call."},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The answered question id."},"selected":{"type":"array","items":{"type":"string"},"description":"Selected option labels. May accompany custom text for a multi-select question."},"custom":{"type":"string","description":"Optional free-text \"Other\" answer."}},"required":["id","selected"],"additionalProperties":true},"description":"The recorded batch, one entry per question; empty when the late reply carried none."}},"required":["callId","answers"],"additionalProperties":true},"description":"Calls an answer settled, in settlement order."}},"required":["active","settled"],"additionalProperties":true,"description":"Timed questions that remain answerable in this Session, and the ones a late reply settled."},"goal":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"goal":{"type":"object","properties":{"objective":{"type":"string","description":"Human-requested completion objective."},"phase":{"type":"string","enum":["active","paused","blocked","complete"],"description":"Durable lifecycle phase."},"blockedReason":{"type":"object","properties":{"code":{"type":"string","description":"Stable lower-kebab-case classification chosen by the blocking policy."},"message":{"type":"string","description":"Non-empty explanation shown to humans and models."}},"required":["code","message"],"additionalProperties":true,"description":"Present exactly while `phase` is `blocked`."},"maxGoalRounds":{"type":"number","description":"Total admitted goal-round cap."},"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["objective","phase","maxGoalRounds","id","revision"],"additionalProperties":true,"description":"Current durable goal snapshot (the CAS ref for mutations rides on it)."},"roundsStarted":{"type":"number","description":"Highest admitted round number for this goal."},"createdAt":{"type":"number","description":"Epoch milliseconds of the create mutation."},"updatedAt":{"type":"number","description":"Epoch milliseconds of the latest mutation."}},"required":["goal","roundsStarted","createdAt","updatedAt"],"additionalProperties":true}],"description":"The session's current goal and admitted-round count, or `null` before the first create and after a clear tombstone. `goal/change` supplies the whole lifecycle value; matching admitted `user/message` events advance `roundsStarted`."},"plan":{"type":"object","properties":{"active":{"type":"boolean"},"pending":{"type":"boolean"}},"required":["active","pending"],"additionalProperties":true,"description":"Plan collaboration state folded from the plan command lifecycle and `plan/mode` events."}},"required":[],"additionalProperties":true,"description":"Provider-validated values present in the block; omitted keys remain unknown."}},"required":["kind","asOfSeq","values"],"additionalProperties":true}},"required":["agentAvailable","sessionId","updatedAt","running","blank"],"additionalProperties":true}}},"required":["items"],"additionalProperties":true},
|
|
1375
1665
|
},
|
|
1376
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1666
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":276,"column":9},
|
|
1377
1667
|
},
|
|
1378
|
-
{
|
|
1379
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/modelCatalog',
|
|
1668
|
+
'session/modelCatalog': {
|
|
1380
1669
|
service: 'sessionController',
|
|
1381
|
-
|
|
1382
|
-
method: 'modelCatalog',
|
|
1670
|
+
description: 'Describe every currently routable model for Host-generation selectors.',
|
|
1383
1671
|
invocation: { kind: 'direct' },
|
|
1384
1672
|
parameters: [
|
|
1385
1673
|
],
|
|
@@ -1387,24 +1675,31 @@ export const TYPERT = {
|
|
|
1387
1675
|
mode: 'strict',
|
|
1388
1676
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#ModelCatalog',
|
|
1389
1677
|
create: _deepseek_ai_dsh_api_session_controller_session_modelCatalog_result$schema,
|
|
1678
|
+
description: 'provider-grouped models, the deployment default, and isolated provider failures.',
|
|
1679
|
+
jsonSchema: {"type":"object","properties":{"default":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"}},"required":["provider","model"],"additionalProperties":true},"routableProviders":{"type":"array","items":{"type":"string"},"description":"Provider routes with at least one currently available catalog model."},"groups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"reasoning":{"type":"object","properties":{"efforts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"required":["id","name"],"additionalProperties":true}},"defaultEffort":{"type":"string"}},"required":["efforts"],"additionalProperties":true}},"required":["id","name"],"additionalProperties":true}}},"required":["id","name","models"],"additionalProperties":true}},"failures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"message":{"type":"string"}},"required":["id","name","message"],"additionalProperties":true}}},"required":["default","routableProviders","groups","failures"],"additionalProperties":true},
|
|
1390
1680
|
},
|
|
1391
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1681
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":338,"column":3},
|
|
1392
1682
|
},
|
|
1393
|
-
{
|
|
1394
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/openWorkspacePath',
|
|
1683
|
+
'session/openWorkspacePath': {
|
|
1395
1684
|
service: 'sessionController',
|
|
1396
|
-
|
|
1397
|
-
method: 'openWorkspacePath',
|
|
1685
|
+
description: 'Verify one path through the composed filesystem and open it on the Host desktop.',
|
|
1398
1686
|
invocation: { kind: 'direct' },
|
|
1399
1687
|
parameters: [
|
|
1400
1688
|
{
|
|
1401
1689
|
name: 'request',
|
|
1402
|
-
|
|
1690
|
+
description: 'path after best-effort Session workspace resolution.',
|
|
1403
1691
|
source: 'json',
|
|
1404
1692
|
codec: {
|
|
1405
1693
|
mode: 'strict',
|
|
1406
1694
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionOpenWorkspacePathRequest',
|
|
1407
1695
|
create: _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0$schema,
|
|
1696
|
+
jsonSchema: {"type":"object","properties":{"action":{"type":"string","const":"reveal","description":"File-manager navigation when requested; omission uses the default application."},"application":{"type":"string","description":"Registered application identifier; ignored for reveal. Omission preserves the operating system default."},"path":{"type":"string","description":"Path after best-effort Session workspace resolution, in Host filesystem syntax."}},"required":["path"],"additionalProperties":true},
|
|
1697
|
+
},
|
|
1698
|
+
strictCodec: {
|
|
1699
|
+
mode: 'strict',
|
|
1700
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionOpenWorkspacePathRequest',
|
|
1701
|
+
create: _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_parameter_0_strict$schema,
|
|
1702
|
+
jsonSchema: {"type":"object","properties":{"action":{"type":"string","const":"reveal","description":"File-manager navigation when requested; omission uses the default application."},"application":{"type":"string","description":"Registered application identifier; ignored for reveal. Omission preserves the operating system default."},"path":{"type":"string","description":"Path after best-effort Session workspace resolution, in Host filesystem syntax."}},"required":["path"],"additionalProperties":false},
|
|
1408
1703
|
},
|
|
1409
1704
|
},
|
|
1410
1705
|
],
|
|
@@ -1413,24 +1708,31 @@ export const TYPERT = {
|
|
|
1413
1708
|
mode: 'strict',
|
|
1414
1709
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionOpenWorkspacePathValue',
|
|
1415
1710
|
create: _deepseek_ai_dsh_api_session_controller_session_openWorkspacePath_result$schema,
|
|
1711
|
+
description: 'confirmation after the native opener accepts the path.',
|
|
1712
|
+
jsonSchema: {"type":"object","properties":{"opened":{"type":"boolean","const":true}},"required":["opened"],"additionalProperties":true},
|
|
1416
1713
|
},
|
|
1417
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1714
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":368,"column":9},
|
|
1418
1715
|
},
|
|
1419
|
-
{
|
|
1420
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/page',
|
|
1716
|
+
'session/page': {
|
|
1421
1717
|
service: 'sessionController',
|
|
1422
|
-
|
|
1423
|
-
method: 'page',
|
|
1718
|
+
description: 'Read one cold-safe, message-aligned Session history page.',
|
|
1424
1719
|
invocation: { kind: 'direct' },
|
|
1425
1720
|
parameters: [
|
|
1426
1721
|
{
|
|
1427
1722
|
name: 'request',
|
|
1428
|
-
|
|
1723
|
+
description: 'durable address, backward cursor, and page budget.',
|
|
1429
1724
|
source: 'json',
|
|
1430
1725
|
codec: {
|
|
1431
1726
|
mode: 'strict',
|
|
1432
1727
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPageRequest',
|
|
1433
1728
|
create: _deepseek_ai_dsh_api_session_controller_session_page_parameter_0$schema,
|
|
1729
|
+
jsonSchema: {"type":"object","properties":{"address":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"session"},"sessionId":{"type":"string"}},"required":["kind","sessionId"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","const":"subagent"},"parentSessionId":{"type":"string"},"childSessionId":{"type":"string"},"mode":{"type":"string","enum":["one-shot","continuable","unknown"]}},"required":["kind","parentSessionId","childSessionId","mode"],"additionalProperties":true}]},"throughSeq":{"type":"number","description":"Inclusive log cut obtained from the corresponding follow opening frame."},"beforeSeq":{"type":"number"},"maxMessages":{"type":"number"},"turnWindow":{"type":"object","properties":{"minMessages":{"type":"number","description":"Minimum append-origin user/assistant messages; must not exceed maxMessages."},"minTurns":{"type":"number","description":"Minimum Turn starts crossed, including the partial Turn at beforeSeq."}},"required":["minMessages","minTurns"],"additionalProperties":true,"description":"Stop at a Turn start after both minima, unless maxMessages or history exhaustion wins."}},"required":["address","throughSeq"],"additionalProperties":true},
|
|
1730
|
+
},
|
|
1731
|
+
strictCodec: {
|
|
1732
|
+
mode: 'strict',
|
|
1733
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPageRequest',
|
|
1734
|
+
create: _deepseek_ai_dsh_api_session_controller_session_page_parameter_0_strict$schema,
|
|
1735
|
+
jsonSchema: {"type":"object","properties":{"address":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"session"},"sessionId":{"type":"string"}},"required":["kind","sessionId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"subagent"},"parentSessionId":{"type":"string"},"childSessionId":{"type":"string"},"mode":{"type":"string","enum":["one-shot","continuable","unknown"]}},"required":["kind","parentSessionId","childSessionId","mode"],"additionalProperties":false}]},"throughSeq":{"type":"number","description":"Inclusive log cut obtained from the corresponding follow opening frame."},"beforeSeq":{"type":"number"},"maxMessages":{"type":"number"},"turnWindow":{"type":"object","properties":{"minMessages":{"type":"number","description":"Minimum append-origin user/assistant messages; must not exceed maxMessages."},"minTurns":{"type":"number","description":"Minimum Turn starts crossed, including the partial Turn at beforeSeq."}},"required":["minMessages","minTurns"],"additionalProperties":false,"description":"Stop at a Turn start after both minima, unless maxMessages or history exhaustion wins."}},"required":["address","throughSeq"],"additionalProperties":false},
|
|
1434
1736
|
},
|
|
1435
1737
|
},
|
|
1436
1738
|
],
|
|
@@ -1439,24 +1741,31 @@ export const TYPERT = {
|
|
|
1439
1741
|
mode: 'strict',
|
|
1440
1742
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPage',
|
|
1441
1743
|
create: _deepseek_ai_dsh_api_session_controller_session_page_result$schema,
|
|
1744
|
+
description: 'one chronological page.',
|
|
1745
|
+
jsonSchema: {"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"event"},"event":{"type":"object","properties":{"type":{"type":"string"},"seq":{"type":"number"},"time":{"type":"number"},"data":{},"ignorable":{"type":"boolean","const":true},"sourceEventSeqs":{"description":"Earlier sources on current surface events; opaque JSON on unknown ignorable events."},"surfaceOp":{"description":"Canonical placement on current surface events; opaque JSON on unknown ignorable events."}},"required":["type","seq","time","data"],"additionalProperties":true}},"required":["type","event"],"additionalProperties":true}},"hasMore":{"type":"boolean"}},"required":["records","hasMore"],"additionalProperties":true},
|
|
1442
1746
|
},
|
|
1443
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1747
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":525,"column":3},
|
|
1444
1748
|
},
|
|
1445
|
-
{
|
|
1446
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/projections',
|
|
1749
|
+
'session/projections': {
|
|
1447
1750
|
service: 'sessionController',
|
|
1448
|
-
|
|
1449
|
-
method: 'projections',
|
|
1751
|
+
description: 'Read exact projections, returning cached hints only when migration is required.',
|
|
1450
1752
|
invocation: { kind: 'direct' },
|
|
1451
1753
|
parameters: [
|
|
1452
1754
|
{
|
|
1453
1755
|
name: 'request',
|
|
1454
|
-
|
|
1756
|
+
description: 'Session whose current values are required.',
|
|
1455
1757
|
source: 'json',
|
|
1456
1758
|
codec: {
|
|
1457
1759
|
mode: 'strict',
|
|
1458
1760
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionProjectionsRequest',
|
|
1459
1761
|
create: _deepseek_ai_dsh_api_session_controller_session_projections_parameter_0$schema,
|
|
1762
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"],"additionalProperties":true},
|
|
1763
|
+
},
|
|
1764
|
+
strictCodec: {
|
|
1765
|
+
mode: 'strict',
|
|
1766
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionProjectionsRequest',
|
|
1767
|
+
create: _deepseek_ai_dsh_api_session_controller_session_projections_parameter_0_strict$schema,
|
|
1768
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"],"additionalProperties":false},
|
|
1460
1769
|
},
|
|
1461
1770
|
},
|
|
1462
1771
|
],
|
|
@@ -1465,24 +1774,31 @@ export const TYPERT = {
|
|
|
1465
1774
|
mode: 'strict',
|
|
1466
1775
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionProjectionsValue',
|
|
1467
1776
|
create: _deepseek_ai_dsh_api_session_controller_session_projections_result$schema,
|
|
1777
|
+
description: 'a sequenced baseline, cached hints when migration is deferred, or null when absent.',
|
|
1778
|
+
jsonSchema: {"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"asOfSeq":{"type":"number"},"values":{"type":"object","properties":{"inbox":{"type":"object","properties":{"next-turn":{"type":"array","items":{}},"next-step":{"type":"array","items":{}}},"required":["next-turn","next-step"],"additionalProperties":true,"description":"Pending agent input reconstructed from durable inbox splices."},"workingDirectory":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"Recorded current directory for Session observations, or null when none is recorded."},"agentPreset":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"Preset the Session runs, or null when the deployment composes none."},"title":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"The session's current normalized title — the latest `session/title` event's text (last-wins), or `null` before the first title lands. A plain string: the shape the client list rows consume."},"todos":{"oneOf":[{"type":"null","const":null},{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"What this task is — a short imperative line shown in the UI."},"status":{"type":"string","enum":["completed","pending","in_progress"],"description":"Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several."}},"required":["content","status"],"additionalProperties":true}}],"description":"The agent's current whole todo list (the latest `todo/write` snapshot), or `null` before the first write. Whole-value rule: every `todo/write` carries the complete replacement list, so the fold is last-wins."},"sessionListMetadata":{"type":"object","properties":{"blank":{"type":"boolean","description":"Whether the folded prefix contains no turn."},"lastPromptAt":{"oneOf":[{"type":"null","const":null},{"type":"number"}],"description":"Latest human-authored prompt time in the folded prefix."}},"required":["blank","lastPromptAt"],"additionalProperties":true,"description":"Persisted facts used to summarize a Session without activating it."},"imageLimits":{"type":"object","properties":{"maxImageBytes":{"type":"number"},"maxImagesPerMessage":{"type":"number"},"maxMessageImageBytes":{"type":"number"},"maxImagePixels":{"type":"number"},"maxImageDimension":{"type":"number","description":"Maximum intrinsic width and maximum intrinsic height in pixels for one image."},"mediaTypes":{"type":"array","items":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif"]}}},"required":["maxImageBytes","maxImagesPerMessage","maxMessageImageBytes","maxImagePixels","maxImageDimension","mediaTypes"],"additionalProperties":true,"description":"Image-intake limits enforced by the Session prompt endpoint."},"modelSelection":{"type":"object","properties":{"lastUsed":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"}},"required":["provider","model"],"additionalProperties":true}],"description":"Selection consumed by the latest recorded model request."},"next":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"}},"required":["provider","model"],"additionalProperties":true}],"description":"Selection the next request should use, falling back to {@link lastUsed}."}},"required":["lastUsed","next"],"additionalProperties":true,"description":"Durable model selection already used and selected for the next request."},"permissions":{"type":"object","properties":{"currentValue":{"type":"string","description":"The effective current value: a configured preset key, `auto`, or `custom`."}},"required":["currentValue"],"additionalProperties":true,"description":"The session's current permission, folded from the three whole-value knob events (`permission/preset`, `sandbox/mode`, `approval/policy`) over the composition defaults. Selectable options come from the process-level catalog Remote. Key absence means no permission service is composed — clients hide the control."},"subagentCatalog":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"one-shot"},"label":{"type":"string"}},"required":["id","createdAt","mode"],"additionalProperties":true},{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"external"},"label":{"type":"string"}},"required":["id","createdAt","mode"],"additionalProperties":true},{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"continuable"},"label":{"type":"string"}},"required":["id","createdAt","mode","label"],"additionalProperties":true},{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"unknown"},"label":{"type":"string"}},"required":["id","createdAt","mode"],"additionalProperties":true}]},"description":"Direct children in parent catalog event order, excluding fork-inherited facts."},"subagentTiming":{"type":"object","properties":{"settledMs":{"type":"number","description":"Milliseconds accumulated across completed turns after the child's own descriptor."},"active":{"type":"object","properties":{"since":{"type":"number","description":"Start of the open turn."},"through":{"type":"number","description":"Latest event time folded into this projection cut."}},"required":["since","through"],"additionalProperties":true,"description":"Same-cut bounds of the currently open turn, when one has not reached `turn/end`."},"lastTurnCompleted":{"type":"boolean","description":"Whether the latest closed turn after the child's own descriptor completed normally; absent while a turn is open or before one closes."}},"required":["settledMs"],"additionalProperties":true,"description":"Active-turn duration and latest closed-turn completion for a descriptor-backed subagent session."},"subagent":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"mode":{"type":"string","const":"one-shot","description":"A terminal one-shot child."},"label":{"type":"string","description":"Optional durable creation label from the child's descriptor."},"seq":{"type":"number","description":"Seq of the `subagent/descriptor` event this identity was folded from. `session.isOwnSeq(seq)` proves the identity comes from the child's OWN log suffix — where a descriptor is immutable once appended — and not from a fork seed's replayed ancestor descriptor."}},"required":["mode","seq"],"additionalProperties":true},{"type":"object","properties":{"mode":{"type":"string","const":"continuable","description":"A resumable conversation."},"label":{"type":"string","description":"Durable creation label from the child's descriptor."},"seq":{"type":"number","description":"Seq of the folded descriptor event; see the one-shot arm for the own-suffix proof."}},"required":["mode","label","seq"],"additionalProperties":true}],"description":"Identity of a descriptor-backed subagent session. `null` ⟺ no valid descriptor (missing, malformed, or unrecognized-version — deliberately undistinguished). The sentinel is deliberately serializable: a value pushed over JSON transports must survive `JSON.stringify` losslessly, where an `undefined` field would be dropped and a stale identity would survive on the receiving side. The entry itself stays non-optional."},"tokenUsage":{"type":"object","properties":{"uncachedInputTokens":{"type":"number"},"outputTokens":{"type":"number"},"cacheReadTokens":{"type":"number"},"cacheWriteTokens":{"type":"number"}},"required":["uncachedInputTokens","outputTokens","cacheReadTokens","cacheWriteTokens"],"additionalProperties":true,"description":"Provider-reported usage accumulated across the complete durable log."},"contextPressure":{"type":"object","properties":{"pressureTokens":{"type":"number","description":"Provider-reported prompt size of the most recent request: uncached input plus cache reads and writes. Response output is excluded, so this does not grow as the current turn streams. Absent until a provider reports usage."},"projectedTokens":{"type":"number","description":"What the NEXT request's prompt would cost: {@link pressureTokens} plus the heuristic repricing of everything the surface gained or lost since that sample. Only the delta is estimated, so the figure stays anchored to the provider while still reacting the moment a compaction shadows a span — which `pressureTokens` alone cannot do, since compaction reports no usage of its own. Absent until a provider reports usage."},"contextWindow":{"type":"number","description":"Newest recorded route capacity; absent when no adapter advertised one."}},"required":[],"additionalProperties":true,"description":"Newest request pressure paired with the newest known route capacity."},"contextBreakdown":{"type":"object","properties":{"systemTokens":{"type":"number","description":"Heuristic tokens of the last nonempty surviving system prompt in surface order; 0 when none exists."},"toolsTokens":{"type":"number","description":"Heuristic tokens of the newest request envelope's tool schemas; 0 before any request."},"messageTokens":{"type":"number","description":"Heuristic tokens of every other visible surface node, including superseded system prompts."}},"required":["systemTokens","toolsTokens","messageTokens"],"additionalProperties":true,"description":"Heuristic system/tools/message composition of the next request."},"agentTeam":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["lead","teammate"]},"phase":{"type":"string","enum":["failed","provisioning","active"],"description":"Durable lifecycle; the Lead row is always `active`. Turn activity comes from Session status."},"error":{"type":"string"}},"required":["id","name","role","phase"],"additionalProperties":true}},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"number"},"subject":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["completed","pending","in_progress","deleted"]},"blockedBy":{"type":"array","items":{"type":"string"}},"writeScopes":{"type":"array","items":{"type":"string"}},"ownerName":{"type":"string"},"ready":{"type":"boolean"},"writeScopeWarnings":{"type":"array","items":{"type":"string"}}},"required":["id","revision","subject","description","status","blockedBy","writeScopes","ready","writeScopeWarnings"],"additionalProperties":true}},"failure":{"type":"string"}},"required":["members","tasks"],"additionalProperties":true,"description":"Durable roster and non-deleted task board of the Team rooted at the projected Session."},"userQuestions":{"type":"object","properties":{"active":{"type":"array","items":{"type":"object","properties":{"callId":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable caller-provided question id, echoed in the answer."},"question":{"type":"string","description":"The question to display."},"detail":{"type":"string","description":"Optional supporting detail rendered with the question but kept out of option labels."},"header":{"type":"string","description":"Optional short heading/group label."},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"User-facing label."},"description":{"type":"string","description":"Optional extra context rendered by capable UIs."}},"required":["label"],"additionalProperties":true},"description":"Optional choices the UI can render as a menu."},"multiSelect":{"type":"boolean","description":"Whether more than one option may be selected. Defaults to single-select."},"intent":{"type":"object","properties":{"kind":{"type":"string","const":"plan-review","description":"A plan submitted for review: `detail` is the plan markdown `ask()` requires, and the decision approves or declines it."},"approve":{"type":"string","description":"The option label that approves the plan; every other option declines it. Named rather than positional so no UI infers the verdict from option order. An `approve` naming no option of its own question is rejected at `ask()`."},"callId":{"type":"string","description":"Logged tool invocation whose arguments contain the reviewed plan."}},"required":["kind","approve"],"additionalProperties":true,"description":"Optional presentation intent for capable UIs; absent asks for the generic option list."}},"required":["id","question"],"additionalProperties":true}},"state":{"type":"string","enum":["open","continued"]}},"required":["callId","questions","state"],"additionalProperties":true},"description":"Calls that can still take an answer, in ask order."},"settled":{"type":"array","items":{"type":"object","properties":{"callId":{"type":"string","description":"The settled call."},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The answered question id."},"selected":{"type":"array","items":{"type":"string"},"description":"Selected option labels. May accompany custom text for a multi-select question."},"custom":{"type":"string","description":"Optional free-text \"Other\" answer."}},"required":["id","selected"],"additionalProperties":true},"description":"The recorded batch, one entry per question; empty when the late reply carried none."}},"required":["callId","answers"],"additionalProperties":true},"description":"Calls an answer settled, in settlement order."}},"required":["active","settled"],"additionalProperties":true,"description":"Timed questions that remain answerable in this Session, and the ones a late reply settled."},"goal":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"goal":{"type":"object","properties":{"objective":{"type":"string","description":"Human-requested completion objective."},"phase":{"type":"string","enum":["active","paused","blocked","complete"],"description":"Durable lifecycle phase."},"blockedReason":{"type":"object","properties":{"code":{"type":"string","description":"Stable lower-kebab-case classification chosen by the blocking policy."},"message":{"type":"string","description":"Non-empty explanation shown to humans and models."}},"required":["code","message"],"additionalProperties":true,"description":"Present exactly while `phase` is `blocked`."},"maxGoalRounds":{"type":"number","description":"Total admitted goal-round cap."},"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["objective","phase","maxGoalRounds","id","revision"],"additionalProperties":true,"description":"Current durable goal snapshot (the CAS ref for mutations rides on it)."},"roundsStarted":{"type":"number","description":"Highest admitted round number for this goal."},"createdAt":{"type":"number","description":"Epoch milliseconds of the create mutation."},"updatedAt":{"type":"number","description":"Epoch milliseconds of the latest mutation."}},"required":["goal","roundsStarted","createdAt","updatedAt"],"additionalProperties":true}],"description":"The session's current goal and admitted-round count, or `null` before the first create and after a clear tombstone. `goal/change` supplies the whole lifecycle value; matching admitted `user/message` events advance `roundsStarted`."},"plan":{"type":"object","properties":{"active":{"type":"boolean"},"pending":{"type":"boolean"}},"required":["active","pending"],"additionalProperties":true,"description":"Plan collaboration state folded from the plan command lifecycle and `plan/mode` events."}},"required":[],"additionalProperties":true,"description":"Provider-validated values; omitted keys are absent capabilities at this cut."},"kind":{"type":"string","const":"sequenced"}},"required":["asOfSeq","values","kind"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","const":"migration-required"},"values":{"type":"object","properties":{"inbox":{"type":"object","properties":{"next-turn":{"type":"array","items":{}},"next-step":{"type":"array","items":{}}},"required":["next-turn","next-step"],"additionalProperties":true,"description":"Pending agent input reconstructed from durable inbox splices."},"workingDirectory":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"Recorded current directory for Session observations, or null when none is recorded."},"agentPreset":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"Preset the Session runs, or null when the deployment composes none."},"title":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"The session's current normalized title — the latest `session/title` event's text (last-wins), or `null` before the first title lands. A plain string: the shape the client list rows consume."},"todos":{"oneOf":[{"type":"null","const":null},{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"What this task is — a short imperative line shown in the UI."},"status":{"type":"string","enum":["completed","pending","in_progress"],"description":"Lifecycle state. `in_progress` marks a task being worked now; parallel work may mark several."}},"required":["content","status"],"additionalProperties":true}}],"description":"The agent's current whole todo list (the latest `todo/write` snapshot), or `null` before the first write. Whole-value rule: every `todo/write` carries the complete replacement list, so the fold is last-wins."},"sessionListMetadata":{"type":"object","properties":{"blank":{"type":"boolean","description":"Whether the folded prefix contains no turn."},"lastPromptAt":{"oneOf":[{"type":"null","const":null},{"type":"number"}],"description":"Latest human-authored prompt time in the folded prefix."}},"required":["blank","lastPromptAt"],"additionalProperties":true,"description":"Persisted facts used to summarize a Session without activating it."},"imageLimits":{"type":"object","properties":{"maxImageBytes":{"type":"number"},"maxImagesPerMessage":{"type":"number"},"maxMessageImageBytes":{"type":"number"},"maxImagePixels":{"type":"number"},"maxImageDimension":{"type":"number","description":"Maximum intrinsic width and maximum intrinsic height in pixels for one image."},"mediaTypes":{"type":"array","items":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif"]}}},"required":["maxImageBytes","maxImagesPerMessage","maxMessageImageBytes","maxImagePixels","maxImageDimension","mediaTypes"],"additionalProperties":true,"description":"Image-intake limits enforced by the Session prompt endpoint."},"modelSelection":{"type":"object","properties":{"lastUsed":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"}},"required":["provider","model"],"additionalProperties":true}],"description":"Selection consumed by the latest recorded model request."},"next":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"}},"required":["provider","model"],"additionalProperties":true}],"description":"Selection the next request should use, falling back to {@link lastUsed}."}},"required":["lastUsed","next"],"additionalProperties":true,"description":"Durable model selection already used and selected for the next request."},"permissions":{"type":"object","properties":{"currentValue":{"type":"string","description":"The effective current value: a configured preset key, `auto`, or `custom`."}},"required":["currentValue"],"additionalProperties":true,"description":"The session's current permission, folded from the three whole-value knob events (`permission/preset`, `sandbox/mode`, `approval/policy`) over the composition defaults. Selectable options come from the process-level catalog Remote. Key absence means no permission service is composed — clients hide the control."},"subagentCatalog":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"one-shot"},"label":{"type":"string"}},"required":["id","createdAt","mode"],"additionalProperties":true},{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"external"},"label":{"type":"string"}},"required":["id","createdAt","mode"],"additionalProperties":true},{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"continuable"},"label":{"type":"string"}},"required":["id","createdAt","mode","label"],"additionalProperties":true},{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"mode":{"type":"string","const":"unknown"},"label":{"type":"string"}},"required":["id","createdAt","mode"],"additionalProperties":true}]},"description":"Direct children in parent catalog event order, excluding fork-inherited facts."},"subagentTiming":{"type":"object","properties":{"settledMs":{"type":"number","description":"Milliseconds accumulated across completed turns after the child's own descriptor."},"active":{"type":"object","properties":{"since":{"type":"number","description":"Start of the open turn."},"through":{"type":"number","description":"Latest event time folded into this projection cut."}},"required":["since","through"],"additionalProperties":true,"description":"Same-cut bounds of the currently open turn, when one has not reached `turn/end`."},"lastTurnCompleted":{"type":"boolean","description":"Whether the latest closed turn after the child's own descriptor completed normally; absent while a turn is open or before one closes."}},"required":["settledMs"],"additionalProperties":true,"description":"Active-turn duration and latest closed-turn completion for a descriptor-backed subagent session."},"subagent":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"mode":{"type":"string","const":"one-shot","description":"A terminal one-shot child."},"label":{"type":"string","description":"Optional durable creation label from the child's descriptor."},"seq":{"type":"number","description":"Seq of the `subagent/descriptor` event this identity was folded from. `session.isOwnSeq(seq)` proves the identity comes from the child's OWN log suffix — where a descriptor is immutable once appended — and not from a fork seed's replayed ancestor descriptor."}},"required":["mode","seq"],"additionalProperties":true},{"type":"object","properties":{"mode":{"type":"string","const":"continuable","description":"A resumable conversation."},"label":{"type":"string","description":"Durable creation label from the child's descriptor."},"seq":{"type":"number","description":"Seq of the folded descriptor event; see the one-shot arm for the own-suffix proof."}},"required":["mode","label","seq"],"additionalProperties":true}],"description":"Identity of a descriptor-backed subagent session. `null` ⟺ no valid descriptor (missing, malformed, or unrecognized-version — deliberately undistinguished). The sentinel is deliberately serializable: a value pushed over JSON transports must survive `JSON.stringify` losslessly, where an `undefined` field would be dropped and a stale identity would survive on the receiving side. The entry itself stays non-optional."},"tokenUsage":{"type":"object","properties":{"uncachedInputTokens":{"type":"number"},"outputTokens":{"type":"number"},"cacheReadTokens":{"type":"number"},"cacheWriteTokens":{"type":"number"}},"required":["uncachedInputTokens","outputTokens","cacheReadTokens","cacheWriteTokens"],"additionalProperties":true,"description":"Provider-reported usage accumulated across the complete durable log."},"contextPressure":{"type":"object","properties":{"pressureTokens":{"type":"number","description":"Provider-reported prompt size of the most recent request: uncached input plus cache reads and writes. Response output is excluded, so this does not grow as the current turn streams. Absent until a provider reports usage."},"projectedTokens":{"type":"number","description":"What the NEXT request's prompt would cost: {@link pressureTokens} plus the heuristic repricing of everything the surface gained or lost since that sample. Only the delta is estimated, so the figure stays anchored to the provider while still reacting the moment a compaction shadows a span — which `pressureTokens` alone cannot do, since compaction reports no usage of its own. Absent until a provider reports usage."},"contextWindow":{"type":"number","description":"Newest recorded route capacity; absent when no adapter advertised one."}},"required":[],"additionalProperties":true,"description":"Newest request pressure paired with the newest known route capacity."},"contextBreakdown":{"type":"object","properties":{"systemTokens":{"type":"number","description":"Heuristic tokens of the last nonempty surviving system prompt in surface order; 0 when none exists."},"toolsTokens":{"type":"number","description":"Heuristic tokens of the newest request envelope's tool schemas; 0 before any request."},"messageTokens":{"type":"number","description":"Heuristic tokens of every other visible surface node, including superseded system prompts."}},"required":["systemTokens","toolsTokens","messageTokens"],"additionalProperties":true,"description":"Heuristic system/tools/message composition of the next request."},"agentTeam":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string","enum":["lead","teammate"]},"phase":{"type":"string","enum":["failed","provisioning","active"],"description":"Durable lifecycle; the Lead row is always `active`. Turn activity comes from Session status."},"error":{"type":"string"}},"required":["id","name","role","phase"],"additionalProperties":true}},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"number"},"subject":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["completed","pending","in_progress","deleted"]},"blockedBy":{"type":"array","items":{"type":"string"}},"writeScopes":{"type":"array","items":{"type":"string"}},"ownerName":{"type":"string"},"ready":{"type":"boolean"},"writeScopeWarnings":{"type":"array","items":{"type":"string"}}},"required":["id","revision","subject","description","status","blockedBy","writeScopes","ready","writeScopeWarnings"],"additionalProperties":true}},"failure":{"type":"string"}},"required":["members","tasks"],"additionalProperties":true,"description":"Durable roster and non-deleted task board of the Team rooted at the projected Session."},"userQuestions":{"type":"object","properties":{"active":{"type":"array","items":{"type":"object","properties":{"callId":{"type":"string"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable caller-provided question id, echoed in the answer."},"question":{"type":"string","description":"The question to display."},"detail":{"type":"string","description":"Optional supporting detail rendered with the question but kept out of option labels."},"header":{"type":"string","description":"Optional short heading/group label."},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"User-facing label."},"description":{"type":"string","description":"Optional extra context rendered by capable UIs."}},"required":["label"],"additionalProperties":true},"description":"Optional choices the UI can render as a menu."},"multiSelect":{"type":"boolean","description":"Whether more than one option may be selected. Defaults to single-select."},"intent":{"type":"object","properties":{"kind":{"type":"string","const":"plan-review","description":"A plan submitted for review: `detail` is the plan markdown `ask()` requires, and the decision approves or declines it."},"approve":{"type":"string","description":"The option label that approves the plan; every other option declines it. Named rather than positional so no UI infers the verdict from option order. An `approve` naming no option of its own question is rejected at `ask()`."},"callId":{"type":"string","description":"Logged tool invocation whose arguments contain the reviewed plan."}},"required":["kind","approve"],"additionalProperties":true,"description":"Optional presentation intent for capable UIs; absent asks for the generic option list."}},"required":["id","question"],"additionalProperties":true}},"state":{"type":"string","enum":["open","continued"]}},"required":["callId","questions","state"],"additionalProperties":true},"description":"Calls that can still take an answer, in ask order."},"settled":{"type":"array","items":{"type":"object","properties":{"callId":{"type":"string","description":"The settled call."},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The answered question id."},"selected":{"type":"array","items":{"type":"string"},"description":"Selected option labels. May accompany custom text for a multi-select question."},"custom":{"type":"string","description":"Optional free-text \"Other\" answer."}},"required":["id","selected"],"additionalProperties":true},"description":"The recorded batch, one entry per question; empty when the late reply carried none."}},"required":["callId","answers"],"additionalProperties":true},"description":"Calls an answer settled, in settlement order."}},"required":["active","settled"],"additionalProperties":true,"description":"Timed questions that remain answerable in this Session, and the ones a late reply settled."},"goal":{"oneOf":[{"type":"null","const":null},{"type":"object","properties":{"goal":{"type":"object","properties":{"objective":{"type":"string","description":"Human-requested completion objective."},"phase":{"type":"string","enum":["active","paused","blocked","complete"],"description":"Durable lifecycle phase."},"blockedReason":{"type":"object","properties":{"code":{"type":"string","description":"Stable lower-kebab-case classification chosen by the blocking policy."},"message":{"type":"string","description":"Non-empty explanation shown to humans and models."}},"required":["code","message"],"additionalProperties":true,"description":"Present exactly while `phase` is `blocked`."},"maxGoalRounds":{"type":"number","description":"Total admitted goal-round cap."},"id":{"type":"string","description":"Stable goal identity."},"revision":{"type":"number","description":"Positive revision; every durable mutation increments it."}},"required":["objective","phase","maxGoalRounds","id","revision"],"additionalProperties":true,"description":"Current durable goal snapshot (the CAS ref for mutations rides on it)."},"roundsStarted":{"type":"number","description":"Highest admitted round number for this goal."},"createdAt":{"type":"number","description":"Epoch milliseconds of the create mutation."},"updatedAt":{"type":"number","description":"Epoch milliseconds of the latest mutation."}},"required":["goal","roundsStarted","createdAt","updatedAt"],"additionalProperties":true}],"description":"The session's current goal and admitted-round count, or `null` before the first create and after a clear tombstone. `goal/change` supplies the whole lifecycle value; matching admitted `user/message` events advance `roundsStarted`."},"plan":{"type":"object","properties":{"active":{"type":"boolean"},"pending":{"type":"boolean"}},"required":["active","pending"],"additionalProperties":true,"description":"Plan collaboration state folded from the plan command lifecycle and `plan/mode` events."}},"required":[],"additionalProperties":true}},"required":["kind","values"],"additionalProperties":true}]},
|
|
1468
1779
|
},
|
|
1469
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1780
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":548,"column":9},
|
|
1470
1781
|
},
|
|
1471
|
-
{
|
|
1472
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/prompt',
|
|
1782
|
+
'session/prompt': {
|
|
1473
1783
|
service: 'sessionController',
|
|
1474
|
-
|
|
1475
|
-
method: 'prompt',
|
|
1784
|
+
description: 'Admit one prompt after explicitly resuming its Session.',
|
|
1476
1785
|
invocation: { kind: 'direct' },
|
|
1477
1786
|
parameters: [
|
|
1478
1787
|
{
|
|
1479
1788
|
name: 'request',
|
|
1480
|
-
|
|
1789
|
+
description: 'Session identity, prompt content, source metadata, and delivery mode.',
|
|
1481
1790
|
source: 'json',
|
|
1482
1791
|
codec: {
|
|
1483
1792
|
mode: 'strict',
|
|
1484
1793
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPromptRequest',
|
|
1485
1794
|
create: _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema,
|
|
1795
|
+
jsonSchema: {"type":"object","properties":{"requestId":{"type":"string","description":"Client-minted identity persisted on the exact accepted user message."},"sessionId":{"type":"string"},"mode":{"type":"string","enum":["queue","steer"]},"content":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":true},{"type":"object","properties":{"type":{"type":"string","const":"image"},"mediaType":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif"]},"data":{"type":"string"},"name":{"type":"string"}},"required":["type","mediaType","data"],"additionalProperties":true},{"type":"object","properties":{"type":{"type":"string","const":"file"},"receiptId":{"type":"string"}},"required":["type","receiptId"],"additionalProperties":true}]},"description":"At least one non-whitespace text part or attachment."},"clientTimeZone":{"type":"string"}},"required":["requestId","sessionId","mode","content"],"additionalProperties":true},
|
|
1796
|
+
},
|
|
1797
|
+
strictCodec: {
|
|
1798
|
+
mode: 'strict',
|
|
1799
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPromptRequest',
|
|
1800
|
+
create: _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0_strict$schema,
|
|
1801
|
+
jsonSchema: {"type":"object","properties":{"requestId":{"type":"string","description":"Client-minted identity persisted on the exact accepted user message."},"sessionId":{"type":"string"},"mode":{"type":"string","enum":["queue","steer"]},"content":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"mediaType":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif"]},"data":{"type":"string"},"name":{"type":"string"}},"required":["type","mediaType","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"file"},"receiptId":{"type":"string"}},"required":["type","receiptId"],"additionalProperties":false}]},"description":"At least one non-whitespace text part or attachment."},"clientTimeZone":{"type":"string"}},"required":["requestId","sessionId","mode","content"],"additionalProperties":false},
|
|
1486
1802
|
},
|
|
1487
1803
|
},
|
|
1488
1804
|
],
|
|
@@ -1491,24 +1807,31 @@ export const TYPERT = {
|
|
|
1491
1807
|
mode: 'strict',
|
|
1492
1808
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionPromptValue',
|
|
1493
1809
|
create: _deepseek_ai_dsh_api_session_controller_session_prompt_result$schema,
|
|
1810
|
+
description: 'acknowledgement that the Agent accepted the prompt.',
|
|
1811
|
+
jsonSchema: {"type":"object","properties":{"accepted":{"type":"boolean","const":true}},"required":["accepted"],"additionalProperties":true},
|
|
1494
1812
|
},
|
|
1495
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1813
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":462,"column":9},
|
|
1496
1814
|
},
|
|
1497
|
-
{
|
|
1498
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/rename',
|
|
1815
|
+
'session/rename': {
|
|
1499
1816
|
service: 'sessionController',
|
|
1500
|
-
|
|
1501
|
-
method: 'rename',
|
|
1817
|
+
description: 'Rename one Session after explicitly resuming it.',
|
|
1502
1818
|
invocation: { kind: 'direct' },
|
|
1503
1819
|
parameters: [
|
|
1504
1820
|
{
|
|
1505
1821
|
name: 'request',
|
|
1506
|
-
|
|
1822
|
+
description: 'Session identity and proposed title.',
|
|
1507
1823
|
source: 'json',
|
|
1508
1824
|
codec: {
|
|
1509
1825
|
mode: 'strict',
|
|
1510
1826
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionRenameRequest',
|
|
1511
1827
|
create: _deepseek_ai_dsh_api_session_controller_session_rename_parameter_0$schema,
|
|
1828
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"},"title":{"type":"string"}},"required":["sessionId","title"],"additionalProperties":true},
|
|
1829
|
+
},
|
|
1830
|
+
strictCodec: {
|
|
1831
|
+
mode: 'strict',
|
|
1832
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionRenameRequest',
|
|
1833
|
+
create: _deepseek_ai_dsh_api_session_controller_session_rename_parameter_0_strict$schema,
|
|
1834
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"},"title":{"type":"string"}},"required":["sessionId","title"],"additionalProperties":false},
|
|
1512
1835
|
},
|
|
1513
1836
|
},
|
|
1514
1837
|
],
|
|
@@ -1516,24 +1839,31 @@ export const TYPERT = {
|
|
|
1516
1839
|
mode: 'strict',
|
|
1517
1840
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionRenameValue',
|
|
1518
1841
|
create: _deepseek_ai_dsh_api_session_controller_session_rename_result$schema,
|
|
1842
|
+
description: 'the accepted title and durable event sequence.',
|
|
1843
|
+
jsonSchema: {"type":"object","properties":{"title":{"type":"string"},"seq":{"type":"number"}},"required":["title","seq"],"additionalProperties":true},
|
|
1519
1844
|
},
|
|
1520
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1845
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":431,"column":3},
|
|
1521
1846
|
},
|
|
1522
|
-
{
|
|
1523
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/search',
|
|
1847
|
+
'session/search': {
|
|
1524
1848
|
service: 'sessionController',
|
|
1525
|
-
|
|
1526
|
-
method: 'search',
|
|
1849
|
+
description: 'Search visible Session content without resuming an Agent. A non-owner receives only the hits whose Session `allows()` admits; `hasMore` describes the bounded result before that filtering.',
|
|
1527
1850
|
invocation: { kind: 'direct' },
|
|
1528
1851
|
parameters: [
|
|
1529
1852
|
{
|
|
1530
1853
|
name: 'request',
|
|
1531
|
-
|
|
1854
|
+
description: 'literal message-content query.',
|
|
1532
1855
|
source: 'json',
|
|
1533
1856
|
codec: {
|
|
1534
1857
|
mode: 'strict',
|
|
1535
1858
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSearchRequest',
|
|
1536
1859
|
create: _deepseek_ai_dsh_api_session_controller_session_search_parameter_0$schema,
|
|
1860
|
+
jsonSchema: {"type":"object","properties":{"query":{"type":"string"}},"required":["query"],"additionalProperties":true},
|
|
1861
|
+
},
|
|
1862
|
+
strictCodec: {
|
|
1863
|
+
mode: 'strict',
|
|
1864
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSearchRequest',
|
|
1865
|
+
create: _deepseek_ai_dsh_api_session_controller_session_search_parameter_0_strict$schema,
|
|
1866
|
+
jsonSchema: {"type":"object","properties":{"query":{"type":"string"}},"required":["query"],"additionalProperties":false},
|
|
1537
1867
|
},
|
|
1538
1868
|
},
|
|
1539
1869
|
],
|
|
@@ -1542,24 +1872,31 @@ export const TYPERT = {
|
|
|
1542
1872
|
mode: 'strict',
|
|
1543
1873
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSearchValue',
|
|
1544
1874
|
create: _deepseek_ai_dsh_api_session_controller_session_search_result$schema,
|
|
1875
|
+
description: 'authorized bounded Session search results.',
|
|
1876
|
+
jsonSchema: {"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string"},"snippet":{"type":"string"}},"required":["sessionId","snippet"],"additionalProperties":true}},"hasMore":{"type":"boolean"}},"required":["items","hasMore"],"additionalProperties":true},
|
|
1545
1877
|
},
|
|
1546
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1878
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":290,"column":9},
|
|
1547
1879
|
},
|
|
1548
|
-
{
|
|
1549
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/selectModel',
|
|
1880
|
+
'session/selectModel': {
|
|
1550
1881
|
service: 'sessionController',
|
|
1551
|
-
|
|
1552
|
-
method: 'selectModel',
|
|
1882
|
+
description: 'Select one Session-local model after explicitly resuming the Session; save the default in the background.',
|
|
1553
1883
|
invocation: { kind: 'direct' },
|
|
1554
1884
|
parameters: [
|
|
1555
1885
|
{
|
|
1556
1886
|
name: 'request',
|
|
1557
|
-
|
|
1887
|
+
description: 'Session identity and requested model selection.',
|
|
1558
1888
|
source: 'json',
|
|
1559
1889
|
codec: {
|
|
1560
1890
|
mode: 'strict',
|
|
1561
1891
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSelectModelRequest',
|
|
1562
1892
|
create: _deepseek_ai_dsh_api_session_controller_session_selectModel_parameter_0$schema,
|
|
1893
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"},"provider":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"}},"required":["sessionId","provider","model"],"additionalProperties":true},
|
|
1894
|
+
},
|
|
1895
|
+
strictCodec: {
|
|
1896
|
+
mode: 'strict',
|
|
1897
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSelectModelRequest',
|
|
1898
|
+
create: _deepseek_ai_dsh_api_session_controller_session_selectModel_parameter_0_strict$schema,
|
|
1899
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"},"provider":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"}},"required":["sessionId","provider","model"],"additionalProperties":false},
|
|
1563
1900
|
},
|
|
1564
1901
|
},
|
|
1565
1902
|
],
|
|
@@ -1567,24 +1904,31 @@ export const TYPERT = {
|
|
|
1567
1904
|
mode: 'strict',
|
|
1568
1905
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionSelectModelValue',
|
|
1569
1906
|
create: _deepseek_ai_dsh_api_session_controller_session_selectModel_result$schema,
|
|
1907
|
+
description: 'the normalized selection installed for the Session, without waiting for default persistence.',
|
|
1908
|
+
jsonSchema: {"type":"object","properties":{"selected":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"reasoningEffort":{"type":"string"}},"required":["provider","model"],"additionalProperties":true}},"required":["selected"],"additionalProperties":true},
|
|
1570
1909
|
},
|
|
1571
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1910
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":311,"column":3},
|
|
1572
1911
|
},
|
|
1573
|
-
{
|
|
1574
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/updateQueue',
|
|
1912
|
+
'session/updateQueue': {
|
|
1575
1913
|
service: 'sessionController',
|
|
1576
|
-
|
|
1577
|
-
method: 'updateQueue',
|
|
1914
|
+
description: 'Mutate one still-pending queue occurrence, resuming a cold Agent first.',
|
|
1578
1915
|
invocation: { kind: 'direct' },
|
|
1579
1916
|
parameters: [
|
|
1580
1917
|
{
|
|
1581
1918
|
name: 'request',
|
|
1582
|
-
|
|
1919
|
+
description: 'Session, queue item, and requested mutation.',
|
|
1583
1920
|
source: 'json',
|
|
1584
1921
|
codec: {
|
|
1585
1922
|
mode: 'strict',
|
|
1586
1923
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionUpdateQueueRequest',
|
|
1587
1924
|
create: _deepseek_ai_dsh_api_session_controller_session_updateQueue_parameter_0$schema,
|
|
1925
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"},"itemId":{"type":"string"},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"edit"},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":true},"description":"Non-empty text-only replacement content."}},"required":["kind","content"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","const":"remove"}},"required":["kind"],"additionalProperties":true},{"type":"object","properties":{"kind":{"type":"string","const":"steer"}},"required":["kind"],"additionalProperties":true}]}},"required":["sessionId","itemId","action"],"additionalProperties":true},
|
|
1926
|
+
},
|
|
1927
|
+
strictCodec: {
|
|
1928
|
+
mode: 'strict',
|
|
1929
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionUpdateQueueRequest',
|
|
1930
|
+
create: _deepseek_ai_dsh_api_session_controller_session_updateQueue_parameter_0_strict$schema,
|
|
1931
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"},"itemId":{"type":"string"},"action":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"edit"},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},"description":"Non-empty text-only replacement content."}},"required":["kind","content"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"remove"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"steer"}},"required":["kind"],"additionalProperties":false}]}},"required":["sessionId","itemId","action"],"additionalProperties":false},
|
|
1588
1932
|
},
|
|
1589
1933
|
},
|
|
1590
1934
|
],
|
|
@@ -1592,24 +1936,31 @@ export const TYPERT = {
|
|
|
1592
1936
|
mode: 'strict',
|
|
1593
1937
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SessionUpdateQueueValue',
|
|
1594
1938
|
create: _deepseek_ai_dsh_api_session_controller_session_updateQueue_result$schema,
|
|
1939
|
+
description: 'acknowledgement that the queue mutation was applied.',
|
|
1940
|
+
jsonSchema: {"type":"object","properties":{"accepted":{"type":"boolean","const":true}},"required":["accepted"],"additionalProperties":true},
|
|
1595
1941
|
},
|
|
1596
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1942
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":504,"column":3},
|
|
1597
1943
|
},
|
|
1598
|
-
{
|
|
1599
|
-
id: '@deepseek-ai/dsh-api-session-controller#session/workspacePathApplications',
|
|
1944
|
+
'session/workspacePathApplications': {
|
|
1600
1945
|
service: 'sessionController',
|
|
1601
|
-
|
|
1602
|
-
method: 'workspacePathApplications',
|
|
1946
|
+
description: 'Query current file handlers on the serving desktop without activating an Agent.',
|
|
1603
1947
|
invocation: { kind: 'direct' },
|
|
1604
1948
|
parameters: [
|
|
1605
1949
|
{
|
|
1606
1950
|
name: 'request',
|
|
1607
|
-
|
|
1951
|
+
description: 'file path in Host filesystem syntax.',
|
|
1608
1952
|
source: 'json',
|
|
1609
1953
|
codec: {
|
|
1610
1954
|
mode: 'strict',
|
|
1611
1955
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/workspacePathApplications:request',
|
|
1612
1956
|
create: _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_parameter_0$schema,
|
|
1957
|
+
jsonSchema: {"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"additionalProperties":true},
|
|
1958
|
+
},
|
|
1959
|
+
strictCodec: {
|
|
1960
|
+
mode: 'strict',
|
|
1961
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/workspacePathApplications:request',
|
|
1962
|
+
create: _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_parameter_0_strict$schema,
|
|
1963
|
+
jsonSchema: {"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"additionalProperties":false},
|
|
1613
1964
|
},
|
|
1614
1965
|
},
|
|
1615
1966
|
],
|
|
@@ -1618,24 +1969,31 @@ export const TYPERT = {
|
|
|
1618
1969
|
mode: 'strict',
|
|
1619
1970
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller#session/workspacePathApplications:result',
|
|
1620
1971
|
create: _deepseek_ai_dsh_api_session_controller_session_workspacePathApplications_result$schema,
|
|
1972
|
+
description: 'OS application names, icons, and default selection; empty when desktop opening is unavailable.',
|
|
1973
|
+
jsonSchema: {"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"OS application identifier; callers must revalidate it against the file's current handlers before opening."},"name":{"type":"string"},"default":{"type":"boolean"},"icon":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"PNG or SVG data URL, or null when the desktop supplies no icon."}},"required":["id","name","default","icon"],"additionalProperties":true}},
|
|
1621
1974
|
},
|
|
1622
|
-
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":
|
|
1975
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":398,"column":9},
|
|
1623
1976
|
},
|
|
1624
|
-
{
|
|
1625
|
-
id: '@deepseek-ai/dsh-api-session-controller#skills/list',
|
|
1977
|
+
'skills/list': {
|
|
1626
1978
|
service: 'sessionSkillCatalog',
|
|
1627
|
-
|
|
1628
|
-
method: 'list',
|
|
1979
|
+
description: 'List the user-invocable skills visible to one Session composition.',
|
|
1629
1980
|
invocation: { kind: 'direct' },
|
|
1630
1981
|
parameters: [
|
|
1631
1982
|
{
|
|
1632
1983
|
name: 'request',
|
|
1633
|
-
|
|
1984
|
+
description: 'Session identity whose cwd and preset select the catalog view.',
|
|
1634
1985
|
source: 'json',
|
|
1635
1986
|
codec: {
|
|
1636
1987
|
mode: 'strict',
|
|
1637
1988
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SkillListRequest',
|
|
1638
1989
|
create: _deepseek_ai_dsh_api_session_controller_skills_list_parameter_0$schema,
|
|
1990
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"],"additionalProperties":true},
|
|
1991
|
+
},
|
|
1992
|
+
strictCodec: {
|
|
1993
|
+
mode: 'strict',
|
|
1994
|
+
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SkillListRequest',
|
|
1995
|
+
create: _deepseek_ai_dsh_api_session_controller_skills_list_parameter_0_strict$schema,
|
|
1996
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"],"additionalProperties":false},
|
|
1639
1997
|
},
|
|
1640
1998
|
},
|
|
1641
1999
|
],
|
|
@@ -1644,10 +2002,20 @@ export const TYPERT = {
|
|
|
1644
2002
|
mode: 'strict',
|
|
1645
2003
|
typeSymbol: '@deepseek-ai/dsh-api-session-controller/types#SkillListValue',
|
|
1646
2004
|
create: _deepseek_ai_dsh_api_session_controller_skills_list_result$schema,
|
|
2005
|
+
description: 'user-invocable skill metadata without loading skill bodies.',
|
|
2006
|
+
jsonSchema: {"type":"object","properties":{"skills":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Absolute SKILL.md path when supplied by a filesystem provider."},"name":{"type":"string","description":"Kebab-case identifier referenced as `/name`."},"description":{"type":"string","description":"Short routing description."},"whenToUse":{"type":"string","description":"Optional extra routing guidance."},"modelInvocable":{"type":"boolean","description":"Whether the same skill is also advertised to the model."}},"required":["name","description","modelInvocable"],"additionalProperties":true}}},"required":["skills"],"additionalProperties":true},
|
|
1647
2007
|
},
|
|
1648
2008
|
sourceLocation: {"file":"packages/api/session-controller/src/skill-catalog.ts","line":36,"column":9},
|
|
1649
2009
|
},
|
|
2010
|
+
},
|
|
2011
|
+
}, z)
|
|
2012
|
+
|
|
2013
|
+
export const TYPERT = {
|
|
2014
|
+
package: '@deepseek-ai/dsh-api-session-controller',
|
|
2015
|
+
face: 'host',
|
|
2016
|
+
schemas: [
|
|
1650
2017
|
],
|
|
2018
|
+
get invocations() { return $remote.descriptors },
|
|
1651
2019
|
model: {
|
|
1652
2020
|
"services": [
|
|
1653
2021
|
{
|
|
@@ -1682,16 +2050,16 @@ export const TYPERT = {
|
|
|
1682
2050
|
{
|
|
1683
2051
|
"kind": "method",
|
|
1684
2052
|
"name": "search",
|
|
1685
|
-
"signature": "@Remote('search') search(request: SessionSearchRequest, signal: AbortSignal): Promise<SessionSearchValue>",
|
|
2053
|
+
"signature": "@Remote('search') async search(request: SessionSearchRequest, signal: AbortSignal): Promise<SessionSearchValue>",
|
|
1686
2054
|
"summary": "Search visible Session content without resuming an Agent.",
|
|
1687
|
-
"jsDoc": "/**\n * Search visible Session content without resuming an Agent.\n * @param request - literal message-content query.\n * @param signal - cancellation for list and search reads.\n * @returns authorized bounded Session search results.\n */"
|
|
2055
|
+
"jsDoc": "/**\n * Search visible Session content without resuming an Agent. A non-owner\n * receives only the hits whose Session `allows()` admits; `hasMore`\n * describes the bounded result before that filtering.\n * @param request - literal message-content query.\n * @param signal - cancellation for list and search reads.\n * @returns authorized bounded Session search results.\n */"
|
|
1688
2056
|
},
|
|
1689
2057
|
{
|
|
1690
2058
|
"kind": "method",
|
|
1691
2059
|
"name": "create",
|
|
1692
2060
|
"signature": "@Remote('create') create(request: SessionCreateRequest): Promise<SessionCreateValue>",
|
|
1693
|
-
"summary": "Create
|
|
1694
|
-
"jsDoc": "/**\n * Create
|
|
2061
|
+
"summary": "Create one ordinary Session for a new conversation, reusing the named blank Session while it is reusable.",
|
|
2062
|
+
"jsDoc": "/**\n * Create one ordinary Session for a new conversation, reusing the named blank Session while it is reusable.\n * @param request - optional blank Session to reuse, location, and Agent preset.\n * @returns the created or reused Session identity and its preset when configured.\n */"
|
|
1695
2063
|
},
|
|
1696
2064
|
{
|
|
1697
2065
|
"kind": "method",
|
|
@@ -1759,7 +2127,7 @@ export const TYPERT = {
|
|
|
1759
2127
|
{
|
|
1760
2128
|
"kind": "method",
|
|
1761
2129
|
"name": "prompt",
|
|
1762
|
-
"signature": "@Remote('prompt') prompt(request: SessionPromptRequest, signal: AbortSignal): Promise<SessionPromptValue>",
|
|
2130
|
+
"signature": "@Remote('prompt') async prompt(request: SessionPromptRequest, signal: AbortSignal): Promise<SessionPromptValue>",
|
|
1763
2131
|
"summary": "Admit one prompt after explicitly resuming its Session.",
|
|
1764
2132
|
"jsDoc": "/**\n * Admit one prompt after explicitly resuming its Session.\n * @param request - Session identity, prompt content, source metadata, and delivery mode.\n * @param signal - caller cancellation before prompt admission begins.\n * @returns acknowledgement that the Agent accepted the prompt.\n */"
|
|
1765
2133
|
},
|
|
@@ -1787,14 +2155,14 @@ export const TYPERT = {
|
|
|
1787
2155
|
{
|
|
1788
2156
|
"kind": "method",
|
|
1789
2157
|
"name": "page",
|
|
1790
|
-
"signature": "@Remote('page') page(request: SessionPageRequest, signal: AbortSignal): Promise<SessionPage>",
|
|
2158
|
+
"signature": "@Remote({ name: 'page', resources: { session: addressedSession } }) page(request: SessionPageRequest, signal: AbortSignal): Promise<SessionPage>",
|
|
1791
2159
|
"summary": "Read one cold-safe, message-aligned Session history page.",
|
|
1792
2160
|
"jsDoc": "/**\n * Read one cold-safe, message-aligned Session history page.\n * @param request - durable address, backward cursor, and page budget.\n * @param signal - cancellation for persistence reads.\n * @returns one chronological page.\n */"
|
|
1793
2161
|
},
|
|
1794
2162
|
{
|
|
1795
2163
|
"kind": "method",
|
|
1796
2164
|
"name": "follow",
|
|
1797
|
-
"signature": "@Remote({ mode: 'stream' }) follow(request: SessionFollowRequest, signal: AbortSignal): AsyncIterable<SessionFollowFrame>",
|
|
2165
|
+
"signature": "@Remote({ mode: 'stream', resources: { session: addressedSession } }) follow(request: SessionFollowRequest, signal: AbortSignal): AsyncIterable<SessionFollowFrame>",
|
|
1798
2166
|
"summary": "Follow one Session log from its opening or resume cursor.",
|
|
1799
2167
|
"jsDoc": "/**\n * Follow one Session log from its opening or resume cursor.\n * @param request - durable address and last committed sequence already held by the caller.\n * @param signal - cancellation owned by the Remote stream carrier.\n * @returns a complete opening snapshot followed by gap-free durable event\n * frames and optional cursorless assistant-stream frames.\n */"
|
|
1800
2168
|
},
|
|
@@ -1808,7 +2176,7 @@ export const TYPERT = {
|
|
|
1808
2176
|
{
|
|
1809
2177
|
"kind": "method",
|
|
1810
2178
|
"name": "control",
|
|
1811
|
-
"signature": "@Remote({ mode: 'stream' }) control(signal: AbortSignal): AsyncIterable<SessionControlFrame>",
|
|
2179
|
+
"signature": "@Remote({ mode: 'stream' }) async *control(signal: AbortSignal): AsyncIterable<SessionControlFrame>",
|
|
1812
2180
|
"summary": "Stream a complete live-control baseline followed by replacement frames.",
|
|
1813
2181
|
"jsDoc": "/**\n * Stream a complete live-control baseline followed by replacement frames.\n * @param signal - cancellation owned by the Remote stream carrier.\n * @returns one complete baseline followed by live replacement frames.\n */"
|
|
1814
2182
|
}
|
|
@@ -1838,6 +2206,10 @@ export const TYPERT = {
|
|
|
1838
2206
|
"name": "AgentStatus",
|
|
1839
2207
|
"declaration": "export type AgentStatus = 'idle' | 'running';"
|
|
1840
2208
|
},
|
|
2209
|
+
{
|
|
2210
|
+
"name": "AllowedModelRoute",
|
|
2211
|
+
"declaration": "export interface AllowedModelRoute {\n readonly provider: string;\n readonly model: string;\n}"
|
|
2212
|
+
},
|
|
1841
2213
|
{
|
|
1842
2214
|
"name": "ApiSessionAgentError",
|
|
1843
2215
|
"declaration": "export type ApiSessionAgentError = RemoteError<'session/not-found' | 'session/agent-busy' | 'session/writer-held' | 'gateway/internal'>;"
|
|
@@ -2078,6 +2450,26 @@ export const TYPERT = {
|
|
|
2078
2450
|
"name": "JobId",
|
|
2079
2451
|
"declaration": "export type JobId = Branded<'JobId'>;"
|
|
2080
2452
|
},
|
|
2453
|
+
{
|
|
2454
|
+
"name": "JobOutcome",
|
|
2455
|
+
"declaration": "export interface JobOutcome {\n status: 'completed' | 'killed' | 'failed';\n detail?: string;\n result?: string;\n}"
|
|
2456
|
+
},
|
|
2457
|
+
{
|
|
2458
|
+
"name": "JobRegisteredData",
|
|
2459
|
+
"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}"
|
|
2460
|
+
},
|
|
2461
|
+
{
|
|
2462
|
+
"name": "JobSettleCause",
|
|
2463
|
+
"declaration": "export type JobSettleCause = 'producer' | 'kill' | 'teardown';"
|
|
2464
|
+
},
|
|
2465
|
+
{
|
|
2466
|
+
"name": "JobSettledData",
|
|
2467
|
+
"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}"
|
|
2468
|
+
},
|
|
2469
|
+
{
|
|
2470
|
+
"name": "JobToolCall",
|
|
2471
|
+
"declaration": "export interface JobToolCall {\n readonly callId: SessionEventMap['tool/call']['callId'];\n readonly rootCallId: SessionEventMap['tool/call']['callId'];\n}"
|
|
2472
|
+
},
|
|
2081
2473
|
{
|
|
2082
2474
|
"name": "JsonValue",
|
|
2083
2475
|
"declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
|
|
@@ -2172,7 +2564,7 @@ export const TYPERT = {
|
|
|
2172
2564
|
},
|
|
2173
2565
|
{
|
|
2174
2566
|
"name": "MessageSourceMap",
|
|
2175
|
-
"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 '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; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'cordis-host-runner': { kind: 'cordis-host-runner'; };\n '
|
|
2567
|
+
"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}"
|
|
2176
2568
|
},
|
|
2177
2569
|
{
|
|
2178
2570
|
"name": "ModelCatalog",
|
|
@@ -2238,6 +2630,18 @@ export const TYPERT = {
|
|
|
2238
2630
|
"name": "PermissionSelection",
|
|
2239
2631
|
"declaration": "export interface PermissionSelection {\n currentValue: string;\n}"
|
|
2240
2632
|
},
|
|
2633
|
+
{
|
|
2634
|
+
"name": "PlanProjection",
|
|
2635
|
+
"declaration": "export interface PlanProjection {\n active: boolean;\n pending: boolean;\n}"
|
|
2636
|
+
},
|
|
2637
|
+
{
|
|
2638
|
+
"name": "Principal",
|
|
2639
|
+
"declaration": "export type Principal = PrincipalMap[keyof PrincipalMap];"
|
|
2640
|
+
},
|
|
2641
|
+
{
|
|
2642
|
+
"name": "PrincipalMap",
|
|
2643
|
+
"declaration": "export interface PrincipalMap {\n owner: { readonly kind: 'owner'; };\n}"
|
|
2644
|
+
},
|
|
2241
2645
|
{
|
|
2242
2646
|
"name": "PromptContentPart",
|
|
2243
2647
|
"declaration": "export type PromptContentPart = { readonly type: 'text'; readonly text: string; } | { readonly type: 'image'; readonly mediaType: ImageMediaType; readonly data: string; readonly name?: string; } | { readonly type: 'file'; readonly receiptId: Branded<'file-upload-receipt-id'>; };"
|
|
@@ -2266,6 +2670,10 @@ export const TYPERT = {
|
|
|
2266
2670
|
"name": "ReasoningEffortId",
|
|
2267
2671
|
"declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
|
|
2268
2672
|
},
|
|
2673
|
+
{
|
|
2674
|
+
"name": "RemoteAccessDeniedDetails",
|
|
2675
|
+
"declaration": "export interface RemoteAccessDeniedDetails {\n readonly action: string;\n readonly reason: string;\n}"
|
|
2676
|
+
},
|
|
2269
2677
|
{
|
|
2270
2678
|
"name": "RemoteError",
|
|
2271
2679
|
"declaration": "export class RemoteError<Code extends RemoteErrorCode = RemoteErrorCode> extends Error {\n readonly isDSHRemoteError: true;\n}"
|
|
@@ -2276,7 +2684,7 @@ export const TYPERT = {
|
|
|
2276
2684
|
},
|
|
2277
2685
|
{
|
|
2278
2686
|
"name": "RemoteErrorDetailsMap",
|
|
2279
|
-
"declaration": "export interface RemoteErrorDetailsMap {\n 'gateway/bad-request': { readonly issues?: readonly object[]; };\n 'gateway/cancelled': {};\n 'gateway/internal': {};\n 'llm/model-discovery-rejected': { readonly settingsNs: string; readonly baseURL?: string; };\n 'session/not-found': { readonly sessionId: SessionId; };\n 'workspace/not-found': { readonly workspaceId: WorkspaceId; };\n 'agent-preset/not-found': { readonly agentPreset: string; readonly available: readonly string[]; };\n 'agent-preset/invalid': { readonly agentPreset: string; readonly reason: string; };\n 'agent-preset/locked': { readonly sessionId: SessionId; readonly agentPreset: string; };\n 'job/not-found': { readonly sessionId: SessionId; readonly jobId: JobId; };\n 'session/provider-credentials-unavailable': Record<string, never>;\n 'session/provider-models-unavailable': { readonly provider: string; };\n 'session/model-unavailable': { readonly provider: string; readonly model: string; };\n 'session/conflict': { readonly sessionId: SessionId; readonly requestedCwd: string; readonly existingCwd?: string; };\n 'session/projections-unavailable': Record<string, never>;\n 'session/writer-held': { readonly sessionId: SessionId; };\n 'session/agent-busy': { readonly reason: string; };\n 'session/invalid-time-zone': { readonly value: string; };\n 'session/workspace-attach-failed': { readonly sessionId: SessionId; readonly workspaceId: string; };\n 'agent-preset/conflict': { readonly sessionId: SessionId; readonly requestedPreset: string;
|
|
2687
|
+
"declaration": "export interface RemoteErrorDetailsMap {\n 'gateway/bad-request': { readonly issues?: readonly object[]; };\n 'gateway/cancelled': {};\n 'gateway/internal': {};\n 'llm/model-discovery-rejected': { readonly settingsNs: string; readonly baseURL?: string; };\n 'session/not-found': { readonly sessionId: SessionId; };\n 'workspace/not-found': { readonly workspaceId: WorkspaceId; };\n 'agent-preset/not-found': { readonly agentPreset: string; readonly available: readonly string[]; };\n 'agent-preset/invalid': { readonly agentPreset: string; readonly reason: string; };\n 'agent-preset/locked': { readonly sessionId: SessionId; readonly agentPreset: string; };\n 'remote-access/denied': RemoteAccessDeniedDetails;\n 'gateway/ambiguous-endpoint': TypertGatewayFaultDetails;\n 'gateway/arguments-invalid': TypertGatewayFaultDetails;\n 'gateway/binding-invalid': TypertGatewayFaultDetails;\n 'gateway/context-failed': TypertGatewayFaultDetails;\n 'gateway/context-not-found': TypertGatewayFaultDetails;\n 'gateway/context-unavailable': TypertGatewayFaultDetails;\n 'gateway/definition-unavailable': TypertGatewayFaultDetails;\n 'gateway/input-invalid': TypertGatewayFaultDetails;\n 'gateway/interactions-forbidden': TypertGatewayFaultDetails;\n 'gateway/invocation-unavailable': TypertGatewayFaultDetails;\n 'gateway/lookup-failed': TypertGatewayFaultDetails;\n 'gateway/lookup-not-found': TypertGatewayFaultDetails;\n 'gateway/lookup-unavailable': TypertGatewayFaultDetails;\n 'gateway/method-unavailable': TypertGatewayFaultDetails;\n 'gateway/peer-disposed': TypertGatewayFaultDetails;\n 'gateway/protocol': TypertGatewayFaultDetails;\n 'gateway/provider-mismatch': TypertGatewayFaultDetails;\n 'gateway/result-invalid': TypertGatewayFaultDetails;\n 'gateway/service-unavailable': TypertGatewayFaultDetails;\n 'gateway/signature-invalid': TypertGatewayFaultDetails;\n 'gateway/uplink-overflow': TypertGatewayFaultDetails;\n 'job/not-found': { readonly sessionId: SessionId; readonly jobId: JobId; };\n 'session/provider-credentials-unavailable': Record<string, never>;\n 'session/provider-models-unavailable': { readonly provider: string; };\n 'session/model-unavailable': { readonly provider: string; readonly model: string; };\n 'session/conflict': { readonly sessionId: SessionId; readonly requestedCwd: string; readonly existingCwd?: string; };\n 'session/projections-unavailable': Record<string, never>;\n 'session/writer-held': { readonly sessionId: SessionId; };\n 'session/agent-busy': { readonly reason: string; };\n 'session/invalid-time-zone': { readonly value: string; };\n 'session/workspace-attach-failed': { readonly sessionId: SessionId; readonly workspaceId: string; };\n 'agent-preset/conflict': { readonly sessionId: SessionId; readonly requestedPreset: string; };\n 'session/attachment-invalid': { readonly reason: string; };\n 'session/queue-item-not-found': { readonly itemId: MessageId; };\n 'session/steer-unavailable': { readonly itemId: MessageId; };\n 'session/title-invalid': { readonly sessionId: SessionId; };\n 'session/fork-unavailable': { readonly sessionId: SessionId; };\n 'session/migration-required': { readonly sessionId: SessionId; };\n 'subagent/not-found': { readonly parentSessionId: SessionId; readonly childSessionId: SessionId; };\n 'subagent/catalog-diagnostic': { readonly parentSessionId: SessionId; readonly childSessionId: SessionId; readonly reason: 'corrupt' | 'unsupported' | 'unavailable'; };\n 'subagent/invalid-time-zone': { readonly value: string; };\n 'subagent/parent-unavailable': { readonly parentSessionId: SessionId; };\n 'subagent/not-resumable': { readonly childSessionId: SessionId; };\n 'subagent/unauthorized': { readonly childSessionId: SessionId; };\n 'subagent/attachment-invalid': { readonly reason: string; };\n 'subagent/delivery-unavailable': { readonly childSessionId: SessionId; };\n 'settings/rejected': { readonly ns: string; };\n 'settings/conflict': { readonly ns: string; readonly expected: number; readonly actual: number; };\n 'credential/rejected': { readonly ref: string; };\n 'terminal/unavailable': Record<string, never>;\n 'terminal/control-unavailable': { readonly reason: 'read-only' | 'not-running'; };\n 'terminal/limit-reached': { readonly limit: number; };\n 'workspace/invalid-path': { readonly path: string; };\n 'workspace/name-conflict': { readonly name: string; };\n 'workspace/session-active': { readonly sessionId: SessionId; readonly activity: readonly SessionActivity[]; };\n 'workspace/move-invalid': { readonly workspaceId: WorkspaceId; readonly sessionId: SessionId; readonly beforeSessionId?: SessionId; };\n 'directory-picker/unavailable': { readonly capability: string; };\n 'directory-picker/unreadable': { readonly path: string; };\n 'directory-picker/exists': { readonly path: string; };\n 'directory-picker/create-failed': { readonly path: string; };\n 'workspace-file/watch-unsupported': { readonly path: string; };\n 'workspace-file/not-found': { readonly path: string; };\n 'workspace-file/outside-workspace': { readonly path: string; };\n 'workspace-file/too-large': { readonly path: string; readonly limit: number; };\n 'workspace-file/not-text': { readonly path: string; };\n 'workspace-file/not-regular-file': { readonly path: string; readonly kind: 'directory' | 'symlink' | 'other'; };\n 'workspace-file/not-directory': { readonly path: string; readonly kind: 'file' | 'symlink' | 'other'; };\n 'speech/invalid-audio': { readonly reason: string; };\n 'speech/transcription-failed': { readonly reason: string; };\n 'cotTranslation/failed': Record<string, never>;\n 'document-render/failed': { readonly reason: OfficeToPdfErrorCode; };\n}"
|
|
2280
2688
|
},
|
|
2281
2689
|
{
|
|
2282
2690
|
"name": "ReplayEnvelope",
|
|
@@ -2396,7 +2804,7 @@ export const TYPERT = {
|
|
|
2396
2804
|
},
|
|
2397
2805
|
{
|
|
2398
2806
|
"name": "SessionEventMap",
|
|
2399
|
-
"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 '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 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'schedule/change': ScheduleChange;\n}"
|
|
2807
|
+
"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}"
|
|
2400
2808
|
},
|
|
2401
2809
|
{
|
|
2402
2810
|
"name": "SessionEventType",
|
|
@@ -2476,7 +2884,7 @@ export const TYPERT = {
|
|
|
2476
2884
|
},
|
|
2477
2885
|
{
|
|
2478
2886
|
"name": "SessionProjectionMap",
|
|
2479
|
-
"declaration": "export interface SessionProjectionMap {\n inbox: InboxWireState;\n workingDirectory: string | null;\n agentPreset: string | null;\n title: string | null;\n todos: TodoItem[] | null;\n sessionListMetadata: SessionListMetadata;\n imageLimits: ImageAttachmentLimits;\n modelSelection: ModelSelectionProjection;\n permissions: PermissionSelection;\n subagentCatalog: SubagentCatalogEntry[];\n subagentTiming: SubagentTimingProjection;\n subagent: SubagentIdentityProjection | null;\n tokenUsage: TokenUsageProjection;\n contextPressure: ContextPressureProjection;\n contextBreakdown: ContextBreakdownProjection;\n userQuestions: UserQuestionProjectionView;\n goal: GoalProjection | null;\n}"
|
|
2887
|
+
"declaration": "export interface SessionProjectionMap {\n inbox: InboxWireState;\n workingDirectory: string | null;\n agentPreset: string | null;\n title: string | null;\n todos: TodoItem[] | null;\n sessionListMetadata: SessionListMetadata;\n imageLimits: ImageAttachmentLimits;\n modelSelection: ModelSelectionProjection;\n permissions: PermissionSelection;\n subagentCatalog: SubagentCatalogEntry[];\n subagentTiming: SubagentTimingProjection;\n subagent: SubagentIdentityProjection | null;\n tokenUsage: TokenUsageProjection;\n contextPressure: ContextPressureProjection;\n contextBreakdown: ContextBreakdownProjection;\n agentTeam: TeamProjection;\n userQuestions: UserQuestionProjectionView;\n goal: GoalProjection | null;\n plan: PlanProjection;\n}"
|
|
2480
2888
|
},
|
|
2481
2889
|
{
|
|
2482
2890
|
"name": "SessionProjectionsRequest",
|
|
@@ -2662,6 +3070,54 @@ export const TYPERT = {
|
|
|
2662
3070
|
"name": "SystemPromptUpdate",
|
|
2663
3071
|
"declaration": "export type SystemPromptUpdate = 'in-history';"
|
|
2664
3072
|
},
|
|
3073
|
+
{
|
|
3074
|
+
"name": "TeamId",
|
|
3075
|
+
"declaration": "export type TeamId = Branded<'TeamId'>;"
|
|
3076
|
+
},
|
|
3077
|
+
{
|
|
3078
|
+
"name": "TeamMemberPhase",
|
|
3079
|
+
"declaration": "export type TeamMemberPhase = 'provisioning' | 'active' | 'failed';"
|
|
3080
|
+
},
|
|
3081
|
+
{
|
|
3082
|
+
"name": "TeamMemberProjection",
|
|
3083
|
+
"declaration": "export interface TeamMemberProjection {\n readonly id: SessionId;\n readonly name: string;\n readonly role: 'lead' | 'teammate';\n readonly phase: TeamMemberPhase;\n readonly error?: string;\n}"
|
|
3084
|
+
},
|
|
3085
|
+
{
|
|
3086
|
+
"name": "TeamMemberSnapshot",
|
|
3087
|
+
"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}"
|
|
3088
|
+
},
|
|
3089
|
+
{
|
|
3090
|
+
"name": "TeamMessageId",
|
|
3091
|
+
"declaration": "export type TeamMessageId = Branded<'TeamMessageId'>;"
|
|
3092
|
+
},
|
|
3093
|
+
{
|
|
3094
|
+
"name": "TeamMessageSnapshot",
|
|
3095
|
+
"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}"
|
|
3096
|
+
},
|
|
3097
|
+
{
|
|
3098
|
+
"name": "TeamMessageSource",
|
|
3099
|
+
"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}"
|
|
3100
|
+
},
|
|
3101
|
+
{
|
|
3102
|
+
"name": "TeamProjection",
|
|
3103
|
+
"declaration": "export interface TeamProjection {\n readonly members: TeamMemberProjection[];\n readonly tasks: TeamTaskView[];\n readonly failure?: string;\n}"
|
|
3104
|
+
},
|
|
3105
|
+
{
|
|
3106
|
+
"name": "TeamTaskId",
|
|
3107
|
+
"declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
|
|
3108
|
+
},
|
|
3109
|
+
{
|
|
3110
|
+
"name": "TeamTaskSnapshot",
|
|
3111
|
+
"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}"
|
|
3112
|
+
},
|
|
3113
|
+
{
|
|
3114
|
+
"name": "TeamTaskStatus",
|
|
3115
|
+
"declaration": "export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed' | 'deleted';"
|
|
3116
|
+
},
|
|
3117
|
+
{
|
|
3118
|
+
"name": "TeamTaskView",
|
|
3119
|
+
"declaration": "export interface TeamTaskView {\n readonly id: TeamTaskId;\n readonly revision: number;\n readonly subject: string;\n readonly description: string;\n readonly status: TeamTaskStatus;\n readonly blockedBy: TeamTaskId[];\n readonly writeScopes: string[];\n readonly ownerName?: string;\n readonly ready: boolean;\n readonly writeScopeWarnings: string[];\n}"
|
|
3120
|
+
},
|
|
2665
3121
|
{
|
|
2666
3122
|
"name": "TextBlock",
|
|
2667
3123
|
"declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
|
|
@@ -2742,6 +3198,18 @@ export const TYPERT = {
|
|
|
2742
3198
|
"name": "UserQuestionState",
|
|
2743
3199
|
"declaration": "export type UserQuestionState = 'open' | 'continued';"
|
|
2744
3200
|
},
|
|
3201
|
+
{
|
|
3202
|
+
"name": "WebhookDeliveryId",
|
|
3203
|
+
"declaration": "export type WebhookDeliveryId = Branded<'WebhookDeliveryId'>;"
|
|
3204
|
+
},
|
|
3205
|
+
{
|
|
3206
|
+
"name": "WebhookRuleId",
|
|
3207
|
+
"declaration": "export type WebhookRuleId = Branded<'WebhookRuleId'>;"
|
|
3208
|
+
},
|
|
3209
|
+
{
|
|
3210
|
+
"name": "WebhookSourceId",
|
|
3211
|
+
"declaration": "export type WebhookSourceId = Branded<'WebhookSourceId'>;"
|
|
3212
|
+
},
|
|
2745
3213
|
{
|
|
2746
3214
|
"name": "WorkspaceId",
|
|
2747
3215
|
"declaration": "export type WorkspaceId = Branded<'WorkspaceId'>;"
|
|
@@ -2789,6 +3257,10 @@ export const TYPERT = {
|
|
|
2789
3257
|
"name": "AgentStatus",
|
|
2790
3258
|
"declaration": "export type AgentStatus = 'idle' | 'running';"
|
|
2791
3259
|
},
|
|
3260
|
+
{
|
|
3261
|
+
"name": "AllowedModelRoute",
|
|
3262
|
+
"declaration": "export interface AllowedModelRoute {\n readonly provider: string;\n readonly model: string;\n}"
|
|
3263
|
+
},
|
|
2792
3264
|
{
|
|
2793
3265
|
"name": "ApprovalOutcome",
|
|
2794
3266
|
"declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
|
|
@@ -2985,6 +3457,30 @@ export const TYPERT = {
|
|
|
2985
3457
|
"name": "InboxTarget",
|
|
2986
3458
|
"declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
|
|
2987
3459
|
},
|
|
3460
|
+
{
|
|
3461
|
+
"name": "JobId",
|
|
3462
|
+
"declaration": "export type JobId = Branded<'JobId'>;"
|
|
3463
|
+
},
|
|
3464
|
+
{
|
|
3465
|
+
"name": "JobOutcome",
|
|
3466
|
+
"declaration": "export interface JobOutcome {\n status: 'completed' | 'killed' | 'failed';\n detail?: string;\n result?: string;\n}"
|
|
3467
|
+
},
|
|
3468
|
+
{
|
|
3469
|
+
"name": "JobRegisteredData",
|
|
3470
|
+
"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}"
|
|
3471
|
+
},
|
|
3472
|
+
{
|
|
3473
|
+
"name": "JobSettleCause",
|
|
3474
|
+
"declaration": "export type JobSettleCause = 'producer' | 'kill' | 'teardown';"
|
|
3475
|
+
},
|
|
3476
|
+
{
|
|
3477
|
+
"name": "JobSettledData",
|
|
3478
|
+
"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}"
|
|
3479
|
+
},
|
|
3480
|
+
{
|
|
3481
|
+
"name": "JobToolCall",
|
|
3482
|
+
"declaration": "export interface JobToolCall {\n readonly callId: SessionEventMap['tool/call']['callId'];\n readonly rootCallId: SessionEventMap['tool/call']['callId'];\n}"
|
|
3483
|
+
},
|
|
2988
3484
|
{
|
|
2989
3485
|
"name": "JsonValue",
|
|
2990
3486
|
"declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
|
|
@@ -3075,7 +3571,7 @@ export const TYPERT = {
|
|
|
3075
3571
|
},
|
|
3076
3572
|
{
|
|
3077
3573
|
"name": "MessageSourceMap",
|
|
3078
|
-
"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 '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; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'cordis-host-runner': { kind: 'cordis-host-runner'; };\n '
|
|
3574
|
+
"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}"
|
|
3079
3575
|
},
|
|
3080
3576
|
{
|
|
3081
3577
|
"name": "ModelMessageSource",
|
|
@@ -3097,6 +3593,14 @@ export const TYPERT = {
|
|
|
3097
3593
|
"name": "OptionalSessionSeq",
|
|
3098
3594
|
"declaration": "export type OptionalSessionSeq = SessionSeq | null;"
|
|
3099
3595
|
},
|
|
3596
|
+
{
|
|
3597
|
+
"name": "Principal",
|
|
3598
|
+
"declaration": "export type Principal = PrincipalMap[keyof PrincipalMap];"
|
|
3599
|
+
},
|
|
3600
|
+
{
|
|
3601
|
+
"name": "PrincipalMap",
|
|
3602
|
+
"declaration": "export interface PrincipalMap {\n owner: { readonly kind: 'owner'; };\n}"
|
|
3603
|
+
},
|
|
3100
3604
|
{
|
|
3101
3605
|
"name": "ProviderRequestId",
|
|
3102
3606
|
"declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
|
|
@@ -3167,7 +3671,7 @@ export const TYPERT = {
|
|
|
3167
3671
|
},
|
|
3168
3672
|
{
|
|
3169
3673
|
"name": "SessionEventMap",
|
|
3170
|
-
"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 '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 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'schedule/change': ScheduleChange;\n}"
|
|
3674
|
+
"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}"
|
|
3171
3675
|
},
|
|
3172
3676
|
{
|
|
3173
3677
|
"name": "SessionEventType",
|
|
@@ -3265,6 +3769,42 @@ export const TYPERT = {
|
|
|
3265
3769
|
"name": "SystemPromptUpdate",
|
|
3266
3770
|
"declaration": "export type SystemPromptUpdate = 'in-history';"
|
|
3267
3771
|
},
|
|
3772
|
+
{
|
|
3773
|
+
"name": "TeamId",
|
|
3774
|
+
"declaration": "export type TeamId = Branded<'TeamId'>;"
|
|
3775
|
+
},
|
|
3776
|
+
{
|
|
3777
|
+
"name": "TeamMemberPhase",
|
|
3778
|
+
"declaration": "export type TeamMemberPhase = 'provisioning' | 'active' | 'failed';"
|
|
3779
|
+
},
|
|
3780
|
+
{
|
|
3781
|
+
"name": "TeamMemberSnapshot",
|
|
3782
|
+
"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}"
|
|
3783
|
+
},
|
|
3784
|
+
{
|
|
3785
|
+
"name": "TeamMessageId",
|
|
3786
|
+
"declaration": "export type TeamMessageId = Branded<'TeamMessageId'>;"
|
|
3787
|
+
},
|
|
3788
|
+
{
|
|
3789
|
+
"name": "TeamMessageSnapshot",
|
|
3790
|
+
"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}"
|
|
3791
|
+
},
|
|
3792
|
+
{
|
|
3793
|
+
"name": "TeamMessageSource",
|
|
3794
|
+
"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}"
|
|
3795
|
+
},
|
|
3796
|
+
{
|
|
3797
|
+
"name": "TeamTaskId",
|
|
3798
|
+
"declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
|
|
3799
|
+
},
|
|
3800
|
+
{
|
|
3801
|
+
"name": "TeamTaskSnapshot",
|
|
3802
|
+
"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}"
|
|
3803
|
+
},
|
|
3804
|
+
{
|
|
3805
|
+
"name": "TeamTaskStatus",
|
|
3806
|
+
"declaration": "export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed' | 'deleted';"
|
|
3807
|
+
},
|
|
3268
3808
|
{
|
|
3269
3809
|
"name": "TextBlock",
|
|
3270
3810
|
"declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
|
|
@@ -3328,6 +3868,18 @@ export const TYPERT = {
|
|
|
3328
3868
|
{
|
|
3329
3869
|
"name": "UserMessage",
|
|
3330
3870
|
"declaration": "export interface UserMessage extends MessageBase {\n readonly role: 'user';\n}"
|
|
3871
|
+
},
|
|
3872
|
+
{
|
|
3873
|
+
"name": "WebhookDeliveryId",
|
|
3874
|
+
"declaration": "export type WebhookDeliveryId = Branded<'WebhookDeliveryId'>;"
|
|
3875
|
+
},
|
|
3876
|
+
{
|
|
3877
|
+
"name": "WebhookRuleId",
|
|
3878
|
+
"declaration": "export type WebhookRuleId = Branded<'WebhookRuleId'>;"
|
|
3879
|
+
},
|
|
3880
|
+
{
|
|
3881
|
+
"name": "WebhookSourceId",
|
|
3882
|
+
"declaration": "export type WebhookSourceId = Branded<'WebhookSourceId'>;"
|
|
3331
3883
|
}
|
|
3332
3884
|
]
|
|
3333
3885
|
},
|