@lightspeed-ai/agent-client 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -0
- package/dist/client.d.ts +65 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +194 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +20 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +47 -0
- package/dist/errors.js.map +1 -0
- package/dist/generated/methods.d.ts +2497 -0
- package/dist/generated/methods.d.ts.map +1 -0
- package/dist/generated/methods.js +1751 -0
- package/dist/generated/methods.js.map +1 -0
- package/dist/generated/types.d.ts +6950 -0
- package/dist/generated/types.d.ts.map +1 -0
- package/dist/generated/types.js +6 -0
- package/dist/generated/types.js.map +1 -0
- package/dist/generated/workflow-manifest.d.ts +219 -0
- package/dist/generated/workflow-manifest.d.ts.map +1 -0
- package/dist/generated/workflow-manifest.js +251 -0
- package/dist/generated/workflow-manifest.js.map +1 -0
- package/dist/generated/workflow-types.d.ts +451 -0
- package/dist/generated/workflow-types.d.ts.map +1 -0
- package/dist/generated/workflow-types.js +6 -0
- package/dist/generated/workflow-types.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/workflow.d.ts +217 -0
- package/dist/workflow.d.ts.map +1 -0
- package/dist/workflow.js +338 -0
- package/dist/workflow.js.map +1 -0
- package/examples/temporal-activity.ts +33 -0
- package/package.json +55 -0
- package/release.json +4 -0
- package/schema/api.schema.json +16643 -0
- package/schema/workflow.json +246 -0
- package/schema/workflow.schema.json +880 -0
- package/src/client.ts +318 -0
- package/src/errors.ts +64 -0
- package/src/generated/methods.ts +2888 -0
- package/src/generated/types.ts +7189 -0
- package/src/generated/workflow-manifest.ts +251 -0
- package/src/generated/workflow-types.ts +468 -0
- package/src/index.ts +31 -0
- package/src/workflow.ts +468 -0
|
@@ -0,0 +1,880 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"BotId": {
|
|
5
|
+
"type": "string"
|
|
6
|
+
},
|
|
7
|
+
"BotTriggerId": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"ChannelAccountId": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"ChannelDeliveryCommand": {
|
|
14
|
+
"description": "One connector activity call. `idempotency_key` is the invocation id, or\n`{invocation}:chunk:{i}/{n}` for a chunk of a split send.",
|
|
15
|
+
"properties": {
|
|
16
|
+
"idempotencyKey": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"invocationId": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"operation": {
|
|
23
|
+
"$ref": "#/definitions/ChannelDeliveryOperation"
|
|
24
|
+
},
|
|
25
|
+
"route": {
|
|
26
|
+
"$ref": "#/definitions/ChannelRoute"
|
|
27
|
+
},
|
|
28
|
+
"version": {
|
|
29
|
+
"format": "uint32",
|
|
30
|
+
"minimum": 0,
|
|
31
|
+
"type": "integer"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"required": [
|
|
35
|
+
"version",
|
|
36
|
+
"invocationId",
|
|
37
|
+
"idempotencyKey",
|
|
38
|
+
"route",
|
|
39
|
+
"operation"
|
|
40
|
+
],
|
|
41
|
+
"type": "object"
|
|
42
|
+
},
|
|
43
|
+
"ChannelDeliveryOperation": {
|
|
44
|
+
"description": "What a connector executes: provider message ids and their direction.",
|
|
45
|
+
"oneOf": [
|
|
46
|
+
{
|
|
47
|
+
"properties": {
|
|
48
|
+
"replyContext": {
|
|
49
|
+
"anyOf": [
|
|
50
|
+
{
|
|
51
|
+
"$ref": "#/definitions/ReplyContext"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "null"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"replyTo": {
|
|
59
|
+
"type": [
|
|
60
|
+
"string",
|
|
61
|
+
"null"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"text": {
|
|
65
|
+
"type": "string"
|
|
66
|
+
},
|
|
67
|
+
"type": {
|
|
68
|
+
"const": "send",
|
|
69
|
+
"type": "string"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"required": [
|
|
73
|
+
"type",
|
|
74
|
+
"text"
|
|
75
|
+
],
|
|
76
|
+
"type": "object"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"properties": {
|
|
80
|
+
"messageId": {
|
|
81
|
+
"type": "string"
|
|
82
|
+
},
|
|
83
|
+
"text": {
|
|
84
|
+
"type": "string"
|
|
85
|
+
},
|
|
86
|
+
"type": {
|
|
87
|
+
"const": "edit",
|
|
88
|
+
"type": "string"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": [
|
|
92
|
+
"type",
|
|
93
|
+
"messageId",
|
|
94
|
+
"text"
|
|
95
|
+
],
|
|
96
|
+
"type": "object"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"properties": {
|
|
100
|
+
"emoji": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
"fromMe": {
|
|
104
|
+
"description": "Whether the reacted-to message is the bot's own.",
|
|
105
|
+
"type": "boolean"
|
|
106
|
+
},
|
|
107
|
+
"messageId": {
|
|
108
|
+
"type": "string"
|
|
109
|
+
},
|
|
110
|
+
"type": {
|
|
111
|
+
"const": "react",
|
|
112
|
+
"type": "string"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"required": [
|
|
116
|
+
"type",
|
|
117
|
+
"messageId",
|
|
118
|
+
"emoji",
|
|
119
|
+
"fromMe"
|
|
120
|
+
],
|
|
121
|
+
"type": "object"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"ChannelDeliveryResult": {
|
|
126
|
+
"properties": {
|
|
127
|
+
"messageIds": {
|
|
128
|
+
"description": "Every provider id the delivery produced (a chunked send has several;\nthe first is the anchor).",
|
|
129
|
+
"items": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
},
|
|
132
|
+
"type": "array"
|
|
133
|
+
},
|
|
134
|
+
"provider": {
|
|
135
|
+
"$ref": "#/definitions/ChannelProvider"
|
|
136
|
+
},
|
|
137
|
+
"version": {
|
|
138
|
+
"format": "uint32",
|
|
139
|
+
"minimum": 0,
|
|
140
|
+
"type": "integer"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"required": [
|
|
144
|
+
"version",
|
|
145
|
+
"provider",
|
|
146
|
+
"messageIds"
|
|
147
|
+
],
|
|
148
|
+
"type": "object"
|
|
149
|
+
},
|
|
150
|
+
"ChannelInboundMedia": {
|
|
151
|
+
"description": "A provider-owned attachment reference; never bytes. The connector\ndownloads it when the conversation workflow asks (`prepare_channel_media`).",
|
|
152
|
+
"properties": {
|
|
153
|
+
"byteSize": {
|
|
154
|
+
"format": "uint64",
|
|
155
|
+
"minimum": 0,
|
|
156
|
+
"type": [
|
|
157
|
+
"integer",
|
|
158
|
+
"null"
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
"fileId": {
|
|
162
|
+
"description": "Provider file handle (a Telegram file id, a sealed WhatsApp locator).",
|
|
163
|
+
"type": "string"
|
|
164
|
+
},
|
|
165
|
+
"kind": {
|
|
166
|
+
"$ref": "#/definitions/ChannelMediaKind"
|
|
167
|
+
},
|
|
168
|
+
"mime": {
|
|
169
|
+
"type": "string"
|
|
170
|
+
},
|
|
171
|
+
"name": {
|
|
172
|
+
"type": [
|
|
173
|
+
"string",
|
|
174
|
+
"null"
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"required": [
|
|
179
|
+
"fileId",
|
|
180
|
+
"kind",
|
|
181
|
+
"mime"
|
|
182
|
+
],
|
|
183
|
+
"type": "object"
|
|
184
|
+
},
|
|
185
|
+
"ChannelMediaKind": {
|
|
186
|
+
"enum": [
|
|
187
|
+
"image",
|
|
188
|
+
"audio",
|
|
189
|
+
"document"
|
|
190
|
+
],
|
|
191
|
+
"type": "string"
|
|
192
|
+
},
|
|
193
|
+
"ChannelProvider": {
|
|
194
|
+
"type": "string"
|
|
195
|
+
},
|
|
196
|
+
"ChannelRoute": {
|
|
197
|
+
"description": "Where a delivery goes: one account's chat, optionally a thread.",
|
|
198
|
+
"properties": {
|
|
199
|
+
"accountId": {
|
|
200
|
+
"$ref": "#/definitions/ChannelAccountId"
|
|
201
|
+
},
|
|
202
|
+
"chatId": {
|
|
203
|
+
"type": "string"
|
|
204
|
+
},
|
|
205
|
+
"provider": {
|
|
206
|
+
"$ref": "#/definitions/ChannelProvider"
|
|
207
|
+
},
|
|
208
|
+
"threadId": {
|
|
209
|
+
"type": [
|
|
210
|
+
"string",
|
|
211
|
+
"null"
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"required": [
|
|
216
|
+
"provider",
|
|
217
|
+
"accountId",
|
|
218
|
+
"chatId"
|
|
219
|
+
],
|
|
220
|
+
"type": "object"
|
|
221
|
+
},
|
|
222
|
+
"ChatAccess": {
|
|
223
|
+
"description": "Who may take a turn and who may issue control commands, by provider\nhandle (Telegram user id, WhatsApp JID). Handle allowlists on the\ntrigger replace any platform membership lookup.",
|
|
224
|
+
"properties": {
|
|
225
|
+
"allowed": {
|
|
226
|
+
"description": "Handles allowed to take a turn when `turn` is `listed`.",
|
|
227
|
+
"items": {
|
|
228
|
+
"type": "string"
|
|
229
|
+
},
|
|
230
|
+
"type": "array"
|
|
231
|
+
},
|
|
232
|
+
"controllers": {
|
|
233
|
+
"description": "Handles allowed to issue `/activation` and `/status`; empty denies\ncontrol commands to everyone.",
|
|
234
|
+
"items": {
|
|
235
|
+
"type": "string"
|
|
236
|
+
},
|
|
237
|
+
"type": "array"
|
|
238
|
+
},
|
|
239
|
+
"turn": {
|
|
240
|
+
"allOf": [
|
|
241
|
+
{
|
|
242
|
+
"$ref": "#/definitions/ChatTurnAccess"
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"default": "anyone"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"type": "object"
|
|
249
|
+
},
|
|
250
|
+
"ChatActivation": {
|
|
251
|
+
"description": "When the bot acts in a conversation.",
|
|
252
|
+
"properties": {
|
|
253
|
+
"group": {
|
|
254
|
+
"anyOf": [
|
|
255
|
+
{
|
|
256
|
+
"$ref": "#/definitions/ChatGroupActivation"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"type": "null"
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
"mentionNames": {
|
|
264
|
+
"items": {
|
|
265
|
+
"type": "string"
|
|
266
|
+
},
|
|
267
|
+
"type": "array"
|
|
268
|
+
},
|
|
269
|
+
"triggerPrefixes": {
|
|
270
|
+
"items": {
|
|
271
|
+
"type": "string"
|
|
272
|
+
},
|
|
273
|
+
"type": "array"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"type": "object"
|
|
277
|
+
},
|
|
278
|
+
"ChatGroupActivation": {
|
|
279
|
+
"oneOf": [
|
|
280
|
+
{
|
|
281
|
+
"const": "mention",
|
|
282
|
+
"description": "Act on mentions, replies to the bot, and trigger prefixes only.",
|
|
283
|
+
"type": "string"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"const": "always",
|
|
287
|
+
"description": "Act on every message.",
|
|
288
|
+
"type": "string"
|
|
289
|
+
}
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
"ChatScope": {
|
|
293
|
+
"enum": [
|
|
294
|
+
"direct",
|
|
295
|
+
"group"
|
|
296
|
+
],
|
|
297
|
+
"type": "string"
|
|
298
|
+
},
|
|
299
|
+
"ChatTurnAccess": {
|
|
300
|
+
"oneOf": [
|
|
301
|
+
{
|
|
302
|
+
"const": "anyone",
|
|
303
|
+
"description": "Anyone in the conversation may take a turn.",
|
|
304
|
+
"type": "string"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"const": "listed",
|
|
308
|
+
"description": "Only the listed provider handles may take a turn.",
|
|
309
|
+
"type": "string"
|
|
310
|
+
}
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
"ConversationRef": {
|
|
314
|
+
"description": "The conversation a message belongs to: one account's chat, optionally\na thread inside it.",
|
|
315
|
+
"properties": {
|
|
316
|
+
"accountId": {
|
|
317
|
+
"$ref": "#/definitions/ChannelAccountId"
|
|
318
|
+
},
|
|
319
|
+
"chatId": {
|
|
320
|
+
"type": "string"
|
|
321
|
+
},
|
|
322
|
+
"threadId": {
|
|
323
|
+
"type": [
|
|
324
|
+
"string",
|
|
325
|
+
"null"
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
"required": [
|
|
330
|
+
"accountId",
|
|
331
|
+
"chatId"
|
|
332
|
+
],
|
|
333
|
+
"type": "object"
|
|
334
|
+
},
|
|
335
|
+
"ConversationStart": {
|
|
336
|
+
"description": "Secret-free durable input of one conversation workflow: the chat trigger\nit serves and the conversation it fronts. The workflow owns nothing on\nthe core side: the bot controller creates and controls the session; the\nworkflow is the source of the conversation's events and the receiver of\nits `message_*` tools.",
|
|
337
|
+
"properties": {
|
|
338
|
+
"access": {
|
|
339
|
+
"$ref": "#/definitions/ChatAccess"
|
|
340
|
+
},
|
|
341
|
+
"accountId": {
|
|
342
|
+
"$ref": "#/definitions/ChannelAccountId"
|
|
343
|
+
},
|
|
344
|
+
"activation": {
|
|
345
|
+
"$ref": "#/definitions/ChatActivation"
|
|
346
|
+
},
|
|
347
|
+
"botId": {
|
|
348
|
+
"$ref": "#/definitions/BotId"
|
|
349
|
+
},
|
|
350
|
+
"connectorTaskQueue": {
|
|
351
|
+
"description": "Task queue of the connector host serving the account.",
|
|
352
|
+
"type": "string"
|
|
353
|
+
},
|
|
354
|
+
"conversation": {
|
|
355
|
+
"$ref": "#/definitions/ConversationRef"
|
|
356
|
+
},
|
|
357
|
+
"label": {
|
|
358
|
+
"description": "Human label of the conversation (routed session label, display name).",
|
|
359
|
+
"type": "string"
|
|
360
|
+
},
|
|
361
|
+
"provider": {
|
|
362
|
+
"$ref": "#/definitions/ChannelProvider"
|
|
363
|
+
},
|
|
364
|
+
"scope": {
|
|
365
|
+
"$ref": "#/definitions/ChatScope"
|
|
366
|
+
},
|
|
367
|
+
"triggerId": {
|
|
368
|
+
"$ref": "#/definitions/BotTriggerId"
|
|
369
|
+
},
|
|
370
|
+
"universeId": {
|
|
371
|
+
"type": "string"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"required": [
|
|
375
|
+
"universeId",
|
|
376
|
+
"botId",
|
|
377
|
+
"triggerId",
|
|
378
|
+
"accountId",
|
|
379
|
+
"provider",
|
|
380
|
+
"conversation",
|
|
381
|
+
"scope",
|
|
382
|
+
"activation",
|
|
383
|
+
"access",
|
|
384
|
+
"label",
|
|
385
|
+
"connectorTaskQueue"
|
|
386
|
+
],
|
|
387
|
+
"type": "object"
|
|
388
|
+
},
|
|
389
|
+
"EmissionBody": {
|
|
390
|
+
"description": "Closed internal vocabulary carried by the shared delivery signal.\n\nWorkflow-tool invocation bodies join this enum when the durable tool\ncontracts land. This first slice folds the two existing transports.",
|
|
391
|
+
"oneOf": [
|
|
392
|
+
{
|
|
393
|
+
"properties": {
|
|
394
|
+
"failure_message_ref": {
|
|
395
|
+
"type": [
|
|
396
|
+
"string",
|
|
397
|
+
"null"
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
"kind": {
|
|
401
|
+
"const": "run_terminal",
|
|
402
|
+
"type": "string"
|
|
403
|
+
},
|
|
404
|
+
"output_ref": {
|
|
405
|
+
"type": [
|
|
406
|
+
"string",
|
|
407
|
+
"null"
|
|
408
|
+
]
|
|
409
|
+
},
|
|
410
|
+
"run_id": {
|
|
411
|
+
"format": "uint64",
|
|
412
|
+
"minimum": 0,
|
|
413
|
+
"type": "integer"
|
|
414
|
+
},
|
|
415
|
+
"status": {
|
|
416
|
+
"$ref": "#/definitions/RunStatus"
|
|
417
|
+
},
|
|
418
|
+
"token": {
|
|
419
|
+
"type": "string"
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
"required": [
|
|
423
|
+
"kind",
|
|
424
|
+
"token",
|
|
425
|
+
"run_id",
|
|
426
|
+
"status"
|
|
427
|
+
],
|
|
428
|
+
"type": "object"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"properties": {
|
|
432
|
+
"kind": {
|
|
433
|
+
"const": "source_resolution",
|
|
434
|
+
"type": "string"
|
|
435
|
+
},
|
|
436
|
+
"promise_id": {
|
|
437
|
+
"$ref": "#/definitions/PromiseId"
|
|
438
|
+
},
|
|
439
|
+
"resolution": {
|
|
440
|
+
"$ref": "#/definitions/PromiseResolution"
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
"required": [
|
|
444
|
+
"kind",
|
|
445
|
+
"promise_id",
|
|
446
|
+
"resolution"
|
|
447
|
+
],
|
|
448
|
+
"type": "object"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"properties": {
|
|
452
|
+
"holder_workflow_id": {
|
|
453
|
+
"description": "Workflow id of the session that emitted the invocation — the\nendpoint a receiver signals its reply to. Supplied by the\nsubstrate adapter; the engine treats it as opaque.",
|
|
454
|
+
"type": "string"
|
|
455
|
+
},
|
|
456
|
+
"invocation": {
|
|
457
|
+
"$ref": "#/definitions/WorkflowToolInvocation"
|
|
458
|
+
},
|
|
459
|
+
"kind": {
|
|
460
|
+
"const": "tool_invocation",
|
|
461
|
+
"type": "string"
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
"required": [
|
|
465
|
+
"kind",
|
|
466
|
+
"invocation",
|
|
467
|
+
"holder_workflow_id"
|
|
468
|
+
],
|
|
469
|
+
"type": "object"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"description": "Best-effort notice to a bound receiver that the session already\nresolved one keyed completion promise as cancelled. The receiver may\nstop the domain work behind that key; a later reply is ignored\nbecause the promise is terminal.",
|
|
473
|
+
"properties": {
|
|
474
|
+
"completion_key": {
|
|
475
|
+
"type": "string"
|
|
476
|
+
},
|
|
477
|
+
"invocation_id": {
|
|
478
|
+
"$ref": "#/definitions/WorkflowToolInvocationId"
|
|
479
|
+
},
|
|
480
|
+
"kind": {
|
|
481
|
+
"const": "invocation_cancellation",
|
|
482
|
+
"type": "string"
|
|
483
|
+
},
|
|
484
|
+
"promise_id": {
|
|
485
|
+
"$ref": "#/definitions/PromiseId"
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
"required": [
|
|
489
|
+
"kind",
|
|
490
|
+
"invocation_id",
|
|
491
|
+
"completion_key",
|
|
492
|
+
"promise_id"
|
|
493
|
+
],
|
|
494
|
+
"type": "object"
|
|
495
|
+
}
|
|
496
|
+
]
|
|
497
|
+
},
|
|
498
|
+
"EmissionEnvelope": {
|
|
499
|
+
"description": "Bounded cross-workflow fact delivered through the fixed\n`deliver_emission` signal.",
|
|
500
|
+
"properties": {
|
|
501
|
+
"body": {
|
|
502
|
+
"$ref": "#/definitions/EmissionBody"
|
|
503
|
+
},
|
|
504
|
+
"emission_id": {
|
|
505
|
+
"$ref": "#/definitions/EmissionId"
|
|
506
|
+
},
|
|
507
|
+
"producer": {
|
|
508
|
+
"$ref": "#/definitions/EmissionProducer"
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
"required": [
|
|
512
|
+
"emission_id",
|
|
513
|
+
"producer",
|
|
514
|
+
"body"
|
|
515
|
+
],
|
|
516
|
+
"type": "object"
|
|
517
|
+
},
|
|
518
|
+
"EmissionId": {
|
|
519
|
+
"description": "Stable identity for one cross-workflow emission.\n\nIds are deterministic digests over a domain-separated, length-prefixed\nproducer/source identity. They are safe to recompute after activity retry,\nworker restart, or workflow continue-as-new.",
|
|
520
|
+
"type": "string"
|
|
521
|
+
},
|
|
522
|
+
"EmissionProducer": {
|
|
523
|
+
"description": "Durable producer identity carried with every emission.",
|
|
524
|
+
"oneOf": [
|
|
525
|
+
{
|
|
526
|
+
"description": "A session-log-backed emission. `log_seq` is the exact sequence of the\nevent that produced the fact.",
|
|
527
|
+
"properties": {
|
|
528
|
+
"kind": {
|
|
529
|
+
"const": "session",
|
|
530
|
+
"type": "string"
|
|
531
|
+
},
|
|
532
|
+
"log_seq": {
|
|
533
|
+
"format": "uint64",
|
|
534
|
+
"minimum": 0,
|
|
535
|
+
"type": "integer"
|
|
536
|
+
},
|
|
537
|
+
"session_id": {
|
|
538
|
+
"$ref": "#/definitions/SessionId"
|
|
539
|
+
},
|
|
540
|
+
"universe_id": {
|
|
541
|
+
"format": "uuid",
|
|
542
|
+
"type": "string"
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
"required": [
|
|
546
|
+
"kind",
|
|
547
|
+
"universe_id",
|
|
548
|
+
"session_id",
|
|
549
|
+
"log_seq"
|
|
550
|
+
],
|
|
551
|
+
"type": "object"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"description": "An emission backed by another durable workflow's state.\n`universe_id` scopes this communication edge; it does not imply that\nthe producing workflow itself is universe-owned. A deployment-global\nworkflow may emit independently authorized facts for multiple\nuniverses.",
|
|
555
|
+
"properties": {
|
|
556
|
+
"kind": {
|
|
557
|
+
"const": "workflow",
|
|
558
|
+
"type": "string"
|
|
559
|
+
},
|
|
560
|
+
"universe_id": {
|
|
561
|
+
"format": "uuid",
|
|
562
|
+
"type": "string"
|
|
563
|
+
},
|
|
564
|
+
"workflow_id": {
|
|
565
|
+
"type": "string"
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
"required": [
|
|
569
|
+
"kind",
|
|
570
|
+
"universe_id",
|
|
571
|
+
"workflow_id"
|
|
572
|
+
],
|
|
573
|
+
"type": "object"
|
|
574
|
+
}
|
|
575
|
+
]
|
|
576
|
+
},
|
|
577
|
+
"MaintainChannelTypingInput": {
|
|
578
|
+
"description": "`maintain_channel_typing`: keep the provider's typing indicator up for\nthe conversation until the activity is cancelled.",
|
|
579
|
+
"properties": {
|
|
580
|
+
"route": {
|
|
581
|
+
"$ref": "#/definitions/ChannelRoute"
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
"required": [
|
|
585
|
+
"route"
|
|
586
|
+
],
|
|
587
|
+
"type": "object"
|
|
588
|
+
},
|
|
589
|
+
"PrepareChannelMediaInput": {
|
|
590
|
+
"description": "`prepare_channel_media`: the connector downloads the provider file and\nstores it in the universe's CAS.",
|
|
591
|
+
"properties": {
|
|
592
|
+
"media": {
|
|
593
|
+
"$ref": "#/definitions/ChannelInboundMedia"
|
|
594
|
+
},
|
|
595
|
+
"route": {
|
|
596
|
+
"$ref": "#/definitions/ChannelRoute"
|
|
597
|
+
},
|
|
598
|
+
"universeId": {
|
|
599
|
+
"type": "string"
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
"required": [
|
|
603
|
+
"universeId",
|
|
604
|
+
"route",
|
|
605
|
+
"media"
|
|
606
|
+
],
|
|
607
|
+
"type": "object"
|
|
608
|
+
},
|
|
609
|
+
"PrepareChannelMediaResult": {
|
|
610
|
+
"properties": {
|
|
611
|
+
"item": {
|
|
612
|
+
"$ref": "#/definitions/PreparedMediaItem"
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
"required": [
|
|
616
|
+
"item"
|
|
617
|
+
],
|
|
618
|
+
"type": "object"
|
|
619
|
+
},
|
|
620
|
+
"PreparedMediaItem": {
|
|
621
|
+
"description": "A prepared attachment: a CAS reference, never bytes.",
|
|
622
|
+
"properties": {
|
|
623
|
+
"blobRef": {
|
|
624
|
+
"type": "string"
|
|
625
|
+
},
|
|
626
|
+
"kind": {
|
|
627
|
+
"$ref": "#/definitions/ChannelMediaKind"
|
|
628
|
+
},
|
|
629
|
+
"mime": {
|
|
630
|
+
"type": "string"
|
|
631
|
+
},
|
|
632
|
+
"name": {
|
|
633
|
+
"type": [
|
|
634
|
+
"string",
|
|
635
|
+
"null"
|
|
636
|
+
]
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"required": [
|
|
640
|
+
"blobRef",
|
|
641
|
+
"kind",
|
|
642
|
+
"mime"
|
|
643
|
+
],
|
|
644
|
+
"type": "object"
|
|
645
|
+
},
|
|
646
|
+
"PromiseId": {
|
|
647
|
+
"description": "Stable identifier for a promise: a session-scoped counter rendered as\n`promise_<n>`, the same convention as `run_<n>`, so the model copies a\nshort handle rather than a digest. The engine hands every tool batch a\nbase one past the session cursor (`ToolInvocationBatchRequest::\npromise_id_base`); the executor numbers the promises it creates from\nthat base, and the reducer accepts a creation only at or above the\nbatch's base and never twice. Producer correlation lives on\n`PromiseSource`, not in the id.",
|
|
648
|
+
"type": "string"
|
|
649
|
+
},
|
|
650
|
+
"PromiseResolution": {
|
|
651
|
+
"description": "How a promise reached a terminal state. Used by `ResolvePromise`\nadmission; all transports (push notifications, poll results, timers,\ncancellation) converge on this one funnel.",
|
|
652
|
+
"oneOf": [
|
|
653
|
+
{
|
|
654
|
+
"properties": {
|
|
655
|
+
"kind": {
|
|
656
|
+
"const": "resolved",
|
|
657
|
+
"type": "string"
|
|
658
|
+
},
|
|
659
|
+
"payload_ref": {
|
|
660
|
+
"type": [
|
|
661
|
+
"string",
|
|
662
|
+
"null"
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
"required": [
|
|
667
|
+
"kind"
|
|
668
|
+
],
|
|
669
|
+
"type": "object"
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"properties": {
|
|
673
|
+
"error_ref": {
|
|
674
|
+
"type": [
|
|
675
|
+
"string",
|
|
676
|
+
"null"
|
|
677
|
+
]
|
|
678
|
+
},
|
|
679
|
+
"kind": {
|
|
680
|
+
"const": "failed",
|
|
681
|
+
"type": "string"
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
"required": [
|
|
685
|
+
"kind"
|
|
686
|
+
],
|
|
687
|
+
"type": "object"
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
"properties": {
|
|
691
|
+
"kind": {
|
|
692
|
+
"const": "cancelled",
|
|
693
|
+
"type": "string"
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
"required": [
|
|
697
|
+
"kind"
|
|
698
|
+
],
|
|
699
|
+
"type": "object"
|
|
700
|
+
}
|
|
701
|
+
]
|
|
702
|
+
},
|
|
703
|
+
"ReplyContext": {
|
|
704
|
+
"description": "The message a send replies to, for providers that quote it themselves.",
|
|
705
|
+
"properties": {
|
|
706
|
+
"senderId": {
|
|
707
|
+
"type": "string"
|
|
708
|
+
},
|
|
709
|
+
"text": {
|
|
710
|
+
"type": "string"
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
"required": [
|
|
714
|
+
"senderId",
|
|
715
|
+
"text"
|
|
716
|
+
],
|
|
717
|
+
"type": "object"
|
|
718
|
+
},
|
|
719
|
+
"RunStatus": {
|
|
720
|
+
"enum": [
|
|
721
|
+
"active",
|
|
722
|
+
"parked",
|
|
723
|
+
"cancelling",
|
|
724
|
+
"completed",
|
|
725
|
+
"failed",
|
|
726
|
+
"cancelled"
|
|
727
|
+
],
|
|
728
|
+
"type": "string"
|
|
729
|
+
},
|
|
730
|
+
"SessionId": {
|
|
731
|
+
"type": "string"
|
|
732
|
+
},
|
|
733
|
+
"ToolCallId": {
|
|
734
|
+
"type": "string"
|
|
735
|
+
},
|
|
736
|
+
"WorkflowToolId": {
|
|
737
|
+
"type": "string"
|
|
738
|
+
},
|
|
739
|
+
"WorkflowToolInvocation": {
|
|
740
|
+
"description": "Bounded durable record of one successful workflow-tool tool call.\n\nThe model arguments remain in CAS and are referenced by `arguments_ref`.\nReceiver-specific interpretation belongs to the receiving workflow.",
|
|
741
|
+
"properties": {
|
|
742
|
+
"arguments_ref": {
|
|
743
|
+
"type": "string"
|
|
744
|
+
},
|
|
745
|
+
"binding_fingerprint": {
|
|
746
|
+
"type": "string"
|
|
747
|
+
},
|
|
748
|
+
"completion_promises": {
|
|
749
|
+
"additionalProperties": {
|
|
750
|
+
"$ref": "#/definitions/PromiseId"
|
|
751
|
+
},
|
|
752
|
+
"description": "Keyed promise set created atomically with this invocation; `None`\nfor notify (`Accepted`) completion. Request/reply is the single\nreserved key `reply`.",
|
|
753
|
+
"type": [
|
|
754
|
+
"object",
|
|
755
|
+
"null"
|
|
756
|
+
]
|
|
757
|
+
},
|
|
758
|
+
"execution_context_ref": {
|
|
759
|
+
"description": "Opaque, runtime-supplied context for the receiving workflow. This is\nseparate from model-authored arguments so runtime state can be pinned\nwithout changing the tool's declared argument schema.",
|
|
760
|
+
"type": [
|
|
761
|
+
"string",
|
|
762
|
+
"null"
|
|
763
|
+
]
|
|
764
|
+
},
|
|
765
|
+
"invocation_id": {
|
|
766
|
+
"$ref": "#/definitions/WorkflowToolInvocationId"
|
|
767
|
+
},
|
|
768
|
+
"run_id": {
|
|
769
|
+
"format": "uint64",
|
|
770
|
+
"minimum": 0,
|
|
771
|
+
"type": "integer"
|
|
772
|
+
},
|
|
773
|
+
"schema_revision": {
|
|
774
|
+
"format": "uint32",
|
|
775
|
+
"minimum": 0,
|
|
776
|
+
"type": "integer"
|
|
777
|
+
},
|
|
778
|
+
"semantic_type": {
|
|
779
|
+
"type": "string"
|
|
780
|
+
},
|
|
781
|
+
"session_id": {
|
|
782
|
+
"$ref": "#/definitions/SessionId"
|
|
783
|
+
},
|
|
784
|
+
"session_universe_id": {
|
|
785
|
+
"format": "uuid",
|
|
786
|
+
"type": "string"
|
|
787
|
+
},
|
|
788
|
+
"tool_batch_id": {
|
|
789
|
+
"format": "uint64",
|
|
790
|
+
"minimum": 0,
|
|
791
|
+
"type": "integer"
|
|
792
|
+
},
|
|
793
|
+
"tool_call_id": {
|
|
794
|
+
"$ref": "#/definitions/ToolCallId"
|
|
795
|
+
},
|
|
796
|
+
"tool_id": {
|
|
797
|
+
"$ref": "#/definitions/WorkflowToolId"
|
|
798
|
+
},
|
|
799
|
+
"turn_id": {
|
|
800
|
+
"format": "uint64",
|
|
801
|
+
"minimum": 0,
|
|
802
|
+
"type": "integer"
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
"required": [
|
|
806
|
+
"invocation_id",
|
|
807
|
+
"tool_id",
|
|
808
|
+
"semantic_type",
|
|
809
|
+
"schema_revision",
|
|
810
|
+
"binding_fingerprint",
|
|
811
|
+
"session_universe_id",
|
|
812
|
+
"session_id",
|
|
813
|
+
"run_id",
|
|
814
|
+
"turn_id",
|
|
815
|
+
"tool_batch_id",
|
|
816
|
+
"tool_call_id",
|
|
817
|
+
"arguments_ref"
|
|
818
|
+
],
|
|
819
|
+
"type": "object"
|
|
820
|
+
},
|
|
821
|
+
"WorkflowToolInvocationId": {
|
|
822
|
+
"type": "string"
|
|
823
|
+
},
|
|
824
|
+
"WorkflowToolRecipeV1": {
|
|
825
|
+
"properties": {
|
|
826
|
+
"taskQueue": {
|
|
827
|
+
"type": "string"
|
|
828
|
+
},
|
|
829
|
+
"workflowType": {
|
|
830
|
+
"type": "string"
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
"required": [
|
|
834
|
+
"workflowType",
|
|
835
|
+
"taskQueue"
|
|
836
|
+
],
|
|
837
|
+
"type": "object"
|
|
838
|
+
},
|
|
839
|
+
"WorkflowToolRecoveryResult": {
|
|
840
|
+
"description": "Result shape of [`WORKFLOW_TOOL_RECOVERY_QUERY`].",
|
|
841
|
+
"properties": {
|
|
842
|
+
"resolutions": {
|
|
843
|
+
"additionalProperties": {
|
|
844
|
+
"$ref": "#/definitions/PromiseResolution"
|
|
845
|
+
},
|
|
846
|
+
"default": {},
|
|
847
|
+
"type": "object"
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
"type": "object"
|
|
851
|
+
},
|
|
852
|
+
"WorkflowToolStartArgs": {
|
|
853
|
+
"description": "Start arguments every start-on-call plugin workflow receives. The plugin\nresolves each keyed completion promise by emitting `SourceResolution`\nbodies to the holder workflow through the fixed `deliver_emission`\nsignal, using its own execution id as the producer workflow id.",
|
|
854
|
+
"properties": {
|
|
855
|
+
"execution_id": {
|
|
856
|
+
"type": "string"
|
|
857
|
+
},
|
|
858
|
+
"holder_workflow_id": {
|
|
859
|
+
"type": "string"
|
|
860
|
+
},
|
|
861
|
+
"invocation": {
|
|
862
|
+
"$ref": "#/definitions/WorkflowToolInvocation"
|
|
863
|
+
},
|
|
864
|
+
"universe_id": {
|
|
865
|
+
"format": "uuid",
|
|
866
|
+
"type": "string"
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
"required": [
|
|
870
|
+
"universe_id",
|
|
871
|
+
"holder_workflow_id",
|
|
872
|
+
"execution_id",
|
|
873
|
+
"invocation"
|
|
874
|
+
],
|
|
875
|
+
"type": "object"
|
|
876
|
+
}
|
|
877
|
+
},
|
|
878
|
+
"description": "Envelope and start-on-call types of the fixed deliver_emission transport between sessions and receiver workflows.",
|
|
879
|
+
"title": "Lightspeed Workflow Contract"
|
|
880
|
+
}
|