@deepnoodle/mobius 0.0.28 → 0.0.29

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.
@@ -83,7 +83,7 @@ export interface paths {
83
83
  post?: never;
84
84
  /**
85
85
  * Delete action
86
- * @description Deletes a project-owned custom action definition. Loops that still reference the action block deletion until the reference is removed.
86
+ * @description Deletes a project-owned custom action definition. Runnable loop specs that still reference the action block deletion with `409 Conflict` until the reference is removed.
87
87
  */
88
88
  delete: operations["deleteAction"];
89
89
  options?: never;
@@ -235,6 +235,26 @@ export interface paths {
235
235
  patch?: never;
236
236
  trace?: never;
237
237
  };
238
+ "/v1/projects/{project_handle}/catalog/worker-models": {
239
+ parameters: {
240
+ query?: never;
241
+ header?: never;
242
+ path?: never;
243
+ cookie?: never;
244
+ };
245
+ /**
246
+ * List worker models
247
+ * @description Returns local LLM models currently advertised by online project workers. Each item includes the exact `model_route` object to assign to an agent or loop step. Matching is exact on `provider` and `model`; queues are not part of the standard local LLM path.
248
+ */
249
+ get: operations["listCatalogWorkerModels"];
250
+ put?: never;
251
+ post?: never;
252
+ delete?: never;
253
+ options?: never;
254
+ head?: never;
255
+ patch?: never;
256
+ trace?: never;
257
+ };
238
258
  "/v1/projects/{project_handle}/environments": {
239
259
  parameters: {
240
260
  query?: never;
@@ -473,6 +493,96 @@ export interface paths {
473
493
  patch?: never;
474
494
  trace?: never;
475
495
  };
496
+ "/v1/projects/{project_handle}/interactions": {
497
+ parameters: {
498
+ query?: never;
499
+ header?: never;
500
+ path?: never;
501
+ cookie?: never;
502
+ };
503
+ /**
504
+ * List interactions
505
+ * @description Returns interactions newest-first, optionally filtered by kind, status, run, target, or the current caller's inbox. Inbox filtering includes direct targets.
506
+ */
507
+ get: operations["listInteractions"];
508
+ put?: never;
509
+ /**
510
+ * Create interaction
511
+ * @description Creates a standalone or run-backed interaction. Run-backed interactions emit an `interaction.responded` event when completed; omit `run_id` and `signal_name` for interactions with no loop-run side effect.
512
+ */
513
+ post: operations["createInteraction"];
514
+ delete?: never;
515
+ options?: never;
516
+ head?: never;
517
+ patch?: never;
518
+ trace?: never;
519
+ };
520
+ "/v1/projects/{project_handle}/interactions/{resource_id}": {
521
+ parameters: {
522
+ query?: never;
523
+ header?: never;
524
+ path?: never;
525
+ cookie?: never;
526
+ };
527
+ /**
528
+ * Get interaction
529
+ * @description Returns one interaction with target, response, and completion metadata. Run-backed interactions include the run and signal identifiers used to resume loop execution.
530
+ */
531
+ get: operations["getInteraction"];
532
+ put?: never;
533
+ post?: never;
534
+ /**
535
+ * Delete interaction
536
+ * @description Deletes an interaction so it disappears from inbox and project listings. The row is retained for audit history. Only terminal interactions (`completed`, `cancelled`, `expired`) may be deleted; pending or in-review interactions must be cancelled first so any waiting loop run can route to a fallback.
537
+ */
538
+ delete: operations["deleteInteraction"];
539
+ options?: never;
540
+ head?: never;
541
+ patch?: never;
542
+ trace?: never;
543
+ };
544
+ "/v1/projects/{project_handle}/interactions/{resource_id}/respond": {
545
+ parameters: {
546
+ query?: never;
547
+ header?: never;
548
+ path?: never;
549
+ cookie?: never;
550
+ };
551
+ get?: never;
552
+ put?: never;
553
+ /**
554
+ * Respond to interaction
555
+ * @description Canonical response endpoint for every interaction kind. `action` defaults to `submit`; lifecycle operations beyond submit are not part of the launch model.
556
+ *
557
+ * The request body is intentionally the same envelope for every kind: `action`, `value`, and `comment`. Kind-specific behavior is selected from the interaction itself, not from separate request-body shapes.
558
+ */
559
+ post: operations["respondToInteraction"];
560
+ delete?: never;
561
+ options?: never;
562
+ head?: never;
563
+ patch?: never;
564
+ trace?: never;
565
+ };
566
+ "/v1/projects/{project_handle}/interactions/{resource_id}/cancel": {
567
+ parameters: {
568
+ query?: never;
569
+ header?: never;
570
+ path?: never;
571
+ cookie?: never;
572
+ };
573
+ get?: never;
574
+ put?: never;
575
+ /**
576
+ * Cancel open interaction
577
+ * @description Cancels an open interaction, recording who cancelled and an optional reason. Run-backed interactions resume the waiting loop step with a `{status: cancelled, reason}` signal payload so loops can route to a fallback. Only humans may cancel by default — agents must request cancellation through an interaction.
578
+ */
579
+ post: operations["cancelInteraction"];
580
+ delete?: never;
581
+ options?: never;
582
+ head?: never;
583
+ patch?: never;
584
+ trace?: never;
585
+ };
476
586
  "/v1/projects/{project_handle}/agents": {
477
587
  parameters: {
478
588
  query?: never;
@@ -513,7 +623,7 @@ export interface paths {
513
623
  post?: never;
514
624
  /**
515
625
  * Delete agent
516
- * @description Deletes the agent from normal use. The agent record is retained for audit and attribution history, but the agent is excluded from all listings and lookups. The agent's machine principal is disabled. In-flight jobs claiming this agent are not automatically cancelled.
626
+ * @description Deletes the agent from normal use. The agent record is retained for audit and attribution history, but the agent is excluded from all listings and lookups. The agent's backing machine principal is archived for attribution history. In-flight jobs claiming this agent are not automatically cancelled.
517
627
  */
518
628
  delete: operations["deleteAgent"];
519
629
  options?: never;
@@ -545,7 +655,7 @@ export interface paths {
545
655
  patch?: never;
546
656
  trace?: never;
547
657
  };
548
- "/v1/projects/{project_handle}/turns/{resource_id}/messages": {
658
+ "/v1/projects/{project_handle}/turns/{turn_id}/messages": {
549
659
  parameters: {
550
660
  query?: never;
551
661
  header?: never;
@@ -677,6 +787,92 @@ export interface paths {
677
787
  patch?: never;
678
788
  trace?: never;
679
789
  };
790
+ "/v1/projects/{project_handle}/agents/{resource_id}/memory": {
791
+ parameters: {
792
+ query?: never;
793
+ header?: never;
794
+ path?: never;
795
+ cookie?: never;
796
+ };
797
+ /**
798
+ * Get agent memory
799
+ * @description Returns a summary of the agent's private memory: how many entries it holds, a breakdown by kind, and when it last changed. Each agent has its own durable memory; only that agent reads or writes it during runs, but project members can observe and edit it here.
800
+ */
801
+ get: operations["getAgentMemory"];
802
+ put?: never;
803
+ post?: never;
804
+ delete?: never;
805
+ options?: never;
806
+ head?: never;
807
+ patch?: never;
808
+ trace?: never;
809
+ };
810
+ "/v1/projects/{project_handle}/agents/{resource_id}/memory/entries": {
811
+ parameters: {
812
+ query?: never;
813
+ header?: never;
814
+ path?: never;
815
+ cookie?: never;
816
+ };
817
+ /**
818
+ * List agent memory entries
819
+ * @description Lists the entries in an agent's private memory, each a keyed, durable memory the agent remembered. Pass `query` to keyword-search over keys and content, and `kind` to filter to one kind. Returns an empty page when the agent has no memory yet.
820
+ */
821
+ get: operations["listAgentMemoryEntries"];
822
+ put?: never;
823
+ post?: never;
824
+ delete?: never;
825
+ options?: never;
826
+ head?: never;
827
+ patch?: never;
828
+ trace?: never;
829
+ };
830
+ "/v1/projects/{project_handle}/agents/{resource_id}/memory/entries/{memory_key}": {
831
+ parameters: {
832
+ query?: never;
833
+ header?: never;
834
+ path?: never;
835
+ cookie?: never;
836
+ };
837
+ get?: never;
838
+ /**
839
+ * Create or update a memory entry
840
+ * @description Creates or updates the memory entry identified by `memory_key`. Editing an agent's memory here is equivalent to the agent calling `mobius.memory.remember`. Provisions the store on first write.
841
+ */
842
+ put: operations["putAgentMemoryEntry"];
843
+ post?: never;
844
+ /**
845
+ * Delete a memory entry
846
+ * @description Deletes the memory entry identified by `memory_key`, equivalent to the agent calling `mobius.memory.forget`. Idempotent: succeeds even if no such entry exists.
847
+ */
848
+ delete: operations["deleteAgentMemoryEntry"];
849
+ options?: never;
850
+ head?: never;
851
+ patch?: never;
852
+ trace?: never;
853
+ };
854
+ "/v1/projects/{project_handle}/agents/invoke": {
855
+ parameters: {
856
+ query?: never;
857
+ header?: never;
858
+ path?: never;
859
+ cookie?: never;
860
+ };
861
+ get?: never;
862
+ put?: never;
863
+ /**
864
+ * Invoke an agent
865
+ * @description One compound runtime call for hosted apps: it resolves an agent, resolves or creates a session by `session_key`, appends the caller's input message, and starts an agent turn — collapsing the create-or-resolve-session plus start-turn sequence into a single retryable request. This is the entry point a product backend (an embedded app, a Slack handler, a Telegram bot) calls per inbound message; the lower-level session and turn APIs remain available for finer control.
866
+ *
867
+ * By default it returns `202 Accepted` immediately with a durable `after_sequence` stream cursor; the turn keeps running even if the caller disconnects. When the request sets `Accept: text/event-stream`, the response is `200 OK` and the turn's activity is streamed inline on the same connection, identical to the `POST /v1/projects/{project_handle}/sessions/{session_id}/turns` stream. A repeated call with the same `input.idempotency_key` resolves the same session and resumes the existing turn rather than starting a second one, so a webhook handler can acknowledge fast and retry safely. Requires the `mobius.agent.invoke` permission (or the agent's own backing principal).
868
+ */
869
+ post: operations["invokeAgent"];
870
+ delete?: never;
871
+ options?: never;
872
+ head?: never;
873
+ patch?: never;
874
+ trace?: never;
875
+ };
680
876
  "/v1/projects/{project_handle}/sessions": {
681
877
  parameters: {
682
878
  query?: never;
@@ -701,7 +897,7 @@ export interface paths {
701
897
  patch?: never;
702
898
  trace?: never;
703
899
  };
704
- "/v1/projects/{project_handle}/sessions/{resource_id}": {
900
+ "/v1/projects/{project_handle}/sessions/{session_id}": {
705
901
  parameters: {
706
902
  query?: never;
707
903
  header?: never;
@@ -729,7 +925,7 @@ export interface paths {
729
925
  patch: operations["updateSession"];
730
926
  trace?: never;
731
927
  };
732
- "/v1/projects/{project_handle}/sessions/{resource_id}/messages": {
928
+ "/v1/projects/{project_handle}/sessions/{session_id}/messages": {
733
929
  parameters: {
734
930
  query?: never;
735
931
  header?: never;
@@ -738,7 +934,7 @@ export interface paths {
738
934
  };
739
935
  /**
740
936
  * List session messages
741
- * @description Returns raw session messages in sequence order for replay.
937
+ * @description Returns a page of session transcript messages. The page is sequence-anchored and bidirectional: `after_sequence` pages forward (newer), `before_sequence` pages backward (older), and `order=desc` fetches the newest messages — the tail of a long session — in a single request. Items are always returned ascending by `sequence`; the response carries both `next_sequence` (forward cursor) and `prev_sequence` (backward cursor).
742
938
  */
743
939
  get: operations["listSessionMessages"];
744
940
  put?: never;
@@ -753,7 +949,7 @@ export interface paths {
753
949
  patch?: never;
754
950
  trace?: never;
755
951
  };
756
- "/v1/projects/{project_handle}/sessions/{resource_id}/turns": {
952
+ "/v1/projects/{project_handle}/sessions/{session_id}/turns": {
757
953
  parameters: {
758
954
  query?: never;
759
955
  header?: never;
@@ -762,10 +958,34 @@ export interface paths {
762
958
  };
763
959
  /**
764
960
  * List session turns
765
- * @description Returns the session's turns in chronological order. Each turn groups related transcript messages and includes links to any run step or channel exchange that produced it.
961
+ * @description Returns the session's turns, the structure the turn-grouped transcript is built on. Each turn groups related transcript messages and includes links to any run step or channel exchange that produced it. Turns are ordered by creation time; `order=desc` returns the newest turns (the tail) first, and long sessions are walked page-by-page via the `next_cursor` returned in the response. Pass `ids` to fetch exactly a known set of turns in one bounded request — the join a transcript view uses to resolve a loaded message window's `turn_id`s to their headers; when `ids` is set the cursor and order parameters are ignored.
766
962
  */
767
963
  get: operations["listSessionTurns"];
768
964
  put?: never;
965
+ /**
966
+ * Start an agent turn
967
+ * @description Appends one caller input message to the session and starts an agent turn to respond. By default returns `202 Accepted` immediately with a durable `after_sequence` cursor (a message `sequence`) to stream from. The turn keeps running even if the caller disconnects. When the request sets `Accept: text/event-stream`, the response is `200 OK` and the turn's activity is streamed inline on the same connection, equivalent to opening `GET .../stream` at the returned cursor. A repeated call with the same `idempotency_key` resumes the existing turn rather than starting a second one. Requires the `mobius.agent.invoke` permission (or the agent's own backing principal).
968
+ */
969
+ post: operations["startTurn"];
970
+ delete?: never;
971
+ options?: never;
972
+ head?: never;
973
+ patch?: never;
974
+ trace?: never;
975
+ };
976
+ "/v1/projects/{project_handle}/sessions/{session_id}/turns/{turn_id}": {
977
+ parameters: {
978
+ query?: never;
979
+ header?: never;
980
+ path?: never;
981
+ cookie?: never;
982
+ };
983
+ /**
984
+ * Get a session turn
985
+ * @description Returns one agent turn in the session.
986
+ */
987
+ get: operations["getSessionTurn"];
988
+ put?: never;
769
989
  post?: never;
770
990
  delete?: never;
771
991
  options?: never;
@@ -773,7 +993,7 @@ export interface paths {
773
993
  patch?: never;
774
994
  trace?: never;
775
995
  };
776
- "/v1/projects/{project_handle}/sessions/{resource_id}/events.stream": {
996
+ "/v1/projects/{project_handle}/sessions/{session_id}/turns/{turn_id}/live": {
777
997
  parameters: {
778
998
  query?: never;
779
999
  header?: never;
@@ -781,10 +1001,10 @@ export interface paths {
781
1001
  cookie?: never;
782
1002
  };
783
1003
  /**
784
- * Stream session events
785
- * @description Streams Server-Sent Events for a conversation session. Durable lifecycle events (`user.message`, `session.status_running`, `agent.message`, `agent.tool_use`, `agent.tool_result`, and the terminal `session.status_*` events) are replayed from the durable log and then tailed live, so a client reconnecting with `?after_sequence=N` (or the `Last-Event-ID` header) resumes exactly where it left off. The stream closes after the terminal event for the active invocation is delivered. Live-only `generation.delta` frames are interleaved best-effort.
1004
+ * Get live session turn snapshot
1005
+ * @description Returns the process-local, live-only transcript preview frames currently known for an in-flight turn. This is an ephemeral recovery primitive for SSE reconnects and `live_sequence` gaps; it is not a durable event log replay endpoint and may return an empty frame list after process handoff or once the durable transcript has caught up.
786
1006
  */
787
- get: operations["streamSessionEvents"];
1007
+ get: operations["getSessionTurnLive"];
788
1008
  put?: never;
789
1009
  post?: never;
790
1010
  delete?: never;
@@ -793,7 +1013,7 @@ export interface paths {
793
1013
  patch?: never;
794
1014
  trace?: never;
795
1015
  };
796
- "/v1/projects/{project_handle}/sessions/{resource_id}/events": {
1016
+ "/v1/projects/{project_handle}/sessions/{session_id}/turns/{turn_id}/cancel": {
797
1017
  parameters: {
798
1018
  query?: never;
799
1019
  header?: never;
@@ -803,17 +1023,43 @@ export interface paths {
803
1023
  get?: never;
804
1024
  put?: never;
805
1025
  /**
806
- * Send input to a session
807
- * @description Appends one input message to a session and starts an agent invocation to respond, returning `202 Accepted` immediately with a durable `seq` cursor to stream from — the work continues even if the caller disconnects. A repeated send with the same `idempotency_key` returns the existing invocation's cursor without starting a second invocation or appending a second input message. Requires the `mobius.agent.invoke` permission (or the agent's own backing principal).
1026
+ * Cancel a session turn
1027
+ * @description Cancels one agent turn in the session if it is still active. The turn is marked cancelled and a terminal `turn.cancelled` event is emitted. Returns the updated turn. Requires the `mobius.agent.invoke` permission (or the agent's own backing principal).
1028
+ */
1029
+ post: operations["cancelTurn"];
1030
+ delete?: never;
1031
+ options?: never;
1032
+ head?: never;
1033
+ patch?: never;
1034
+ trace?: never;
1035
+ };
1036
+ "/v1/projects/{project_handle}/sessions/{session_id}/stream": {
1037
+ parameters: {
1038
+ query?: never;
1039
+ header?: never;
1040
+ path?: never;
1041
+ cookie?: never;
1042
+ };
1043
+ /**
1044
+ * Stream a session's activity
1045
+ * @description Opens a long-lived Server-Sent Events stream that is a live view over the session's one durable conversation log (its transcript messages). It is the single streaming surface for a session.
1046
+ *
1047
+ * The transcript messages with `sequence > after_sequence` are replayed first — covering any turn that committed between the client's last read and the stream open — then the in-flight turn is tailed live. Each committed message is framed as `event: <type>` (`user.message`, `agent.message`, or the non-terminal `compaction.created`) with a `data:` line carrying the message payload and an `id:` line carrying the message `sequence`. The cursor is therefore the same `sequence` the messages API uses: reconnect with `?after_sequence=N` (or the `Last-Event-ID` header) to resume exactly where you left off, with no separate event cursor.
1048
+ *
1049
+ * The stream follows the session's active turn and closes once the session is idle — no queued or running turn — after the active turn's committed rows and a terminal `turn.completed` / `turn.failed` / `turn.cancelled` frame have been delivered. A later turn is a new activity tail; open a new stream for it or use the streaming `POST .../turns` response.
1050
+ *
1051
+ * Live-only `generation.delta`, `session.message.preview`, `session.resync`, `tool.call`, and `tool.result` frames carry no `id:`, are interleaved best-effort for low-latency rendering, and are never persisted or replayed — on reconnect the durable message frames are the source of truth.
808
1052
  */
809
- post: operations["sendSessionEvents"];
1053
+ get: operations["streamSession"];
1054
+ put?: never;
1055
+ post?: never;
810
1056
  delete?: never;
811
1057
  options?: never;
812
1058
  head?: never;
813
1059
  patch?: never;
814
1060
  trace?: never;
815
1061
  };
816
- "/v1/projects/{project_handle}/sessions/{resource_id}/cancel": {
1062
+ "/v1/projects/{project_handle}/sessions/{session_id}/cancel": {
817
1063
  parameters: {
818
1064
  query?: never;
819
1065
  header?: never;
@@ -823,8 +1069,8 @@ export interface paths {
823
1069
  get?: never;
824
1070
  put?: never;
825
1071
  /**
826
- * Cancel a session's active invocation
827
- * @description Cancels the session's in-flight invocation. Queued and running grains for the session are marked cancelled and a terminal `session.status_cancelled` event is emitted. Returns the updated session. Requires the `mobius.agent.invoke` permission (or the agent's own backing principal).
1072
+ * Cancel the session's active turn
1073
+ * @description Cancels whichever turn is currently active in the session. Queued and running turns for the session are marked cancelled and a terminal `turn.cancelled` event is emitted. Returns the updated session. Requires the `mobius.agent.invoke` permission (or the agent's own backing principal).
828
1074
  */
829
1075
  post: operations["cancelSession"];
830
1076
  delete?: never;
@@ -833,6 +1079,26 @@ export interface paths {
833
1079
  patch?: never;
834
1080
  trace?: never;
835
1081
  };
1082
+ "/v1/projects/{project_handle}/sessions/{session_id}/compact": {
1083
+ parameters: {
1084
+ query?: never;
1085
+ header?: never;
1086
+ path?: never;
1087
+ cookie?: never;
1088
+ };
1089
+ get?: never;
1090
+ put?: never;
1091
+ /**
1092
+ * Compact the session transcript now
1093
+ * @description Forces a compaction pass immediately, summarizing every message appended since the last compaction regardless of the session's configured strategy or token threshold. This is the manual counterpart to the `auto` strategy and the way to drive the `manual` strategy. It is a no-op when there is nothing new to compact. Returns the updated session. Requires the `mobius.agent.invoke` permission (or the agent's own backing principal).
1094
+ */
1095
+ post: operations["compactSession"];
1096
+ delete?: never;
1097
+ options?: never;
1098
+ head?: never;
1099
+ patch?: never;
1100
+ trace?: never;
1101
+ };
836
1102
  "/v1/projects/{project_handle}/loops": {
837
1103
  parameters: {
838
1104
  query?: never;
@@ -1013,8 +1279,10 @@ export interface paths {
1013
1279
  cookie?: never;
1014
1280
  };
1015
1281
  /**
1016
- * List run events
1282
+ * List or stream run events
1017
1283
  * @description Returns the durable event log for one run, ordered by sequence number. Use `after_sequence` to poll only events recorded after the last sequence the client has observed.
1284
+ *
1285
+ * Content-negotiated: with `Accept: text/event-stream` this opens a long-lived Server-Sent Events stream instead of returning a JSON page: durable events are replayed from `after_sequence` and then tailed live, and the stream closes after the run is terminal and the server has drained all durable events committed before or with that terminal state. Reconnect with `?after_sequence=N` (or the `Last-Event-ID` header) to resume.
1018
1286
  */
1019
1287
  get: operations["listRunEvents"];
1020
1288
  put?: never;
@@ -1025,26 +1293,6 @@ export interface paths {
1025
1293
  patch?: never;
1026
1294
  trace?: never;
1027
1295
  };
1028
- "/v1/projects/{project_handle}/runs/{resource_id}/events.stream": {
1029
- parameters: {
1030
- query?: never;
1031
- header?: never;
1032
- path?: never;
1033
- cookie?: never;
1034
- };
1035
- /**
1036
- * Stream run events
1037
- * @description Long-lived SSE stream of run events ordered by sequence number. Each `data:` frame is a JSON-encoded `LoopRunEvent`. The stream terminates when the run reaches a terminal status. Clients that disconnect should reconnect using `?after_sequence=N` (or the SSE `Last-Event-ID` header set to the last sequence) to resume without gaps.
1038
- */
1039
- get: operations["streamRunEvents"];
1040
- put?: never;
1041
- post?: never;
1042
- delete?: never;
1043
- options?: never;
1044
- head?: never;
1045
- patch?: never;
1046
- trace?: never;
1047
- };
1048
1296
  "/v1/projects/{project_handle}/runs/{resource_id}/signals": {
1049
1297
  parameters: {
1050
1298
  query?: never;
@@ -1236,7 +1484,7 @@ export interface paths {
1236
1484
  head?: never;
1237
1485
  /**
1238
1486
  * Update table
1239
- * @description Updates table metadata or schema and resyncs declared indexes.
1487
+ * @description Updates table metadata or schema. A table's identity column, secondary key column, and required column settings are immutable after creation.
1240
1488
  */
1241
1489
  patch: operations["updateTable"];
1242
1490
  trace?: never;
@@ -1312,7 +1560,7 @@ export interface paths {
1312
1560
  put?: never;
1313
1561
  /**
1314
1562
  * Search rows
1315
- * @description Token-prefix search over row data within one table. Punctuation, including hyphens, splits terms: searching `from-ui` matches a value like `from-ui-insert` because the `from` and `ui` tokens match. Optional field filters use the same syntax as row queries and are applied before text search.
1563
+ * @description Search rows within one table using keyword, semantic, or hybrid mode. Keyword matching is token-prefix based. Punctuation, including hyphens, splits terms: searching `from-ui` matches a value like `from-ui-insert` because the `from` and `ui` tokens match. Optional field filters use the same syntax as row queries and are applied before search.
1316
1564
  */
1317
1565
  post: operations["searchTableRows"];
1318
1566
  delete?: never;
@@ -1511,6 +1759,44 @@ export interface components {
1511
1759
  };
1512
1760
  };
1513
1761
  };
1762
+ /** @description Event-type-specific payload for less common event types. */
1763
+ GenericEventPayload: {
1764
+ [key: string]: unknown;
1765
+ };
1766
+ /** @description Live-only token preview frame that can appear on run and session SSE streams. It is not persisted, does not carry an SSE `id:`, and cannot be replayed with `after_sequence` or `Last-Event-ID`. */
1767
+ GenerationDeltaFrame: {
1768
+ /** @enum {string} */
1769
+ event_type: "generation.delta";
1770
+ run_id?: string | null;
1771
+ session_id?: string | null;
1772
+ turn_id?: string | null;
1773
+ job_id?: string | null;
1774
+ tool_call_id?: string | null;
1775
+ /**
1776
+ * Format: int64
1777
+ * @description Monotonic per-turn sequence across all live-only session frames; use to detect dropped live frames.
1778
+ */
1779
+ live_sequence?: number | null;
1780
+ /**
1781
+ * Format: int64
1782
+ * @description Publisher-local ordering hint for deltas within a turn, not a replay cursor.
1783
+ */
1784
+ delta_sequence?: number | null;
1785
+ /**
1786
+ * Format: date-time
1787
+ * @description Server timestamp when this live preview frame was emitted.
1788
+ */
1789
+ emitted_at?: string | null;
1790
+ /** @description Token preview payload, usually `{ "text": "..." }`. */
1791
+ delta: {
1792
+ [key: string]: unknown;
1793
+ };
1794
+ worker_id?: string | null;
1795
+ /** @description Model producing the generation, e.g. `claude-sonnet-4-6`. */
1796
+ model?: string | null;
1797
+ } & {
1798
+ [key: string]: unknown;
1799
+ };
1514
1800
  /**
1515
1801
  * @description Optional namespace for named runtime resources. Omitted/null means the project/default scope; `owner` means names are unique within `(project, owned_by)`.
1516
1802
  * @enum {string}
@@ -1602,18 +1888,40 @@ export interface components {
1602
1888
  mode: components["schemas"]["AgentModelRouteMode"];
1603
1889
  /** @description Environment to use for worker-backed model calls. */
1604
1890
  environment_id?: string;
1605
- /** @description Provider or worker route name. */
1891
+ /** @description Provider id advertised by a local worker when `mode` is `worker`. */
1606
1892
  provider?: string;
1607
1893
  /** @description Model identifier to use for this route. */
1608
1894
  model?: string;
1609
- /** @description Worker queue for customer-worker model calls. */
1610
- queue?: string;
1611
1895
  };
1612
1896
  /**
1613
1897
  * @description Controls how granted actions are surfaced to the model in Mobius-hosted agent turns. `meta` (the default) groups related actions behind compact command routers, while `flat` exposes one tool per action.
1614
1898
  * @enum {string}
1615
1899
  */
1616
1900
  AgentToolPresentation: "flat" | "meta";
1901
+ /**
1902
+ * @description T-shirt size selecting when `auto` compaction triggers, smallest (`xs`, compact very early) to largest (`xl`, compact very late). The server maps each size to a token estimate; `sm` is the default.
1903
+ * @enum {string}
1904
+ */
1905
+ SessionCompactionThreshold: "xs" | "sm" | "md" | "lg" | "xl";
1906
+ /**
1907
+ * @description Controls how a session's transcript is automatically summarized as it grows. On create the supplied fields are merged over the owning agent's default policy and the server defaults; on update they patch the session's current policy. Omitted fields keep their resolved values.
1908
+ * @example {
1909
+ * "strategy": "auto",
1910
+ * "threshold": "sm",
1911
+ * "summary_model": "claude-haiku-4-5-20251001"
1912
+ * }
1913
+ */
1914
+ SessionCompactionPolicy: {
1915
+ /**
1916
+ * @description `auto` (default) compacts automatically when the transcript crosses the `threshold` size. `manual` only compacts on an explicit compact request. `disabled` (alias `none`) never compacts.
1917
+ * @enum {string}
1918
+ */
1919
+ strategy?: "auto" | "manual" | "disabled" | "none";
1920
+ /** @description Size at which `auto` compacts. A t-shirt size (`xs`–`xl`) rather than a raw token count, because the transcript size it gates on is an estimate. The size → token mapping is server-owned; `sm` is the default and the per-size token estimate is documented separately. */
1921
+ threshold?: components["schemas"]["SessionCompactionThreshold"];
1922
+ /** @description Model used to produce compaction summaries. */
1923
+ summary_model?: string;
1924
+ };
1617
1925
  /**
1618
1926
  * @description AI actor identity. An agent IS a principal (its permissions are role grants on that principal); agents are useful when loops need a named actor with instructions, configuration, and session presence.
1619
1927
  * @example {
@@ -1648,7 +1956,7 @@ export interface components {
1648
1956
  kind?: string;
1649
1957
  /** @description Display color for this agent in UI surfaces. One of the Mantine color palette keys (e.g. `indigo`, `teal`, `grape`); empty string falls back to a hash-derived color. */
1650
1958
  color?: string;
1651
- /** @description Model identifier for platform agents. Accepts any id returned by `GET /v1/projects/{project_handle}/catalog/models`, optionally `provider/`-prefixed (e.g. `xai/grok-4`); bare known ids (e.g. `claude-sonnet-4-6`) are auto-detected to their provider. Empty string falls back to the platform default. */
1959
+ /** @description Model identifier for platform agents. Accepts any id returned by `GET /v1/projects/{project_handle}/catalog/models` (including slash-bearing OpenRouter catalog ids), optionally `provider/`-prefixed (e.g. `xai/grok-4`); bare known ids (e.g. `claude-sonnet-4-6`) are auto-detected to their provider. Empty string falls back to the platform default. */
1652
1960
  model?: string;
1653
1961
  /** @description Default route for model calls made by this agent. */
1654
1962
  model_route?: components["schemas"]["AgentModelRoute"];
@@ -1661,6 +1969,8 @@ export interface components {
1661
1969
  * @description Execution timeout, in seconds, for a single turn of this platform agent. `0` (or omitted) uses the platform default (600s / 10 minutes). A loop step's own timeout overrides this for that step.
1662
1970
  */
1663
1971
  timeout_seconds?: number;
1972
+ /** @description Default session-compaction policy. New sessions opened against this agent inherit it (below server defaults, above explicit per-session overrides). Absent when the agent has no default. */
1973
+ compaction_policy?: components["schemas"]["SessionCompactionPolicy"];
1664
1974
  /** @description Current agent status: `active` or `inactive`. */
1665
1975
  status: components["schemas"]["AgentStatus"];
1666
1976
  /** @description Inbox address provisioned via POST /v1/projects/{project_handle}/agents/{resource_id}/inbox (opt-in; not created automatically at agent creation). The field is populated only after a successful provisioning call. Use this address to add the agent as a member on external platforms (Linear, GitHub, Slack, etc.) so the platform can deliver notifications to the agent. */
@@ -2263,7 +2573,7 @@ export interface components {
2263
2573
  };
2264
2574
  /** @description Available model choices for one provider. */
2265
2575
  ModelProviderGroup: {
2266
- /** @description Canonical provider id (`anthropic`, `openai`, `gemini`, `xai`). */
2576
+ /** @description Canonical provider id (`anthropic`, `openai`, `openrouter`, `gemini`, `xai`). */
2267
2577
  provider: string;
2268
2578
  /** @description Human-readable provider label. */
2269
2579
  display_name: string;
@@ -2277,7 +2587,7 @@ export interface components {
2277
2587
  };
2278
2588
  /** @description One selectable LLM model in the project model catalog. */
2279
2589
  ModelOption: {
2280
- /** @description Bare model id assigned to an agent's `model` field. */
2590
+ /** @description Model id assigned to an agent's `model` field. Some catalog ids, such as OpenRouter slugs, include `/`. */
2281
2591
  id: string;
2282
2592
  /** @description Canonical provider id this model belongs to. */
2283
2593
  provider: string;
@@ -2288,13 +2598,34 @@ export interface components {
2288
2598
  /** @description Whether this is the suggested default for its provider. */
2289
2599
  recommended?: boolean;
2290
2600
  };
2291
- /**
2292
- * @description Backing provider: `sprites`, `cloudflare_containers`, or `worker`.
2293
- * @enum {string}
2294
- */
2295
- EnvironmentProvider: "sprites" | "cloudflare_containers" | "worker";
2296
- /**
2297
- * @description Providers the control plane can provision on demand: `sprites` or `cloudflare_containers`. Excludes `worker`: worker-provided environments are registered out-of-band via the attach endpoint and are never provisioned through create/acquire.
2601
+ /** @description Local LLM models advertised by online project workers. */
2602
+ WorkerModelCatalogResponse: {
2603
+ items: components["schemas"]["WorkerModelCatalogItem"][];
2604
+ };
2605
+ /** @description One exact local model route available through online workers. */
2606
+ WorkerModelCatalogItem: {
2607
+ /** @description Worker-advertised provider id, matched exactly by `model_route.provider`. */
2608
+ provider: string;
2609
+ /** @description Worker-advertised model id, matched exactly by `model_route.model`. */
2610
+ model: string;
2611
+ /** @description Number of online workers currently advertising this exact provider/model pair. */
2612
+ worker_count: number;
2613
+ route: components["schemas"]["WorkerModelRoute"];
2614
+ };
2615
+ /** @description Assign this route to use a local worker model. */
2616
+ WorkerModelRoute: {
2617
+ /** @enum {string} */
2618
+ mode: "worker";
2619
+ provider: string;
2620
+ model: string;
2621
+ };
2622
+ /**
2623
+ * @description Backing provider: `sprites`, `cloudflare_containers`, or `worker`.
2624
+ * @enum {string}
2625
+ */
2626
+ EnvironmentProvider: "sprites" | "cloudflare_containers" | "worker";
2627
+ /**
2628
+ * @description Providers the control plane can provision on demand: `sprites` or `cloudflare_containers`. Excludes `worker`: worker-provided environments are registered out-of-band via the attach endpoint and are never provisioned through create/acquire.
2298
2629
  * @enum {string}
2299
2630
  */
2300
2631
  ProvisionEnvironmentProvider: "sprites" | "cloudflare_containers";
@@ -2499,7 +2830,7 @@ export interface components {
2499
2830
  agent_turn_id?: string;
2500
2831
  session_id?: string;
2501
2832
  tool_call_id?: string;
2502
- /** @description Worker-specific action or generation payload. */
2833
+ /** @description Worker-specific action or generation payload. For `kind=llm_generation`, this object follows `WorkerSocketLLMGenerationSpec`. */
2503
2834
  spec: {
2504
2835
  [key: string]: unknown;
2505
2836
  };
@@ -2546,6 +2877,7 @@ export interface components {
2546
2877
  * @enum {string}
2547
2878
  */
2548
2879
  status: "completed" | "failed" | "cancelled";
2880
+ /** @description Terminal result payload. For `llm_generation` jobs, this object must follow `WorkerSocketLLMGenerationResult`; plain text fallback results are not accepted. */
2549
2881
  result?: {
2550
2882
  [key: string]: unknown;
2551
2883
  };
@@ -2844,6 +3176,362 @@ export interface components {
2844
3176
  /** @description Round-trip latency in milliseconds. */
2845
3177
  latency_ms?: number;
2846
3178
  };
3179
+ /**
3180
+ * @description Declarative UI/input primitive for collecting the response. This is a portable rendering contract, not executable code. Values are `confirm`, `select`, `multi_select`, and `input`.
3181
+ * @enum {string}
3182
+ */
3183
+ InteractionMode: "confirm" | "select" | "multi_select" | "input";
3184
+ /** @description Selectable option for `select` and `multi_select` modes. */
3185
+ InteractionOption: {
3186
+ /** @description Machine-readable value submitted when this option is chosen. */
3187
+ value: string;
3188
+ /** @description Human-readable label displayed for this option. */
3189
+ label: string;
3190
+ /** @description Optional additional context shown beneath the label. */
3191
+ description?: string;
3192
+ };
3193
+ /**
3194
+ * @description Declarative dialog contract for rendering and validating an interaction. Used at both authoring time (inside a loop definition) and runtime (persisted on an interaction). Protocol kind is decoupled from input shape: each kind declares which spec modes are *allowed*, not which is *implied*. An approval may now legitimately use `select` mode (approve/deny/defer), for example.
3195
+ *
3196
+ * Allowed combinations:
3197
+ * * `approval` → `confirm`, `select`
3198
+ * * `review` → `select`, `input`
3199
+ * * `request` → `select`, `multi_select`, `input`
3200
+ */
3201
+ InteractionSpec: {
3202
+ /** @description UI/input mode used to render and validate the response. */
3203
+ mode: components["schemas"]["InteractionMode"];
3204
+ /** @description Required for `select` and `multi_select` modes. */
3205
+ options?: components["schemas"]["InteractionOption"][];
3206
+ /** @description Default selected option for `select` mode. */
3207
+ default_value?: string;
3208
+ /** @description Default selected options for `multi_select` mode. */
3209
+ default_values?: string[];
3210
+ /** @description Initial text value for `input` mode. */
3211
+ default_text?: string;
3212
+ /** @description Initial yes/no value for `confirm` mode. */
3213
+ default_confirmed?: boolean;
3214
+ /** @description Hint text shown for `input` mode. */
3215
+ placeholder?: string;
3216
+ /** @description When true, render `input` mode as a multiline text area. */
3217
+ multiline?: boolean;
3218
+ };
3219
+ /**
3220
+ * @description Protocol kind of the interaction. Launch keeps this intentionally
3221
+ * small:
3222
+ * * `request_information` — a data-collection protocol with structured
3223
+ * or free-form input
3224
+ * * `request_approval` — a decision protocol (yes/no, optionally
3225
+ * yes/no/defer)
3226
+ * * `request_review` — a judgment protocol that evaluates supplied
3227
+ * material
3228
+ * @enum {string}
3229
+ */
3230
+ InteractionKind: "request_information" | "request_approval" | "request_review";
3231
+ /** @description Free-form JSON payload. Used both for responder-supplied values and for policy-derived values (e.g. `Interaction.outcome`, `ResolutionPolicy.proposal`); each consumer documents which. */
3232
+ InteractionValue: ({
3233
+ [key: string]: unknown;
3234
+ } | null) | unknown[] | string | number | boolean;
3235
+ /** @description Identifies the principal who answered an interaction. Agents answer through their agent principal ID. */
3236
+ InteractionResponder: {
3237
+ /** @description Responder user ID. */
3238
+ user_id: string;
3239
+ };
3240
+ /** @description Pointer to the work item, artifact, external ticket, or Mobius entity this interaction is about. */
3241
+ InteractionReference: {
3242
+ /** @enum {string} */
3243
+ kind: "external_url" | "mobius_entity";
3244
+ /**
3245
+ * Format: uri
3246
+ * @description Required when kind is `external_url`.
3247
+ */
3248
+ url?: string;
3249
+ /** @description Required when kind is `mobius_entity`. */
3250
+ entity_type?: string;
3251
+ /** @description Required when kind is `mobius_entity`. */
3252
+ entity_id?: string;
3253
+ /** @description Relationship such as `subject`, `evidence`, or `related`. */
3254
+ relation?: string;
3255
+ /** @description User-facing label for display. */
3256
+ label?: string;
3257
+ };
3258
+ /** @description Optional per-interaction delivery override. When absent, each participant is notified via the app inbox only. */
3259
+ Delivery: {
3260
+ channels: components["schemas"]["DeliveryChannel"][];
3261
+ };
3262
+ /** @description A single delivery destination. `inbox_only` carries no payload; `email` requires the `email` variant. */
3263
+ DeliveryChannel: {
3264
+ /** @enum {string} */
3265
+ kind: "inbox_only" | "email";
3266
+ /** @description Email delivery payload when `kind=email`; null for inbox-only delivery. */
3267
+ email?: components["schemas"]["EmailDelivery"] | null;
3268
+ };
3269
+ EmailDelivery: {
3270
+ to: string[];
3271
+ };
3272
+ /** @description Polymorphic identifier of what is waiting on this interaction's resolution. Replaces the previously special-cased `run_id` + `signal_name` pair. When `kind=run`, the legacy fields are also populated for compatibility. `http_subscriber` requires `secret_ref` and enqueues a durable callback dispatch to `callback_url` when the interaction resolves; the canonical string `v1.{delivery_id}.{unix_timestamp}.{raw_body}` is signed with HMAC-SHA256 against the resolved project signing key and the signed dispatch carries `X-Mobius-Signature`, `X-Mobius-Secret-Ref`, `X-Mobius-Secret-Version`, and `X-Mobius-Timestamp`. Signed dispatches also carry `X-Mobius-Signature-Version: v1`. Every durable dispatch also carries the stable outbox row id in `X-Mobius-Delivery-Id` and `Idempotency-Key`; retries reuse the same value. Verifiers should recompute the signature over the exact raw body, reject stale timestamps (for example, older than five minutes), deduplicate by delivery id, and check the signing headers. */
3273
+ Consumer: {
3274
+ /** @enum {string} */
3275
+ kind: "run" | "agent_tool" | "http_subscriber" | "none";
3276
+ /** @description Run resume target when `kind=run`; null for other consumer kinds. */
3277
+ run?: components["schemas"]["RunConsumer"] | null;
3278
+ /** @description Agent tool continuation target when `kind=agent_tool`; null for other consumer kinds. */
3279
+ agent_tool?: components["schemas"]["AgentToolConsumer"] | null;
3280
+ /** @description HTTP callback target when `kind=http_subscriber`; null for other consumer kinds. */
3281
+ http_subscriber?: components["schemas"]["HttpSubscriberConsumer"] | null;
3282
+ };
3283
+ RunConsumer: {
3284
+ run_id: string;
3285
+ signal_name: string;
3286
+ };
3287
+ AgentToolConsumer: {
3288
+ invocation_id: string;
3289
+ tool_call_id: string;
3290
+ };
3291
+ HttpSubscriberConsumer: {
3292
+ /**
3293
+ * Format: uri
3294
+ * @description Absolute http(s) URL the server POSTs to when the interaction resolves. The body is a JSON object with the interaction id, kind, status, outcome value, comment, responder, and `resolved_by`. Delivery is enqueued as a `source_events` dispatch so the worker can retry failed attempts instead of dropping them inline with interaction resolution.
3295
+ */
3296
+ callback_url: string;
3297
+ /** @description Required reference to a project secret used to sign deliveries with HMAC-SHA256 over the canonical string `v1.{delivery_id}.{unix_timestamp}.{raw_body}`, where `delivery_id` is the value in `X-Mobius-Delivery-Id` and `raw_body` is the exact callback request body bytes. Accepts `<name>` for the latest enabled version or `<name>:<version>` to pin a specific positive-integer version. The plaintext signing bytes are taken from the secret's `signing_key_b64` key, which must base64-decode to exactly 32 bytes. The hex signature is forwarded as `X-Mobius-Signature: sha256=<hex>` alongside `X-Mobius-Secret-Ref`, `X-Mobius-Secret-Version`, `X-Mobius-Signature-Version: v1`, and a unix `X-Mobius-Timestamp`. Consumers should reject stale timestamps (for example, older than five minutes). When `secret_ref` resolution fails the dispatch is retried by the event processor rather than sent unsigned. */
3298
+ secret_ref: string;
3299
+ };
3300
+ /** @description One persisted answer artifact for an interaction. The response that triggered resolution is referenced from `Interaction.resolving_response_id`. */
3301
+ InteractionResponse: {
3302
+ /** @description Unique identifier for this response. */
3303
+ id: string;
3304
+ /** @description ID of the interaction this response belongs to. */
3305
+ interaction_id: string;
3306
+ /**
3307
+ * @description Answer response.
3308
+ * @enum {string}
3309
+ */
3310
+ response_kind: "response";
3311
+ /**
3312
+ * @description Lifecycle state for this response row.
3313
+ * @enum {string}
3314
+ */
3315
+ state: "submitted";
3316
+ /** @description User ID that submitted this response. */
3317
+ responder_user_id: string;
3318
+ /** @description JSON value supplied by this participant. */
3319
+ value: components["schemas"]["InteractionValue"];
3320
+ /** @description Optional free-text comment from this responder. */
3321
+ comment?: string | null;
3322
+ /**
3323
+ * Format: date-time
3324
+ * @description Timestamp when this response was submitted.
3325
+ */
3326
+ responded_at: string;
3327
+ /** @description Reserved for future retry-aware response flows; null until attempts are tracked. */
3328
+ attempt?: number | null;
3329
+ /** Format: date-time */
3330
+ created_at: string;
3331
+ /** Format: date-time */
3332
+ updated_at: string;
3333
+ };
3334
+ /** @description Declarative resolution rule attached to an Interaction. Determines how participant responses become a final outcome. */
3335
+ ResolutionPolicy: {
3336
+ /**
3337
+ * @description Resolution rule. `any_of` resolves on the first acceptable response. `all_of` waits for every assigned participant. `quorum` resolves once `threshold` distinct participants respond.
3338
+ * @enum {string}
3339
+ */
3340
+ type: "any_of" | "all_of" | "quorum";
3341
+ /** @description Required when `type` is `quorum`. Number of distinct eligible participants that must respond before the interaction resolves. Must be `>= 1` and `<=` the participant count. */
3342
+ threshold?: number;
3343
+ };
3344
+ /** @description Human or agent interaction request and its current response state. */
3345
+ Interaction: {
3346
+ /** @description Unique identifier for this interaction. */
3347
+ id: string;
3348
+ /** @description Originating loop run when the interaction is run-backed. */
3349
+ run_id?: string | null;
3350
+ /** @description Signal name used to resume the originating run when run-backed. */
3351
+ signal_name?: string | null;
3352
+ /** @description Canonical principal ID of the human or agent that created the interaction; null for legacy/system-created rows. */
3353
+ created_by?: string | null;
3354
+ /** @description Protocol kind of the interaction. */
3355
+ kind: components["schemas"]["InteractionKind"];
3356
+ /**
3357
+ * @description Current status of the interaction: pending, completed, expired, or cancelled.
3358
+ * @enum {string}
3359
+ */
3360
+ status: "pending" | "completed" | "expired" | "cancelled";
3361
+ /** @description Short non-empty title shown to the responder. */
3362
+ title: string;
3363
+ /** @description Optional longer responder-facing detail or instructions. */
3364
+ description?: string | null;
3365
+ /** @description Primary work item or artifact the interaction is about; null when no subject was supplied. */
3366
+ subject?: components["schemas"]["InteractionReference"] | null;
3367
+ /** @description Supporting links and related entities. */
3368
+ references?: components["schemas"]["InteractionReference"][];
3369
+ /** @description Additional key-value context surfaced in the UI alongside the title and description when supplied. */
3370
+ context?: {
3371
+ [key: string]: unknown;
3372
+ } | null;
3373
+ tags?: components["schemas"]["TagMap"];
3374
+ /** @description Free-form structured metadata attached to the interaction; null when no metadata is attached. */
3375
+ properties?: {
3376
+ [key: string]: unknown;
3377
+ } | null;
3378
+ /** @description Response controls and validation rules rendered to the recipient. */
3379
+ spec?: components["schemas"]["InteractionSpec"];
3380
+ /** @description Resolved user IDs targeted by the interaction. */
3381
+ target_user_ids: string[];
3382
+ /** @description User or agent that completed the interaction; null until completion. */
3383
+ responder?: components["schemas"]["InteractionResponder"] | null;
3384
+ /** @description ID of the response that triggered resolution. Null while the interaction is pending, cancelled, or expired. Look up the response in `responses` for the full payload. */
3385
+ resolving_response_id?: string | null;
3386
+ /** @description All response artifacts recorded against this interaction in arrival order. */
3387
+ responses?: components["schemas"]["InteractionResponse"][];
3388
+ /**
3389
+ * Format: date-time
3390
+ * @description Timestamp when this interaction expires if not responded to.
3391
+ */
3392
+ expires_at?: string | null;
3393
+ /**
3394
+ * Format: date-time
3395
+ * @description Timestamp when the interaction received a terminal response.
3396
+ */
3397
+ completed_at?: string | null;
3398
+ /**
3399
+ * Format: date-time
3400
+ * @description Timestamp when this interaction was created.
3401
+ */
3402
+ created_at: string;
3403
+ /**
3404
+ * Format: date-time
3405
+ * @description Timestamp when this interaction was last updated.
3406
+ */
3407
+ updated_at: string;
3408
+ /** @description When true, all target users must respond before completion. */
3409
+ require_all?: boolean;
3410
+ /** @description Declarative resolution rule attached at creation time. Legacy `require_all` inputs are synthesized into an equivalent policy at create time when present. Newer rows typically include this field; nullability covers historical rows and callers that omit it. */
3411
+ resolution_policy?: components["schemas"]["ResolutionPolicy"] | null;
3412
+ /** @description Polymorphic identifier of what is waiting on this interaction's resolution. Replaces the special-cased `run_id`/`signal_name` pair; the latter remain populated when `consumer.kind=run`. */
3413
+ consumer?: components["schemas"]["Consumer"] | null;
3414
+ /** @description Optional per-interaction delivery override. When absent, the dispatcher delivers to the app inbox only. */
3415
+ delivery?: components["schemas"]["Delivery"] | null;
3416
+ /** @description Final outcome selected by the resolution policy. Omitted while the interaction is still pending. */
3417
+ outcome?: components["schemas"]["InteractionValue"];
3418
+ /** @description Short audit string identifying which policy rule fired. Null until the interaction reaches a resolved state. */
3419
+ resolved_by?: string | null;
3420
+ /** @description Reason recorded when the interaction was cancelled. */
3421
+ cancel_reason?: string | null;
3422
+ };
3423
+ InteractionListResponse: {
3424
+ /** @description The list of results for this page. */
3425
+ items: components["schemas"]["Interaction"][];
3426
+ /** @description Whether additional pages are available. */
3427
+ has_more?: boolean;
3428
+ /** @description Opaque cursor to pass as `cursor` on the next request. Absent when `has_more` is false. */
3429
+ next_cursor?: string;
3430
+ };
3431
+ /** @description Creates an interaction directly. Use the standalone variant with no loop-run side effect, or the run-backed variant that requires both `run_id` and `signal_name` so completion can resume the run. For worker/job usage, prefer the job-scoped route so the server can derive the owning run from the claimed job context. */
3432
+ CreateInteractionRequest: components["schemas"]["CreateStandaloneInteractionRequest"] | components["schemas"]["CreateRunBackedInteractionRequest"];
3433
+ /** @description Creates a standalone interaction. Completion records the response but does not deliver a loop signal. */
3434
+ CreateStandaloneInteractionRequest: {
3435
+ /** @description Resolved user IDs to target directly. Agents use their agent principal IDs. */
3436
+ target_user_ids?: string[];
3437
+ /** @description Protocol kind. */
3438
+ kind: components["schemas"]["InteractionKind"];
3439
+ /** @description Short non-empty title shown to the responder. */
3440
+ title: string;
3441
+ /** @description Optional longer responder-facing detail or instructions. */
3442
+ description?: string;
3443
+ /** @description Primary work item or artifact the interaction is about. */
3444
+ subject?: components["schemas"]["InteractionReference"];
3445
+ /** @description Supporting links and related entities. */
3446
+ references?: components["schemas"]["InteractionReference"][];
3447
+ /** @description Additional key-value context surfaced in the UI alongside the title and description. */
3448
+ context?: {
3449
+ [key: string]: unknown;
3450
+ };
3451
+ tags?: components["schemas"]["TagMap"];
3452
+ /** @description Free-form structured metadata to attach to the interaction. */
3453
+ properties?: {
3454
+ [key: string]: unknown;
3455
+ };
3456
+ /** @description Response controls and validation rules rendered to the recipient. */
3457
+ spec?: components["schemas"]["InteractionSpec"];
3458
+ /** @description When true, all target users must respond before the interaction is considered complete. Defaults to false when omitted. Mutually exclusive with `resolution_policy`; prefer the policy form for new code. */
3459
+ require_all?: boolean;
3460
+ /** @description Declarative resolution rule. When supplied the policy evaluator drives completion. */
3461
+ resolution_policy?: components["schemas"]["ResolutionPolicy"];
3462
+ /** @description Polymorphic identifier of what is waiting on this interaction's resolution. When omitted on a run-backed create request, the server derives a `kind=run` consumer from `run_id` and `signal_name`. */
3463
+ consumer?: components["schemas"]["Consumer"];
3464
+ /** @description Optional per-interaction delivery override. */
3465
+ delivery?: components["schemas"]["Delivery"];
3466
+ /**
3467
+ * Format: date-time
3468
+ * @description Timestamp after which this interaction expires if not responded to.
3469
+ */
3470
+ expires_at?: string;
3471
+ };
3472
+ /**
3473
+ * @description Creates an interaction linked to a loop run for audit. The server derives a `kind=run` consumer from `run_id` and `signal_name`.
3474
+ *
3475
+ * This is an audit-only link: creating an interaction here does not suspend the run, and resolving it does not by itself resume a run. A run only blocks on, and resumes from, human input when the loop definition declares an interaction step — that step creates the interaction and registers the matching wait atomically. Use this endpoint to record a human decision against a run, not to drive run control flow.
3476
+ */
3477
+ CreateRunBackedInteractionRequest: {
3478
+ /** @description ID of the loop run to resume when this interaction is completed. */
3479
+ run_id: string;
3480
+ /** @description Signal name the interaction will complete against when run-backed. */
3481
+ signal_name: string;
3482
+ /** @description Resolved user IDs to target directly. Agents use their agent principal IDs. */
3483
+ target_user_ids?: string[];
3484
+ /** @description Protocol kind. */
3485
+ kind: components["schemas"]["InteractionKind"];
3486
+ /** @description Short non-empty title shown to the responder. */
3487
+ title: string;
3488
+ /** @description Optional longer responder-facing detail or instructions. */
3489
+ description?: string;
3490
+ /** @description Primary work item or artifact the interaction is about. */
3491
+ subject?: components["schemas"]["InteractionReference"];
3492
+ /** @description Supporting links and related entities. */
3493
+ references?: components["schemas"]["InteractionReference"][];
3494
+ /** @description Additional key-value context surfaced in the UI alongside the title and description. */
3495
+ context?: {
3496
+ [key: string]: unknown;
3497
+ };
3498
+ tags?: components["schemas"]["TagMap"];
3499
+ /** @description Free-form structured metadata to attach to the interaction. */
3500
+ properties?: {
3501
+ [key: string]: unknown;
3502
+ };
3503
+ /** @description Response controls and validation rules rendered to the recipient. */
3504
+ spec?: components["schemas"]["InteractionSpec"];
3505
+ /** @description When true, all target users must respond before the interaction is considered complete. Defaults to false when omitted. Mutually exclusive with `resolution_policy`; prefer the policy form for new code. */
3506
+ require_all?: boolean;
3507
+ /** @description Declarative resolution rule. When supplied the policy evaluator drives completion. */
3508
+ resolution_policy?: components["schemas"]["ResolutionPolicy"];
3509
+ /** @description Polymorphic identifier of what is waiting on this interaction's resolution. When omitted on a run-backed create request, the server derives a `kind=run` consumer from `run_id` and `signal_name`. */
3510
+ consumer?: components["schemas"]["Consumer"];
3511
+ /** @description Optional per-interaction delivery override. */
3512
+ delivery?: components["schemas"]["Delivery"];
3513
+ /**
3514
+ * Format: date-time
3515
+ * @description Timestamp after which this interaction expires if not responded to.
3516
+ */
3517
+ expires_at?: string;
3518
+ };
3519
+ RespondToInteractionRequest: {
3520
+ /**
3521
+ * @description Operation to perform through the canonical response endpoint. `submit` answers the interaction.
3522
+ * @enum {string}
3523
+ */
3524
+ action?: "submit";
3525
+ /** @description JSON value supplied by the responder. Required for `submit`. */
3526
+ value?: components["schemas"]["InteractionValue"];
3527
+ /** @description Optional free-text comment accompanying the action. Available on every interaction kind and never gated by the spec; the responder may always attach reasoning, caveats, or follow-up notes alongside `value`. */
3528
+ comment?: string;
3529
+ };
3530
+ /** @description Optional payload accompanying a cancel request. The reason is recorded on the interaction and forwarded in the cancellation signal so loops can route to a fallback. */
3531
+ CancelInteractionRequest: {
3532
+ /** @description Free-text reason recorded on the interaction. */
3533
+ reason?: string;
3534
+ };
2847
3535
  /**
2848
3536
  * @description Direct-message access policy: `open`, `allowlist`, or `disabled`.
2849
3537
  * @enum {string}
@@ -2887,6 +3575,8 @@ export interface components {
2887
3575
  reply_mode: components["schemas"]["AgentMessagingReplyMode"];
2888
3576
  /** @description Optional model route override used for replies through this binding. */
2889
3577
  model_route?: components["schemas"]["AgentModelRoute"];
3578
+ /** @description Optional compaction policy applied to sessions created from this binding. Unset inherits the agent default. */
3579
+ compaction_policy?: components["schemas"]["SessionCompactionPolicy"];
2890
3580
  /**
2891
3581
  * Format: date-time
2892
3582
  * @description Time the binding was created.
@@ -2938,6 +3628,8 @@ export interface components {
2938
3628
  reply_mode?: components["schemas"]["AgentMessagingReplyMode"];
2939
3629
  /** @description Optional model route override used for replies through this binding. */
2940
3630
  model_route?: components["schemas"]["AgentModelRoute"];
3631
+ /** @description Optional compaction policy applied to sessions created from this binding. Unset inherits the agent default. */
3632
+ compaction_policy?: components["schemas"]["SessionCompactionPolicy"];
2941
3633
  };
2942
3634
  AgentMessagingBindingListResponse: {
2943
3635
  /** @description Messaging bindings configured for this agent. */
@@ -3069,7 +3761,7 @@ export interface components {
3069
3761
  kind?: string;
3070
3762
  /** @description Display color for this agent (Mantine palette key, e.g. `indigo`). Optional; empty falls back to a hash-derived color. */
3071
3763
  color?: string;
3072
- /** @description Model identifier for platform agents. Any id from `GET /v1/projects/{project_handle}/catalog/models`, optionally `provider/`-prefixed (e.g. `xai/grok-4`); bare known ids (e.g. `claude-sonnet-4-6`) are auto-detected. Empty falls back to the platform default. */
3764
+ /** @description Model identifier for platform agents. Any id from `GET /v1/projects/{project_handle}/catalog/models`, including slash-bearing OpenRouter catalog ids, or an optionally `provider/`-prefixed id (e.g. `xai/grok-4`); bare known ids (e.g. `claude-sonnet-4-6`) are auto-detected. Empty falls back to the platform default. */
3073
3765
  model?: string;
3074
3766
  /** @description Default route for model calls made by this agent. */
3075
3767
  model_route?: components["schemas"]["AgentModelRoute"];
@@ -3082,6 +3774,8 @@ export interface components {
3082
3774
  * @description Per-turn execution timeout in seconds for this platform agent. Omit or `0` to use the platform default (600s / 10 minutes); a loop step's own timeout overrides it for that step.
3083
3775
  */
3084
3776
  timeout_seconds?: number;
3777
+ /** @description Default session-compaction policy new sessions inherit from this agent. */
3778
+ compaction_policy?: components["schemas"]["SessionCompactionPolicy"];
3085
3779
  /** @description Initial labels used for filtering, ownership, or automation. */
3086
3780
  tags?: components["schemas"]["TagMap"];
3087
3781
  };
@@ -3095,7 +3789,7 @@ export interface components {
3095
3789
  kind?: string;
3096
3790
  /** @description Replacement display color (Mantine palette key, e.g. `indigo`). Pass empty string to clear and fall back to a hash-derived color. */
3097
3791
  color?: string;
3098
- /** @description Replacement model identifier for platform agents (any id from `GET /v1/projects/{project_handle}/catalog/models`, optionally `provider/`-prefixed). */
3792
+ /** @description Replacement model identifier for platform agents (any id from `GET /v1/projects/{project_handle}/catalog/models`, including slash-bearing OpenRouter catalog ids, or an optionally `provider/`-prefixed id). */
3099
3793
  model?: string;
3100
3794
  /** @description Replacement default route for model calls made by this agent. */
3101
3795
  model_route?: components["schemas"]["AgentModelRoute"];
@@ -3113,14 +3807,156 @@ export interface components {
3113
3807
  * @enum {string}
3114
3808
  */
3115
3809
  status?: "active" | "inactive";
3810
+ /** @description Replacement default session-compaction policy. Send an empty object to clear the default and fall back to server defaults. */
3811
+ compaction_policy?: components["schemas"]["SessionCompactionPolicy"];
3116
3812
  /** @description Replacement labels; send an empty object to clear all tags. */
3117
3813
  tags?: components["schemas"]["TagMap"];
3118
3814
  };
3815
+ /**
3816
+ * @description Classifies a memory entry. Kinds carry different retention and compaction semantics: facts and preferences are durable, episodes are the primary input to compaction, and a summary is the compacted product of other entries.
3817
+ * @enum {string}
3818
+ */
3819
+ MemoryKind: "fact" | "preference" | "episode" | "summary";
3820
+ /** @description Summary of an agent's private memory: how many entries it holds, a breakdown by kind, and when it last changed. */
3821
+ AgentMemory: {
3822
+ /** @description The agent that owns this memory. */
3823
+ agent_id: string;
3824
+ /** @description Number of entries currently held. */
3825
+ entry_count: number;
3826
+ /** @description Entry counts keyed by memory kind. */
3827
+ counts_by_kind: {
3828
+ [key: string]: number;
3829
+ };
3830
+ /**
3831
+ * Format: date-time
3832
+ * @description When any entry was last changed, when there are entries.
3833
+ */
3834
+ updated_at?: string;
3835
+ };
3836
+ /** @description A single durable memory in an agent's private memory, identified by a stable key the agent chose. */
3837
+ AgentMemoryEntry: {
3838
+ /** @description Stable identifier the agent chose for this memory. */
3839
+ key: string;
3840
+ kind: components["schemas"]["MemoryKind"];
3841
+ /** @description Short one-line summary shown in the agent's memory index. */
3842
+ summary?: string;
3843
+ /** @description The remembered content. */
3844
+ content?: string;
3845
+ /** @description Structured metadata stored alongside the memory (provenance, tags, …). */
3846
+ metadata?: {
3847
+ [key: string]: unknown;
3848
+ };
3849
+ /** @description Rank from 0 to 100; higher ranks sooner in recall and is kept longer under the memory cap. */
3850
+ importance: number;
3851
+ /** @description Whether the entry is guaranteed in the memory index and exempt from the memory cap. */
3852
+ pinned: boolean;
3853
+ /** @description Identifier of the loop run that last wrote this memory, when known. */
3854
+ source_run_id?: string;
3855
+ /** @description Identifier of this memory entry. */
3856
+ entry_id: string;
3857
+ /** @description Monotonic version, incremented on each update. */
3858
+ version: number;
3859
+ /**
3860
+ * Format: date-time
3861
+ * @description When the entry was first remembered.
3862
+ */
3863
+ created_at: string;
3864
+ /**
3865
+ * Format: date-time
3866
+ * @description When the entry was last updated.
3867
+ */
3868
+ updated_at: string;
3869
+ };
3870
+ AgentMemoryEntryListResponse: {
3871
+ /** @description Memory entries in the current page. */
3872
+ items: components["schemas"]["AgentMemoryEntry"][];
3873
+ /** @description Whether more entries follow this page. */
3874
+ has_more: boolean;
3875
+ /** @description Cursor to fetch the next page, when has_more is true. */
3876
+ next_cursor?: string;
3877
+ };
3878
+ /** @description Content for a memory entry. The key comes from the path. */
3879
+ PutAgentMemoryEntryRequest: {
3880
+ /** @description The content to remember. */
3881
+ content?: string;
3882
+ /** @description Optional short one-line summary (≤140 chars) shown in the memory index. */
3883
+ summary?: string;
3884
+ kind?: components["schemas"]["MemoryKind"];
3885
+ /** @description Optional structured metadata to store alongside the memory. */
3886
+ metadata?: {
3887
+ [key: string]: unknown;
3888
+ };
3889
+ /** @description Optional importance from 0 to 100; higher is kept longer during compaction. */
3890
+ importance?: number;
3891
+ /** @description Pin to exempt this memory from compaction. */
3892
+ pinned?: boolean;
3893
+ };
3119
3894
  /**
3120
3895
  * @description Message role: `system`, `user`, `assistant`, `tool`, or `compaction`.
3121
3896
  * @enum {string}
3122
3897
  */
3123
3898
  SessionMessageRole: "system" | "user" | "assistant" | "tool" | "compaction";
3899
+ /** @description Assistant or caller text. */
3900
+ SessionTextBlock: {
3901
+ /** @enum {string} */
3902
+ type: "text";
3903
+ /** @description The text content. */
3904
+ text: string;
3905
+ } & {
3906
+ [key: string]: unknown;
3907
+ };
3908
+ /** @description An extended-reasoning block produced by a reasoning model. */
3909
+ SessionThinkingBlock: {
3910
+ /** @enum {string} */
3911
+ type: "thinking";
3912
+ /** @description The reasoning text. */
3913
+ thinking: string;
3914
+ /** @description Provider signature for the reasoning block, when present. */
3915
+ signature?: string;
3916
+ } & {
3917
+ [key: string]: unknown;
3918
+ };
3919
+ /** @description A tool call the agent issued. */
3920
+ SessionToolUseBlock: {
3921
+ /** @enum {string} */
3922
+ type: "tool_use";
3923
+ /** @description Tool-call id; the matching tool_result references it. */
3924
+ id: string;
3925
+ /** @description Tool name. */
3926
+ name: string;
3927
+ /** @description Tool input arguments. */
3928
+ input: {
3929
+ [key: string]: unknown;
3930
+ };
3931
+ } & {
3932
+ [key: string]: unknown;
3933
+ };
3934
+ /** @description One content block in a session transcript message — the canonical, frozen JSON shape Mobius persists and replays, discriminated by `type`. The variants are `text`, `thinking`, `tool_use`, `tool_result`, and `image`. Each variant permits provider-specific extra fields (citations, signatures, cache hints, and the like), and unknown fields are preserved rather than rejected, so the transcript round-trips losslessly across providers. */
3935
+ SessionContentBlock: components["schemas"]["SessionTextBlock"] | components["schemas"]["SessionThinkingBlock"] | components["schemas"]["SessionToolUseBlock"] | components["schemas"]["SessionToolResultBlock"] | components["schemas"]["SessionImageBlock"];
3936
+ /** @description The result of a tool call. */
3937
+ SessionToolResultBlock: {
3938
+ /** @enum {string} */
3939
+ type: "tool_result";
3940
+ /** @description The tool_use id this result answers. */
3941
+ tool_use_id: string;
3942
+ /** @description Result payload — a string, or an array of typed sub-blocks using the same canonical block shape as a transcript message. */
3943
+ content?: string | components["schemas"]["SessionContentBlock"][];
3944
+ /** @description True when the tool reported a failure. */
3945
+ is_error?: boolean;
3946
+ } & {
3947
+ [key: string]: unknown;
3948
+ };
3949
+ /** @description An image block, e.g. multimodal caller input. */
3950
+ SessionImageBlock: {
3951
+ /** @enum {string} */
3952
+ type: "image";
3953
+ /** @description Provider-specific image source descriptor. */
3954
+ source?: {
3955
+ [key: string]: unknown;
3956
+ };
3957
+ } & {
3958
+ [key: string]: unknown;
3959
+ };
3124
3960
  /**
3125
3961
  * @description Transcript entry type: `message` or `compaction`.
3126
3962
  * @enum {string}
@@ -3136,10 +3972,8 @@ export interface components {
3136
3972
  agent_id: string;
3137
3973
  /** @description Role of this message in the transcript. */
3138
3974
  role: components["schemas"]["SessionMessageRole"];
3139
- /** @description Ordered content blocks (text, tool calls, tool results, images). */
3140
- content: {
3141
- [key: string]: unknown;
3142
- }[];
3975
+ /** @description Ordered canonical content blocks (text, thinking, tool_use, tool_result, image). */
3976
+ content: components["schemas"]["SessionContentBlock"][];
3143
3977
  /** @description Whether this row is a normal message or a compaction summary. */
3144
3978
  entry_type: components["schemas"]["SessionMessageEntryType"];
3145
3979
  /** @description For `compaction` messages, the highest sequence number this summary covers. */
@@ -3161,6 +3995,18 @@ export interface components {
3161
3995
  SessionMessageListResponse: {
3162
3996
  /** @description Messages in this page, ordered by `sequence` ascending. */
3163
3997
  items: components["schemas"]["SessionMessage"][];
3998
+ /** @description True when more messages exist past this page in the query's scan direction. */
3999
+ has_more?: boolean;
4000
+ /**
4001
+ * Format: int64
4002
+ * @description Sequence of the last (highest) item — pass back as `after_sequence` to page forward (newer).
4003
+ */
4004
+ next_sequence?: number;
4005
+ /**
4006
+ * Format: int64
4007
+ * @description Sequence of the first (lowest) item — pass back as `before_sequence` with `order=desc` to page backward (older). After paginating history, open the stream with `after_sequence=next_sequence` to receive the in-flight turn and everything after it — the stream and the messages API share one `sequence` cursor, so there is no overlap and no gap.
4008
+ */
4009
+ prev_sequence?: number;
3164
4010
  };
3165
4011
  /**
3166
4012
  * @description Action selector included in a toolkit.
@@ -3305,11 +4151,11 @@ export interface components {
3305
4151
  */
3306
4152
  SessionVisibility: "project" | "private";
3307
4153
  /**
3308
- * @description Agent turn lifecycle status: `running`, `waiting`, `completed`, `failed`, or `cancelled`.
4154
+ * @description Agent turn lifecycle status: `queued`, `running`, `waiting`, `completed`, `failed`, or `cancelled`.
3309
4155
  * @enum {string}
3310
4156
  */
3311
- AgentTurnStatus: "running" | "waiting" | "completed" | "failed" | "cancelled";
3312
- /** @description One attempt of an agent running the agent loop — the unit that produces a transcript. A turn is triggered either by a loop step (run_id + step_id) or an inbound channel message (channel_exchange_id); the two are mutually exclusive. Its messages are read via the turn's transcript endpoint. */
4157
+ AgentTurnStatus: "queued" | "running" | "waiting" | "completed" | "failed" | "cancelled";
4158
+ /** @description One attempt of an agent running the agent loop — the unit that produces a transcript. A turn is triggered by a direct send to the session, a loop step (run_id + step_key), or an inbound channel message (channel_exchange_id). Its messages are read via the turn's transcript endpoint. */
3313
4159
  AgentTurn: {
3314
4160
  /** @description Stable turn identifier. */
3315
4161
  id: string;
@@ -3352,6 +4198,10 @@ export interface components {
3352
4198
  AgentTurnListResponse: {
3353
4199
  /** @description Turns in this session, ordered by creation time. */
3354
4200
  items: components["schemas"]["AgentTurn"][];
4201
+ /** @description True when more turns exist past this page. */
4202
+ has_more?: boolean;
4203
+ /** @description Opaque cursor to pass as `cursor` on the next request. Null when `has_more` is false. */
4204
+ next_cursor?: string | null;
3355
4205
  };
3356
4206
  /** @description Durable conversation transcript owned by an agent. */
3357
4207
  Session: {
@@ -3379,10 +4229,10 @@ export interface components {
3379
4229
  model?: string;
3380
4230
  /** @description Provider for the recorded `model`. */
3381
4231
  model_provider?: string;
3382
- /** @description Per-session overrides for the message-compaction policy. */
3383
- compaction_policy?: {
3384
- [key: string]: unknown;
3385
- };
4232
+ /** @description Resolved message-compaction policy in effect for this session. */
4233
+ compaction_policy?: components["schemas"]["SessionCompactionPolicy"];
4234
+ /** @description The most recent compaction marker in the transcript, or null when the session has never been compacted. Delineates summarized history (sequences at or below `covers_through_sequence`) from the live tail. Returned on the single-session read; absent from list entries. */
4235
+ latest_compaction?: components["schemas"]["SessionCompactionBoundary"];
3386
4236
  /** @description Total messages currently in the session, including compaction summaries. */
3387
4237
  message_count: number;
3388
4238
  /** @description Lifetime input-token total reported for this session. */
@@ -3420,6 +4270,10 @@ export interface components {
3420
4270
  SessionListResponse: {
3421
4271
  /** @description The list of results for this page. */
3422
4272
  items: components["schemas"]["Session"][];
4273
+ /** @description True when more sessions exist past this page. */
4274
+ has_more?: boolean;
4275
+ /** @description Opaque cursor for the next page — pass back as `cursor`. Null when `has_more` is false. */
4276
+ next_cursor?: string | null;
3423
4277
  };
3424
4278
  /** @description Mutable display and lifecycle fields for a session. */
3425
4279
  UpdateSessionRequest: {
@@ -3427,51 +4281,317 @@ export interface components {
3427
4281
  title?: string;
3428
4282
  /** @description Lifecycle status. `active` restores archived sessions; `deleted` is terminal. */
3429
4283
  status?: components["schemas"]["SessionStatus"];
4284
+ /** @description Partial patch to the session's compaction policy. Only the supplied fields change; omitted fields keep their current values. */
4285
+ compaction_policy?: components["schemas"]["SessionCompactionPolicy"];
3430
4286
  };
3431
- /** @description JSON payload of a single `data:` line on the session event stream. The SSE `event:` field carries the event type (e.g. `generation.delta`); this object carries the event-specific fields. Additional fields beyond `session_id` vary by event type. */
3432
- SessionStreamEvent: {
3433
- /** @description The session this event belongs to. */
4287
+ /**
4288
+ * @description JSON payload of a single `data:` line on the session SSE stream, paired with an `event: <event type>` line.
4289
+ *
4290
+ * The `event:` line is the authoritative frame selector. This union is reference-only: several payloads are structurally identical (e.g. `user.message` and `agent.message`) or permissive open objects, so the `data:` body alone cannot be shape-matched to a single variant. Consumers MUST dispatch on the `event:` name and decode the body as the corresponding payload — never validate the bare body against the union.
4291
+ *
4292
+ * Durable message frames (`user.message`, `agent.message`, `compaction.created`) are replayed from the transcript and carry an SSE `id: <sequence>` — that `sequence` is the only cursor a client persists for `after_sequence` / `Last-Event-ID` resume. Terminal `turn.*` frames mark the active turn settling. `session.message.preview`, `session.resync`, `tool.call`, `tool.result`, and `generation.delta` frames are live-only and carry no `id:`.
4293
+ */
4294
+ SessionStreamFrame: components["schemas"]["SessionUserMessagePayload"] | components["schemas"]["AgentMessagePayload"] | components["schemas"]["CompactionCreatedPayload"] | components["schemas"]["TurnStartedPayload"] | components["schemas"]["TurnWaitingPayload"] | components["schemas"]["TurnCompletedPayload"] | components["schemas"]["TurnFailedPayload"] | components["schemas"]["TurnCancelledPayload"] | components["schemas"]["SessionMessagePreviewFrame"] | components["schemas"]["SessionResyncFrame"] | components["schemas"]["ToolCallPayload"] | components["schemas"]["ToolResultPayload"] | components["schemas"]["GenerationDeltaFrame"];
4295
+ /** @description Live-only, SessionMessage-compatible transcript preview for an in-flight agent response segment. It carries no durable `seq`, transcript `sequence`, or stable `message_id`; the committed row later replaces it by `turn_id` plus `metadata.response_message_index`. */
4296
+ SessionMessagePreviewFrame: {
4297
+ /** @enum {string} */
4298
+ event_type: "session.message.preview";
4299
+ /** @description Provisional live id. Do not persist or use as the durable message id. */
4300
+ id: string;
4301
+ /** @description Session this preview belongs to. */
3434
4302
  session_id: string;
4303
+ /** @description Agent that owns the parent session, when known. */
4304
+ agent_id?: string;
4305
+ /** @description Loop run that produced the preview, when applicable. */
4306
+ run_id?: string;
4307
+ /** @description Agent turn that produced the preview. */
4308
+ turn_id: string;
4309
+ /**
4310
+ * Format: int64
4311
+ * @description Monotonic per-turn sequence across all live-only session frames; use to detect dropped live frames.
4312
+ */
4313
+ live_sequence?: number;
4314
+ role: components["schemas"]["SessionMessageRole"];
4315
+ entry_type: components["schemas"]["SessionMessageEntryType"];
4316
+ /** @description Ordered content blocks using the same canonical block shape as SessionMessage. */
4317
+ content: components["schemas"]["SessionContentBlock"][];
4318
+ /** @description Must include `response_message_index`, the handoff key shared with the durable transcript row. */
4319
+ metadata: {
4320
+ [key: string]: unknown;
4321
+ };
4322
+ /**
4323
+ * Format: date-time
4324
+ * @description Server timestamp when this live preview frame was emitted.
4325
+ */
4326
+ emitted_at?: string;
3435
4327
  } & {
3436
4328
  [key: string]: unknown;
3437
4329
  };
3438
- AppendSessionMessagesRequest: {
3439
- /** @description Messages to append to the session, in order. */
3440
- messages: components["schemas"]["AppendSessionMessage"][];
3441
- /** @description Updated lifetime input-token total for this session. */
3442
- token_input_total?: number;
3443
- /** @description Updated lifetime output-token total for this session. */
3444
- token_output_total?: number;
3445
- /** @description Model that produced these messages. */
3446
- model?: string;
3447
- /** @description Provider for the supplied `model`. */
3448
- model_provider?: string;
3449
- };
3450
- /** @description Message payload to append to an existing durable session. */
3451
- AppendSessionMessage: {
3452
- /** @description Role to store for this appended message. */
3453
- role: components["schemas"]["SessionMessageRole"];
3454
- /** @description Ordered content blocks (text, tool calls, tool results, images). */
3455
- content: {
4330
+ /** @description Ephemeral, process-local live transcript snapshot for an in-flight turn. */
4331
+ SessionLiveSnapshot: {
4332
+ session_id: string;
4333
+ turn_id: string;
4334
+ /** @description Live-only frame payloads in live_sequence order. Each item has the same shape as its SSE `data:` payload. */
4335
+ frames: {
3456
4336
  [key: string]: unknown;
3457
4337
  }[];
3458
- /** @description Free-form caller metadata for this message. */
3459
- metadata?: {
3460
- [key: string]: unknown;
3461
- };
4338
+ /**
4339
+ * Format: int64
4340
+ * @description Highest live_sequence included in `frames`, or 0 when no live frames are available.
4341
+ */
4342
+ last_live_sequence: number;
3462
4343
  /**
3463
4344
  * Format: date-time
3464
- * @description Caller-supplied creation timestamp. The server assigns one if absent.
4345
+ * @description Server timestamp when the snapshot was last updated.
3465
4346
  */
3466
- created_at?: string;
4347
+ updated_at: string;
3467
4348
  };
3468
- /** @description Resolve-or-create policy for a session. */
3469
- CreateSessionRequest: {
3470
- /** @description Agent that owns the session. */
3471
- agent_id: string;
4349
+ /** @description Live-only marker asking the client to reconcile the active turn from the live snapshot endpoint. */
4350
+ SessionResyncFrame: {
4351
+ /** @enum {string} */
4352
+ event_type: "session.resync";
4353
+ session_id: string;
4354
+ /** @description Machine-readable resync reason, e.g. `subscriber_overflow`. */
4355
+ reason: string;
4356
+ };
4357
+ /** @description Payload of a `user.message` content event: the durable encoding of one non-assistant transcript message — caller input, or a user-role message carrying tool results. It mirrors the transcript row exactly, carrying the message identity (`message_id` + `sequence`) and full content. Replaying these events reconstructs the same view as reading the messages API. */
4358
+ SessionUserMessagePayload: {
4359
+ /** @description Id of the transcript message this event mirrors. */
4360
+ message_id: string;
3472
4361
  /**
3473
- * @description `continue_or_create` (default) resolves an existing session for the `session_key` or creates one; `new` always creates a fresh session; `continue` resolves an existing session and fails if none exists.
3474
- * @enum {string}
4362
+ * Format: int64
4363
+ * @description The mirrored message's per-session transcript sequence.
4364
+ */
4365
+ sequence: number;
4366
+ /** @description Transcript role of the message (e.g. `user`, `system`, or a user-role message carrying tool results); never `assistant`. */
4367
+ role: components["schemas"]["SessionMessageRole"];
4368
+ /** @description The message's full canonical content blocks (text, tool_result, …). */
4369
+ content: components["schemas"]["SessionContentBlock"][];
4370
+ /** @description The agent turn that produced this message, when applicable. */
4371
+ turn_id?: string;
4372
+ } & {
4373
+ [key: string]: unknown;
4374
+ };
4375
+ /** @description Payload of a `turn.started` event. Empty: the turn is identified by the envelope `turn_id`, so nothing is duplicated in the payload. */
4376
+ TurnStartedPayload: {
4377
+ [key: string]: unknown;
4378
+ };
4379
+ /** @description Payload of an `agent.message` content event: the durable encoding of one assistant transcript message. Carries the message's full structured content (text, thinking, tool_use) plus the message identity (`message_id` + `sequence`). Replaying these events reconstructs the same view as reading the messages API. */
4380
+ AgentMessagePayload: {
4381
+ /** @description Id of the transcript message this event mirrors. */
4382
+ message_id: string;
4383
+ /**
4384
+ * Format: int64
4385
+ * @description The mirrored message's per-session transcript sequence.
4386
+ */
4387
+ sequence: number;
4388
+ /**
4389
+ * @description Always `assistant`.
4390
+ * @enum {string}
4391
+ */
4392
+ role: "assistant";
4393
+ /** @description The assistant message's full canonical content blocks (text, thinking, tool_use). */
4394
+ content: components["schemas"]["SessionContentBlock"][];
4395
+ /** @description The agent turn that produced this message. */
4396
+ turn_id?: string;
4397
+ } & {
4398
+ [key: string]: unknown;
4399
+ };
4400
+ /** @description Payload of a live-only `tool.call` frame — an in-flight preview that a tool was invoked during the active turn. Never persisted and carries no sequence: the durable record of the call is the `tool_use` content block of the assistant message, delivered as an `agent.message` event when the turn commits. */
4401
+ ToolCallPayload: {
4402
+ tool_call_id?: string;
4403
+ tool_name?: string;
4404
+ input?: {
4405
+ [key: string]: unknown;
4406
+ };
4407
+ /**
4408
+ * Format: int64
4409
+ * @description Monotonic per-turn sequence across all live-only session frames; use to detect dropped live frames.
4410
+ */
4411
+ live_sequence?: number;
4412
+ /**
4413
+ * Format: date-time
4414
+ * @description Server timestamp when this live preview frame was emitted.
4415
+ */
4416
+ emitted_at?: string;
4417
+ } & {
4418
+ [key: string]: unknown;
4419
+ };
4420
+ /** @description Payload of a live-only `tool.result` frame — an in-flight preview that a tool returned during the active turn. Never persisted and carries no sequence: the durable record is the `tool_result` content block of the following transcript message, delivered as a `user.message` event when the turn commits. */
4421
+ ToolResultPayload: {
4422
+ tool_call_id?: string;
4423
+ tool_name?: string;
4424
+ /** @description The tool result as canonical content blocks (e.g. `[{ "type": "text", "text": "…" }]`), the same `SessionContentBlock` shape as the `tool_result` content of the durable transcript message — so the live preview and the committed record read identically. In practice the server collapses the result to a single `text` block. */
4425
+ content?: components["schemas"]["SessionContentBlock"][];
4426
+ display?: string;
4427
+ is_error?: boolean;
4428
+ error?: string;
4429
+ /**
4430
+ * Format: int64
4431
+ * @description Monotonic per-turn sequence across all live-only session frames; use to detect dropped live frames.
4432
+ */
4433
+ live_sequence?: number;
4434
+ /**
4435
+ * Format: date-time
4436
+ * @description Server timestamp when this live preview frame was emitted.
4437
+ */
4438
+ emitted_at?: string;
4439
+ } & {
4440
+ [key: string]: unknown;
4441
+ };
4442
+ TurnWaitingPayload: {
4443
+ turn_id?: string;
4444
+ reason?: string;
4445
+ wait?: {
4446
+ [key: string]: unknown;
4447
+ };
4448
+ } & {
4449
+ [key: string]: unknown;
4450
+ };
4451
+ /** @description Payload of a `turn.completed` event — the terminal idle marker carrying token usage. The assistant output is not duplicated here; it is delivered as `agent.message` content events when the transcript commits. */
4452
+ TurnCompletedPayload: {
4453
+ usage?: {
4454
+ [key: string]: unknown;
4455
+ };
4456
+ } & {
4457
+ [key: string]: unknown;
4458
+ };
4459
+ TurnFailedPayload: {
4460
+ error?: string;
4461
+ error_type?: string;
4462
+ } & {
4463
+ [key: string]: unknown;
4464
+ };
4465
+ TurnCancelledPayload: {
4466
+ reason?: string;
4467
+ } & {
4468
+ [key: string]: unknown;
4469
+ };
4470
+ /** @description Payload of a `compaction.created` event, emitted when the session transcript is summarized. The event is non-terminal: it never closes the session stream, so a live consumer observes a compaction landing inline. */
4471
+ CompactionCreatedPayload: {
4472
+ /** @description Id of the compaction summary message appended to the transcript. */
4473
+ message_id?: string;
4474
+ /**
4475
+ * Format: int64
4476
+ * @description The summary message's per-session transcript sequence.
4477
+ */
4478
+ sequence?: number;
4479
+ /** @description Transcript role of the summary entry. */
4480
+ role?: string;
4481
+ /** @description The summary's full canonical content blocks, so replaying the stream reconstructs the compaction entry exactly. */
4482
+ content?: components["schemas"]["SessionContentBlock"][];
4483
+ /** @description Highest message sequence the new summary covers — the before/after boundary. */
4484
+ covers_through_sequence?: number;
4485
+ /** @description Number of transcript messages folded into this summary. */
4486
+ message_count?: number;
4487
+ /** @description Model that produced the summary. */
4488
+ summary_model?: string;
4489
+ } & {
4490
+ [key: string]: unknown;
4491
+ };
4492
+ AppendSessionMessagesRequest: {
4493
+ /** @description Messages to append to the session, in order. */
4494
+ messages: components["schemas"]["AppendSessionMessage"][];
4495
+ /** @description Updated lifetime input-token total for this session. */
4496
+ token_input_total?: number;
4497
+ /** @description Updated lifetime output-token total for this session. */
4498
+ token_output_total?: number;
4499
+ /** @description Model that produced these messages. */
4500
+ model?: string;
4501
+ /** @description Provider for the supplied `model`. */
4502
+ model_provider?: string;
4503
+ };
4504
+ /** @description Message payload to append to an existing durable session. */
4505
+ AppendSessionMessage: {
4506
+ /** @description Role to store for this appended message. */
4507
+ role: components["schemas"]["SessionMessageRole"];
4508
+ /** @description Ordered content blocks (text, tool calls, tool results, images). */
4509
+ content: {
4510
+ [key: string]: unknown;
4511
+ }[];
4512
+ /** @description Free-form caller metadata for this message. */
4513
+ metadata?: {
4514
+ [key: string]: unknown;
4515
+ };
4516
+ /**
4517
+ * Format: date-time
4518
+ * @description Caller-supplied creation timestamp. The server assigns one if absent.
4519
+ */
4520
+ created_at?: string;
4521
+ };
4522
+ /** @description Pointer to the latest compaction marker in a session's transcript. The marker is itself a transcript message (role `compaction`); everything at or below `covers_through_sequence` is summarized history. */
4523
+ SessionCompactionBoundary: {
4524
+ /** @description Id of the compaction summary message in the transcript. */
4525
+ message_id: string;
4526
+ /** @description Transcript sequence of the compaction marker itself. */
4527
+ sequence: number;
4528
+ /** @description Highest message sequence this summary covers — the before/after boundary. */
4529
+ covers_through_sequence: number;
4530
+ };
4531
+ /** @description A single compound invocation: which agent to run, how to resolve the session, the caller's input message, and optional channel routing context. */
4532
+ InvokeAgentRequest: {
4533
+ agent_ref: components["schemas"]["AgentRef"];
4534
+ session?: components["schemas"]["InvokeSessionSpec"];
4535
+ input: components["schemas"]["InvokeInput"];
4536
+ channel_context?: components["schemas"]["ChannelContext"];
4537
+ };
4538
+ /** @description Reference to an agent in this project. Supply exactly one of `id` (the agent identifier) or `name` (the project-unique agent name). A blueprint-binding reference form is reserved for a later release and is not resolvable yet. */
4539
+ AgentRef: {
4540
+ /** @description Agent identifier. */
4541
+ id?: string;
4542
+ /** @description Project-unique agent name. */
4543
+ name?: string;
4544
+ };
4545
+ /** @description How to resolve or create the session this invocation runs in. Mirrors the create-session policy: `mode` + `session_key` resolve a durable conversation for the agent, and the remaining fields seed a session that does not already exist (they are ignored when an existing session is resolved). Omit the whole object to use a single default session per agent in `continue_or_create` mode. */
4546
+ InvokeSessionSpec: {
4547
+ /**
4548
+ * @description `continue_or_create` (default) resolves an existing session for the `session_key` or creates one; `new` always creates a fresh session; `continue` resolves an existing session and fails if none exists.
4549
+ * @enum {string}
4550
+ */
4551
+ mode?: "new" | "continue" | "continue_or_create";
4552
+ /** @description Stable key identifying the conversation within the agent. */
4553
+ session_key?: string;
4554
+ /** @description Human-friendly title for a newly created session. */
4555
+ title?: string;
4556
+ visibility?: components["schemas"]["SessionVisibility"];
4557
+ /** @description Per-session compaction overrides applied when the session is first created. Merged over the agent's default policy and server defaults. Ignored when an existing session is resolved. */
4558
+ compaction_policy?: components["schemas"]["SessionCompactionPolicy"];
4559
+ /** @description Free-form caller metadata stored on a newly created session. */
4560
+ metadata?: {
4561
+ [key: string]: unknown;
4562
+ };
4563
+ };
4564
+ /** @description The caller input message that starts the agent turn. */
4565
+ InvokeInput: {
4566
+ /** @description Ordered content blocks (text, images) for the input message. */
4567
+ content: {
4568
+ [key: string]: unknown;
4569
+ }[];
4570
+ /** @description Dedup key scoped to the resolved session. A repeat call with the same key resumes the existing turn and writes nothing new — derive it from the provider event id for Slack/Telegram webhook retries. */
4571
+ idempotency_key?: string;
4572
+ /** @description Free-form caller metadata attached to the input message. */
4573
+ metadata?: {
4574
+ [key: string]: unknown;
4575
+ };
4576
+ };
4577
+ /** @description Optional messaging provider/channel routing context (Slack, Telegram, …). Persisted on the started turn's input-message metadata under a `channel_context` key so chat history and support views can trace a turn back to the provider thread it came from. */
4578
+ ChannelContext: {
4579
+ /** @description Messaging provider, e.g. `slack` or `telegram`. */
4580
+ provider?: string;
4581
+ /** @description Provider workspace/team identifier. */
4582
+ workspace_id?: string;
4583
+ /** @description Provider channel or chat identifier. */
4584
+ channel_id?: string;
4585
+ /** @description Provider thread identifier within the channel. */
4586
+ thread_id?: string;
4587
+ };
4588
+ /** @description Resolve-or-create policy for a session. */
4589
+ CreateSessionRequest: {
4590
+ /** @description Agent that owns the session. */
4591
+ agent_id: string;
4592
+ /**
4593
+ * @description `continue_or_create` (default) resolves an existing session for the `session_key` or creates one; `new` always creates a fresh session; `continue` resolves an existing session and fails if none exists.
4594
+ * @enum {string}
3475
4595
  */
3476
4596
  mode?: "new" | "continue" | "continue_or_create";
3477
4597
  /** @description Stable key identifying the conversation within the agent. */
@@ -3481,45 +4601,42 @@ export interface components {
3481
4601
  visibility?: components["schemas"]["SessionVisibility"];
3482
4602
  /** @description Model to record on the session. */
3483
4603
  model?: string;
4604
+ /** @description Per-session compaction overrides applied when the session is first created. Merged over the agent's default policy and server defaults. Ignored when an existing session is resolved. */
4605
+ compaction_policy?: components["schemas"]["SessionCompactionPolicy"];
3484
4606
  /** @description Free-form caller metadata for the session. */
3485
4607
  metadata?: {
3486
4608
  [key: string]: unknown;
3487
4609
  };
3488
4610
  };
3489
- /** @description One input event in a send. Phase 1 supports a single `user.message`. */
3490
- SendSessionEventInput: {
4611
+ /** @description Caller input that starts an agent turn in a session. */
4612
+ StartTurnRequest: {
3491
4613
  /**
3492
- * @description Input event type. Defaults to `user.message`.
4614
+ * @description Role of the input message. A turn carries caller input, so only `user` is accepted; defaults to `user` when omitted.
4615
+ * @default user
3493
4616
  * @enum {string}
3494
4617
  */
3495
- type?: "user.message";
3496
- /** @description Role to store for the input message. Defaults to `user`. */
3497
- role?: components["schemas"]["SessionMessageRole"];
4618
+ role: "user";
3498
4619
  /** @description Ordered content blocks (text, images) for the input message. */
3499
4620
  content: {
3500
4621
  [key: string]: unknown;
3501
4622
  }[];
3502
- };
3503
- /** @description Caller input to append and run against a session. */
3504
- SendSessionEventsRequest: {
3505
- /** @description Input events to send. Phase 1 accepts exactly one `user.message`. */
3506
- events: components["schemas"]["SendSessionEventInput"][];
3507
- /** @description Dedup key scoped to the session. A repeat send with the same key returns the existing invocation's cursor and writes nothing new. */
4623
+ /** @description Dedup key scoped to the session. A repeat call with the same key resumes the existing turn and writes nothing new. */
3508
4624
  idempotency_key?: string;
3509
4625
  /** @description Free-form caller metadata attached to the input message. */
3510
4626
  metadata?: {
3511
4627
  [key: string]: unknown;
3512
4628
  };
3513
4629
  };
3514
- /** @description Acknowledgement that an invocation started, with a stream cursor. */
3515
- SessionInvocationAck: {
4630
+ /** @description Acknowledgement that a turn started, with a stream cursor. */
4631
+ TurnAck: {
3516
4632
  session: components["schemas"]["Session"];
4633
+ turn: components["schemas"]["AgentTurn"];
3517
4634
  /**
3518
4635
  * Format: int64
3519
- * @description The durable event sequence cursor to stream from. Pass it as `after_sequence` to the events stream to follow this invocation.
4636
+ * @description The transcript message `sequence` cursor to stream from. Pass it as `after_sequence` to `GET .../stream` to follow this turn.
3520
4637
  */
3521
- seq: number;
3522
- /** @description True when a repeated idempotency key returned an existing invocation. */
4638
+ after_sequence: number;
4639
+ /** @description True when a repeated idempotency key resumed an existing turn. */
3523
4640
  deduped?: boolean;
3524
4641
  };
3525
4642
  /**
@@ -4099,7 +5216,7 @@ export interface components {
4099
5216
  };
4100
5217
  /** @description Durable conversation-session policy for loop agent steps. Omit to enable the product default: loop-scoped sessions keyed from the triggering conversation when Mobius can identify one, such as a Telegram chat ID. */
4101
5218
  LoopAgentSessionPolicy: {
4102
- /** @description Disable durable session context and transcript writes for the affected agent step(s). */
5219
+ /** @description Reserved for internal synthesized agent executions. Authored loop agent steps are session-backed; setting this to `true` is rejected. */
4103
5220
  disabled?: boolean;
4104
5221
  /**
4105
5222
  * @description Named-session boundary. `auto` and omitted use `loop`. `agent` intentionally shares the named session across loops using the same agent.
@@ -4112,25 +5229,8 @@ export interface components {
4112
5229
  title?: string;
4113
5230
  /** @description Visibility for durable sessions created from this policy. */
4114
5231
  visibility?: components["schemas"]["SessionVisibility"];
4115
- /**
4116
- * @description Optional per-session compaction policy merged with server defaults when the session is first created. Existing sessions keep their current compaction policy unless edited through a session-specific operation.
4117
- * @example {
4118
- * "strategy": "auto",
4119
- * "threshold_tokens": 25000,
4120
- * "summary_model": "claude-haiku-4-5-20251001"
4121
- * }
4122
- */
4123
- compaction_policy?: {
4124
- /**
4125
- * @description Compaction strategy: `auto`, `manual`, `disabled`, or `none`.
4126
- * @enum {string}
4127
- */
4128
- strategy?: "auto" | "manual" | "disabled" | "none";
4129
- /** @description Token threshold that triggers automatic compaction. */
4130
- threshold_tokens?: number;
4131
- /** @description Model used to produce compaction summaries. */
4132
- summary_model?: string;
4133
- };
5232
+ /** @description Optional per-session compaction policy merged with server defaults when the session is first created. Existing sessions keep their current compaction policy unless edited through a session-specific operation. */
5233
+ compaction_policy?: components["schemas"]["SessionCompactionPolicy"];
4134
5234
  };
4135
5235
  /** @description Model-routing override for an agent step. */
4136
5236
  LoopModelRoute: {
@@ -4141,12 +5241,10 @@ export interface components {
4141
5241
  mode: "managed" | "worker";
4142
5242
  /** @description Managed environment to route worker-backed model calls to. */
4143
5243
  environment_id?: string;
4144
- /** @description Provider or worker route name. */
5244
+ /** @description Provider id advertised by a local worker when `mode` is `worker`. */
4145
5245
  provider?: string;
4146
5246
  /** @description Model identifier for this route. */
4147
5247
  model?: string;
4148
- /** @description Worker queue for customer-worker model calls. */
4149
- queue?: string;
4150
5248
  };
4151
5249
  /** @description Action step configuration recognised inside `LoopSpec.steps[].config`. */
4152
5250
  LoopActionStep: {
@@ -4407,6 +5505,10 @@ export interface components {
4407
5505
  loop_version: number;
4408
5506
  /** @description Current lifecycle state of this run. */
4409
5507
  status: components["schemas"]["LoopRunStatus"];
5508
+ /** @description Gate that placed this run in the durable queue. Present only while `status` is `queued`. */
5509
+ queue_reason?: components["schemas"]["LoopRunQueueReason"];
5510
+ /** @description Org-wide concurrent-run ceiling stamped at run start. Present when the run was evaluated against a plan concurrency limit. */
5511
+ plan_concurrency_limit?: number;
4410
5512
  /** @description Terminal reason recorded when the run stops. */
4411
5513
  stop_reason?: components["schemas"]["LoopRunStopReason"];
4412
5514
  /**
@@ -4487,6 +5589,11 @@ export interface components {
4487
5589
  * @enum {string}
4488
5590
  */
4489
5591
  LoopRunStatus: "queued" | "running" | "suspended" | "completed" | "failed" | "cancelled";
5592
+ /**
5593
+ * @description Why a run is waiting in the queue. `plan_concurrency` means the organization's current plan has no active-run capacity available. `loop_policy` and `trigger_concurrency` mean authored concurrency policy deferred the run.
5594
+ * @enum {string}
5595
+ */
5596
+ LoopRunQueueReason: "plan_concurrency" | "loop_policy" | "trigger_concurrency";
4490
5597
  /**
4491
5598
  * @description Why a run stopped. Set exactly once when the run reaches a terminal status; absent on non-terminal runs. `status` carries the lifecycle state and `error_type` classifies the error when one occurred; `stop_reason` classifies the stop itself.
4492
5599
  *
@@ -4650,113 +5757,325 @@ export interface components {
4650
5757
  */
4651
5758
  sequence: number;
4652
5759
  /**
4653
- * @description Event type from the run-stream taxonomy (e.g. `run.started`, `step.completed`, `wait.opened`, `action.called`, `action.completed`, `action.failed`, `artifact.created`, `limit.reached`, `usage.recorded`).
5760
+ * @description Event type from the run-stream taxonomy (e.g. `run.started`, `step.completed`, `wait.opened`, `action.called`, `action.completed`, `action.failed`, `artifact.created`, `limit.reached`).
4654
5761
  *
4655
- * Guardrail events: `run.budget_exceeded` fires when the budget halts the run at a checkpoint (payload: `credit_budget`, `credit_spent`, `percent_used`, plus the `step` it halted before). `usage.recorded` payloads carry `step_key`, the event's `credit_cost`, its `budget_cost` (rate-card cost counted against the run budget, nonzero even for BYOK), and the cumulative `run_credit_spent`.
5762
+ * Guardrail events: `run.budget_exceeded` fires when the budget halts the run at a checkpoint (payload: `credit_budget`, `credit_spent`, `percent_used`, plus the `step` it halted before). Metered spend is recorded in the billing ledger and denormalized onto the run's `credit_spent`; it is not represented as a timeline event.
4656
5763
  */
4657
5764
  event_type: string;
4658
5765
  /** @description ID of the step this event belongs to, when applicable. */
4659
5766
  step_id?: string | null;
4660
5767
  /** @description Legacy alias for the loop step ID this event belongs to, when applicable. */
4661
5768
  step_key?: string | null;
4662
- /** @description Event-type-specific payload. See the run-event taxonomy for shapes. */
4663
- payload?: {
4664
- [key: string]: unknown;
4665
- };
5769
+ payload?: components["schemas"]["RunEventPayload"];
4666
5770
  /**
4667
5771
  * Format: date-time
4668
5772
  * @description Server timestamp when the event was recorded.
4669
5773
  */
4670
5774
  created_at: string;
4671
5775
  };
4672
- LoopRunEventListResponse: {
4673
- /** @description Run events in this page, ordered by `sequence` ascending. */
4674
- items: components["schemas"]["LoopRunEvent"][];
4675
- /**
4676
- * Format: int64
4677
- * @description Sequence number of the most recent event in `items`; clients can pass this back as `after_sequence` on the next poll.
4678
- */
4679
- next_sequence?: number;
4680
- /** @description True when more events exist after the returned page. */
4681
- has_more?: boolean;
5776
+ /** @description Durable run lifecycle frame. SSE messages carrying this shape include `id: <sequence>`, and that value is the only cursor clients should persist for `after_sequence` or `Last-Event-ID` resume. */
5777
+ LoopRunLifecycleFrame: components["schemas"]["LoopRunEvent"];
5778
+ /** @description JSON payload of a single `data:` line on the run event SSE stream. Run stream frames are lifecycle/observability events and are replayable with an SSE `id:`. Agent transcript content is delivered by the referenced session stream. */
5779
+ LoopRunStreamFrame: components["schemas"]["LoopRunLifecycleFrame"];
5780
+ /** @description Typed payloads for common durable run event types. The containing `LoopRunEvent.event_type` selects the payload shape; payload objects do not duplicate that discriminator because some payloads use fields such as `event_type` for their own lifecycle data (for example, the external matcher recorded by `wait.opened`). */
5781
+ RunEventPayload: components["schemas"]["RunStartedPayload"] | components["schemas"]["WaitPayload"] | components["schemas"]["RunResumedPayload"] | components["schemas"]["RunCompletedPayload"] | components["schemas"]["RunFailedPayload"] | components["schemas"]["RunCancelledPayload"] | components["schemas"]["StepStartedPayload"] | components["schemas"]["StepCompletedPayload"] | components["schemas"]["StepFailedPayload"] | components["schemas"]["StepRetriedPayload"] | components["schemas"]["StepResumedPayload"] | components["schemas"]["StepSkippedPayload"] | components["schemas"]["ActionCalledPayload"] | components["schemas"]["ActionCompletedPayload"] | components["schemas"]["ActionFailedPayload"] | components["schemas"]["ActionRetriedPayload"] | components["schemas"]["ActionResultPayload"] | components["schemas"]["CheckVerdictPayload"] | components["schemas"]["InteractionRespondedPayload"] | components["schemas"]["WaitResumedPayload"] | components["schemas"]["WaitTimedOutPayload"] | components["schemas"]["BudgetExceededPayload"] | components["schemas"]["ProgressStalledPayload"] | components["schemas"]["LimitReachedPayload"] | components["schemas"]["ArtifactCreatedPayload"] | components["schemas"]["GenericEventPayload"];
5782
+ RunStartedPayload: {
5783
+ loop_id?: string;
5784
+ loop_version_id?: string;
5785
+ source_event_id?: string;
5786
+ trigger_id?: string;
5787
+ } & {
5788
+ [key: string]: unknown;
4682
5789
  };
4683
- /**
4684
- * @example {
4685
- * "name": "GitHub review",
4686
- * "description": "GitHub actions needed for pull-request review.",
4687
- * "actions": [
4688
- * {
4689
- * "selector_type": "exact",
4690
- * "selector": "github.create_review_comment"
4691
- * }
4692
- * ],
4693
- * "tags": {
4694
- * "owner": "product"
4695
- * }
4696
- * }
4697
- */
4698
- ToolkitRequest: {
4699
- /** @description Human-readable toolkit name. */
4700
- name: string;
4701
- /** @description Markdown description of the toolkit's purpose. */
4702
- description?: string;
4703
- /** @description Action selectors provided by this toolkit. */
4704
- actions?: components["schemas"]["ToolkitAction"][];
4705
- /** @description Labels to apply to the toolkit. */
4706
- tags?: components["schemas"]["TagMap"];
5790
+ RunResumedPayload: {
5791
+ step?: string;
5792
+ reason?: string;
5793
+ } & {
5794
+ [key: string]: unknown;
4707
5795
  };
4708
- ToolkitListResponse: {
4709
- /** @description The list of results for this page. */
4710
- items: components["schemas"]["Toolkit"][];
5796
+ RunCompletedPayload: {
5797
+ output?: {
5798
+ [key: string]: unknown;
5799
+ };
5800
+ } & {
5801
+ [key: string]: unknown;
4711
5802
  };
4712
- /**
4713
- * @example {
4714
- * "name": "Pull request review",
4715
- * "description": "Review pull requests for correctness and risk.",
4716
- * "instructions": "Check the diff and leave concise findings.",
4717
- * "allowed_tools": [
4718
- * "github.create_review_comment"
4719
- * ],
4720
- * "tags": {
4721
- * "owner": "product"
4722
- * }
4723
- * }
4724
- */
4725
- SkillRequest: {
4726
- /** @description Human-readable skill name. */
4727
- name: string;
4728
- /** @description Markdown description of the skill's purpose. */
4729
- description?: string;
4730
- /** @description Markdown instructions loaded when the skill is active. */
4731
- instructions: string;
4732
- /**
4733
- * @description Tool selectors that narrow the agent's effective tool set while this skill is active.
4734
- * @default []
4735
- */
4736
- allowed_tools: string[];
4737
- /** @description Labels to apply to the skill. */
4738
- tags?: components["schemas"]["TagMap"];
5803
+ RunFailedPayload: {
5804
+ error?: string;
5805
+ error_type?: string;
5806
+ step?: string;
5807
+ } & {
5808
+ [key: string]: unknown;
4739
5809
  };
4740
- ImportSkillRequest: {
4741
- /** @description Full skill document, optionally with YAML frontmatter. */
4742
- content: string;
4743
- /** @description Optional name override. */
4744
- name?: string;
5810
+ RunCancelledPayload: {
5811
+ reason?: string;
5812
+ } & {
5813
+ [key: string]: unknown;
4745
5814
  };
4746
- SkillListResponse: {
4747
- /** @description The list of results for this page. */
4748
- items: components["schemas"]["Skill"][];
5815
+ StepStartedPayload: {
5816
+ step?: string;
5817
+ kind?: string;
5818
+ agent_id?: string;
5819
+ } & {
5820
+ [key: string]: unknown;
4749
5821
  };
4750
- /**
4751
- * @description Column value type: `string`, `number`, `boolean`, `date`, `object`, `array`, or `any`.
4752
- * @enum {string}
4753
- */
4754
- ColumnType: "string" | "number" | "boolean" | "date" | "object" | "array" | "any";
4755
- /** @description One typed column in a table schema. */
4756
- ColumnDef: {
4757
- /** @description Column name used as the key inside row `data`. */
4758
- name: string;
4759
- /** @description JSON-compatible value type accepted for this column. */
5822
+ StepCompletedPayload: {
5823
+ step?: string;
5824
+ output?: {
5825
+ [key: string]: unknown;
5826
+ };
5827
+ } & {
5828
+ [key: string]: unknown;
5829
+ };
5830
+ StepFailedPayload: {
5831
+ step?: string;
5832
+ error?: string;
5833
+ error_type?: string;
5834
+ } & {
5835
+ [key: string]: unknown;
5836
+ };
5837
+ StepRetriedPayload: {
5838
+ step?: string;
5839
+ attempt?: number;
5840
+ max_attempts?: number;
5841
+ error?: string;
5842
+ } & {
5843
+ [key: string]: unknown;
5844
+ };
5845
+ StepResumedPayload: {
5846
+ step?: string;
5847
+ kind?: string;
5848
+ } & {
5849
+ [key: string]: unknown;
5850
+ };
5851
+ StepSkippedPayload: {
5852
+ step?: string;
5853
+ kind?: string;
5854
+ reason?: string;
5855
+ } & {
5856
+ [key: string]: unknown;
5857
+ };
5858
+ ActionCalledPayload: {
5859
+ action?: string;
5860
+ step?: string;
5861
+ parameters?: {
5862
+ [key: string]: unknown;
5863
+ };
5864
+ } & {
5865
+ [key: string]: unknown;
5866
+ };
5867
+ ActionCompletedPayload: {
5868
+ action?: string;
5869
+ step?: string;
5870
+ result?: {
5871
+ [key: string]: unknown;
5872
+ };
5873
+ } & {
5874
+ [key: string]: unknown;
5875
+ };
5876
+ ActionFailedPayload: {
5877
+ action?: string;
5878
+ step?: string;
5879
+ error?: string;
5880
+ error_type?: string;
5881
+ } & {
5882
+ [key: string]: unknown;
5883
+ };
5884
+ ActionRetriedPayload: {
5885
+ action?: string;
5886
+ attempt?: number;
5887
+ max_attempts?: number;
5888
+ } & {
5889
+ [key: string]: unknown;
5890
+ };
5891
+ ActionResultPayload: {
5892
+ action?: string;
5893
+ result?: {
5894
+ [key: string]: unknown;
5895
+ };
5896
+ } & {
5897
+ [key: string]: unknown;
5898
+ };
5899
+ CheckVerdictPayload: {
5900
+ step?: string;
5901
+ verdict?: string;
5902
+ on_fail?: string;
5903
+ failed?: string[];
5904
+ } & {
5905
+ [key: string]: unknown;
5906
+ };
5907
+ InteractionRespondedPayload: {
5908
+ interaction_id?: string;
5909
+ response?: {
5910
+ [key: string]: unknown;
5911
+ };
5912
+ responder?: {
5913
+ [key: string]: unknown;
5914
+ };
5915
+ } & {
5916
+ [key: string]: unknown;
5917
+ };
5918
+ WaitPayload: {
5919
+ step?: string;
5920
+ /** @description Source event type or pattern this wait is listening for. */
5921
+ event_type?: string;
5922
+ /** @description Optional source identifier that scopes event matching. */
5923
+ source_id?: string;
5924
+ /** @description Optional matcher fields required on the source event. */
5925
+ match?: {
5926
+ [key: string]: unknown;
5927
+ };
5928
+ wait_id?: string;
5929
+ wait_kind?: string;
5930
+ /**
5931
+ * Format: date-time
5932
+ * @description Wall-clock expiry for the wait, when bounded.
5933
+ */
5934
+ expires_at?: string;
5935
+ /** Format: date-time */
5936
+ deadline?: string;
5937
+ subject?: {
5938
+ [key: string]: unknown;
5939
+ };
5940
+ } & {
5941
+ [key: string]: unknown;
5942
+ };
5943
+ WaitResumedPayload: {
5944
+ step?: string;
5945
+ wait_id?: string;
5946
+ payload?: {
5947
+ [key: string]: unknown;
5948
+ };
5949
+ } & {
5950
+ [key: string]: unknown;
5951
+ };
5952
+ WaitTimedOutPayload: {
5953
+ step?: string;
5954
+ wait_id?: string;
5955
+ reason?: string;
5956
+ } & {
5957
+ [key: string]: unknown;
5958
+ };
5959
+ BudgetExceededPayload: {
5960
+ step?: string;
5961
+ credit_spent?: number;
5962
+ credit_budget?: number;
5963
+ percent_used?: number;
5964
+ } & {
5965
+ [key: string]: unknown;
5966
+ };
5967
+ ProgressStalledPayload: {
5968
+ step?: string;
5969
+ tool?: string;
5970
+ duplicate_calls?: number;
5971
+ limit?: number;
5972
+ } & {
5973
+ [key: string]: unknown;
5974
+ };
5975
+ LimitReachedPayload: {
5976
+ step?: string;
5977
+ limit_kind?: string;
5978
+ used?: number;
5979
+ limit?: number;
5980
+ } & {
5981
+ [key: string]: unknown;
5982
+ };
5983
+ ArtifactCreatedPayload: {
5984
+ artifact_id?: string;
5985
+ name?: string;
5986
+ content_type?: string;
5987
+ step?: string;
5988
+ } & {
5989
+ [key: string]: unknown;
5990
+ };
5991
+ LoopRunEventListResponse: {
5992
+ /** @description Run events in this page, ordered by `sequence` ascending. */
5993
+ items: components["schemas"]["LoopRunEvent"][];
5994
+ /**
5995
+ * Format: int64
5996
+ * @description Sequence number of the most recent event in `items`; clients can pass this back as `after_sequence` on the next poll.
5997
+ */
5998
+ next_sequence?: number;
5999
+ /** @description True when more events exist after the returned page. */
6000
+ has_more?: boolean;
6001
+ };
6002
+ /**
6003
+ * @example {
6004
+ * "name": "GitHub review",
6005
+ * "description": "GitHub actions needed for pull-request review.",
6006
+ * "actions": [
6007
+ * {
6008
+ * "selector_type": "exact",
6009
+ * "selector": "github.create_review_comment"
6010
+ * }
6011
+ * ],
6012
+ * "tags": {
6013
+ * "owner": "product"
6014
+ * }
6015
+ * }
6016
+ */
6017
+ ToolkitRequest: {
6018
+ /** @description Human-readable toolkit name. */
6019
+ name: string;
6020
+ /** @description Markdown description of the toolkit's purpose. */
6021
+ description?: string;
6022
+ /** @description Action selectors provided by this toolkit. */
6023
+ actions?: components["schemas"]["ToolkitAction"][];
6024
+ /** @description Labels to apply to the toolkit. */
6025
+ tags?: components["schemas"]["TagMap"];
6026
+ };
6027
+ ToolkitListResponse: {
6028
+ /** @description The list of results for this page. */
6029
+ items: components["schemas"]["Toolkit"][];
6030
+ };
6031
+ /**
6032
+ * @example {
6033
+ * "name": "Pull request review",
6034
+ * "description": "Review pull requests for correctness and risk.",
6035
+ * "instructions": "Check the diff and leave concise findings.",
6036
+ * "allowed_tools": [
6037
+ * "github.create_review_comment"
6038
+ * ],
6039
+ * "tags": {
6040
+ * "owner": "product"
6041
+ * }
6042
+ * }
6043
+ */
6044
+ SkillRequest: {
6045
+ /** @description Human-readable skill name. */
6046
+ name: string;
6047
+ /** @description Markdown description of the skill's purpose. */
6048
+ description?: string;
6049
+ /** @description Markdown instructions loaded when the skill is active. */
6050
+ instructions: string;
6051
+ /**
6052
+ * @description Tool selectors that narrow the agent's effective tool set while this skill is active.
6053
+ * @default []
6054
+ */
6055
+ allowed_tools: string[];
6056
+ /** @description Labels to apply to the skill. */
6057
+ tags?: components["schemas"]["TagMap"];
6058
+ };
6059
+ ImportSkillRequest: {
6060
+ /** @description Full skill document, optionally with YAML frontmatter. */
6061
+ content: string;
6062
+ /** @description Optional name override. */
6063
+ name?: string;
6064
+ };
6065
+ SkillListResponse: {
6066
+ /** @description The list of results for this page. */
6067
+ items: components["schemas"]["Skill"][];
6068
+ };
6069
+ /**
6070
+ * @description Column value type: `string`, `number`, `boolean`, `date`, `object`, `array`, or `any`.
6071
+ * @enum {string}
6072
+ */
6073
+ ColumnType: "string" | "number" | "boolean" | "date" | "object" | "array" | "any";
6074
+ /** @description One typed column in a table schema. */
6075
+ ColumnDef: {
6076
+ /** @description Column name used as the key inside row `data`. */
6077
+ name: string;
6078
+ /** @description JSON-compatible value type accepted for this column. */
4760
6079
  type: components["schemas"]["ColumnType"];
4761
6080
  /**
4762
6081
  * @description Whether inserts must include a non-null value for this column.
@@ -4764,7 +6083,8 @@ export interface components {
4764
6083
  */
4765
6084
  required: boolean;
4766
6085
  /**
4767
- * @description Marks the column as an expected filter/sort field so backends can maintain efficient indexes.
6086
+ * @deprecated
6087
+ * @description Compatibility hint retained for older schemas. It does not create a physical database index.
4768
6088
  * @default false
4769
6089
  */
4770
6090
  indexed: boolean;
@@ -4778,21 +6098,31 @@ export interface components {
4778
6098
  */
4779
6099
  deprecated: boolean;
4780
6100
  };
4781
- /** @description Declared index over one or more table columns. */
6101
+ /** @description Compatibility metadata for older table schemas. Declared indexes do not create physical database indexes. */
4782
6102
  IndexDef: {
4783
6103
  /** @description Stable index name unique within the table schema. */
4784
6104
  name: string;
4785
6105
  /** @description Column names included in the index, in order. */
4786
6106
  columns: string[];
4787
6107
  };
4788
- /** @description Column and index definition for a table. Each table has exactly one required string identity column. */
6108
+ /** @description Column definition for a virtual table. Each table has exactly one required string identity column and may nominate one optional string secondary key column. */
4789
6109
  TableSchema: {
4790
6110
  /** @description Name of the required string column that uniquely identifies one row in this table. */
4791
6111
  identity_column: string;
6112
+ /** @description Optional string column projected into the fixed physical `sk` column for efficient secondary lookups. It cannot be changed after creation. */
6113
+ secondary_key_column?: string;
4792
6114
  /** @description Ordered list of columns accepted in row data. */
4793
6115
  columns: components["schemas"]["ColumnDef"][];
4794
- /** @description Optional declared indexes maintained by the backend. */
6116
+ /**
6117
+ * @deprecated
6118
+ * @description Compatibility metadata retained for older schemas. Index declarations do not create physical database indexes.
6119
+ */
4795
6120
  indexes?: components["schemas"]["IndexDef"][];
6121
+ /**
6122
+ * @description Allows rows to include undeclared keys while declared columns continue to be validated.
6123
+ * @default false
6124
+ */
6125
+ open: boolean;
4796
6126
  };
4797
6127
  /**
4798
6128
  * @description Project table metadata and schema.
@@ -4903,14 +6233,14 @@ export interface components {
4903
6233
  approx_data_bytes: number;
4904
6234
  /**
4905
6235
  * Format: int64
4906
- * @description Approximate bytes used by table indexes.
6236
+ * @description Approximate proportional share of fixed table_rows index bytes.
4907
6237
  */
4908
6238
  approx_index_bytes: number;
4909
- /** @description Number of columns with backend-maintained indexes. */
6239
+ /** @description Number of schema columns projected into fixed physical keys. */
4910
6240
  indexed_column_count: number;
4911
- /** @description Number of indexes declared in the table schema. */
6241
+ /** @description Number of compatibility index declarations stored in the table schema. */
4912
6242
  declared_index_count: number;
4913
- /** @description Whether a full-text search index is present for the table. */
6243
+ /** @description Whether the fixed shared full-text search index is present. */
4914
6244
  search_index_present: boolean;
4915
6245
  /**
4916
6246
  * Format: date-time
@@ -4969,13 +6299,13 @@ export interface components {
4969
6299
  description?: string;
4970
6300
  /** @description Optional author guidance for how this table should be used (e.g. surfaced to agents). */
4971
6301
  instructions?: string;
4972
- /** @description Replacement column and index definition. */
6302
+ /** @description Replacement column and index definition. The identity column and required column settings are immutable after creation; newly added columns must be optional. */
4973
6303
  schema?: components["schemas"]["TableSchema"];
4974
6304
  };
4975
6305
  /**
4976
6306
  * @description One stored row in a project table.
4977
6307
  * @example {
4978
- * "id": "tablerow_5p9x2q7m4n8v3r6t",
6308
+ * "id": "row_5p9x2q7m4n8v3r6t",
4979
6309
  * "table_id": "table_2x7q5m9v3p8r4n6t",
4980
6310
  * "data": {
4981
6311
  * "pull_request_url": "https://github.com/deepnoodle-ai/mobius-cloud/pull/123",
@@ -5068,9 +6398,15 @@ export interface components {
5068
6398
  next_cursor?: string;
5069
6399
  };
5070
6400
  SearchRowsRequest: {
5071
- /** @description Token-prefix search query. Hyphens and other punctuation split terms. */
6401
+ /** @description Search query. Hyphens and other punctuation split terms for keyword matching. */
5072
6402
  query: string;
5073
- /** @description Optional column equality or operator filter applied before text search. */
6403
+ /**
6404
+ * @description Search mode. `keyword` uses token-prefix full-text search, `semantic` uses sidecar embedding similarity, and `hybrid` combines both.
6405
+ * @default keyword
6406
+ * @enum {string}
6407
+ */
6408
+ mode: "keyword" | "semantic" | "hybrid";
6409
+ /** @description Optional column equality or operator filter applied before search. */
5074
6410
  filter?: {
5075
6411
  [key: string]: unknown;
5076
6412
  };
@@ -5362,6 +6698,10 @@ export interface components {
5362
6698
  ProjectHandleParam: string;
5363
6699
  /** @description Resource ID. */
5364
6700
  IDParam: string;
6701
+ /** @description Identifier of the conversation session. */
6702
+ SessionIdParam: string;
6703
+ /** @description Identifier of a turn within a session. */
6704
+ TurnIdParam: string;
5365
6705
  /** @description Action name used in loop step definitions. */
5366
6706
  ActionNameParam: string;
5367
6707
  /** @description Principal ID. */
@@ -5370,6 +6710,14 @@ export interface components {
5370
6710
  CursorParam: string;
5371
6711
  /** @description Maximum number of items to return */
5372
6712
  LimitParam: number;
6713
+ /** @description Continuation cursor for sequence-ordered lists. Only include rows whose monotonic per-resource sequence is strictly greater than this value. Pass the `next_sequence` from the previous response to fetch the next page. */
6714
+ AfterSequenceParam: number;
6715
+ /** @description Backward continuation cursor for sequence-ordered lists. Only include rows whose monotonic per-resource sequence is strictly less than this value. Combine with `order=desc` to page toward older rows from a known position; pass the `prev_sequence` from the previous response to fetch the next older page. */
6716
+ BeforeSequenceParam: number;
6717
+ /** @description Scan direction for the page. `asc` (the default) returns oldest-first; `desc` returns newest-first — the way to fetch the latest rows of a long list (the tail) in a single request. Items in the response are always ordered ascending regardless of this value; `order` only selects which end of the list the page is taken from. */
6718
+ OrderParam: "asc" | "desc";
6719
+ /** @description SSE reconnect cursor. The browser EventSource API replays the last event's `id` in this header on automatic reconnect; the server resumes the stream after that sequence number. When both this header and the `after_sequence` query parameter are supplied, the larger sequence wins, so an explicit `after_sequence` never rewinds a live reconnect. Ignored for non-streaming (JSON) requests. */
6720
+ LastEventIDParam: number;
5373
6721
  /** @description ID of the target organization for the admin operation. */
5374
6722
  AdminOrgIDParam: string;
5375
6723
  /** @description Environment ID. */
@@ -5386,6 +6734,8 @@ export interface components {
5386
6734
  IntegrationEventIDParam: string;
5387
6735
  /** @description Framework provider identifier from the integration provider catalog. */
5388
6736
  IntegrationProviderParam: string;
6737
+ /** @description The key identifying a memory entry. Restricted to a path-safe character set (letters, numbers, and `. _ : -`) so it stays reliably addressable. */
6738
+ MemoryKeyParam: string;
5389
6739
  /** @description Table ID. */
5390
6740
  TableIDParam: string;
5391
6741
  /** @description Filter tables by name. Table names are unique within a project; use this as a discovery filter and use the returned table `id` for follow-up operations. */
@@ -5944,6 +7294,32 @@ export interface operations {
5944
7294
  404: components["responses"]["NotFound"];
5945
7295
  };
5946
7296
  };
7297
+ listCatalogWorkerModels: {
7298
+ parameters: {
7299
+ query?: never;
7300
+ header?: never;
7301
+ path: {
7302
+ /** @description Project handle */
7303
+ project_handle: components["parameters"]["ProjectHandleParam"];
7304
+ };
7305
+ cookie?: never;
7306
+ };
7307
+ requestBody?: never;
7308
+ responses: {
7309
+ /** @description OK */
7310
+ 200: {
7311
+ headers: {
7312
+ [name: string]: unknown;
7313
+ };
7314
+ content: {
7315
+ "application/json": components["schemas"]["WorkerModelCatalogResponse"];
7316
+ };
7317
+ };
7318
+ 401: components["responses"]["Unauthorized"];
7319
+ 403: components["responses"]["Forbidden"];
7320
+ 404: components["responses"]["NotFound"];
7321
+ };
7322
+ };
5947
7323
  listEnvironments: {
5948
7324
  parameters: {
5949
7325
  query?: {
@@ -6676,13 +8052,21 @@ export interface operations {
6676
8052
  404: components["responses"]["NotFound"];
6677
8053
  };
6678
8054
  };
6679
- listAgents: {
8055
+ listInteractions: {
6680
8056
  parameters: {
6681
8057
  query?: {
6682
- /** @description Filter to the agent backed by this principal. */
6683
- principal_id?: string;
6684
- /** @description Filter by administrative status (active/inactive), independent of presence. */
6685
- status?: components["schemas"]["AgentStatus"];
8058
+ /** @description Filter by status */
8059
+ status?: "pending" | "completed" | "expired" | "cancelled";
8060
+ /** @description Filter by interaction protocol kind */
8061
+ kind?: components["schemas"]["InteractionKind"];
8062
+ /** @description Filter by originating run ID */
8063
+ run_id?: string;
8064
+ /** @description Filter by resolved target user ID. */
8065
+ target_user_id?: string;
8066
+ /** @description When true, returns only interactions visible to the authenticated user. */
8067
+ inbox?: boolean;
8068
+ /** @description Cursor for pagination (opaque string from previous response) */
8069
+ cursor?: components["parameters"]["CursorParam"];
6686
8070
  /** @description Maximum number of items to return */
6687
8071
  limit?: components["parameters"]["LimitParam"];
6688
8072
  };
@@ -6701,15 +8085,14 @@ export interface operations {
6701
8085
  [name: string]: unknown;
6702
8086
  };
6703
8087
  content: {
6704
- "application/json": components["schemas"]["AgentListResponse"];
8088
+ "application/json": components["schemas"]["InteractionListResponse"];
6705
8089
  };
6706
8090
  };
6707
8091
  401: components["responses"]["Unauthorized"];
6708
8092
  403: components["responses"]["Forbidden"];
6709
- 404: components["responses"]["NotFound"];
6710
8093
  };
6711
8094
  };
6712
- createAgent: {
8095
+ createInteraction: {
6713
8096
  parameters: {
6714
8097
  query?: never;
6715
8098
  header?: never;
@@ -6723,18 +8106,26 @@ export interface operations {
6723
8106
  content: {
6724
8107
  /**
6725
8108
  * @example {
6726
- * "name": "PR reviewer",
6727
- * "description": "Reviews pull requests for risky changes.",
6728
- * "kind": "llm",
6729
- * "color": "teal",
6730
- * "model": "claude-sonnet-4-6",
6731
- * "tool_presentation": "meta",
6732
- * "tags": {
6733
- * "owner": "product"
6734
- * }
8109
+ * "run_id": "run_8q5m2x9v7p3n4r6t",
8110
+ * "signal_name": "manager_approval",
8111
+ * "target_user_ids": [
8112
+ * "user_2f9s3k4m5n6p7q8r"
8113
+ * ],
8114
+ * "kind": "request_approval",
8115
+ * "title": "Approve publishing the April billing report?",
8116
+ * "context": {
8117
+ * "report_id": "rpt_2026_04",
8118
+ * "amount_usd": 12850
8119
+ * },
8120
+ * "spec": {
8121
+ * "mode": "confirm",
8122
+ * "default_confirmed": false
8123
+ * },
8124
+ * "require_all": false,
8125
+ * "expires_at": "2026-04-25T14:30:00Z"
6735
8126
  * }
6736
8127
  */
6737
- "application/json": components["schemas"]["CreateAgentRequest"];
8128
+ "application/json": components["schemas"]["CreateInteractionRequest"];
6738
8129
  };
6739
8130
  };
6740
8131
  responses: {
@@ -6746,9 +8137,284 @@ export interface operations {
6746
8137
  content: {
6747
8138
  /**
6748
8139
  * @example {
6749
- * "id": "agent_5n8p2q7m4x9r3v6t",
6750
- * "principal_id": "agent_5n8p2q7m4x9r3v6t",
6751
- * "name": "PR reviewer",
8140
+ * "id": "iact_6x2m8q5v9p3n7r4t",
8141
+ * "run_id": "run_8q5m2x9v7p3n4r6t",
8142
+ * "signal_name": "manager_approval",
8143
+ * "kind": "request_approval",
8144
+ * "status": "pending",
8145
+ * "title": "Approve publishing the April billing report?",
8146
+ * "context": {
8147
+ * "report_id": "rpt_2026_04",
8148
+ * "amount_usd": 12850
8149
+ * },
8150
+ * "spec": {
8151
+ * "mode": "confirm",
8152
+ * "default_confirmed": false
8153
+ * },
8154
+ * "target_user_ids": [
8155
+ * "user_2f9s3k4m5n6p7q8r"
8156
+ * ],
8157
+ * "expires_at": "2026-04-25T14:30:00Z",
8158
+ * "created_at": "2026-04-24T14:30:00Z",
8159
+ * "updated_at": "2026-04-24T14:30:00Z",
8160
+ * "require_all": false
8161
+ * }
8162
+ */
8163
+ "application/json": components["schemas"]["Interaction"];
8164
+ };
8165
+ };
8166
+ 400: components["responses"]["BadRequest"];
8167
+ 401: components["responses"]["Unauthorized"];
8168
+ 403: components["responses"]["Forbidden"];
8169
+ 404: components["responses"]["NotFound"];
8170
+ };
8171
+ };
8172
+ getInteraction: {
8173
+ parameters: {
8174
+ query?: never;
8175
+ header?: never;
8176
+ path: {
8177
+ /** @description Project handle */
8178
+ project_handle: components["parameters"]["ProjectHandleParam"];
8179
+ /** @description Resource ID. */
8180
+ resource_id: components["parameters"]["IDParam"];
8181
+ };
8182
+ cookie?: never;
8183
+ };
8184
+ requestBody?: never;
8185
+ responses: {
8186
+ /** @description OK */
8187
+ 200: {
8188
+ headers: {
8189
+ [name: string]: unknown;
8190
+ };
8191
+ content: {
8192
+ "application/json": components["schemas"]["Interaction"];
8193
+ };
8194
+ };
8195
+ 401: components["responses"]["Unauthorized"];
8196
+ 403: components["responses"]["Forbidden"];
8197
+ 404: components["responses"]["NotFound"];
8198
+ };
8199
+ };
8200
+ deleteInteraction: {
8201
+ parameters: {
8202
+ query?: never;
8203
+ header?: never;
8204
+ path: {
8205
+ /** @description Project handle */
8206
+ project_handle: components["parameters"]["ProjectHandleParam"];
8207
+ /** @description Resource ID. */
8208
+ resource_id: components["parameters"]["IDParam"];
8209
+ };
8210
+ cookie?: never;
8211
+ };
8212
+ requestBody?: never;
8213
+ responses: {
8214
+ /** @description No Content */
8215
+ 204: {
8216
+ headers: {
8217
+ [name: string]: unknown;
8218
+ };
8219
+ content?: never;
8220
+ };
8221
+ 400: components["responses"]["BadRequest"];
8222
+ 401: components["responses"]["Unauthorized"];
8223
+ 403: components["responses"]["Forbidden"];
8224
+ 404: components["responses"]["NotFound"];
8225
+ };
8226
+ };
8227
+ respondToInteraction: {
8228
+ parameters: {
8229
+ query?: never;
8230
+ header?: never;
8231
+ path: {
8232
+ /** @description Project handle */
8233
+ project_handle: components["parameters"]["ProjectHandleParam"];
8234
+ /** @description Resource ID. */
8235
+ resource_id: components["parameters"]["IDParam"];
8236
+ };
8237
+ cookie?: never;
8238
+ };
8239
+ requestBody: {
8240
+ content: {
8241
+ "application/json": components["schemas"]["RespondToInteractionRequest"];
8242
+ };
8243
+ };
8244
+ responses: {
8245
+ /** @description OK */
8246
+ 200: {
8247
+ headers: {
8248
+ [name: string]: unknown;
8249
+ };
8250
+ content: {
8251
+ /**
8252
+ * @example {
8253
+ * "id": "iact_6x2m8q5v9p3n7r4t",
8254
+ * "run_id": "run_8q5m2x9v7p3n4r6t",
8255
+ * "signal_name": "manager_approval",
8256
+ * "kind": "request_approval",
8257
+ * "status": "completed",
8258
+ * "title": "Approve publishing the April billing report?",
8259
+ * "context": {
8260
+ * "report_id": "rpt_2026_04",
8261
+ * "amount_usd": 12850
8262
+ * },
8263
+ * "spec": {
8264
+ * "mode": "confirm",
8265
+ * "default_confirmed": false
8266
+ * },
8267
+ * "target_user_ids": [
8268
+ * "user_2f9s3k4m5n6p7q8r"
8269
+ * ],
8270
+ * "responder": {
8271
+ * "user_id": "user_2f9s3k4m5n6p7q8r"
8272
+ * },
8273
+ * "resolving_response_id": "iresp_3v7q2m9x5p8n4r6t",
8274
+ * "responses": [
8275
+ * {
8276
+ * "id": "iresp_3v7q2m9x5p8n4r6t",
8277
+ * "interaction_id": "iact_6x2m8q5v9p3n7r4t",
8278
+ * "response_kind": "response",
8279
+ * "state": "submitted",
8280
+ * "responder_user_id": "user_2f9s3k4m5n6p7q8r",
8281
+ * "value": true,
8282
+ * "comment": "Approved for publication.",
8283
+ * "responded_at": "2026-04-24T14:42:00Z",
8284
+ * "created_at": "2026-04-24T14:42:00Z",
8285
+ * "updated_at": "2026-04-24T14:42:00Z"
8286
+ * }
8287
+ * ],
8288
+ * "outcome": true,
8289
+ * "resolved_by": "any_of",
8290
+ * "expires_at": "2026-04-25T14:30:00Z",
8291
+ * "completed_at": "2026-04-24T14:42:00Z",
8292
+ * "created_at": "2026-04-24T14:30:00Z",
8293
+ * "updated_at": "2026-04-24T14:42:00Z",
8294
+ * "require_all": false
8295
+ * }
8296
+ */
8297
+ "application/json": components["schemas"]["Interaction"];
8298
+ };
8299
+ };
8300
+ 400: components["responses"]["BadRequest"];
8301
+ 401: components["responses"]["Unauthorized"];
8302
+ 403: components["responses"]["Forbidden"];
8303
+ 404: components["responses"]["NotFound"];
8304
+ 409: components["responses"]["Conflict"];
8305
+ };
8306
+ };
8307
+ cancelInteraction: {
8308
+ parameters: {
8309
+ query?: never;
8310
+ header?: never;
8311
+ path: {
8312
+ /** @description Project handle */
8313
+ project_handle: components["parameters"]["ProjectHandleParam"];
8314
+ /** @description Resource ID. */
8315
+ resource_id: components["parameters"]["IDParam"];
8316
+ };
8317
+ cookie?: never;
8318
+ };
8319
+ requestBody?: {
8320
+ content: {
8321
+ /**
8322
+ * @example {
8323
+ * "reason": "Superseded by a revised approval request."
8324
+ * }
8325
+ */
8326
+ "application/json": components["schemas"]["CancelInteractionRequest"];
8327
+ };
8328
+ };
8329
+ responses: {
8330
+ /** @description OK */
8331
+ 200: {
8332
+ headers: {
8333
+ [name: string]: unknown;
8334
+ };
8335
+ content: {
8336
+ "application/json": components["schemas"]["Interaction"];
8337
+ };
8338
+ };
8339
+ 400: components["responses"]["BadRequest"];
8340
+ 401: components["responses"]["Unauthorized"];
8341
+ 403: components["responses"]["Forbidden"];
8342
+ 404: components["responses"]["NotFound"];
8343
+ };
8344
+ };
8345
+ listAgents: {
8346
+ parameters: {
8347
+ query?: {
8348
+ /** @description Filter to the agent backed by this principal. */
8349
+ principal_id?: string;
8350
+ /** @description Filter by administrative status (active/inactive), independent of presence. */
8351
+ status?: components["schemas"]["AgentStatus"];
8352
+ /** @description Maximum number of items to return */
8353
+ limit?: components["parameters"]["LimitParam"];
8354
+ };
8355
+ header?: never;
8356
+ path: {
8357
+ /** @description Project handle */
8358
+ project_handle: components["parameters"]["ProjectHandleParam"];
8359
+ };
8360
+ cookie?: never;
8361
+ };
8362
+ requestBody?: never;
8363
+ responses: {
8364
+ /** @description OK */
8365
+ 200: {
8366
+ headers: {
8367
+ [name: string]: unknown;
8368
+ };
8369
+ content: {
8370
+ "application/json": components["schemas"]["AgentListResponse"];
8371
+ };
8372
+ };
8373
+ 401: components["responses"]["Unauthorized"];
8374
+ 403: components["responses"]["Forbidden"];
8375
+ 404: components["responses"]["NotFound"];
8376
+ };
8377
+ };
8378
+ createAgent: {
8379
+ parameters: {
8380
+ query?: never;
8381
+ header?: never;
8382
+ path: {
8383
+ /** @description Project handle */
8384
+ project_handle: components["parameters"]["ProjectHandleParam"];
8385
+ };
8386
+ cookie?: never;
8387
+ };
8388
+ requestBody: {
8389
+ content: {
8390
+ /**
8391
+ * @example {
8392
+ * "name": "PR reviewer",
8393
+ * "description": "Reviews pull requests for risky changes.",
8394
+ * "kind": "llm",
8395
+ * "color": "teal",
8396
+ * "model": "claude-sonnet-4-6",
8397
+ * "tool_presentation": "meta",
8398
+ * "tags": {
8399
+ * "owner": "product"
8400
+ * }
8401
+ * }
8402
+ */
8403
+ "application/json": components["schemas"]["CreateAgentRequest"];
8404
+ };
8405
+ };
8406
+ responses: {
8407
+ /** @description Created */
8408
+ 201: {
8409
+ headers: {
8410
+ [name: string]: unknown;
8411
+ };
8412
+ content: {
8413
+ /**
8414
+ * @example {
8415
+ * "id": "agent_5n8p2q7m4x9r3v6t",
8416
+ * "principal_id": "agent_5n8p2q7m4x9r3v6t",
8417
+ * "name": "PR reviewer",
6752
8418
  * "description": "Reviews pull requests for risky changes.",
6753
8419
  * "kind": "llm",
6754
8420
  * "color": "teal",
@@ -6906,8 +8572,8 @@ export interface operations {
6906
8572
  listTurnMessages: {
6907
8573
  parameters: {
6908
8574
  query?: {
6909
- /** @description Only include messages with sequence greater than this value. */
6910
- after_sequence?: number;
8575
+ /** @description Continuation cursor for sequence-ordered lists. Only include rows whose monotonic per-resource sequence is strictly greater than this value. Pass the `next_sequence` from the previous response to fetch the next page. */
8576
+ after_sequence?: components["parameters"]["AfterSequenceParam"];
6911
8577
  /** @description Maximum number of items to return */
6912
8578
  limit?: components["parameters"]["LimitParam"];
6913
8579
  };
@@ -6915,8 +8581,8 @@ export interface operations {
6915
8581
  path: {
6916
8582
  /** @description Project handle */
6917
8583
  project_handle: components["parameters"]["ProjectHandleParam"];
6918
- /** @description Resource ID. */
6919
- resource_id: components["parameters"]["IDParam"];
8584
+ /** @description Identifier of a turn within a session. */
8585
+ turn_id: components["parameters"]["TurnIdParam"];
6920
8586
  };
6921
8587
  cookie?: never;
6922
8588
  };
@@ -7096,23 +8762,237 @@ export interface operations {
7096
8762
  };
7097
8763
  };
7098
8764
  responses: {
7099
- /** @description OK */
8765
+ /** @description OK */
8766
+ 200: {
8767
+ headers: {
8768
+ [name: string]: unknown;
8769
+ };
8770
+ content: {
8771
+ "application/json": components["schemas"]["ToolkitAssignmentListResponse"];
8772
+ };
8773
+ };
8774
+ 400: components["responses"]["BadRequest"];
8775
+ 401: components["responses"]["Unauthorized"];
8776
+ 403: components["responses"]["Forbidden"];
8777
+ 404: components["responses"]["NotFound"];
8778
+ 429: components["responses"]["TooManyRequests"];
8779
+ };
8780
+ };
8781
+ listAgentSkillAssignments: {
8782
+ parameters: {
8783
+ query?: never;
8784
+ header?: never;
8785
+ path: {
8786
+ /** @description Project handle */
8787
+ project_handle: components["parameters"]["ProjectHandleParam"];
8788
+ /** @description Resource ID. */
8789
+ resource_id: components["parameters"]["IDParam"];
8790
+ };
8791
+ cookie?: never;
8792
+ };
8793
+ requestBody?: never;
8794
+ responses: {
8795
+ /** @description OK */
8796
+ 200: {
8797
+ headers: {
8798
+ [name: string]: unknown;
8799
+ };
8800
+ content: {
8801
+ "application/json": components["schemas"]["SkillAssignmentListResponse"];
8802
+ };
8803
+ };
8804
+ 401: components["responses"]["Unauthorized"];
8805
+ 403: components["responses"]["Forbidden"];
8806
+ 404: components["responses"]["NotFound"];
8807
+ };
8808
+ };
8809
+ replaceAgentSkillAssignments: {
8810
+ parameters: {
8811
+ query?: never;
8812
+ header?: never;
8813
+ path: {
8814
+ /** @description Project handle */
8815
+ project_handle: components["parameters"]["ProjectHandleParam"];
8816
+ /** @description Resource ID. */
8817
+ resource_id: components["parameters"]["IDParam"];
8818
+ };
8819
+ cookie?: never;
8820
+ };
8821
+ requestBody: {
8822
+ content: {
8823
+ /**
8824
+ * @example {
8825
+ * "skill_ids": [
8826
+ * "skill_7n4q8x2m9p5v3r6t"
8827
+ * ]
8828
+ * }
8829
+ */
8830
+ "application/json": components["schemas"]["ReplaceSkillsRequest"];
8831
+ };
8832
+ };
8833
+ responses: {
8834
+ /** @description OK */
8835
+ 200: {
8836
+ headers: {
8837
+ [name: string]: unknown;
8838
+ };
8839
+ content: {
8840
+ "application/json": components["schemas"]["SkillAssignmentListResponse"];
8841
+ };
8842
+ };
8843
+ 400: components["responses"]["BadRequest"];
8844
+ 401: components["responses"]["Unauthorized"];
8845
+ 403: components["responses"]["Forbidden"];
8846
+ 404: components["responses"]["NotFound"];
8847
+ 429: components["responses"]["TooManyRequests"];
8848
+ };
8849
+ };
8850
+ getAgentTools: {
8851
+ parameters: {
8852
+ query?: {
8853
+ /** @description Optional comma-separated toolkit subset to apply. */
8854
+ toolkit_ids?: string;
8855
+ /** @description Optional assigned skill name to preselect as active. */
8856
+ skill_name?: string;
8857
+ /** @description Optional comma-separated canonical action names, wildcard selectors, or group references to apply as a per-invocation filter against the resolved tool set. */
8858
+ allowed_tools?: string;
8859
+ };
8860
+ header?: never;
8861
+ path: {
8862
+ /** @description Project handle */
8863
+ project_handle: components["parameters"]["ProjectHandleParam"];
8864
+ /** @description Resource ID. */
8865
+ resource_id: components["parameters"]["IDParam"];
8866
+ };
8867
+ cookie?: never;
8868
+ };
8869
+ requestBody?: never;
8870
+ responses: {
8871
+ /** @description OK */
8872
+ 200: {
8873
+ headers: {
8874
+ [name: string]: unknown;
8875
+ };
8876
+ content: {
8877
+ "application/json": components["schemas"]["AgentToolManifest"];
8878
+ };
8879
+ };
8880
+ 400: components["responses"]["BadRequest"];
8881
+ 401: components["responses"]["Unauthorized"];
8882
+ 403: components["responses"]["Forbidden"];
8883
+ 404: components["responses"]["NotFound"];
8884
+ };
8885
+ };
8886
+ getAgentMemory: {
8887
+ parameters: {
8888
+ query?: never;
8889
+ header?: never;
8890
+ path: {
8891
+ /** @description Project handle */
8892
+ project_handle: components["parameters"]["ProjectHandleParam"];
8893
+ /** @description Resource ID. */
8894
+ resource_id: components["parameters"]["IDParam"];
8895
+ };
8896
+ cookie?: never;
8897
+ };
8898
+ requestBody?: never;
8899
+ responses: {
8900
+ /** @description OK */
8901
+ 200: {
8902
+ headers: {
8903
+ [name: string]: unknown;
8904
+ };
8905
+ content: {
8906
+ "application/json": components["schemas"]["AgentMemory"];
8907
+ };
8908
+ };
8909
+ 401: components["responses"]["Unauthorized"];
8910
+ 403: components["responses"]["Forbidden"];
8911
+ 404: components["responses"]["NotFound"];
8912
+ };
8913
+ };
8914
+ listAgentMemoryEntries: {
8915
+ parameters: {
8916
+ query?: {
8917
+ /** @description Optional keyword search over entry keys and content. Omit to list. */
8918
+ query?: string;
8919
+ /** @description Optional filter to a single memory kind. */
8920
+ kind?: components["schemas"]["MemoryKind"];
8921
+ /** @description Cursor for pagination (opaque string from previous response) */
8922
+ cursor?: components["parameters"]["CursorParam"];
8923
+ /** @description Maximum number of items to return */
8924
+ limit?: components["parameters"]["LimitParam"];
8925
+ };
8926
+ header?: never;
8927
+ path: {
8928
+ /** @description Project handle */
8929
+ project_handle: components["parameters"]["ProjectHandleParam"];
8930
+ /** @description Resource ID. */
8931
+ resource_id: components["parameters"]["IDParam"];
8932
+ };
8933
+ cookie?: never;
8934
+ };
8935
+ requestBody?: never;
8936
+ responses: {
8937
+ /** @description OK */
8938
+ 200: {
8939
+ headers: {
8940
+ [name: string]: unknown;
8941
+ };
8942
+ content: {
8943
+ "application/json": components["schemas"]["AgentMemoryEntryListResponse"];
8944
+ };
8945
+ };
8946
+ 401: components["responses"]["Unauthorized"];
8947
+ 403: components["responses"]["Forbidden"];
8948
+ 404: components["responses"]["NotFound"];
8949
+ };
8950
+ };
8951
+ putAgentMemoryEntry: {
8952
+ parameters: {
8953
+ query?: never;
8954
+ header?: never;
8955
+ path: {
8956
+ /** @description Project handle */
8957
+ project_handle: components["parameters"]["ProjectHandleParam"];
8958
+ /** @description Resource ID. */
8959
+ resource_id: components["parameters"]["IDParam"];
8960
+ /** @description The key identifying a memory entry. Restricted to a path-safe character set (letters, numbers, and `. _ : -`) so it stays reliably addressable. */
8961
+ memory_key: components["parameters"]["MemoryKeyParam"];
8962
+ };
8963
+ cookie?: never;
8964
+ };
8965
+ requestBody: {
8966
+ content: {
8967
+ "application/json": components["schemas"]["PutAgentMemoryEntryRequest"];
8968
+ };
8969
+ };
8970
+ responses: {
8971
+ /** @description Updated */
7100
8972
  200: {
7101
8973
  headers: {
7102
8974
  [name: string]: unknown;
7103
8975
  };
7104
8976
  content: {
7105
- "application/json": components["schemas"]["ToolkitAssignmentListResponse"];
8977
+ "application/json": components["schemas"]["AgentMemoryEntry"];
8978
+ };
8979
+ };
8980
+ /** @description Created */
8981
+ 201: {
8982
+ headers: {
8983
+ [name: string]: unknown;
8984
+ };
8985
+ content: {
8986
+ "application/json": components["schemas"]["AgentMemoryEntry"];
7106
8987
  };
7107
8988
  };
7108
8989
  400: components["responses"]["BadRequest"];
7109
8990
  401: components["responses"]["Unauthorized"];
7110
8991
  403: components["responses"]["Forbidden"];
7111
8992
  404: components["responses"]["NotFound"];
7112
- 429: components["responses"]["TooManyRequests"];
7113
8993
  };
7114
8994
  };
7115
- listAgentSkillAssignments: {
8995
+ deleteAgentMemoryEntry: {
7116
8996
  parameters: {
7117
8997
  query?: never;
7118
8998
  header?: never;
@@ -7121,34 +9001,32 @@ export interface operations {
7121
9001
  project_handle: components["parameters"]["ProjectHandleParam"];
7122
9002
  /** @description Resource ID. */
7123
9003
  resource_id: components["parameters"]["IDParam"];
9004
+ /** @description The key identifying a memory entry. Restricted to a path-safe character set (letters, numbers, and `. _ : -`) so it stays reliably addressable. */
9005
+ memory_key: components["parameters"]["MemoryKeyParam"];
7124
9006
  };
7125
9007
  cookie?: never;
7126
9008
  };
7127
9009
  requestBody?: never;
7128
9010
  responses: {
7129
- /** @description OK */
7130
- 200: {
9011
+ /** @description Deleted */
9012
+ 204: {
7131
9013
  headers: {
7132
9014
  [name: string]: unknown;
7133
9015
  };
7134
- content: {
7135
- "application/json": components["schemas"]["SkillAssignmentListResponse"];
7136
- };
9016
+ content?: never;
7137
9017
  };
7138
9018
  401: components["responses"]["Unauthorized"];
7139
9019
  403: components["responses"]["Forbidden"];
7140
9020
  404: components["responses"]["NotFound"];
7141
9021
  };
7142
9022
  };
7143
- replaceAgentSkillAssignments: {
9023
+ invokeAgent: {
7144
9024
  parameters: {
7145
9025
  query?: never;
7146
9026
  header?: never;
7147
9027
  path: {
7148
9028
  /** @description Project handle */
7149
9029
  project_handle: components["parameters"]["ProjectHandleParam"];
7150
- /** @description Resource ID. */
7151
- resource_id: components["parameters"]["IDParam"];
7152
9030
  };
7153
9031
  cookie?: never;
7154
9032
  };
@@ -7156,65 +9034,63 @@ export interface operations {
7156
9034
  content: {
7157
9035
  /**
7158
9036
  * @example {
7159
- * "skill_ids": [
7160
- * "skill_7n4q8x2m9p5v3r6t"
7161
- * ]
9037
+ * "agent_ref": {
9038
+ * "id": "agent_5n8p2q7m4x9r3v6t"
9039
+ * },
9040
+ * "session": {
9041
+ * "mode": "continue_or_create",
9042
+ * "session_key": "app:acct_123:user_456:slack:support:thread_789",
9043
+ * "title": "Support in Slack",
9044
+ * "metadata": {
9045
+ * "account_id": "acct_123",
9046
+ * "user_id": "user_456"
9047
+ * }
9048
+ * },
9049
+ * "input": {
9050
+ * "content": [
9051
+ * {
9052
+ * "type": "text",
9053
+ * "text": "Can you summarize my open tickets?"
9054
+ * }
9055
+ * ],
9056
+ * "idempotency_key": "slack:evt_0a1b2c3d"
9057
+ * },
9058
+ * "channel_context": {
9059
+ * "provider": "slack",
9060
+ * "workspace_id": "T123",
9061
+ * "channel_id": "C123",
9062
+ * "thread_id": "1700000000.123"
9063
+ * }
7162
9064
  * }
7163
9065
  */
7164
- "application/json": components["schemas"]["ReplaceSkillsRequest"];
9066
+ "application/json": components["schemas"]["InvokeAgentRequest"];
7165
9067
  };
7166
9068
  };
7167
9069
  responses: {
7168
- /** @description OK */
9070
+ /** @description Server-sent event stream of the turn's activity, returned when the request sets `Accept: text/event-stream`. Framing matches `GET /v1/projects/{project_handle}/sessions/{session_id}/stream`. */
7169
9071
  200: {
7170
9072
  headers: {
7171
9073
  [name: string]: unknown;
7172
9074
  };
7173
9075
  content: {
7174
- "application/json": components["schemas"]["SkillAssignmentListResponse"];
9076
+ "text/event-stream": components["schemas"]["SessionStreamFrame"];
7175
9077
  };
7176
9078
  };
7177
- 400: components["responses"]["BadRequest"];
7178
- 401: components["responses"]["Unauthorized"];
7179
- 403: components["responses"]["Forbidden"];
7180
- 404: components["responses"]["NotFound"];
7181
- 429: components["responses"]["TooManyRequests"];
7182
- };
7183
- };
7184
- getAgentTools: {
7185
- parameters: {
7186
- query?: {
7187
- /** @description Optional comma-separated toolkit subset to apply. */
7188
- toolkit_ids?: string;
7189
- /** @description Optional assigned skill name to preselect as active. */
7190
- skill_name?: string;
7191
- /** @description Optional comma-separated canonical action names, wildcard selectors, or group references to apply as a per-invocation filter against the resolved tool set. */
7192
- allowed_tools?: string;
7193
- };
7194
- header?: never;
7195
- path: {
7196
- /** @description Project handle */
7197
- project_handle: components["parameters"]["ProjectHandleParam"];
7198
- /** @description Resource ID. */
7199
- resource_id: components["parameters"]["IDParam"];
7200
- };
7201
- cookie?: never;
7202
- };
7203
- requestBody?: never;
7204
- responses: {
7205
- /** @description OK */
7206
- 200: {
9079
+ /** @description The turn was accepted and is running. */
9080
+ 202: {
7207
9081
  headers: {
7208
9082
  [name: string]: unknown;
7209
9083
  };
7210
9084
  content: {
7211
- "application/json": components["schemas"]["AgentToolManifest"];
9085
+ "application/json": components["schemas"]["TurnAck"];
7212
9086
  };
7213
9087
  };
7214
9088
  400: components["responses"]["BadRequest"];
7215
9089
  401: components["responses"]["Unauthorized"];
7216
9090
  403: components["responses"]["Forbidden"];
7217
9091
  404: components["responses"]["NotFound"];
9092
+ 409: components["responses"]["Conflict"];
9093
+ 429: components["responses"]["TooManyRequests"];
7218
9094
  };
7219
9095
  };
7220
9096
  listSessions: {
@@ -7222,6 +9098,8 @@ export interface operations {
7222
9098
  query?: {
7223
9099
  /** @description Filter to sessions owned by this agent. */
7224
9100
  agent_id?: string;
9101
+ /** @description Look up the session with this exact routing key — a read-only deterministic lookup that avoids a create-or-resolve round trip, returning the one matching session or an empty list. Requires `agent_id`, since session keys are scoped to an agent. */
9102
+ session_key?: string;
7225
9103
  /** @description Filter by session status. */
7226
9104
  status?: components["schemas"]["SessionStatus"];
7227
9105
  /** @description Filter by session scope. */
@@ -7232,6 +9110,8 @@ export interface operations {
7232
9110
  integration_id?: string;
7233
9111
  /** @description Only include sessions with activity after this timestamp. */
7234
9112
  since?: string;
9113
+ /** @description Cursor for pagination (opaque string from previous response) */
9114
+ cursor?: components["parameters"]["CursorParam"];
7235
9115
  /** @description Maximum number of items to return */
7236
9116
  limit?: components["parameters"]["LimitParam"];
7237
9117
  };
@@ -7296,8 +9176,8 @@ export interface operations {
7296
9176
  path: {
7297
9177
  /** @description Project handle */
7298
9178
  project_handle: components["parameters"]["ProjectHandleParam"];
7299
- /** @description Resource ID. */
7300
- resource_id: components["parameters"]["IDParam"];
9179
+ /** @description Identifier of the conversation session. */
9180
+ session_id: components["parameters"]["SessionIdParam"];
7301
9181
  };
7302
9182
  cookie?: never;
7303
9183
  };
@@ -7324,8 +9204,8 @@ export interface operations {
7324
9204
  path: {
7325
9205
  /** @description Project handle */
7326
9206
  project_handle: components["parameters"]["ProjectHandleParam"];
7327
- /** @description Resource ID. */
7328
- resource_id: components["parameters"]["IDParam"];
9207
+ /** @description Identifier of the conversation session. */
9208
+ session_id: components["parameters"]["SessionIdParam"];
7329
9209
  };
7330
9210
  cookie?: never;
7331
9211
  };
@@ -7352,8 +9232,8 @@ export interface operations {
7352
9232
  path: {
7353
9233
  /** @description Project handle */
7354
9234
  project_handle: components["parameters"]["ProjectHandleParam"];
7355
- /** @description Resource ID. */
7356
- resource_id: components["parameters"]["IDParam"];
9235
+ /** @description Identifier of the conversation session. */
9236
+ session_id: components["parameters"]["SessionIdParam"];
7357
9237
  };
7358
9238
  cookie?: never;
7359
9239
  };
@@ -7383,8 +9263,12 @@ export interface operations {
7383
9263
  listSessionMessages: {
7384
9264
  parameters: {
7385
9265
  query?: {
7386
- /** @description Only include messages with sequence greater than this value. */
7387
- after_sequence?: number;
9266
+ /** @description Continuation cursor for sequence-ordered lists. Only include rows whose monotonic per-resource sequence is strictly greater than this value. Pass the `next_sequence` from the previous response to fetch the next page. */
9267
+ after_sequence?: components["parameters"]["AfterSequenceParam"];
9268
+ /** @description Backward continuation cursor for sequence-ordered lists. Only include rows whose monotonic per-resource sequence is strictly less than this value. Combine with `order=desc` to page toward older rows from a known position; pass the `prev_sequence` from the previous response to fetch the next older page. */
9269
+ before_sequence?: components["parameters"]["BeforeSequenceParam"];
9270
+ /** @description Scan direction for the page. `asc` (the default) returns oldest-first; `desc` returns newest-first — the way to fetch the latest rows of a long list (the tail) in a single request. Items in the response are always ordered ascending regardless of this value; `order` only selects which end of the list the page is taken from. */
9271
+ order?: components["parameters"]["OrderParam"];
7388
9272
  /** @description Maximum number of items to return */
7389
9273
  limit?: components["parameters"]["LimitParam"];
7390
9274
  };
@@ -7392,8 +9276,8 @@ export interface operations {
7392
9276
  path: {
7393
9277
  /** @description Project handle */
7394
9278
  project_handle: components["parameters"]["ProjectHandleParam"];
7395
- /** @description Resource ID. */
7396
- resource_id: components["parameters"]["IDParam"];
9279
+ /** @description Identifier of the conversation session. */
9280
+ session_id: components["parameters"]["SessionIdParam"];
7397
9281
  };
7398
9282
  cookie?: never;
7399
9283
  };
@@ -7420,8 +9304,8 @@ export interface operations {
7420
9304
  path: {
7421
9305
  /** @description Project handle */
7422
9306
  project_handle: components["parameters"]["ProjectHandleParam"];
7423
- /** @description Resource ID. */
7424
- resource_id: components["parameters"]["IDParam"];
9307
+ /** @description Identifier of the conversation session. */
9308
+ session_id: components["parameters"]["SessionIdParam"];
7425
9309
  };
7426
9310
  cookie?: never;
7427
9311
  };
@@ -7449,13 +9333,22 @@ export interface operations {
7449
9333
  };
7450
9334
  listSessionTurns: {
7451
9335
  parameters: {
7452
- query?: never;
9336
+ query?: {
9337
+ /** @description Return exactly the turns with these ids (the transcript-join primitive). When set, pagination and ordering are ignored and the named turns are returned in chronological order. */
9338
+ ids?: string[];
9339
+ /** @description Scan direction for the page. `asc` (the default) returns oldest-first; `desc` returns newest-first — the way to fetch the latest rows of a long list (the tail) in a single request. Items in the response are always ordered ascending regardless of this value; `order` only selects which end of the list the page is taken from. */
9340
+ order?: components["parameters"]["OrderParam"];
9341
+ /** @description Cursor for pagination (opaque string from previous response) */
9342
+ cursor?: components["parameters"]["CursorParam"];
9343
+ /** @description Maximum number of items to return */
9344
+ limit?: components["parameters"]["LimitParam"];
9345
+ };
7453
9346
  header?: never;
7454
9347
  path: {
7455
9348
  /** @description Project handle */
7456
9349
  project_handle: components["parameters"]["ProjectHandleParam"];
7457
- /** @description Resource ID. */
7458
- resource_id: components["parameters"]["IDParam"];
9350
+ /** @description Identifier of the conversation session. */
9351
+ session_id: components["parameters"]["SessionIdParam"];
7459
9352
  };
7460
9353
  cookie?: never;
7461
9354
  };
@@ -7475,30 +9368,103 @@ export interface operations {
7475
9368
  404: components["responses"]["NotFound"];
7476
9369
  };
7477
9370
  };
7478
- streamSessionEvents: {
9371
+ startTurn: {
7479
9372
  parameters: {
7480
- query?: {
7481
- /** @description Resume the stream after this durable event sequence number. */
7482
- after_sequence?: number;
9373
+ query?: never;
9374
+ header?: never;
9375
+ path: {
9376
+ /** @description Project handle */
9377
+ project_handle: components["parameters"]["ProjectHandleParam"];
9378
+ /** @description Identifier of the conversation session. */
9379
+ session_id: components["parameters"]["SessionIdParam"];
9380
+ };
9381
+ cookie?: never;
9382
+ };
9383
+ requestBody: {
9384
+ content: {
9385
+ "application/json": components["schemas"]["StartTurnRequest"];
9386
+ };
9387
+ };
9388
+ responses: {
9389
+ /** @description Server-sent event stream of the turn's activity, returned when the request sets `Accept: text/event-stream`. Framing matches `GET .../stream`. */
9390
+ 200: {
9391
+ headers: {
9392
+ [name: string]: unknown;
9393
+ };
9394
+ content: {
9395
+ "text/event-stream": components["schemas"]["SessionStreamFrame"];
9396
+ };
9397
+ };
9398
+ /** @description The turn was accepted and is running. */
9399
+ 202: {
9400
+ headers: {
9401
+ [name: string]: unknown;
9402
+ };
9403
+ content: {
9404
+ "application/json": components["schemas"]["TurnAck"];
9405
+ };
9406
+ };
9407
+ 400: components["responses"]["BadRequest"];
9408
+ 401: components["responses"]["Unauthorized"];
9409
+ 403: components["responses"]["Forbidden"];
9410
+ 404: components["responses"]["NotFound"];
9411
+ 409: components["responses"]["Conflict"];
9412
+ 429: components["responses"]["TooManyRequests"];
9413
+ };
9414
+ };
9415
+ getSessionTurn: {
9416
+ parameters: {
9417
+ query?: never;
9418
+ header?: never;
9419
+ path: {
9420
+ /** @description Project handle */
9421
+ project_handle: components["parameters"]["ProjectHandleParam"];
9422
+ /** @description Identifier of the conversation session. */
9423
+ session_id: components["parameters"]["SessionIdParam"];
9424
+ /** @description Identifier of a turn within a session. */
9425
+ turn_id: components["parameters"]["TurnIdParam"];
9426
+ };
9427
+ cookie?: never;
9428
+ };
9429
+ requestBody?: never;
9430
+ responses: {
9431
+ /** @description OK */
9432
+ 200: {
9433
+ headers: {
9434
+ [name: string]: unknown;
9435
+ };
9436
+ content: {
9437
+ "application/json": components["schemas"]["AgentTurn"];
9438
+ };
7483
9439
  };
9440
+ 401: components["responses"]["Unauthorized"];
9441
+ 403: components["responses"]["Forbidden"];
9442
+ 404: components["responses"]["NotFound"];
9443
+ };
9444
+ };
9445
+ getSessionTurnLive: {
9446
+ parameters: {
9447
+ query?: never;
7484
9448
  header?: never;
7485
9449
  path: {
7486
9450
  /** @description Project handle */
7487
9451
  project_handle: components["parameters"]["ProjectHandleParam"];
7488
- /** @description Resource ID. */
7489
- resource_id: components["parameters"]["IDParam"];
9452
+ /** @description Identifier of the conversation session. */
9453
+ session_id: components["parameters"]["SessionIdParam"];
9454
+ /** @description Identifier of a turn within a session. */
9455
+ turn_id: components["parameters"]["TurnIdParam"];
7490
9456
  };
7491
9457
  cookie?: never;
7492
9458
  };
7493
9459
  requestBody?: never;
7494
9460
  responses: {
7495
- /** @description Server-sent event stream of session activity. Each message is framed as `event: <event type>` followed by a `data:` line carrying the JSON-encoded event payload (the `SessionStreamEvent` shape, always including `session_id`). Durable events also carry an `id:` line with the event sequence number for `Last-Event-ID` resume. */
9461
+ /** @description OK */
7496
9462
  200: {
7497
9463
  headers: {
7498
9464
  [name: string]: unknown;
7499
9465
  };
7500
9466
  content: {
7501
- "text/event-stream": components["schemas"]["SessionStreamEvent"];
9467
+ "application/json": components["schemas"]["SessionLiveSnapshot"];
7502
9468
  };
7503
9469
  };
7504
9470
  401: components["responses"]["Unauthorized"];
@@ -7506,39 +9472,68 @@ export interface operations {
7506
9472
  404: components["responses"]["NotFound"];
7507
9473
  };
7508
9474
  };
7509
- sendSessionEvents: {
9475
+ cancelTurn: {
7510
9476
  parameters: {
7511
9477
  query?: never;
7512
9478
  header?: never;
7513
9479
  path: {
7514
9480
  /** @description Project handle */
7515
9481
  project_handle: components["parameters"]["ProjectHandleParam"];
7516
- /** @description Resource ID. */
7517
- resource_id: components["parameters"]["IDParam"];
9482
+ /** @description Identifier of the conversation session. */
9483
+ session_id: components["parameters"]["SessionIdParam"];
9484
+ /** @description Identifier of a turn within a session. */
9485
+ turn_id: components["parameters"]["TurnIdParam"];
7518
9486
  };
7519
9487
  cookie?: never;
7520
9488
  };
7521
- requestBody: {
7522
- content: {
7523
- "application/json": components["schemas"]["SendSessionEventsRequest"];
9489
+ requestBody?: never;
9490
+ responses: {
9491
+ /** @description OK */
9492
+ 200: {
9493
+ headers: {
9494
+ [name: string]: unknown;
9495
+ };
9496
+ content: {
9497
+ "application/json": components["schemas"]["AgentTurn"];
9498
+ };
7524
9499
  };
9500
+ 401: components["responses"]["Unauthorized"];
9501
+ 403: components["responses"]["Forbidden"];
9502
+ 404: components["responses"]["NotFound"];
9503
+ };
9504
+ };
9505
+ streamSession: {
9506
+ parameters: {
9507
+ query?: {
9508
+ /** @description Continuation cursor for sequence-ordered lists. Only include rows whose monotonic per-resource sequence is strictly greater than this value. Pass the `next_sequence` from the previous response to fetch the next page. */
9509
+ after_sequence?: components["parameters"]["AfterSequenceParam"];
9510
+ };
9511
+ header?: {
9512
+ /** @description SSE reconnect cursor. The browser EventSource API replays the last event's `id` in this header on automatic reconnect; the server resumes the stream after that sequence number. When both this header and the `after_sequence` query parameter are supplied, the larger sequence wins, so an explicit `after_sequence` never rewinds a live reconnect. Ignored for non-streaming (JSON) requests. */
9513
+ "Last-Event-ID"?: components["parameters"]["LastEventIDParam"];
9514
+ };
9515
+ path: {
9516
+ /** @description Project handle */
9517
+ project_handle: components["parameters"]["ProjectHandleParam"];
9518
+ /** @description Identifier of the conversation session. */
9519
+ session_id: components["parameters"]["SessionIdParam"];
9520
+ };
9521
+ cookie?: never;
7525
9522
  };
9523
+ requestBody?: never;
7526
9524
  responses: {
7527
- /** @description The invocation was accepted and is running. */
7528
- 202: {
9525
+ /** @description A Server-Sent Events stream of session activity. Each frame is `event: <event type>` followed by a `data:` line carrying the JSON-encoded payload. Durable message frames carry an `id:` line with the message `sequence` for `Last-Event-ID` resume; live-only frames (`generation.delta`, `session.message.preview`, `session.resync`, `tool.call`, `tool.result`) do not carry `id:` and cannot be replayed. */
9526
+ 200: {
7529
9527
  headers: {
7530
9528
  [name: string]: unknown;
7531
9529
  };
7532
9530
  content: {
7533
- "application/json": components["schemas"]["SessionInvocationAck"];
9531
+ "text/event-stream": components["schemas"]["SessionStreamFrame"];
7534
9532
  };
7535
9533
  };
7536
- 400: components["responses"]["BadRequest"];
7537
9534
  401: components["responses"]["Unauthorized"];
7538
9535
  403: components["responses"]["Forbidden"];
7539
9536
  404: components["responses"]["NotFound"];
7540
- 409: components["responses"]["Conflict"];
7541
- 429: components["responses"]["TooManyRequests"];
7542
9537
  };
7543
9538
  };
7544
9539
  cancelSession: {
@@ -7548,8 +9543,36 @@ export interface operations {
7548
9543
  path: {
7549
9544
  /** @description Project handle */
7550
9545
  project_handle: components["parameters"]["ProjectHandleParam"];
7551
- /** @description Resource ID. */
7552
- resource_id: components["parameters"]["IDParam"];
9546
+ /** @description Identifier of the conversation session. */
9547
+ session_id: components["parameters"]["SessionIdParam"];
9548
+ };
9549
+ cookie?: never;
9550
+ };
9551
+ requestBody?: never;
9552
+ responses: {
9553
+ /** @description OK */
9554
+ 200: {
9555
+ headers: {
9556
+ [name: string]: unknown;
9557
+ };
9558
+ content: {
9559
+ "application/json": components["schemas"]["Session"];
9560
+ };
9561
+ };
9562
+ 401: components["responses"]["Unauthorized"];
9563
+ 403: components["responses"]["Forbidden"];
9564
+ 404: components["responses"]["NotFound"];
9565
+ };
9566
+ };
9567
+ compactSession: {
9568
+ parameters: {
9569
+ query?: never;
9570
+ header?: never;
9571
+ path: {
9572
+ /** @description Project handle */
9573
+ project_handle: components["parameters"]["ProjectHandleParam"];
9574
+ /** @description Identifier of the conversation session. */
9575
+ session_id: components["parameters"]["SessionIdParam"];
7553
9576
  };
7554
9577
  cookie?: never;
7555
9578
  };
@@ -7567,6 +9590,7 @@ export interface operations {
7567
9590
  401: components["responses"]["Unauthorized"];
7568
9591
  403: components["responses"]["Forbidden"];
7569
9592
  404: components["responses"]["NotFound"];
9593
+ 409: components["responses"]["Conflict"];
7570
9594
  };
7571
9595
  };
7572
9596
  listLoops: {
@@ -8101,38 +10125,10 @@ export interface operations {
8101
10125
  /** @description Maximum number of items to return */
8102
10126
  limit?: components["parameters"]["LimitParam"];
8103
10127
  };
8104
- header?: never;
8105
- path: {
8106
- /** @description Project handle */
8107
- project_handle: components["parameters"]["ProjectHandleParam"];
8108
- /** @description Resource ID. */
8109
- resource_id: components["parameters"]["IDParam"];
8110
- };
8111
- cookie?: never;
8112
- };
8113
- requestBody?: never;
8114
- responses: {
8115
- /** @description OK */
8116
- 200: {
8117
- headers: {
8118
- [name: string]: unknown;
8119
- };
8120
- content: {
8121
- "application/json": components["schemas"]["LoopRunEventListResponse"];
8122
- };
8123
- };
8124
- 401: components["responses"]["Unauthorized"];
8125
- 403: components["responses"]["Forbidden"];
8126
- 404: components["responses"]["NotFound"];
8127
- };
8128
- };
8129
- streamRunEvents: {
8130
- parameters: {
8131
- query?: {
8132
- /** @description Stream events with sequence > after_sequence. */
8133
- after_sequence?: number;
10128
+ header?: {
10129
+ /** @description SSE reconnect cursor. The browser EventSource API replays the last event's `id` in this header on automatic reconnect; the server resumes the stream after that sequence number. When both this header and the `after_sequence` query parameter are supplied, the larger sequence wins, so an explicit `after_sequence` never rewinds a live reconnect. Ignored for non-streaming (JSON) requests. */
10130
+ "Last-Event-ID"?: components["parameters"]["LastEventIDParam"];
8134
10131
  };
8135
- header?: never;
8136
10132
  path: {
8137
10133
  /** @description Project handle */
8138
10134
  project_handle: components["parameters"]["ProjectHandleParam"];
@@ -8143,13 +10139,14 @@ export interface operations {
8143
10139
  };
8144
10140
  requestBody?: never;
8145
10141
  responses: {
8146
- /** @description Server-sent event stream. Each message is framed as `event: <run-event type>` followed by a `data:` line carrying the JSON-encoded run event (the `LoopRunEvent` shape). The stream ends when the run reaches a terminal status; reconnect with `after_sequence` (or the `Last-Event-ID` header) to resume. */
10142
+ /** @description A JSON page of run events, or, when the request sets `Accept: text/event-stream`, a Server-Sent Events stream where each durable message is framed as `id: <sequence>`, `event: <run-event type>`, and a `data:` line carrying the JSON-encoded `LoopRunEvent`. Agent transcript content and token previews are streamed on the referenced session stream, not on the run stream. */
8147
10143
  200: {
8148
10144
  headers: {
8149
10145
  [name: string]: unknown;
8150
10146
  };
8151
10147
  content: {
8152
- "text/event-stream": components["schemas"]["LoopRunEvent"];
10148
+ "application/json": components["schemas"]["LoopRunEventListResponse"];
10149
+ "text/event-stream": components["schemas"]["LoopRunStreamFrame"];
8153
10150
  };
8154
10151
  };
8155
10152
  401: components["responses"]["Unauthorized"];
@@ -8962,7 +10959,7 @@ export interface operations {
8962
10959
  content: {
8963
10960
  /**
8964
10961
  * @example {
8965
- * "id": "tablerow_5p9x2q7m4n8v3r6t",
10962
+ * "id": "row_5p9x2q7m4n8v3r6t",
8966
10963
  * "table_id": "table_2x7q5m9v3p8r4n6t",
8967
10964
  * "data": {
8968
10965
  * "pull_request_url": "https://github.com/deepnoodle-ai/mobius-cloud/pull/123",
@@ -9031,7 +11028,7 @@ export interface operations {
9031
11028
  * @example {
9032
11029
  * "items": [
9033
11030
  * {
9034
- * "id": "tablerow_5p9x2q7m4n8v3r6t",
11031
+ * "id": "row_5p9x2q7m4n8v3r6t",
9035
11032
  * "table_id": "table_2x7q5m9v3p8r4n6t",
9036
11033
  * "data": {
9037
11034
  * "pull_request_url": "https://github.com/deepnoodle-ai/mobius-cloud/pull/123",
@@ -9094,7 +11091,7 @@ export interface operations {
9094
11091
  * @example {
9095
11092
  * "items": [
9096
11093
  * {
9097
- * "id": "tablerow_5p9x2q7m4n8v3r6t",
11094
+ * "id": "row_5p9x2q7m4n8v3r6t",
9098
11095
  * "table_id": "table_2x7q5m9v3p8r4n6t",
9099
11096
  * "data": {
9100
11097
  * "pull_request_url": "https://github.com/deepnoodle-ai/mobius-cloud/pull/123",
@@ -9156,7 +11153,7 @@ export interface operations {
9156
11153
  /**
9157
11154
  * @example {
9158
11155
  * "row": {
9159
- * "id": "tablerow_5p9x2q7m4n8v3r6t",
11156
+ * "id": "row_5p9x2q7m4n8v3r6t",
9160
11157
  * "table_id": "table_2x7q5m9v3p8r4n6t",
9161
11158
  * "data": {
9162
11159
  * "pull_request_url": "https://github.com/deepnoodle-ai/mobius-cloud/pull/123",
@@ -9182,7 +11179,7 @@ export interface operations {
9182
11179
  /**
9183
11180
  * @example {
9184
11181
  * "row": {
9185
- * "id": "tablerow_6n3r8v4m7q2x9p5t",
11182
+ * "id": "row_6n3r8v4m7q2x9p5t",
9186
11183
  * "table_id": "table_2x7q5m9v3p8r4n6t",
9187
11184
  * "data": {
9188
11185
  * "pull_request_url": "https://github.com/deepnoodle-ai/mobius-cloud/pull/124",
@@ -9252,7 +11249,7 @@ export interface operations {
9252
11249
  * "inserted": 2,
9253
11250
  * "items": [
9254
11251
  * {
9255
- * "id": "tablerow_5p9x2q7m4n8v3r6t",
11252
+ * "id": "row_5p9x2q7m4n8v3r6t",
9256
11253
  * "table_id": "table_2x7q5m9v3p8r4n6t",
9257
11254
  * "data": {
9258
11255
  * "pull_request_url": "https://github.com/deepnoodle-ai/mobius-cloud/pull/123",
@@ -9300,7 +11297,7 @@ export interface operations {
9300
11297
  content: {
9301
11298
  /**
9302
11299
  * @example {
9303
- * "id": "tablerow_5p9x2q7m4n8v3r6t",
11300
+ * "id": "row_5p9x2q7m4n8v3r6t",
9304
11301
  * "table_id": "table_2x7q5m9v3p8r4n6t",
9305
11302
  * "data": {
9306
11303
  * "pull_request_url": "https://github.com/deepnoodle-ai/mobius-cloud/pull/123",
@@ -9385,7 +11382,7 @@ export interface operations {
9385
11382
  content: {
9386
11383
  /**
9387
11384
  * @example {
9388
- * "id": "tablerow_5p9x2q7m4n8v3r6t",
11385
+ * "id": "row_5p9x2q7m4n8v3r6t",
9389
11386
  * "table_id": "table_2x7q5m9v3p8r4n6t",
9390
11387
  * "data": {
9391
11388
  * "pull_request_url": "https://github.com/deepnoodle-ai/mobius-cloud/pull/123",