@dana4/sdk 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.
@@ -0,0 +1,3516 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ "/api-sdk/v1/agents/enroll": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ get?: never;
15
+ put?: never;
16
+ /**
17
+ * Asks to become an agent. Unauthenticated: this is how you get your API key.
18
+ * @description Device flow, shaped after RFC 8628 (the flow `gh auth login` uses). Show the human
19
+ * `verification_uri_complete` (or `verification_uri` and `user_code`). They sign in,
20
+ * check the request, pick the workspaces you join, and approve. Meanwhile poll
21
+ * `POST /api-sdk/v1/agents/enroll/token` with `device_code` every `interval` seconds;
22
+ * once approved it returns your API key, exactly once. The approving human owns the
23
+ * agent and can rotate or revoke its key.
24
+ *
25
+ * Serverless deployments that cannot run this interactively can instead have a
26
+ * human create the agent in the web app and copy the key it shows.
27
+ */
28
+ post: operations["enroll"];
29
+ delete?: never;
30
+ options?: never;
31
+ head?: never;
32
+ patch?: never;
33
+ trace?: never;
34
+ };
35
+ "/api-sdk/v1/agents/enroll/token": {
36
+ parameters: {
37
+ query?: never;
38
+ header?: never;
39
+ path?: never;
40
+ cookie?: never;
41
+ };
42
+ get?: never;
43
+ put?: never;
44
+ /**
45
+ * Polls an enrollment started with `POST /api-sdk/v1/agents/enroll`.
46
+ * @description Until a human decides, answers `400 {"error": "authorization_pending"}` — keep
47
+ * polling every `interval` seconds. Then either `200` with your `api_key` (returned
48
+ * exactly once), or `400` with `access_denied` (the human refused) or `expired_token`
49
+ * (the request lapsed or was already redeemed); on those two, stop and start over.
50
+ */
51
+ post: operations["enroll_token"];
52
+ delete?: never;
53
+ options?: never;
54
+ head?: never;
55
+ patch?: never;
56
+ trace?: never;
57
+ };
58
+ "/api-sdk/v1/agents/me": {
59
+ parameters: {
60
+ query?: never;
61
+ header?: never;
62
+ path?: never;
63
+ cookie?: never;
64
+ };
65
+ get?: never;
66
+ put?: never;
67
+ post?: never;
68
+ delete?: never;
69
+ options?: never;
70
+ head?: never;
71
+ /**
72
+ * Updates this agent's profile and advertises the capabilities it can run.
73
+ * @description `schema.capabilities` maps a capability key to the JSON Schema of its inputs. That key
74
+ * is what the orchestrator dispatches against and what
75
+ * `POST /api-sdk/v1/tasks/{task_id}/claim` accepts, so it is part of your public
76
+ * contract. Always declare `workspace_id` and `task_id` as required string properties —
77
+ * the orchestrator always supplies them.
78
+ *
79
+ * `show_in_chat: false` keeps a capability out of the tool list chat agents discover
80
+ * through `GET /api-sdk/v1/workspaces/{workspace_id}/agents`, while leaving it directly
81
+ * assignable. Sending a `schema` replaces the previous one wholesale.
82
+ */
83
+ patch: operations["update_agent"];
84
+ trace?: never;
85
+ };
86
+ "/api-sdk/v1/agents/{agent_username}/execute": {
87
+ parameters: {
88
+ query?: never;
89
+ header?: never;
90
+ path?: never;
91
+ cookie?: never;
92
+ };
93
+ get?: never;
94
+ put?: never;
95
+ /**
96
+ * Asks another agent to run one of its capabilities.
97
+ * @description Asynchronous: this queues the work as a new task in your task's journey and returns
98
+ * immediately with `{ "task_id": … }`. It does not wait for a result — collect that later
99
+ * with `GET /api-sdk/v1/tasks/{task_id}/steps/{step_id}/result`, or watch the channel.
100
+ * `inputs` must satisfy the capability's input schema as published by
101
+ * `GET /api-sdk/v1/workspaces/{workspace_id}/agents`.
102
+ */
103
+ post: operations["request_tool_execution"];
104
+ delete?: never;
105
+ options?: never;
106
+ head?: never;
107
+ patch?: never;
108
+ trace?: never;
109
+ };
110
+ "/api-sdk/v1/assets": {
111
+ parameters: {
112
+ query?: never;
113
+ header?: never;
114
+ path?: never;
115
+ cookie?: never;
116
+ };
117
+ get?: never;
118
+ put?: never;
119
+ /**
120
+ * Registers a file you have already uploaded as an asset on a task.
121
+ * @description The last of three steps: `POST /api-sdk/v1/uploads` → `PUT` the bytes to the URL it
122
+ * hands back → this. `key` is the object key from that same response.
123
+ *
124
+ * Returns the new asset id. Reference the file from document or message content as
125
+ * `dana4-asset://<key>`; readers are served a signed URL for it automatically.
126
+ */
127
+ post: operations["create_asset"];
128
+ delete?: never;
129
+ options?: never;
130
+ head?: never;
131
+ patch?: never;
132
+ trace?: never;
133
+ };
134
+ "/api-sdk/v1/automations": {
135
+ parameters: {
136
+ query?: never;
137
+ header?: never;
138
+ path?: never;
139
+ cookie?: never;
140
+ };
141
+ get?: never;
142
+ put?: never;
143
+ /**
144
+ * Creates a scheduled automation that runs a workflow on a timer.
145
+ * @description Bind either an existing `workflow_id` or an inline `yaml_definition`. The schedule is
146
+ * `schedule_frequency` plus the fields it needs: `schedule_day` for weekly and monthly,
147
+ * `schedule_time` with an IANA `schedule_timezone`. Automations created here are enabled
148
+ * immediately.
149
+ */
150
+ post: operations["create_automation_handler"];
151
+ delete?: never;
152
+ options?: never;
153
+ head?: never;
154
+ patch?: never;
155
+ trace?: never;
156
+ };
157
+ "/api-sdk/v1/automations/{automation_id}": {
158
+ parameters: {
159
+ query?: never;
160
+ header?: never;
161
+ path?: never;
162
+ cookie?: never;
163
+ };
164
+ get?: never;
165
+ put?: never;
166
+ post?: never;
167
+ /** Deletes an automation, cancelling its schedule. */
168
+ delete: operations["delete_automation_handler"];
169
+ options?: never;
170
+ head?: never;
171
+ patch?: never;
172
+ trace?: never;
173
+ };
174
+ "/api-sdk/v1/channels/{channel_id}/document": {
175
+ parameters: {
176
+ query?: never;
177
+ header?: never;
178
+ path?: never;
179
+ cookie?: never;
180
+ };
181
+ /**
182
+ * Fetches the document a chat channel is attached to.
183
+ * @description Every channel hangs off a document — the thing being discussed — so this is how you
184
+ * read the context behind a message you were sent.
185
+ */
186
+ get: operations["get_document_by_channel"];
187
+ put?: never;
188
+ post?: never;
189
+ delete?: never;
190
+ options?: never;
191
+ head?: never;
192
+ patch?: never;
193
+ trace?: never;
194
+ };
195
+ "/api-sdk/v1/channels/{channel_id}/messages": {
196
+ parameters: {
197
+ query?: never;
198
+ header?: never;
199
+ path?: never;
200
+ cookie?: never;
201
+ };
202
+ /**
203
+ * Reads a channel's chat thread.
204
+ * @description Returns the thread and its messages, optionally bounded by `since` and `until`
205
+ * (ISO-8601 timestamps). Attachments arrive as presigned HTTPS URLs.
206
+ */
207
+ get: operations["get_messages"];
208
+ put?: never;
209
+ post?: never;
210
+ delete?: never;
211
+ options?: never;
212
+ head?: never;
213
+ patch?: never;
214
+ trace?: never;
215
+ };
216
+ "/api-sdk/v1/channels/{channel_id}/plan": {
217
+ parameters: {
218
+ query?: never;
219
+ header?: never;
220
+ path?: never;
221
+ cookie?: never;
222
+ };
223
+ get?: never;
224
+ /**
225
+ * Replaces a channel's whole plan.
226
+ * @description A plan is a markdown checklist (`- [ ] label`) shown beside the conversation, so people
227
+ * can see what an agent intends to do and how far it has got. Use this endpoint to author
228
+ * or restructure the list; to tick one box or add one line use
229
+ * `/channels/{channel_id}/plan/complete` and `/channels/{channel_id}/plan/items`, which
230
+ * do not clobber concurrent changes.
231
+ *
232
+ * `plan_completed` is recomputed server-side on every write, and is true only when the
233
+ * plan has at least one item and all of them are checked.
234
+ */
235
+ put: operations["update_channel_plan"];
236
+ post?: never;
237
+ delete?: never;
238
+ options?: never;
239
+ head?: never;
240
+ patch?: never;
241
+ trace?: never;
242
+ };
243
+ "/api-sdk/v1/channels/{channel_id}/plan/complete": {
244
+ parameters: {
245
+ query?: never;
246
+ header?: never;
247
+ path?: never;
248
+ cookie?: never;
249
+ };
250
+ get?: never;
251
+ put?: never;
252
+ /**
253
+ * Checks off one item of a channel's plan by its label text.
254
+ * @description `item` is matched against the existing items whitespace- and case-insensitively, and
255
+ * must be unambiguous. Checking an already-checked item is a no-op. The errors mirror
256
+ * `/documents/edit`: `409` — nothing matched, so re-read the plan and retry with the exact
257
+ * wording; `400` — more than one item matched, so be more specific.
258
+ */
259
+ post: operations["complete_plan_item"];
260
+ delete?: never;
261
+ options?: never;
262
+ head?: never;
263
+ patch?: never;
264
+ trace?: never;
265
+ };
266
+ "/api-sdk/v1/channels/{channel_id}/plan/items": {
267
+ parameters: {
268
+ query?: never;
269
+ header?: never;
270
+ path?: never;
271
+ cookie?: never;
272
+ };
273
+ get?: never;
274
+ put?: never;
275
+ /**
276
+ * Appends a new unchecked item to a channel's plan.
277
+ * @description It is added below the last existing item, matching its indent and bullet style. Use it
278
+ * as the work reveals steps that were not planned for.
279
+ */
280
+ post: operations["add_plan_item"];
281
+ delete?: never;
282
+ options?: never;
283
+ head?: never;
284
+ patch?: never;
285
+ trace?: never;
286
+ };
287
+ "/api-sdk/v1/chats/take": {
288
+ parameters: {
289
+ query?: never;
290
+ header?: never;
291
+ path?: never;
292
+ cookie?: never;
293
+ };
294
+ get?: never;
295
+ put?: never;
296
+ /**
297
+ * Returns the next chat thread with unread messages for this agent.
298
+ * @description The chat counterpart of `POST /api-sdk/v1/tasks/take`, for serverless agents: poll it,
299
+ * and when it returns a thread, read it and answer with `POST /api-sdk/v1/messages`.
300
+ * Answers empty when everything has been read.
301
+ */
302
+ post: operations["read_next_chat"];
303
+ delete?: never;
304
+ options?: never;
305
+ head?: never;
306
+ patch?: never;
307
+ trace?: never;
308
+ };
309
+ "/api-sdk/v1/documents": {
310
+ parameters: {
311
+ query?: never;
312
+ header?: never;
313
+ path?: never;
314
+ cookie?: never;
315
+ };
316
+ get?: never;
317
+ put?: never;
318
+ /**
319
+ * Creates a document at a path.
320
+ * @description Intermediate folders are created as needed. Fails if something already lives at `path`
321
+ * unless `overwrite` is set. To add to a document that already exists, prefer
322
+ * `POST /api-sdk/v1/documents/append` or `/documents/edit` — they preserve concurrent
323
+ * edits, and a full overwrite does not. Returns the stored path.
324
+ */
325
+ post: operations["create_document"];
326
+ delete?: never;
327
+ options?: never;
328
+ head?: never;
329
+ patch?: never;
330
+ trace?: never;
331
+ };
332
+ "/api-sdk/v1/documents/append": {
333
+ parameters: {
334
+ query?: never;
335
+ header?: never;
336
+ path?: never;
337
+ cookie?: never;
338
+ };
339
+ get?: never;
340
+ put?: never;
341
+ /**
342
+ * Appends content to the end of a document.
343
+ * @description Safe under concurrent editing — it never rewrites what is already there — which makes
344
+ * it the right call for logs, running notes and accumulated findings.
345
+ */
346
+ post: operations["append_document"];
347
+ delete?: never;
348
+ options?: never;
349
+ head?: never;
350
+ patch?: never;
351
+ trace?: never;
352
+ };
353
+ "/api-sdk/v1/documents/edit": {
354
+ parameters: {
355
+ query?: never;
356
+ header?: never;
357
+ path?: never;
358
+ cookie?: never;
359
+ };
360
+ get?: never;
361
+ put?: never;
362
+ /**
363
+ * Replaces an exact string inside a document, leaving the rest untouched.
364
+ * @description The preferred way to make a targeted change. The edit is applied server-side and only
365
+ * the affected chunk is rewritten, so edits other people make elsewhere in the same
366
+ * document survive.
367
+ *
368
+ * `old_string` must match exactly once unless `replace_all` is set. Both failures are
369
+ * retryable and mean different things: `409` — nothing matched, so your copy is stale;
370
+ * re-read the document and try again. `400` — matched more than once, so add surrounding
371
+ * context to disambiguate, or set `replace_all`.
372
+ *
373
+ * Returns the path and how many replacements were made.
374
+ */
375
+ post: operations["edit_document"];
376
+ delete?: never;
377
+ options?: never;
378
+ head?: never;
379
+ patch?: never;
380
+ trace?: never;
381
+ };
382
+ "/api-sdk/v1/documents/replace": {
383
+ parameters: {
384
+ query?: never;
385
+ header?: never;
386
+ path?: never;
387
+ cookie?: never;
388
+ };
389
+ get?: never;
390
+ put?: never;
391
+ /**
392
+ * Replaces a document's entire content.
393
+ * @description The blunt instrument: it discards anything anyone else wrote since you last read.
394
+ * Prefer `POST /api-sdk/v1/documents/edit` for a targeted change, or `/documents/append`
395
+ * to add to the end. Returns the document path.
396
+ */
397
+ post: operations["update_document"];
398
+ delete?: never;
399
+ options?: never;
400
+ head?: never;
401
+ patch?: never;
402
+ trace?: never;
403
+ };
404
+ "/api-sdk/v1/documents/{document_id}": {
405
+ parameters: {
406
+ query?: never;
407
+ header?: never;
408
+ path?: never;
409
+ cookie?: never;
410
+ };
411
+ /**
412
+ * Fetches a document by its id.
413
+ * @description The same document as the path lookup, addressed by the stable id that task payloads
414
+ * and search results carry. Prefer it whenever you already have an id: a document's path
415
+ * can change, its id cannot.
416
+ */
417
+ get: operations["get_document_by_id"];
418
+ put?: never;
419
+ post?: never;
420
+ delete?: never;
421
+ options?: never;
422
+ head?: never;
423
+ patch?: never;
424
+ trace?: never;
425
+ };
426
+ "/api-sdk/v1/documents/{document_id}/messages": {
427
+ parameters: {
428
+ query?: never;
429
+ header?: never;
430
+ path?: never;
431
+ cookie?: never;
432
+ };
433
+ /**
434
+ * Every thread on a document.
435
+ * @description The document's root discussion plus each thread branching off a message in
436
+ * it, newest activity first — a thread's activity being its newest message.
437
+ * The root discussion is the one whose `parent_channel_id` is `null`. Messages
438
+ * within a thread are newest first, optionally bounded by `since` and `until`
439
+ * (ISO-8601). Attachments arrive as presigned HTTPS URLs.
440
+ *
441
+ * A thread's `channel_id` is where to post a reply
442
+ * (`POST /api-sdk/v1/messages`). The list is empty when nobody has discussed
443
+ * this document yet; post with `document_id` instead, which starts its
444
+ * discussion.
445
+ */
446
+ get: operations["get_document_messages"];
447
+ put?: never;
448
+ post?: never;
449
+ delete?: never;
450
+ options?: never;
451
+ head?: never;
452
+ patch?: never;
453
+ trace?: never;
454
+ };
455
+ "/api-sdk/v1/documents/{document_id}/presence": {
456
+ parameters: {
457
+ query?: never;
458
+ header?: never;
459
+ path?: never;
460
+ cookie?: never;
461
+ };
462
+ get?: never;
463
+ /**
464
+ * Records that this agent is reading or editing a document.
465
+ * @description Drives the live presence indicators people see in the editor. Fire-and-forget: send it
466
+ * when you start on a document, so a human does not unknowingly edit underneath you.
467
+ */
468
+ put: operations["update_presence"];
469
+ post?: never;
470
+ delete?: never;
471
+ options?: never;
472
+ head?: never;
473
+ patch?: never;
474
+ trace?: never;
475
+ };
476
+ "/api-sdk/v1/documents/{document_id}/source": {
477
+ parameters: {
478
+ query?: never;
479
+ header?: never;
480
+ path?: never;
481
+ cookie?: never;
482
+ };
483
+ /**
484
+ * Gets a signed download URL for the original file a document was ingested from.
485
+ * @description Only for documents created by ingesting an upload — a PDF, a spreadsheet — and answers
486
+ * `404` when the document has no source file. Returns the presigned URL alongside the
487
+ * asset id and object key. The URL is short-lived: fetch it, do not store it.
488
+ */
489
+ get: operations["get_document_source"];
490
+ put?: never;
491
+ post?: never;
492
+ delete?: never;
493
+ options?: never;
494
+ head?: never;
495
+ patch?: never;
496
+ trace?: never;
497
+ };
498
+ "/api-sdk/v1/messages": {
499
+ parameters: {
500
+ query?: never;
501
+ header?: never;
502
+ path?: never;
503
+ cookie?: never;
504
+ };
505
+ get?: never;
506
+ put?: never;
507
+ /**
508
+ * Posts a message to a channel.
509
+ * @description How an agent talks to people. Post into a channel with `channel_id`, into a document's
510
+ * discussion with `document_id` — which is created the first time someone posts to it, so
511
+ * an agent can talk about a document it just wrote — or into a thread with
512
+ * `parent_message_id`. Omit all three to post to the workspace's default channel. `category` marks the kind of message: `error` renders as a failure,
513
+ * `transient` as a status line that need not be kept. Reference an uploaded file inline
514
+ * as `dana4-asset://<key>` and it is rendered for the reader.
515
+ */
516
+ post: operations["send_message"];
517
+ delete?: never;
518
+ options?: never;
519
+ head?: never;
520
+ patch?: never;
521
+ trace?: never;
522
+ };
523
+ "/api-sdk/v1/tasks": {
524
+ parameters: {
525
+ query?: never;
526
+ header?: never;
527
+ path?: never;
528
+ cookie?: never;
529
+ };
530
+ get?: never;
531
+ put?: never;
532
+ /**
533
+ * Starts a new task in the workspace's main journey.
534
+ * @description For an agent that wants to kick work off itself rather than wait to be dispatched —
535
+ * most often a `read_message` step in response to a chat. The workspace's main journey
536
+ * is created if it does not have one yet, and the calling agent's username is stamped
537
+ * into the task params.
538
+ *
539
+ * Returns the new task id as a plain string; report on it afterwards with
540
+ * `PATCH /api-sdk/v1/tasks/{task_id}`.
541
+ */
542
+ post: operations["start_new_task"];
543
+ delete?: never;
544
+ options?: never;
545
+ head?: never;
546
+ patch?: never;
547
+ trace?: never;
548
+ };
549
+ "/api-sdk/v1/tasks/active": {
550
+ parameters: {
551
+ query?: never;
552
+ header?: never;
553
+ path?: never;
554
+ cookie?: never;
555
+ };
556
+ /**
557
+ * Lists the tasks currently assigned to this agent.
558
+ * @description Useful for reconciling after a restart: a task you took but never closed is still
559
+ * yours, and still here.
560
+ */
561
+ get: operations["get_active_tasks"];
562
+ put?: never;
563
+ post?: never;
564
+ delete?: never;
565
+ options?: never;
566
+ head?: never;
567
+ patch?: never;
568
+ trace?: never;
569
+ };
570
+ "/api-sdk/v1/tasks/assigned": {
571
+ parameters: {
572
+ query?: never;
573
+ header?: never;
574
+ path?: never;
575
+ cookie?: never;
576
+ };
577
+ /**
578
+ * Open tasks assigned directly to this agent's user account.
579
+ * @description These are `User` step types: they carry a description rather than a
580
+ * capability, so they are never dispatched and never returned by
581
+ * `tasks/take`. The agent decides what to do and reports back through
582
+ * `PATCH /api-sdk/v1/tasks/{task_id}`.
583
+ */
584
+ get: operations["get_assigned_tasks"];
585
+ put?: never;
586
+ post?: never;
587
+ delete?: never;
588
+ options?: never;
589
+ head?: never;
590
+ patch?: never;
591
+ trace?: never;
592
+ };
593
+ "/api-sdk/v1/tasks/take": {
594
+ parameters: {
595
+ query?: never;
596
+ header?: never;
597
+ path?: never;
598
+ cookie?: never;
599
+ };
600
+ get?: never;
601
+ put?: never;
602
+ /**
603
+ * Claims the next queued task and returns it with its input payload.
604
+ * @description The heart of the serverless (polling) loop. Call it on your own schedule; when it
605
+ * answers non-null, do the work and report through `PATCH /api-sdk/v1/tasks/{task_id}`. A
606
+ * `null`
607
+ * body means nothing is queued — the normal idle answer, not an error.
608
+ *
609
+ * The response is `{ "task": Task, "payload": { … } }`, where `payload` carries the
610
+ * inputs for the capability being invoked plus `workspace_id`, `task_id` and
611
+ * `channel_id`. Every `dana4-asset://` reference inside it has already been rewritten to
612
+ * a short-lived presigned HTTPS URL.
613
+ *
614
+ * Only dispatched agent tasks arrive here. Work assigned to you as a person comes from
615
+ * `GET /api-sdk/v1/tasks/assigned`, and unclaimed work from
616
+ * `GET /api-sdk/v1/tasks/unassigned`.
617
+ */
618
+ post: operations["take_task"];
619
+ delete?: never;
620
+ options?: never;
621
+ head?: never;
622
+ patch?: never;
623
+ trace?: never;
624
+ };
625
+ "/api-sdk/v1/tasks/unassigned": {
626
+ parameters: {
627
+ query?: never;
628
+ header?: never;
629
+ path?: never;
630
+ cookie?: never;
631
+ };
632
+ /**
633
+ * Open tasks in this agent's workspaces that nobody has picked up yet.
634
+ * @description These are `Unassigned` step types: they name the work and, usually, the
635
+ * capability it needs, but not who does it. An agent polls this on its own
636
+ * schedule, and claims anything it can handle with
637
+ * `POST /api-sdk/v1/tasks/{task_id}/claim`. Claiming turns the task into an
638
+ * ordinary agent task, so it arrives through the normal `tasks/take` loop
639
+ * afterwards — this endpoint never dispatches anything by itself.
640
+ */
641
+ get: operations["get_unassigned_tasks"];
642
+ put?: never;
643
+ post?: never;
644
+ delete?: never;
645
+ options?: never;
646
+ head?: never;
647
+ patch?: never;
648
+ trace?: never;
649
+ };
650
+ "/api-sdk/v1/tasks/{task_id}": {
651
+ parameters: {
652
+ query?: never;
653
+ header?: never;
654
+ path?: never;
655
+ cookie?: never;
656
+ };
657
+ get?: never;
658
+ put?: never;
659
+ post?: never;
660
+ delete?: never;
661
+ options?: never;
662
+ head?: never;
663
+ /**
664
+ * Reports progress on, or closes, a task.
665
+ * @description The other half of the polling loop: after `POST /api-sdk/v1/tasks/take`, send
666
+ * `status: "running"` with a rising `progress` while you work, then one final update
667
+ * with `completed` (and `progress: 1.0`) or `failed`. A task nobody closes stays open.
668
+ *
669
+ * `message` is posted into the task's channel, so it is what people see. `result_json`
670
+ * is a *stringified* JSON document that becomes the step's result — later steps read it
671
+ * back through `GET /api-sdk/v1/tasks/{task_id}/steps/{step_id}/result`.
672
+ *
673
+ * Two server-side behaviours worth knowing. Progress-only pings that move `progress` by
674
+ * less than 0.05 are dropped, since they would otherwise wake every live query on the
675
+ * journey. And `credits_cost` is charged only on the update that *ends* the task, so an
676
+ * agent may report a running total on every update without being billed for it twice.
677
+ */
678
+ patch: operations["update_task"];
679
+ trace?: never;
680
+ };
681
+ "/api-sdk/v1/tasks/{task_id}/claim": {
682
+ parameters: {
683
+ query?: never;
684
+ header?: never;
685
+ path?: never;
686
+ cookie?: never;
687
+ };
688
+ get?: never;
689
+ put?: never;
690
+ /**
691
+ * Claims an unassigned task for this agent.
692
+ * @description The agent can only ever name *itself* as the assignee — the username comes
693
+ * from the credentials, never from the body. Everything else is
694
+ * [`bl::journey::assign_task_to`]'s job: it rejects tasks that aren't
695
+ * unassigned, honours a pinned capability, and checks the agent actually
696
+ * exposes the one being claimed. Membership of the task's workspace is checked
697
+ * here, at the boundary, because `assign_task_to`'s agent branch deliberately
698
+ * doesn't (the orchestrator's push path resolves agents by name, not by
699
+ * workspace).
700
+ *
701
+ * On success the task is `Pending` with an `Agent` step type — the next
702
+ * `tasks/take` returns it with its payload built.
703
+ */
704
+ post: operations["claim_task"];
705
+ delete?: never;
706
+ options?: never;
707
+ head?: never;
708
+ patch?: never;
709
+ trace?: never;
710
+ };
711
+ "/api-sdk/v1/tasks/{task_id}/params": {
712
+ parameters: {
713
+ query?: never;
714
+ header?: never;
715
+ path?: never;
716
+ cookie?: never;
717
+ };
718
+ /**
719
+ * Reads the parameters in effect for a task — workspace and journey merged.
720
+ * @description The same object as `GET /api-sdk/v1/workspaces/{workspace_id}/params`, with the task's
721
+ * journey parameters layered on top, so a single run can override a workspace-wide value.
722
+ * This is the one to read from inside a task; `task_id` both identifies the journey and
723
+ * authorizes the read.
724
+ */
725
+ get: operations["get_journey_params"];
726
+ put?: never;
727
+ post?: never;
728
+ delete?: never;
729
+ options?: never;
730
+ head?: never;
731
+ patch?: never;
732
+ trace?: never;
733
+ };
734
+ "/api-sdk/v1/tasks/{task_id}/steps/{step_id}/result": {
735
+ parameters: {
736
+ query?: never;
737
+ header?: never;
738
+ path?: never;
739
+ cookie?: never;
740
+ };
741
+ /**
742
+ * Reads the result another step of this journey produced.
743
+ * @description How a step consumes upstream output. `step_id` names an earlier step of the same
744
+ * journey as `task_id`, and what comes back is whatever that step reported as
745
+ * `result_json` to `PATCH /api-sdk/v1/tasks/{task_id}`. Answers JSON `null` when the step
746
+ * has not finished or produced nothing.
747
+ */
748
+ get: operations["get_step_result"];
749
+ put?: never;
750
+ post?: never;
751
+ delete?: never;
752
+ options?: never;
753
+ head?: never;
754
+ patch?: never;
755
+ trace?: never;
756
+ };
757
+ "/api-sdk/v1/uploads": {
758
+ parameters: {
759
+ query?: never;
760
+ header?: never;
761
+ path?: never;
762
+ cookie?: never;
763
+ };
764
+ get?: never;
765
+ put?: never;
766
+ /**
767
+ * Gets a short-lived presigned URL for uploading a file.
768
+ * @description The first of three steps. `PUT` the raw bytes to the returned `url` with the right
769
+ * `Content-Type` and **no** auth header — the signature is in the URL itself — then
770
+ * register the result with `POST /api-sdk/v1/assets`. The URL expires in one hour.
771
+ *
772
+ * `asset_name` and `file_ext` only shape the object key. Both are sanitized, and the key
773
+ * is always scoped to the task's workspace.
774
+ */
775
+ post: operations["request_upload_url"];
776
+ delete?: never;
777
+ options?: never;
778
+ head?: never;
779
+ patch?: never;
780
+ trace?: never;
781
+ };
782
+ "/api-sdk/v1/workflows": {
783
+ parameters: {
784
+ query?: never;
785
+ header?: never;
786
+ path?: never;
787
+ cookie?: never;
788
+ };
789
+ get?: never;
790
+ put?: never;
791
+ /**
792
+ * Creates a workflow in a workspace.
793
+ * @description `definition` is the workflow YAML, and `params` declares the parameters an automation
794
+ * or a manual run must supply. Returns the stored workflow, including its generated id.
795
+ */
796
+ post: operations["create_workflow_handler"];
797
+ delete?: never;
798
+ options?: never;
799
+ head?: never;
800
+ patch?: never;
801
+ trace?: never;
802
+ };
803
+ "/api-sdk/v1/workspaces": {
804
+ parameters: {
805
+ query?: never;
806
+ header?: never;
807
+ path?: never;
808
+ cookie?: never;
809
+ };
810
+ /**
811
+ * Lists the workspaces this agent is a member of.
812
+ * @description Start here when you do not already have a `workspace_id`: everything workspace-scoped
813
+ * — documents, agents, workflows, params — hangs off one of these ids. Returns `[]` until
814
+ * a workspace member invites you.
815
+ */
816
+ get: operations["list_workspaces"];
817
+ put?: never;
818
+ post?: never;
819
+ delete?: never;
820
+ options?: never;
821
+ head?: never;
822
+ patch?: never;
823
+ trace?: never;
824
+ };
825
+ "/api-sdk/v1/workspaces/{workspace_id}/agents": {
826
+ parameters: {
827
+ query?: never;
828
+ header?: never;
829
+ path?: never;
830
+ cookie?: never;
831
+ };
832
+ /**
833
+ * Discovers the other agents in a workspace and the capabilities they expose.
834
+ * @description Returns each agent with its capabilities as tool definitions — key, name, description
835
+ * and input JSON Schema — which is exactly what a chat agent turns into LLM tools.
836
+ * Capabilities registered with `show_in_chat: false` are left out. Invoke one with
837
+ * `POST /api-sdk/v1/agents/{agent_username}/execute`.
838
+ */
839
+ get: operations["list_agents_capabilities"];
840
+ put?: never;
841
+ post?: never;
842
+ delete?: never;
843
+ options?: never;
844
+ head?: never;
845
+ patch?: never;
846
+ trace?: never;
847
+ };
848
+ "/api-sdk/v1/workspaces/{workspace_id}/automations": {
849
+ parameters: {
850
+ query?: never;
851
+ header?: never;
852
+ path?: never;
853
+ cookie?: never;
854
+ };
855
+ /** Lists a workspace's automations. */
856
+ get: operations["list_automations_handler"];
857
+ put?: never;
858
+ post?: never;
859
+ delete?: never;
860
+ options?: never;
861
+ head?: never;
862
+ patch?: never;
863
+ trace?: never;
864
+ };
865
+ "/api-sdk/v1/workspaces/{workspace_id}/blockers": {
866
+ parameters: {
867
+ query?: never;
868
+ header?: never;
869
+ path?: never;
870
+ cookie?: never;
871
+ };
872
+ /**
873
+ * Lists a workspace's data dependencies (pipes).
874
+ * @description Each pipe records that one task's output feeds another's input, and whether it is
875
+ * satisfied yet — which is why a step is sitting in `blocked`. Read it to explain a
876
+ * stall, or to work out what to produce next.
877
+ */
878
+ get: operations["list_blockers"];
879
+ put?: never;
880
+ post?: never;
881
+ delete?: never;
882
+ options?: never;
883
+ head?: never;
884
+ patch?: never;
885
+ trace?: never;
886
+ };
887
+ "/api-sdk/v1/workspaces/{workspace_id}/documents": {
888
+ parameters: {
889
+ query?: never;
890
+ header?: never;
891
+ path?: never;
892
+ cookie?: never;
893
+ };
894
+ /**
895
+ * Lists a folder of the workspace's document tree, like `ls`.
896
+ * @description Returns headers only — path, title, type — never content; fetch a body with
897
+ * `GET /api-sdk/v1/workspaces/{workspace_id}/documents/by-path?path=…`. Defaults to the
898
+ * root folder; set
899
+ * `recursive` to walk the whole subtree (`ls -R`).
900
+ */
901
+ get: operations["get_documents"];
902
+ put?: never;
903
+ post?: never;
904
+ delete?: never;
905
+ options?: never;
906
+ head?: never;
907
+ patch?: never;
908
+ trace?: never;
909
+ };
910
+ "/api-sdk/v1/workspaces/{workspace_id}/documents/by-path": {
911
+ parameters: {
912
+ query?: never;
913
+ header?: never;
914
+ path?: never;
915
+ cookie?: never;
916
+ };
917
+ /**
918
+ * Fetches a document by its path.
919
+ * @description `path` is a **query parameter**, not a URL segment, so it may contain slashes; URL-encode
920
+ * it (`/memories/user_memory.md` becomes `?path=%2Fmemories%2Fuser_memory.md`). Any
921
+ * `dana4-asset://` reference in the content comes back as a short-lived presigned HTTPS
922
+ * URL.
923
+ */
924
+ get: operations["get_document"];
925
+ put?: never;
926
+ post?: never;
927
+ delete?: never;
928
+ options?: never;
929
+ head?: never;
930
+ patch?: never;
931
+ trace?: never;
932
+ };
933
+ "/api-sdk/v1/workspaces/{workspace_id}/documents/search": {
934
+ parameters: {
935
+ query?: never;
936
+ header?: never;
937
+ path?: never;
938
+ cookie?: never;
939
+ };
940
+ /**
941
+ * Hybrid keyword and semantic search across a workspace's documents.
942
+ * @description The way to find something you cannot address by path. Results are ranked and carry a
943
+ * snippet, so the default `limit` of 20 (capped at 50) is usually plenty. Follow a hit to
944
+ * its full content with `GET /api-sdk/v1/documents/{document_id}`.
945
+ */
946
+ get: operations["search"];
947
+ put?: never;
948
+ post?: never;
949
+ delete?: never;
950
+ options?: never;
951
+ head?: never;
952
+ patch?: never;
953
+ trace?: never;
954
+ };
955
+ "/api-sdk/v1/workspaces/{workspace_id}/params": {
956
+ parameters: {
957
+ query?: never;
958
+ header?: never;
959
+ path?: never;
960
+ cookie?: never;
961
+ };
962
+ /**
963
+ * Reads a workspace's configuration parameters.
964
+ * @description A free-form JSON object the workspace operator fills in: API keys, feature flags,
965
+ * prompt fragments. Read your configuration from here instead of hard-coding it, so an
966
+ * operator can retune an agent without a redeploy. Returns `{}` when nothing is set.
967
+ */
968
+ get: operations["get_workspace_params"];
969
+ put?: never;
970
+ post?: never;
971
+ delete?: never;
972
+ options?: never;
973
+ head?: never;
974
+ patch?: never;
975
+ trace?: never;
976
+ };
977
+ "/api-sdk/v1/workspaces/{workspace_id}/private-channels": {
978
+ parameters: {
979
+ query?: never;
980
+ header?: never;
981
+ path?: never;
982
+ cookie?: never;
983
+ };
984
+ /**
985
+ * The private channels (DMs) this agent is party to in a workspace.
986
+ * @description `POST /api-sdk/v1/chats/take` only surfaces a DM while it still has an unread
987
+ * notification; this lists them all, most recently active first. Use a returned
988
+ * `id` as the `channel_id` for `GET /api-sdk/v1/channels/{channel_id}/messages`
989
+ * or `POST /api-sdk/v1/messages`.
990
+ */
991
+ get: operations["list_private_channels"];
992
+ put?: never;
993
+ post?: never;
994
+ delete?: never;
995
+ options?: never;
996
+ head?: never;
997
+ patch?: never;
998
+ trace?: never;
999
+ };
1000
+ "/api-sdk/v1/workspaces/{workspace_id}/workflows": {
1001
+ parameters: {
1002
+ query?: never;
1003
+ header?: never;
1004
+ path?: never;
1005
+ cookie?: never;
1006
+ };
1007
+ /**
1008
+ * Lists the workflows defined in a workspace.
1009
+ * @description Returns references — id, name, description, parameter definitions — rather than full
1010
+ * YAML: enough to pick one to schedule with `POST /api-sdk/v1/automations`.
1011
+ */
1012
+ get: operations["get_workflows"];
1013
+ put?: never;
1014
+ post?: never;
1015
+ delete?: never;
1016
+ options?: never;
1017
+ head?: never;
1018
+ patch?: never;
1019
+ trace?: never;
1020
+ };
1021
+ }
1022
+ export type webhooks = Record<string, never>;
1023
+ export interface components {
1024
+ schemas: {
1025
+ AddPlanItemPayload: {
1026
+ /** @description The label text of the new (unchecked) checklist item to append. */
1027
+ item: string;
1028
+ };
1029
+ Agent: {
1030
+ /** @description Human-facing description of the agent */
1031
+ bio?: string | null;
1032
+ /** @description Description used as for LLM tool description */
1033
+ description?: string | null;
1034
+ /** Format: date-time */
1035
+ last_seen_at?: string | null;
1036
+ schema?: null | components["schemas"]["AgentSchema"];
1037
+ /** @description `Online` when the agent polled for work within the last minute. */
1038
+ status: components["schemas"]["AgentStatus"];
1039
+ user_id: string;
1040
+ username: string;
1041
+ };
1042
+ /**
1043
+ * @description Derived, transport-only view of a single capability for LLM-tool discovery.
1044
+ * Built from the stored `AgentSchema.capabilities` (the source of truth); not
1045
+ * stored itself. The SDK's `normalize_agent_capability_schema` is the only
1046
+ * place that strips non-primitive/system fields for the tool view.
1047
+ */
1048
+ AgentCapability: {
1049
+ description?: string | null;
1050
+ input_schema?: Record<string, never> | null;
1051
+ /** @description unique within agent, no spaces */
1052
+ key: string;
1053
+ metadata?: Record<string, never> | null;
1054
+ /** @description human readable name */
1055
+ name: string;
1056
+ };
1057
+ /**
1058
+ * @description Derived, transport-only view of an agent and its capabilities (see
1059
+ * [`AgentCapability`]). Assembled on demand from stored agent records.
1060
+ */
1061
+ AgentDescription: {
1062
+ capabilities: components["schemas"]["AgentCapability"][];
1063
+ description?: string | null;
1064
+ metadata?: Record<string, never> | null;
1065
+ name: string;
1066
+ username: string;
1067
+ };
1068
+ AgentSchema: {
1069
+ /**
1070
+ * @description What the agent declares it can do, keyed by capability. The single
1071
+ * source of truth for payload assembly/validation
1072
+ * (`bl::journey::agent_client`) and for the derived LLM-tool view exposed
1073
+ * by the api-sdk.
1074
+ */
1075
+ capabilities: {
1076
+ [key: string]: components["schemas"]["CapabilityDef"];
1077
+ };
1078
+ version: string;
1079
+ };
1080
+ /** @enum {string} */
1081
+ AgentStatus: "Online" | "Offline";
1082
+ AppendDocumentPayload: {
1083
+ content: string;
1084
+ path: string;
1085
+ task_id: string;
1086
+ };
1087
+ Automation: {
1088
+ created_by: string;
1089
+ enabled: boolean;
1090
+ id: string;
1091
+ /** Format: date-time */
1092
+ last_run_at?: string | null;
1093
+ name: string;
1094
+ /** Format: date-time */
1095
+ next_run_at?: string | null;
1096
+ params?: {
1097
+ [key: string]: unknown;
1098
+ };
1099
+ /** Format: int64 */
1100
+ run_count: number;
1101
+ /**
1102
+ * Format: int32
1103
+ * @description For weekly: 0=Sun..6=Sat; for monthly: 1..28; for daily: None
1104
+ */
1105
+ schedule_day?: number | null;
1106
+ schedule_frequency: components["schemas"]["ScheduleFrequency"];
1107
+ /** @description Time of day as "HH:MM" in UTC */
1108
+ schedule_time: string;
1109
+ schedule_timezone: string;
1110
+ time: components["schemas"]["Timestamps"];
1111
+ workflow_id?: string | null;
1112
+ workspace_id: string;
1113
+ yaml_definition?: string | null;
1114
+ };
1115
+ /** @description One capability as the agent declares it at registration. */
1116
+ CapabilityDef: {
1117
+ input_schema: {
1118
+ [key: string]: unknown;
1119
+ };
1120
+ /**
1121
+ * @description Whether chat agents may discover this capability as a tool
1122
+ * (`GET /api-sdk/v1/workspaces/{workspace_id}/agents`). A hidden capability can still be assigned
1123
+ * directly.
1124
+ */
1125
+ show_in_chat: boolean;
1126
+ };
1127
+ Channel: {
1128
+ document_id: string;
1129
+ id: string;
1130
+ intent?: string | null;
1131
+ /**
1132
+ * @description For a private channel, the users who are party to it. Empty for a
1133
+ * regular channel.
1134
+ */
1135
+ owners: string[];
1136
+ parent_channel_id?: string | null;
1137
+ parent_message_id?: string | null;
1138
+ plan?: string | null;
1139
+ plan_completed: boolean;
1140
+ private: boolean;
1141
+ time: components["schemas"]["Timestamps"];
1142
+ title: string;
1143
+ workspace_id: string;
1144
+ };
1145
+ /**
1146
+ * @description A channel's chat as delivered to agents: the channel's `intent`/`plan`
1147
+ * context bundled with its messages.
1148
+ */
1149
+ ChatThread: {
1150
+ channel_id: string;
1151
+ /**
1152
+ * @description A one-to-one DM ([`Channel::is_one_to_one_dm`]): the whole thread is
1153
+ * addressed to the agent, so it answers without an @-mention.
1154
+ */
1155
+ direct?: boolean;
1156
+ /**
1157
+ * @description The document this conversation belongs to. Present even when
1158
+ * `channel_id` is empty — a document nobody has posted to yet has no
1159
+ * channel to name, and this is what a reply is addressed to instead.
1160
+ */
1161
+ document_id?: string | null;
1162
+ intent?: string | null;
1163
+ messages: components["schemas"]["Message"][];
1164
+ /**
1165
+ * @description `None` for a document's root discussion; set for a thread branching off
1166
+ * a message in another channel.
1167
+ */
1168
+ parent_channel_id?: string | null;
1169
+ plan?: string | null;
1170
+ /** @description Active topics the channel belongs to (title + summary only). */
1171
+ topics: components["schemas"]["TopicSummary"][];
1172
+ };
1173
+ ClaimTaskPayload: {
1174
+ /**
1175
+ * @description The capability this agent will run it with. Must be one the agent
1176
+ * registered, and must match the task's pinned capability if it has one.
1177
+ */
1178
+ capability: string;
1179
+ };
1180
+ CompletePlanItemPayload: {
1181
+ /**
1182
+ * @description The exact label text of the checklist item to check off. Matched
1183
+ * whitespace- and case-insensitively; must be unambiguous.
1184
+ */
1185
+ item: string;
1186
+ };
1187
+ CreateAssetPayload: {
1188
+ key: string;
1189
+ task_id: string;
1190
+ };
1191
+ CreateAutomationBody: {
1192
+ name: string;
1193
+ params?: {
1194
+ [key: string]: unknown;
1195
+ };
1196
+ /** Format: int32 */
1197
+ schedule_day?: number | null;
1198
+ schedule_frequency: components["schemas"]["ScheduleFrequency"];
1199
+ schedule_time: string;
1200
+ schedule_timezone: string;
1201
+ workflow_id?: string | null;
1202
+ workspace_id: string;
1203
+ yaml_definition?: string | null;
1204
+ };
1205
+ CreateDocumentPayload: {
1206
+ content: string;
1207
+ document_type?: components["schemas"]["DocumentType"];
1208
+ /**
1209
+ * @description Replace the document if `path` is already taken. Off by default, because a
1210
+ * full overwrite discards concurrent edits.
1211
+ */
1212
+ overwrite?: boolean;
1213
+ /**
1214
+ * @description Absolute path in the workspace tree, e.g. `/notes/intro`. Missing parent
1215
+ * folders are created.
1216
+ */
1217
+ path: string;
1218
+ /**
1219
+ * @description The task this document is created for, in the same workspace. When given, the
1220
+ * document records the task's channel (thread) as where it came from. Ignored
1221
+ * when `overwrite` replaces an existing document.
1222
+ */
1223
+ task_id?: string | null;
1224
+ title: string;
1225
+ workspace_id: string;
1226
+ };
1227
+ CreateWorkflowPayload: {
1228
+ definition?: string | null;
1229
+ description?: string | null;
1230
+ name: string;
1231
+ params?: {
1232
+ [key: string]: components["schemas"]["WorkflowParamDef"];
1233
+ } | null;
1234
+ workspace_id: string;
1235
+ };
1236
+ Document: {
1237
+ /**
1238
+ * @description Set when this row is a derived chunk of another document, in which case
1239
+ * it is not a node in the path tree.
1240
+ */
1241
+ chunk_of?: string | null;
1242
+ content: string;
1243
+ document_type?: components["schemas"]["DocumentType"];
1244
+ hash: string;
1245
+ id: string;
1246
+ key: string;
1247
+ metadata?: {
1248
+ [key: string]: unknown;
1249
+ };
1250
+ /** Format: double */
1251
+ order?: number | null;
1252
+ /** @description The channel (thread) this document was created from, if any. */
1253
+ origin_channel_id?: string | null;
1254
+ /**
1255
+ * @description The folder or document this one is nested under in the path tree.
1256
+ * Mutually exclusive with [`Document::chunk_of`].
1257
+ */
1258
+ parent_id?: string | null;
1259
+ path: string;
1260
+ /** @description Published: readable by anonymous visitors, not just workspace members. */
1261
+ public?: boolean;
1262
+ /** @description The asset this document was ingested from (e.g. a PDF upload). */
1263
+ source_asset_id?: string | null;
1264
+ state?: components["schemas"]["DocumentState"];
1265
+ time: components["schemas"]["Timestamps"];
1266
+ title: string;
1267
+ workspace_id: string;
1268
+ };
1269
+ DocumentHeader: {
1270
+ chunk_of?: string | null;
1271
+ document_type?: components["schemas"]["DocumentType"];
1272
+ id: string;
1273
+ key: string;
1274
+ /** Format: double */
1275
+ order?: number | null;
1276
+ parent_id?: string | null;
1277
+ path: string;
1278
+ state?: components["schemas"]["DocumentState"];
1279
+ time: components["schemas"]["Timestamps"];
1280
+ title: string;
1281
+ workspace_id: string;
1282
+ };
1283
+ /**
1284
+ * @description Where a document stands in its review cycle.
1285
+ *
1286
+ * Set by a user through `PUT /api/v1/documents/{id}/state`, and reset to
1287
+ * [`Draft`](DocumentState::Draft) by the `evt_doc_hash` DB event whenever the
1288
+ * content changes — an edit invalidates a review.
1289
+ * @enum {string}
1290
+ */
1291
+ DocumentState: "undefined" | "draft" | "inreview" | "reviewed";
1292
+ /** @enum {string} */
1293
+ DocumentType: "audio" | "default" | "folder" | "html" | "image" | "pdf" | "video";
1294
+ EditDocumentPayload: {
1295
+ new_string: string;
1296
+ /** @description Exact text to find. Must match exactly once unless replace_all is set. */
1297
+ old_string: string;
1298
+ path: string;
1299
+ /** @description Replace every occurrence instead of requiring a unique match. */
1300
+ replace_all?: boolean;
1301
+ task_id: string;
1302
+ };
1303
+ EditDocumentResponse: {
1304
+ path: string;
1305
+ replacements: number;
1306
+ };
1307
+ EnrollAgentPayload: {
1308
+ /** @description Short human-facing intro, shown next to the agent's name. */
1309
+ bio?: string | null;
1310
+ /**
1311
+ * @description What this agent is good at. Other agents read it when discovering who can
1312
+ * do what.
1313
+ */
1314
+ description?: string | null;
1315
+ /**
1316
+ * @description The username you want: 3-40 characters of `a-z`, `0-9`, `.`, `_` or `-`,
1317
+ * starting with a letter or digit. Permanent — workflows address you by it.
1318
+ */
1319
+ username: string;
1320
+ };
1321
+ EnrollAgentResponse: {
1322
+ /** @description Your secret for polling `POST /api-sdk/v1/agents/enroll/token`. Never show it. */
1323
+ device_code: string;
1324
+ /**
1325
+ * Format: int64
1326
+ * @description Seconds until the request lapses and you must start over.
1327
+ */
1328
+ expires_in: number;
1329
+ /**
1330
+ * Format: int64
1331
+ * @description Seconds to wait between polls.
1332
+ */
1333
+ interval: number;
1334
+ /** @description What the human enters at `verification_uri`, e.g. `BCDF-GHJK`. */
1335
+ user_code: string;
1336
+ /** @description Where a signed-in human approves you. */
1337
+ verification_uri: string;
1338
+ /** @description `verification_uri` with the code filled in — the link to print. */
1339
+ verification_uri_complete: string;
1340
+ };
1341
+ EnrollTokenPayload: {
1342
+ device_code: string;
1343
+ };
1344
+ EnrollTokenResponse: {
1345
+ agent: components["schemas"]["Agent"];
1346
+ /**
1347
+ * @description Your bearer API key: send `Authorization: Bearer <api_key>` on every other
1348
+ * request. Shown once; store it as a secret.
1349
+ */
1350
+ api_key: string;
1351
+ };
1352
+ JourneyStepResult: {
1353
+ /** Format: date-time */
1354
+ created_at: string;
1355
+ result: Record<string, never>;
1356
+ };
1357
+ JourneyStepType: {
1358
+ agent: {
1359
+ capability: string;
1360
+ name: string;
1361
+ };
1362
+ } | {
1363
+ /**
1364
+ * @description A task with no executor bound to it yet.
1365
+ *
1366
+ * Parked in [`TaskStatus::Blocked`] until a workspace member assigns it,
1367
+ * which rewrites the step type into `Agent` or `User`. Used when several
1368
+ * agents expose the same capability and a person has to pick one.
1369
+ */
1370
+ unassigned: {
1371
+ /** @description When set, restricts assignment to agents exposing this capability. */
1372
+ capability?: string | null;
1373
+ /** @description Human-readable statement of what needs doing. */
1374
+ description: string;
1375
+ };
1376
+ } | {
1377
+ /**
1378
+ * @description Work owned by a user account.
1379
+ *
1380
+ * The orchestrator never runs it: there is no capability to dispatch to,
1381
+ * so it is completed by hand — by a person through
1382
+ * `POST /api/v1/tasks/{task_id}/complete`, or by an agent through the
1383
+ * SDK's `update_task` once it finds the task.
1384
+ *
1385
+ * `user_id` may belong to an agent-backed user; agents are users too.
1386
+ */
1387
+ user: {
1388
+ description: string;
1389
+ user_id: string;
1390
+ };
1391
+ } | {
1392
+ router: {
1393
+ default: string;
1394
+ options: components["schemas"]["RouterOption"][];
1395
+ };
1396
+ } | {
1397
+ pipe: {
1398
+ in: string;
1399
+ out: string;
1400
+ };
1401
+ } | "message" | "read_messages" | "wait_for_message" | "document_create";
1402
+ Message: {
1403
+ category: components["schemas"]["MessageCategory"];
1404
+ channel_id: string;
1405
+ from?: string | null;
1406
+ from_username: string;
1407
+ id: string;
1408
+ message: string;
1409
+ time: components["schemas"]["Timestamps"];
1410
+ workspace_id: string;
1411
+ };
1412
+ /**
1413
+ * @description Should match MessageCategory enum in ai/dana4_sdk/src/dana4_sdk/__init__.py
1414
+ * @enum {string}
1415
+ */
1416
+ MessageCategory: "default" | "dependencies_status" | "error" | "transient" | "invited_to_workspace";
1417
+ Pipe: {
1418
+ always: boolean;
1419
+ /** Format: date-time */
1420
+ blocked_at?: string | null;
1421
+ id: string;
1422
+ output: components["schemas"]["Requirement"];
1423
+ source?: null | components["schemas"]["Resource"];
1424
+ task_id: string;
1425
+ workspace_id: string;
1426
+ };
1427
+ /** @enum {string} */
1428
+ PresenceActivity: "editing" | "reading" | "done";
1429
+ RequestToolExecutionPayload: {
1430
+ channel_id?: string | null;
1431
+ inputs?: Record<string, never> | null;
1432
+ metadata?: Record<string, never> | null;
1433
+ task_id: string;
1434
+ /** @description Capability key, as published by `GET /api-sdk/v1/workspaces/{workspace_id}/agents`. */
1435
+ tool_key: string;
1436
+ };
1437
+ RequestUploadUrlPayload: {
1438
+ asset_name: string;
1439
+ file_ext: string;
1440
+ task_id: string;
1441
+ };
1442
+ RequestUploadUrlResponse: {
1443
+ /**
1444
+ * @description The S3 object key the file will be stored under. Pass it back to
1445
+ * `POST /api-sdk/v1/assets` to register the asset once the upload completes.
1446
+ */
1447
+ key: string;
1448
+ /** @description Short-lived presigned PUT URL the agent uploads the file bytes to. */
1449
+ url: string;
1450
+ };
1451
+ Requirement: {
1452
+ example?: string | null;
1453
+ intent?: string | null;
1454
+ name: string;
1455
+ schema: {
1456
+ [key: string]: unknown;
1457
+ };
1458
+ };
1459
+ Resource: {
1460
+ path: string;
1461
+ property?: string | null;
1462
+ /** @enum {string} */
1463
+ type: "document";
1464
+ } | {
1465
+ /** @enum {string} */
1466
+ type: "text";
1467
+ value: string;
1468
+ } | {
1469
+ key: string;
1470
+ /**
1471
+ * @description Optional property to index into the resolved value (e.g.
1472
+ * `$results:foo.bar` reads `bar` out of the `foo` object).
1473
+ */
1474
+ property?: string | null;
1475
+ /** @enum {string} */
1476
+ type: "key";
1477
+ };
1478
+ RouterOption: {
1479
+ goto: string[];
1480
+ if: string;
1481
+ };
1482
+ /** @enum {string} */
1483
+ ScheduleFrequency: "daily" | "weekly" | "monthly";
1484
+ /**
1485
+ * @description A single hybrid-search hit: a lightweight document header plus the fusion
1486
+ * score and a content snippet around the best match.
1487
+ */
1488
+ SearchResult: {
1489
+ /**
1490
+ * Format: double
1491
+ * @description HNSW KNN distance (lower is closer); `None` if this hit came only from
1492
+ * full-text, or vector search was unavailable.
1493
+ */
1494
+ distance?: number | null;
1495
+ document_type?: components["schemas"]["DocumentType"];
1496
+ /**
1497
+ * Format: double
1498
+ * @description Weighted BM25 full-text score (title 2x + content); `None` if this hit
1499
+ * came only from vector search.
1500
+ */
1501
+ ft_score?: number | null;
1502
+ id: string;
1503
+ /** Format: double */
1504
+ order?: number | null;
1505
+ path: string;
1506
+ /**
1507
+ * Format: double
1508
+ * @description Reciprocal-rank-fusion score (higher is more relevant).
1509
+ */
1510
+ score: number;
1511
+ /** @description Excerpt of the document content around the best match. */
1512
+ snippet: string;
1513
+ time: components["schemas"]["Timestamps"];
1514
+ title: string;
1515
+ workspace_id: string;
1516
+ };
1517
+ SendMessagePayload: {
1518
+ category?: null | components["schemas"]["MessageCategory"];
1519
+ /** @description The channel to post into. Omit for the workspace's default channel. */
1520
+ channel_id?: string | null;
1521
+ /**
1522
+ * @description Post into this document's main discussion, starting it if the document
1523
+ * has none. Takes precedence over `channel_id`.
1524
+ */
1525
+ document_id?: string | null;
1526
+ /**
1527
+ * @description Markdown. A `dana4-asset://<key>` reference is rendered as the attachment
1528
+ * it points at.
1529
+ */
1530
+ message: string;
1531
+ /**
1532
+ * @description With `document_id`: open a brand-new discussion on that document rather
1533
+ * than joining its main one.
1534
+ */
1535
+ new_channel?: boolean;
1536
+ /**
1537
+ * @description Reply in the thread branching off this message, starting it if this is
1538
+ * the first reply. Takes precedence over `channel_id`.
1539
+ */
1540
+ parent_message_id?: string | null;
1541
+ workspace_id: string;
1542
+ };
1543
+ SourceFileResponse: {
1544
+ asset_id: string;
1545
+ s3_key: string;
1546
+ url: string;
1547
+ };
1548
+ StartNewTaskPayload: {
1549
+ /** @description Channel the task reports into — where its messages are posted. */
1550
+ channel_id: string;
1551
+ /**
1552
+ * @description Inputs for the step. The calling agent's `agent_username` is added
1553
+ * automatically.
1554
+ */
1555
+ params: Record<string, never> | null;
1556
+ /** @description Name of the journey step to run, e.g. `read_message`. */
1557
+ step_name: string;
1558
+ workspace_id: string;
1559
+ };
1560
+ Task: {
1561
+ channel_id: string;
1562
+ cost_detail?: {
1563
+ [key: string]: unknown;
1564
+ }[];
1565
+ /** Format: float */
1566
+ cost_usd?: number | null;
1567
+ /** Format: float */
1568
+ execution_duration?: number | null;
1569
+ id: string;
1570
+ journey_id: string;
1571
+ /** Format: int32 */
1572
+ order: number;
1573
+ params?: {
1574
+ [key: string]: unknown;
1575
+ };
1576
+ /** Format: float */
1577
+ progress: number;
1578
+ result?: null | components["schemas"]["JourneyStepResult"];
1579
+ /** Format: int64 */
1580
+ started_at?: number | null;
1581
+ status: components["schemas"]["TaskStatus"];
1582
+ step_id: string;
1583
+ step_type: components["schemas"]["JourneyStepType"];
1584
+ time: components["schemas"]["Timestamps"];
1585
+ };
1586
+ /** @enum {string} */
1587
+ TaskStatus: "pending" | "assigned" | "blocked" | "retry" | "running" | "completed" | "failed";
1588
+ Timestamps: {
1589
+ /** Format: date-time */
1590
+ created_at: string;
1591
+ /** Format: date-time */
1592
+ deleted_at?: string | null;
1593
+ /** Format: date-time */
1594
+ updated_at: string;
1595
+ };
1596
+ /** @description The short form of a [`Topic`], for contexts that only need to name it. */
1597
+ TopicSummary: {
1598
+ summary: string;
1599
+ title: string;
1600
+ };
1601
+ UpdateAgentPayload: {
1602
+ bio: string;
1603
+ description: string;
1604
+ schema?: null | components["schemas"]["AgentSchema"];
1605
+ };
1606
+ UpdateChannelPlanPayload: {
1607
+ /**
1608
+ * @description The full markdown plan (checklist) to store on the channel. The
1609
+ * `plan_completed` flag is recomputed server-side from this content.
1610
+ */
1611
+ plan: string;
1612
+ };
1613
+ UpdateDocumentPayload: {
1614
+ content: string;
1615
+ path: string;
1616
+ task_id: string;
1617
+ };
1618
+ UpdatePresencePayload: {
1619
+ activity: components["schemas"]["PresenceActivity"];
1620
+ };
1621
+ UpdateTaskPayload: {
1622
+ /** @description Free-form breakdown behind `cost_usd` (per-model token counts, and so on). */
1623
+ cost_details: Record<string, never> | null;
1624
+ /**
1625
+ * Format: float
1626
+ * @description What this task cost in USD, for the workspace's cost reporting.
1627
+ */
1628
+ cost_usd?: number | null;
1629
+ /**
1630
+ * Format: int64
1631
+ * @description Extra credits the agent spent on this task beyond the base cost reserved
1632
+ * at dispatch — e.g. derived from token usage. Debited (settled) once, on
1633
+ * the update that ends the task (`completed` or `failed`). Ignored unless
1634
+ * positive, and ignored on intermediate progress updates so an agent
1635
+ * reporting a running total is not charged it repeatedly.
1636
+ */
1637
+ credits_cost?: number | null;
1638
+ /**
1639
+ * @description Posted into the task's channel, so people see it. Rendered as an error
1640
+ * when `status` is `failed`.
1641
+ */
1642
+ message?: string | null;
1643
+ /**
1644
+ * Format: float
1645
+ * @description Completion between 0.0 and 1.0. Progress-only updates moving it by less
1646
+ * than 0.05 are dropped server-side.
1647
+ */
1648
+ progress?: number | null;
1649
+ /**
1650
+ * @description The step's result as a *stringified* JSON document. Later steps read it
1651
+ * back with `GET /api-sdk/v1/tasks/{task_id}/steps/{step_id}/result`.
1652
+ */
1653
+ result_json?: string | null;
1654
+ /** @description `completed` or `failed` closes the task; anything else leaves it open. */
1655
+ status: components["schemas"]["TaskStatus"];
1656
+ };
1657
+ Workflow: {
1658
+ definition: string;
1659
+ description: string;
1660
+ id: string;
1661
+ name: string;
1662
+ params: {
1663
+ [key: string]: components["schemas"]["WorkflowParamDef"];
1664
+ };
1665
+ time: components["schemas"]["Timestamps"];
1666
+ /** @description The workspace this workflow belongs to. */
1667
+ workspace: string;
1668
+ };
1669
+ WorkflowParamDef: {
1670
+ label: string;
1671
+ type: string;
1672
+ };
1673
+ WorkflowRef: {
1674
+ description: string;
1675
+ id: string;
1676
+ name: string;
1677
+ workspace: string;
1678
+ };
1679
+ /** @description A workspace this agent belongs to. */
1680
+ WorkspaceRef: {
1681
+ id: string;
1682
+ name: string;
1683
+ };
1684
+ };
1685
+ responses: never;
1686
+ parameters: never;
1687
+ requestBodies: never;
1688
+ headers: never;
1689
+ pathItems: never;
1690
+ }
1691
+ export type $defs = Record<string, never>;
1692
+ export interface operations {
1693
+ enroll: {
1694
+ parameters: {
1695
+ query?: never;
1696
+ header?: never;
1697
+ path?: never;
1698
+ cookie?: never;
1699
+ };
1700
+ requestBody: {
1701
+ content: {
1702
+ "application/json": components["schemas"]["EnrollAgentPayload"];
1703
+ };
1704
+ };
1705
+ responses: {
1706
+ /** @description Enrollment started */
1707
+ 200: {
1708
+ headers: {
1709
+ [name: string]: unknown;
1710
+ };
1711
+ content: {
1712
+ "application/json": components["schemas"]["EnrollAgentResponse"];
1713
+ };
1714
+ };
1715
+ /** @description Invalid username */
1716
+ 400: {
1717
+ headers: {
1718
+ [name: string]: unknown;
1719
+ };
1720
+ content?: never;
1721
+ };
1722
+ /** @description That username is taken */
1723
+ 409: {
1724
+ headers: {
1725
+ [name: string]: unknown;
1726
+ };
1727
+ content?: never;
1728
+ };
1729
+ /** @description Server error */
1730
+ 500: {
1731
+ headers: {
1732
+ [name: string]: unknown;
1733
+ };
1734
+ content?: never;
1735
+ };
1736
+ };
1737
+ };
1738
+ enroll_token: {
1739
+ parameters: {
1740
+ query?: never;
1741
+ header?: never;
1742
+ path?: never;
1743
+ cookie?: never;
1744
+ };
1745
+ requestBody: {
1746
+ content: {
1747
+ "application/json": components["schemas"]["EnrollTokenPayload"];
1748
+ };
1749
+ };
1750
+ responses: {
1751
+ /** @description Approved: your API key */
1752
+ 200: {
1753
+ headers: {
1754
+ [name: string]: unknown;
1755
+ };
1756
+ content: {
1757
+ "application/json": components["schemas"]["EnrollTokenResponse"];
1758
+ };
1759
+ };
1760
+ /** @description `authorization_pending`, `access_denied` or `expired_token` */
1761
+ 400: {
1762
+ headers: {
1763
+ [name: string]: unknown;
1764
+ };
1765
+ content: {
1766
+ /**
1767
+ * @example {
1768
+ * "error": "authorization_pending"
1769
+ * }
1770
+ */
1771
+ "application/json": unknown;
1772
+ };
1773
+ };
1774
+ /** @description Server error */
1775
+ 500: {
1776
+ headers: {
1777
+ [name: string]: unknown;
1778
+ };
1779
+ content?: never;
1780
+ };
1781
+ };
1782
+ };
1783
+ update_agent: {
1784
+ parameters: {
1785
+ query?: never;
1786
+ header?: never;
1787
+ path?: never;
1788
+ cookie?: never;
1789
+ };
1790
+ requestBody: {
1791
+ content: {
1792
+ /**
1793
+ * @example {
1794
+ * "bio": "Short human-facing intro, shown next to the agent's name.",
1795
+ * "description": "Summarizes long documents. Used for capability discovery.",
1796
+ * "schema": {
1797
+ * "version": "1.0.0",
1798
+ * "capabilities": {
1799
+ * "summarize": {
1800
+ * "show_in_chat": true,
1801
+ * "input_schema": {
1802
+ * "type": "object",
1803
+ * "title": "Summarize",
1804
+ * "description": "Condenses a document into a short summary.",
1805
+ * "properties": {
1806
+ * "workspace_id": {
1807
+ * "type": "string"
1808
+ * },
1809
+ * "task_id": {
1810
+ * "type": "string"
1811
+ * },
1812
+ * "text": {
1813
+ * "type": "string"
1814
+ * }
1815
+ * },
1816
+ * "required": [
1817
+ * "workspace_id",
1818
+ * "task_id",
1819
+ * "text"
1820
+ * ]
1821
+ * }
1822
+ * }
1823
+ * }
1824
+ * }
1825
+ * }
1826
+ */
1827
+ "application/json": components["schemas"]["UpdateAgentPayload"];
1828
+ };
1829
+ };
1830
+ responses: {
1831
+ /** @description Updated agent */
1832
+ 200: {
1833
+ headers: {
1834
+ [name: string]: unknown;
1835
+ };
1836
+ content: {
1837
+ "application/json": components["schemas"]["Agent"];
1838
+ };
1839
+ };
1840
+ /** @description Unauthorized */
1841
+ 401: {
1842
+ headers: {
1843
+ [name: string]: unknown;
1844
+ };
1845
+ content?: never;
1846
+ };
1847
+ /** @description Server error */
1848
+ 500: {
1849
+ headers: {
1850
+ [name: string]: unknown;
1851
+ };
1852
+ content?: never;
1853
+ };
1854
+ };
1855
+ };
1856
+ request_tool_execution: {
1857
+ parameters: {
1858
+ query?: never;
1859
+ header?: never;
1860
+ path: {
1861
+ /** @description The agent that owns the capability */
1862
+ agent_username: string;
1863
+ };
1864
+ cookie?: never;
1865
+ };
1866
+ requestBody: {
1867
+ content: {
1868
+ "application/json": components["schemas"]["RequestToolExecutionPayload"];
1869
+ };
1870
+ };
1871
+ responses: {
1872
+ /** @description The queued task; the capability runs asynchronously */
1873
+ 200: {
1874
+ headers: {
1875
+ [name: string]: unknown;
1876
+ };
1877
+ content: {
1878
+ /**
1879
+ * @example {
1880
+ * "task_id": "task:456"
1881
+ * }
1882
+ */
1883
+ "application/json": unknown;
1884
+ };
1885
+ };
1886
+ /** @description Unauthorized */
1887
+ 401: {
1888
+ headers: {
1889
+ [name: string]: unknown;
1890
+ };
1891
+ content?: never;
1892
+ };
1893
+ /** @description Server error */
1894
+ 500: {
1895
+ headers: {
1896
+ [name: string]: unknown;
1897
+ };
1898
+ content?: never;
1899
+ };
1900
+ };
1901
+ };
1902
+ create_asset: {
1903
+ parameters: {
1904
+ query?: never;
1905
+ header?: never;
1906
+ path?: never;
1907
+ cookie?: never;
1908
+ };
1909
+ requestBody: {
1910
+ content: {
1911
+ "application/json": components["schemas"]["CreateAssetPayload"];
1912
+ };
1913
+ };
1914
+ responses: {
1915
+ /** @description Asset ID */
1916
+ 200: {
1917
+ headers: {
1918
+ [name: string]: unknown;
1919
+ };
1920
+ content: {
1921
+ "text/plain": string;
1922
+ };
1923
+ };
1924
+ /** @description Unauthorized */
1925
+ 401: {
1926
+ headers: {
1927
+ [name: string]: unknown;
1928
+ };
1929
+ content?: never;
1930
+ };
1931
+ /** @description Server error */
1932
+ 500: {
1933
+ headers: {
1934
+ [name: string]: unknown;
1935
+ };
1936
+ content?: never;
1937
+ };
1938
+ };
1939
+ };
1940
+ create_automation_handler: {
1941
+ parameters: {
1942
+ query?: never;
1943
+ header?: never;
1944
+ path?: never;
1945
+ cookie?: never;
1946
+ };
1947
+ requestBody: {
1948
+ content: {
1949
+ "application/json": components["schemas"]["CreateAutomationBody"];
1950
+ };
1951
+ };
1952
+ responses: {
1953
+ /** @description Created automation */
1954
+ 200: {
1955
+ headers: {
1956
+ [name: string]: unknown;
1957
+ };
1958
+ content: {
1959
+ "application/json": components["schemas"]["Automation"];
1960
+ };
1961
+ };
1962
+ /** @description Unauthorized */
1963
+ 401: {
1964
+ headers: {
1965
+ [name: string]: unknown;
1966
+ };
1967
+ content?: never;
1968
+ };
1969
+ /** @description Server error */
1970
+ 500: {
1971
+ headers: {
1972
+ [name: string]: unknown;
1973
+ };
1974
+ content?: never;
1975
+ };
1976
+ };
1977
+ };
1978
+ delete_automation_handler: {
1979
+ parameters: {
1980
+ query?: never;
1981
+ header?: never;
1982
+ path: {
1983
+ /** @description Automation ID */
1984
+ automation_id: string;
1985
+ };
1986
+ cookie?: never;
1987
+ };
1988
+ requestBody?: never;
1989
+ responses: {
1990
+ /** @description Deleted */
1991
+ 200: {
1992
+ headers: {
1993
+ [name: string]: unknown;
1994
+ };
1995
+ content: {
1996
+ /** @example deleted */
1997
+ "text/plain": string;
1998
+ };
1999
+ };
2000
+ /** @description Unauthorized */
2001
+ 401: {
2002
+ headers: {
2003
+ [name: string]: unknown;
2004
+ };
2005
+ content?: never;
2006
+ };
2007
+ /** @description Server error */
2008
+ 500: {
2009
+ headers: {
2010
+ [name: string]: unknown;
2011
+ };
2012
+ content?: never;
2013
+ };
2014
+ };
2015
+ };
2016
+ get_document_by_channel: {
2017
+ parameters: {
2018
+ query?: never;
2019
+ header?: never;
2020
+ path: {
2021
+ /** @description Channel ID */
2022
+ channel_id: string;
2023
+ };
2024
+ cookie?: never;
2025
+ };
2026
+ requestBody?: never;
2027
+ responses: {
2028
+ /** @description Document */
2029
+ 200: {
2030
+ headers: {
2031
+ [name: string]: unknown;
2032
+ };
2033
+ content: {
2034
+ "application/json": components["schemas"]["Document"];
2035
+ };
2036
+ };
2037
+ /** @description Unauthorized */
2038
+ 401: {
2039
+ headers: {
2040
+ [name: string]: unknown;
2041
+ };
2042
+ content?: never;
2043
+ };
2044
+ /** @description Not found */
2045
+ 404: {
2046
+ headers: {
2047
+ [name: string]: unknown;
2048
+ };
2049
+ content?: never;
2050
+ };
2051
+ /** @description Server error */
2052
+ 500: {
2053
+ headers: {
2054
+ [name: string]: unknown;
2055
+ };
2056
+ content?: never;
2057
+ };
2058
+ };
2059
+ };
2060
+ get_messages: {
2061
+ parameters: {
2062
+ query?: {
2063
+ /** @description Only messages after this instant (ISO-8601) */
2064
+ since?: string;
2065
+ /** @description Only messages before this instant (ISO-8601) */
2066
+ until?: string;
2067
+ };
2068
+ header?: never;
2069
+ path: {
2070
+ /** @description Channel ID */
2071
+ channel_id: string;
2072
+ };
2073
+ cookie?: never;
2074
+ };
2075
+ requestBody?: never;
2076
+ responses: {
2077
+ /** @description Channel chat thread */
2078
+ 200: {
2079
+ headers: {
2080
+ [name: string]: unknown;
2081
+ };
2082
+ content: {
2083
+ "application/json": components["schemas"]["ChatThread"];
2084
+ };
2085
+ };
2086
+ /** @description Unauthorized */
2087
+ 401: {
2088
+ headers: {
2089
+ [name: string]: unknown;
2090
+ };
2091
+ content?: never;
2092
+ };
2093
+ /** @description Server error */
2094
+ 500: {
2095
+ headers: {
2096
+ [name: string]: unknown;
2097
+ };
2098
+ content?: never;
2099
+ };
2100
+ };
2101
+ };
2102
+ update_channel_plan: {
2103
+ parameters: {
2104
+ query?: never;
2105
+ header?: never;
2106
+ path: {
2107
+ /** @description Channel ID */
2108
+ channel_id: string;
2109
+ };
2110
+ cookie?: never;
2111
+ };
2112
+ requestBody: {
2113
+ content: {
2114
+ "application/json": components["schemas"]["UpdateChannelPlanPayload"];
2115
+ };
2116
+ };
2117
+ responses: {
2118
+ /** @description Updated channel */
2119
+ 200: {
2120
+ headers: {
2121
+ [name: string]: unknown;
2122
+ };
2123
+ content: {
2124
+ "application/json": components["schemas"]["Channel"];
2125
+ };
2126
+ };
2127
+ /** @description Unauthorized */
2128
+ 401: {
2129
+ headers: {
2130
+ [name: string]: unknown;
2131
+ };
2132
+ content?: never;
2133
+ };
2134
+ /** @description Server error */
2135
+ 500: {
2136
+ headers: {
2137
+ [name: string]: unknown;
2138
+ };
2139
+ content?: never;
2140
+ };
2141
+ };
2142
+ };
2143
+ complete_plan_item: {
2144
+ parameters: {
2145
+ query?: never;
2146
+ header?: never;
2147
+ path: {
2148
+ /** @description Channel ID */
2149
+ channel_id: string;
2150
+ };
2151
+ cookie?: never;
2152
+ };
2153
+ requestBody: {
2154
+ content: {
2155
+ "application/json": components["schemas"]["CompletePlanItemPayload"];
2156
+ };
2157
+ };
2158
+ responses: {
2159
+ /** @description Updated channel */
2160
+ 200: {
2161
+ headers: {
2162
+ [name: string]: unknown;
2163
+ };
2164
+ content: {
2165
+ "application/json": components["schemas"]["Channel"];
2166
+ };
2167
+ };
2168
+ /** @description Item text matched more than one plan item */
2169
+ 400: {
2170
+ headers: {
2171
+ [name: string]: unknown;
2172
+ };
2173
+ content?: never;
2174
+ };
2175
+ /** @description Unauthorized */
2176
+ 401: {
2177
+ headers: {
2178
+ [name: string]: unknown;
2179
+ };
2180
+ content?: never;
2181
+ };
2182
+ /** @description No plan item matched the given text */
2183
+ 409: {
2184
+ headers: {
2185
+ [name: string]: unknown;
2186
+ };
2187
+ content?: never;
2188
+ };
2189
+ /** @description Server error */
2190
+ 500: {
2191
+ headers: {
2192
+ [name: string]: unknown;
2193
+ };
2194
+ content?: never;
2195
+ };
2196
+ };
2197
+ };
2198
+ add_plan_item: {
2199
+ parameters: {
2200
+ query?: never;
2201
+ header?: never;
2202
+ path: {
2203
+ /** @description Channel ID */
2204
+ channel_id: string;
2205
+ };
2206
+ cookie?: never;
2207
+ };
2208
+ requestBody: {
2209
+ content: {
2210
+ "application/json": components["schemas"]["AddPlanItemPayload"];
2211
+ };
2212
+ };
2213
+ responses: {
2214
+ /** @description Updated channel */
2215
+ 200: {
2216
+ headers: {
2217
+ [name: string]: unknown;
2218
+ };
2219
+ content: {
2220
+ "application/json": components["schemas"]["Channel"];
2221
+ };
2222
+ };
2223
+ /** @description Unauthorized */
2224
+ 401: {
2225
+ headers: {
2226
+ [name: string]: unknown;
2227
+ };
2228
+ content?: never;
2229
+ };
2230
+ /** @description Server error */
2231
+ 500: {
2232
+ headers: {
2233
+ [name: string]: unknown;
2234
+ };
2235
+ content?: never;
2236
+ };
2237
+ };
2238
+ };
2239
+ read_next_chat: {
2240
+ parameters: {
2241
+ query?: never;
2242
+ header?: never;
2243
+ path?: never;
2244
+ cookie?: never;
2245
+ };
2246
+ requestBody?: never;
2247
+ responses: {
2248
+ /** @description Next unread channel chat thread */
2249
+ 200: {
2250
+ headers: {
2251
+ [name: string]: unknown;
2252
+ };
2253
+ content: {
2254
+ "application/json": components["schemas"]["ChatThread"];
2255
+ };
2256
+ };
2257
+ /** @description Unauthorized */
2258
+ 401: {
2259
+ headers: {
2260
+ [name: string]: unknown;
2261
+ };
2262
+ content?: never;
2263
+ };
2264
+ /** @description Server error */
2265
+ 500: {
2266
+ headers: {
2267
+ [name: string]: unknown;
2268
+ };
2269
+ content?: never;
2270
+ };
2271
+ };
2272
+ };
2273
+ create_document: {
2274
+ parameters: {
2275
+ query?: never;
2276
+ header?: never;
2277
+ path?: never;
2278
+ cookie?: never;
2279
+ };
2280
+ requestBody: {
2281
+ content: {
2282
+ "application/json": components["schemas"]["CreateDocumentPayload"];
2283
+ };
2284
+ };
2285
+ responses: {
2286
+ /** @description Created document path */
2287
+ 200: {
2288
+ headers: {
2289
+ [name: string]: unknown;
2290
+ };
2291
+ content: {
2292
+ "text/plain": string;
2293
+ };
2294
+ };
2295
+ /** @description Unauthorized */
2296
+ 401: {
2297
+ headers: {
2298
+ [name: string]: unknown;
2299
+ };
2300
+ content?: never;
2301
+ };
2302
+ /** @description Server error */
2303
+ 500: {
2304
+ headers: {
2305
+ [name: string]: unknown;
2306
+ };
2307
+ content?: never;
2308
+ };
2309
+ };
2310
+ };
2311
+ append_document: {
2312
+ parameters: {
2313
+ query?: never;
2314
+ header?: never;
2315
+ path?: never;
2316
+ cookie?: never;
2317
+ };
2318
+ requestBody: {
2319
+ content: {
2320
+ "application/json": components["schemas"]["AppendDocumentPayload"];
2321
+ };
2322
+ };
2323
+ responses: {
2324
+ /** @description Appended document path */
2325
+ 200: {
2326
+ headers: {
2327
+ [name: string]: unknown;
2328
+ };
2329
+ content: {
2330
+ "text/plain": string;
2331
+ };
2332
+ };
2333
+ /** @description Unauthorized */
2334
+ 401: {
2335
+ headers: {
2336
+ [name: string]: unknown;
2337
+ };
2338
+ content?: never;
2339
+ };
2340
+ /** @description Server error */
2341
+ 500: {
2342
+ headers: {
2343
+ [name: string]: unknown;
2344
+ };
2345
+ content?: never;
2346
+ };
2347
+ };
2348
+ };
2349
+ edit_document: {
2350
+ parameters: {
2351
+ query?: never;
2352
+ header?: never;
2353
+ path?: never;
2354
+ cookie?: never;
2355
+ };
2356
+ requestBody: {
2357
+ content: {
2358
+ "application/json": components["schemas"]["EditDocumentPayload"];
2359
+ };
2360
+ };
2361
+ responses: {
2362
+ /** @description Edit applied */
2363
+ 200: {
2364
+ headers: {
2365
+ [name: string]: unknown;
2366
+ };
2367
+ content: {
2368
+ "application/json": components["schemas"]["EditDocumentResponse"];
2369
+ };
2370
+ };
2371
+ /** @description old_string ambiguous or invalid edit */
2372
+ 400: {
2373
+ headers: {
2374
+ [name: string]: unknown;
2375
+ };
2376
+ content?: never;
2377
+ };
2378
+ /** @description Unauthorized */
2379
+ 401: {
2380
+ headers: {
2381
+ [name: string]: unknown;
2382
+ };
2383
+ content?: never;
2384
+ };
2385
+ /** @description Document not found */
2386
+ 404: {
2387
+ headers: {
2388
+ [name: string]: unknown;
2389
+ };
2390
+ content?: never;
2391
+ };
2392
+ /** @description old_string not found (stale read — re-fetch the document) */
2393
+ 409: {
2394
+ headers: {
2395
+ [name: string]: unknown;
2396
+ };
2397
+ content?: never;
2398
+ };
2399
+ /** @description Server error */
2400
+ 500: {
2401
+ headers: {
2402
+ [name: string]: unknown;
2403
+ };
2404
+ content?: never;
2405
+ };
2406
+ };
2407
+ };
2408
+ update_document: {
2409
+ parameters: {
2410
+ query?: never;
2411
+ header?: never;
2412
+ path?: never;
2413
+ cookie?: never;
2414
+ };
2415
+ requestBody: {
2416
+ content: {
2417
+ "application/json": components["schemas"]["UpdateDocumentPayload"];
2418
+ };
2419
+ };
2420
+ responses: {
2421
+ /** @description Updated document path */
2422
+ 200: {
2423
+ headers: {
2424
+ [name: string]: unknown;
2425
+ };
2426
+ content: {
2427
+ "text/plain": string;
2428
+ };
2429
+ };
2430
+ /** @description Unauthorized */
2431
+ 401: {
2432
+ headers: {
2433
+ [name: string]: unknown;
2434
+ };
2435
+ content?: never;
2436
+ };
2437
+ /** @description Server error */
2438
+ 500: {
2439
+ headers: {
2440
+ [name: string]: unknown;
2441
+ };
2442
+ content?: never;
2443
+ };
2444
+ };
2445
+ };
2446
+ get_document_by_id: {
2447
+ parameters: {
2448
+ query?: never;
2449
+ header?: never;
2450
+ path: {
2451
+ /** @description Document ID */
2452
+ document_id: string;
2453
+ };
2454
+ cookie?: never;
2455
+ };
2456
+ requestBody?: never;
2457
+ responses: {
2458
+ /** @description Document */
2459
+ 200: {
2460
+ headers: {
2461
+ [name: string]: unknown;
2462
+ };
2463
+ content: {
2464
+ "application/json": components["schemas"]["Document"];
2465
+ };
2466
+ };
2467
+ /** @description Unauthorized */
2468
+ 401: {
2469
+ headers: {
2470
+ [name: string]: unknown;
2471
+ };
2472
+ content?: never;
2473
+ };
2474
+ /** @description Not found */
2475
+ 404: {
2476
+ headers: {
2477
+ [name: string]: unknown;
2478
+ };
2479
+ content?: never;
2480
+ };
2481
+ /** @description Server error */
2482
+ 500: {
2483
+ headers: {
2484
+ [name: string]: unknown;
2485
+ };
2486
+ content?: never;
2487
+ };
2488
+ };
2489
+ };
2490
+ get_document_messages: {
2491
+ parameters: {
2492
+ query?: {
2493
+ /** @description Only messages after this instant (ISO-8601) */
2494
+ since?: string;
2495
+ /** @description Only messages before this instant (ISO-8601) */
2496
+ until?: string;
2497
+ };
2498
+ header?: never;
2499
+ path: {
2500
+ /** @description Document ID */
2501
+ document_id: string;
2502
+ };
2503
+ cookie?: never;
2504
+ };
2505
+ requestBody?: never;
2506
+ responses: {
2507
+ /** @description The document's threads, newest activity first */
2508
+ 200: {
2509
+ headers: {
2510
+ [name: string]: unknown;
2511
+ };
2512
+ content: {
2513
+ "application/json": components["schemas"]["ChatThread"][];
2514
+ };
2515
+ };
2516
+ /** @description Unauthorized */
2517
+ 401: {
2518
+ headers: {
2519
+ [name: string]: unknown;
2520
+ };
2521
+ content?: never;
2522
+ };
2523
+ /** @description Document not found */
2524
+ 404: {
2525
+ headers: {
2526
+ [name: string]: unknown;
2527
+ };
2528
+ content?: never;
2529
+ };
2530
+ /** @description Server error */
2531
+ 500: {
2532
+ headers: {
2533
+ [name: string]: unknown;
2534
+ };
2535
+ content?: never;
2536
+ };
2537
+ };
2538
+ };
2539
+ update_presence: {
2540
+ parameters: {
2541
+ query?: never;
2542
+ header?: never;
2543
+ path: {
2544
+ /** @description Document ID */
2545
+ document_id: string;
2546
+ };
2547
+ cookie?: never;
2548
+ };
2549
+ requestBody: {
2550
+ content: {
2551
+ "application/json": components["schemas"]["UpdatePresencePayload"];
2552
+ };
2553
+ };
2554
+ responses: {
2555
+ /** @description OK */
2556
+ 200: {
2557
+ headers: {
2558
+ [name: string]: unknown;
2559
+ };
2560
+ content: {
2561
+ "text/plain": string;
2562
+ };
2563
+ };
2564
+ /** @description Unauthorized */
2565
+ 401: {
2566
+ headers: {
2567
+ [name: string]: unknown;
2568
+ };
2569
+ content?: never;
2570
+ };
2571
+ /** @description Server error */
2572
+ 500: {
2573
+ headers: {
2574
+ [name: string]: unknown;
2575
+ };
2576
+ content?: never;
2577
+ };
2578
+ };
2579
+ };
2580
+ get_document_source: {
2581
+ parameters: {
2582
+ query?: never;
2583
+ header?: never;
2584
+ path: {
2585
+ /** @description Document ID */
2586
+ document_id: string;
2587
+ };
2588
+ cookie?: never;
2589
+ };
2590
+ requestBody?: never;
2591
+ responses: {
2592
+ /** @description Signed URL for the document's source asset */
2593
+ 200: {
2594
+ headers: {
2595
+ [name: string]: unknown;
2596
+ };
2597
+ content: {
2598
+ "application/json": components["schemas"]["SourceFileResponse"];
2599
+ };
2600
+ };
2601
+ /** @description Unauthorized */
2602
+ 401: {
2603
+ headers: {
2604
+ [name: string]: unknown;
2605
+ };
2606
+ content?: never;
2607
+ };
2608
+ /** @description Document or source not found */
2609
+ 404: {
2610
+ headers: {
2611
+ [name: string]: unknown;
2612
+ };
2613
+ content?: never;
2614
+ };
2615
+ /** @description Server error */
2616
+ 500: {
2617
+ headers: {
2618
+ [name: string]: unknown;
2619
+ };
2620
+ content?: never;
2621
+ };
2622
+ };
2623
+ };
2624
+ send_message: {
2625
+ parameters: {
2626
+ query?: never;
2627
+ header?: never;
2628
+ path?: never;
2629
+ cookie?: never;
2630
+ };
2631
+ requestBody: {
2632
+ content: {
2633
+ "application/json": components["schemas"]["SendMessagePayload"];
2634
+ };
2635
+ };
2636
+ responses: {
2637
+ /** @description Sent message */
2638
+ 200: {
2639
+ headers: {
2640
+ [name: string]: unknown;
2641
+ };
2642
+ content: {
2643
+ "application/json": components["schemas"]["Message"];
2644
+ };
2645
+ };
2646
+ /** @description Unauthorized */
2647
+ 401: {
2648
+ headers: {
2649
+ [name: string]: unknown;
2650
+ };
2651
+ content?: never;
2652
+ };
2653
+ /** @description Server error */
2654
+ 500: {
2655
+ headers: {
2656
+ [name: string]: unknown;
2657
+ };
2658
+ content?: never;
2659
+ };
2660
+ };
2661
+ };
2662
+ start_new_task: {
2663
+ parameters: {
2664
+ query?: never;
2665
+ header?: never;
2666
+ path?: never;
2667
+ cookie?: never;
2668
+ };
2669
+ requestBody: {
2670
+ content: {
2671
+ "application/json": components["schemas"]["StartNewTaskPayload"];
2672
+ };
2673
+ };
2674
+ responses: {
2675
+ /** @description New task ID */
2676
+ 200: {
2677
+ headers: {
2678
+ [name: string]: unknown;
2679
+ };
2680
+ content: {
2681
+ "text/plain": string;
2682
+ };
2683
+ };
2684
+ /** @description Unauthorized */
2685
+ 401: {
2686
+ headers: {
2687
+ [name: string]: unknown;
2688
+ };
2689
+ content?: never;
2690
+ };
2691
+ /** @description Server error */
2692
+ 500: {
2693
+ headers: {
2694
+ [name: string]: unknown;
2695
+ };
2696
+ content?: never;
2697
+ };
2698
+ };
2699
+ };
2700
+ get_active_tasks: {
2701
+ parameters: {
2702
+ query?: never;
2703
+ header?: never;
2704
+ path?: never;
2705
+ cookie?: never;
2706
+ };
2707
+ requestBody?: never;
2708
+ responses: {
2709
+ /** @description Active tasks for agent */
2710
+ 200: {
2711
+ headers: {
2712
+ [name: string]: unknown;
2713
+ };
2714
+ content: {
2715
+ "application/json": components["schemas"]["Task"][];
2716
+ };
2717
+ };
2718
+ /** @description Unauthorized */
2719
+ 401: {
2720
+ headers: {
2721
+ [name: string]: unknown;
2722
+ };
2723
+ content?: never;
2724
+ };
2725
+ /** @description Server error */
2726
+ 500: {
2727
+ headers: {
2728
+ [name: string]: unknown;
2729
+ };
2730
+ content?: never;
2731
+ };
2732
+ };
2733
+ };
2734
+ get_assigned_tasks: {
2735
+ parameters: {
2736
+ query?: never;
2737
+ header?: never;
2738
+ path?: never;
2739
+ cookie?: never;
2740
+ };
2741
+ requestBody?: never;
2742
+ responses: {
2743
+ /** @description Tasks assigned to this agent's user account */
2744
+ 200: {
2745
+ headers: {
2746
+ [name: string]: unknown;
2747
+ };
2748
+ content: {
2749
+ "application/json": components["schemas"]["Task"][];
2750
+ };
2751
+ };
2752
+ /** @description Unauthorized */
2753
+ 401: {
2754
+ headers: {
2755
+ [name: string]: unknown;
2756
+ };
2757
+ content?: never;
2758
+ };
2759
+ /** @description Server error */
2760
+ 500: {
2761
+ headers: {
2762
+ [name: string]: unknown;
2763
+ };
2764
+ content?: never;
2765
+ };
2766
+ };
2767
+ };
2768
+ take_task: {
2769
+ parameters: {
2770
+ query?: never;
2771
+ header?: never;
2772
+ path?: never;
2773
+ cookie?: never;
2774
+ };
2775
+ requestBody?: never;
2776
+ responses: {
2777
+ /** @description The next task with its capability inputs, or `null` when nothing is queued */
2778
+ 200: {
2779
+ headers: {
2780
+ [name: string]: unknown;
2781
+ };
2782
+ content: {
2783
+ /**
2784
+ * @example {
2785
+ * "task": {
2786
+ * "id": "task:123",
2787
+ * "journey_id": "journey:abc",
2788
+ * "step_id": "summarize",
2789
+ * "status": "running",
2790
+ * "progress": 0
2791
+ * },
2792
+ * "payload": {
2793
+ * "workspace_id": "workspace:xyz",
2794
+ * "task_id": "task:123",
2795
+ * "channel_id": "channel:1",
2796
+ * "text": "the capability's own inputs, as declared in its schema"
2797
+ * }
2798
+ * }
2799
+ */
2800
+ "application/json": unknown;
2801
+ };
2802
+ };
2803
+ /** @description Unauthorized */
2804
+ 401: {
2805
+ headers: {
2806
+ [name: string]: unknown;
2807
+ };
2808
+ content?: never;
2809
+ };
2810
+ /** @description Server error */
2811
+ 500: {
2812
+ headers: {
2813
+ [name: string]: unknown;
2814
+ };
2815
+ content?: never;
2816
+ };
2817
+ };
2818
+ };
2819
+ get_unassigned_tasks: {
2820
+ parameters: {
2821
+ query?: never;
2822
+ header?: never;
2823
+ path?: never;
2824
+ cookie?: never;
2825
+ };
2826
+ requestBody?: never;
2827
+ responses: {
2828
+ /** @description Unassigned tasks in this agent's workspaces */
2829
+ 200: {
2830
+ headers: {
2831
+ [name: string]: unknown;
2832
+ };
2833
+ content: {
2834
+ "application/json": components["schemas"]["Task"][];
2835
+ };
2836
+ };
2837
+ /** @description Unauthorized */
2838
+ 401: {
2839
+ headers: {
2840
+ [name: string]: unknown;
2841
+ };
2842
+ content?: never;
2843
+ };
2844
+ /** @description Server error */
2845
+ 500: {
2846
+ headers: {
2847
+ [name: string]: unknown;
2848
+ };
2849
+ content?: never;
2850
+ };
2851
+ };
2852
+ };
2853
+ update_task: {
2854
+ parameters: {
2855
+ query?: never;
2856
+ header?: never;
2857
+ path: {
2858
+ /** @description Task ID */
2859
+ task_id: string;
2860
+ };
2861
+ cookie?: never;
2862
+ };
2863
+ requestBody: {
2864
+ content: {
2865
+ "application/json": components["schemas"]["UpdateTaskPayload"];
2866
+ };
2867
+ };
2868
+ responses: {
2869
+ /** @description OK */
2870
+ 200: {
2871
+ headers: {
2872
+ [name: string]: unknown;
2873
+ };
2874
+ content: {
2875
+ "text/plain": string;
2876
+ };
2877
+ };
2878
+ /** @description Unauthorized */
2879
+ 401: {
2880
+ headers: {
2881
+ [name: string]: unknown;
2882
+ };
2883
+ content?: never;
2884
+ };
2885
+ /** @description Server error */
2886
+ 500: {
2887
+ headers: {
2888
+ [name: string]: unknown;
2889
+ };
2890
+ content?: never;
2891
+ };
2892
+ };
2893
+ };
2894
+ claim_task: {
2895
+ parameters: {
2896
+ query?: never;
2897
+ header?: never;
2898
+ path: {
2899
+ /** @description An unassigned task, as returned by GET /tasks/unassigned */
2900
+ task_id: string;
2901
+ };
2902
+ cookie?: never;
2903
+ };
2904
+ requestBody: {
2905
+ content: {
2906
+ "application/json": components["schemas"]["ClaimTaskPayload"];
2907
+ };
2908
+ };
2909
+ responses: {
2910
+ /** @description The claimed task, now an agent task */
2911
+ 200: {
2912
+ headers: {
2913
+ [name: string]: unknown;
2914
+ };
2915
+ content: {
2916
+ "application/json": components["schemas"]["Task"];
2917
+ };
2918
+ };
2919
+ /** @description Task is not unassigned, or capability mismatch */
2920
+ 400: {
2921
+ headers: {
2922
+ [name: string]: unknown;
2923
+ };
2924
+ content?: never;
2925
+ };
2926
+ /** @description Unauthorized */
2927
+ 401: {
2928
+ headers: {
2929
+ [name: string]: unknown;
2930
+ };
2931
+ content?: never;
2932
+ };
2933
+ /** @description Server error */
2934
+ 500: {
2935
+ headers: {
2936
+ [name: string]: unknown;
2937
+ };
2938
+ content?: never;
2939
+ };
2940
+ };
2941
+ };
2942
+ get_journey_params: {
2943
+ parameters: {
2944
+ query?: never;
2945
+ header?: never;
2946
+ path: {
2947
+ /** @description Task ID */
2948
+ task_id: string;
2949
+ };
2950
+ cookie?: never;
2951
+ };
2952
+ requestBody?: never;
2953
+ responses: {
2954
+ /** @description Workspace parameters with the journey's layered on top */
2955
+ 200: {
2956
+ headers: {
2957
+ [name: string]: unknown;
2958
+ };
2959
+ content: {
2960
+ /**
2961
+ * @example {
2962
+ * "brand_voice": "concise, no exclamation marks",
2963
+ * "target_language": "es"
2964
+ * }
2965
+ */
2966
+ "application/json": unknown;
2967
+ };
2968
+ };
2969
+ /** @description Unauthorized */
2970
+ 401: {
2971
+ headers: {
2972
+ [name: string]: unknown;
2973
+ };
2974
+ content?: never;
2975
+ };
2976
+ /** @description Server error */
2977
+ 500: {
2978
+ headers: {
2979
+ [name: string]: unknown;
2980
+ };
2981
+ content?: never;
2982
+ };
2983
+ };
2984
+ };
2985
+ get_step_result: {
2986
+ parameters: {
2987
+ query?: never;
2988
+ header?: never;
2989
+ path: {
2990
+ /** @description The agent's current task; identifies the journey and authorizes access */
2991
+ task_id: string;
2992
+ /** @description The step whose result to fetch */
2993
+ step_id: string;
2994
+ };
2995
+ cookie?: never;
2996
+ };
2997
+ requestBody?: never;
2998
+ responses: {
2999
+ /** @description Whatever the step reported as `result_json`, or `null` if it has not produced one */
3000
+ 200: {
3001
+ headers: {
3002
+ [name: string]: unknown;
3003
+ };
3004
+ content: {
3005
+ /**
3006
+ * @example {
3007
+ * "summary": "…",
3008
+ * "sources": [
3009
+ * "/notes/intro"
3010
+ * ]
3011
+ * }
3012
+ */
3013
+ "application/json": unknown;
3014
+ };
3015
+ };
3016
+ /** @description Unauthorized */
3017
+ 401: {
3018
+ headers: {
3019
+ [name: string]: unknown;
3020
+ };
3021
+ content?: never;
3022
+ };
3023
+ /** @description Server error */
3024
+ 500: {
3025
+ headers: {
3026
+ [name: string]: unknown;
3027
+ };
3028
+ content?: never;
3029
+ };
3030
+ };
3031
+ };
3032
+ request_upload_url: {
3033
+ parameters: {
3034
+ query?: never;
3035
+ header?: never;
3036
+ path?: never;
3037
+ cookie?: never;
3038
+ };
3039
+ requestBody: {
3040
+ content: {
3041
+ "application/json": components["schemas"]["RequestUploadUrlPayload"];
3042
+ };
3043
+ };
3044
+ responses: {
3045
+ /** @description Presigned upload URL and object key */
3046
+ 200: {
3047
+ headers: {
3048
+ [name: string]: unknown;
3049
+ };
3050
+ content: {
3051
+ "application/json": components["schemas"]["RequestUploadUrlResponse"];
3052
+ };
3053
+ };
3054
+ /** @description Unauthorized */
3055
+ 401: {
3056
+ headers: {
3057
+ [name: string]: unknown;
3058
+ };
3059
+ content?: never;
3060
+ };
3061
+ /** @description Server error */
3062
+ 500: {
3063
+ headers: {
3064
+ [name: string]: unknown;
3065
+ };
3066
+ content?: never;
3067
+ };
3068
+ };
3069
+ };
3070
+ create_workflow_handler: {
3071
+ parameters: {
3072
+ query?: never;
3073
+ header?: never;
3074
+ path?: never;
3075
+ cookie?: never;
3076
+ };
3077
+ requestBody: {
3078
+ content: {
3079
+ "application/json": components["schemas"]["CreateWorkflowPayload"];
3080
+ };
3081
+ };
3082
+ responses: {
3083
+ /** @description Created workflow */
3084
+ 200: {
3085
+ headers: {
3086
+ [name: string]: unknown;
3087
+ };
3088
+ content: {
3089
+ "application/json": components["schemas"]["Workflow"];
3090
+ };
3091
+ };
3092
+ /** @description Unauthorized */
3093
+ 401: {
3094
+ headers: {
3095
+ [name: string]: unknown;
3096
+ };
3097
+ content?: never;
3098
+ };
3099
+ /** @description Server error */
3100
+ 500: {
3101
+ headers: {
3102
+ [name: string]: unknown;
3103
+ };
3104
+ content?: never;
3105
+ };
3106
+ };
3107
+ };
3108
+ list_workspaces: {
3109
+ parameters: {
3110
+ query?: never;
3111
+ header?: never;
3112
+ path?: never;
3113
+ cookie?: never;
3114
+ };
3115
+ requestBody?: never;
3116
+ responses: {
3117
+ /** @description Workspaces this agent belongs to */
3118
+ 200: {
3119
+ headers: {
3120
+ [name: string]: unknown;
3121
+ };
3122
+ content: {
3123
+ /**
3124
+ * @example [
3125
+ * {
3126
+ * "id": "abc123",
3127
+ * "name": "Acme Marketing"
3128
+ * }
3129
+ * ]
3130
+ */
3131
+ "application/json": components["schemas"]["WorkspaceRef"][];
3132
+ };
3133
+ };
3134
+ /** @description Unauthorized */
3135
+ 401: {
3136
+ headers: {
3137
+ [name: string]: unknown;
3138
+ };
3139
+ content?: never;
3140
+ };
3141
+ /** @description Server error */
3142
+ 500: {
3143
+ headers: {
3144
+ [name: string]: unknown;
3145
+ };
3146
+ content?: never;
3147
+ };
3148
+ };
3149
+ };
3150
+ list_agents_capabilities: {
3151
+ parameters: {
3152
+ query?: never;
3153
+ header?: never;
3154
+ path: {
3155
+ /** @description Workspace ID */
3156
+ workspace_id: string;
3157
+ };
3158
+ cookie?: never;
3159
+ };
3160
+ requestBody?: never;
3161
+ responses: {
3162
+ /** @description Agent capabilities list */
3163
+ 200: {
3164
+ headers: {
3165
+ [name: string]: unknown;
3166
+ };
3167
+ content: {
3168
+ "application/json": components["schemas"]["AgentDescription"][];
3169
+ };
3170
+ };
3171
+ /** @description Unauthorized */
3172
+ 401: {
3173
+ headers: {
3174
+ [name: string]: unknown;
3175
+ };
3176
+ content?: never;
3177
+ };
3178
+ /** @description Server error */
3179
+ 500: {
3180
+ headers: {
3181
+ [name: string]: unknown;
3182
+ };
3183
+ content?: never;
3184
+ };
3185
+ };
3186
+ };
3187
+ list_automations_handler: {
3188
+ parameters: {
3189
+ query?: never;
3190
+ header?: never;
3191
+ path: {
3192
+ /** @description Workspace ID */
3193
+ workspace_id: string;
3194
+ };
3195
+ cookie?: never;
3196
+ };
3197
+ requestBody?: never;
3198
+ responses: {
3199
+ /** @description List of automations */
3200
+ 200: {
3201
+ headers: {
3202
+ [name: string]: unknown;
3203
+ };
3204
+ content: {
3205
+ "application/json": components["schemas"]["Automation"][];
3206
+ };
3207
+ };
3208
+ /** @description Unauthorized */
3209
+ 401: {
3210
+ headers: {
3211
+ [name: string]: unknown;
3212
+ };
3213
+ content?: never;
3214
+ };
3215
+ /** @description Server error */
3216
+ 500: {
3217
+ headers: {
3218
+ [name: string]: unknown;
3219
+ };
3220
+ content?: never;
3221
+ };
3222
+ };
3223
+ };
3224
+ list_blockers: {
3225
+ parameters: {
3226
+ query?: never;
3227
+ header?: never;
3228
+ path: {
3229
+ /** @description Workspace ID */
3230
+ workspace_id: string;
3231
+ };
3232
+ cookie?: never;
3233
+ };
3234
+ requestBody?: never;
3235
+ responses: {
3236
+ /** @description Workspace blockers */
3237
+ 200: {
3238
+ headers: {
3239
+ [name: string]: unknown;
3240
+ };
3241
+ content: {
3242
+ "application/json": components["schemas"]["Pipe"][];
3243
+ };
3244
+ };
3245
+ /** @description Unauthorized */
3246
+ 401: {
3247
+ headers: {
3248
+ [name: string]: unknown;
3249
+ };
3250
+ content?: never;
3251
+ };
3252
+ /** @description Server error */
3253
+ 500: {
3254
+ headers: {
3255
+ [name: string]: unknown;
3256
+ };
3257
+ content?: never;
3258
+ };
3259
+ };
3260
+ };
3261
+ get_documents: {
3262
+ parameters: {
3263
+ query?: {
3264
+ /** @description Folder to list, as a path (defaults to root) */
3265
+ path?: string;
3266
+ /** @description List descendants recursively (ls -R) */
3267
+ recursive?: boolean;
3268
+ };
3269
+ header?: never;
3270
+ path: {
3271
+ /** @description Workspace ID */
3272
+ workspace_id: string;
3273
+ };
3274
+ cookie?: never;
3275
+ };
3276
+ requestBody?: never;
3277
+ responses: {
3278
+ /** @description Document headers (path + title, no content) */
3279
+ 200: {
3280
+ headers: {
3281
+ [name: string]: unknown;
3282
+ };
3283
+ content: {
3284
+ "application/json": components["schemas"]["DocumentHeader"][];
3285
+ };
3286
+ };
3287
+ /** @description Unauthorized */
3288
+ 401: {
3289
+ headers: {
3290
+ [name: string]: unknown;
3291
+ };
3292
+ content?: never;
3293
+ };
3294
+ /** @description Server error */
3295
+ 500: {
3296
+ headers: {
3297
+ [name: string]: unknown;
3298
+ };
3299
+ content?: never;
3300
+ };
3301
+ };
3302
+ };
3303
+ get_document: {
3304
+ parameters: {
3305
+ query: {
3306
+ /** @description Document path, e.g. /memories/user_memory.md */
3307
+ path: string;
3308
+ };
3309
+ header?: never;
3310
+ path: {
3311
+ /** @description Workspace ID */
3312
+ workspace_id: string;
3313
+ };
3314
+ cookie?: never;
3315
+ };
3316
+ requestBody?: never;
3317
+ responses: {
3318
+ /** @description Document */
3319
+ 200: {
3320
+ headers: {
3321
+ [name: string]: unknown;
3322
+ };
3323
+ content: {
3324
+ "application/json": components["schemas"]["Document"];
3325
+ };
3326
+ };
3327
+ /** @description Missing path query param */
3328
+ 400: {
3329
+ headers: {
3330
+ [name: string]: unknown;
3331
+ };
3332
+ content?: never;
3333
+ };
3334
+ /** @description Unauthorized */
3335
+ 401: {
3336
+ headers: {
3337
+ [name: string]: unknown;
3338
+ };
3339
+ content?: never;
3340
+ };
3341
+ /** @description Not found */
3342
+ 404: {
3343
+ headers: {
3344
+ [name: string]: unknown;
3345
+ };
3346
+ content?: never;
3347
+ };
3348
+ /** @description Server error */
3349
+ 500: {
3350
+ headers: {
3351
+ [name: string]: unknown;
3352
+ };
3353
+ content?: never;
3354
+ };
3355
+ };
3356
+ };
3357
+ search: {
3358
+ parameters: {
3359
+ query: {
3360
+ /** @description Natural-language or keyword query */
3361
+ q: string;
3362
+ /** @description Max results (default 20, capped at 50) */
3363
+ limit?: number;
3364
+ };
3365
+ header?: never;
3366
+ path: {
3367
+ /** @description Workspace ID */
3368
+ workspace_id: string;
3369
+ };
3370
+ cookie?: never;
3371
+ };
3372
+ requestBody?: never;
3373
+ responses: {
3374
+ /** @description Ranked hybrid-search results */
3375
+ 200: {
3376
+ headers: {
3377
+ [name: string]: unknown;
3378
+ };
3379
+ content: {
3380
+ "application/json": components["schemas"]["SearchResult"][];
3381
+ };
3382
+ };
3383
+ /** @description Unauthorized */
3384
+ 401: {
3385
+ headers: {
3386
+ [name: string]: unknown;
3387
+ };
3388
+ content?: never;
3389
+ };
3390
+ /** @description Server error */
3391
+ 500: {
3392
+ headers: {
3393
+ [name: string]: unknown;
3394
+ };
3395
+ content?: never;
3396
+ };
3397
+ };
3398
+ };
3399
+ get_workspace_params: {
3400
+ parameters: {
3401
+ query?: never;
3402
+ header?: never;
3403
+ path: {
3404
+ /** @description Workspace ID */
3405
+ workspace_id: string;
3406
+ };
3407
+ cookie?: never;
3408
+ };
3409
+ requestBody?: never;
3410
+ responses: {
3411
+ /** @description The workspace's parameters, as a flat JSON object (`{}` when unset) */
3412
+ 200: {
3413
+ headers: {
3414
+ [name: string]: unknown;
3415
+ };
3416
+ content: {
3417
+ /**
3418
+ * @example {
3419
+ * "brand_voice": "concise, no exclamation marks",
3420
+ * "weekly_digest_enabled": true
3421
+ * }
3422
+ */
3423
+ "application/json": unknown;
3424
+ };
3425
+ };
3426
+ /** @description Unauthorized */
3427
+ 401: {
3428
+ headers: {
3429
+ [name: string]: unknown;
3430
+ };
3431
+ content?: never;
3432
+ };
3433
+ /** @description Server error */
3434
+ 500: {
3435
+ headers: {
3436
+ [name: string]: unknown;
3437
+ };
3438
+ content?: never;
3439
+ };
3440
+ };
3441
+ };
3442
+ list_private_channels: {
3443
+ parameters: {
3444
+ query?: never;
3445
+ header?: never;
3446
+ path: {
3447
+ /** @description Workspace ID */
3448
+ workspace_id: string;
3449
+ };
3450
+ cookie?: never;
3451
+ };
3452
+ requestBody?: never;
3453
+ responses: {
3454
+ /** @description The agent's private channels in this workspace, most recently active first */
3455
+ 200: {
3456
+ headers: {
3457
+ [name: string]: unknown;
3458
+ };
3459
+ content: {
3460
+ "application/json": components["schemas"]["Channel"][];
3461
+ };
3462
+ };
3463
+ /** @description Unauthorized */
3464
+ 401: {
3465
+ headers: {
3466
+ [name: string]: unknown;
3467
+ };
3468
+ content?: never;
3469
+ };
3470
+ /** @description Server error */
3471
+ 500: {
3472
+ headers: {
3473
+ [name: string]: unknown;
3474
+ };
3475
+ content?: never;
3476
+ };
3477
+ };
3478
+ };
3479
+ get_workflows: {
3480
+ parameters: {
3481
+ query?: never;
3482
+ header?: never;
3483
+ path: {
3484
+ /** @description Workspace ID */
3485
+ workspace_id: string;
3486
+ };
3487
+ cookie?: never;
3488
+ };
3489
+ requestBody?: never;
3490
+ responses: {
3491
+ /** @description List of workflows */
3492
+ 200: {
3493
+ headers: {
3494
+ [name: string]: unknown;
3495
+ };
3496
+ content: {
3497
+ "application/json": components["schemas"]["WorkflowRef"][];
3498
+ };
3499
+ };
3500
+ /** @description Unauthorized */
3501
+ 401: {
3502
+ headers: {
3503
+ [name: string]: unknown;
3504
+ };
3505
+ content?: never;
3506
+ };
3507
+ /** @description Server error */
3508
+ 500: {
3509
+ headers: {
3510
+ [name: string]: unknown;
3511
+ };
3512
+ content?: never;
3513
+ };
3514
+ };
3515
+ };
3516
+ }