@unieai/rabi-api-session-controller 0.0.0-stage → 0.2.1-rc.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/LICENSE +21 -0
- package/README.md +7 -2
- package/lib/client.js +4325 -0
- package/lib/index.js +3367 -0
- package/lib/typert.host.d.ts +3 -0
- package/lib/typert.host.js +4053 -0
- package/lib/typert.remote-client.d.ts +97 -0
- package/lib/typert.remote-client.js +2013 -0
- package/lib/types/agent.d.ts +198 -0
- package/lib/types/agent.js +609 -0
- package/lib/types/archived-session-gate.d.ts +30 -0
- package/lib/types/archived-session-gate.js +51 -0
- package/lib/types/assistant-stream.d.ts +26 -0
- package/lib/types/assistant-stream.js +82 -0
- package/lib/types/catalog.d.ts +24 -0
- package/lib/types/catalog.js +106 -0
- package/lib/types/client/contract/events.d.ts +102 -0
- package/lib/types/client/contract/events.js +111 -0
- package/lib/types/client/contract/session.d.ts +157 -0
- package/lib/types/client/contract/session.js +1 -0
- package/lib/types/client/contract/sessions.d.ts +161 -0
- package/lib/types/client/contract/sessions.js +1 -0
- package/lib/types/client/contract/snapshot.d.ts +81 -0
- package/lib/types/client/contract/snapshot.js +1 -0
- package/lib/types/client/index.d.ts +39 -0
- package/lib/types/client/index.js +60 -0
- package/lib/types/client/ordered-baseline.d.ts +12 -0
- package/lib/types/client/ordered-baseline.js +40 -0
- package/lib/types/client/scope.d.ts +46 -0
- package/lib/types/client/scope.js +46 -0
- package/lib/types/client/session-wire-event.d.ts +11 -0
- package/lib/types/client/session-wire-event.js +42 -0
- package/lib/types/client/sessions/assistant-stream.d.ts +56 -0
- package/lib/types/client/sessions/assistant-stream.js +182 -0
- package/lib/types/client/sessions/history-records.d.ts +22 -0
- package/lib/types/client/sessions/history-records.js +25 -0
- package/lib/types/client/sessions/lineage.d.ts +40 -0
- package/lib/types/client/sessions/lineage.js +54 -0
- package/lib/types/client/sessions/manager.d.ts +269 -0
- package/lib/types/client/sessions/manager.js +799 -0
- package/lib/types/client/sessions/notifier.d.ts +39 -0
- package/lib/types/client/sessions/notifier.js +97 -0
- package/lib/types/client/sessions/projection-store.d.ts +128 -0
- package/lib/types/client/sessions/projection-store.js +161 -0
- package/lib/types/client/sessions/remotes.d.ts +29 -0
- package/lib/types/client/sessions/remotes.js +7 -0
- package/lib/types/client/sessions/service.d.ts +258 -0
- package/lib/types/client/sessions/service.js +582 -0
- package/lib/types/client/sessions/session.d.ts +287 -0
- package/lib/types/client/sessions/session.js +866 -0
- package/lib/types/client/time-zone.d.ts +8 -0
- package/lib/types/client/time-zone.js +13 -0
- package/lib/types/client/transport.d.ts +77 -0
- package/lib/types/client/transport.js +129 -0
- package/lib/types/commands.d.ts +86 -0
- package/lib/types/commands.js +624 -0
- package/lib/types/control.d.ts +20 -0
- package/lib/types/control.js +106 -0
- package/lib/types/file-references.d.ts +27 -0
- package/lib/types/file-references.js +68 -0
- package/lib/types/history.d.ts +32 -0
- package/lib/types/history.js +441 -0
- package/lib/types/index.d.ts +222 -0
- package/lib/types/index.js +658 -0
- package/lib/types/list.d.ts +50 -0
- package/lib/types/list.js +325 -0
- package/lib/types/media-references.d.ts +16 -0
- package/lib/types/media-references.js +76 -0
- package/lib/types/model-selection-projection.d.ts +8 -0
- package/lib/types/model-selection-projection.js +65 -0
- package/lib/types/remote-events.d.ts +8 -0
- package/lib/types/remote-events.js +1 -0
- package/lib/types/skill-catalog.d.ts +28 -0
- package/lib/types/skill-catalog.js +203 -0
- package/lib/types/types.d.ts +611 -0
- package/lib/types/types.js +4 -0
- package/locale/en.json +5 -0
- package/locale/zh.json +6 -0
- package/package.json +114 -4
|
@@ -0,0 +1,4053 @@
|
|
|
1
|
+
/* Generated by @unieai/rabi-typert-generator from FaceModel — do not edit. */
|
|
2
|
+
import { z } from 'zod'
|
|
3
|
+
|
|
4
|
+
import { createTypertRemoteInfo } from '@unieai/rabi-typert-protocol/remote-info'
|
|
5
|
+
|
|
6
|
+
let _unieai_rabi_api_session_controller_fileReferences_list_parameter_0$schema$value
|
|
7
|
+
const _unieai_rabi_api_session_controller_fileReferences_list_parameter_0$schema = () => (_unieai_rabi_api_session_controller_fileReferences_list_parameter_0$schema$value ??= z.string())
|
|
8
|
+
let _unieai_rabi_api_session_controller_fileReferences_list_parameter_1$schema$value
|
|
9
|
+
const _unieai_rabi_api_session_controller_fileReferences_list_parameter_1$schema = () => (_unieai_rabi_api_session_controller_fileReferences_list_parameter_1$schema$value ??= z.string())
|
|
10
|
+
let _unieai_rabi_api_session_controller_fileReferences_list_result$schema$value
|
|
11
|
+
const _unieai_rabi_api_session_controller_fileReferences_list_result$schema = () => (_unieai_rabi_api_session_controller_fileReferences_list_result$schema$value ??= z.array(z.object({
|
|
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.'),
|
|
14
|
+
})))
|
|
15
|
+
let _unieai_rabi_api_session_controller_session_attachment_parameter_0$schema$value
|
|
16
|
+
const _unieai_rabi_api_session_controller_session_attachment_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_attachment_parameter_0$schema$value ??= z.object({
|
|
17
|
+
'sessionId': z.string().readonly(),
|
|
18
|
+
'attachmentId': z.string().readonly(),
|
|
19
|
+
}))
|
|
20
|
+
let _unieai_rabi_api_session_controller_session_attachment_result$schema$value
|
|
21
|
+
const _unieai_rabi_api_session_controller_session_attachment_result$schema = () => (_unieai_rabi_api_session_controller_session_attachment_result$schema$value ??= z.object({
|
|
22
|
+
'attachment': z.object({
|
|
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.'),
|
|
29
|
+
'originalDimensions': z.object({
|
|
30
|
+
'width': z.number(),
|
|
31
|
+
'height': z.number(),
|
|
32
|
+
}).optional().describe('Input dimensions after applying EXIF orientation and before normalization scaling. Present only when normalization reduced the image.'),
|
|
33
|
+
}).readonly(),
|
|
34
|
+
'data': z.string().readonly(),
|
|
35
|
+
}))
|
|
36
|
+
let _unieai_rabi_api_session_controller_session_cancel_parameter_0$schema$value
|
|
37
|
+
const _unieai_rabi_api_session_controller_session_cancel_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_cancel_parameter_0$schema$value ??= z.object({
|
|
38
|
+
'sessionId': z.string().readonly(),
|
|
39
|
+
}))
|
|
40
|
+
let _unieai_rabi_api_session_controller_session_cancel_result$schema$value
|
|
41
|
+
const _unieai_rabi_api_session_controller_session_cancel_result$schema = () => (_unieai_rabi_api_session_controller_session_cancel_result$schema$value ??= z.object({
|
|
42
|
+
'accepted': z.literal(true).readonly(),
|
|
43
|
+
}))
|
|
44
|
+
let _unieai_rabi_api_session_controller_session_canOpenWorkspacePath_result$schema$value
|
|
45
|
+
const _unieai_rabi_api_session_controller_session_canOpenWorkspacePath_result$schema = () => (_unieai_rabi_api_session_controller_session_canOpenWorkspacePath_result$schema$value ??= z.boolean())
|
|
46
|
+
let _unieai_rabi_api_session_controller_session_control_result$schema$value
|
|
47
|
+
const _unieai_rabi_api_session_controller_session_control_result$schema = () => (_unieai_rabi_api_session_controller_session_control_result$schema$value ??= z.union([z.object({
|
|
48
|
+
'type': z.literal("baseline").readonly(),
|
|
49
|
+
'value': z.object({
|
|
50
|
+
'projections': z.record(z.string(), z.object({
|
|
51
|
+
'asOfSeq': z.number().readonly(),
|
|
52
|
+
'values': z.intersection(z.object({
|
|
53
|
+
'inbox': z.object({
|
|
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.'),
|
|
60
|
+
'todos': z.union([z.literal(null), z.array(z.object({
|
|
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.'),
|
|
64
|
+
'sessionListMetadata': z.object({
|
|
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.'),
|
|
68
|
+
'imageLimits': z.object({
|
|
69
|
+
'maxImageBytes': z.number(),
|
|
70
|
+
'maxImagesPerMessage': z.number(),
|
|
71
|
+
'maxMessageImageBytes': z.number(),
|
|
72
|
+
'maxImagePixels': z.number(),
|
|
73
|
+
'maxImageDimension': z.number().describe('Maximum intrinsic width and maximum intrinsic height in pixels for one image.'),
|
|
74
|
+
'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
|
|
75
|
+
}).optional().describe('Image-intake limits enforced by the Session prompt endpoint.'),
|
|
76
|
+
'modelSelection': z.object({
|
|
77
|
+
'lastUsed': z.union([z.literal(null), z.object({
|
|
78
|
+
'provider': z.string().readonly(),
|
|
79
|
+
'model': z.string().readonly(),
|
|
80
|
+
'reasoningEffort': z.string().readonly().optional(),
|
|
81
|
+
})]).readonly().describe('Selection consumed by the latest recorded model request.'),
|
|
82
|
+
'next': z.union([z.literal(null), z.object({
|
|
83
|
+
'provider': z.string().readonly(),
|
|
84
|
+
'model': z.string().readonly(),
|
|
85
|
+
'reasoningEffort': z.string().readonly().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.'),
|
|
88
|
+
'permissions': z.object({
|
|
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(),
|
|
93
|
+
'createdAt': z.number().readonly(),
|
|
94
|
+
'mode': z.literal("one-shot").readonly(),
|
|
95
|
+
'label': z.string().readonly().optional(),
|
|
96
|
+
}), z.object({
|
|
97
|
+
'id': z.string().readonly(),
|
|
98
|
+
'createdAt': z.number().readonly(),
|
|
99
|
+
'mode': z.literal("external").readonly(),
|
|
100
|
+
'label': z.string().readonly().optional(),
|
|
101
|
+
}), z.object({
|
|
102
|
+
'id': z.string().readonly(),
|
|
103
|
+
'createdAt': z.number().readonly(),
|
|
104
|
+
'mode': z.literal("continuable").readonly(),
|
|
105
|
+
'label': z.string().readonly(),
|
|
106
|
+
}), z.object({
|
|
107
|
+
'id': z.string().readonly(),
|
|
108
|
+
'createdAt': z.number().readonly(),
|
|
109
|
+
'mode': z.literal("unknown").readonly(),
|
|
110
|
+
'label': z.string().readonly().optional(),
|
|
111
|
+
})])).optional().describe('Direct children in parent catalog event order, excluding fork-inherited facts.'),
|
|
112
|
+
'subagentTiming': z.object({
|
|
113
|
+
'settledMs': z.number().describe('Milliseconds accumulated across completed turns after the child\'s own descriptor.'),
|
|
114
|
+
'active': z.object({
|
|
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.'),
|
|
120
|
+
'subagent': z.union([z.literal(null), z.object({
|
|
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.'),
|
|
124
|
+
}), z.object({
|
|
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.'),
|
|
129
|
+
'tokenUsage': z.object({
|
|
130
|
+
'uncachedInputTokens': z.number(),
|
|
131
|
+
'outputTokens': z.number(),
|
|
132
|
+
'cacheReadTokens': z.number(),
|
|
133
|
+
'cacheWriteTokens': z.number(),
|
|
134
|
+
}).optional().describe('Provider-reported usage accumulated across the complete durable log.'),
|
|
135
|
+
'contextPressure': z.object({
|
|
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.'),
|
|
140
|
+
'contextBreakdown': z.object({
|
|
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.'),
|
|
167
|
+
'userQuestions': z.object({
|
|
168
|
+
'active': z.array(z.object({
|
|
169
|
+
'callId': z.string().readonly(),
|
|
170
|
+
'questions': z.array(z.object({
|
|
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.'),
|
|
175
|
+
'options': z.array(z.object({
|
|
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.'),
|
|
180
|
+
'intent': z.object({
|
|
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.'),
|
|
185
|
+
})).readonly(),
|
|
186
|
+
'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
|
|
187
|
+
})).readonly().describe('Calls that can still take an answer, in ask order.'),
|
|
188
|
+
'settled': z.array(z.object({
|
|
189
|
+
'callId': z.string().readonly().describe('The settled call.'),
|
|
190
|
+
'answers': z.array(z.object({
|
|
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.'),
|
|
197
|
+
'goal': z.union([z.literal(null), z.object({
|
|
198
|
+
'goal': z.object({
|
|
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.'),
|
|
201
|
+
'blockedReason': z.object({
|
|
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.'),
|
|
218
|
+
})).readonly().readonly(),
|
|
219
|
+
}).readonly(),
|
|
220
|
+
}), z.object({
|
|
221
|
+
'type': z.literal("projection").readonly(),
|
|
222
|
+
'sessionId': z.string().readonly(),
|
|
223
|
+
'key': z.string().readonly(),
|
|
224
|
+
'value': z.json().readonly(),
|
|
225
|
+
'seq': z.number().readonly(),
|
|
226
|
+
})]))
|
|
227
|
+
let _unieai_rabi_api_session_controller_session_create_parameter_0$schema$value
|
|
228
|
+
const _unieai_rabi_api_session_controller_session_create_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_create_parameter_0$schema$value ??= z.object({
|
|
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.'),
|
|
233
|
+
}))
|
|
234
|
+
let _unieai_rabi_api_session_controller_session_create_result$schema$value
|
|
235
|
+
const _unieai_rabi_api_session_controller_session_create_result$schema = () => (_unieai_rabi_api_session_controller_session_create_result$schema$value ??= z.object({
|
|
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.'),
|
|
238
|
+
}))
|
|
239
|
+
let _unieai_rabi_api_session_controller_session_follow_parameter_0$schema$value
|
|
240
|
+
const _unieai_rabi_api_session_controller_session_follow_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_follow_parameter_0$schema$value ??= z.object({
|
|
241
|
+
'address': z.union([z.object({
|
|
242
|
+
'kind': z.literal("session").readonly(),
|
|
243
|
+
'sessionId': z.string().readonly(),
|
|
244
|
+
}), z.object({
|
|
245
|
+
'kind': z.literal("subagent").readonly(),
|
|
246
|
+
'parentSessionId': z.string().readonly(),
|
|
247
|
+
'childSessionId': z.string().readonly(),
|
|
248
|
+
'mode': z.union([z.literal("one-shot"), z.literal("continuable"), z.literal("unknown")]).readonly(),
|
|
249
|
+
})]).readonly(),
|
|
250
|
+
'assistantStream': z.literal(true).readonly().optional().describe('Include process-local assistant presentation frames for the Web client.'),
|
|
251
|
+
'maxMessages': z.number().readonly().optional(),
|
|
252
|
+
'turnWindow': z.object({
|
|
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.'),
|
|
256
|
+
}))
|
|
257
|
+
let _unieai_rabi_api_session_controller_session_follow_result$schema$value
|
|
258
|
+
const _unieai_rabi_api_session_controller_session_follow_result$schema = () => (_unieai_rabi_api_session_controller_session_follow_result$schema$value ??= z.union([z.object({
|
|
259
|
+
'type': z.literal("event").readonly(),
|
|
260
|
+
'event': z.object({
|
|
261
|
+
'type': z.string().readonly(),
|
|
262
|
+
'seq': z.number().readonly(),
|
|
263
|
+
'time': z.number().readonly(),
|
|
264
|
+
'data': z.json().readonly(),
|
|
265
|
+
'ignorable': z.literal(true).readonly().optional(),
|
|
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.'),
|
|
268
|
+
}).readonly(),
|
|
269
|
+
}), z.object({
|
|
270
|
+
'type': z.literal("snapshot").readonly(),
|
|
271
|
+
'header': z.object({
|
|
272
|
+
'version': z.number().readonly(),
|
|
273
|
+
'id': z.string().readonly(),
|
|
274
|
+
'createdAt': z.number().readonly(),
|
|
275
|
+
'cwd': z.string().readonly().optional(),
|
|
276
|
+
'parentSession': z.string().readonly().optional(),
|
|
277
|
+
'isSeeded': z.boolean().readonly().describe('Whether the Session contains a fork-inherited prefix.'),
|
|
278
|
+
'origin': z.literal("subagent").readonly().optional(),
|
|
279
|
+
'delegationDepth': z.number().readonly().optional(),
|
|
280
|
+
'agentPreset': z.string().readonly().optional(),
|
|
281
|
+
}).readonly(),
|
|
282
|
+
'cursor': z.number().readonly(),
|
|
283
|
+
'records': z.array(z.object({
|
|
284
|
+
'type': z.literal("event").readonly(),
|
|
285
|
+
'event': z.object({
|
|
286
|
+
'type': z.string().readonly(),
|
|
287
|
+
'seq': z.number().readonly(),
|
|
288
|
+
'time': z.number().readonly(),
|
|
289
|
+
'data': z.json().readonly(),
|
|
290
|
+
'ignorable': z.literal(true).readonly().optional(),
|
|
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.'),
|
|
293
|
+
}).readonly(),
|
|
294
|
+
})).readonly(),
|
|
295
|
+
'hasMore': z.boolean().readonly(),
|
|
296
|
+
'projections': z.object({
|
|
297
|
+
'asOfSeq': z.number().readonly(),
|
|
298
|
+
'values': z.intersection(z.object({
|
|
299
|
+
'inbox': z.object({
|
|
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.'),
|
|
306
|
+
'todos': z.union([z.literal(null), z.array(z.object({
|
|
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.'),
|
|
310
|
+
'sessionListMetadata': z.object({
|
|
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.'),
|
|
314
|
+
'imageLimits': z.object({
|
|
315
|
+
'maxImageBytes': z.number(),
|
|
316
|
+
'maxImagesPerMessage': z.number(),
|
|
317
|
+
'maxMessageImageBytes': z.number(),
|
|
318
|
+
'maxImagePixels': z.number(),
|
|
319
|
+
'maxImageDimension': z.number().describe('Maximum intrinsic width and maximum intrinsic height in pixels for one image.'),
|
|
320
|
+
'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
|
|
321
|
+
}).optional().describe('Image-intake limits enforced by the Session prompt endpoint.'),
|
|
322
|
+
'modelSelection': z.object({
|
|
323
|
+
'lastUsed': z.union([z.literal(null), z.object({
|
|
324
|
+
'provider': z.string().readonly(),
|
|
325
|
+
'model': z.string().readonly(),
|
|
326
|
+
'reasoningEffort': z.string().readonly().optional(),
|
|
327
|
+
})]).readonly().describe('Selection consumed by the latest recorded model request.'),
|
|
328
|
+
'next': z.union([z.literal(null), z.object({
|
|
329
|
+
'provider': z.string().readonly(),
|
|
330
|
+
'model': z.string().readonly(),
|
|
331
|
+
'reasoningEffort': z.string().readonly().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.'),
|
|
334
|
+
'permissions': z.object({
|
|
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(),
|
|
339
|
+
'createdAt': z.number().readonly(),
|
|
340
|
+
'mode': z.literal("one-shot").readonly(),
|
|
341
|
+
'label': z.string().readonly().optional(),
|
|
342
|
+
}), z.object({
|
|
343
|
+
'id': z.string().readonly(),
|
|
344
|
+
'createdAt': z.number().readonly(),
|
|
345
|
+
'mode': z.literal("external").readonly(),
|
|
346
|
+
'label': z.string().readonly().optional(),
|
|
347
|
+
}), z.object({
|
|
348
|
+
'id': z.string().readonly(),
|
|
349
|
+
'createdAt': z.number().readonly(),
|
|
350
|
+
'mode': z.literal("continuable").readonly(),
|
|
351
|
+
'label': z.string().readonly(),
|
|
352
|
+
}), z.object({
|
|
353
|
+
'id': z.string().readonly(),
|
|
354
|
+
'createdAt': z.number().readonly(),
|
|
355
|
+
'mode': z.literal("unknown").readonly(),
|
|
356
|
+
'label': z.string().readonly().optional(),
|
|
357
|
+
})])).optional().describe('Direct children in parent catalog event order, excluding fork-inherited facts.'),
|
|
358
|
+
'subagentTiming': z.object({
|
|
359
|
+
'settledMs': z.number().describe('Milliseconds accumulated across completed turns after the child\'s own descriptor.'),
|
|
360
|
+
'active': z.object({
|
|
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.'),
|
|
366
|
+
'subagent': z.union([z.literal(null), z.object({
|
|
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.'),
|
|
370
|
+
}), z.object({
|
|
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.'),
|
|
375
|
+
'tokenUsage': z.object({
|
|
376
|
+
'uncachedInputTokens': z.number(),
|
|
377
|
+
'outputTokens': z.number(),
|
|
378
|
+
'cacheReadTokens': z.number(),
|
|
379
|
+
'cacheWriteTokens': z.number(),
|
|
380
|
+
}).optional().describe('Provider-reported usage accumulated across the complete durable log.'),
|
|
381
|
+
'contextPressure': z.object({
|
|
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.'),
|
|
386
|
+
'contextBreakdown': z.object({
|
|
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.'),
|
|
413
|
+
'userQuestions': z.object({
|
|
414
|
+
'active': z.array(z.object({
|
|
415
|
+
'callId': z.string().readonly(),
|
|
416
|
+
'questions': z.array(z.object({
|
|
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.'),
|
|
421
|
+
'options': z.array(z.object({
|
|
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.'),
|
|
426
|
+
'intent': z.object({
|
|
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.'),
|
|
431
|
+
})).readonly(),
|
|
432
|
+
'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
|
|
433
|
+
})).readonly().describe('Calls that can still take an answer, in ask order.'),
|
|
434
|
+
'settled': z.array(z.object({
|
|
435
|
+
'callId': z.string().readonly().describe('The settled call.'),
|
|
436
|
+
'answers': z.array(z.object({
|
|
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.'),
|
|
443
|
+
'goal': z.union([z.literal(null), z.object({
|
|
444
|
+
'goal': z.object({
|
|
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.'),
|
|
447
|
+
'blockedReason': z.object({
|
|
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.'),
|
|
464
|
+
}).readonly(),
|
|
465
|
+
'assistantStream': z.object({
|
|
466
|
+
'revision': z.number().readonly(),
|
|
467
|
+
'activeAttempt': z.object({
|
|
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.'),
|
|
470
|
+
'turn': z.number().readonly(),
|
|
471
|
+
'step': z.number().readonly(),
|
|
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.'),
|
|
474
|
+
}).readonly().optional(),
|
|
475
|
+
}).readonly().optional(),
|
|
476
|
+
}), z.object({
|
|
477
|
+
'type': z.literal("assistant-stream").readonly(),
|
|
478
|
+
'frame': z.union([z.object({
|
|
479
|
+
'type': z.literal("start").readonly(),
|
|
480
|
+
'attemptId': z.string().readonly(),
|
|
481
|
+
'revision': z.number().readonly(),
|
|
482
|
+
'startedAfterSeq': z.union([z.number(), z.literal(-1)]).readonly(),
|
|
483
|
+
'turn': z.number().readonly(),
|
|
484
|
+
'step': z.number().readonly(),
|
|
485
|
+
}), z.object({
|
|
486
|
+
'type': z.literal("chunk").readonly(),
|
|
487
|
+
'attemptId': z.string().readonly(),
|
|
488
|
+
'revision': z.number().readonly(),
|
|
489
|
+
'index': z.number().readonly(),
|
|
490
|
+
'time': z.number().readonly(),
|
|
491
|
+
'chunk': z.json().readonly(),
|
|
492
|
+
}), z.object({
|
|
493
|
+
'type': z.literal("end").readonly(),
|
|
494
|
+
'attemptId': z.string().readonly(),
|
|
495
|
+
'revision': z.number().readonly(),
|
|
496
|
+
'index': z.number().readonly().describe('Number of chunk frames represented by this terminal marker.'),
|
|
497
|
+
'outcome': z.union([z.object({
|
|
498
|
+
'kind': z.literal("committed").readonly(),
|
|
499
|
+
'eventType': z.union([z.literal("assistant/message"), z.literal("assistant/attempt")]).readonly(),
|
|
500
|
+
'seq': z.number().readonly(),
|
|
501
|
+
}), z.object({
|
|
502
|
+
'kind': z.literal("abandoned").readonly(),
|
|
503
|
+
})]).readonly(),
|
|
504
|
+
})]).readonly(),
|
|
505
|
+
})]))
|
|
506
|
+
let _unieai_rabi_api_session_controller_session_fork_parameter_0$schema$value
|
|
507
|
+
const _unieai_rabi_api_session_controller_session_fork_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_fork_parameter_0$schema$value ??= z.object({
|
|
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.'),
|
|
511
|
+
}))
|
|
512
|
+
let _unieai_rabi_api_session_controller_session_fork_result$schema$value
|
|
513
|
+
const _unieai_rabi_api_session_controller_session_fork_result$schema = () => (_unieai_rabi_api_session_controller_session_fork_result$schema$value ??= z.object({
|
|
514
|
+
'sessionId': z.string().readonly(),
|
|
515
|
+
}))
|
|
516
|
+
let _unieai_rabi_api_session_controller_session_initializeDefaultModel_result$schema$value
|
|
517
|
+
const _unieai_rabi_api_session_controller_session_initializeDefaultModel_result$schema = () => (_unieai_rabi_api_session_controller_session_initializeDefaultModel_result$schema$value ??= z.void())
|
|
518
|
+
let _unieai_rabi_api_session_controller_session_list_parameter_0$schema$value
|
|
519
|
+
const _unieai_rabi_api_session_controller_session_list_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_list_parameter_0$schema$value ??= z.object({
|
|
520
|
+
'cursor': z.string().readonly().optional(),
|
|
521
|
+
}))
|
|
522
|
+
let _unieai_rabi_api_session_controller_session_list_result$schema$value
|
|
523
|
+
const _unieai_rabi_api_session_controller_session_list_result$schema = () => (_unieai_rabi_api_session_controller_session_list_result$schema$value ??= z.object({
|
|
524
|
+
'items': z.array(z.object({
|
|
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(),
|
|
528
|
+
'updatedAt': z.number().readonly(),
|
|
529
|
+
'running': z.boolean().readonly(),
|
|
530
|
+
'blank': z.boolean().readonly(),
|
|
531
|
+
'parentSessionId': z.string().readonly().optional(),
|
|
532
|
+
'origin': z.literal("subagent").readonly().optional(),
|
|
533
|
+
'cwd': z.string().readonly().optional(),
|
|
534
|
+
'projections': z.object({
|
|
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`.'),
|
|
537
|
+
'values': z.intersection(z.object({
|
|
538
|
+
'inbox': z.object({
|
|
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.'),
|
|
545
|
+
'todos': z.union([z.literal(null), z.array(z.object({
|
|
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.'),
|
|
549
|
+
'sessionListMetadata': z.object({
|
|
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.'),
|
|
553
|
+
'imageLimits': z.object({
|
|
554
|
+
'maxImageBytes': z.number(),
|
|
555
|
+
'maxImagesPerMessage': z.number(),
|
|
556
|
+
'maxMessageImageBytes': z.number(),
|
|
557
|
+
'maxImagePixels': z.number(),
|
|
558
|
+
'maxImageDimension': z.number().describe('Maximum intrinsic width and maximum intrinsic height in pixels for one image.'),
|
|
559
|
+
'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
|
|
560
|
+
}).optional().describe('Image-intake limits enforced by the Session prompt endpoint.'),
|
|
561
|
+
'modelSelection': z.object({
|
|
562
|
+
'lastUsed': z.union([z.literal(null), z.object({
|
|
563
|
+
'provider': z.string().readonly(),
|
|
564
|
+
'model': z.string().readonly(),
|
|
565
|
+
'reasoningEffort': z.string().readonly().optional(),
|
|
566
|
+
})]).readonly().describe('Selection consumed by the latest recorded model request.'),
|
|
567
|
+
'next': z.union([z.literal(null), z.object({
|
|
568
|
+
'provider': z.string().readonly(),
|
|
569
|
+
'model': z.string().readonly(),
|
|
570
|
+
'reasoningEffort': z.string().readonly().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.'),
|
|
573
|
+
'permissions': z.object({
|
|
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(),
|
|
578
|
+
'createdAt': z.number().readonly(),
|
|
579
|
+
'mode': z.literal("one-shot").readonly(),
|
|
580
|
+
'label': z.string().readonly().optional(),
|
|
581
|
+
}), z.object({
|
|
582
|
+
'id': z.string().readonly(),
|
|
583
|
+
'createdAt': z.number().readonly(),
|
|
584
|
+
'mode': z.literal("external").readonly(),
|
|
585
|
+
'label': z.string().readonly().optional(),
|
|
586
|
+
}), z.object({
|
|
587
|
+
'id': z.string().readonly(),
|
|
588
|
+
'createdAt': z.number().readonly(),
|
|
589
|
+
'mode': z.literal("continuable").readonly(),
|
|
590
|
+
'label': z.string().readonly(),
|
|
591
|
+
}), z.object({
|
|
592
|
+
'id': z.string().readonly(),
|
|
593
|
+
'createdAt': z.number().readonly(),
|
|
594
|
+
'mode': z.literal("unknown").readonly(),
|
|
595
|
+
'label': z.string().readonly().optional(),
|
|
596
|
+
})])).optional().describe('Direct children in parent catalog event order, excluding fork-inherited facts.'),
|
|
597
|
+
'subagentTiming': z.object({
|
|
598
|
+
'settledMs': z.number().describe('Milliseconds accumulated across completed turns after the child\'s own descriptor.'),
|
|
599
|
+
'active': z.object({
|
|
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.'),
|
|
605
|
+
'subagent': z.union([z.literal(null), z.object({
|
|
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.'),
|
|
609
|
+
}), z.object({
|
|
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.'),
|
|
614
|
+
'tokenUsage': z.object({
|
|
615
|
+
'uncachedInputTokens': z.number(),
|
|
616
|
+
'outputTokens': z.number(),
|
|
617
|
+
'cacheReadTokens': z.number(),
|
|
618
|
+
'cacheWriteTokens': z.number(),
|
|
619
|
+
}).optional().describe('Provider-reported usage accumulated across the complete durable log.'),
|
|
620
|
+
'contextPressure': z.object({
|
|
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.'),
|
|
625
|
+
'contextBreakdown': z.object({
|
|
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.'),
|
|
652
|
+
'userQuestions': z.object({
|
|
653
|
+
'active': z.array(z.object({
|
|
654
|
+
'callId': z.string().readonly(),
|
|
655
|
+
'questions': z.array(z.object({
|
|
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.'),
|
|
660
|
+
'options': z.array(z.object({
|
|
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.'),
|
|
665
|
+
'intent': z.object({
|
|
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.'),
|
|
670
|
+
})).readonly(),
|
|
671
|
+
'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
|
|
672
|
+
})).readonly().describe('Calls that can still take an answer, in ask order.'),
|
|
673
|
+
'settled': z.array(z.object({
|
|
674
|
+
'callId': z.string().readonly().describe('The settled call.'),
|
|
675
|
+
'answers': z.array(z.object({
|
|
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.'),
|
|
682
|
+
'goal': z.union([z.literal(null), z.object({
|
|
683
|
+
'goal': z.object({
|
|
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.'),
|
|
686
|
+
'blockedReason': z.object({
|
|
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.'),
|
|
703
|
+
}).readonly().optional(),
|
|
704
|
+
})).readonly(),
|
|
705
|
+
}))
|
|
706
|
+
let _unieai_rabi_api_session_controller_session_modelCatalog_result$schema$value
|
|
707
|
+
const _unieai_rabi_api_session_controller_session_modelCatalog_result$schema = () => (_unieai_rabi_api_session_controller_session_modelCatalog_result$schema$value ??= z.object({
|
|
708
|
+
'default': z.object({
|
|
709
|
+
'provider': z.string().readonly(),
|
|
710
|
+
'model': z.string().readonly(),
|
|
711
|
+
'reasoningEffort': z.string().readonly().optional(),
|
|
712
|
+
}).readonly(),
|
|
713
|
+
'routableProviders': z.array(z.string()).readonly().describe('Provider routes with at least one currently available catalog model.'),
|
|
714
|
+
'groups': z.array(z.object({
|
|
715
|
+
'id': z.string().readonly(),
|
|
716
|
+
'name': z.string().readonly(),
|
|
717
|
+
'models': z.array(z.object({
|
|
718
|
+
'id': z.string().readonly(),
|
|
719
|
+
'name': z.string().readonly(),
|
|
720
|
+
'description': z.string().readonly().optional(),
|
|
721
|
+
'reasoning': z.object({
|
|
722
|
+
'efforts': z.array(z.object({
|
|
723
|
+
'id': z.string().readonly(),
|
|
724
|
+
'name': z.string().readonly(),
|
|
725
|
+
'description': z.string().readonly().optional(),
|
|
726
|
+
})).readonly(),
|
|
727
|
+
'defaultEffort': z.string().readonly().optional(),
|
|
728
|
+
}).readonly().optional(),
|
|
729
|
+
})).readonly(),
|
|
730
|
+
})).readonly(),
|
|
731
|
+
'failures': z.array(z.object({
|
|
732
|
+
'id': z.string().readonly(),
|
|
733
|
+
'name': z.string().readonly(),
|
|
734
|
+
'message': z.string().readonly(),
|
|
735
|
+
})).readonly(),
|
|
736
|
+
}))
|
|
737
|
+
let _unieai_rabi_api_session_controller_session_openWorkspacePath_parameter_0$schema$value
|
|
738
|
+
const _unieai_rabi_api_session_controller_session_openWorkspacePath_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_openWorkspacePath_parameter_0$schema$value ??= z.object({
|
|
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.'),
|
|
742
|
+
}))
|
|
743
|
+
let _unieai_rabi_api_session_controller_session_openWorkspacePath_result$schema$value
|
|
744
|
+
const _unieai_rabi_api_session_controller_session_openWorkspacePath_result$schema = () => (_unieai_rabi_api_session_controller_session_openWorkspacePath_result$schema$value ??= z.object({
|
|
745
|
+
'opened': z.literal(true).readonly(),
|
|
746
|
+
}))
|
|
747
|
+
let _unieai_rabi_api_session_controller_session_page_parameter_0$schema$value
|
|
748
|
+
const _unieai_rabi_api_session_controller_session_page_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_page_parameter_0$schema$value ??= z.object({
|
|
749
|
+
'address': z.union([z.object({
|
|
750
|
+
'kind': z.literal("session").readonly(),
|
|
751
|
+
'sessionId': z.string().readonly(),
|
|
752
|
+
}), z.object({
|
|
753
|
+
'kind': z.literal("subagent").readonly(),
|
|
754
|
+
'parentSessionId': z.string().readonly(),
|
|
755
|
+
'childSessionId': z.string().readonly(),
|
|
756
|
+
'mode': z.union([z.literal("one-shot"), z.literal("continuable"), z.literal("unknown")]).readonly(),
|
|
757
|
+
})]).readonly(),
|
|
758
|
+
'throughSeq': z.number().readonly().describe('Inclusive log cut obtained from the corresponding follow opening frame.'),
|
|
759
|
+
'beforeSeq': z.number().readonly().optional(),
|
|
760
|
+
'maxMessages': z.number().readonly().optional(),
|
|
761
|
+
'turnWindow': z.object({
|
|
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.'),
|
|
765
|
+
}))
|
|
766
|
+
let _unieai_rabi_api_session_controller_session_page_result$schema$value
|
|
767
|
+
const _unieai_rabi_api_session_controller_session_page_result$schema = () => (_unieai_rabi_api_session_controller_session_page_result$schema$value ??= z.object({
|
|
768
|
+
'records': z.array(z.object({
|
|
769
|
+
'type': z.literal("event").readonly(),
|
|
770
|
+
'event': z.object({
|
|
771
|
+
'type': z.string().readonly(),
|
|
772
|
+
'seq': z.number().readonly(),
|
|
773
|
+
'time': z.number().readonly(),
|
|
774
|
+
'data': z.json().readonly(),
|
|
775
|
+
'ignorable': z.literal(true).readonly().optional(),
|
|
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.'),
|
|
778
|
+
}).readonly(),
|
|
779
|
+
})).readonly(),
|
|
780
|
+
'hasMore': z.boolean().readonly(),
|
|
781
|
+
}))
|
|
782
|
+
let _unieai_rabi_api_session_controller_session_projections_parameter_0$schema$value
|
|
783
|
+
const _unieai_rabi_api_session_controller_session_projections_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_projections_parameter_0$schema$value ??= z.object({
|
|
784
|
+
'sessionId': z.string().readonly(),
|
|
785
|
+
}))
|
|
786
|
+
let _unieai_rabi_api_session_controller_session_projections_result$schema$value
|
|
787
|
+
const _unieai_rabi_api_session_controller_session_projections_result$schema = () => (_unieai_rabi_api_session_controller_session_projections_result$schema$value ??= z.union([z.literal(null), z.object({
|
|
788
|
+
'asOfSeq': z.number().readonly(),
|
|
789
|
+
'values': z.intersection(z.object({
|
|
790
|
+
'inbox': z.object({
|
|
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.'),
|
|
797
|
+
'todos': z.union([z.literal(null), z.array(z.object({
|
|
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.'),
|
|
801
|
+
'sessionListMetadata': z.object({
|
|
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.'),
|
|
805
|
+
'imageLimits': z.object({
|
|
806
|
+
'maxImageBytes': z.number(),
|
|
807
|
+
'maxImagesPerMessage': z.number(),
|
|
808
|
+
'maxMessageImageBytes': z.number(),
|
|
809
|
+
'maxImagePixels': z.number(),
|
|
810
|
+
'maxImageDimension': z.number().describe('Maximum intrinsic width and maximum intrinsic height in pixels for one image.'),
|
|
811
|
+
'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
|
|
812
|
+
}).optional().describe('Image-intake limits enforced by the Session prompt endpoint.'),
|
|
813
|
+
'modelSelection': z.object({
|
|
814
|
+
'lastUsed': z.union([z.literal(null), z.object({
|
|
815
|
+
'provider': z.string().readonly(),
|
|
816
|
+
'model': z.string().readonly(),
|
|
817
|
+
'reasoningEffort': z.string().readonly().optional(),
|
|
818
|
+
})]).readonly().describe('Selection consumed by the latest recorded model request.'),
|
|
819
|
+
'next': z.union([z.literal(null), z.object({
|
|
820
|
+
'provider': z.string().readonly(),
|
|
821
|
+
'model': z.string().readonly(),
|
|
822
|
+
'reasoningEffort': z.string().readonly().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.'),
|
|
825
|
+
'permissions': z.object({
|
|
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(),
|
|
830
|
+
'createdAt': z.number().readonly(),
|
|
831
|
+
'mode': z.literal("one-shot").readonly(),
|
|
832
|
+
'label': z.string().readonly().optional(),
|
|
833
|
+
}), z.object({
|
|
834
|
+
'id': z.string().readonly(),
|
|
835
|
+
'createdAt': z.number().readonly(),
|
|
836
|
+
'mode': z.literal("external").readonly(),
|
|
837
|
+
'label': z.string().readonly().optional(),
|
|
838
|
+
}), z.object({
|
|
839
|
+
'id': z.string().readonly(),
|
|
840
|
+
'createdAt': z.number().readonly(),
|
|
841
|
+
'mode': z.literal("continuable").readonly(),
|
|
842
|
+
'label': z.string().readonly(),
|
|
843
|
+
}), z.object({
|
|
844
|
+
'id': z.string().readonly(),
|
|
845
|
+
'createdAt': z.number().readonly(),
|
|
846
|
+
'mode': z.literal("unknown").readonly(),
|
|
847
|
+
'label': z.string().readonly().optional(),
|
|
848
|
+
})])).optional().describe('Direct children in parent catalog event order, excluding fork-inherited facts.'),
|
|
849
|
+
'subagentTiming': z.object({
|
|
850
|
+
'settledMs': z.number().describe('Milliseconds accumulated across completed turns after the child\'s own descriptor.'),
|
|
851
|
+
'active': z.object({
|
|
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.'),
|
|
857
|
+
'subagent': z.union([z.literal(null), z.object({
|
|
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.'),
|
|
861
|
+
}), z.object({
|
|
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.'),
|
|
866
|
+
'tokenUsage': z.object({
|
|
867
|
+
'uncachedInputTokens': z.number(),
|
|
868
|
+
'outputTokens': z.number(),
|
|
869
|
+
'cacheReadTokens': z.number(),
|
|
870
|
+
'cacheWriteTokens': z.number(),
|
|
871
|
+
}).optional().describe('Provider-reported usage accumulated across the complete durable log.'),
|
|
872
|
+
'contextPressure': z.object({
|
|
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.'),
|
|
877
|
+
'contextBreakdown': z.object({
|
|
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.'),
|
|
904
|
+
'userQuestions': z.object({
|
|
905
|
+
'active': z.array(z.object({
|
|
906
|
+
'callId': z.string().readonly(),
|
|
907
|
+
'questions': z.array(z.object({
|
|
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.'),
|
|
912
|
+
'options': z.array(z.object({
|
|
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.'),
|
|
917
|
+
'intent': z.object({
|
|
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.'),
|
|
922
|
+
})).readonly(),
|
|
923
|
+
'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
|
|
924
|
+
})).readonly().describe('Calls that can still take an answer, in ask order.'),
|
|
925
|
+
'settled': z.array(z.object({
|
|
926
|
+
'callId': z.string().readonly().describe('The settled call.'),
|
|
927
|
+
'answers': z.array(z.object({
|
|
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.'),
|
|
934
|
+
'goal': z.union([z.literal(null), z.object({
|
|
935
|
+
'goal': z.object({
|
|
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.'),
|
|
938
|
+
'blockedReason': z.object({
|
|
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.'),
|
|
955
|
+
'kind': z.literal("sequenced").readonly(),
|
|
956
|
+
}), z.object({
|
|
957
|
+
'kind': z.literal("migration-required").readonly(),
|
|
958
|
+
'values': z.intersection(z.object({
|
|
959
|
+
'inbox': z.object({
|
|
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.'),
|
|
966
|
+
'todos': z.union([z.literal(null), z.array(z.object({
|
|
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.'),
|
|
970
|
+
'sessionListMetadata': z.object({
|
|
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.'),
|
|
974
|
+
'imageLimits': z.object({
|
|
975
|
+
'maxImageBytes': z.number(),
|
|
976
|
+
'maxImagesPerMessage': z.number(),
|
|
977
|
+
'maxMessageImageBytes': z.number(),
|
|
978
|
+
'maxImagePixels': z.number(),
|
|
979
|
+
'maxImageDimension': z.number().describe('Maximum intrinsic width and maximum intrinsic height in pixels for one image.'),
|
|
980
|
+
'mediaTypes': z.array(z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")])),
|
|
981
|
+
}).optional().describe('Image-intake limits enforced by the Session prompt endpoint.'),
|
|
982
|
+
'modelSelection': z.object({
|
|
983
|
+
'lastUsed': z.union([z.literal(null), z.object({
|
|
984
|
+
'provider': z.string().readonly(),
|
|
985
|
+
'model': z.string().readonly(),
|
|
986
|
+
'reasoningEffort': z.string().readonly().optional(),
|
|
987
|
+
})]).readonly().describe('Selection consumed by the latest recorded model request.'),
|
|
988
|
+
'next': z.union([z.literal(null), z.object({
|
|
989
|
+
'provider': z.string().readonly(),
|
|
990
|
+
'model': z.string().readonly(),
|
|
991
|
+
'reasoningEffort': z.string().readonly().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.'),
|
|
994
|
+
'permissions': z.object({
|
|
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(),
|
|
999
|
+
'createdAt': z.number().readonly(),
|
|
1000
|
+
'mode': z.literal("one-shot").readonly(),
|
|
1001
|
+
'label': z.string().readonly().optional(),
|
|
1002
|
+
}), z.object({
|
|
1003
|
+
'id': z.string().readonly(),
|
|
1004
|
+
'createdAt': z.number().readonly(),
|
|
1005
|
+
'mode': z.literal("external").readonly(),
|
|
1006
|
+
'label': z.string().readonly().optional(),
|
|
1007
|
+
}), z.object({
|
|
1008
|
+
'id': z.string().readonly(),
|
|
1009
|
+
'createdAt': z.number().readonly(),
|
|
1010
|
+
'mode': z.literal("continuable").readonly(),
|
|
1011
|
+
'label': z.string().readonly(),
|
|
1012
|
+
}), z.object({
|
|
1013
|
+
'id': z.string().readonly(),
|
|
1014
|
+
'createdAt': z.number().readonly(),
|
|
1015
|
+
'mode': z.literal("unknown").readonly(),
|
|
1016
|
+
'label': z.string().readonly().optional(),
|
|
1017
|
+
})])).optional().describe('Direct children in parent catalog event order, excluding fork-inherited facts.'),
|
|
1018
|
+
'subagentTiming': z.object({
|
|
1019
|
+
'settledMs': z.number().describe('Milliseconds accumulated across completed turns after the child\'s own descriptor.'),
|
|
1020
|
+
'active': z.object({
|
|
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.'),
|
|
1026
|
+
'subagent': z.union([z.literal(null), z.object({
|
|
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.'),
|
|
1030
|
+
}), z.object({
|
|
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.'),
|
|
1035
|
+
'tokenUsage': z.object({
|
|
1036
|
+
'uncachedInputTokens': z.number(),
|
|
1037
|
+
'outputTokens': z.number(),
|
|
1038
|
+
'cacheReadTokens': z.number(),
|
|
1039
|
+
'cacheWriteTokens': z.number(),
|
|
1040
|
+
}).optional().describe('Provider-reported usage accumulated across the complete durable log.'),
|
|
1041
|
+
'contextPressure': z.object({
|
|
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.'),
|
|
1046
|
+
'contextBreakdown': z.object({
|
|
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.'),
|
|
1073
|
+
'userQuestions': z.object({
|
|
1074
|
+
'active': z.array(z.object({
|
|
1075
|
+
'callId': z.string().readonly(),
|
|
1076
|
+
'questions': z.array(z.object({
|
|
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.'),
|
|
1081
|
+
'options': z.array(z.object({
|
|
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.'),
|
|
1086
|
+
'intent': z.object({
|
|
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.'),
|
|
1091
|
+
})).readonly(),
|
|
1092
|
+
'state': z.union([z.literal("open"), z.literal("continued")]).readonly(),
|
|
1093
|
+
})).readonly().describe('Calls that can still take an answer, in ask order.'),
|
|
1094
|
+
'settled': z.array(z.object({
|
|
1095
|
+
'callId': z.string().readonly().describe('The settled call.'),
|
|
1096
|
+
'answers': z.array(z.object({
|
|
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.'),
|
|
1103
|
+
'goal': z.union([z.literal(null), z.object({
|
|
1104
|
+
'goal': z.object({
|
|
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.'),
|
|
1107
|
+
'blockedReason': z.object({
|
|
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(),
|
|
1124
|
+
})]))
|
|
1125
|
+
let _unieai_rabi_api_session_controller_session_prompt_parameter_0$schema$value
|
|
1126
|
+
const _unieai_rabi_api_session_controller_session_prompt_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_prompt_parameter_0$schema$value ??= z.object({
|
|
1127
|
+
'requestId': z.string().readonly().describe('Client-minted identity persisted on the exact accepted user message.'),
|
|
1128
|
+
'sessionId': z.string().readonly(),
|
|
1129
|
+
'mode': z.union([z.literal("queue"), z.literal("steer")]).readonly(),
|
|
1130
|
+
'content': z.array(z.union([z.object({
|
|
1131
|
+
'type': z.literal("text").readonly(),
|
|
1132
|
+
'text': z.string().readonly(),
|
|
1133
|
+
}), z.object({
|
|
1134
|
+
'type': z.literal("image").readonly(),
|
|
1135
|
+
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]).readonly(),
|
|
1136
|
+
'data': z.string().readonly(),
|
|
1137
|
+
'name': z.string().readonly().optional(),
|
|
1138
|
+
}), z.object({
|
|
1139
|
+
'type': z.literal("file").readonly(),
|
|
1140
|
+
'receiptId': z.string().readonly(),
|
|
1141
|
+
})])).readonly().describe('At least one non-whitespace text part or attachment.'),
|
|
1142
|
+
'clientTimeZone': z.string().readonly().optional(),
|
|
1143
|
+
}))
|
|
1144
|
+
let _unieai_rabi_api_session_controller_session_prompt_result$schema$value
|
|
1145
|
+
const _unieai_rabi_api_session_controller_session_prompt_result$schema = () => (_unieai_rabi_api_session_controller_session_prompt_result$schema$value ??= z.object({
|
|
1146
|
+
'accepted': z.literal(true).readonly(),
|
|
1147
|
+
}))
|
|
1148
|
+
let _unieai_rabi_api_session_controller_session_rename_parameter_0$schema$value
|
|
1149
|
+
const _unieai_rabi_api_session_controller_session_rename_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_rename_parameter_0$schema$value ??= z.object({
|
|
1150
|
+
'sessionId': z.string().readonly(),
|
|
1151
|
+
'title': z.string().readonly(),
|
|
1152
|
+
}))
|
|
1153
|
+
let _unieai_rabi_api_session_controller_session_rename_result$schema$value
|
|
1154
|
+
const _unieai_rabi_api_session_controller_session_rename_result$schema = () => (_unieai_rabi_api_session_controller_session_rename_result$schema$value ??= z.object({
|
|
1155
|
+
'title': z.string().readonly(),
|
|
1156
|
+
'seq': z.number().readonly(),
|
|
1157
|
+
}))
|
|
1158
|
+
let _unieai_rabi_api_session_controller_session_search_parameter_0$schema$value
|
|
1159
|
+
const _unieai_rabi_api_session_controller_session_search_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_search_parameter_0$schema$value ??= z.object({
|
|
1160
|
+
'query': z.string().readonly(),
|
|
1161
|
+
}))
|
|
1162
|
+
let _unieai_rabi_api_session_controller_session_search_result$schema$value
|
|
1163
|
+
const _unieai_rabi_api_session_controller_session_search_result$schema = () => (_unieai_rabi_api_session_controller_session_search_result$schema$value ??= z.object({
|
|
1164
|
+
'items': z.array(z.object({
|
|
1165
|
+
'sessionId': z.string().readonly(),
|
|
1166
|
+
'snippet': z.string().readonly(),
|
|
1167
|
+
})).readonly(),
|
|
1168
|
+
'hasMore': z.boolean().readonly(),
|
|
1169
|
+
}))
|
|
1170
|
+
let _unieai_rabi_api_session_controller_session_selectModel_parameter_0$schema$value
|
|
1171
|
+
const _unieai_rabi_api_session_controller_session_selectModel_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_selectModel_parameter_0$schema$value ??= z.object({
|
|
1172
|
+
'sessionId': z.string().readonly(),
|
|
1173
|
+
'provider': z.string().readonly(),
|
|
1174
|
+
'model': z.string().readonly(),
|
|
1175
|
+
'reasoningEffort': z.string().readonly().optional(),
|
|
1176
|
+
}))
|
|
1177
|
+
let _unieai_rabi_api_session_controller_session_selectModel_result$schema$value
|
|
1178
|
+
const _unieai_rabi_api_session_controller_session_selectModel_result$schema = () => (_unieai_rabi_api_session_controller_session_selectModel_result$schema$value ??= z.object({
|
|
1179
|
+
'selected': z.object({
|
|
1180
|
+
'provider': z.string().readonly(),
|
|
1181
|
+
'model': z.string().readonly(),
|
|
1182
|
+
'reasoningEffort': z.string().readonly().optional(),
|
|
1183
|
+
}).readonly(),
|
|
1184
|
+
}))
|
|
1185
|
+
let _unieai_rabi_api_session_controller_session_updateQueue_parameter_0$schema$value
|
|
1186
|
+
const _unieai_rabi_api_session_controller_session_updateQueue_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_updateQueue_parameter_0$schema$value ??= z.object({
|
|
1187
|
+
'sessionId': z.string().readonly(),
|
|
1188
|
+
'itemId': z.string().readonly(),
|
|
1189
|
+
'action': z.union([z.object({
|
|
1190
|
+
'kind': z.literal("edit").readonly(),
|
|
1191
|
+
'content': z.array(z.object({
|
|
1192
|
+
'type': z.literal("text"),
|
|
1193
|
+
'text': z.string(),
|
|
1194
|
+
})).readonly().describe('Non-empty text-only replacement content.'),
|
|
1195
|
+
}), z.object({
|
|
1196
|
+
'kind': z.literal("remove").readonly(),
|
|
1197
|
+
}), z.object({
|
|
1198
|
+
'kind': z.literal("steer").readonly(),
|
|
1199
|
+
})]).readonly(),
|
|
1200
|
+
}))
|
|
1201
|
+
let _unieai_rabi_api_session_controller_session_updateQueue_result$schema$value
|
|
1202
|
+
const _unieai_rabi_api_session_controller_session_updateQueue_result$schema = () => (_unieai_rabi_api_session_controller_session_updateQueue_result$schema$value ??= z.object({
|
|
1203
|
+
'accepted': z.literal(true).readonly(),
|
|
1204
|
+
}))
|
|
1205
|
+
let _unieai_rabi_api_session_controller_session_workspacePathApplications_parameter_0$schema$value
|
|
1206
|
+
const _unieai_rabi_api_session_controller_session_workspacePathApplications_parameter_0$schema = () => (_unieai_rabi_api_session_controller_session_workspacePathApplications_parameter_0$schema$value ??= z.object({
|
|
1207
|
+
'path': z.string().readonly(),
|
|
1208
|
+
}))
|
|
1209
|
+
let _unieai_rabi_api_session_controller_session_workspacePathApplications_result$schema$value
|
|
1210
|
+
const _unieai_rabi_api_session_controller_session_workspacePathApplications_result$schema = () => (_unieai_rabi_api_session_controller_session_workspacePathApplications_result$schema$value ??= z.array(z.object({
|
|
1211
|
+
'id': z.string().readonly().describe('OS application identifier; callers must revalidate it against the file\'s current handlers before opening.'),
|
|
1212
|
+
'name': z.string().readonly(),
|
|
1213
|
+
'default': z.boolean().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.'),
|
|
1215
|
+
})))
|
|
1216
|
+
let _unieai_rabi_api_session_controller_skills_list_parameter_0$schema$value
|
|
1217
|
+
const _unieai_rabi_api_session_controller_skills_list_parameter_0$schema = () => (_unieai_rabi_api_session_controller_skills_list_parameter_0$schema$value ??= z.object({
|
|
1218
|
+
'sessionId': z.string().readonly(),
|
|
1219
|
+
}))
|
|
1220
|
+
let _unieai_rabi_api_session_controller_skills_list_result$schema$value
|
|
1221
|
+
const _unieai_rabi_api_session_controller_skills_list_result$schema = () => (_unieai_rabi_api_session_controller_skills_list_result$schema$value ??= z.object({
|
|
1222
|
+
'skills': z.array(z.object({
|
|
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.'),
|
|
1228
|
+
})).readonly(),
|
|
1229
|
+
}))
|
|
1230
|
+
let _unieai_rabi_api_session_controller_fileReferences_list_parameter_0_strict$schema$value
|
|
1231
|
+
const _unieai_rabi_api_session_controller_fileReferences_list_parameter_0_strict$schema = () => (_unieai_rabi_api_session_controller_fileReferences_list_parameter_0_strict$schema$value ??= z.string())
|
|
1232
|
+
let _unieai_rabi_api_session_controller_fileReferences_list_parameter_1_strict$schema$value
|
|
1233
|
+
const _unieai_rabi_api_session_controller_fileReferences_list_parameter_1_strict$schema = () => (_unieai_rabi_api_session_controller_fileReferences_list_parameter_1_strict$schema$value ??= z.string())
|
|
1234
|
+
let _unieai_rabi_api_session_controller_session_attachment_parameter_0_strict$schema$value
|
|
1235
|
+
const _unieai_rabi_api_session_controller_session_attachment_parameter_0_strict$schema = () => (_unieai_rabi_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 _unieai_rabi_api_session_controller_session_cancel_parameter_0_strict$schema$value
|
|
1240
|
+
const _unieai_rabi_api_session_controller_session_cancel_parameter_0_strict$schema = () => (_unieai_rabi_api_session_controller_session_cancel_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1241
|
+
'sessionId': z.string().readonly(),
|
|
1242
|
+
}))
|
|
1243
|
+
let _unieai_rabi_api_session_controller_session_create_parameter_0_strict$schema$value
|
|
1244
|
+
const _unieai_rabi_api_session_controller_session_create_parameter_0_strict$schema = () => (_unieai_rabi_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 _unieai_rabi_api_session_controller_session_follow_parameter_0_strict$schema$value
|
|
1251
|
+
const _unieai_rabi_api_session_controller_session_follow_parameter_0_strict$schema = () => (_unieai_rabi_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 _unieai_rabi_api_session_controller_session_fork_parameter_0_strict$schema$value
|
|
1269
|
+
const _unieai_rabi_api_session_controller_session_fork_parameter_0_strict$schema = () => (_unieai_rabi_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 _unieai_rabi_api_session_controller_session_list_parameter_0_strict$schema$value
|
|
1275
|
+
const _unieai_rabi_api_session_controller_session_list_parameter_0_strict$schema = () => (_unieai_rabi_api_session_controller_session_list_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1276
|
+
'cursor': z.string().readonly().optional(),
|
|
1277
|
+
}))
|
|
1278
|
+
let _unieai_rabi_api_session_controller_session_openWorkspacePath_parameter_0_strict$schema$value
|
|
1279
|
+
const _unieai_rabi_api_session_controller_session_openWorkspacePath_parameter_0_strict$schema = () => (_unieai_rabi_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 _unieai_rabi_api_session_controller_session_page_parameter_0_strict$schema$value
|
|
1285
|
+
const _unieai_rabi_api_session_controller_session_page_parameter_0_strict$schema = () => (_unieai_rabi_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 _unieai_rabi_api_session_controller_session_projections_parameter_0_strict$schema$value
|
|
1304
|
+
const _unieai_rabi_api_session_controller_session_projections_parameter_0_strict$schema = () => (_unieai_rabi_api_session_controller_session_projections_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1305
|
+
'sessionId': z.string().readonly(),
|
|
1306
|
+
}))
|
|
1307
|
+
let _unieai_rabi_api_session_controller_session_prompt_parameter_0_strict$schema$value
|
|
1308
|
+
const _unieai_rabi_api_session_controller_session_prompt_parameter_0_strict$schema = () => (_unieai_rabi_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 _unieai_rabi_api_session_controller_session_rename_parameter_0_strict$schema$value
|
|
1327
|
+
const _unieai_rabi_api_session_controller_session_rename_parameter_0_strict$schema = () => (_unieai_rabi_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 _unieai_rabi_api_session_controller_session_search_parameter_0_strict$schema$value
|
|
1332
|
+
const _unieai_rabi_api_session_controller_session_search_parameter_0_strict$schema = () => (_unieai_rabi_api_session_controller_session_search_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1333
|
+
'query': z.string().readonly(),
|
|
1334
|
+
}))
|
|
1335
|
+
let _unieai_rabi_api_session_controller_session_selectModel_parameter_0_strict$schema$value
|
|
1336
|
+
const _unieai_rabi_api_session_controller_session_selectModel_parameter_0_strict$schema = () => (_unieai_rabi_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 _unieai_rabi_api_session_controller_session_updateQueue_parameter_0_strict$schema$value
|
|
1343
|
+
const _unieai_rabi_api_session_controller_session_updateQueue_parameter_0_strict$schema = () => (_unieai_rabi_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 _unieai_rabi_api_session_controller_session_workspacePathApplications_parameter_0_strict$schema$value
|
|
1359
|
+
const _unieai_rabi_api_session_controller_session_workspacePathApplications_parameter_0_strict$schema = () => (_unieai_rabi_api_session_controller_session_workspacePathApplications_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1360
|
+
'path': z.string().readonly(),
|
|
1361
|
+
}))
|
|
1362
|
+
let _unieai_rabi_api_session_controller_skills_list_parameter_0_strict$schema$value
|
|
1363
|
+
const _unieai_rabi_api_session_controller_skills_list_parameter_0_strict$schema = () => (_unieai_rabi_api_session_controller_skills_list_parameter_0_strict$schema$value ??= z.strictObject({
|
|
1364
|
+
'sessionId': z.string().readonly(),
|
|
1365
|
+
}))
|
|
1366
|
+
|
|
1367
|
+
const $remote = createTypertRemoteInfo({
|
|
1368
|
+
package: '@unieai/rabi-api-session-controller',
|
|
1369
|
+
methods: {
|
|
1370
|
+
'fileReferences/list': {
|
|
1371
|
+
service: 'sessionFileReferences',
|
|
1372
|
+
description: 'List file and directory candidates for one Agent\'s working directory.',
|
|
1373
|
+
invocation: { kind: 'direct' },
|
|
1374
|
+
scope: {
|
|
1375
|
+
context: 'agent',
|
|
1376
|
+
wire: 'agentId',
|
|
1377
|
+
},
|
|
1378
|
+
parameters: [
|
|
1379
|
+
{
|
|
1380
|
+
name: 'agent',
|
|
1381
|
+
wire: 'agentId',
|
|
1382
|
+
description: 'target Agent resolved from the Session identity on the wire.',
|
|
1383
|
+
source: 'lookup',
|
|
1384
|
+
lookup: 'agent',
|
|
1385
|
+
codec: {
|
|
1386
|
+
mode: 'strict',
|
|
1387
|
+
typeSymbol: '@unieai/rabi-session/types#SessionId',
|
|
1388
|
+
create: _unieai_rabi_api_session_controller_fileReferences_list_parameter_0$schema,
|
|
1389
|
+
jsonSchema: {"type":"string"},
|
|
1390
|
+
},
|
|
1391
|
+
strictCodec: {
|
|
1392
|
+
mode: 'strict',
|
|
1393
|
+
typeSymbol: '@unieai/rabi-session/types#SessionId',
|
|
1394
|
+
create: _unieai_rabi_api_session_controller_fileReferences_list_parameter_0_strict$schema,
|
|
1395
|
+
jsonSchema: {"type":"string"},
|
|
1396
|
+
},
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
name: 'query',
|
|
1400
|
+
description: 'path text following `@` or `@"`.',
|
|
1401
|
+
source: 'json',
|
|
1402
|
+
codec: {
|
|
1403
|
+
mode: 'strict',
|
|
1404
|
+
typeSymbol: '@unieai/rabi-api-session-controller#fileReferences/list:query',
|
|
1405
|
+
create: _unieai_rabi_api_session_controller_fileReferences_list_parameter_1$schema,
|
|
1406
|
+
jsonSchema: {"type":"string"},
|
|
1407
|
+
},
|
|
1408
|
+
strictCodec: {
|
|
1409
|
+
mode: 'strict',
|
|
1410
|
+
typeSymbol: '@unieai/rabi-api-session-controller#fileReferences/list:query',
|
|
1411
|
+
create: _unieai_rabi_api_session_controller_fileReferences_list_parameter_1_strict$schema,
|
|
1412
|
+
jsonSchema: {"type":"string"},
|
|
1413
|
+
},
|
|
1414
|
+
},
|
|
1415
|
+
],
|
|
1416
|
+
cancellation: { parameter: 'signal' },
|
|
1417
|
+
result: {
|
|
1418
|
+
mode: 'strict',
|
|
1419
|
+
typeSymbol: '@unieai/rabi-api-session-controller#fileReferences/list:result',
|
|
1420
|
+
create: _unieai_rabi_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}},
|
|
1423
|
+
},
|
|
1424
|
+
sourceLocation: {"file":"packages/api/session-controller/src/file-references.ts","line":33,"column":3},
|
|
1425
|
+
},
|
|
1426
|
+
'session/attachment': {
|
|
1427
|
+
service: 'sessionController',
|
|
1428
|
+
description: 'Read one image proven reachable from the addressed Session log.',
|
|
1429
|
+
invocation: { kind: 'direct' },
|
|
1430
|
+
parameters: [
|
|
1431
|
+
{
|
|
1432
|
+
name: 'request',
|
|
1433
|
+
description: 'Session and attachment identities used for authorization.',
|
|
1434
|
+
source: 'json',
|
|
1435
|
+
codec: {
|
|
1436
|
+
mode: 'strict',
|
|
1437
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionAttachmentRequest',
|
|
1438
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SessionAttachmentRequest',
|
|
1444
|
+
create: _unieai_rabi_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},
|
|
1446
|
+
},
|
|
1447
|
+
},
|
|
1448
|
+
],
|
|
1449
|
+
result: {
|
|
1450
|
+
mode: 'strict',
|
|
1451
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionAttachmentValue',
|
|
1452
|
+
create: _unieai_rabi_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},
|
|
1455
|
+
},
|
|
1456
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":494,"column":3},
|
|
1457
|
+
},
|
|
1458
|
+
'session/cancel': {
|
|
1459
|
+
service: 'sessionController',
|
|
1460
|
+
description: 'Cancel one active Agent turn without dropping its pending inbox.',
|
|
1461
|
+
invocation: { kind: 'direct' },
|
|
1462
|
+
parameters: [
|
|
1463
|
+
{
|
|
1464
|
+
name: 'request',
|
|
1465
|
+
description: 'Session whose active Agent turn is cancelled.',
|
|
1466
|
+
source: 'json',
|
|
1467
|
+
codec: {
|
|
1468
|
+
mode: 'strict',
|
|
1469
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionCancelRequest',
|
|
1470
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SessionCancelRequest',
|
|
1476
|
+
create: _unieai_rabi_api_session_controller_session_cancel_parameter_0_strict$schema,
|
|
1477
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"],"additionalProperties":false},
|
|
1478
|
+
},
|
|
1479
|
+
},
|
|
1480
|
+
],
|
|
1481
|
+
result: {
|
|
1482
|
+
mode: 'strict',
|
|
1483
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionCancelValue',
|
|
1484
|
+
create: _unieai_rabi_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},
|
|
1487
|
+
},
|
|
1488
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":514,"column":3},
|
|
1489
|
+
},
|
|
1490
|
+
'session/canOpenWorkspacePath': {
|
|
1491
|
+
service: 'sessionController',
|
|
1492
|
+
description: 'Report whether this deployment can hand a Session workspace path to a native desktop.',
|
|
1493
|
+
invocation: { kind: 'direct' },
|
|
1494
|
+
parameters: [
|
|
1495
|
+
],
|
|
1496
|
+
result: {
|
|
1497
|
+
mode: 'strict',
|
|
1498
|
+
typeSymbol: '@unieai/rabi-api-session-controller#session/canOpenWorkspacePath:result',
|
|
1499
|
+
create: _unieai_rabi_api_session_controller_session_canOpenWorkspacePath_result$schema,
|
|
1500
|
+
description: 'true when the matching open operation is available.',
|
|
1501
|
+
jsonSchema: {"type":"boolean"},
|
|
1502
|
+
},
|
|
1503
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":347,"column":3},
|
|
1504
|
+
},
|
|
1505
|
+
'session/control': {
|
|
1506
|
+
service: 'sessionController',
|
|
1507
|
+
description: 'Stream a complete live-control baseline followed by replacement frames.',
|
|
1508
|
+
mode: 'stream',
|
|
1509
|
+
invocation: { kind: 'direct' },
|
|
1510
|
+
parameters: [
|
|
1511
|
+
],
|
|
1512
|
+
cancellation: { parameter: 'signal' },
|
|
1513
|
+
result: {
|
|
1514
|
+
mode: 'strict',
|
|
1515
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionControlFrame',
|
|
1516
|
+
create: _unieai_rabi_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',
|
|
1519
|
+
},
|
|
1520
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":599,"column":10},
|
|
1521
|
+
},
|
|
1522
|
+
'session/create': {
|
|
1523
|
+
service: 'sessionController',
|
|
1524
|
+
description: 'Create one ordinary Session for a new conversation, reusing the named blank Session while it is reusable.',
|
|
1525
|
+
invocation: { kind: 'direct' },
|
|
1526
|
+
parameters: [
|
|
1527
|
+
{
|
|
1528
|
+
name: 'request',
|
|
1529
|
+
description: 'optional blank Session to reuse, location, and Agent preset.',
|
|
1530
|
+
source: 'json',
|
|
1531
|
+
codec: {
|
|
1532
|
+
mode: 'strict',
|
|
1533
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionCreateRequest',
|
|
1534
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SessionCreateRequest',
|
|
1540
|
+
create: _unieai_rabi_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},
|
|
1542
|
+
},
|
|
1543
|
+
},
|
|
1544
|
+
],
|
|
1545
|
+
result: {
|
|
1546
|
+
mode: 'strict',
|
|
1547
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionCreateValue',
|
|
1548
|
+
create: _unieai_rabi_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},
|
|
1551
|
+
},
|
|
1552
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":301,"column":3},
|
|
1553
|
+
},
|
|
1554
|
+
'session/follow': {
|
|
1555
|
+
service: 'sessionController',
|
|
1556
|
+
description: 'Follow one Session log from its opening or resume cursor.',
|
|
1557
|
+
mode: 'stream',
|
|
1558
|
+
invocation: { kind: 'direct' },
|
|
1559
|
+
parameters: [
|
|
1560
|
+
{
|
|
1561
|
+
name: 'request',
|
|
1562
|
+
description: 'durable address and last committed sequence already held by the caller.',
|
|
1563
|
+
source: 'json',
|
|
1564
|
+
codec: {
|
|
1565
|
+
mode: 'strict',
|
|
1566
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionFollowRequest',
|
|
1567
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SessionFollowRequest',
|
|
1573
|
+
create: _unieai_rabi_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},
|
|
1575
|
+
},
|
|
1576
|
+
},
|
|
1577
|
+
],
|
|
1578
|
+
cancellation: { parameter: 'signal' },
|
|
1579
|
+
result: {
|
|
1580
|
+
mode: 'strict',
|
|
1581
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionFollowFrame',
|
|
1582
|
+
create: _unieai_rabi_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}]},
|
|
1585
|
+
},
|
|
1586
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":537,"column":3},
|
|
1587
|
+
},
|
|
1588
|
+
'session/fork': {
|
|
1589
|
+
service: 'sessionController',
|
|
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.',
|
|
1591
|
+
invocation: { kind: 'direct' },
|
|
1592
|
+
parameters: [
|
|
1593
|
+
{
|
|
1594
|
+
name: 'request',
|
|
1595
|
+
description: 'source Session, optional exact inclusive event boundary, and migration preflight choice.',
|
|
1596
|
+
source: 'json',
|
|
1597
|
+
codec: {
|
|
1598
|
+
mode: 'strict',
|
|
1599
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionForkRequest',
|
|
1600
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SessionForkRequest',
|
|
1606
|
+
create: _unieai_rabi_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},
|
|
1608
|
+
},
|
|
1609
|
+
},
|
|
1610
|
+
],
|
|
1611
|
+
result: {
|
|
1612
|
+
mode: 'strict',
|
|
1613
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionForkValue',
|
|
1614
|
+
create: _unieai_rabi_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},
|
|
1617
|
+
},
|
|
1618
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":443,"column":9},
|
|
1619
|
+
},
|
|
1620
|
+
'session/initializeDefaultModel': {
|
|
1621
|
+
service: 'sessionController',
|
|
1622
|
+
description: 'Select the first available account model after login when no provider API key is configured.',
|
|
1623
|
+
invocation: { kind: 'direct' },
|
|
1624
|
+
parameters: [
|
|
1625
|
+
],
|
|
1626
|
+
result: {
|
|
1627
|
+
mode: 'strict',
|
|
1628
|
+
typeSymbol: '@unieai/rabi-api-session-controller#session/initializeDefaultModel:result',
|
|
1629
|
+
create: _unieai_rabi_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',
|
|
1632
|
+
},
|
|
1633
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":320,"column":9},
|
|
1634
|
+
},
|
|
1635
|
+
'session/list': {
|
|
1636
|
+
service: 'sessionController',
|
|
1637
|
+
description: 'Read all visible Session rows without resuming an Agent.',
|
|
1638
|
+
invocation: { kind: 'direct' },
|
|
1639
|
+
parameters: [
|
|
1640
|
+
{
|
|
1641
|
+
name: '_request',
|
|
1642
|
+
description: 'reserved empty list request.',
|
|
1643
|
+
source: 'json',
|
|
1644
|
+
codec: {
|
|
1645
|
+
mode: 'strict',
|
|
1646
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionListRequest',
|
|
1647
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SessionListRequest',
|
|
1653
|
+
create: _unieai_rabi_api_session_controller_session_list_parameter_0_strict$schema,
|
|
1654
|
+
jsonSchema: {"type":"object","properties":{"cursor":{"type":"string"}},"required":[],"additionalProperties":false},
|
|
1655
|
+
},
|
|
1656
|
+
},
|
|
1657
|
+
],
|
|
1658
|
+
cancellation: { parameter: 'signal' },
|
|
1659
|
+
result: {
|
|
1660
|
+
mode: 'strict',
|
|
1661
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionListValue',
|
|
1662
|
+
create: _unieai_rabi_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},
|
|
1665
|
+
},
|
|
1666
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":276,"column":9},
|
|
1667
|
+
},
|
|
1668
|
+
'session/modelCatalog': {
|
|
1669
|
+
service: 'sessionController',
|
|
1670
|
+
description: 'Describe every currently routable model for Host-generation selectors.',
|
|
1671
|
+
invocation: { kind: 'direct' },
|
|
1672
|
+
parameters: [
|
|
1673
|
+
],
|
|
1674
|
+
result: {
|
|
1675
|
+
mode: 'strict',
|
|
1676
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#ModelCatalog',
|
|
1677
|
+
create: _unieai_rabi_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},
|
|
1680
|
+
},
|
|
1681
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":338,"column":3},
|
|
1682
|
+
},
|
|
1683
|
+
'session/openWorkspacePath': {
|
|
1684
|
+
service: 'sessionController',
|
|
1685
|
+
description: 'Verify one path through the composed filesystem and open it on the Host desktop.',
|
|
1686
|
+
invocation: { kind: 'direct' },
|
|
1687
|
+
parameters: [
|
|
1688
|
+
{
|
|
1689
|
+
name: 'request',
|
|
1690
|
+
description: 'path after best-effort Session workspace resolution.',
|
|
1691
|
+
source: 'json',
|
|
1692
|
+
codec: {
|
|
1693
|
+
mode: 'strict',
|
|
1694
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionOpenWorkspacePathRequest',
|
|
1695
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SessionOpenWorkspacePathRequest',
|
|
1701
|
+
create: _unieai_rabi_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},
|
|
1703
|
+
},
|
|
1704
|
+
},
|
|
1705
|
+
],
|
|
1706
|
+
cancellation: { parameter: 'signal' },
|
|
1707
|
+
result: {
|
|
1708
|
+
mode: 'strict',
|
|
1709
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionOpenWorkspacePathValue',
|
|
1710
|
+
create: _unieai_rabi_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},
|
|
1713
|
+
},
|
|
1714
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":368,"column":9},
|
|
1715
|
+
},
|
|
1716
|
+
'session/page': {
|
|
1717
|
+
service: 'sessionController',
|
|
1718
|
+
description: 'Read one cold-safe, message-aligned Session history page.',
|
|
1719
|
+
invocation: { kind: 'direct' },
|
|
1720
|
+
parameters: [
|
|
1721
|
+
{
|
|
1722
|
+
name: 'request',
|
|
1723
|
+
description: 'durable address, backward cursor, and page budget.',
|
|
1724
|
+
source: 'json',
|
|
1725
|
+
codec: {
|
|
1726
|
+
mode: 'strict',
|
|
1727
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionPageRequest',
|
|
1728
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SessionPageRequest',
|
|
1734
|
+
create: _unieai_rabi_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},
|
|
1736
|
+
},
|
|
1737
|
+
},
|
|
1738
|
+
],
|
|
1739
|
+
cancellation: { parameter: 'signal' },
|
|
1740
|
+
result: {
|
|
1741
|
+
mode: 'strict',
|
|
1742
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionPage',
|
|
1743
|
+
create: _unieai_rabi_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},
|
|
1746
|
+
},
|
|
1747
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":525,"column":3},
|
|
1748
|
+
},
|
|
1749
|
+
'session/projections': {
|
|
1750
|
+
service: 'sessionController',
|
|
1751
|
+
description: 'Read exact projections, returning cached hints only when migration is required.',
|
|
1752
|
+
invocation: { kind: 'direct' },
|
|
1753
|
+
parameters: [
|
|
1754
|
+
{
|
|
1755
|
+
name: 'request',
|
|
1756
|
+
description: 'Session whose current values are required.',
|
|
1757
|
+
source: 'json',
|
|
1758
|
+
codec: {
|
|
1759
|
+
mode: 'strict',
|
|
1760
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionProjectionsRequest',
|
|
1761
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SessionProjectionsRequest',
|
|
1767
|
+
create: _unieai_rabi_api_session_controller_session_projections_parameter_0_strict$schema,
|
|
1768
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"],"additionalProperties":false},
|
|
1769
|
+
},
|
|
1770
|
+
},
|
|
1771
|
+
],
|
|
1772
|
+
cancellation: { parameter: 'signal' },
|
|
1773
|
+
result: {
|
|
1774
|
+
mode: 'strict',
|
|
1775
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionProjectionsValue',
|
|
1776
|
+
create: _unieai_rabi_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}]},
|
|
1779
|
+
},
|
|
1780
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":548,"column":9},
|
|
1781
|
+
},
|
|
1782
|
+
'session/prompt': {
|
|
1783
|
+
service: 'sessionController',
|
|
1784
|
+
description: 'Admit one prompt after explicitly resuming its Session.',
|
|
1785
|
+
invocation: { kind: 'direct' },
|
|
1786
|
+
parameters: [
|
|
1787
|
+
{
|
|
1788
|
+
name: 'request',
|
|
1789
|
+
description: 'Session identity, prompt content, source metadata, and delivery mode.',
|
|
1790
|
+
source: 'json',
|
|
1791
|
+
codec: {
|
|
1792
|
+
mode: 'strict',
|
|
1793
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionPromptRequest',
|
|
1794
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SessionPromptRequest',
|
|
1800
|
+
create: _unieai_rabi_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},
|
|
1802
|
+
},
|
|
1803
|
+
},
|
|
1804
|
+
],
|
|
1805
|
+
cancellation: { parameter: 'signal' },
|
|
1806
|
+
result: {
|
|
1807
|
+
mode: 'strict',
|
|
1808
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionPromptValue',
|
|
1809
|
+
create: _unieai_rabi_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},
|
|
1812
|
+
},
|
|
1813
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":462,"column":9},
|
|
1814
|
+
},
|
|
1815
|
+
'session/rename': {
|
|
1816
|
+
service: 'sessionController',
|
|
1817
|
+
description: 'Rename one Session after explicitly resuming it.',
|
|
1818
|
+
invocation: { kind: 'direct' },
|
|
1819
|
+
parameters: [
|
|
1820
|
+
{
|
|
1821
|
+
name: 'request',
|
|
1822
|
+
description: 'Session identity and proposed title.',
|
|
1823
|
+
source: 'json',
|
|
1824
|
+
codec: {
|
|
1825
|
+
mode: 'strict',
|
|
1826
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionRenameRequest',
|
|
1827
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SessionRenameRequest',
|
|
1833
|
+
create: _unieai_rabi_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},
|
|
1835
|
+
},
|
|
1836
|
+
},
|
|
1837
|
+
],
|
|
1838
|
+
result: {
|
|
1839
|
+
mode: 'strict',
|
|
1840
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionRenameValue',
|
|
1841
|
+
create: _unieai_rabi_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},
|
|
1844
|
+
},
|
|
1845
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":431,"column":3},
|
|
1846
|
+
},
|
|
1847
|
+
'session/search': {
|
|
1848
|
+
service: 'sessionController',
|
|
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.',
|
|
1850
|
+
invocation: { kind: 'direct' },
|
|
1851
|
+
parameters: [
|
|
1852
|
+
{
|
|
1853
|
+
name: 'request',
|
|
1854
|
+
description: 'literal message-content query.',
|
|
1855
|
+
source: 'json',
|
|
1856
|
+
codec: {
|
|
1857
|
+
mode: 'strict',
|
|
1858
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionSearchRequest',
|
|
1859
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SessionSearchRequest',
|
|
1865
|
+
create: _unieai_rabi_api_session_controller_session_search_parameter_0_strict$schema,
|
|
1866
|
+
jsonSchema: {"type":"object","properties":{"query":{"type":"string"}},"required":["query"],"additionalProperties":false},
|
|
1867
|
+
},
|
|
1868
|
+
},
|
|
1869
|
+
],
|
|
1870
|
+
cancellation: { parameter: 'signal' },
|
|
1871
|
+
result: {
|
|
1872
|
+
mode: 'strict',
|
|
1873
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionSearchValue',
|
|
1874
|
+
create: _unieai_rabi_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},
|
|
1877
|
+
},
|
|
1878
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":290,"column":9},
|
|
1879
|
+
},
|
|
1880
|
+
'session/selectModel': {
|
|
1881
|
+
service: 'sessionController',
|
|
1882
|
+
description: 'Select one Session-local model after explicitly resuming the Session; save the default in the background.',
|
|
1883
|
+
invocation: { kind: 'direct' },
|
|
1884
|
+
parameters: [
|
|
1885
|
+
{
|
|
1886
|
+
name: 'request',
|
|
1887
|
+
description: 'Session identity and requested model selection.',
|
|
1888
|
+
source: 'json',
|
|
1889
|
+
codec: {
|
|
1890
|
+
mode: 'strict',
|
|
1891
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionSelectModelRequest',
|
|
1892
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SessionSelectModelRequest',
|
|
1898
|
+
create: _unieai_rabi_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},
|
|
1900
|
+
},
|
|
1901
|
+
},
|
|
1902
|
+
],
|
|
1903
|
+
result: {
|
|
1904
|
+
mode: 'strict',
|
|
1905
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionSelectModelValue',
|
|
1906
|
+
create: _unieai_rabi_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},
|
|
1909
|
+
},
|
|
1910
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":311,"column":3},
|
|
1911
|
+
},
|
|
1912
|
+
'session/updateQueue': {
|
|
1913
|
+
service: 'sessionController',
|
|
1914
|
+
description: 'Mutate one still-pending queue occurrence, resuming a cold Agent first.',
|
|
1915
|
+
invocation: { kind: 'direct' },
|
|
1916
|
+
parameters: [
|
|
1917
|
+
{
|
|
1918
|
+
name: 'request',
|
|
1919
|
+
description: 'Session, queue item, and requested mutation.',
|
|
1920
|
+
source: 'json',
|
|
1921
|
+
codec: {
|
|
1922
|
+
mode: 'strict',
|
|
1923
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionUpdateQueueRequest',
|
|
1924
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SessionUpdateQueueRequest',
|
|
1930
|
+
create: _unieai_rabi_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},
|
|
1932
|
+
},
|
|
1933
|
+
},
|
|
1934
|
+
],
|
|
1935
|
+
result: {
|
|
1936
|
+
mode: 'strict',
|
|
1937
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SessionUpdateQueueValue',
|
|
1938
|
+
create: _unieai_rabi_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},
|
|
1941
|
+
},
|
|
1942
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":504,"column":3},
|
|
1943
|
+
},
|
|
1944
|
+
'session/workspacePathApplications': {
|
|
1945
|
+
service: 'sessionController',
|
|
1946
|
+
description: 'Query current file handlers on the serving desktop without activating an Agent.',
|
|
1947
|
+
invocation: { kind: 'direct' },
|
|
1948
|
+
parameters: [
|
|
1949
|
+
{
|
|
1950
|
+
name: 'request',
|
|
1951
|
+
description: 'file path in Host filesystem syntax.',
|
|
1952
|
+
source: 'json',
|
|
1953
|
+
codec: {
|
|
1954
|
+
mode: 'strict',
|
|
1955
|
+
typeSymbol: '@unieai/rabi-api-session-controller#session/workspacePathApplications:request',
|
|
1956
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller#session/workspacePathApplications:request',
|
|
1962
|
+
create: _unieai_rabi_api_session_controller_session_workspacePathApplications_parameter_0_strict$schema,
|
|
1963
|
+
jsonSchema: {"type":"object","properties":{"path":{"type":"string"}},"required":["path"],"additionalProperties":false},
|
|
1964
|
+
},
|
|
1965
|
+
},
|
|
1966
|
+
],
|
|
1967
|
+
cancellation: { parameter: 'signal' },
|
|
1968
|
+
result: {
|
|
1969
|
+
mode: 'strict',
|
|
1970
|
+
typeSymbol: '@unieai/rabi-api-session-controller#session/workspacePathApplications:result',
|
|
1971
|
+
create: _unieai_rabi_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}},
|
|
1974
|
+
},
|
|
1975
|
+
sourceLocation: {"file":"packages/api/session-controller/src/index.ts","line":398,"column":9},
|
|
1976
|
+
},
|
|
1977
|
+
'skills/list': {
|
|
1978
|
+
service: 'sessionSkillCatalog',
|
|
1979
|
+
description: 'List the user-invocable skills visible to one Session composition.',
|
|
1980
|
+
invocation: { kind: 'direct' },
|
|
1981
|
+
parameters: [
|
|
1982
|
+
{
|
|
1983
|
+
name: 'request',
|
|
1984
|
+
description: 'Session identity whose cwd and preset select the catalog view.',
|
|
1985
|
+
source: 'json',
|
|
1986
|
+
codec: {
|
|
1987
|
+
mode: 'strict',
|
|
1988
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SkillListRequest',
|
|
1989
|
+
create: _unieai_rabi_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: '@unieai/rabi-api-session-controller/types#SkillListRequest',
|
|
1995
|
+
create: _unieai_rabi_api_session_controller_skills_list_parameter_0_strict$schema,
|
|
1996
|
+
jsonSchema: {"type":"object","properties":{"sessionId":{"type":"string"}},"required":["sessionId"],"additionalProperties":false},
|
|
1997
|
+
},
|
|
1998
|
+
},
|
|
1999
|
+
],
|
|
2000
|
+
cancellation: { parameter: 'signal' },
|
|
2001
|
+
result: {
|
|
2002
|
+
mode: 'strict',
|
|
2003
|
+
typeSymbol: '@unieai/rabi-api-session-controller/types#SkillListValue',
|
|
2004
|
+
create: _unieai_rabi_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},
|
|
2007
|
+
},
|
|
2008
|
+
sourceLocation: {"file":"packages/api/session-controller/src/skill-catalog.ts","line":36,"column":9},
|
|
2009
|
+
},
|
|
2010
|
+
},
|
|
2011
|
+
}, z)
|
|
2012
|
+
|
|
2013
|
+
export const TYPERT = {
|
|
2014
|
+
package: '@unieai/rabi-api-session-controller',
|
|
2015
|
+
face: 'host',
|
|
2016
|
+
schemas: [
|
|
2017
|
+
],
|
|
2018
|
+
get invocations() { return $remote.descriptors },
|
|
2019
|
+
model: {
|
|
2020
|
+
"services": [
|
|
2021
|
+
{
|
|
2022
|
+
"description": "Host service backing the generated `ctx.remote.session` namespace.",
|
|
2023
|
+
"summary": "Host service backing the generated `ctx.remote.session` namespace.",
|
|
2024
|
+
"tags": [],
|
|
2025
|
+
"jsDoc": "/** Host service backing the generated `ctx.remote.session` namespace. */",
|
|
2026
|
+
"key": "sessionController",
|
|
2027
|
+
"exportName": "SessionController",
|
|
2028
|
+
"members": [
|
|
2029
|
+
{
|
|
2030
|
+
"kind": "method",
|
|
2031
|
+
"name": "resolveAgent",
|
|
2032
|
+
"signature": "resolveAgent(sessionId: SessionId): Promise<ApiSessionAgentResult>",
|
|
2033
|
+
"summary": "Resolve or resume one ordinary Session for another Host API domain.",
|
|
2034
|
+
"jsDoc": "/**\n * Resolve or resume one ordinary Session for another Host API domain.\n * @param sessionId - Session identity whose Agent owns the operation.\n * @returns the live Agent or the stable Session-domain failure.\n */"
|
|
2035
|
+
},
|
|
2036
|
+
{
|
|
2037
|
+
"kind": "method",
|
|
2038
|
+
"name": "inspect",
|
|
2039
|
+
"signature": "inspect( sessionId: SessionId, signal?: AbortSignal, ): Promise<SessionInspection>",
|
|
2040
|
+
"summary": "Inspect one attached or persisted Session without activating its Agent.",
|
|
2041
|
+
"jsDoc": "/**\n * Inspect one attached or persisted Session without activating its Agent.\n * @param sessionId - durable Session identity.\n * @param signal - optional caller cancellation for persistence reads.\n * @returns the current attached state or persisted header and event prefix.\n */"
|
|
2042
|
+
},
|
|
2043
|
+
{
|
|
2044
|
+
"kind": "method",
|
|
2045
|
+
"name": "list",
|
|
2046
|
+
"signature": "@Remote('list') async list(_request: SessionListRequest, signal: AbortSignal): Promise<SessionListValue>",
|
|
2047
|
+
"summary": "Read all visible Session rows without resuming an Agent.",
|
|
2048
|
+
"jsDoc": "/**\n * Read all visible Session rows without resuming an Agent.\n * @param _request - reserved empty list request.\n * @param signal - cancellation for persistence reads and summary generation.\n * @returns visible Session summaries ordered by activity.\n */"
|
|
2049
|
+
},
|
|
2050
|
+
{
|
|
2051
|
+
"kind": "method",
|
|
2052
|
+
"name": "search",
|
|
2053
|
+
"signature": "@Remote('search') async search(request: SessionSearchRequest, signal: AbortSignal): Promise<SessionSearchValue>",
|
|
2054
|
+
"summary": "Search visible Session content without resuming an Agent.",
|
|
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 */"
|
|
2056
|
+
},
|
|
2057
|
+
{
|
|
2058
|
+
"kind": "method",
|
|
2059
|
+
"name": "create",
|
|
2060
|
+
"signature": "@Remote('create') create(request: SessionCreateRequest): Promise<SessionCreateValue>",
|
|
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 */"
|
|
2063
|
+
},
|
|
2064
|
+
{
|
|
2065
|
+
"kind": "method",
|
|
2066
|
+
"name": "selectModel",
|
|
2067
|
+
"signature": "@Remote('selectModel') selectModel(request: SessionSelectModelRequest): Promise<SessionSelectModelValue>",
|
|
2068
|
+
"summary": "Select one Session-local model after explicitly resuming the Session; save the default in the background.",
|
|
2069
|
+
"jsDoc": "/**\n * Select one Session-local model after explicitly resuming the Session; save the default in the background.\n * @param request - Session identity and requested model selection.\n * @returns the normalized selection installed for the Session, without waiting for default persistence.\n */"
|
|
2070
|
+
},
|
|
2071
|
+
{
|
|
2072
|
+
"kind": "method",
|
|
2073
|
+
"name": "initializeDefaultModel",
|
|
2074
|
+
"signature": "@Remote async initializeDefaultModel(): Promise<void>",
|
|
2075
|
+
"summary": "Select the first available account model after login when no provider API key is configured.",
|
|
2076
|
+
"jsDoc": "/**\n * Select the first available account model after login when no provider API key is configured.\n * @returns after saving the first available model or retaining the existing default.\n */"
|
|
2077
|
+
},
|
|
2078
|
+
{
|
|
2079
|
+
"kind": "method",
|
|
2080
|
+
"name": "modelCatalog",
|
|
2081
|
+
"signature": "@Remote('modelCatalog') modelCatalog(): Promise<ModelCatalog>",
|
|
2082
|
+
"summary": "Describe every currently routable model for Host-generation selectors.",
|
|
2083
|
+
"jsDoc": "/**\n * Describe every currently routable model for Host-generation selectors.\n * @returns provider-grouped models, the deployment default, and isolated provider failures.\n */"
|
|
2084
|
+
},
|
|
2085
|
+
{
|
|
2086
|
+
"kind": "method",
|
|
2087
|
+
"name": "canOpenWorkspacePath",
|
|
2088
|
+
"signature": "@Remote canOpenWorkspacePath(): boolean",
|
|
2089
|
+
"summary": "Report whether this deployment can hand a Session workspace path to a native desktop.",
|
|
2090
|
+
"jsDoc": "/**\n * Report whether this deployment can hand a Session workspace path to a native desktop.\n * @returns true when the matching open operation is available.\n */"
|
|
2091
|
+
},
|
|
2092
|
+
{
|
|
2093
|
+
"kind": "method",
|
|
2094
|
+
"name": "workspaceDesktop",
|
|
2095
|
+
"signature": "workspaceDesktop(): { name: string; available: boolean; fileManager: 'finder' | 'explorer' | 'directory' | null }",
|
|
2096
|
+
"summary": "Describe the serving desktop for authenticated file-action routes.",
|
|
2097
|
+
"jsDoc": "/**\n * Describe the serving desktop for authenticated file-action routes.\n * @returns Host name, configured availability, and platform-specific file-manager behavior.\n */"
|
|
2098
|
+
},
|
|
2099
|
+
{
|
|
2100
|
+
"kind": "method",
|
|
2101
|
+
"name": "openWorkspacePath",
|
|
2102
|
+
"signature": "@Remote('openWorkspacePath') async openWorkspacePath( request: SessionOpenWorkspacePathRequest, signal: AbortSignal, ): Promise<SessionOpenWorkspacePathValue>",
|
|
2103
|
+
"summary": "Verify one path through the composed filesystem and open it on the Host desktop.",
|
|
2104
|
+
"jsDoc": "/**\n * Verify one path through the composed filesystem and open it on the Host desktop.\n * @param request - path after best-effort Session workspace resolution.\n * @param signal - caller lifetime; abort terminates the native command.\n * @returns confirmation after the native opener accepts the path.\n * @throws RemoteError when the request is invalid, has no verified Host mapping, is cancelled, or the opener fails.\n */"
|
|
2105
|
+
},
|
|
2106
|
+
{
|
|
2107
|
+
"kind": "method",
|
|
2108
|
+
"name": "workspacePathApplications",
|
|
2109
|
+
"signature": "@Remote('workspacePathApplications') async workspacePathApplications( request: { readonly path: string }, signal: AbortSignal, ): Promise<readonly SessionWorkspacePathApplication[]>",
|
|
2110
|
+
"summary": "Query current file handlers on the serving desktop without activating an Agent.",
|
|
2111
|
+
"jsDoc": "/**\n * Query current file handlers on the serving desktop without activating an Agent.\n * @param request - file path in Host filesystem syntax.\n * @param signal - caller lifetime, propagated to filesystem and desktop queries.\n * @returns OS application names, icons, and default selection; empty when desktop opening is unavailable.\n * @throws RemoteError when the path is invalid, the query is cancelled, or native discovery fails.\n */"
|
|
2112
|
+
},
|
|
2113
|
+
{
|
|
2114
|
+
"kind": "method",
|
|
2115
|
+
"name": "rename",
|
|
2116
|
+
"signature": "@Remote('rename') rename(request: SessionRenameRequest): Promise<SessionRenameValue>",
|
|
2117
|
+
"summary": "Rename one Session after explicitly resuming it.",
|
|
2118
|
+
"jsDoc": "/**\n * Rename one Session after explicitly resuming it.\n * @param request - Session identity and proposed title.\n * @returns the accepted title and durable event sequence.\n */"
|
|
2119
|
+
},
|
|
2120
|
+
{
|
|
2121
|
+
"kind": "method",
|
|
2122
|
+
"name": "fork",
|
|
2123
|
+
"signature": "@Remote('fork') async fork(request: SessionForkRequest): Promise<SessionForkValue>",
|
|
2124
|
+
"summary": "Fork one cold-readable exact event prefix into a new Session.",
|
|
2125
|
+
"jsDoc": "/**\n * Fork one cold-readable exact event prefix into a new Session. An omitted\n * boundary selects the latest completed-turn prefix; an open cut receives\n * synthetic fork closers.\n * @param request - source Session, optional exact inclusive event boundary, and migration preflight choice.\n * @returns the new Session identity.\n */"
|
|
2126
|
+
},
|
|
2127
|
+
{
|
|
2128
|
+
"kind": "method",
|
|
2129
|
+
"name": "prompt",
|
|
2130
|
+
"signature": "@Remote('prompt') async prompt(request: SessionPromptRequest, signal: AbortSignal): Promise<SessionPromptValue>",
|
|
2131
|
+
"summary": "Admit one prompt after explicitly resuming its Session.",
|
|
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 */"
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
"kind": "method",
|
|
2136
|
+
"name": "attachment",
|
|
2137
|
+
"signature": "@Remote('attachment') attachment(request: SessionAttachmentRequest): Promise<SessionAttachmentValue>",
|
|
2138
|
+
"summary": "Read one image proven reachable from the addressed Session log.",
|
|
2139
|
+
"jsDoc": "/**\n * Read one image proven reachable from the addressed Session log.\n * @param request - Session and attachment identities used for authorization.\n * @returns the durable attachment reference and base64-encoded bytes.\n */"
|
|
2140
|
+
},
|
|
2141
|
+
{
|
|
2142
|
+
"kind": "method",
|
|
2143
|
+
"name": "updateQueue",
|
|
2144
|
+
"signature": "@Remote('updateQueue') updateQueue(request: SessionUpdateQueueRequest): Promise<SessionUpdateQueueValue>",
|
|
2145
|
+
"summary": "Mutate one still-pending queue occurrence, resuming a cold Agent first.",
|
|
2146
|
+
"jsDoc": "/**\n * Mutate one still-pending queue occurrence, resuming a cold Agent first.\n * @param request - Session, queue item, and requested mutation.\n * @returns acknowledgement that the queue mutation was applied.\n */"
|
|
2147
|
+
},
|
|
2148
|
+
{
|
|
2149
|
+
"kind": "method",
|
|
2150
|
+
"name": "cancel",
|
|
2151
|
+
"signature": "@Remote('cancel') cancel(request: SessionCancelRequest): SessionCancelValue",
|
|
2152
|
+
"summary": "Cancel one active Agent turn without dropping its pending inbox.",
|
|
2153
|
+
"jsDoc": "/**\n * Cancel one active Agent turn without dropping its pending inbox.\n * @param request - Session whose active Agent turn is cancelled.\n * @returns acknowledgement that cancellation was requested.\n */"
|
|
2154
|
+
},
|
|
2155
|
+
{
|
|
2156
|
+
"kind": "method",
|
|
2157
|
+
"name": "page",
|
|
2158
|
+
"signature": "@Remote({ name: 'page', resources: { session: addressedSession } }) page(request: SessionPageRequest, signal: AbortSignal): Promise<SessionPage>",
|
|
2159
|
+
"summary": "Read one cold-safe, message-aligned Session history page.",
|
|
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 */"
|
|
2161
|
+
},
|
|
2162
|
+
{
|
|
2163
|
+
"kind": "method",
|
|
2164
|
+
"name": "follow",
|
|
2165
|
+
"signature": "@Remote({ mode: 'stream', resources: { session: addressedSession } }) follow(request: SessionFollowRequest, signal: AbortSignal): AsyncIterable<SessionFollowFrame>",
|
|
2166
|
+
"summary": "Follow one Session log from its opening or resume cursor.",
|
|
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 */"
|
|
2168
|
+
},
|
|
2169
|
+
{
|
|
2170
|
+
"kind": "method",
|
|
2171
|
+
"name": "projections",
|
|
2172
|
+
"signature": "@Remote('projections') async projections(request: SessionProjectionsRequest, signal: AbortSignal): Promise<SessionProjectionsValue>",
|
|
2173
|
+
"summary": "Read exact projections, returning cached hints only when migration is required.",
|
|
2174
|
+
"jsDoc": "/**\n * Read exact projections, returning cached hints only when migration is required.\n * @param request - Session whose current values are required.\n * @param signal - cancellation for the Session read.\n * @returns a sequenced baseline, cached hints when migration is deferred, or null when absent.\n */"
|
|
2175
|
+
},
|
|
2176
|
+
{
|
|
2177
|
+
"kind": "method",
|
|
2178
|
+
"name": "control",
|
|
2179
|
+
"signature": "@Remote({ mode: 'stream' }) async *control(signal: AbortSignal): AsyncIterable<SessionControlFrame>",
|
|
2180
|
+
"summary": "Stream a complete live-control baseline followed by replacement frames.",
|
|
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 */"
|
|
2182
|
+
}
|
|
2183
|
+
],
|
|
2184
|
+
"types": [
|
|
2185
|
+
{
|
|
2186
|
+
"name": "AfterScheduleRecord",
|
|
2187
|
+
"declaration": "export interface AfterScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'after';\n readonly title: string;\n readonly prompt: string;\n readonly afterSeconds: number;\n readonly scheduledAt: string;\n}"
|
|
2188
|
+
},
|
|
2189
|
+
{
|
|
2190
|
+
"name": "Agent",
|
|
2191
|
+
"declaration": "export interface Agent {\n readonly id: SessionId;\n readonly options: AgentOptions;\n readonly session: Session;\n readonly inbox: Inbox;\n readonly status: AgentStatus;\n readonly ctx: Context;\n cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n whenIdle(): Promise<void>;\n runMaintenance<T>(task: (signal: AbortSignal) => Promise<T>): Promise<T>;\n send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;\n followup(message: UserMessage): void;\n steer(message: UserMessage): void;\n inject(message: UserMessage): void;\n}"
|
|
2192
|
+
},
|
|
2193
|
+
{
|
|
2194
|
+
"name": "AgentCancelCause",
|
|
2195
|
+
"declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
|
|
2196
|
+
},
|
|
2197
|
+
{
|
|
2198
|
+
"name": "AgentMessageSource",
|
|
2199
|
+
"declaration": "export interface AgentMessageSource {\n readonly kind: 'agent-message';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
|
|
2200
|
+
},
|
|
2201
|
+
{
|
|
2202
|
+
"name": "AgentOptions",
|
|
2203
|
+
"declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n subagentDepth?: number;\n}"
|
|
2204
|
+
},
|
|
2205
|
+
{
|
|
2206
|
+
"name": "AgentStatus",
|
|
2207
|
+
"declaration": "export type AgentStatus = 'idle' | 'running';"
|
|
2208
|
+
},
|
|
2209
|
+
{
|
|
2210
|
+
"name": "AllowedModelRoute",
|
|
2211
|
+
"declaration": "export interface AllowedModelRoute {\n readonly provider: string;\n readonly model: string;\n}"
|
|
2212
|
+
},
|
|
2213
|
+
{
|
|
2214
|
+
"name": "ApiSessionAgentError",
|
|
2215
|
+
"declaration": "export type ApiSessionAgentError = RemoteError<'session/not-found' | 'session/agent-busy' | 'session/writer-held' | 'gateway/internal'>;"
|
|
2216
|
+
},
|
|
2217
|
+
{
|
|
2218
|
+
"name": "ApiSessionAgentResult",
|
|
2219
|
+
"declaration": "export type ApiSessionAgentResult = { readonly agent: Agent; } | { readonly error: ApiSessionAgentError; };"
|
|
2220
|
+
},
|
|
2221
|
+
{
|
|
2222
|
+
"name": "ApprovalOutcome",
|
|
2223
|
+
"declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
"name": "ApprovalPolicy",
|
|
2227
|
+
"declaration": "export type ApprovalPolicy = 'ask' | 'never';"
|
|
2228
|
+
},
|
|
2229
|
+
{
|
|
2230
|
+
"name": "ApprovalRequestId",
|
|
2231
|
+
"declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
|
|
2232
|
+
},
|
|
2233
|
+
{
|
|
2234
|
+
"name": "AskUserQuestionAnswerItem",
|
|
2235
|
+
"declaration": "export interface AskUserQuestionAnswerItem {\n id: string;\n selected: string[];\n custom?: string;\n}"
|
|
2236
|
+
},
|
|
2237
|
+
{
|
|
2238
|
+
"name": "AskUserQuestionIntent",
|
|
2239
|
+
"declaration": "export type AskUserQuestionIntent = { kind: 'plan-review'; approve: string; callId?: ToolCallId; };"
|
|
2240
|
+
},
|
|
2241
|
+
{
|
|
2242
|
+
"name": "AskUserQuestionItem",
|
|
2243
|
+
"declaration": "export interface AskUserQuestionItem {\n id: string;\n question: string;\n detail?: string;\n header?: string;\n options?: AskUserQuestionOption[];\n multiSelect?: boolean;\n intent?: AskUserQuestionIntent;\n}"
|
|
2244
|
+
},
|
|
2245
|
+
{
|
|
2246
|
+
"name": "AskUserQuestionOption",
|
|
2247
|
+
"declaration": "export interface AskUserQuestionOption {\n label: string;\n description?: string;\n}"
|
|
2248
|
+
},
|
|
2249
|
+
{
|
|
2250
|
+
"name": "AssistantMessage",
|
|
2251
|
+
"declaration": "export interface AssistantMessage extends MessageBase {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
"name": "AssistantProviderMetadata",
|
|
2255
|
+
"declaration": "export interface AssistantProviderMetadata {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
|
|
2256
|
+
},
|
|
2257
|
+
{
|
|
2258
|
+
"name": "AssistantStreamRecord",
|
|
2259
|
+
"declaration": "export type AssistantStreamRecord = { readonly type: 'text-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly texts: readonly string[]; } | { readonly type: 'reasoning-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly texts: readonly string[]; } | { readonly type: 'tool-call-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly id: ToolCallId; readonly name?: string; readonly args: readonly string[]; } | { readonly type: 'chunk'; readonly time: number; readonly chunk: StreamChunk; };"
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
"name": "AtScheduleRecord",
|
|
2263
|
+
"declaration": "export interface AtScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'at';\n readonly title: string;\n readonly prompt: string;\n readonly scheduledAt: string;\n}"
|
|
2264
|
+
},
|
|
2265
|
+
{
|
|
2266
|
+
"name": "AttachmentId",
|
|
2267
|
+
"declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
"name": "Branded",
|
|
2271
|
+
"declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
"name": "BrandedNumber",
|
|
2275
|
+
"declaration": "export type BrandedNumber<B extends string> = number & { readonly [BRAND]: B; };"
|
|
2276
|
+
},
|
|
2277
|
+
{
|
|
2278
|
+
"name": "CancelOptions",
|
|
2279
|
+
"declaration": "export interface CancelOptions {\n keepInbox?: boolean | undefined;\n}"
|
|
2280
|
+
},
|
|
2281
|
+
{
|
|
2282
|
+
"name": "CommandId",
|
|
2283
|
+
"declaration": "export type CommandId = Branded<'CommandId'>;"
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
"name": "CommandSource",
|
|
2287
|
+
"declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
|
|
2288
|
+
},
|
|
2289
|
+
{
|
|
2290
|
+
"name": "CommandSourceMap",
|
|
2291
|
+
"declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
|
|
2292
|
+
},
|
|
2293
|
+
{
|
|
2294
|
+
"name": "CompactionCheckpointSource",
|
|
2295
|
+
"declaration": "export type CompactionCheckpointSource = typeof COMPACT_CHECKPOINT_MARKER & { readonly compactionId: CompactionId; readonly sourceCommandId?: CommandId; };"
|
|
2296
|
+
},
|
|
2297
|
+
{
|
|
2298
|
+
"name": "CompactionId",
|
|
2299
|
+
"declaration": "export type CompactionId = Branded<'CompactionId'>;"
|
|
2300
|
+
},
|
|
2301
|
+
{
|
|
2302
|
+
"name": "ContentBlock",
|
|
2303
|
+
"declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
|
|
2304
|
+
},
|
|
2305
|
+
{
|
|
2306
|
+
"name": "ContentBlockMap",
|
|
2307
|
+
"declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n file: FileBlock;\n 'tool-call': ToolCallBlock;\n 'tool-addition': ToolAdditionBlock;\n 'tool-removal': ToolRemovalBlock;\n}"
|
|
2308
|
+
},
|
|
2309
|
+
{
|
|
2310
|
+
"name": "ContentBlockType",
|
|
2311
|
+
"declaration": "export type ContentBlockType = keyof ContentBlockMap;"
|
|
2312
|
+
},
|
|
2313
|
+
{
|
|
2314
|
+
"name": "ContextBreakdownProjection",
|
|
2315
|
+
"declaration": "export interface ContextBreakdownProjection {\n systemTokens: number;\n toolsTokens: number;\n messageTokens: number;\n}"
|
|
2316
|
+
},
|
|
2317
|
+
{
|
|
2318
|
+
"name": "ContextFormed",
|
|
2319
|
+
"declaration": "export type ContextFormed = { readonly form?: never; } | { readonly form: 'instructions'; } | { readonly form: 'catalog'; } | { readonly form: 'snapshot'; readonly sections: readonly ContextSnapshotSection[]; } | { readonly form: 'notice'; readonly summary: string; } | { readonly form: 'relay'; } | { readonly form: 'recall'; };"
|
|
2320
|
+
},
|
|
2321
|
+
{
|
|
2322
|
+
"name": "ContextPressureProjection",
|
|
2323
|
+
"declaration": "export interface ContextPressureProjection {\n pressureTokens?: number;\n projectedTokens?: number;\n contextWindow?: number;\n}"
|
|
2324
|
+
},
|
|
2325
|
+
{
|
|
2326
|
+
"name": "ContextSnapshotSection",
|
|
2327
|
+
"declaration": "export interface ContextSnapshotSection {\n readonly name: string;\n readonly text: string;\n}"
|
|
2328
|
+
},
|
|
2329
|
+
{
|
|
2330
|
+
"name": "ContinuableSubagentDescriptorData",
|
|
2331
|
+
"declaration": "export interface ContinuableSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'continuable';\n readonly label: string;\n readonly agentProvider?: string;\n readonly agentModel?: string;\n readonly agentReasoningEffort?: ReasoningEffortId;\n readonly persona?: string;\n readonly toolFilter?: ToolRestriction;\n}"
|
|
2332
|
+
},
|
|
2333
|
+
{
|
|
2334
|
+
"name": "DeveloperMessage",
|
|
2335
|
+
"declaration": "export interface DeveloperMessage extends MessageBase {\n readonly role: 'developer';\n}"
|
|
2336
|
+
},
|
|
2337
|
+
{
|
|
2338
|
+
"name": "EpochHeader",
|
|
2339
|
+
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n system?: never;\n}"
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
"name": "EveryScheduleDispatchChange",
|
|
2343
|
+
"declaration": "export interface EveryScheduleDispatchChange {\n readonly version: 1;\n readonly operation: 'dispatch';\n readonly id: ScheduleId;\n readonly acceptedAt: string;\n}"
|
|
2344
|
+
},
|
|
2345
|
+
{
|
|
2346
|
+
"name": "EveryScheduleRecord",
|
|
2347
|
+
"declaration": "export interface EveryScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'every';\n readonly title: string;\n readonly prompt: string;\n readonly everySeconds: number;\n readonly scheduledAt: string;\n}"
|
|
2348
|
+
},
|
|
2349
|
+
{
|
|
2350
|
+
"name": "FeedbackCategory",
|
|
2351
|
+
"declaration": "export type FeedbackCategory = 'task-result' | 'instruction-following' | 'product-interaction' | 'service-stability' | 'resource-cost' | 'security-privacy-permission' | 'other';"
|
|
2352
|
+
},
|
|
2353
|
+
{
|
|
2354
|
+
"name": "FeedbackRecord",
|
|
2355
|
+
"declaration": "export interface FeedbackRecord {\n readonly text?: string;\n readonly category?: FeedbackCategory;\n}"
|
|
2356
|
+
},
|
|
2357
|
+
{
|
|
2358
|
+
"name": "FileAttachmentRef",
|
|
2359
|
+
"declaration": "export interface FileAttachmentRef {\n attachmentId: AttachmentId;\n name: string;\n bytes: number;\n}"
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
"name": "FileBlock",
|
|
2363
|
+
"declaration": "export interface FileBlock {\n type: 'file';\n attachment: FileAttachmentRef;\n}"
|
|
2364
|
+
},
|
|
2365
|
+
{
|
|
2366
|
+
"name": "FinishReason",
|
|
2367
|
+
"declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
|
|
2368
|
+
},
|
|
2369
|
+
{
|
|
2370
|
+
"name": "FinishReasonMap",
|
|
2371
|
+
"declaration": "export interface FinishReasonMap {\n stop: { kind: 'stop'; };\n 'tool-calls': { kind: 'tool-calls'; };\n 'max-tokens': { kind: 'max-tokens'; };\n aborted: { kind: 'aborted'; failure: LlmFailure; };\n error: { kind: 'error'; failure: LlmFailure; };\n}"
|
|
2372
|
+
},
|
|
2373
|
+
{
|
|
2374
|
+
"name": "GoalBlockReason",
|
|
2375
|
+
"declaration": "export interface GoalBlockReason {\n readonly code: string;\n readonly message: string;\n}"
|
|
2376
|
+
},
|
|
2377
|
+
{
|
|
2378
|
+
"name": "GoalChangeMeta",
|
|
2379
|
+
"declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
"name": "GoalClearChangeMeta",
|
|
2383
|
+
"declaration": "export interface GoalClearChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: 'clear';\n readonly cleared: GoalRef;\n readonly clearedAt: number;\n}"
|
|
2384
|
+
},
|
|
2385
|
+
{
|
|
2386
|
+
"name": "GoalId",
|
|
2387
|
+
"declaration": "export type GoalId = Branded<'GoalId'>;"
|
|
2388
|
+
},
|
|
2389
|
+
{
|
|
2390
|
+
"name": "GoalMessageSource",
|
|
2391
|
+
"declaration": "export interface GoalMessageSource {\n readonly kind: 'goal';\n readonly goalId: GoalId;\n readonly revision: number;\n readonly round: number;\n}"
|
|
2392
|
+
},
|
|
2393
|
+
{
|
|
2394
|
+
"name": "GoalOperation",
|
|
2395
|
+
"declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
"name": "GoalPhase",
|
|
2399
|
+
"declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
|
|
2400
|
+
},
|
|
2401
|
+
{
|
|
2402
|
+
"name": "GoalProjection",
|
|
2403
|
+
"declaration": "export interface GoalProjection {\n readonly goal: GoalSnapshot;\n readonly roundsStarted: number;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
|
|
2404
|
+
},
|
|
2405
|
+
{
|
|
2406
|
+
"name": "GoalRef",
|
|
2407
|
+
"declaration": "export interface GoalRef {\n readonly id: GoalId;\n readonly revision: number;\n}"
|
|
2408
|
+
},
|
|
2409
|
+
{
|
|
2410
|
+
"name": "GoalSnapshot",
|
|
2411
|
+
"declaration": "export interface GoalSnapshot extends GoalRef {\n readonly objective: string;\n readonly phase: GoalPhase;\n readonly blockedReason?: GoalBlockReason;\n readonly maxGoalRounds: number;\n}"
|
|
2412
|
+
},
|
|
2413
|
+
{
|
|
2414
|
+
"name": "GoalSnapshotChangeMeta",
|
|
2415
|
+
"declaration": "export interface GoalSnapshotChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: Exclude<GoalOperation, 'clear'>;\n readonly goal: GoalSnapshot;\n readonly roundsStarted: number;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
|
|
2416
|
+
},
|
|
2417
|
+
{
|
|
2418
|
+
"name": "ImageAttachmentLimits",
|
|
2419
|
+
"declaration": "export interface ImageAttachmentLimits {\n maxImageBytes: number;\n maxImagesPerMessage: number;\n maxMessageImageBytes: number;\n maxImagePixels: number;\n maxImageDimension: number;\n mediaTypes: readonly ImageMediaType[];\n}"
|
|
2420
|
+
},
|
|
2421
|
+
{
|
|
2422
|
+
"name": "ImageAttachmentRef",
|
|
2423
|
+
"declaration": "export interface ImageAttachmentRef {\n attachmentId: AttachmentId;\n mediaType: ImageMediaType;\n bytes: number;\n width: number;\n height: number;\n name?: string;\n originalDimensions?: { width: number; height: number; };\n}"
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
"name": "ImageBlock",
|
|
2427
|
+
"declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n offloaded?: true;\n}"
|
|
2428
|
+
},
|
|
2429
|
+
{
|
|
2430
|
+
"name": "ImageMediaType",
|
|
2431
|
+
"declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
|
|
2432
|
+
},
|
|
2433
|
+
{
|
|
2434
|
+
"name": "ImageOffloadTarget",
|
|
2435
|
+
"declaration": "export interface ImageOffloadTarget {\n seq: SessionSeq;\n imageIndexes: number[];\n}"
|
|
2436
|
+
},
|
|
2437
|
+
{
|
|
2438
|
+
"name": "Inbox",
|
|
2439
|
+
"declaration": "export interface Inbox {\n readonly nextTurn: readonly UserMessage[];\n readonly nextStep: readonly UserMessage[];\n clear(): void;\n append(target: InboxTarget, message: UserMessage): void;\n prepend(target: InboxTarget, message: UserMessage): void;\n replace(messageId: MessageId, newMessage: UserMessage): boolean;\n remove(messageId: MessageId): boolean;\n splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];\n}"
|
|
2440
|
+
},
|
|
2441
|
+
{
|
|
2442
|
+
"name": "InboxTarget",
|
|
2443
|
+
"declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
|
|
2444
|
+
},
|
|
2445
|
+
{
|
|
2446
|
+
"name": "InboxWireState",
|
|
2447
|
+
"declaration": "export interface InboxWireState {\n readonly 'next-turn': readonly JsonValue[];\n readonly 'next-step': readonly JsonValue[];\n}"
|
|
2448
|
+
},
|
|
2449
|
+
{
|
|
2450
|
+
"name": "JobId",
|
|
2451
|
+
"declaration": "export type JobId = Branded<'JobId'>;"
|
|
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
|
+
},
|
|
2473
|
+
{
|
|
2474
|
+
"name": "JsonValue",
|
|
2475
|
+
"declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
|
|
2476
|
+
},
|
|
2477
|
+
{
|
|
2478
|
+
"name": "KnownCatalogMode",
|
|
2479
|
+
"declaration": "export type KnownCatalogMode = { readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; };"
|
|
2480
|
+
},
|
|
2481
|
+
{
|
|
2482
|
+
"name": "LegacyAfterScheduleRecord",
|
|
2483
|
+
"declaration": "export interface LegacyAfterScheduleRecord extends Omit<AfterScheduleRecord, 'title'> {\n readonly title?: string;\n}"
|
|
2484
|
+
},
|
|
2485
|
+
{
|
|
2486
|
+
"name": "LegacyAtScheduleRecord",
|
|
2487
|
+
"declaration": "export interface LegacyAtScheduleRecord extends Omit<AtScheduleRecord, 'title'> {\n readonly title?: string;\n}"
|
|
2488
|
+
},
|
|
2489
|
+
{
|
|
2490
|
+
"name": "LegacyEveryScheduleRecord",
|
|
2491
|
+
"declaration": "export interface LegacyEveryScheduleRecord extends Omit<EveryScheduleRecord, 'title'> {\n readonly title?: string;\n}"
|
|
2492
|
+
},
|
|
2493
|
+
{
|
|
2494
|
+
"name": "LegacyScheduleRecord",
|
|
2495
|
+
"declaration": "export type LegacyScheduleRecord = LegacyAfterScheduleRecord | LegacyAtScheduleRecord | LegacyEveryScheduleRecord;"
|
|
2496
|
+
},
|
|
2497
|
+
{
|
|
2498
|
+
"name": "LlmAttemptId",
|
|
2499
|
+
"declaration": "export type LlmAttemptId = Branded<'LlmAttemptId'>;"
|
|
2500
|
+
},
|
|
2501
|
+
{
|
|
2502
|
+
"name": "LlmCallConfig",
|
|
2503
|
+
"declaration": "export interface LlmCallConfig extends LlmCallControls {\n provider: string;\n model: string;\n}"
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
"name": "LlmCallConfigAdapterDefaults",
|
|
2507
|
+
"declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
"name": "LlmCallControls",
|
|
2511
|
+
"declaration": "export interface LlmCallControls {\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
"name": "LlmFailure",
|
|
2515
|
+
"declaration": "export interface LlmFailure {\n readonly message: string;\n readonly code: string;\n readonly status?: number;\n readonly providerRetryAfterMs?: number;\n readonly requestId?: ProviderRequestId;\n readonly offloadImages?: number;\n}"
|
|
2516
|
+
},
|
|
2517
|
+
{
|
|
2518
|
+
"name": "LlmRetryEventData",
|
|
2519
|
+
"declaration": "export type LlmRetryEventData = { retryId: RetryId; turn: number; step: number; provider: string; mode: 'normal'; policyKey: string; retry: number; maxRetries: number; delayMs: number; failure: LlmFailure; } | { retryId: RetryId; turn: number; step: number; provider: string; mode: 'always'; policyKey: string; retry: number; delayMs: number; failure: LlmFailure; };"
|
|
2520
|
+
},
|
|
2521
|
+
{
|
|
2522
|
+
"name": "LlmRetryStartedEventData",
|
|
2523
|
+
"declaration": "export interface LlmRetryStartedEventData {\n retryId: RetryId;\n turn: number;\n step: number;\n retry: number;\n}"
|
|
2524
|
+
},
|
|
2525
|
+
{
|
|
2526
|
+
"name": "Message",
|
|
2527
|
+
"declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
"name": "MessageBase",
|
|
2531
|
+
"declaration": "export interface MessageBase {\n readonly id: MessageId;\n readonly content: readonly ContentBlock[];\n readonly source: MessageSource;\n}"
|
|
2532
|
+
},
|
|
2533
|
+
{
|
|
2534
|
+
"name": "MessageFeedbackDelete",
|
|
2535
|
+
"declaration": "export interface MessageFeedbackDelete {\n readonly sessionId: SessionId;\n readonly messageId: MessageId;\n}"
|
|
2536
|
+
},
|
|
2537
|
+
{
|
|
2538
|
+
"name": "MessageFeedbackItem",
|
|
2539
|
+
"declaration": "export interface MessageFeedbackItem {\n readonly messageId: MessageId;\n readonly rating: MessageFeedbackRating;\n readonly note?: string;\n readonly category?: FeedbackCategory;\n readonly version: MessageFeedbackVersion;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
|
|
2540
|
+
},
|
|
2541
|
+
{
|
|
2542
|
+
"name": "MessageFeedbackPut",
|
|
2543
|
+
"declaration": "export interface MessageFeedbackPut {\n readonly sessionId: SessionId;\n readonly item: MessageFeedbackItem;\n}"
|
|
2544
|
+
},
|
|
2545
|
+
{
|
|
2546
|
+
"name": "MessageFeedbackRating",
|
|
2547
|
+
"declaration": "export type MessageFeedbackRating = 'positive' | 'negative';"
|
|
2548
|
+
},
|
|
2549
|
+
{
|
|
2550
|
+
"name": "MessageFeedbackVersion",
|
|
2551
|
+
"declaration": "export type MessageFeedbackVersion = Branded<'MessageFeedbackVersion'>;"
|
|
2552
|
+
},
|
|
2553
|
+
{
|
|
2554
|
+
"name": "MessageId",
|
|
2555
|
+
"declaration": "export type MessageId = Branded<'MessageId'>;"
|
|
2556
|
+
},
|
|
2557
|
+
{
|
|
2558
|
+
"name": "MessageRoleMap",
|
|
2559
|
+
"declaration": "export interface MessageRoleMap {\n system: SystemMessage;\n developer: DeveloperMessage;\n user: UserMessage;\n assistant: AssistantMessage;\n tool: ToolResultMessage;\n}"
|
|
2560
|
+
},
|
|
2561
|
+
{
|
|
2562
|
+
"name": "MessageSource",
|
|
2563
|
+
"declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
|
|
2564
|
+
},
|
|
2565
|
+
{
|
|
2566
|
+
"name": "MessageSourceMap",
|
|
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}"
|
|
2568
|
+
},
|
|
2569
|
+
{
|
|
2570
|
+
"name": "ModelCatalog",
|
|
2571
|
+
"declaration": "export interface ModelCatalog {\n readonly default: ModelSelection;\n readonly routableProviders: readonly string[];\n readonly groups: readonly ModelProviderGroup[];\n readonly failures: readonly ModelCatalogFailure[];\n}"
|
|
2572
|
+
},
|
|
2573
|
+
{
|
|
2574
|
+
"name": "ModelCatalogFailure",
|
|
2575
|
+
"declaration": "export interface ModelCatalogFailure {\n readonly id: string;\n readonly name: string;\n readonly message: string;\n}"
|
|
2576
|
+
},
|
|
2577
|
+
{
|
|
2578
|
+
"name": "ModelCatalogModel",
|
|
2579
|
+
"declaration": "export interface ModelCatalogModel {\n readonly id: string;\n readonly name: string;\n readonly description?: string;\n readonly reasoning?: ModelReasoning;\n}"
|
|
2580
|
+
},
|
|
2581
|
+
{
|
|
2582
|
+
"name": "ModelMessageSource",
|
|
2583
|
+
"declaration": "export interface ModelMessageSource extends AssistantProviderMetadata {\n kind: 'model';\n}"
|
|
2584
|
+
},
|
|
2585
|
+
{
|
|
2586
|
+
"name": "ModelProviderGroup",
|
|
2587
|
+
"declaration": "export interface ModelProviderGroup {\n readonly id: string;\n readonly name: string;\n readonly models: readonly ModelCatalogModel[];\n}"
|
|
2588
|
+
},
|
|
2589
|
+
{
|
|
2590
|
+
"name": "ModelReasoning",
|
|
2591
|
+
"declaration": "export interface ModelReasoning {\n readonly efforts: readonly ModelReasoningEffort[];\n readonly defaultEffort?: string;\n}"
|
|
2592
|
+
},
|
|
2593
|
+
{
|
|
2594
|
+
"name": "ModelReasoningEffort",
|
|
2595
|
+
"declaration": "export interface ModelReasoningEffort {\n readonly id: string;\n readonly name: string;\n readonly description?: string;\n}"
|
|
2596
|
+
},
|
|
2597
|
+
{
|
|
2598
|
+
"name": "ModelSelection",
|
|
2599
|
+
"declaration": "export interface ModelSelection {\n readonly provider: string;\n readonly model: string;\n readonly reasoningEffort?: string;\n}"
|
|
2600
|
+
},
|
|
2601
|
+
{
|
|
2602
|
+
"name": "ModelSelectionProjection",
|
|
2603
|
+
"declaration": "export interface ModelSelectionProjection {\n readonly lastUsed: ModelSelection | null;\n readonly next: ModelSelection | null;\n}"
|
|
2604
|
+
},
|
|
2605
|
+
{
|
|
2606
|
+
"name": "NativeFileApplication",
|
|
2607
|
+
"declaration": "export interface NativeFileApplication {\n readonly id: string;\n readonly name: string;\n readonly default: boolean;\n readonly icon: string | null;\n}"
|
|
2608
|
+
},
|
|
2609
|
+
{
|
|
2610
|
+
"name": "OfficeToPdfErrorCode",
|
|
2611
|
+
"declaration": "export type OfficeToPdfErrorCode = 'input-too-large' | 'output-too-large' | 'invalid-document' | 'unsupported-format' | 'invalid-output' | 'timeout' | 'unavailable' | 'failed' | 'busy' | 'source-changed';"
|
|
2612
|
+
},
|
|
2613
|
+
{
|
|
2614
|
+
"name": "OneShotScheduleDispatchChange",
|
|
2615
|
+
"declaration": "export interface OneShotScheduleDispatchChange {\n readonly version: 1;\n readonly operation: 'dispatch';\n readonly id: ScheduleId;\n}"
|
|
2616
|
+
},
|
|
2617
|
+
{
|
|
2618
|
+
"name": "OneShotSubagentDescriptorData",
|
|
2619
|
+
"declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
|
|
2620
|
+
},
|
|
2621
|
+
{
|
|
2622
|
+
"name": "OptionalSessionSeq",
|
|
2623
|
+
"declaration": "export type OptionalSessionSeq = SessionSeq | null;"
|
|
2624
|
+
},
|
|
2625
|
+
{
|
|
2626
|
+
"name": "PendingUserQuestion",
|
|
2627
|
+
"declaration": "export interface PendingUserQuestion {\n readonly callId: ToolCallId;\n readonly questions: readonly AskUserQuestionItem[];\n readonly state: UserQuestionState;\n}"
|
|
2628
|
+
},
|
|
2629
|
+
{
|
|
2630
|
+
"name": "PermissionSelection",
|
|
2631
|
+
"declaration": "export interface PermissionSelection {\n currentValue: string;\n}"
|
|
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
|
+
},
|
|
2645
|
+
{
|
|
2646
|
+
"name": "PromptContentPart",
|
|
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'>; };"
|
|
2648
|
+
},
|
|
2649
|
+
{
|
|
2650
|
+
"name": "ProviderRequestId",
|
|
2651
|
+
"declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
|
|
2652
|
+
},
|
|
2653
|
+
{
|
|
2654
|
+
"name": "PtcDispatchEventData",
|
|
2655
|
+
"declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n meta?: JsonValue;\n error?: { name: string; code: string; reason?: string; };\n}"
|
|
2656
|
+
},
|
|
2657
|
+
{
|
|
2658
|
+
"name": "PtcDispatchStartEventData",
|
|
2659
|
+
"declaration": "export interface PtcDispatchStartEventData {\n rootCallId: ToolCallId;\n parentCallId: ToolCallId;\n subCallId: ToolCallId;\n name: string;\n arguments: unknown;\n}"
|
|
2660
|
+
},
|
|
2661
|
+
{
|
|
2662
|
+
"name": "QueueAction",
|
|
2663
|
+
"declaration": "export type QueueAction = { readonly kind: 'edit'; readonly content: readonly TextBlock[]; } | { readonly kind: 'remove'; } | { readonly kind: 'steer'; };"
|
|
2664
|
+
},
|
|
2665
|
+
{
|
|
2666
|
+
"name": "ReasoningBlock",
|
|
2667
|
+
"declaration": "export interface ReasoningBlock {\n type: 'reasoning';\n text: string;\n}"
|
|
2668
|
+
},
|
|
2669
|
+
{
|
|
2670
|
+
"name": "ReasoningEffortId",
|
|
2671
|
+
"declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
|
|
2672
|
+
},
|
|
2673
|
+
{
|
|
2674
|
+
"name": "RemoteAccessDeniedDetails",
|
|
2675
|
+
"declaration": "export interface RemoteAccessDeniedDetails {\n readonly action: string;\n readonly reason: string;\n}"
|
|
2676
|
+
},
|
|
2677
|
+
{
|
|
2678
|
+
"name": "RemoteError",
|
|
2679
|
+
"declaration": "export class RemoteError<Code extends RemoteErrorCode = RemoteErrorCode> extends Error {\n readonly isRABIRemoteError: true;\n}"
|
|
2680
|
+
},
|
|
2681
|
+
{
|
|
2682
|
+
"name": "RemoteErrorCode",
|
|
2683
|
+
"declaration": "export type RemoteErrorCode = keyof RemoteErrorDetailsMap;"
|
|
2684
|
+
},
|
|
2685
|
+
{
|
|
2686
|
+
"name": "RemoteErrorDetailsMap",
|
|
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 'plugin-market/invalid-index-url': { readonly url: string; readonly reason: string; };\n 'plugin-market/unknown-index': { readonly url: string; };\n 'plugin-market/fetch-failed': { readonly url: string; readonly reason: string; };\n 'plugin-market/invalid-index': { readonly url: string; readonly path: string; readonly reason: string; };\n 'plugin-market/invalid-query': { readonly field: string; readonly reason: string; };\n 'plugin-market/settings-unavailable': Record<string, never>;\n}"
|
|
2688
|
+
},
|
|
2689
|
+
{
|
|
2690
|
+
"name": "ReplayEnvelope",
|
|
2691
|
+
"declaration": "export interface ReplayEnvelope {\n response: unknown;\n blocks?: readonly unknown[];\n}"
|
|
2692
|
+
},
|
|
2693
|
+
{
|
|
2694
|
+
"name": "RequestContext",
|
|
2695
|
+
"declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n systemPromptUpdate?: SystemPromptUpdate;\n}"
|
|
2696
|
+
},
|
|
2697
|
+
{
|
|
2698
|
+
"name": "RequestHeaderReason",
|
|
2699
|
+
"declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
|
|
2700
|
+
},
|
|
2701
|
+
{
|
|
2702
|
+
"name": "RetryId",
|
|
2703
|
+
"declaration": "export type RetryId = Branded<'RetryId'>;"
|
|
2704
|
+
},
|
|
2705
|
+
{
|
|
2706
|
+
"name": "SandboxMode",
|
|
2707
|
+
"declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
|
|
2708
|
+
},
|
|
2709
|
+
{
|
|
2710
|
+
"name": "ScheduleChange",
|
|
2711
|
+
"declaration": "export type ScheduleChange = ScheduleCreateChange | ScheduleDeleteChange | ScheduleDispatchChange;"
|
|
2712
|
+
},
|
|
2713
|
+
{
|
|
2714
|
+
"name": "ScheduleCreateChange",
|
|
2715
|
+
"declaration": "export interface ScheduleCreateChange {\n readonly version: 1;\n readonly operation: 'create';\n readonly schedule: LegacyScheduleRecord;\n}"
|
|
2716
|
+
},
|
|
2717
|
+
{
|
|
2718
|
+
"name": "ScheduleDeleteChange",
|
|
2719
|
+
"declaration": "export interface ScheduleDeleteChange {\n readonly version: 1;\n readonly operation: 'delete';\n readonly id: ScheduleId;\n}"
|
|
2720
|
+
},
|
|
2721
|
+
{
|
|
2722
|
+
"name": "ScheduleDispatchChange",
|
|
2723
|
+
"declaration": "export type ScheduleDispatchChange = OneShotScheduleDispatchChange | EveryScheduleDispatchChange;"
|
|
2724
|
+
},
|
|
2725
|
+
{
|
|
2726
|
+
"name": "ScheduleId",
|
|
2727
|
+
"declaration": "export type ScheduleId = Branded<'ScheduleId'>;"
|
|
2728
|
+
},
|
|
2729
|
+
{
|
|
2730
|
+
"name": "Session",
|
|
2731
|
+
"declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n get id(): SessionId;\n readonly firstLiveSeq: SessionLogOffset;\n readonly firstLifecycleSeq: SessionLogOffset;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n toolHistory(): ToolHistory;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
|
|
2732
|
+
},
|
|
2733
|
+
{
|
|
2734
|
+
"name": "SessionActivity",
|
|
2735
|
+
"declaration": "export interface SessionActivity {\n readonly kind: SessionActivityKind;\n readonly items?: readonly SessionActivityItem[];\n}"
|
|
2736
|
+
},
|
|
2737
|
+
{
|
|
2738
|
+
"name": "SessionActivityItem",
|
|
2739
|
+
"declaration": "export interface SessionActivityItem {\n readonly id: string;\n readonly label?: string;\n}"
|
|
2740
|
+
},
|
|
2741
|
+
{
|
|
2742
|
+
"name": "SessionActivityKind",
|
|
2743
|
+
"declaration": "export type SessionActivityKind = keyof SessionActivityKindMap;"
|
|
2744
|
+
},
|
|
2745
|
+
{
|
|
2746
|
+
"name": "SessionActivityKindMap",
|
|
2747
|
+
"declaration": "export interface SessionActivityKindMap {\n turn: true;\n job: true;\n subagent: true;\n schedule: true;\n}"
|
|
2748
|
+
},
|
|
2749
|
+
{
|
|
2750
|
+
"name": "SessionAddress",
|
|
2751
|
+
"declaration": "export type SessionAddress = { readonly kind: 'session'; readonly sessionId: SessionId; } | { readonly kind: 'subagent'; readonly parentSessionId: SessionId; readonly childSessionId: SessionId; readonly mode: 'one-shot' | 'continuable' | 'unknown'; };"
|
|
2752
|
+
},
|
|
2753
|
+
{
|
|
2754
|
+
"name": "SessionAssistantStreamAttempt",
|
|
2755
|
+
"declaration": "export interface SessionAssistantStreamAttempt {\n readonly attemptId: LlmAttemptId;\n readonly startedAfterSeq: SessionSeqCursor;\n readonly turn: number;\n readonly step: number;\n readonly nextIndex: number;\n readonly stream: readonly JsonValue[];\n}"
|
|
2756
|
+
},
|
|
2757
|
+
{
|
|
2758
|
+
"name": "SessionAssistantStreamBaseline",
|
|
2759
|
+
"declaration": "export interface SessionAssistantStreamBaseline {\n readonly revision: number;\n readonly activeAttempt?: SessionAssistantStreamAttempt;\n}"
|
|
2760
|
+
},
|
|
2761
|
+
{
|
|
2762
|
+
"name": "SessionAssistantStreamFrame",
|
|
2763
|
+
"declaration": "export type SessionAssistantStreamFrame = { readonly type: 'start'; readonly attemptId: LlmAttemptId; readonly revision: number; readonly startedAfterSeq: SessionSeqCursor; readonly turn: number; readonly step: number; } | { readonly type: 'chunk'; readonly attemptId: LlmAttemptId; readonly revision: number; readonly index: number; readonly time: number; readonly chunk: JsonValue; } | { readonly type: 'end'; readonly attemptId: LlmAttemptId; readonly revision: number; readonly index: number; readonly outcome: { readonly kind: 'committed'; readonly eventType: 'assistant/message' | 'assistant/attempt'; readonly seq: number; } | { readonly kind: 'abandoned'; }; };"
|
|
2764
|
+
},
|
|
2765
|
+
{
|
|
2766
|
+
"name": "SessionAttachmentRequest",
|
|
2767
|
+
"declaration": "export interface SessionAttachmentRequest {\n readonly sessionId: SessionId;\n readonly attachmentId: AttachmentIdType;\n}"
|
|
2768
|
+
},
|
|
2769
|
+
{
|
|
2770
|
+
"name": "SessionAttachmentValue",
|
|
2771
|
+
"declaration": "export interface SessionAttachmentValue {\n readonly attachment: ImageAttachmentRef;\n readonly data: string;\n}"
|
|
2772
|
+
},
|
|
2773
|
+
{
|
|
2774
|
+
"name": "SessionCancelRequest",
|
|
2775
|
+
"declaration": "export interface SessionCancelRequest {\n readonly sessionId: SessionId;\n}"
|
|
2776
|
+
},
|
|
2777
|
+
{
|
|
2778
|
+
"name": "SessionCancelValue",
|
|
2779
|
+
"declaration": "export interface SessionCancelValue {\n readonly accepted: true;\n}"
|
|
2780
|
+
},
|
|
2781
|
+
{
|
|
2782
|
+
"name": "SessionControlBaseline",
|
|
2783
|
+
"declaration": "export interface SessionControlBaseline {\n readonly projections: Readonly<Record<SessionId, SessionProjectionBaseline>>;\n}"
|
|
2784
|
+
},
|
|
2785
|
+
{
|
|
2786
|
+
"name": "SessionControlFrame",
|
|
2787
|
+
"declaration": "export type SessionControlFrame = { readonly type: 'baseline'; readonly value: SessionControlBaseline; } | ({ readonly type: 'projection'; } & SessionProjectionUpdate);"
|
|
2788
|
+
},
|
|
2789
|
+
{
|
|
2790
|
+
"name": "SessionCreateRequest",
|
|
2791
|
+
"declaration": "export interface SessionCreateRequest {\n readonly workspaceId?: WorkspaceId;\n readonly cwd?: string;\n readonly sessionId?: SessionId;\n readonly agentPreset?: string;\n}"
|
|
2792
|
+
},
|
|
2793
|
+
{
|
|
2794
|
+
"name": "SessionCreateValue",
|
|
2795
|
+
"declaration": "export interface SessionCreateValue {\n readonly sessionId: SessionId;\n readonly agentPreset?: string;\n}"
|
|
2796
|
+
},
|
|
2797
|
+
{
|
|
2798
|
+
"name": "SessionEvent",
|
|
2799
|
+
"declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: SessionSeq; time: number; data: SessionEventMap[K]; ignorable?: true; } & (K extends SurfaceEventType ? SurfaceIntent<K> : { surfaceOp?: never; sourceEventSeqs?: never; }) }[T];"
|
|
2800
|
+
},
|
|
2801
|
+
{
|
|
2802
|
+
"name": "SessionEventEntry",
|
|
2803
|
+
"declaration": "export interface SessionEventEntry {\n readonly type: 'event';\n readonly event: SessionWireEvent;\n}"
|
|
2804
|
+
},
|
|
2805
|
+
{
|
|
2806
|
+
"name": "SessionEventMap",
|
|
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('@unieai/rabi-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}"
|
|
2808
|
+
},
|
|
2809
|
+
{
|
|
2810
|
+
"name": "SessionEventType",
|
|
2811
|
+
"declaration": "export type SessionEventType = keyof SessionEventMap;"
|
|
2812
|
+
},
|
|
2813
|
+
{
|
|
2814
|
+
"name": "SessionFollowFrame",
|
|
2815
|
+
"declaration": "export type SessionFollowFrame = { readonly type: 'snapshot'; readonly header: SessionWireHeader; readonly cursor: number; readonly records: readonly SessionHistoryRecord[]; readonly hasMore: boolean; readonly projections: SessionProjectionBaseline; readonly assistantStream?: SessionAssistantStreamBaseline; } | SessionEventEntry | { readonly type: 'assistant-stream'; readonly frame: SessionAssistantStreamFrame; };"
|
|
2816
|
+
},
|
|
2817
|
+
{
|
|
2818
|
+
"name": "SessionFollowRequest",
|
|
2819
|
+
"declaration": "export interface SessionFollowRequest extends Pick<SessionPageRequest, 'maxMessages' | 'turnWindow'> {\n readonly address: SessionAddress;\n readonly assistantStream?: true;\n}"
|
|
2820
|
+
},
|
|
2821
|
+
{
|
|
2822
|
+
"name": "SessionForkRequest",
|
|
2823
|
+
"declaration": "export interface SessionForkRequest {\n readonly sessionId: SessionId;\n readonly atSeq?: number;\n readonly allowMigration?: boolean;\n}"
|
|
2824
|
+
},
|
|
2825
|
+
{
|
|
2826
|
+
"name": "SessionForkValue",
|
|
2827
|
+
"declaration": "export interface SessionForkValue {\n readonly sessionId: SessionId;\n}"
|
|
2828
|
+
},
|
|
2829
|
+
{
|
|
2830
|
+
"name": "SessionHeader",
|
|
2831
|
+
"declaration": "export interface SessionHeader {\n readonly version: typeof SESSION_FORMAT_VERSION;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly isSeeded: boolean;\n readonly origin?: 'subagent';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n}"
|
|
2832
|
+
},
|
|
2833
|
+
{
|
|
2834
|
+
"name": "SessionHistoryRecord",
|
|
2835
|
+
"declaration": "export type SessionHistoryRecord = SessionEventEntry;"
|
|
2836
|
+
},
|
|
2837
|
+
{
|
|
2838
|
+
"name": "SessionId",
|
|
2839
|
+
"declaration": "export type SessionId = Branded<'SessionId'>;"
|
|
2840
|
+
},
|
|
2841
|
+
{
|
|
2842
|
+
"name": "SessionInspection",
|
|
2843
|
+
"declaration": "export interface SessionInspection extends SessionStorageMetadata {\n readonly events: readonly SessionEvent[];\n}"
|
|
2844
|
+
},
|
|
2845
|
+
{
|
|
2846
|
+
"name": "SessionListMetadata",
|
|
2847
|
+
"declaration": "export interface SessionListMetadata {\n readonly blank: boolean;\n readonly lastPromptAt: number | null;\n}"
|
|
2848
|
+
},
|
|
2849
|
+
{
|
|
2850
|
+
"name": "SessionListRequest",
|
|
2851
|
+
"declaration": "export interface SessionListRequest {\n readonly cursor?: string;\n}"
|
|
2852
|
+
},
|
|
2853
|
+
{
|
|
2854
|
+
"name": "SessionListValue",
|
|
2855
|
+
"declaration": "export interface SessionListValue {\n readonly items: readonly SessionSummary[];\n}"
|
|
2856
|
+
},
|
|
2857
|
+
{
|
|
2858
|
+
"name": "SessionLogOffset",
|
|
2859
|
+
"declaration": "export type SessionLogOffset = BrandedNumber<'SessionLogOffset'>;"
|
|
2860
|
+
},
|
|
2861
|
+
{
|
|
2862
|
+
"name": "SessionOpenWorkspacePathRequest",
|
|
2863
|
+
"declaration": "export interface SessionOpenWorkspacePathRequest {\n readonly action?: 'reveal';\n readonly application?: string;\n readonly path: string;\n}"
|
|
2864
|
+
},
|
|
2865
|
+
{
|
|
2866
|
+
"name": "SessionOpenWorkspacePathValue",
|
|
2867
|
+
"declaration": "export interface SessionOpenWorkspacePathValue {\n readonly opened: true;\n}"
|
|
2868
|
+
},
|
|
2869
|
+
{
|
|
2870
|
+
"name": "SessionPage",
|
|
2871
|
+
"declaration": "export interface SessionPage {\n readonly records: readonly SessionHistoryRecord[];\n readonly hasMore: boolean;\n}"
|
|
2872
|
+
},
|
|
2873
|
+
{
|
|
2874
|
+
"name": "SessionPageRequest",
|
|
2875
|
+
"declaration": "export interface SessionPageRequest {\n readonly address: SessionAddress;\n readonly throughSeq: number;\n readonly beforeSeq?: number;\n readonly maxMessages?: number;\n readonly turnWindow?: { readonly minMessages: number; readonly minTurns: number; };\n}"
|
|
2876
|
+
},
|
|
2877
|
+
{
|
|
2878
|
+
"name": "SessionProjectionBaseline",
|
|
2879
|
+
"declaration": "export interface SessionProjectionBaseline {\n readonly asOfSeq: number;\n readonly values: SessionProjectionValues;\n}"
|
|
2880
|
+
},
|
|
2881
|
+
{
|
|
2882
|
+
"name": "SessionProjectionHints",
|
|
2883
|
+
"declaration": "export interface SessionProjectionHints {\n readonly kind: 'cached' | 'sequenced';\n readonly asOfSeq: number;\n readonly values: SessionProjectionValues;\n}"
|
|
2884
|
+
},
|
|
2885
|
+
{
|
|
2886
|
+
"name": "SessionProjectionMap",
|
|
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}"
|
|
2888
|
+
},
|
|
2889
|
+
{
|
|
2890
|
+
"name": "SessionProjectionsRequest",
|
|
2891
|
+
"declaration": "export interface SessionProjectionsRequest {\n readonly sessionId: SessionId;\n}"
|
|
2892
|
+
},
|
|
2893
|
+
{
|
|
2894
|
+
"name": "SessionProjectionsValue",
|
|
2895
|
+
"declaration": "export type SessionProjectionsValue = (SessionProjectionBaseline & { readonly kind: 'sequenced'; }) | { readonly kind: 'migration-required'; readonly values: SessionProjectionValues; } | null;"
|
|
2896
|
+
},
|
|
2897
|
+
{
|
|
2898
|
+
"name": "SessionProjectionUpdate",
|
|
2899
|
+
"declaration": "export interface SessionProjectionUpdate {\n readonly sessionId: SessionId;\n readonly key: string;\n readonly value: JsonValue;\n readonly seq: number;\n}"
|
|
2900
|
+
},
|
|
2901
|
+
{
|
|
2902
|
+
"name": "SessionProjectionValue",
|
|
2903
|
+
"declaration": "export type SessionProjectionValue = JsonValue;"
|
|
2904
|
+
},
|
|
2905
|
+
{
|
|
2906
|
+
"name": "SessionProjectionValues",
|
|
2907
|
+
"declaration": "export type SessionProjectionValues = Partial<SessionProjectionMap> & Readonly<Record<string, SessionProjectionValue>>;"
|
|
2908
|
+
},
|
|
2909
|
+
{
|
|
2910
|
+
"name": "SessionPromptRequest",
|
|
2911
|
+
"declaration": "export interface SessionPromptRequest {\n readonly requestId: SessionRequestId;\n readonly sessionId: SessionId;\n readonly mode: 'queue' | 'steer';\n readonly content: readonly PromptContentPart[];\n readonly clientTimeZone?: string;\n}"
|
|
2912
|
+
},
|
|
2913
|
+
{
|
|
2914
|
+
"name": "SessionPromptValue",
|
|
2915
|
+
"declaration": "export interface SessionPromptValue {\n readonly accepted: true;\n}"
|
|
2916
|
+
},
|
|
2917
|
+
{
|
|
2918
|
+
"name": "SessionReferenceSource",
|
|
2919
|
+
"declaration": "export interface SessionReferenceSource {\n kind: 'session-reference';\n form: 'recall';\n version: 1;\n references: { sessionId: string; label: string; capturedFormatVersion?: number; capturedThroughSeq: OptionalSessionSeq; compacted: boolean; originalMessages: number; retainedMessages: number; omittedMessages: number; omittedBytes: number; truncated: boolean; inputIndex: number; }[];\n}"
|
|
2920
|
+
},
|
|
2921
|
+
{
|
|
2922
|
+
"name": "SessionRenameRequest",
|
|
2923
|
+
"declaration": "export interface SessionRenameRequest {\n readonly sessionId: SessionId;\n readonly title: string;\n}"
|
|
2924
|
+
},
|
|
2925
|
+
{
|
|
2926
|
+
"name": "SessionRenameValue",
|
|
2927
|
+
"declaration": "export interface SessionRenameValue {\n readonly title: string;\n readonly seq: number;\n}"
|
|
2928
|
+
},
|
|
2929
|
+
{
|
|
2930
|
+
"name": "SessionRequestId",
|
|
2931
|
+
"declaration": "export type SessionRequestId = Branded<'session-request-id'>;"
|
|
2932
|
+
},
|
|
2933
|
+
{
|
|
2934
|
+
"name": "SessionSearchItem",
|
|
2935
|
+
"declaration": "export interface SessionSearchItem {\n readonly sessionId: SessionId;\n readonly snippet: string;\n}"
|
|
2936
|
+
},
|
|
2937
|
+
{
|
|
2938
|
+
"name": "SessionSearchRequest",
|
|
2939
|
+
"declaration": "export interface SessionSearchRequest {\n readonly query: string;\n}"
|
|
2940
|
+
},
|
|
2941
|
+
{
|
|
2942
|
+
"name": "SessionSearchValue",
|
|
2943
|
+
"declaration": "export interface SessionSearchValue {\n readonly items: readonly SessionSearchItem[];\n readonly hasMore: boolean;\n}"
|
|
2944
|
+
},
|
|
2945
|
+
{
|
|
2946
|
+
"name": "SessionSelectModelRequest",
|
|
2947
|
+
"declaration": "export interface SessionSelectModelRequest extends ModelSelection {\n readonly sessionId: SessionId;\n}"
|
|
2948
|
+
},
|
|
2949
|
+
{
|
|
2950
|
+
"name": "SessionSelectModelValue",
|
|
2951
|
+
"declaration": "export interface SessionSelectModelValue {\n readonly selected: ModelSelection;\n}"
|
|
2952
|
+
},
|
|
2953
|
+
{
|
|
2954
|
+
"name": "SessionSeq",
|
|
2955
|
+
"declaration": "export type SessionSeq = BrandedNumber<'SessionSeq'>;"
|
|
2956
|
+
},
|
|
2957
|
+
{
|
|
2958
|
+
"name": "SessionSeqCursor",
|
|
2959
|
+
"declaration": "export type SessionSeqCursor = SessionSeq | -1;"
|
|
2960
|
+
},
|
|
2961
|
+
{
|
|
2962
|
+
"name": "SessionStorageMetadata",
|
|
2963
|
+
"declaration": "export interface SessionStorageMetadata {\n readonly meta: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n}"
|
|
2964
|
+
},
|
|
2965
|
+
{
|
|
2966
|
+
"name": "SessionSummary",
|
|
2967
|
+
"declaration": "export interface SessionSummary {\n readonly agentAvailable: boolean;\n readonly formatStatus?: 'current' | 'migration-required';\n readonly sessionId: SessionId;\n readonly updatedAt: number;\n readonly running: boolean;\n readonly blank: boolean;\n readonly parentSessionId?: SessionId;\n readonly origin?: 'subagent';\n readonly cwd?: string;\n readonly projections?: SessionProjectionHints;\n}"
|
|
2968
|
+
},
|
|
2969
|
+
{
|
|
2970
|
+
"name": "SessionSurface",
|
|
2971
|
+
"declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n readonly contentGeneration: number;\n}"
|
|
2972
|
+
},
|
|
2973
|
+
{
|
|
2974
|
+
"name": "SessionTitleEventData",
|
|
2975
|
+
"declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
|
|
2976
|
+
},
|
|
2977
|
+
{
|
|
2978
|
+
"name": "SessionTitleModelIdentity",
|
|
2979
|
+
"declaration": "export interface SessionTitleModelIdentity {\n readonly provider: string;\n readonly model: string;\n}"
|
|
2980
|
+
},
|
|
2981
|
+
{
|
|
2982
|
+
"name": "SessionTitleProviderId",
|
|
2983
|
+
"declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
|
|
2984
|
+
},
|
|
2985
|
+
{
|
|
2986
|
+
"name": "SessionTitleSource",
|
|
2987
|
+
"declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelIdentity; } | { readonly kind: 'user'; };"
|
|
2988
|
+
},
|
|
2989
|
+
{
|
|
2990
|
+
"name": "SessionUpdateQueueRequest",
|
|
2991
|
+
"declaration": "export interface SessionUpdateQueueRequest {\n readonly sessionId: SessionId;\n readonly itemId: MessageId;\n readonly action: QueueAction;\n}"
|
|
2992
|
+
},
|
|
2993
|
+
{
|
|
2994
|
+
"name": "SessionUpdateQueueValue",
|
|
2995
|
+
"declaration": "export interface SessionUpdateQueueValue {\n readonly accepted: true;\n}"
|
|
2996
|
+
},
|
|
2997
|
+
{
|
|
2998
|
+
"name": "SessionWireEvent",
|
|
2999
|
+
"declaration": "export interface SessionWireEvent {\n readonly type: string;\n readonly seq: number;\n readonly time: number;\n readonly data: JsonValue;\n readonly ignorable?: true;\n readonly sourceEventSeqs?: JsonValue;\n readonly surfaceOp?: JsonValue;\n}"
|
|
3000
|
+
},
|
|
3001
|
+
{
|
|
3002
|
+
"name": "SessionWireHeader",
|
|
3003
|
+
"declaration": "export interface SessionWireHeader {\n readonly version: number;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly isSeeded: boolean;\n readonly origin?: 'subagent';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n}"
|
|
3004
|
+
},
|
|
3005
|
+
{
|
|
3006
|
+
"name": "SessionWorkspacePathApplication",
|
|
3007
|
+
"declaration": "export type SessionWorkspacePathApplication = NativeFileApplication;"
|
|
3008
|
+
},
|
|
3009
|
+
{
|
|
3010
|
+
"name": "SettledUserQuestion",
|
|
3011
|
+
"declaration": "export interface SettledUserQuestion {\n readonly callId: ToolCallId;\n readonly answers: readonly AskUserQuestionAnswerItem[];\n}"
|
|
3012
|
+
},
|
|
3013
|
+
{
|
|
3014
|
+
"name": "SkillInvocationSource",
|
|
3015
|
+
"declaration": "export interface SkillInvocationSource {\n readonly kind: 'skill-invocation';\n readonly name: string;\n readonly form: 'instructions';\n}"
|
|
3016
|
+
},
|
|
3017
|
+
{
|
|
3018
|
+
"name": "StreamChunk",
|
|
3019
|
+
"declaration": "export type StreamChunk = { type: 'block-start'; index: number; blockType: ContentBlockType; } | { type: 'text-delta'; index: number; text: string; } | { type: 'reasoning-delta'; index: number; text: string; } | { type: 'tool-call-delta'; index: number; id: ToolCallId; name?: string; argumentsDelta: string; } | { type: 'block-end'; index: number; block: ContentBlock; } | { type: 'usage'; usage: TokenUsage; } | { type: 'finish'; reason: FinishReason; replayState?: ReplayEnvelope; };"
|
|
3020
|
+
},
|
|
3021
|
+
{
|
|
3022
|
+
"name": "SubagentCatalogEntry",
|
|
3023
|
+
"declaration": "export type SubagentCatalogEntry = { readonly id: SessionId; readonly createdAt: number; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'external'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; } | { readonly mode: 'unknown'; readonly label?: string; });"
|
|
3024
|
+
},
|
|
3025
|
+
{
|
|
3026
|
+
"name": "SubagentCatalogEvent",
|
|
3027
|
+
"declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })) | { readonly version: 2; readonly mode: 'external'; readonly label?: string; });"
|
|
3028
|
+
},
|
|
3029
|
+
{
|
|
3030
|
+
"name": "SubagentDescriptorBase",
|
|
3031
|
+
"declaration": "export interface SubagentDescriptorBase {\n readonly version: number;\n readonly mode: 'one-shot' | 'continuable';\n readonly provider: string;\n}"
|
|
3032
|
+
},
|
|
3033
|
+
{
|
|
3034
|
+
"name": "SubagentDescriptorData",
|
|
3035
|
+
"declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
|
|
3036
|
+
},
|
|
3037
|
+
{
|
|
3038
|
+
"name": "SubagentIdentityProjection",
|
|
3039
|
+
"declaration": "export type SubagentIdentityProjection = { mode: 'one-shot'; label?: string; seq: SessionSeq; } | { mode: 'continuable'; label: string; seq: SessionSeq; };"
|
|
3040
|
+
},
|
|
3041
|
+
{
|
|
3042
|
+
"name": "SubagentSettledMessageSource",
|
|
3043
|
+
"declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
|
|
3044
|
+
},
|
|
3045
|
+
{
|
|
3046
|
+
"name": "SubagentTimingProjection",
|
|
3047
|
+
"declaration": "export interface SubagentTimingProjection {\n settledMs: number;\n active?: { since: number; through: number; };\n lastTurnCompleted?: boolean;\n}"
|
|
3048
|
+
},
|
|
3049
|
+
{
|
|
3050
|
+
"name": "SurfaceEventType",
|
|
3051
|
+
"declaration": "export type SurfaceEventType = 'system/message' | 'developer/message' | 'user/message' | 'assistant/message' | 'tool/result';"
|
|
3052
|
+
},
|
|
3053
|
+
{
|
|
3054
|
+
"name": "SurfaceIntent",
|
|
3055
|
+
"declaration": "export type SurfaceIntent<T extends SurfaceEventType = SurfaceEventType> = { surfaceOp: SurfaceOp; } & (T extends 'assistant/message' ? { sourceEventSeqs?: never; } : { sourceEventSeqs?: SessionSeq[]; });"
|
|
3056
|
+
},
|
|
3057
|
+
{
|
|
3058
|
+
"name": "SurfaceOp",
|
|
3059
|
+
"declaration": "export type SurfaceOp = 'append' | { op: 'replace'; startSeq: SessionSeq; endSeq: SessionSeq; };"
|
|
3060
|
+
},
|
|
3061
|
+
{
|
|
3062
|
+
"name": "SystemMessage",
|
|
3063
|
+
"declaration": "export interface SystemMessage extends MessageBase {\n readonly role: 'system';\n readonly source: MessageSourceMap['system-prompt'];\n}"
|
|
3064
|
+
},
|
|
3065
|
+
{
|
|
3066
|
+
"name": "SystemPromptMessageSource",
|
|
3067
|
+
"declaration": "export interface SystemPromptMessageSource {\n kind: 'system-prompt';\n}"
|
|
3068
|
+
},
|
|
3069
|
+
{
|
|
3070
|
+
"name": "SystemPromptUpdate",
|
|
3071
|
+
"declaration": "export type SystemPromptUpdate = 'in-history';"
|
|
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
|
+
},
|
|
3121
|
+
{
|
|
3122
|
+
"name": "TextBlock",
|
|
3123
|
+
"declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
|
|
3124
|
+
},
|
|
3125
|
+
{
|
|
3126
|
+
"name": "TodoItem",
|
|
3127
|
+
"declaration": "export interface TodoItem {\n content: string;\n status: 'pending' | 'in_progress' | 'completed';\n}"
|
|
3128
|
+
},
|
|
3129
|
+
{
|
|
3130
|
+
"name": "TokenUsage",
|
|
3131
|
+
"declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
|
|
3132
|
+
},
|
|
3133
|
+
{
|
|
3134
|
+
"name": "TokenUsageProjection",
|
|
3135
|
+
"declaration": "export interface TokenUsageProjection {\n uncachedInputTokens: number;\n outputTokens: number;\n cacheReadTokens: number;\n cacheWriteTokens: number;\n}"
|
|
3136
|
+
},
|
|
3137
|
+
{
|
|
3138
|
+
"name": "ToolAdditionBlock",
|
|
3139
|
+
"declaration": "export interface ToolAdditionBlock {\n type: 'tool-addition';\n toolName: string;\n tool?: never;\n}"
|
|
3140
|
+
},
|
|
3141
|
+
{
|
|
3142
|
+
"name": "ToolCallBlock",
|
|
3143
|
+
"declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
"name": "ToolCallId",
|
|
3147
|
+
"declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
|
|
3148
|
+
},
|
|
3149
|
+
{
|
|
3150
|
+
"name": "ToolHistory",
|
|
3151
|
+
"declaration": "export interface ToolHistory {\n readonly tools: readonly ToolSchema[];\n readonly updates: readonly { readonly messageId: MessageId; readonly additions: readonly ToolSchema[]; }[];\n}"
|
|
3152
|
+
},
|
|
3153
|
+
{
|
|
3154
|
+
"name": "ToolMessageSource",
|
|
3155
|
+
"declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
|
|
3156
|
+
},
|
|
3157
|
+
{
|
|
3158
|
+
"name": "ToolRemovalBlock",
|
|
3159
|
+
"declaration": "export interface ToolRemovalBlock {\n type: 'tool-removal';\n toolName: string;\n}"
|
|
3160
|
+
},
|
|
3161
|
+
{
|
|
3162
|
+
"name": "ToolRestriction",
|
|
3163
|
+
"declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
|
|
3164
|
+
},
|
|
3165
|
+
{
|
|
3166
|
+
"name": "ToolResultMessage",
|
|
3167
|
+
"declaration": "export interface ToolResultMessage extends MessageBase {\n readonly role: 'tool';\n readonly source: ToolMessageSource;\n readonly toolCallId: ToolCallId;\n readonly isError?: boolean;\n}"
|
|
3168
|
+
},
|
|
3169
|
+
{
|
|
3170
|
+
"name": "ToolSchema",
|
|
3171
|
+
"declaration": "export interface ToolSchema {\n deferLoading?: true;\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
|
|
3172
|
+
},
|
|
3173
|
+
{
|
|
3174
|
+
"name": "TurnEndCancelCause",
|
|
3175
|
+
"declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
|
|
3176
|
+
},
|
|
3177
|
+
{
|
|
3178
|
+
"name": "TurnEndReason",
|
|
3179
|
+
"declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
|
|
3180
|
+
},
|
|
3181
|
+
{
|
|
3182
|
+
"name": "TurnEndReasonMap",
|
|
3183
|
+
"declaration": "export interface TurnEndReasonMap {\n completed: { kind: 'completed'; };\n aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n blocked: { kind: 'blocked'; };\n error: { kind: 'error'; error: LlmFailure; };\n 'max-tokens': { kind: 'max-tokens'; };\n interrupted: { kind: 'interrupted'; };\n forked: { kind: 'forked'; };\n}"
|
|
3184
|
+
},
|
|
3185
|
+
{
|
|
3186
|
+
"name": "TypertGatewayFaultDetails",
|
|
3187
|
+
"declaration": "export interface TypertGatewayFaultDetails {\n readonly endpoint: string;\n readonly field?: string;\n}"
|
|
3188
|
+
},
|
|
3189
|
+
{
|
|
3190
|
+
"name": "UserMessage",
|
|
3191
|
+
"declaration": "export interface UserMessage extends MessageBase {\n readonly role: 'user';\n}"
|
|
3192
|
+
},
|
|
3193
|
+
{
|
|
3194
|
+
"name": "UserQuestionProjectionView",
|
|
3195
|
+
"declaration": "export interface UserQuestionProjectionView {\n readonly active: readonly PendingUserQuestion[];\n readonly settled: readonly SettledUserQuestion[];\n}"
|
|
3196
|
+
},
|
|
3197
|
+
{
|
|
3198
|
+
"name": "UserQuestionState",
|
|
3199
|
+
"declaration": "export type UserQuestionState = 'open' | 'continued';"
|
|
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
|
+
},
|
|
3213
|
+
{
|
|
3214
|
+
"name": "WorkspaceId",
|
|
3215
|
+
"declaration": "export type WorkspaceId = Branded<'WorkspaceId'>;"
|
|
3216
|
+
}
|
|
3217
|
+
]
|
|
3218
|
+
},
|
|
3219
|
+
{
|
|
3220
|
+
"description": "Host Remote adapter over the composed file-reference provider.",
|
|
3221
|
+
"summary": "Host Remote adapter over the composed file-reference provider.",
|
|
3222
|
+
"tags": [],
|
|
3223
|
+
"jsDoc": "/** Host Remote adapter over the composed file-reference provider. */",
|
|
3224
|
+
"key": "sessionFileReferences",
|
|
3225
|
+
"exportName": "SessionFileReferences",
|
|
3226
|
+
"members": [
|
|
3227
|
+
{
|
|
3228
|
+
"kind": "method",
|
|
3229
|
+
"name": "list",
|
|
3230
|
+
"signature": "@Remote list( agent: Agent, query: string, signal: AbortSignal, ): Promise<FileReferenceCandidate[]>",
|
|
3231
|
+
"summary": "List file and directory candidates for one Agent's working directory.",
|
|
3232
|
+
"jsDoc": "/**\n * List file and directory candidates for one Agent's working directory.\n * @param agent - target Agent resolved from the Session identity on the wire.\n * @param query - path text following `@` or `@\"`.\n * @param signal - caller cancellation.\n * @returns deterministic path-only candidates from the composed provider.\n */"
|
|
3233
|
+
}
|
|
3234
|
+
],
|
|
3235
|
+
"types": [
|
|
3236
|
+
{
|
|
3237
|
+
"name": "AfterScheduleRecord",
|
|
3238
|
+
"declaration": "export interface AfterScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'after';\n readonly title: string;\n readonly prompt: string;\n readonly afterSeconds: number;\n readonly scheduledAt: string;\n}"
|
|
3239
|
+
},
|
|
3240
|
+
{
|
|
3241
|
+
"name": "Agent",
|
|
3242
|
+
"declaration": "export interface Agent {\n readonly id: SessionId;\n readonly options: AgentOptions;\n readonly session: Session;\n readonly inbox: Inbox;\n readonly status: AgentStatus;\n readonly ctx: Context;\n cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n whenIdle(): Promise<void>;\n runMaintenance<T>(task: (signal: AbortSignal) => Promise<T>): Promise<T>;\n send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;\n followup(message: UserMessage): void;\n steer(message: UserMessage): void;\n inject(message: UserMessage): void;\n}"
|
|
3243
|
+
},
|
|
3244
|
+
{
|
|
3245
|
+
"name": "AgentCancelCause",
|
|
3246
|
+
"declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
|
|
3247
|
+
},
|
|
3248
|
+
{
|
|
3249
|
+
"name": "AgentMessageSource",
|
|
3250
|
+
"declaration": "export interface AgentMessageSource {\n readonly kind: 'agent-message';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
|
|
3251
|
+
},
|
|
3252
|
+
{
|
|
3253
|
+
"name": "AgentOptions",
|
|
3254
|
+
"declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n subagentDepth?: number;\n}"
|
|
3255
|
+
},
|
|
3256
|
+
{
|
|
3257
|
+
"name": "AgentStatus",
|
|
3258
|
+
"declaration": "export type AgentStatus = 'idle' | 'running';"
|
|
3259
|
+
},
|
|
3260
|
+
{
|
|
3261
|
+
"name": "AllowedModelRoute",
|
|
3262
|
+
"declaration": "export interface AllowedModelRoute {\n readonly provider: string;\n readonly model: string;\n}"
|
|
3263
|
+
},
|
|
3264
|
+
{
|
|
3265
|
+
"name": "ApprovalOutcome",
|
|
3266
|
+
"declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
|
|
3267
|
+
},
|
|
3268
|
+
{
|
|
3269
|
+
"name": "ApprovalPolicy",
|
|
3270
|
+
"declaration": "export type ApprovalPolicy = 'ask' | 'never';"
|
|
3271
|
+
},
|
|
3272
|
+
{
|
|
3273
|
+
"name": "ApprovalRequestId",
|
|
3274
|
+
"declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
|
|
3275
|
+
},
|
|
3276
|
+
{
|
|
3277
|
+
"name": "AssistantMessage",
|
|
3278
|
+
"declaration": "export interface AssistantMessage extends MessageBase {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
|
|
3279
|
+
},
|
|
3280
|
+
{
|
|
3281
|
+
"name": "AssistantProviderMetadata",
|
|
3282
|
+
"declaration": "export interface AssistantProviderMetadata {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
|
|
3283
|
+
},
|
|
3284
|
+
{
|
|
3285
|
+
"name": "AssistantStreamRecord",
|
|
3286
|
+
"declaration": "export type AssistantStreamRecord = { readonly type: 'text-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly texts: readonly string[]; } | { readonly type: 'reasoning-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly texts: readonly string[]; } | { readonly type: 'tool-call-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly id: ToolCallId; readonly name?: string; readonly args: readonly string[]; } | { readonly type: 'chunk'; readonly time: number; readonly chunk: StreamChunk; };"
|
|
3287
|
+
},
|
|
3288
|
+
{
|
|
3289
|
+
"name": "AtScheduleRecord",
|
|
3290
|
+
"declaration": "export interface AtScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'at';\n readonly title: string;\n readonly prompt: string;\n readonly scheduledAt: string;\n}"
|
|
3291
|
+
},
|
|
3292
|
+
{
|
|
3293
|
+
"name": "AttachmentId",
|
|
3294
|
+
"declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
|
|
3295
|
+
},
|
|
3296
|
+
{
|
|
3297
|
+
"name": "Branded",
|
|
3298
|
+
"declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
|
|
3299
|
+
},
|
|
3300
|
+
{
|
|
3301
|
+
"name": "BrandedNumber",
|
|
3302
|
+
"declaration": "export type BrandedNumber<B extends string> = number & { readonly [BRAND]: B; };"
|
|
3303
|
+
},
|
|
3304
|
+
{
|
|
3305
|
+
"name": "CancelOptions",
|
|
3306
|
+
"declaration": "export interface CancelOptions {\n keepInbox?: boolean | undefined;\n}"
|
|
3307
|
+
},
|
|
3308
|
+
{
|
|
3309
|
+
"name": "CommandId",
|
|
3310
|
+
"declaration": "export type CommandId = Branded<'CommandId'>;"
|
|
3311
|
+
},
|
|
3312
|
+
{
|
|
3313
|
+
"name": "CommandSource",
|
|
3314
|
+
"declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
|
|
3315
|
+
},
|
|
3316
|
+
{
|
|
3317
|
+
"name": "CommandSourceMap",
|
|
3318
|
+
"declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
|
|
3319
|
+
},
|
|
3320
|
+
{
|
|
3321
|
+
"name": "CompactionCheckpointSource",
|
|
3322
|
+
"declaration": "export type CompactionCheckpointSource = typeof COMPACT_CHECKPOINT_MARKER & { readonly compactionId: CompactionId; readonly sourceCommandId?: CommandId; };"
|
|
3323
|
+
},
|
|
3324
|
+
{
|
|
3325
|
+
"name": "CompactionId",
|
|
3326
|
+
"declaration": "export type CompactionId = Branded<'CompactionId'>;"
|
|
3327
|
+
},
|
|
3328
|
+
{
|
|
3329
|
+
"name": "ContentBlock",
|
|
3330
|
+
"declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
|
|
3331
|
+
},
|
|
3332
|
+
{
|
|
3333
|
+
"name": "ContentBlockMap",
|
|
3334
|
+
"declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n file: FileBlock;\n 'tool-call': ToolCallBlock;\n 'tool-addition': ToolAdditionBlock;\n 'tool-removal': ToolRemovalBlock;\n}"
|
|
3335
|
+
},
|
|
3336
|
+
{
|
|
3337
|
+
"name": "ContentBlockType",
|
|
3338
|
+
"declaration": "export type ContentBlockType = keyof ContentBlockMap;"
|
|
3339
|
+
},
|
|
3340
|
+
{
|
|
3341
|
+
"name": "ContextFormed",
|
|
3342
|
+
"declaration": "export type ContextFormed = { readonly form?: never; } | { readonly form: 'instructions'; } | { readonly form: 'catalog'; } | { readonly form: 'snapshot'; readonly sections: readonly ContextSnapshotSection[]; } | { readonly form: 'notice'; readonly summary: string; } | { readonly form: 'relay'; } | { readonly form: 'recall'; };"
|
|
3343
|
+
},
|
|
3344
|
+
{
|
|
3345
|
+
"name": "ContextSnapshotSection",
|
|
3346
|
+
"declaration": "export interface ContextSnapshotSection {\n readonly name: string;\n readonly text: string;\n}"
|
|
3347
|
+
},
|
|
3348
|
+
{
|
|
3349
|
+
"name": "ContinuableSubagentDescriptorData",
|
|
3350
|
+
"declaration": "export interface ContinuableSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'continuable';\n readonly label: string;\n readonly agentProvider?: string;\n readonly agentModel?: string;\n readonly agentReasoningEffort?: ReasoningEffortId;\n readonly persona?: string;\n readonly toolFilter?: ToolRestriction;\n}"
|
|
3351
|
+
},
|
|
3352
|
+
{
|
|
3353
|
+
"name": "DeveloperMessage",
|
|
3354
|
+
"declaration": "export interface DeveloperMessage extends MessageBase {\n readonly role: 'developer';\n}"
|
|
3355
|
+
},
|
|
3356
|
+
{
|
|
3357
|
+
"name": "EpochHeader",
|
|
3358
|
+
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n system?: never;\n}"
|
|
3359
|
+
},
|
|
3360
|
+
{
|
|
3361
|
+
"name": "EveryScheduleDispatchChange",
|
|
3362
|
+
"declaration": "export interface EveryScheduleDispatchChange {\n readonly version: 1;\n readonly operation: 'dispatch';\n readonly id: ScheduleId;\n readonly acceptedAt: string;\n}"
|
|
3363
|
+
},
|
|
3364
|
+
{
|
|
3365
|
+
"name": "EveryScheduleRecord",
|
|
3366
|
+
"declaration": "export interface EveryScheduleRecord {\n readonly id: ScheduleId;\n readonly kind: 'every';\n readonly title: string;\n readonly prompt: string;\n readonly everySeconds: number;\n readonly scheduledAt: string;\n}"
|
|
3367
|
+
},
|
|
3368
|
+
{
|
|
3369
|
+
"name": "FeedbackCategory",
|
|
3370
|
+
"declaration": "export type FeedbackCategory = 'task-result' | 'instruction-following' | 'product-interaction' | 'service-stability' | 'resource-cost' | 'security-privacy-permission' | 'other';"
|
|
3371
|
+
},
|
|
3372
|
+
{
|
|
3373
|
+
"name": "FeedbackRecord",
|
|
3374
|
+
"declaration": "export interface FeedbackRecord {\n readonly text?: string;\n readonly category?: FeedbackCategory;\n}"
|
|
3375
|
+
},
|
|
3376
|
+
{
|
|
3377
|
+
"name": "FileAttachmentRef",
|
|
3378
|
+
"declaration": "export interface FileAttachmentRef {\n attachmentId: AttachmentId;\n name: string;\n bytes: number;\n}"
|
|
3379
|
+
},
|
|
3380
|
+
{
|
|
3381
|
+
"name": "FileBlock",
|
|
3382
|
+
"declaration": "export interface FileBlock {\n type: 'file';\n attachment: FileAttachmentRef;\n}"
|
|
3383
|
+
},
|
|
3384
|
+
{
|
|
3385
|
+
"name": "FileReferenceCandidate",
|
|
3386
|
+
"declaration": "export interface FileReferenceCandidate {\n path: string;\n kind: 'file' | 'directory';\n}"
|
|
3387
|
+
},
|
|
3388
|
+
{
|
|
3389
|
+
"name": "FinishReason",
|
|
3390
|
+
"declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
|
|
3391
|
+
},
|
|
3392
|
+
{
|
|
3393
|
+
"name": "FinishReasonMap",
|
|
3394
|
+
"declaration": "export interface FinishReasonMap {\n stop: { kind: 'stop'; };\n 'tool-calls': { kind: 'tool-calls'; };\n 'max-tokens': { kind: 'max-tokens'; };\n aborted: { kind: 'aborted'; failure: LlmFailure; };\n error: { kind: 'error'; failure: LlmFailure; };\n}"
|
|
3395
|
+
},
|
|
3396
|
+
{
|
|
3397
|
+
"name": "GoalBlockReason",
|
|
3398
|
+
"declaration": "export interface GoalBlockReason {\n readonly code: string;\n readonly message: string;\n}"
|
|
3399
|
+
},
|
|
3400
|
+
{
|
|
3401
|
+
"name": "GoalChangeMeta",
|
|
3402
|
+
"declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
|
|
3403
|
+
},
|
|
3404
|
+
{
|
|
3405
|
+
"name": "GoalClearChangeMeta",
|
|
3406
|
+
"declaration": "export interface GoalClearChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: 'clear';\n readonly cleared: GoalRef;\n readonly clearedAt: number;\n}"
|
|
3407
|
+
},
|
|
3408
|
+
{
|
|
3409
|
+
"name": "GoalId",
|
|
3410
|
+
"declaration": "export type GoalId = Branded<'GoalId'>;"
|
|
3411
|
+
},
|
|
3412
|
+
{
|
|
3413
|
+
"name": "GoalMessageSource",
|
|
3414
|
+
"declaration": "export interface GoalMessageSource {\n readonly kind: 'goal';\n readonly goalId: GoalId;\n readonly revision: number;\n readonly round: number;\n}"
|
|
3415
|
+
},
|
|
3416
|
+
{
|
|
3417
|
+
"name": "GoalOperation",
|
|
3418
|
+
"declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
|
|
3419
|
+
},
|
|
3420
|
+
{
|
|
3421
|
+
"name": "GoalPhase",
|
|
3422
|
+
"declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
|
|
3423
|
+
},
|
|
3424
|
+
{
|
|
3425
|
+
"name": "GoalRef",
|
|
3426
|
+
"declaration": "export interface GoalRef {\n readonly id: GoalId;\n readonly revision: number;\n}"
|
|
3427
|
+
},
|
|
3428
|
+
{
|
|
3429
|
+
"name": "GoalSnapshot",
|
|
3430
|
+
"declaration": "export interface GoalSnapshot extends GoalRef {\n readonly objective: string;\n readonly phase: GoalPhase;\n readonly blockedReason?: GoalBlockReason;\n readonly maxGoalRounds: number;\n}"
|
|
3431
|
+
},
|
|
3432
|
+
{
|
|
3433
|
+
"name": "GoalSnapshotChangeMeta",
|
|
3434
|
+
"declaration": "export interface GoalSnapshotChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: Exclude<GoalOperation, 'clear'>;\n readonly goal: GoalSnapshot;\n readonly roundsStarted: number;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
|
|
3435
|
+
},
|
|
3436
|
+
{
|
|
3437
|
+
"name": "ImageAttachmentRef",
|
|
3438
|
+
"declaration": "export interface ImageAttachmentRef {\n attachmentId: AttachmentId;\n mediaType: ImageMediaType;\n bytes: number;\n width: number;\n height: number;\n name?: string;\n originalDimensions?: { width: number; height: number; };\n}"
|
|
3439
|
+
},
|
|
3440
|
+
{
|
|
3441
|
+
"name": "ImageBlock",
|
|
3442
|
+
"declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n offloaded?: true;\n}"
|
|
3443
|
+
},
|
|
3444
|
+
{
|
|
3445
|
+
"name": "ImageMediaType",
|
|
3446
|
+
"declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
|
|
3447
|
+
},
|
|
3448
|
+
{
|
|
3449
|
+
"name": "ImageOffloadTarget",
|
|
3450
|
+
"declaration": "export interface ImageOffloadTarget {\n seq: SessionSeq;\n imageIndexes: number[];\n}"
|
|
3451
|
+
},
|
|
3452
|
+
{
|
|
3453
|
+
"name": "Inbox",
|
|
3454
|
+
"declaration": "export interface Inbox {\n readonly nextTurn: readonly UserMessage[];\n readonly nextStep: readonly UserMessage[];\n clear(): void;\n append(target: InboxTarget, message: UserMessage): void;\n prepend(target: InboxTarget, message: UserMessage): void;\n replace(messageId: MessageId, newMessage: UserMessage): boolean;\n remove(messageId: MessageId): boolean;\n splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];\n}"
|
|
3455
|
+
},
|
|
3456
|
+
{
|
|
3457
|
+
"name": "InboxTarget",
|
|
3458
|
+
"declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
|
|
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
|
+
},
|
|
3484
|
+
{
|
|
3485
|
+
"name": "JsonValue",
|
|
3486
|
+
"declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
|
|
3487
|
+
},
|
|
3488
|
+
{
|
|
3489
|
+
"name": "KnownCatalogMode",
|
|
3490
|
+
"declaration": "export type KnownCatalogMode = { readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; };"
|
|
3491
|
+
},
|
|
3492
|
+
{
|
|
3493
|
+
"name": "LegacyAfterScheduleRecord",
|
|
3494
|
+
"declaration": "export interface LegacyAfterScheduleRecord extends Omit<AfterScheduleRecord, 'title'> {\n readonly title?: string;\n}"
|
|
3495
|
+
},
|
|
3496
|
+
{
|
|
3497
|
+
"name": "LegacyAtScheduleRecord",
|
|
3498
|
+
"declaration": "export interface LegacyAtScheduleRecord extends Omit<AtScheduleRecord, 'title'> {\n readonly title?: string;\n}"
|
|
3499
|
+
},
|
|
3500
|
+
{
|
|
3501
|
+
"name": "LegacyEveryScheduleRecord",
|
|
3502
|
+
"declaration": "export interface LegacyEveryScheduleRecord extends Omit<EveryScheduleRecord, 'title'> {\n readonly title?: string;\n}"
|
|
3503
|
+
},
|
|
3504
|
+
{
|
|
3505
|
+
"name": "LegacyScheduleRecord",
|
|
3506
|
+
"declaration": "export type LegacyScheduleRecord = LegacyAfterScheduleRecord | LegacyAtScheduleRecord | LegacyEveryScheduleRecord;"
|
|
3507
|
+
},
|
|
3508
|
+
{
|
|
3509
|
+
"name": "LlmCallConfig",
|
|
3510
|
+
"declaration": "export interface LlmCallConfig extends LlmCallControls {\n provider: string;\n model: string;\n}"
|
|
3511
|
+
},
|
|
3512
|
+
{
|
|
3513
|
+
"name": "LlmCallConfigAdapterDefaults",
|
|
3514
|
+
"declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
|
|
3515
|
+
},
|
|
3516
|
+
{
|
|
3517
|
+
"name": "LlmCallControls",
|
|
3518
|
+
"declaration": "export interface LlmCallControls {\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
|
|
3519
|
+
},
|
|
3520
|
+
{
|
|
3521
|
+
"name": "LlmFailure",
|
|
3522
|
+
"declaration": "export interface LlmFailure {\n readonly message: string;\n readonly code: string;\n readonly status?: number;\n readonly providerRetryAfterMs?: number;\n readonly requestId?: ProviderRequestId;\n readonly offloadImages?: number;\n}"
|
|
3523
|
+
},
|
|
3524
|
+
{
|
|
3525
|
+
"name": "LlmRetryEventData",
|
|
3526
|
+
"declaration": "export type LlmRetryEventData = { retryId: RetryId; turn: number; step: number; provider: string; mode: 'normal'; policyKey: string; retry: number; maxRetries: number; delayMs: number; failure: LlmFailure; } | { retryId: RetryId; turn: number; step: number; provider: string; mode: 'always'; policyKey: string; retry: number; delayMs: number; failure: LlmFailure; };"
|
|
3527
|
+
},
|
|
3528
|
+
{
|
|
3529
|
+
"name": "LlmRetryStartedEventData",
|
|
3530
|
+
"declaration": "export interface LlmRetryStartedEventData {\n retryId: RetryId;\n turn: number;\n step: number;\n retry: number;\n}"
|
|
3531
|
+
},
|
|
3532
|
+
{
|
|
3533
|
+
"name": "Message",
|
|
3534
|
+
"declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
|
|
3535
|
+
},
|
|
3536
|
+
{
|
|
3537
|
+
"name": "MessageBase",
|
|
3538
|
+
"declaration": "export interface MessageBase {\n readonly id: MessageId;\n readonly content: readonly ContentBlock[];\n readonly source: MessageSource;\n}"
|
|
3539
|
+
},
|
|
3540
|
+
{
|
|
3541
|
+
"name": "MessageFeedbackDelete",
|
|
3542
|
+
"declaration": "export interface MessageFeedbackDelete {\n readonly sessionId: SessionId;\n readonly messageId: MessageId;\n}"
|
|
3543
|
+
},
|
|
3544
|
+
{
|
|
3545
|
+
"name": "MessageFeedbackItem",
|
|
3546
|
+
"declaration": "export interface MessageFeedbackItem {\n readonly messageId: MessageId;\n readonly rating: MessageFeedbackRating;\n readonly note?: string;\n readonly category?: FeedbackCategory;\n readonly version: MessageFeedbackVersion;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
|
|
3547
|
+
},
|
|
3548
|
+
{
|
|
3549
|
+
"name": "MessageFeedbackPut",
|
|
3550
|
+
"declaration": "export interface MessageFeedbackPut {\n readonly sessionId: SessionId;\n readonly item: MessageFeedbackItem;\n}"
|
|
3551
|
+
},
|
|
3552
|
+
{
|
|
3553
|
+
"name": "MessageFeedbackRating",
|
|
3554
|
+
"declaration": "export type MessageFeedbackRating = 'positive' | 'negative';"
|
|
3555
|
+
},
|
|
3556
|
+
{
|
|
3557
|
+
"name": "MessageFeedbackVersion",
|
|
3558
|
+
"declaration": "export type MessageFeedbackVersion = Branded<'MessageFeedbackVersion'>;"
|
|
3559
|
+
},
|
|
3560
|
+
{
|
|
3561
|
+
"name": "MessageId",
|
|
3562
|
+
"declaration": "export type MessageId = Branded<'MessageId'>;"
|
|
3563
|
+
},
|
|
3564
|
+
{
|
|
3565
|
+
"name": "MessageRoleMap",
|
|
3566
|
+
"declaration": "export interface MessageRoleMap {\n system: SystemMessage;\n developer: DeveloperMessage;\n user: UserMessage;\n assistant: AssistantMessage;\n tool: ToolResultMessage;\n}"
|
|
3567
|
+
},
|
|
3568
|
+
{
|
|
3569
|
+
"name": "MessageSource",
|
|
3570
|
+
"declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
|
|
3571
|
+
},
|
|
3572
|
+
{
|
|
3573
|
+
"name": "MessageSourceMap",
|
|
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}"
|
|
3575
|
+
},
|
|
3576
|
+
{
|
|
3577
|
+
"name": "ModelMessageSource",
|
|
3578
|
+
"declaration": "export interface ModelMessageSource extends AssistantProviderMetadata {\n kind: 'model';\n}"
|
|
3579
|
+
},
|
|
3580
|
+
{
|
|
3581
|
+
"name": "ModelSelection",
|
|
3582
|
+
"declaration": "export interface ModelSelection {\n readonly provider: string;\n readonly model: string;\n readonly reasoningEffort?: string;\n}"
|
|
3583
|
+
},
|
|
3584
|
+
{
|
|
3585
|
+
"name": "OneShotScheduleDispatchChange",
|
|
3586
|
+
"declaration": "export interface OneShotScheduleDispatchChange {\n readonly version: 1;\n readonly operation: 'dispatch';\n readonly id: ScheduleId;\n}"
|
|
3587
|
+
},
|
|
3588
|
+
{
|
|
3589
|
+
"name": "OneShotSubagentDescriptorData",
|
|
3590
|
+
"declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
|
|
3591
|
+
},
|
|
3592
|
+
{
|
|
3593
|
+
"name": "OptionalSessionSeq",
|
|
3594
|
+
"declaration": "export type OptionalSessionSeq = SessionSeq | null;"
|
|
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
|
+
},
|
|
3604
|
+
{
|
|
3605
|
+
"name": "ProviderRequestId",
|
|
3606
|
+
"declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
|
|
3607
|
+
},
|
|
3608
|
+
{
|
|
3609
|
+
"name": "PtcDispatchEventData",
|
|
3610
|
+
"declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n meta?: JsonValue;\n error?: { name: string; code: string; reason?: string; };\n}"
|
|
3611
|
+
},
|
|
3612
|
+
{
|
|
3613
|
+
"name": "PtcDispatchStartEventData",
|
|
3614
|
+
"declaration": "export interface PtcDispatchStartEventData {\n rootCallId: ToolCallId;\n parentCallId: ToolCallId;\n subCallId: ToolCallId;\n name: string;\n arguments: unknown;\n}"
|
|
3615
|
+
},
|
|
3616
|
+
{
|
|
3617
|
+
"name": "ReasoningBlock",
|
|
3618
|
+
"declaration": "export interface ReasoningBlock {\n type: 'reasoning';\n text: string;\n}"
|
|
3619
|
+
},
|
|
3620
|
+
{
|
|
3621
|
+
"name": "ReasoningEffortId",
|
|
3622
|
+
"declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
|
|
3623
|
+
},
|
|
3624
|
+
{
|
|
3625
|
+
"name": "ReplayEnvelope",
|
|
3626
|
+
"declaration": "export interface ReplayEnvelope {\n response: unknown;\n blocks?: readonly unknown[];\n}"
|
|
3627
|
+
},
|
|
3628
|
+
{
|
|
3629
|
+
"name": "RequestContext",
|
|
3630
|
+
"declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n systemPromptUpdate?: SystemPromptUpdate;\n}"
|
|
3631
|
+
},
|
|
3632
|
+
{
|
|
3633
|
+
"name": "RequestHeaderReason",
|
|
3634
|
+
"declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
|
|
3635
|
+
},
|
|
3636
|
+
{
|
|
3637
|
+
"name": "RetryId",
|
|
3638
|
+
"declaration": "export type RetryId = Branded<'RetryId'>;"
|
|
3639
|
+
},
|
|
3640
|
+
{
|
|
3641
|
+
"name": "SandboxMode",
|
|
3642
|
+
"declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
|
|
3643
|
+
},
|
|
3644
|
+
{
|
|
3645
|
+
"name": "ScheduleChange",
|
|
3646
|
+
"declaration": "export type ScheduleChange = ScheduleCreateChange | ScheduleDeleteChange | ScheduleDispatchChange;"
|
|
3647
|
+
},
|
|
3648
|
+
{
|
|
3649
|
+
"name": "ScheduleCreateChange",
|
|
3650
|
+
"declaration": "export interface ScheduleCreateChange {\n readonly version: 1;\n readonly operation: 'create';\n readonly schedule: LegacyScheduleRecord;\n}"
|
|
3651
|
+
},
|
|
3652
|
+
{
|
|
3653
|
+
"name": "ScheduleDeleteChange",
|
|
3654
|
+
"declaration": "export interface ScheduleDeleteChange {\n readonly version: 1;\n readonly operation: 'delete';\n readonly id: ScheduleId;\n}"
|
|
3655
|
+
},
|
|
3656
|
+
{
|
|
3657
|
+
"name": "ScheduleDispatchChange",
|
|
3658
|
+
"declaration": "export type ScheduleDispatchChange = OneShotScheduleDispatchChange | EveryScheduleDispatchChange;"
|
|
3659
|
+
},
|
|
3660
|
+
{
|
|
3661
|
+
"name": "ScheduleId",
|
|
3662
|
+
"declaration": "export type ScheduleId = Branded<'ScheduleId'>;"
|
|
3663
|
+
},
|
|
3664
|
+
{
|
|
3665
|
+
"name": "Session",
|
|
3666
|
+
"declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n get id(): SessionId;\n readonly firstLiveSeq: SessionLogOffset;\n readonly firstLifecycleSeq: SessionLogOffset;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n toolHistory(): ToolHistory;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
|
|
3667
|
+
},
|
|
3668
|
+
{
|
|
3669
|
+
"name": "SessionEvent",
|
|
3670
|
+
"declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: SessionSeq; time: number; data: SessionEventMap[K]; ignorable?: true; } & (K extends SurfaceEventType ? SurfaceIntent<K> : { surfaceOp?: never; sourceEventSeqs?: never; }) }[T];"
|
|
3671
|
+
},
|
|
3672
|
+
{
|
|
3673
|
+
"name": "SessionEventMap",
|
|
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('@unieai/rabi-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}"
|
|
3675
|
+
},
|
|
3676
|
+
{
|
|
3677
|
+
"name": "SessionEventType",
|
|
3678
|
+
"declaration": "export type SessionEventType = keyof SessionEventMap;"
|
|
3679
|
+
},
|
|
3680
|
+
{
|
|
3681
|
+
"name": "SessionHeader",
|
|
3682
|
+
"declaration": "export interface SessionHeader {\n readonly version: typeof SESSION_FORMAT_VERSION;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly isSeeded: boolean;\n readonly origin?: 'subagent';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n}"
|
|
3683
|
+
},
|
|
3684
|
+
{
|
|
3685
|
+
"name": "SessionId",
|
|
3686
|
+
"declaration": "export type SessionId = Branded<'SessionId'>;"
|
|
3687
|
+
},
|
|
3688
|
+
{
|
|
3689
|
+
"name": "SessionLogOffset",
|
|
3690
|
+
"declaration": "export type SessionLogOffset = BrandedNumber<'SessionLogOffset'>;"
|
|
3691
|
+
},
|
|
3692
|
+
{
|
|
3693
|
+
"name": "SessionReferenceSource",
|
|
3694
|
+
"declaration": "export interface SessionReferenceSource {\n kind: 'session-reference';\n form: 'recall';\n version: 1;\n references: { sessionId: string; label: string; capturedFormatVersion?: number; capturedThroughSeq: OptionalSessionSeq; compacted: boolean; originalMessages: number; retainedMessages: number; omittedMessages: number; omittedBytes: number; truncated: boolean; inputIndex: number; }[];\n}"
|
|
3695
|
+
},
|
|
3696
|
+
{
|
|
3697
|
+
"name": "SessionRequestId",
|
|
3698
|
+
"declaration": "export type SessionRequestId = Branded<'session-request-id'>;"
|
|
3699
|
+
},
|
|
3700
|
+
{
|
|
3701
|
+
"name": "SessionSeq",
|
|
3702
|
+
"declaration": "export type SessionSeq = BrandedNumber<'SessionSeq'>;"
|
|
3703
|
+
},
|
|
3704
|
+
{
|
|
3705
|
+
"name": "SessionSurface",
|
|
3706
|
+
"declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n readonly contentGeneration: number;\n}"
|
|
3707
|
+
},
|
|
3708
|
+
{
|
|
3709
|
+
"name": "SessionTitleEventData",
|
|
3710
|
+
"declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
|
|
3711
|
+
},
|
|
3712
|
+
{
|
|
3713
|
+
"name": "SessionTitleModelIdentity",
|
|
3714
|
+
"declaration": "export interface SessionTitleModelIdentity {\n readonly provider: string;\n readonly model: string;\n}"
|
|
3715
|
+
},
|
|
3716
|
+
{
|
|
3717
|
+
"name": "SessionTitleProviderId",
|
|
3718
|
+
"declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
|
|
3719
|
+
},
|
|
3720
|
+
{
|
|
3721
|
+
"name": "SessionTitleSource",
|
|
3722
|
+
"declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelIdentity; } | { readonly kind: 'user'; };"
|
|
3723
|
+
},
|
|
3724
|
+
{
|
|
3725
|
+
"name": "SkillInvocationSource",
|
|
3726
|
+
"declaration": "export interface SkillInvocationSource {\n readonly kind: 'skill-invocation';\n readonly name: string;\n readonly form: 'instructions';\n}"
|
|
3727
|
+
},
|
|
3728
|
+
{
|
|
3729
|
+
"name": "StreamChunk",
|
|
3730
|
+
"declaration": "export type StreamChunk = { type: 'block-start'; index: number; blockType: ContentBlockType; } | { type: 'text-delta'; index: number; text: string; } | { type: 'reasoning-delta'; index: number; text: string; } | { type: 'tool-call-delta'; index: number; id: ToolCallId; name?: string; argumentsDelta: string; } | { type: 'block-end'; index: number; block: ContentBlock; } | { type: 'usage'; usage: TokenUsage; } | { type: 'finish'; reason: FinishReason; replayState?: ReplayEnvelope; };"
|
|
3731
|
+
},
|
|
3732
|
+
{
|
|
3733
|
+
"name": "SubagentCatalogEvent",
|
|
3734
|
+
"declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })) | { readonly version: 2; readonly mode: 'external'; readonly label?: string; });"
|
|
3735
|
+
},
|
|
3736
|
+
{
|
|
3737
|
+
"name": "SubagentDescriptorBase",
|
|
3738
|
+
"declaration": "export interface SubagentDescriptorBase {\n readonly version: number;\n readonly mode: 'one-shot' | 'continuable';\n readonly provider: string;\n}"
|
|
3739
|
+
},
|
|
3740
|
+
{
|
|
3741
|
+
"name": "SubagentDescriptorData",
|
|
3742
|
+
"declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
|
|
3743
|
+
},
|
|
3744
|
+
{
|
|
3745
|
+
"name": "SubagentSettledMessageSource",
|
|
3746
|
+
"declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
|
|
3747
|
+
},
|
|
3748
|
+
{
|
|
3749
|
+
"name": "SurfaceEventType",
|
|
3750
|
+
"declaration": "export type SurfaceEventType = 'system/message' | 'developer/message' | 'user/message' | 'assistant/message' | 'tool/result';"
|
|
3751
|
+
},
|
|
3752
|
+
{
|
|
3753
|
+
"name": "SurfaceIntent",
|
|
3754
|
+
"declaration": "export type SurfaceIntent<T extends SurfaceEventType = SurfaceEventType> = { surfaceOp: SurfaceOp; } & (T extends 'assistant/message' ? { sourceEventSeqs?: never; } : { sourceEventSeqs?: SessionSeq[]; });"
|
|
3755
|
+
},
|
|
3756
|
+
{
|
|
3757
|
+
"name": "SurfaceOp",
|
|
3758
|
+
"declaration": "export type SurfaceOp = 'append' | { op: 'replace'; startSeq: SessionSeq; endSeq: SessionSeq; };"
|
|
3759
|
+
},
|
|
3760
|
+
{
|
|
3761
|
+
"name": "SystemMessage",
|
|
3762
|
+
"declaration": "export interface SystemMessage extends MessageBase {\n readonly role: 'system';\n readonly source: MessageSourceMap['system-prompt'];\n}"
|
|
3763
|
+
},
|
|
3764
|
+
{
|
|
3765
|
+
"name": "SystemPromptMessageSource",
|
|
3766
|
+
"declaration": "export interface SystemPromptMessageSource {\n kind: 'system-prompt';\n}"
|
|
3767
|
+
},
|
|
3768
|
+
{
|
|
3769
|
+
"name": "SystemPromptUpdate",
|
|
3770
|
+
"declaration": "export type SystemPromptUpdate = 'in-history';"
|
|
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
|
+
},
|
|
3808
|
+
{
|
|
3809
|
+
"name": "TextBlock",
|
|
3810
|
+
"declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
|
|
3811
|
+
},
|
|
3812
|
+
{
|
|
3813
|
+
"name": "TodoItem",
|
|
3814
|
+
"declaration": "export interface TodoItem {\n content: string;\n status: 'pending' | 'in_progress' | 'completed';\n}"
|
|
3815
|
+
},
|
|
3816
|
+
{
|
|
3817
|
+
"name": "TokenUsage",
|
|
3818
|
+
"declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
|
|
3819
|
+
},
|
|
3820
|
+
{
|
|
3821
|
+
"name": "ToolAdditionBlock",
|
|
3822
|
+
"declaration": "export interface ToolAdditionBlock {\n type: 'tool-addition';\n toolName: string;\n tool?: never;\n}"
|
|
3823
|
+
},
|
|
3824
|
+
{
|
|
3825
|
+
"name": "ToolCallBlock",
|
|
3826
|
+
"declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
|
|
3827
|
+
},
|
|
3828
|
+
{
|
|
3829
|
+
"name": "ToolCallId",
|
|
3830
|
+
"declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
|
|
3831
|
+
},
|
|
3832
|
+
{
|
|
3833
|
+
"name": "ToolHistory",
|
|
3834
|
+
"declaration": "export interface ToolHistory {\n readonly tools: readonly ToolSchema[];\n readonly updates: readonly { readonly messageId: MessageId; readonly additions: readonly ToolSchema[]; }[];\n}"
|
|
3835
|
+
},
|
|
3836
|
+
{
|
|
3837
|
+
"name": "ToolMessageSource",
|
|
3838
|
+
"declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
|
|
3839
|
+
},
|
|
3840
|
+
{
|
|
3841
|
+
"name": "ToolRemovalBlock",
|
|
3842
|
+
"declaration": "export interface ToolRemovalBlock {\n type: 'tool-removal';\n toolName: string;\n}"
|
|
3843
|
+
},
|
|
3844
|
+
{
|
|
3845
|
+
"name": "ToolRestriction",
|
|
3846
|
+
"declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
|
|
3847
|
+
},
|
|
3848
|
+
{
|
|
3849
|
+
"name": "ToolResultMessage",
|
|
3850
|
+
"declaration": "export interface ToolResultMessage extends MessageBase {\n readonly role: 'tool';\n readonly source: ToolMessageSource;\n readonly toolCallId: ToolCallId;\n readonly isError?: boolean;\n}"
|
|
3851
|
+
},
|
|
3852
|
+
{
|
|
3853
|
+
"name": "ToolSchema",
|
|
3854
|
+
"declaration": "export interface ToolSchema {\n deferLoading?: true;\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
|
|
3855
|
+
},
|
|
3856
|
+
{
|
|
3857
|
+
"name": "TurnEndCancelCause",
|
|
3858
|
+
"declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
|
|
3859
|
+
},
|
|
3860
|
+
{
|
|
3861
|
+
"name": "TurnEndReason",
|
|
3862
|
+
"declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
|
|
3863
|
+
},
|
|
3864
|
+
{
|
|
3865
|
+
"name": "TurnEndReasonMap",
|
|
3866
|
+
"declaration": "export interface TurnEndReasonMap {\n completed: { kind: 'completed'; };\n aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n blocked: { kind: 'blocked'; };\n error: { kind: 'error'; error: LlmFailure; };\n 'max-tokens': { kind: 'max-tokens'; };\n interrupted: { kind: 'interrupted'; };\n forked: { kind: 'forked'; };\n}"
|
|
3867
|
+
},
|
|
3868
|
+
{
|
|
3869
|
+
"name": "UserMessage",
|
|
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'>;"
|
|
3883
|
+
}
|
|
3884
|
+
]
|
|
3885
|
+
},
|
|
3886
|
+
{
|
|
3887
|
+
"description": "Host service backing `ctx.remote.skills` without activating a cold Agent.",
|
|
3888
|
+
"summary": "Host service backing `ctx.remote.skills` without activating a cold Agent.",
|
|
3889
|
+
"tags": [],
|
|
3890
|
+
"jsDoc": "/** Host service backing `ctx.remote.skills` without activating a cold Agent. */",
|
|
3891
|
+
"key": "sessionSkillCatalog",
|
|
3892
|
+
"exportName": "SessionSkillCatalog",
|
|
3893
|
+
"members": [
|
|
3894
|
+
{
|
|
3895
|
+
"kind": "method",
|
|
3896
|
+
"name": "list",
|
|
3897
|
+
"signature": "@Remote async list(request: SkillListRequest, signal: AbortSignal): Promise<SkillListValue>",
|
|
3898
|
+
"summary": "List the user-invocable skills visible to one Session composition.",
|
|
3899
|
+
"jsDoc": "/**\n * List the user-invocable skills visible to one Session composition.\n * @param request - Session identity whose cwd and preset select the catalog view.\n * @param signal - caller lifetime carried by the Remote transport; admitted catalog reads retain their existing completion semantics.\n * @returns user-invocable skill metadata without loading skill bodies.\n * @throws RemoteError when the Session cannot be inspected or no registry can serve it.\n */"
|
|
3900
|
+
}
|
|
3901
|
+
],
|
|
3902
|
+
"types": [
|
|
3903
|
+
{
|
|
3904
|
+
"name": "Branded",
|
|
3905
|
+
"declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
|
|
3906
|
+
},
|
|
3907
|
+
{
|
|
3908
|
+
"name": "SessionId",
|
|
3909
|
+
"declaration": "export type SessionId = Branded<'SessionId'>;"
|
|
3910
|
+
},
|
|
3911
|
+
{
|
|
3912
|
+
"name": "SkillEntry",
|
|
3913
|
+
"declaration": "export interface SkillEntry {\n readonly path?: string;\n readonly name: string;\n readonly description: string;\n readonly whenToUse?: string;\n readonly modelInvocable: boolean;\n}"
|
|
3914
|
+
},
|
|
3915
|
+
{
|
|
3916
|
+
"name": "SkillListRequest",
|
|
3917
|
+
"declaration": "export interface SkillListRequest {\n readonly sessionId: SessionId;\n}"
|
|
3918
|
+
},
|
|
3919
|
+
{
|
|
3920
|
+
"name": "SkillListValue",
|
|
3921
|
+
"declaration": "export interface SkillListValue {\n readonly skills: readonly SkillEntry[];\n}"
|
|
3922
|
+
}
|
|
3923
|
+
]
|
|
3924
|
+
}
|
|
3925
|
+
],
|
|
3926
|
+
"events": [
|
|
3927
|
+
{
|
|
3928
|
+
"description": "One user-authored durable message advanced Session list activity.",
|
|
3929
|
+
"summary": "One user-authored durable message advanced Session list activity.",
|
|
3930
|
+
"tags": [
|
|
3931
|
+
{
|
|
3932
|
+
"name": "mode",
|
|
3933
|
+
"comment": "emit",
|
|
3934
|
+
"text": "@mode emit\n *"
|
|
3935
|
+
},
|
|
3936
|
+
{
|
|
3937
|
+
"name": "param",
|
|
3938
|
+
"argument": "sessionId",
|
|
3939
|
+
"comment": "- addressed Session identity.",
|
|
3940
|
+
"text": "@param sessionId - addressed Session identity.\n *"
|
|
3941
|
+
},
|
|
3942
|
+
{
|
|
3943
|
+
"name": "param",
|
|
3944
|
+
"argument": "updatedAt",
|
|
3945
|
+
"comment": "- durable message time used for list ordering.",
|
|
3946
|
+
"text": "@param updatedAt - durable message time used for list ordering."
|
|
3947
|
+
}
|
|
3948
|
+
],
|
|
3949
|
+
"jsDoc": "/**\n * One user-authored durable message advanced Session list activity.\n * @mode emit\n * @param sessionId - addressed Session identity.\n * @param updatedAt - durable message time used for list ordering.\n */",
|
|
3950
|
+
"name": "api-session/activity",
|
|
3951
|
+
"mode": "emit",
|
|
3952
|
+
"signature": "'api-session/activity'(sessionId: SessionId, updatedAt: number): void"
|
|
3953
|
+
},
|
|
3954
|
+
{
|
|
3955
|
+
"description": "A Session became visible or its Agent was created or disposed. Consumers upsert the summary and replace its current running and availability state.",
|
|
3956
|
+
"summary": "A Session became visible or its Agent was created or disposed.",
|
|
3957
|
+
"tags": [
|
|
3958
|
+
{
|
|
3959
|
+
"name": "mode",
|
|
3960
|
+
"comment": "emit",
|
|
3961
|
+
"text": "@mode emit\n *"
|
|
3962
|
+
},
|
|
3963
|
+
{
|
|
3964
|
+
"name": "param",
|
|
3965
|
+
"argument": "summary",
|
|
3966
|
+
"comment": "- current list row for the Session.",
|
|
3967
|
+
"text": "@param summary - current list row for the Session."
|
|
3968
|
+
}
|
|
3969
|
+
],
|
|
3970
|
+
"jsDoc": "/**\n * A Session became visible or its Agent was created or disposed.\n * Consumers upsert the summary and replace its current running and availability state.\n * @mode emit\n * @param summary - current list row for the Session.\n */",
|
|
3971
|
+
"name": "api-session/added",
|
|
3972
|
+
"mode": "emit",
|
|
3973
|
+
"signature": "'api-session/added'(summary: SessionSummary): void"
|
|
3974
|
+
},
|
|
3975
|
+
{
|
|
3976
|
+
"description": "One Agent failed outside a durable turn position.",
|
|
3977
|
+
"summary": "One Agent failed outside a durable turn position.",
|
|
3978
|
+
"tags": [
|
|
3979
|
+
{
|
|
3980
|
+
"name": "mode",
|
|
3981
|
+
"comment": "emit",
|
|
3982
|
+
"text": "@mode emit\n *"
|
|
3983
|
+
},
|
|
3984
|
+
{
|
|
3985
|
+
"name": "param",
|
|
3986
|
+
"argument": "sessionId",
|
|
3987
|
+
"comment": "- Agent and Session identity.",
|
|
3988
|
+
"text": "@param sessionId - Agent and Session identity.\n *"
|
|
3989
|
+
},
|
|
3990
|
+
{
|
|
3991
|
+
"name": "param",
|
|
3992
|
+
"argument": "message",
|
|
3993
|
+
"comment": "- user-safe failure chain.",
|
|
3994
|
+
"text": "@param message - user-safe failure chain."
|
|
3995
|
+
}
|
|
3996
|
+
],
|
|
3997
|
+
"jsDoc": "/**\n * One Agent failed outside a durable turn position.\n * @mode emit\n * @param sessionId - Agent and Session identity.\n * @param message - user-safe failure chain.\n */",
|
|
3998
|
+
"name": "api-session/error",
|
|
3999
|
+
"mode": "emit",
|
|
4000
|
+
"signature": "'api-session/error'(sessionId: SessionId, message: string): void"
|
|
4001
|
+
},
|
|
4002
|
+
{
|
|
4003
|
+
"description": "A Session left the live Host registry.",
|
|
4004
|
+
"summary": "A Session left the live Host registry.",
|
|
4005
|
+
"tags": [
|
|
4006
|
+
{
|
|
4007
|
+
"name": "mode",
|
|
4008
|
+
"comment": "emit",
|
|
4009
|
+
"text": "@mode emit\n *"
|
|
4010
|
+
},
|
|
4011
|
+
{
|
|
4012
|
+
"name": "param",
|
|
4013
|
+
"argument": "sessionId",
|
|
4014
|
+
"comment": "- removed Session identity.",
|
|
4015
|
+
"text": "@param sessionId - removed Session identity."
|
|
4016
|
+
}
|
|
4017
|
+
],
|
|
4018
|
+
"jsDoc": "/**\n * A Session left the live Host registry.\n * @mode emit\n * @param sessionId - removed Session identity.\n */",
|
|
4019
|
+
"name": "api-session/removed",
|
|
4020
|
+
"mode": "emit",
|
|
4021
|
+
"signature": "'api-session/removed'(sessionId: SessionId): void"
|
|
4022
|
+
},
|
|
4023
|
+
{
|
|
4024
|
+
"description": "One Agent changed running state.",
|
|
4025
|
+
"summary": "One Agent changed running state.",
|
|
4026
|
+
"tags": [
|
|
4027
|
+
{
|
|
4028
|
+
"name": "mode",
|
|
4029
|
+
"comment": "emit",
|
|
4030
|
+
"text": "@mode emit\n *"
|
|
4031
|
+
},
|
|
4032
|
+
{
|
|
4033
|
+
"name": "param",
|
|
4034
|
+
"argument": "sessionId",
|
|
4035
|
+
"comment": "- Agent and Session identity.",
|
|
4036
|
+
"text": "@param sessionId - Agent and Session identity.\n *"
|
|
4037
|
+
},
|
|
4038
|
+
{
|
|
4039
|
+
"name": "param",
|
|
4040
|
+
"argument": "running",
|
|
4041
|
+
"comment": "- whether the Agent is running.",
|
|
4042
|
+
"text": "@param running - whether the Agent is running."
|
|
4043
|
+
}
|
|
4044
|
+
],
|
|
4045
|
+
"jsDoc": "/**\n * One Agent changed running state.\n * @mode emit\n * @param sessionId - Agent and Session identity.\n * @param running - whether the Agent is running.\n */",
|
|
4046
|
+
"name": "api-session/status",
|
|
4047
|
+
"mode": "emit",
|
|
4048
|
+
"signature": "'api-session/status'(sessionId: SessionId, running: boolean): void"
|
|
4049
|
+
}
|
|
4050
|
+
],
|
|
4051
|
+
"objects": []
|
|
4052
|
+
},
|
|
4053
|
+
}
|