@huynle/hub 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +19 -5
- package/package.json +1 -1
- package/packages/claude-code/package.json +1 -1
- package/packages/claude-code/src/sessions.ts +4 -1
- package/packages/cli/dist/hub-cli.js +240 -83
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/cli.ts +12 -7
- package/packages/cli/src/decisions.ts +52 -4
- package/packages/cli/src/format.ts +9 -0
- package/packages/cli/src/mcp.ts +20 -4
- package/packages/cli/src/team-intake-mcp.ts +2 -1
- package/packages/cli/src/teams-mcp.ts +7 -3
- package/packages/codex/package.json +1 -1
- package/packages/codex/src/sessions.ts +14 -3
- package/packages/node/package.json +1 -1
- package/packages/preset/package.json +1 -1
- package/packages/protocol/package.json +1 -1
- package/packages/protocol/schema/api/v1/_root.json +119 -0
- package/packages/protocol/schema/api/v1/account.json +419 -0
- package/packages/protocol/schema/api/v1/decisions.json +635 -0
- package/packages/protocol/schema/api/v1/discovery.json +110 -0
- package/packages/protocol/schema/api/v1/events.json +679 -0
- package/packages/protocol/schema/api/v1/session-actions.json +660 -0
- package/packages/protocol/schema/api/v1/sessions.json +2055 -0
- package/packages/protocol/schema/api/v1/speech.json +492 -0
- package/packages/protocol/schema/api/v1/unspecified.json +282 -0
- package/packages/protocol/schema/app-delivery/v1.schema.json +67 -5
- package/packages/protocol/schema/app-front/v1.schema.json +7 -3
- package/packages/protocol/src/api-v1.ts +8 -0
- package/packages/protocol/src/index.ts +2 -0
- package/packages/protocol/src/teams.ts +13 -1
- package/packages/runtime-openshell/package.json +1 -1
- package/packages/runtime-sdk/package.json +1 -1
- package/packages/sdk/package.json +1 -1
- package/packages/sdk/src/app-front.ts +2 -2
- package/packages/sdk/src/ask-fields.ts +76 -0
- package/packages/sdk/src/client.ts +11 -2
- package/packages/sdk/src/envelope.ts +3 -2
- package/packages/sdk/src/index.ts +1 -0
- package/packages/sdk/src/team-intake.ts +6 -0
- package/packages/sdk/src/teams.ts +2 -0
- package/packages/sdk/src/types.ts +36 -4
- package/packages/sdk/src/wake.ts +9 -4
- package/packages/spoke-sdk/package.json +1 -1
- package/src/central/agent/agent-limits.ts +185 -0
- package/src/central/agent/app-decisions.ts +6 -5
- package/src/central/agent/decisions.ts +130 -9
- package/src/central/agent/delivery.ts +134 -22
- package/src/central/agent/errors.ts +2 -1
- package/src/central/agent/events.ts +20 -2
- package/src/central/agent/launch-engine.ts +6 -3
- package/src/central/agent/message-limits.ts +5 -2
- package/src/central/agent/message-routes.ts +33 -6
- package/src/central/agent/messages.ts +7 -0
- package/src/central/agent/placement.ts +4 -2
- package/src/central/agent/read-routes.ts +5 -0
- package/src/central/agent/routes.ts +2 -0
- package/src/central/agent/subscriptions.ts +13 -4
- package/src/central/api-v1.ts +115 -0
- package/src/central/artifacts/store.ts +4 -2
- package/src/central/concierge/board-results.ts +2 -1
- package/src/central/concierge/notifier.ts +4 -2
- package/src/central/config.ts +20 -6
- package/src/central/health/classify.ts +209 -0
- package/src/central/http.ts +285 -23
- package/src/central/recording/index.ts +2 -1
- package/src/central/recording/schema.ts +2 -1
- package/src/central/registry.ts +34 -3
- package/src/central/teams/budgets.ts +144 -0
- package/src/central/teams/hop-stalls.ts +14 -6
- package/src/central/teams/intake.ts +38 -6
- package/src/central/teams/involvement.ts +95 -0
- package/src/central/teams/item-decisions.ts +60 -0
- package/src/central/teams/item-eligibility.ts +35 -0
- package/src/central/teams/item-stalls.ts +87 -0
- package/src/central/teams/loops.ts +40 -0
- package/src/central/teams/progress.ts +154 -0
- package/src/central/teams/routes.ts +2 -2
- package/src/central/teams/store.ts +21 -5
- package/src/central/teams/validation.ts +17 -6
- package/src/central/workspaces/coordinator.ts +3 -1
- package/src/spoke/hub-tool.ts +26 -11
- package/web/dist/assets/{ArtifactPage-C5MMqXLN.js → ArtifactPage-TbFJi59n.js} +1 -1
- package/web/dist/assets/{ArtifactPane-CXSCmhyJ.js → ArtifactPane-7D-M-Ich.js} +1 -1
- package/web/dist/assets/{ArtifactWorkbench-S0RxNGWy.js → ArtifactWorkbench-DlCLEjut.js} +1 -1
- package/web/dist/assets/{Diagram-BGmyRb-R.js → Diagram-PvOPetOI.js} +1 -1
- package/web/dist/assets/{Library-CFmMbXEa.js → Library-Cdi83pOV.js} +2 -2
- package/web/dist/assets/{ProfilesDestination-7jpOc2HM.js → ProfilesDestination-cryC7P6j.js} +1 -1
- package/web/dist/assets/TeamsPage-B4xrlGhp.js +1 -0
- package/web/dist/assets/Watchtower-60B1JX_J.js +2 -0
- package/web/dist/assets/index-DA0gKIzv.js +33 -0
- package/web/dist/assets/live-B2IfKm37.js +5 -0
- package/web/dist/assets/{live-BUofsQpz.css → live-De-kd3eW.css} +1 -1
- package/web/dist/assets/{renderer2d-B2Nh39UN.js → renderer2d-CsZnF3_o.js} +1 -1
- package/web/dist/assets/{renderer3d-CTYbljHH.js → renderer3d-BIMA0wFn.js} +2 -2
- package/web/dist/assets/{safe-area-CkhEclGo.js → safe-area-dtrnw9NF.js} +1 -1
- package/web/dist/index.html +1 -1
- package/web/dist/assets/TeamsPage-C1NGrUR-.js +0 -1
- package/web/dist/assets/Watchtower-DnvlJaU0.js +0 -2
- package/web/dist/assets/index-Da8SKXMw.js +0 -33
- package/web/dist/assets/live-BmqLASSo.js +0 -5
|
@@ -0,0 +1,679 @@
|
|
|
1
|
+
{
|
|
2
|
+
"paths": {
|
|
3
|
+
"/api/v1/events": {
|
|
4
|
+
"get": {
|
|
5
|
+
"operationId": "streamEvents",
|
|
6
|
+
"tags": ["events"],
|
|
7
|
+
"x-hub-access": "user",
|
|
8
|
+
"summary": "The live stream: catalog, status, streamed text, speech and every other change, as server-sent events",
|
|
9
|
+
"description": "The user's live updates as server-sent events (text/event-stream, UTF-8). The body is a sequence of blocks, each ended by an empty line; a line is `field: value`. The hub writes these blocks:\n\n- `: open` (a comment), at once, before anything else, so the response head is sent without waiting. Ignore every line starting with `:`.\n- A message: an optional `id: <id>` line, then one `data: <JSON>` line holding one StreamMessage (the JSON never spans lines). Messages have no `event:` field.\n- A heartbeat: `event: ping` and `data: 0`, without an id, every 20 seconds. It is not a message: a client uses it only to tell a live stream from a dead one (the console reopens a stream that brought nothing for 45 seconds).\n- `retry: 2000` (milliseconds), when the hub is draining before a shutdown: the stream then ends, and the client reconnects after that delay (to another instance) with its last id. A stream opened while the hub drains gets only this block.\n\nIds are opaque strings (today `<epoch>.<n>`, with a new epoch at every hub start; never parse them). Keep the id of the last message that had one. To resume, send it as the Last-Event-ID header (or the `last` query parameter): if the hub still holds every message after it (the last 2000, at most 5 minutes old), it replays them in order, each with its id, then a fresh catalog if the catalog changed meanwhile, and goes on live; nothing else is sent first, so a resume with nothing missed sends only `: open` until the next message. Otherwise it starts over: a catalog, then a `resync` message, after which the client must refetch everything it shows (sessions, timelines, Decisions). A stream that does not resume starts with the catalog. The catalog that starts a stream carries the id of the user's latest message; in a hub cluster a resumed stream's catalog has none.\n\nThe order of a stream: `: open`; `scope` when the request has `sessions`; the catalog (and `resync`), or the replay; then live messages as they happen, and heartbeats.\n\nWhat a stream carries: every message for the user's own sessions and account; `prefs` and `reads` changes only from the user's other devices; `enrollment` only for admins. With lite=1, `delta` and `reasoning` messages are left out except those of the trees of the sessions in `session` and `sessions` (also when replayed). Sessions the user does not own are dropped from `session` and `sessions` silently.",
|
|
10
|
+
"parameters": [
|
|
11
|
+
{
|
|
12
|
+
"name": "lite",
|
|
13
|
+
"in": "query",
|
|
14
|
+
"required": false,
|
|
15
|
+
"description": "1: leave out streamed text and reasoning (`delta`, `reasoning`) except of the trees of the shown sessions (`session`, `sessions`). Any other value is ignored.",
|
|
16
|
+
"schema": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "session",
|
|
22
|
+
"in": "query",
|
|
23
|
+
"required": false,
|
|
24
|
+
"description": "The session the client shows (at most 300 characters).",
|
|
25
|
+
"schema": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "sessions",
|
|
31
|
+
"in": "query",
|
|
32
|
+
"required": false,
|
|
33
|
+
"description": "Every session the client shows, comma-separated (the parameter may also repeat), at most 4 with `session`, each at most 300 characters. Its presence also makes the stream start with a `scope` message.",
|
|
34
|
+
"schema": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "last",
|
|
40
|
+
"in": "query",
|
|
41
|
+
"required": false,
|
|
42
|
+
"description": "The id of the last message received, to resume after it, for clients that cannot set Last-Event-ID. The header wins when both are sent.",
|
|
43
|
+
"schema": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "Last-Event-ID",
|
|
49
|
+
"in": "header",
|
|
50
|
+
"required": false,
|
|
51
|
+
"description": "The id of the last message received, to resume after it.",
|
|
52
|
+
"schema": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"responses": {
|
|
58
|
+
"200": {
|
|
59
|
+
"description": "The stream: open until the client closes it or the hub drains. Fails before it starts with 400 invalid for a session ID over 300 characters or more than 4 sessions.",
|
|
60
|
+
"content": {
|
|
61
|
+
"text/event-stream": {
|
|
62
|
+
"schema": {
|
|
63
|
+
"$ref": "#/components/schemas/StreamMessage"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"default": {
|
|
69
|
+
"$ref": "#/components/responses/Error"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"components": {
|
|
76
|
+
"schemas": {
|
|
77
|
+
"StreamMessage": {
|
|
78
|
+
"description": "A message of the live stream (GET /api/v1/events), told apart by `type`. A client skips a type it does not know: a newer hub may send more.",
|
|
79
|
+
"x-hub-union": true,
|
|
80
|
+
"oneOf": [
|
|
81
|
+
{
|
|
82
|
+
"$ref": "#/components/schemas/CatalogStreamMessage"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"$ref": "#/components/schemas/StatusStreamMessage"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"$ref": "#/components/schemas/DeltaStreamMessage"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"$ref": "#/components/schemas/ReasoningStreamMessage"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"$ref": "#/components/schemas/ActivityStreamMessage"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"$ref": "#/components/schemas/ConversationStreamMessage"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"$ref": "#/components/schemas/SayStreamMessage"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"$ref": "#/components/schemas/HeardStreamMessage"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"$ref": "#/components/schemas/TurnStreamMessage"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"$ref": "#/components/schemas/DecisionStreamMessage"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"$ref": "#/components/schemas/MessageStreamMessage"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"$ref": "#/components/schemas/PrefsStreamMessage"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"$ref": "#/components/schemas/ReadsStreamMessage"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"$ref": "#/components/schemas/HandoffStreamMessage"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"$ref": "#/components/schemas/EnrollmentStreamMessage"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"$ref": "#/components/schemas/IntentStreamMessage"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"$ref": "#/components/schemas/ContextCardStreamMessage"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"$ref": "#/components/schemas/LaunchStreamMessage"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"$ref": "#/components/schemas/AgentStreamMessage"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"$ref": "#/components/schemas/ConciergeStreamMessage"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"$ref": "#/components/schemas/RecordingStreamMessage"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"$ref": "#/components/schemas/ScopeStreamMessage"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"$ref": "#/components/schemas/ResyncStreamMessage"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"discriminator": {
|
|
152
|
+
"propertyName": "type",
|
|
153
|
+
"mapping": {
|
|
154
|
+
"catalog": "#/components/schemas/CatalogStreamMessage",
|
|
155
|
+
"status": "#/components/schemas/StatusStreamMessage",
|
|
156
|
+
"delta": "#/components/schemas/DeltaStreamMessage",
|
|
157
|
+
"reasoning": "#/components/schemas/ReasoningStreamMessage",
|
|
158
|
+
"activity": "#/components/schemas/ActivityStreamMessage",
|
|
159
|
+
"conversation": "#/components/schemas/ConversationStreamMessage",
|
|
160
|
+
"say": "#/components/schemas/SayStreamMessage",
|
|
161
|
+
"heard": "#/components/schemas/HeardStreamMessage",
|
|
162
|
+
"turn": "#/components/schemas/TurnStreamMessage",
|
|
163
|
+
"decision": "#/components/schemas/DecisionStreamMessage",
|
|
164
|
+
"message": "#/components/schemas/MessageStreamMessage",
|
|
165
|
+
"prefs": "#/components/schemas/PrefsStreamMessage",
|
|
166
|
+
"reads": "#/components/schemas/ReadsStreamMessage",
|
|
167
|
+
"handoff": "#/components/schemas/HandoffStreamMessage",
|
|
168
|
+
"enrollment": "#/components/schemas/EnrollmentStreamMessage",
|
|
169
|
+
"intent": "#/components/schemas/IntentStreamMessage",
|
|
170
|
+
"contextCard": "#/components/schemas/ContextCardStreamMessage",
|
|
171
|
+
"launch": "#/components/schemas/LaunchStreamMessage",
|
|
172
|
+
"agent": "#/components/schemas/AgentStreamMessage",
|
|
173
|
+
"concierge": "#/components/schemas/ConciergeStreamMessage",
|
|
174
|
+
"recording": "#/components/schemas/RecordingStreamMessage",
|
|
175
|
+
"scope": "#/components/schemas/ScopeStreamMessage",
|
|
176
|
+
"resync": "#/components/schemas/ResyncStreamMessage"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"ActivityStreamMessage": {
|
|
181
|
+
"type": "object",
|
|
182
|
+
"description": "One of two forms. A tool call or stretch of reasoning was created or changed state: `rootID` and `item` (the session's activity feed, as in GET /api/v1/sessions/{session}). Or the user's own activity on a session changed (what they last did there, for the session list): `activity`, without `rootID` and `item`.",
|
|
183
|
+
"required": ["type", "sessionID"],
|
|
184
|
+
"properties": {
|
|
185
|
+
"type": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"enum": ["activity"]
|
|
188
|
+
},
|
|
189
|
+
"sessionID": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"description": "Where it happened: with `item`, the root or the subagent session; with `activity`, the session the user acted on."
|
|
192
|
+
},
|
|
193
|
+
"rootID": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"description": "With `item`: the root session of `sessionID`."
|
|
196
|
+
},
|
|
197
|
+
"item": {
|
|
198
|
+
"$ref": "#/components/schemas/ActivityItem"
|
|
199
|
+
},
|
|
200
|
+
"activity": {
|
|
201
|
+
"$ref": "#/components/schemas/JsonValue",
|
|
202
|
+
"description": "The user's activity entry for the session (at, kind, last, buckets), as GET /api/v1/activity/mine lists it. That area is not specified yet: until it is, any JSON."
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"AgentStreamMessage": {
|
|
207
|
+
"type": "object",
|
|
208
|
+
"description": "An entry was added to the user's agent audit (an agent acted, or the user answered for one).",
|
|
209
|
+
"required": ["type", "entry"],
|
|
210
|
+
"properties": {
|
|
211
|
+
"type": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"enum": ["agent"]
|
|
214
|
+
},
|
|
215
|
+
"entry": {
|
|
216
|
+
"$ref": "#/components/schemas/JsonValue",
|
|
217
|
+
"description": "The audit entry. The agent audit area is not specified yet: until it is, any JSON."
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"CatalogStreamMessage": {
|
|
222
|
+
"type": "object",
|
|
223
|
+
"description": "The user's machines, processes and sessions: the same list as GET /api/v1/machines, sent whole. The first message of every stream that does not resume (and the last of a resumed one whose missed messages included a catalog change), then again whenever the catalog changes: a machine or process connects, goes away or reports its sessions; a session's title, conversation mode or voice front changes.",
|
|
224
|
+
"required": ["type", "machines"],
|
|
225
|
+
"properties": {
|
|
226
|
+
"type": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"enum": ["catalog"]
|
|
229
|
+
},
|
|
230
|
+
"machines": {
|
|
231
|
+
"type": "array",
|
|
232
|
+
"items": {
|
|
233
|
+
"$ref": "#/components/schemas/CatalogMachine"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"ConciergeStreamMessage": {
|
|
239
|
+
"type": "object",
|
|
240
|
+
"description": "The user's Concierge changed. One of two forms: `status` (its state changed) or `armed` (the Decision it armed, or null when disarmed). Tell `armed: null` from a message without `armed` by the key: a generated model reads both as null.",
|
|
241
|
+
"required": ["type"],
|
|
242
|
+
"properties": {
|
|
243
|
+
"type": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"enum": ["concierge"]
|
|
246
|
+
},
|
|
247
|
+
"status": {
|
|
248
|
+
"$ref": "#/components/schemas/JsonValue",
|
|
249
|
+
"description": "The Concierge's status. The Concierge area is not specified yet: until it is, any JSON."
|
|
250
|
+
},
|
|
251
|
+
"armed": {
|
|
252
|
+
"$ref": "#/components/schemas/JsonValue",
|
|
253
|
+
"description": "The armed Decision ({decisionID, at, expiresAt}) or null. The Concierge area is not specified yet: until it is, any JSON."
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"ContextCardStreamMessage": {
|
|
258
|
+
"type": "object",
|
|
259
|
+
"description": "A context card of a session was made: refetch the session's cards.",
|
|
260
|
+
"required": ["type", "sessionID", "provider", "generatedAt"],
|
|
261
|
+
"properties": {
|
|
262
|
+
"type": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"enum": ["contextCard"]
|
|
265
|
+
},
|
|
266
|
+
"sessionID": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"description": "The session it is about."
|
|
269
|
+
},
|
|
270
|
+
"provider": {
|
|
271
|
+
"type": "string",
|
|
272
|
+
"description": "The card's provider."
|
|
273
|
+
},
|
|
274
|
+
"primary": {
|
|
275
|
+
"type": "boolean",
|
|
276
|
+
"description": "Present (true) when it is the session's primary card."
|
|
277
|
+
},
|
|
278
|
+
"generatedAt": {
|
|
279
|
+
"type": "integer",
|
|
280
|
+
"format": "int64",
|
|
281
|
+
"description": "When it was made, in epoch milliseconds."
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"ConversationStreamMessage": {
|
|
286
|
+
"type": "object",
|
|
287
|
+
"description": "A session's conversation (Voice) mode changed. A catalog follows with the same state.",
|
|
288
|
+
"required": ["type", "sessionID", "on"],
|
|
289
|
+
"properties": {
|
|
290
|
+
"type": {
|
|
291
|
+
"type": "string",
|
|
292
|
+
"enum": ["conversation"]
|
|
293
|
+
},
|
|
294
|
+
"sessionID": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"description": "The session it is about."
|
|
297
|
+
},
|
|
298
|
+
"on": {
|
|
299
|
+
"type": "boolean",
|
|
300
|
+
"description": "Whether conversation mode is on."
|
|
301
|
+
},
|
|
302
|
+
"front": {
|
|
303
|
+
"type": "boolean",
|
|
304
|
+
"description": "Present once a voice front was asked for: whether a front session is in front of this one now."
|
|
305
|
+
},
|
|
306
|
+
"reason": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"x-hub-known": ["front_failed"],
|
|
309
|
+
"description": "front_failed: the voice front could not be made; utterances go to the session itself."
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"DecisionStreamMessage": {
|
|
314
|
+
"type": "object",
|
|
315
|
+
"description": "A Decision of the user was opened, answered, escalated or expired: the Decision as it is now.",
|
|
316
|
+
"required": ["type", "decision"],
|
|
317
|
+
"properties": {
|
|
318
|
+
"type": {
|
|
319
|
+
"type": "string",
|
|
320
|
+
"enum": ["decision"]
|
|
321
|
+
},
|
|
322
|
+
"decision": {
|
|
323
|
+
"$ref": "#/components/schemas/Decision"
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
"DeltaStreamMessage": {
|
|
328
|
+
"type": "object",
|
|
329
|
+
"description": "Assistant text streamed in a root or subagent session, at most one message per session per 100 ms (later text within that window is joined). Append `text` to the text part (`messageID`, `ordinal`). Left out of a lite stream unless the session is in the tree of a shown session.",
|
|
330
|
+
"required": ["type", "sessionID", "rootID", "text"],
|
|
331
|
+
"properties": {
|
|
332
|
+
"type": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"enum": ["delta"]
|
|
335
|
+
},
|
|
336
|
+
"sessionID": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"description": "The session the text is written in."
|
|
339
|
+
},
|
|
340
|
+
"rootID": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"description": "The root session of `sessionID`'s tree (the same ID for a root session)."
|
|
343
|
+
},
|
|
344
|
+
"messageID": {
|
|
345
|
+
"type": "string",
|
|
346
|
+
"description": "The assistant message, when the harness reports it."
|
|
347
|
+
},
|
|
348
|
+
"ordinal": {
|
|
349
|
+
"type": "integer",
|
|
350
|
+
"format": "int32",
|
|
351
|
+
"description": "The text part of the message (0-based), when known."
|
|
352
|
+
},
|
|
353
|
+
"text": {
|
|
354
|
+
"type": "string",
|
|
355
|
+
"description": "The new text."
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"EnrollmentStreamMessage": {
|
|
360
|
+
"type": "object",
|
|
361
|
+
"description": "Machine enrollment requests changed: refetch them. Admins only; no fields.",
|
|
362
|
+
"required": ["type"],
|
|
363
|
+
"properties": {
|
|
364
|
+
"type": {
|
|
365
|
+
"type": "string",
|
|
366
|
+
"enum": ["enrollment"]
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"HandoffStreamMessage": {
|
|
371
|
+
"type": "object",
|
|
372
|
+
"description": "A harness asked to hand the session over to the user's devices (open it here).",
|
|
373
|
+
"required": ["type", "sessionID"],
|
|
374
|
+
"properties": {
|
|
375
|
+
"type": {
|
|
376
|
+
"type": "string",
|
|
377
|
+
"enum": ["handoff"]
|
|
378
|
+
},
|
|
379
|
+
"sessionID": {
|
|
380
|
+
"type": "string",
|
|
381
|
+
"description": "The session it is about."
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"HeardStreamMessage": {
|
|
386
|
+
"type": "object",
|
|
387
|
+
"description": "An utterance sent with POST /api/v1/sessions/{session}/utterance reached the agent.",
|
|
388
|
+
"required": ["type", "sessionID", "inboxID"],
|
|
389
|
+
"properties": {
|
|
390
|
+
"type": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"enum": ["heard"]
|
|
393
|
+
},
|
|
394
|
+
"sessionID": {
|
|
395
|
+
"type": "string",
|
|
396
|
+
"description": "The session it is about."
|
|
397
|
+
},
|
|
398
|
+
"inboxID": {
|
|
399
|
+
"type": "string",
|
|
400
|
+
"description": "The utterance's inbox ID, as its answer gave it."
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
"IntentStreamMessage": {
|
|
405
|
+
"type": "object",
|
|
406
|
+
"description": "A session's intent changed: refetch it (the text never rides the stream).",
|
|
407
|
+
"required": ["type", "sessionID", "source", "revision"],
|
|
408
|
+
"properties": {
|
|
409
|
+
"type": {
|
|
410
|
+
"type": "string",
|
|
411
|
+
"enum": ["intent"]
|
|
412
|
+
},
|
|
413
|
+
"sessionID": {
|
|
414
|
+
"type": "string",
|
|
415
|
+
"description": "The session it is about."
|
|
416
|
+
},
|
|
417
|
+
"source": {
|
|
418
|
+
"type": "string",
|
|
419
|
+
"x-hub-known": ["user", "launch", "self", "prompt", "title"],
|
|
420
|
+
"description": "Who set the intent now in place."
|
|
421
|
+
},
|
|
422
|
+
"revision": {
|
|
423
|
+
"type": "integer",
|
|
424
|
+
"format": "int64",
|
|
425
|
+
"description": "The intent's revision."
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"LaunchStreamMessage": {
|
|
430
|
+
"type": "object",
|
|
431
|
+
"description": "One of the user's launches changed.",
|
|
432
|
+
"required": ["type", "launch"],
|
|
433
|
+
"properties": {
|
|
434
|
+
"type": {
|
|
435
|
+
"type": "string",
|
|
436
|
+
"enum": ["launch"]
|
|
437
|
+
},
|
|
438
|
+
"launch": {
|
|
439
|
+
"$ref": "#/components/schemas/JsonValue",
|
|
440
|
+
"description": "The launch as the launches area answers it. That area is not specified yet: until it is, any JSON."
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
"MessageStreamMessage": {
|
|
445
|
+
"type": "object",
|
|
446
|
+
"description": "A message to or from one of the user's sessions was stored (agent messaging).",
|
|
447
|
+
"required": ["type", "message"],
|
|
448
|
+
"properties": {
|
|
449
|
+
"type": {
|
|
450
|
+
"type": "string",
|
|
451
|
+
"enum": ["message"]
|
|
452
|
+
},
|
|
453
|
+
"message": {
|
|
454
|
+
"$ref": "#/components/schemas/AgentMessage"
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
"PrefsStreamMessage": {
|
|
459
|
+
"type": "object",
|
|
460
|
+
"description": "The user's view preferences changed on another of their devices (never sent to the device that made the change).",
|
|
461
|
+
"required": ["type", "prefs"],
|
|
462
|
+
"properties": {
|
|
463
|
+
"type": {
|
|
464
|
+
"type": "string",
|
|
465
|
+
"enum": ["prefs"]
|
|
466
|
+
},
|
|
467
|
+
"prefs": {
|
|
468
|
+
"$ref": "#/components/schemas/ViewPrefs"
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
"ReadsStreamMessage": {
|
|
473
|
+
"type": "object",
|
|
474
|
+
"description": "The user's read marks changed on another of their devices (never sent to the device that made the change): all of them, as GET /api/v1/reads answers.",
|
|
475
|
+
"required": ["type", "reads"],
|
|
476
|
+
"properties": {
|
|
477
|
+
"type": {
|
|
478
|
+
"type": "string",
|
|
479
|
+
"enum": ["reads"]
|
|
480
|
+
},
|
|
481
|
+
"reads": {
|
|
482
|
+
"type": "object",
|
|
483
|
+
"additionalProperties": {
|
|
484
|
+
"type": "integer",
|
|
485
|
+
"format": "int64",
|
|
486
|
+
"description": "When it was read, in epoch milliseconds."
|
|
487
|
+
},
|
|
488
|
+
"description": "Session ID → when the user last read it."
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
"ReasoningStreamMessage": {
|
|
493
|
+
"type": "object",
|
|
494
|
+
"description": "Reasoning text streamed in a root or subagent session, throttled and filtered like `delta`.",
|
|
495
|
+
"required": ["type", "sessionID", "rootID", "delta"],
|
|
496
|
+
"properties": {
|
|
497
|
+
"type": {
|
|
498
|
+
"type": "string",
|
|
499
|
+
"enum": ["reasoning"]
|
|
500
|
+
},
|
|
501
|
+
"sessionID": {
|
|
502
|
+
"type": "string",
|
|
503
|
+
"description": "The session the reasoning happens in."
|
|
504
|
+
},
|
|
505
|
+
"rootID": {
|
|
506
|
+
"type": "string",
|
|
507
|
+
"description": "The root session of `sessionID`'s tree (the same ID for a root session)."
|
|
508
|
+
},
|
|
509
|
+
"messageID": {
|
|
510
|
+
"type": "string",
|
|
511
|
+
"description": "The assistant message, when the harness reports it."
|
|
512
|
+
},
|
|
513
|
+
"delta": {
|
|
514
|
+
"type": "string",
|
|
515
|
+
"description": "The new reasoning text."
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
"RecordingStreamMessage": {
|
|
520
|
+
"type": "object",
|
|
521
|
+
"description": "The user's voice recordings changed. One of these forms: `settings` (the recording setting changed on another device); `recordingID` with `developer: false` (Developer mode was turned off for a running recording), with `state` ended and a `reason`, with `state` deleted, or with `audio: false` (its audio stopped at a cap).",
|
|
522
|
+
"required": ["type"],
|
|
523
|
+
"properties": {
|
|
524
|
+
"type": {
|
|
525
|
+
"type": "string",
|
|
526
|
+
"enum": ["recording"]
|
|
527
|
+
},
|
|
528
|
+
"settings": {
|
|
529
|
+
"$ref": "#/components/schemas/JsonValue",
|
|
530
|
+
"description": "The recording settings. The recordings area is not specified yet: until it is, any JSON."
|
|
531
|
+
},
|
|
532
|
+
"recordingID": {
|
|
533
|
+
"type": "string",
|
|
534
|
+
"description": "The recording it is about."
|
|
535
|
+
},
|
|
536
|
+
"developer": {
|
|
537
|
+
"type": "boolean",
|
|
538
|
+
"description": "false: the recording goes on without its Developer mode extras."
|
|
539
|
+
},
|
|
540
|
+
"state": {
|
|
541
|
+
"type": "string",
|
|
542
|
+
"x-hub-known": ["ended", "deleted"],
|
|
543
|
+
"description": "The recording ended or was deleted."
|
|
544
|
+
},
|
|
545
|
+
"reason": {
|
|
546
|
+
"type": "string",
|
|
547
|
+
"x-hub-known": [
|
|
548
|
+
"stopped",
|
|
549
|
+
"conversation_off",
|
|
550
|
+
"disabled",
|
|
551
|
+
"max_duration",
|
|
552
|
+
"stale",
|
|
553
|
+
"limit",
|
|
554
|
+
"superseded",
|
|
555
|
+
"session_deleted"
|
|
556
|
+
],
|
|
557
|
+
"description": "With state ended: why."
|
|
558
|
+
},
|
|
559
|
+
"audio": {
|
|
560
|
+
"type": "boolean",
|
|
561
|
+
"description": "false: the recording goes on without audio (a cap was reached)."
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
"ResyncStreamMessage": {
|
|
566
|
+
"type": "object",
|
|
567
|
+
"description": "Sent after the catalog when a stream asked to resume (Last-Event-ID or `last`) and the hub could not replay what was missed (a hub restart, an unknown ID, or more than the hub keeps): the client must refetch everything it shows. No fields.",
|
|
568
|
+
"required": ["type"],
|
|
569
|
+
"properties": {
|
|
570
|
+
"type": {
|
|
571
|
+
"type": "string",
|
|
572
|
+
"enum": ["resync"]
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
"SayStreamMessage": {
|
|
577
|
+
"type": "object",
|
|
578
|
+
"description": "Text to speak, of a root session in conversation mode: while the reply streams, one message per completed sentence (with `seq`); a subagent's final result as one message for the whole text part (without `seq`).",
|
|
579
|
+
"required": ["type", "sessionID", "messageID", "ordinal", "text"],
|
|
580
|
+
"properties": {
|
|
581
|
+
"type": {
|
|
582
|
+
"type": "string",
|
|
583
|
+
"enum": ["say"]
|
|
584
|
+
},
|
|
585
|
+
"sessionID": {
|
|
586
|
+
"type": "string",
|
|
587
|
+
"description": "The root session that speaks."
|
|
588
|
+
},
|
|
589
|
+
"messageID": {
|
|
590
|
+
"type": "string",
|
|
591
|
+
"description": "The assistant message the text belongs to."
|
|
592
|
+
},
|
|
593
|
+
"ordinal": {
|
|
594
|
+
"type": "integer",
|
|
595
|
+
"format": "int32",
|
|
596
|
+
"description": "The text part of the message (0-based)."
|
|
597
|
+
},
|
|
598
|
+
"seq": {
|
|
599
|
+
"type": "integer",
|
|
600
|
+
"format": "int32",
|
|
601
|
+
"description": "The sentence's number within the text part, from 0. Absent for a whole text part."
|
|
602
|
+
},
|
|
603
|
+
"text": {
|
|
604
|
+
"type": "string",
|
|
605
|
+
"description": "What to say."
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
"ScopeStreamMessage": {
|
|
610
|
+
"type": "object",
|
|
611
|
+
"description": "The sessions this stream streams the text of, after leaving out those the user does not own: sent first, and only when the request has `sessions` (a console with several panes). Tells a client the hub honours `sessions`.",
|
|
612
|
+
"required": ["type", "sessions"],
|
|
613
|
+
"properties": {
|
|
614
|
+
"type": {
|
|
615
|
+
"type": "string",
|
|
616
|
+
"enum": ["scope"]
|
|
617
|
+
},
|
|
618
|
+
"sessions": {
|
|
619
|
+
"type": "array",
|
|
620
|
+
"items": {
|
|
621
|
+
"type": "string"
|
|
622
|
+
},
|
|
623
|
+
"description": "The session IDs, `session` first."
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
"StatusStreamMessage": {
|
|
628
|
+
"type": "object",
|
|
629
|
+
"description": "A root session's status tree changed (states, blockers, retries, jobs): the whole tree, the root first. It replaces the `status` of every catalog session with this ID.",
|
|
630
|
+
"required": ["type", "sessionID", "sessions"],
|
|
631
|
+
"properties": {
|
|
632
|
+
"type": {
|
|
633
|
+
"type": "string",
|
|
634
|
+
"enum": ["status"]
|
|
635
|
+
},
|
|
636
|
+
"sessionID": {
|
|
637
|
+
"type": "string",
|
|
638
|
+
"description": "The root session."
|
|
639
|
+
},
|
|
640
|
+
"sessions": {
|
|
641
|
+
"type": "array",
|
|
642
|
+
"items": {
|
|
643
|
+
"$ref": "#/components/schemas/SessionStatus"
|
|
644
|
+
},
|
|
645
|
+
"description": "The root's own status, then one per subagent session below it."
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
"TurnStreamMessage": {
|
|
650
|
+
"type": "object",
|
|
651
|
+
"description": "The result of a turn that POST /api/v1/sessions/{session}/turn accepted with Prefer: respond-async (202). The fields after `sessionID` are a TurnResult; a turn the hub stopped waiting for is outcome timeout, any other failure outcome failed with a message.",
|
|
652
|
+
"required": ["type", "sessionID", "outcome", "reply"],
|
|
653
|
+
"properties": {
|
|
654
|
+
"type": {
|
|
655
|
+
"type": "string",
|
|
656
|
+
"enum": ["turn"]
|
|
657
|
+
},
|
|
658
|
+
"sessionID": {
|
|
659
|
+
"type": "string",
|
|
660
|
+
"description": "The session it is about."
|
|
661
|
+
},
|
|
662
|
+
"outcome": {
|
|
663
|
+
"type": "string",
|
|
664
|
+
"x-hub-known": ["succeeded", "failed", "interrupted", "timeout"],
|
|
665
|
+
"description": "As in TurnResult."
|
|
666
|
+
},
|
|
667
|
+
"reply": {
|
|
668
|
+
"type": "string",
|
|
669
|
+
"description": "The turn's reply text, possibly partial or empty."
|
|
670
|
+
},
|
|
671
|
+
"message": {
|
|
672
|
+
"type": "string",
|
|
673
|
+
"description": "Why it failed or was interrupted."
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|