@deepnoodle/mobius 0.0.23 → 0.0.24

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.
@@ -17,7 +17,7 @@ export interface paths {
17
17
  get: operations["listAPIKeys"];
18
18
  put?: never;
19
19
  /**
20
- * Create an API key
20
+ * Create API key
21
21
  * @description Creates an API key bound to a machine principal in this project. The key authenticates as that principal; associated permissions come from that principal's role assignments. The raw key value is returned in `key` and is never retrievable again after this response.
22
22
  */
23
23
  post: operations["createAPIKey"];
@@ -35,14 +35,14 @@ export interface paths {
35
35
  cookie?: never;
36
36
  };
37
37
  /**
38
- * Get an API key
38
+ * Get API key
39
39
  * @description Returns metadata for a single API key without exposing the raw secret.
40
40
  */
41
41
  get: operations["getAPIKey"];
42
42
  put?: never;
43
43
  post?: never;
44
44
  /**
45
- * Revoke an API key
45
+ * Revoke API key
46
46
  * @description Permanently revokes the key. In-flight requests using this key will immediately start receiving 401.
47
47
  */
48
48
  delete: operations["revokeAPIKey"];
@@ -61,7 +61,7 @@ export interface paths {
61
61
  get?: never;
62
62
  put?: never;
63
63
  /**
64
- * Create a custom action
64
+ * Create action
65
65
  * @description Registers a project-owned custom action definition. HTTP actions require `endpoint_url` and receive a signing secret. Worker-backed actions omit `endpoint_url`; compatible workers make the registered action ready by advertising its name when connected.
66
66
  */
67
67
  post: operations["createAction"];
@@ -82,14 +82,14 @@ export interface paths {
82
82
  put?: never;
83
83
  post?: never;
84
84
  /**
85
- * Delete a custom action
86
- * @description Deletes a project-owned custom action definition. Automations that still reference the action block deletion until the reference is removed.
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.
87
87
  */
88
88
  delete: operations["deleteAction"];
89
89
  options?: never;
90
90
  head?: never;
91
91
  /**
92
- * Update a custom action
92
+ * Update action
93
93
  * @description Updates action metadata, schemas, annotations, tags, or the HTTP endpoint URL. Worker-backed actions cannot set an endpoint URL.
94
94
  */
95
95
  patch: operations["updateAction"];
@@ -105,7 +105,7 @@ export interface paths {
105
105
  get?: never;
106
106
  put?: never;
107
107
  /**
108
- * Rotate an HTTP action signing secret
108
+ * Rotate signing secret
109
109
  * @description Rotates the signing secret for an HTTP-backed custom action. Worker actions do not have signing secrets and return a validation error.
110
110
  */
111
111
  post: operations["rotateActionSecret"];
@@ -123,8 +123,8 @@ export interface paths {
123
123
  cookie?: never;
124
124
  };
125
125
  /**
126
- * List action invocation records
127
- * @description Lists recent action invocation audit records from automations, agents, direct invocations, and job-backed execution.
126
+ * List invocations
127
+ * @description Lists recent action invocation audit records from loops, agents, direct invocations, and job-backed execution.
128
128
  */
129
129
  get: operations["listActionInvocations"];
130
130
  put?: never;
@@ -145,8 +145,8 @@ export interface paths {
145
145
  get?: never;
146
146
  put?: never;
147
147
  /**
148
- * Invoke an action directly
149
- * @description Invokes a catalog action through the same job-backed execution surface used by automations. HTTP and managed platform actions are dispatched to Mobius server workers; worker-backed custom actions are dispatched to compatible customer workers.
148
+ * Invoke action
149
+ * @description Invokes a catalog action through the same job-backed execution surface used by loops. HTTP and managed platform actions are dispatched to Mobius server workers; worker-backed custom actions are dispatched to compatible customer workers.
150
150
  */
151
151
  post: operations["invokeAction"];
152
152
  delete?: never;
@@ -163,8 +163,8 @@ export interface paths {
163
163
  cookie?: never;
164
164
  };
165
165
  /**
166
- * List the triggerable event catalog
167
- * @description Returns every event source an automation trigger (or `wait_for_event` step) can subscribe to within this project: built-in platform sources (tables, email, runs, HTTP triggers, sessions, artifacts) and integration provider sources (with project connection state). `items` contains those sources; each source lists its concrete, currently-active event types.
166
+ * List events
167
+ * @description Returns every event source a loop trigger (or `wait_for_event` step) can subscribe to within this project: built-in platform sources (tables, email, runs, HTTP triggers, sessions, artifacts) and integration provider sources (with project connection state). `items` contains those sources; each source lists its concrete, currently-active event types.
168
168
  *
169
169
  * `reserved_prefixes` enumerates platform namespaces that are recognized but not themselves triggerable event sources (for example `signal`, `schedule`), so authoring UIs can distinguish a recognized-but-unsupported matcher prefix from a wholly unknown one.
170
170
  *
@@ -187,7 +187,7 @@ export interface paths {
187
187
  cookie?: never;
188
188
  };
189
189
  /**
190
- * List the action catalog
190
+ * List actions
191
191
  * @description Returns the full catalog of actions available to this project: project-owned HTTP actions and platform-provided integration actions (Slack, GitHub, etc.). The `available` flag indicates whether the action can currently be invoked. Custom HTTP actions are created and managed on the `/actions` resource.
192
192
  */
193
193
  get: operations["listCatalogActions"];
@@ -207,7 +207,7 @@ export interface paths {
207
207
  cookie?: never;
208
208
  };
209
209
  /**
210
- * Get one catalog action by name
210
+ * Get action
211
211
  * @description Returns availability status, schemas, and metadata for a single catalog entry.
212
212
  */
213
213
  get: operations["getCatalogAction"];
@@ -227,7 +227,7 @@ export interface paths {
227
227
  cookie?: never;
228
228
  };
229
229
  /**
230
- * List the model catalog
230
+ * List models
231
231
  * @description Returns the models a platform agent in this project can be assigned, grouped by provider. Only providers the project can actually run are included: a provider appears when the project has an active BYOK integration for it, or when a platform-managed key is configured.
232
232
  *
233
233
  * An agent's `model` field accepts any returned model id, optionally prefixed with `provider/` (e.g. `xai/grok-4`); bare known ids such as `claude-sonnet-4-6` are auto-detected to their provider.
@@ -255,7 +255,7 @@ export interface paths {
255
255
  get: operations["listEnvironments"];
256
256
  put?: never;
257
257
  /**
258
- * Create an environment
258
+ * Create environment
259
259
  * @description Creates a durable execution environment record and provisions it with the selected provider. The server resolves scope and ownership before enforcing uniqueness for the environment name.
260
260
  */
261
261
  post: operations["createEnvironment"];
@@ -275,8 +275,8 @@ export interface paths {
275
275
  get?: never;
276
276
  put?: never;
277
277
  /**
278
- * Create or attach a worker-provided environment
279
- * @description Idempotently registers a worker-provided environment (a workspace hosted by a connected Mobius worker, e.g. a laptop). The control plane creates the record but never provisions or tears it down. Re-attaching the same name returns the existing environment. The `mobius worker` CLI calls this on startup, then registers its socket against the returned environment id.
278
+ * Attach environment
279
+ * @description Idempotently registers a worker-provided environment (a workspace hosted by a connected Mobius worker, e.g. a laptop). The control plane creates the record but never provisions or tears it down. Re-attaching the same name returns the existing environment. The `mobius worker` CLI calls this on startup, then registers its socket against the returned environment id. If the worker provider is not configured, the request returns `409` without creating an environment record.
280
280
  */
281
281
  post: operations["attachWorkerEnvironment"];
282
282
  delete?: never;
@@ -295,7 +295,7 @@ export interface paths {
295
295
  get?: never;
296
296
  put?: never;
297
297
  /**
298
- * Acquire an environment lease
298
+ * Acquire lease
299
299
  * @description Collection-level acquire creates or claims an environment and creates a single active lease. There is intentionally no per-environment acquire endpoint.
300
300
  */
301
301
  post: operations["acquireEnvironment"];
@@ -315,7 +315,7 @@ export interface paths {
315
315
  get?: never;
316
316
  put?: never;
317
317
  /**
318
- * Release an environment lease
318
+ * Release lease
319
319
  * @description Releases a previously acquired environment lease so the environment can be reused, retired, or reclaimed by another worker. The released lease snapshot is returned for audit and UI state updates.
320
320
  */
321
321
  post: operations["releaseEnvironmentLease"];
@@ -333,21 +333,21 @@ export interface paths {
333
333
  cookie?: never;
334
334
  };
335
335
  /**
336
- * Get an environment
336
+ * Get environment
337
337
  * @description Returns the current environment record, including provider status, lease metadata, ownership, binding, and retention settings.
338
338
  */
339
339
  get: operations["getEnvironment"];
340
340
  put?: never;
341
341
  post?: never;
342
342
  /**
343
- * Destroy an environment
343
+ * Destroy environment
344
344
  * @description Requests provider teardown for the environment and records the destroyed state in Mobius. The response includes the final environment snapshot after the destroy request is accepted.
345
345
  */
346
346
  delete: operations["destroyEnvironment"];
347
347
  options?: never;
348
348
  head?: never;
349
349
  /**
350
- * Update environment metadata
350
+ * Update environment
351
351
  * @description Only purpose, retention_policy, scope, owned_by, bound_to_type, bound_to_id, and tags are mutable.
352
352
  */
353
353
  patch: operations["updateEnvironment"];
@@ -363,7 +363,7 @@ export interface paths {
363
363
  get?: never;
364
364
  put?: never;
365
365
  /**
366
- * Reconcile environment provider state
366
+ * Reconcile environment
367
367
  * @description Refreshes Mobius' environment record from the provider control plane. Use this when a UI or operator needs to resynchronize status after an out-of-band provider change.
368
368
  */
369
369
  post: operations["reconcileEnvironment"];
@@ -383,7 +383,7 @@ export interface paths {
383
383
  get?: never;
384
384
  put?: never;
385
385
  /**
386
- * Execute a command inside an environment
386
+ * Execute command
387
387
  * @description Runs a command in the target environment and returns its captured output. The environment must be active and able to accept execution requests from the selected provider.
388
388
  */
389
389
  post: operations["execEnvironment"];
@@ -402,7 +402,7 @@ export interface paths {
402
402
  };
403
403
  get?: never;
404
404
  /**
405
- * Write a file into an environment
405
+ * Write file
406
406
  * @description Writes file content into the environment filesystem. The request is intended for setup and repair flows that need to place source files, scripts, or configuration before executing work.
407
407
  */
408
408
  put: operations["writeEnvironmentFile"];
@@ -423,7 +423,7 @@ export interface paths {
423
423
  get?: never;
424
424
  put?: never;
425
425
  /**
426
- * Start a Mobius worker in an environment
426
+ * Start worker
427
427
  * @description Starts or reuses a worker process inside the environment so it can claim Mobius jobs. The result reports the worker identity and provider execution details needed for follow-up diagnostics.
428
428
  */
429
429
  post: operations["startEnvironmentWorker"];
@@ -441,7 +441,7 @@ export interface paths {
441
441
  cookie?: never;
442
442
  };
443
443
  /**
444
- * Get worker logs for an environment
444
+ * Get worker logs
445
445
  * @description Tails the managed Mobius worker log files from inside the environment. The worker filesystem is sandbox-local and treated as diagnostic scratch; clients should not use this endpoint as durable artifact storage.
446
446
  */
447
447
  get: operations["getEnvironmentWorkerLogs"];
@@ -463,7 +463,7 @@ export interface paths {
463
463
  get?: never;
464
464
  put?: never;
465
465
  /**
466
- * Mint short-lived Git credentials for an environment
466
+ * Mint Git credentials
467
467
  * @description Mints a repository-scoped GitHub App installation token for clone or push operations executed inside the environment. Mobius returns the token only in this response; the caller must inject it into the environment through a transient askpass/stdin flow and remove it before the command exits.
468
468
  */
469
469
  post: operations["createEnvironmentGitCredential"];
@@ -527,7 +527,7 @@ export interface paths {
527
527
  get: operations["listProjects"];
528
528
  put?: never;
529
529
  /**
530
- * Create a project
530
+ * Create project
531
531
  * @description Creates a project within the authenticated org. If `handle` is omitted it is auto-derived from `name` (lowercased, spaces replaced with hyphens). Returns 409 if the handle already exists in the org.
532
532
  */
533
533
  post: operations["createProject"];
@@ -545,15 +545,15 @@ export interface paths {
545
545
  cookie?: never;
546
546
  };
547
547
  /**
548
- * Get a project
548
+ * Get project
549
549
  * @description Requires the `mobius.project.view` permission for the project.
550
550
  */
551
551
  get: operations["getProject"];
552
552
  put?: never;
553
553
  post?: never;
554
554
  /**
555
- * Delete a project
556
- * @description Permanently deletes the project and all child resources (automations, runs, jobs, triggers, webhooks, actions, agents, machine principals). This operation is irreversible.
555
+ * Delete project
556
+ * @description Permanently deletes the project and all child resources (loops, runs, jobs, triggers, webhooks, actions, agents, machine principals). This operation is irreversible.
557
557
  *
558
558
  * The project must be archived first; calling delete on an active project returns `409 project_not_archived`. Archive via `POST /v1/projects/{project}/archive`.
559
559
  */
@@ -561,7 +561,7 @@ export interface paths {
561
561
  options?: never;
562
562
  head?: never;
563
563
  /**
564
- * Update a project
564
+ * Update project
565
565
  * @description Updates `name`, `description`, and/or `access_mode`. The request also accepts `seed_existing_members` when flipping `access_mode` from `org_open` to `restricted`. The project handle is immutable and cannot be changed after creation.
566
566
  */
567
567
  patch: operations["updateProject"];
@@ -577,7 +577,7 @@ export interface paths {
577
577
  get?: never;
578
578
  put?: never;
579
579
  /**
580
- * Archive a project
580
+ * Archive project
581
581
  * @description Soft-retires the project: triggers and scheduled runs stop firing, edits are blocked, and the project is hidden from the default listing. In-flight runs are allowed to drain. The project can be restored at any time. Idempotent — archiving an already-archived project returns the current state.
582
582
  */
583
583
  post: operations["archiveProject"];
@@ -597,7 +597,7 @@ export interface paths {
597
597
  get?: never;
598
598
  put?: never;
599
599
  /**
600
- * Restore an archived project
600
+ * Restore project
601
601
  * @description Clears the archived state and returns the project to active operation. Triggers and scheduled runs resume on their next natural fire — there is no catch-up backfill of missed fires during the archive window. Idempotent — restoring an active project returns the current state.
602
602
  */
603
603
  post: operations["restoreProject"];
@@ -621,7 +621,7 @@ export interface paths {
621
621
  get: operations["listWebhooks"];
622
622
  put?: never;
623
623
  /**
624
- * Create a webhook
624
+ * Create webhook
625
625
  * @description Creates a new outgoing webhook subscription. Webhook names must be unique within the project. Returns 409 if the name already exists.
626
626
  *
627
627
  * A signing key is generated automatically and returned in the response; this is the only time the raw key is exposed. Rotate it with `POST /webhooks/{id}/secret/rotate` if compromised.
@@ -641,21 +641,21 @@ export interface paths {
641
641
  cookie?: never;
642
642
  };
643
643
  /**
644
- * Get a webhook
644
+ * Get webhook
645
645
  * @description Returns one outgoing webhook subscription and its event filters. The raw signing key is never returned after creation or rotation.
646
646
  */
647
647
  get: operations["getWebhook"];
648
648
  put?: never;
649
649
  post?: never;
650
650
  /**
651
- * Delete a webhook
651
+ * Delete webhook
652
652
  * @description Deletes the webhook and its delivery history.
653
653
  */
654
654
  delete: operations["deleteWebhook"];
655
655
  options?: never;
656
656
  head?: never;
657
657
  /**
658
- * Update a webhook
658
+ * Update webhook
659
659
  * @description Updates the webhook name, URL, event subscriptions, enabled state, or tags. Signing key rotation is handled by the dedicated rotate endpoint.
660
660
  */
661
661
  patch: operations["updateWebhook"];
@@ -671,7 +671,7 @@ export interface paths {
671
671
  get?: never;
672
672
  put?: never;
673
673
  /**
674
- * Rotate a webhook signing secret
674
+ * Rotate webhook signing secret
675
675
  * @description Generates a new HMAC-SHA256 signing key version for the webhook. Store the returned key immediately — it cannot be retrieved again.
676
676
  */
677
677
  post: operations["rotateWebhookSecret"];
@@ -691,7 +691,7 @@ export interface paths {
691
691
  get?: never;
692
692
  put?: never;
693
693
  /**
694
- * Test a webhook URL
694
+ * Test webhook URL
695
695
  * @description Sends a live test POST request to the webhook's saved URL, or to an override URL supplied in the request body, and returns the result. Because the webhook URL may be empty at creation time, the typical flow is: create the webhook without a URL, ping candidate URLs via the override until one succeeds, then persist the chosen URL with `PATCH`. The test payload has `type: "ping"` and is signed with the webhook's signing key.
696
696
  */
697
697
  post: operations["pingWebhook"];
@@ -735,7 +735,7 @@ export interface paths {
735
735
  get: operations["listAgents"];
736
736
  put?: never;
737
737
  /**
738
- * Create an agent
738
+ * Create agent
739
739
  * @description Creates an agent. An agent IS a principal (principals.kind = agent): its backing identity row is created atomically with the agent and its permissions live as role grants on that principal — there is no separate machine-identity side record.
740
740
  *
741
741
  * Optional `role_ids` sets the role assignments on the agent's principal. Assigning roles requires the caller to hold `mobius.access.manage`. When omitted, the agent inherits the project's `default_agent_role_id`, falling through to the system `Agent` role floor when unset.
@@ -755,21 +755,21 @@ export interface paths {
755
755
  cookie?: never;
756
756
  };
757
757
  /**
758
- * Get an agent
758
+ * Get agent
759
759
  * @description Returns one agent with its administrative status and computed presence. Presence is derived from recent presence records, so it may change without the agent record itself being updated.
760
760
  */
761
761
  get: operations["getAgent"];
762
762
  put?: never;
763
763
  post?: never;
764
764
  /**
765
- * Delete an agent
765
+ * Delete agent
766
766
  * @description Soft-deletes the agent by setting `deleted_at`. 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.
767
767
  */
768
768
  delete: operations["deleteAgent"];
769
769
  options?: never;
770
770
  head?: never;
771
771
  /**
772
- * Update an agent
772
+ * Update agent
773
773
  * @description Updates mutable agent fields. Setting `status` to `inactive` prevents the agent from claiming new jobs but does not terminate active presence records.
774
774
  */
775
775
  patch: operations["updateAgent"];
@@ -803,7 +803,7 @@ export interface paths {
803
803
  cookie?: never;
804
804
  };
805
805
  /**
806
- * List conversation sessions for an agent
806
+ * List sessions
807
807
  * @description Returns durable conversation sessions for one agent, newest activity first. Remote workers use this to inspect their own remembered conversations.
808
808
  */
809
809
  get: operations["listAgentSessions"];
@@ -823,7 +823,7 @@ export interface paths {
823
823
  cookie?: never;
824
824
  };
825
825
  /**
826
- * Get a conversation session
826
+ * Get session
827
827
  * @description Returns one durable conversation session for an agent.
828
828
  */
829
829
  get: operations["getAgentSession"];
@@ -843,13 +843,13 @@ export interface paths {
843
843
  cookie?: never;
844
844
  };
845
845
  /**
846
- * List conversation session messages
846
+ * List messages
847
847
  * @description Returns raw session messages in sequence order.
848
848
  */
849
849
  get: operations["listSessionMessages"];
850
850
  put?: never;
851
851
  /**
852
- * Append conversation session messages
852
+ * Append messages
853
853
  * @description Appends one or more messages to a durable session and returns the updated session. The service assigns sequence numbers atomically and may append an additional compaction summary when the session crosses its compaction threshold.
854
854
  */
855
855
  post: operations["appendSessionMessages"];
@@ -859,6 +859,46 @@ export interface paths {
859
859
  patch?: never;
860
860
  trace?: never;
861
861
  };
862
+ "/v1/projects/{project}/agents/{id}/sessions/{session_id}/turns": {
863
+ parameters: {
864
+ query?: never;
865
+ header?: never;
866
+ path?: never;
867
+ cookie?: never;
868
+ };
869
+ /**
870
+ * List turns
871
+ * @description Returns the session's AgentTurns in chronological order — the spine a turn-grouped transcript is built on. Each turn carries its run/step or channel-exchange linkage, attempt, and status; fetch a turn's messages from its transcript endpoint.
872
+ */
873
+ get: operations["listSessionTurns"];
874
+ put?: never;
875
+ post?: never;
876
+ delete?: never;
877
+ options?: never;
878
+ head?: never;
879
+ patch?: never;
880
+ trace?: never;
881
+ };
882
+ "/v1/projects/{project}/turns/{id}/messages": {
883
+ parameters: {
884
+ query?: never;
885
+ header?: never;
886
+ path?: never;
887
+ cookie?: never;
888
+ };
889
+ /**
890
+ * List turn transcript
891
+ * @description Returns the messages produced by a single AgentTurn, in sequence order — an indexed read on the turn_id spine, with no metadata scan. This is the single-turn transcript read; group a whole session client-side by joining the session's messages on turn_id.
892
+ */
893
+ get: operations["listTurnMessages"];
894
+ put?: never;
895
+ post?: never;
896
+ delete?: never;
897
+ options?: never;
898
+ head?: never;
899
+ patch?: never;
900
+ trace?: never;
901
+ };
862
902
  "/v1/projects/{project}/agents/{id}/messaging-bindings": {
863
903
  parameters: {
864
904
  query?: never;
@@ -867,12 +907,12 @@ export interface paths {
867
907
  cookie?: never;
868
908
  };
869
909
  /**
870
- * List agent messaging bindings
910
+ * List bindings
871
911
  * @description Returns the provider accounts this agent can answer on.
872
912
  */
873
913
  get: operations["listAgentMessagingBindings"];
874
914
  /**
875
- * Save an agent messaging binding
915
+ * Save binding
876
916
  * @description Upserts one provider-account binding for this agent.
877
917
  */
878
918
  put: operations["saveAgentMessagingBinding"];
@@ -894,7 +934,7 @@ export interface paths {
894
934
  put?: never;
895
935
  post?: never;
896
936
  /**
897
- * Delete an agent messaging binding
937
+ * Delete binding
898
938
  * @description Removes one messaging binding from the agent.
899
939
  */
900
940
  delete: operations["deleteAgentMessagingBinding"];
@@ -911,7 +951,7 @@ export interface paths {
911
951
  cookie?: never;
912
952
  };
913
953
  /**
914
- * Stream live conversation session events
954
+ * Stream session events
915
955
  * @description Streams live Server-Sent Events for a conversation session. This is a live transport for ephemeral events such as `generation.delta`; durable session transcript state remains available from the messages endpoint.
916
956
  */
917
957
  get: operations["streamSessionEvents"];
@@ -931,12 +971,12 @@ export interface paths {
931
971
  cookie?: never;
932
972
  };
933
973
  /**
934
- * List assigned toolkits
974
+ * List toolkits
935
975
  * @description Returns the toolkits assigned to an agent in assignment order.
936
976
  */
937
977
  get: operations["listToolkitAssignments"];
938
978
  /**
939
- * Replace assigned toolkits
979
+ * Replace toolkits
940
980
  * @description Replaces the agent's toolkit assignment set as a whole. The effective tool surface is the union of assigned toolkit grants intersected with the agent principal's permissions and any per-invocation narrowing.
941
981
  */
942
982
  put: operations["replaceToolkits"];
@@ -955,12 +995,12 @@ export interface paths {
955
995
  cookie?: never;
956
996
  };
957
997
  /**
958
- * List agent table grants
998
+ * List table grants
959
999
  * @description Returns durable table memory grants assigned to one agent.
960
1000
  */
961
1001
  get: operations["listAgentTableGrants"];
962
1002
  /**
963
- * Replace agent table grants
1003
+ * Replace table grants
964
1004
  * @description Replaces the agent's durable table memory grant set as a whole.
965
1005
  */
966
1006
  put: operations["replaceAgentTableGrants"];
@@ -979,12 +1019,12 @@ export interface paths {
979
1019
  cookie?: never;
980
1020
  };
981
1021
  /**
982
- * List assigned skills
1022
+ * List skills
983
1023
  * @description Returns the skills assigned to an agent in assignment order.
984
1024
  */
985
1025
  get: operations["listSkillAssignments"];
986
1026
  /**
987
- * Replace assigned skills
1027
+ * Replace skills
988
1028
  * @description Replaces the agent's skill assignment set as a whole. Skills request tools and actions; the manifest enforces only the intersection with toolkit grants and the agent principal's permissions.
989
1029
  */
990
1030
  put: operations["replaceSkills"];
@@ -1003,7 +1043,7 @@ export interface paths {
1003
1043
  cookie?: never;
1004
1044
  };
1005
1045
  /**
1006
- * List an agent's resolved tools
1046
+ * List tools
1007
1047
  * @description Resolves the effective set of tools an agent can invoke: the flat set of actions the agent can invoke, computed from toolkit grants, the agent principal's permissions, optional toolkit filters, optional per-invocation tool filters, and optional active skill narrowing.
1008
1048
  */
1009
1049
  get: operations["getAgentTools"];
@@ -1015,7 +1055,7 @@ export interface paths {
1015
1055
  patch?: never;
1016
1056
  trace?: never;
1017
1057
  };
1018
- "/v1/projects/{project}/automations": {
1058
+ "/v1/projects/{project}/loops": {
1019
1059
  parameters: {
1020
1060
  query?: never;
1021
1061
  header?: never;
@@ -1023,23 +1063,23 @@ export interface paths {
1023
1063
  cookie?: never;
1024
1064
  };
1025
1065
  /**
1026
- * List automations in a project
1027
- * @description Returns automations in the project, newest-first. Supports filtering by lifecycle status and cursor-based pagination. Archived automations are excluded by default; pass `status=archived` to list only archived, or `status=all` to include every status.
1066
+ * List loops
1067
+ * @description Returns loops in the project, newest-first. Supports filtering by lifecycle status and cursor-based pagination. Archived loops are excluded by default; pass `status=archived` to list only archived, or `status=all` to include every status.
1028
1068
  */
1029
- get: operations["listAutomations"];
1069
+ get: operations["listLoops"];
1030
1070
  put?: never;
1031
1071
  /**
1032
- * Create an automation
1033
- * @description Creates a new automation in `draft` status. The `handle` must be unique within the project and is immutable.
1072
+ * Create loop
1073
+ * @description Creates a new loop. The `handle` must be unique within the project and is immutable. Include `spec` to create the first draft version inline; set `activate: true` with `spec` to publish that version and make the loop active in one request.
1034
1074
  */
1035
- post: operations["createAutomation"];
1075
+ post: operations["createLoop"];
1036
1076
  delete?: never;
1037
1077
  options?: never;
1038
1078
  head?: never;
1039
1079
  patch?: never;
1040
1080
  trace?: never;
1041
1081
  };
1042
- "/v1/projects/{project}/automations/{handle}": {
1082
+ "/v1/projects/{project}/loops/{id}": {
1043
1083
  parameters: {
1044
1084
  query?: never;
1045
1085
  header?: never;
@@ -1047,27 +1087,27 @@ export interface paths {
1047
1087
  cookie?: never;
1048
1088
  };
1049
1089
  /**
1050
- * Get an automation
1051
- * @description Returns one automation by its project-unique handle.
1090
+ * Get loop
1091
+ * @description Returns one loop by ID.
1052
1092
  */
1053
- get: operations["getAutomation"];
1093
+ get: operations["getLoop"];
1054
1094
  put?: never;
1055
1095
  post?: never;
1056
1096
  /**
1057
- * Archive an automation
1058
- * @description Soft-archives the automation. Existing runs remain queryable; new runs cannot be started.
1097
+ * Archive loop
1098
+ * @description Soft-archives the loop. Existing runs remain queryable; new runs cannot be started.
1059
1099
  */
1060
- delete: operations["deleteAutomation"];
1100
+ delete: operations["deleteLoop"];
1061
1101
  options?: never;
1062
1102
  head?: never;
1063
1103
  /**
1064
- * Update an automation
1065
- * @description Updates mutable fields on the automation. The handle, org, and project remain immutable.
1104
+ * Update loop
1105
+ * @description Updates mutable fields on the loop. The handle, org, and project remain immutable.
1066
1106
  */
1067
- patch: operations["updateAutomation"];
1107
+ patch: operations["updateLoop"];
1068
1108
  trace?: never;
1069
1109
  };
1070
- "/v1/projects/{project}/automations/{handle}/versions": {
1110
+ "/v1/projects/{project}/loops/{id}/versions": {
1071
1111
  parameters: {
1072
1112
  query?: never;
1073
1113
  header?: never;
@@ -1075,23 +1115,23 @@ export interface paths {
1075
1115
  cookie?: never;
1076
1116
  };
1077
1117
  /**
1078
- * List versions for an automation
1079
- * @description Returns every stored version (draft, published, superseded) for one automation, newest version first.
1118
+ * List versions
1119
+ * @description Returns every stored version (draft, published, superseded) for one loop, newest version first.
1080
1120
  */
1081
- get: operations["listAutomationVersions"];
1121
+ get: operations["listLoopVersions"];
1082
1122
  put?: never;
1083
1123
  /**
1084
- * Create a new draft version
1085
- * @description Stores a new draft `AutomationVersion` with the supplied spec. Returns the new version. Use `publishAutomationVersion` to make it runnable.
1124
+ * Create version
1125
+ * @description Stores a new draft `LoopVersion` with the supplied spec. Returns the new version. Use `publishLoopVersion` to make it runnable.
1086
1126
  */
1087
- post: operations["createAutomationVersion"];
1127
+ post: operations["createLoopVersion"];
1088
1128
  delete?: never;
1089
1129
  options?: never;
1090
1130
  head?: never;
1091
1131
  patch?: never;
1092
1132
  trace?: never;
1093
1133
  };
1094
- "/v1/projects/{project}/automations/{handle}/versions/{version}/publication": {
1134
+ "/v1/projects/{project}/loops/{id}/versions/{version}/publication": {
1095
1135
  parameters: {
1096
1136
  query?: never;
1097
1137
  header?: never;
@@ -1101,10 +1141,10 @@ export interface paths {
1101
1141
  get?: never;
1102
1142
  put?: never;
1103
1143
  /**
1104
- * Publish a version
1105
- * @description Marks the supplied version `published` and updates the automation's `published_version`. Prior published versions become `superseded`.
1144
+ * Publish version
1145
+ * @description Marks the supplied version `published` and updates the loop's `published_version`. Prior published versions become `superseded`.
1106
1146
  */
1107
- post: operations["publishAutomationVersion"];
1147
+ post: operations["publishLoopVersion"];
1108
1148
  delete?: never;
1109
1149
  options?: never;
1110
1150
  head?: never;
@@ -1121,7 +1161,7 @@ export interface paths {
1121
1161
  get?: never;
1122
1162
  put?: never;
1123
1163
  /**
1124
- * Deliver an HTTP request payload to a trigger
1164
+ * Deliver trigger
1125
1165
  * @description Public, unauthenticated endpoint that resolves the `http_handle` to a configured http-kind trigger and commits a durable source-event row; the run starts asynchronously. Idempotent on the `idempotency_key` query parameter or the standard `X-Idempotency-Key` header — repeats with the same key return the same `source_event_id` without enqueuing a duplicate. Resolve the resulting run via `GET /v1/projects/{project}/runs?source_event_id=<source_event_id>`.
1126
1166
  */
1127
1167
  post: operations["deliverHTTPTrigger"];
@@ -1131,7 +1171,7 @@ export interface paths {
1131
1171
  patch?: never;
1132
1172
  trace?: never;
1133
1173
  };
1134
- "/v1/projects/{project}/automations/{handle}/runs": {
1174
+ "/v1/projects/{project}/loops/{id}/runs": {
1135
1175
  parameters: {
1136
1176
  query?: never;
1137
1177
  header?: never;
@@ -1141,10 +1181,10 @@ export interface paths {
1141
1181
  get?: never;
1142
1182
  put?: never;
1143
1183
  /**
1144
- * Start a new automation run
1145
- * @description Resolves `{handle}` to the latest runnable version and starts a run. Returns the created run when accepted, or the existing run when the request carries a `trigger_fire_id` (or `external_id`) that matches a still-active prior run (idempotent retry).
1184
+ * Start run
1185
+ * @description Resolves `{id}` to the latest runnable version and starts a run. Returns the created run when accepted, or the existing run when the request carries an `idempotency_key` that matches a still-active prior run (idempotent retry).
1146
1186
  *
1147
- * Idempotency conflicts on `external_id` against a terminal-prior run surface as `409 Conflict` with error code `external_id_conflict` and `details` populated with `existing_run_id`, `status`, and `external_id`.
1187
+ * Idempotency conflicts on `idempotency_key` against a terminal-prior run surface as `409 Conflict` with error code `idempotency_key_conflict` and `details` populated with `existing_run_id`, `status`, and `idempotency_key`.
1148
1188
  */
1149
1189
  post: operations["startRun"];
1150
1190
  delete?: never;
@@ -1161,8 +1201,8 @@ export interface paths {
1161
1201
  cookie?: never;
1162
1202
  };
1163
1203
  /**
1164
- * List automation runs
1165
- * @description Returns automation runs for the project, newest-first. Supports filters by status, automation_id, and source_event_id, plus cursor-based pagination.
1204
+ * List loop runs
1205
+ * @description Returns loop runs for the project, newest-first. Supports filters by status, loop_id, and source_event_id, plus cursor-based pagination.
1166
1206
  */
1167
1207
  get: operations["listRuns"];
1168
1208
  put?: never;
@@ -1181,8 +1221,8 @@ export interface paths {
1181
1221
  cookie?: never;
1182
1222
  };
1183
1223
  /**
1184
- * Get an automation run
1185
- * @description Returns one automation run by ID with its current status, inputs, result, and source attribution.
1224
+ * Get run
1225
+ * @description Returns one loop run by ID with its current status, inputs, result, and source attribution.
1186
1226
  */
1187
1227
  get: operations["getRun"];
1188
1228
  put?: never;
@@ -1203,7 +1243,7 @@ export interface paths {
1203
1243
  get?: never;
1204
1244
  put?: never;
1205
1245
  /**
1206
- * Cancel an in-flight run
1246
+ * Cancel run
1207
1247
  * @description Marks the run cancelled and closes any open waits. Safe to call on an already-terminal run (returns the current state, no error).
1208
1248
  */
1209
1249
  post: operations["cancelRun"];
@@ -1221,7 +1261,7 @@ export interface paths {
1221
1261
  cookie?: never;
1222
1262
  };
1223
1263
  /**
1224
- * List the steps of an automation run
1264
+ * List run steps
1225
1265
  * @description Returns the durable step records for one run, ordered by step index. Each row carries the step's kind, status, attempt count, inputs, result, and any error metadata recorded by the engine.
1226
1266
  */
1227
1267
  get: operations["listRunSteps"];
@@ -1261,8 +1301,8 @@ export interface paths {
1261
1301
  cookie?: never;
1262
1302
  };
1263
1303
  /**
1264
- * Stream run events over Server-Sent Events
1265
- * @description Long-lived SSE stream of run events ordered by sequence number. Each `data:` frame is a JSON-encoded `AutomationRunEvent`. The stream terminates when the run reaches a terminal status. Clients that disconnect should reconnect using `?since_sequence=N` (or the SSE `Last-Event-ID` header set to the last sequence) to resume without gaps.
1304
+ * Stream run events
1305
+ * @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 `?since_sequence=N` (or the SSE `Last-Event-ID` header set to the last sequence) to resume without gaps.
1266
1306
  */
1267
1307
  get: operations["streamRunEvents"];
1268
1308
  put?: never;
@@ -1283,7 +1323,7 @@ export interface paths {
1283
1323
  get?: never;
1284
1324
  put?: never;
1285
1325
  /**
1286
- * Resume a suspended run step
1326
+ * Signal run
1287
1327
  * @description Resumes a run that is suspended on a `wait_event` step matching the provided `step_key`. The `result` payload becomes the step's output and is available to downstream steps via `{{ .context.<save_as> }}`.
1288
1328
  */
1289
1329
  post: operations["signalRun"];
@@ -1302,12 +1342,12 @@ export interface paths {
1302
1342
  };
1303
1343
  /**
1304
1344
  * List toolkits
1305
- * @description Returns active project-local and system toolkit templates visible to the project by default. Pass `status=archived` to list archived toolkits or `status=all` to include every lifecycle status.
1345
+ * @description Returns project-local and system toolkit templates visible to the project by default.
1306
1346
  */
1307
1347
  get: operations["listToolkits"];
1308
1348
  put?: never;
1309
1349
  /**
1310
- * Create a toolkit
1350
+ * Create toolkit
1311
1351
  * @description Creates a project-local toolkit with action selector grants.
1312
1352
  */
1313
1353
  post: operations["createToolkit"];
@@ -1325,19 +1365,19 @@ export interface paths {
1325
1365
  cookie?: never;
1326
1366
  };
1327
1367
  /**
1328
- * Get a toolkit
1368
+ * Get toolkit
1329
1369
  * @description Returns a single project-local or system toolkit template by ID.
1330
1370
  */
1331
1371
  get: operations["getToolkit"];
1332
1372
  /**
1333
- * Update a toolkit
1373
+ * Update toolkit
1334
1374
  * @description Replaces mutable toolkit metadata and grant arrays when supplied.
1335
1375
  */
1336
1376
  put: operations["updateToolkit"];
1337
1377
  post?: never;
1338
1378
  /**
1339
- * Delete a toolkit
1340
- * @description Archives a project-local toolkit that is not assigned to any agent.
1379
+ * Delete toolkit
1380
+ * @description Deletes a project-local toolkit that is not assigned to any agent.
1341
1381
  */
1342
1382
  delete: operations["deleteToolkit"];
1343
1383
  options?: never;
@@ -1354,12 +1394,12 @@ export interface paths {
1354
1394
  };
1355
1395
  /**
1356
1396
  * List skills
1357
- * @description Returns active project-local and system skill templates visible to the project by default. Pass `status=archived` to list archived skills or `status=all` to include every lifecycle status.
1397
+ * @description Returns project-local and system skill templates visible to the project by default.
1358
1398
  */
1359
1399
  get: operations["listSkills"];
1360
1400
  put?: never;
1361
1401
  /**
1362
- * Create a skill
1402
+ * Create skill
1363
1403
  * @description Creates a project-local skill with instructions and requested tool filters.
1364
1404
  */
1365
1405
  post: operations["createSkill"];
@@ -1379,7 +1419,7 @@ export interface paths {
1379
1419
  get?: never;
1380
1420
  put?: never;
1381
1421
  /**
1382
- * Import a skill
1422
+ * Import skill
1383
1423
  * @description Imports a Claude Code or Dive-style skill document into a project-local Mobius skill.
1384
1424
  */
1385
1425
  post: operations["importSkill"];
@@ -1397,19 +1437,19 @@ export interface paths {
1397
1437
  cookie?: never;
1398
1438
  };
1399
1439
  /**
1400
- * Get a skill
1440
+ * Get skill
1401
1441
  * @description Returns a single project-local or system skill template by ID.
1402
1442
  */
1403
1443
  get: operations["getSkill"];
1404
1444
  /**
1405
- * Update a skill
1445
+ * Update skill
1406
1446
  * @description Replaces mutable skill metadata, instructions, and requested tool filters when supplied.
1407
1447
  */
1408
1448
  put: operations["updateSkill"];
1409
1449
  post?: never;
1410
1450
  /**
1411
- * Delete a skill
1412
- * @description Archives a project-local skill that is not assigned to any agent.
1451
+ * Delete skill
1452
+ * @description Deletes a project-local skill that is not assigned to any agent.
1413
1453
  */
1414
1454
  delete: operations["deleteSkill"];
1415
1455
  options?: never;
@@ -1431,7 +1471,7 @@ export interface paths {
1431
1471
  get: operations["listTables"];
1432
1472
  put?: never;
1433
1473
  /**
1434
- * Create a table
1474
+ * Create table
1435
1475
  * @description Create a project-scoped table with a typed column schema.
1436
1476
  */
1437
1477
  post: operations["createTable"];
@@ -1449,18 +1489,18 @@ export interface paths {
1449
1489
  cookie?: never;
1450
1490
  };
1451
1491
  /**
1452
- * Get a table
1492
+ * Get table
1453
1493
  * @description Get table metadata and schema by table ID.
1454
1494
  */
1455
1495
  get: operations["getTable"];
1456
1496
  /**
1457
- * Update a table
1497
+ * Update table
1458
1498
  * @description Update table name, description, ownership, or schema and resync declared indexes.
1459
1499
  */
1460
1500
  put: operations["updateTable"];
1461
1501
  post?: never;
1462
1502
  /**
1463
- * Delete a table and all its rows
1503
+ * Delete table and all its rows
1464
1504
  * @description Delete one table and all rows stored under it.
1465
1505
  */
1466
1506
  delete: operations["deleteTable"];
@@ -1499,7 +1539,7 @@ export interface paths {
1499
1539
  get?: never;
1500
1540
  put?: never;
1501
1541
  /**
1502
- * Insert a row
1542
+ * Insert row
1503
1543
  * @description Validate and insert one row into the table.
1504
1544
  */
1505
1545
  post: operations["insertTableRow"];
@@ -1559,7 +1599,7 @@ export interface paths {
1559
1599
  get?: never;
1560
1600
  put?: never;
1561
1601
  /**
1562
- * Upsert a row
1602
+ * Upsert row
1563
1603
  * @description Insert or update a row identified by a set of key columns. If a row with matching key-column values exists it is updated (PATCH semantics — unspecified fields are preserved). If no matching row is found a new row is inserted.
1564
1604
  *
1565
1605
  * Returns 201 Created when a new row was inserted, 200 OK when an existing row was updated.
@@ -1599,21 +1639,21 @@ export interface paths {
1599
1639
  cookie?: never;
1600
1640
  };
1601
1641
  /**
1602
- * Get a row by ID
1642
+ * Get row by ID
1603
1643
  * @description Get one table row by row ID.
1604
1644
  */
1605
1645
  get: operations["getTableRow"];
1606
1646
  put?: never;
1607
1647
  post?: never;
1608
1648
  /**
1609
- * Delete a row
1649
+ * Delete row
1610
1650
  * @description Delete one row from the table.
1611
1651
  */
1612
1652
  delete: operations["deleteTableRow"];
1613
1653
  options?: never;
1614
1654
  head?: never;
1615
1655
  /**
1616
- * Update a row (PATCH — merges into existing data)
1656
+ * Update row (PATCH — merges into existing data)
1617
1657
  * @description Validate and merge fields into an existing row, optionally checking the current row version.
1618
1658
  */
1619
1659
  patch: operations["updateTableRow"];
@@ -1627,13 +1667,13 @@ export interface paths {
1627
1667
  cookie?: never;
1628
1668
  };
1629
1669
  /**
1630
- * List artifacts in a project
1670
+ * List artifacts
1631
1671
  * @description Returns artifacts in the project, ordered (created_at desc, id desc). Optional filters narrow by run, step, state, or mime prefix. Deleted artifacts are excluded by default; pass `state=deleted` to inspect tombstones. Results are scoped to the authenticated principal's User-owned artifact space.
1632
1672
  */
1633
1673
  get: operations["listArtifacts"];
1634
1674
  put?: never;
1635
1675
  /**
1636
- * Publish a worker-produced artifact
1676
+ * Publish artifact
1637
1677
  * @description Accepts a multipart file upload from a worker that is currently executing a claimed job. The request must include `X-Mobius-Lease-Token`; Mobius resolves the active claim and derives run, step, job, worker session, attempt, and shared visibility from the lease. Caller-supplied lineage or visibility fields are rejected.
1638
1678
  */
1639
1679
  post: operations["createArtifact"];
@@ -1651,14 +1691,14 @@ export interface paths {
1651
1691
  cookie?: never;
1652
1692
  };
1653
1693
  /**
1654
- * Get an artifact
1694
+ * Get artifact
1655
1695
  * @description Returns artifact metadata after enforcing the caller's project and owner-user artifact scope.
1656
1696
  */
1657
1697
  get: operations["getArtifact"];
1658
1698
  put?: never;
1659
1699
  post?: never;
1660
1700
  /**
1661
- * Delete an artifact
1701
+ * Delete artifact
1662
1702
  * @description Soft-delete the artifact row and delete the underlying Mobius-managed object before reporting success. The tombstone remains for audit and run-history views, while content and quota charging are removed.
1663
1703
  */
1664
1704
  delete: operations["deleteArtifact"];
@@ -1697,7 +1737,7 @@ export interface paths {
1697
1737
  get?: never;
1698
1738
  put?: never;
1699
1739
  /**
1700
- * Create a signed artifact URL
1740
+ * Sign artifact URL
1701
1741
  * @description Generates a fresh, time-boxed Mobius-managed storage URL for the artifact after enforcing the caller's artifact access scope. Use `getArtifactContent` when bytes should flow through the Mobius API instead of a signed storage URL.
1702
1742
  */
1703
1743
  post: operations["createArtifactSignedUrl"];
@@ -1715,7 +1755,7 @@ export interface paths {
1715
1755
  cookie?: never;
1716
1756
  };
1717
1757
  /**
1718
- * Get per-org Mobius-managed artifact storage quota usage
1758
+ * Get storage usage
1719
1759
  * @description Returns Mobius-managed artifact quota usage for the current org.
1720
1760
  */
1721
1761
  get: operations["getArtifactStorageQuota"];
@@ -1819,7 +1859,7 @@ export interface components {
1819
1859
  * @enum {string}
1820
1860
  */
1821
1861
  ProjectAccessMode: "org_open" | "restricted";
1822
- /** @description Workspace boundary for automations, actions, credentials, agents, and runtime activity. Most operational APIs are project-scoped, so this object tells clients which handle to use and who can see the project. */
1862
+ /** @description Workspace boundary for loops, actions, credentials, agents, and runtime activity. Most operational APIs are project-scoped, so this object tells clients which handle to use and who can see the project. */
1823
1863
  Project: {
1824
1864
  /** @description Unique identifier for this project. */
1825
1865
  id: string;
@@ -1862,7 +1902,7 @@ export interface components {
1862
1902
  * @enum {string}
1863
1903
  */
1864
1904
  AgentModelRouteMode: "managed" | "worker" | "byo_provider";
1865
- /** @description Default model route used by built-in messaging and by automation agent steps that do not override the route. */
1905
+ /** @description Default model route used by built-in messaging and by loop agent steps that do not override the route. */
1866
1906
  AgentModelRoute: {
1867
1907
  mode: components["schemas"]["AgentModelRouteMode"];
1868
1908
  /** @description Environment to use for worker-backed model calls. */
@@ -1881,7 +1921,7 @@ export interface components {
1881
1921
  * @enum {string}
1882
1922
  */
1883
1923
  AgentToolPresentation: "flat" | "meta";
1884
- /** @description Project-scoped AI actor identity. An agent IS a principal (its permissions are role grants on that principal); agents are useful when automations need a named actor with instructions, capabilities, configuration, and session presence. */
1924
+ /** @description Project-scoped 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, capabilities, configuration, and session presence. */
1885
1925
  Agent: {
1886
1926
  /** @description Unique identifier for this agent. */
1887
1927
  id: string;
@@ -1900,7 +1940,7 @@ export interface components {
1900
1940
  /** @description Model identifier for platform agents. Accepts any id returned by `GET /v1/projects/{project}/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. */
1901
1941
  model?: string;
1902
1942
  model_route?: components["schemas"]["AgentModelRoute"];
1903
- /** @description Default tool presentation used by automation agent steps and built-in channel-message replies for this agent. */
1943
+ /** @description Default tool presentation used by loop agent steps and built-in channel-message replies for this agent. */
1904
1944
  tool_presentation?: components["schemas"]["AgentToolPresentation"];
1905
1945
  /** @description Custom system prompt for platform agents. Empty string uses the generated default based on the agent name. */
1906
1946
  system_prompt?: string;
@@ -1934,7 +1974,7 @@ export interface components {
1934
1974
  /** @description The list of results for this page. */
1935
1975
  items: components["schemas"]["Agent"][];
1936
1976
  };
1937
- /** @description Stored API credential metadata for automation and service access. The raw secret is never returned here; use this object to list, audit, expire, or identify keys by prefix without exposing tokens. */
1977
+ /** @description Stored API credential metadata for loop and service access. The raw secret is never returned here; use this object to list, audit, expire, or identify keys by prefix without exposing tokens. */
1938
1978
  APIKey: {
1939
1979
  /** @description Unique identifier for this API key. */
1940
1980
  id: string;
@@ -2053,9 +2093,9 @@ export interface components {
2053
2093
  * @enum {string}
2054
2094
  */
2055
2095
  ActionEndpointKind: "http" | "worker";
2056
- /** @description Registers a project-owned custom action callable from automations and agents. */
2096
+ /** @description Registers a project-owned custom action callable from loops and agents. */
2057
2097
  CreateActionRequest: {
2058
- /** @description Project-scoped identifier used in automation step definitions. Lowercase alphanumeric + hyphens, e.g. "send-email". Must be unique within the project. Cannot start with "mobius." (reserved prefix). */
2098
+ /** @description Project-scoped identifier used in loop step definitions. Lowercase alphanumeric + hyphens, e.g. "send-email". Must be unique within the project. Cannot start with "mobius." (reserved prefix). */
2059
2099
  name: string;
2060
2100
  /** @description Human-readable display name shown in the UI and catalog. */
2061
2101
  title?: string;
@@ -2112,11 +2152,11 @@ export interface components {
2112
2152
  [key: string]: string;
2113
2153
  };
2114
2154
  };
2115
- /** @description Project-owned custom action definition callable by automations and agents. */
2155
+ /** @description Project-owned custom action definition callable by loops and agents. */
2116
2156
  Action: {
2117
2157
  /** @description Unique identifier for this action. */
2118
2158
  id: string;
2119
- /** @description Project-scoped stable identifier used in automation definitions. */
2159
+ /** @description Project-scoped stable identifier used in loop definitions. */
2120
2160
  name: string;
2121
2161
  /** @description Human-readable display title for the action. */
2122
2162
  title?: string;
@@ -2175,7 +2215,7 @@ export interface components {
2175
2215
  /** @description Base64-encoded 32-byte signing key. Store it immediately — this is the only time it is returned. */
2176
2216
  signing_secret: string;
2177
2217
  };
2178
- /** @description One built-in, integration, or custom-backed action available to agents and automation authors. */
2218
+ /** @description One built-in, integration, or custom-backed action available to agents and loop authors. */
2179
2219
  ActionCatalogEntry: {
2180
2220
  /** @description Canonical dotted action name (e.g. `slack.post_message`). Translated to the provider-safe form (`slack_post_message`) only at the LLM boundary. */
2181
2221
  name: string;
@@ -2219,7 +2259,7 @@ export interface components {
2219
2259
  * @description Endpoint URL (populated for endpoint_kind: http actions only).
2220
2260
  */
2221
2261
  endpoint_url?: string;
2222
- /** @description Execution locations and worker requirements available to automation authors. */
2262
+ /** @description Execution locations and worker requirements available to loop authors. */
2223
2263
  execution?: components["schemas"]["ActionExecutionMetadata"];
2224
2264
  };
2225
2265
  ActionExecutionMetadata: {
@@ -2260,7 +2300,7 @@ export interface components {
2260
2300
  status: "active" | "completed" | "failed";
2261
2301
  /** @description Job created for this direct invocation. */
2262
2302
  job_id?: string;
2263
- /** @description Automation run ID. Present when an asynchronous run was created. */
2303
+ /** @description Loop run ID. Present when an asynchronous run was created. */
2264
2304
  run_id?: string;
2265
2305
  /** @description Action output. Present when status is "completed". */
2266
2306
  output?: {
@@ -2273,15 +2313,15 @@ export interface components {
2273
2313
  ActionInvocationEntry: {
2274
2314
  /** @description Unique identifier for this invocation record. */
2275
2315
  id: string;
2276
- /** @description Automation run that triggered this invocation, if run-backed. */
2316
+ /** @description Loop run that triggered this invocation, if run-backed. */
2277
2317
  run_id?: string;
2278
2318
  /** @description Job that triggered this invocation, if job-backed. */
2279
2319
  job_id?: string;
2280
- /** @description Automation step name that triggered this invocation. */
2320
+ /** @description Loop step name that triggered this invocation. */
2281
2321
  step_name?: string;
2282
2322
  /** @description Name of the action that was invoked. */
2283
2323
  action_name: string;
2284
- /** @description Invocation source ("automation", "direct", etc.). */
2324
+ /** @description Invocation source ("loop", "direct", etc.). */
2285
2325
  source: string;
2286
2326
  /** @description Input parameters passed to the action. */
2287
2327
  parameters?: {
@@ -2336,7 +2376,7 @@ export interface components {
2336
2376
  kind: "integration" | "capability";
2337
2377
  display_name: string;
2338
2378
  description?: string;
2339
- /** @description Whether this source can start an automation now. `capability` sources are always `ready`. `integration` sources are `ready` only when the project has an active, usable connection for the provider. */
2379
+ /** @description Whether this source can start a loop now. `capability` sources are always `ready`. `integration` sources are `ready` only when the project has an active, usable connection for the provider. */
2340
2380
  readiness: components["schemas"]["CapabilityReadiness"];
2341
2381
  /** @description Why an `integration` source is `needs_setup`. Omitted when `readiness` is `ready` and for `capability` sources. */
2342
2382
  readiness_reason?: components["schemas"]["CapabilityReadinessReason"];
@@ -2346,6 +2386,14 @@ export interface components {
2346
2386
  /** @description Dotted event-type identifier (`table.row.inserted`, `github.pull_request.opened`). */
2347
2387
  name: string;
2348
2388
  description?: string;
2389
+ /** @description JSON Schema for the normalized event data available to event-trigger runs at `{{ .inputs.event.* }}` and to event conditions/mappings at `event.*`. Absent only when the event payload is intentionally open-ended and the provider has not registered an authoring schema. */
2390
+ event_schema?: {
2391
+ [key: string]: unknown;
2392
+ };
2393
+ /** @description JSON Schema for normalized routing metadata available to event-trigger runs at `{{ .inputs.meta.* }}` and to event conditions/mappings at `meta.*`. */
2394
+ meta_schema?: {
2395
+ [key: string]: unknown;
2396
+ };
2349
2397
  };
2350
2398
  EventCatalogReservedPrefix: {
2351
2399
  prefix: string;
@@ -2358,6 +2406,11 @@ export interface components {
2358
2406
  default_model: string;
2359
2407
  /** @description Available providers in display order. Providers with no configured credentials are omitted. */
2360
2408
  items: components["schemas"]["ModelProviderGroup"][];
2409
+ /**
2410
+ * @description Present when `items` is empty because the request was denied rather than because no catalog exists. `platform_funding_denied` means Mobius-managed provider credentials are gated by billing or plan state; `credentials_unavailable` means no usable provider credentials were available.
2411
+ * @enum {string}
2412
+ */
2413
+ reason?: "platform_funding_denied" | "credentials_unavailable";
2361
2414
  };
2362
2415
  ModelProviderGroup: {
2363
2416
  /** @description Canonical provider id (`anthropic`, `openai`, `gemini`, `xai`). */
@@ -2406,15 +2459,15 @@ export interface components {
2406
2459
  */
2407
2460
  EnvironmentPurpose: "implementation" | "review" | "verification" | "preview" | "debug" | "worker" | "custom";
2408
2461
  /**
2409
- * @description High-level ownership policy for how Mobius plans to use the environment. `run` is one-shot and auto-cleaned with a run; `agent` and `automation` are persistent environment policies; `manual` is operator controlled.
2462
+ * @description High-level ownership policy for how Mobius plans to use the environment. `run` is one-shot and auto-cleaned with a run; `agent` and `loop` are persistent environment policies; `manual` is operator controlled.
2410
2463
  * @enum {string}
2411
2464
  */
2412
- EnvironmentMode: "manual" | "run" | "agent" | "automation";
2465
+ EnvironmentMode: "manual" | "run" | "agent" | "loop";
2413
2466
  /**
2414
2467
  * @description Execution or lifecycle object this environment is bound to. Ownership remains in `owned_by`.
2415
2468
  * @enum {string}
2416
2469
  */
2417
- EnvironmentBoundToType: "none" | "run" | "worker_session" | "service" | "agent" | "automation" | "manual";
2470
+ EnvironmentBoundToType: "none" | "run" | "worker_session" | "service" | "agent" | "loop" | "manual";
2418
2471
  /**
2419
2472
  * @description Whether a finished environment is retained or destroyed, and under what outcome.
2420
2473
  * @enum {string}
@@ -2724,9 +2777,9 @@ export interface components {
2724
2777
  WorkerSessionJobRef: {
2725
2778
  /** @description Job ID. */
2726
2779
  id: string;
2727
- /** @description Automation run that owns the job. */
2780
+ /** @description Loop run that owns the job. */
2728
2781
  run_id: string;
2729
- /** @description Automation step name. */
2782
+ /** @description Loop step name. */
2730
2783
  step_name: string;
2731
2784
  /** @description Action executed by the worker. */
2732
2785
  action: string;
@@ -2852,7 +2905,7 @@ export interface components {
2852
2905
  /** @enum {string} */
2853
2906
  kind: "action_execution" | "llm_generation";
2854
2907
  /** @enum {string} */
2855
- origin: "automation_action_step" | "agent_tool_call" | "agent_llm_call" | "conversation_tool_call" | "conversation_llm_call" | "direct_action_invoke" | "server_internal";
2908
+ origin: "loop_action_step" | "agent_tool_call" | "agent_llm_call" | "conversation_tool_call" | "conversation_llm_call" | "direct_action_invoke" | "server_internal";
2856
2909
  /** @enum {string} */
2857
2910
  executor_kind: "customer_worker" | "server_worker";
2858
2911
  queue: string;
@@ -3227,12 +3280,12 @@ export interface components {
3227
3280
  * @description Surface that created the session.
3228
3281
  * @enum {string}
3229
3282
  */
3230
- SessionOrigin: "manual" | "api" | "automation";
3283
+ SessionOrigin: "manual" | "api" | "loop";
3231
3284
  /**
3232
3285
  * @description Boundary used to resolve named sessions.
3233
3286
  * @enum {string}
3234
3287
  */
3235
- SessionScope: "agent" | "automation";
3288
+ SessionScope: "agent" | "loop";
3236
3289
  /**
3237
3290
  * @description Visibility of the session in project surfaces.
3238
3291
  * @enum {string}
@@ -3248,6 +3301,48 @@ export interface components {
3248
3301
  * @enum {string}
3249
3302
  */
3250
3303
  SessionMessageEntryType: "message" | "compaction";
3304
+ /**
3305
+ * @description Lifecycle status of one agent turn.
3306
+ * @enum {string}
3307
+ */
3308
+ AgentTurnStatus: "running" | "waiting" | "completed" | "failed" | "cancelled";
3309
+ /** @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. */
3310
+ AgentTurn: {
3311
+ /** @description Stable turn identifier. */
3312
+ id: string;
3313
+ /** @description Agent that ran this turn. */
3314
+ agent_id: string;
3315
+ /** @description Session this turn's transcript was appended to. */
3316
+ session_id: string;
3317
+ /** @description Loop run that triggered this turn. Absent for messaging turns. */
3318
+ run_id?: string;
3319
+ /** @description Step key (matches LoopRunStep.step_key, not its id) of the loop step that triggered this turn. Absent for messaging turns. */
3320
+ step_key?: string;
3321
+ /** @description Inbound channel exchange that triggered this turn. Absent for loop turns. */
3322
+ channel_exchange_id?: string;
3323
+ /** @description 1-based attempt number for this run-step; retries create new turns. */
3324
+ attempt: number;
3325
+ status: components["schemas"]["AgentTurnStatus"];
3326
+ /** @description Per-session ordering hint (cosmetic; turns are ordered by creation time). */
3327
+ seq?: number;
3328
+ /** @description Machine-readable failure category when the turn failed. */
3329
+ error_type?: string;
3330
+ /** @description Human-readable failure detail when the turn failed. */
3331
+ error_message?: string;
3332
+ /** Format: date-time */
3333
+ created_at: string;
3334
+ /** Format: date-time */
3335
+ updated_at: string;
3336
+ /**
3337
+ * Format: date-time
3338
+ * @description When the turn reached a terminal status.
3339
+ */
3340
+ completed_at?: string;
3341
+ };
3342
+ AgentTurnListResponse: {
3343
+ /** @description Turns in this session, ordered by creation time. */
3344
+ items: components["schemas"]["AgentTurn"][];
3345
+ };
3251
3346
  Session: {
3252
3347
  /** @description Stable session identifier. */
3253
3348
  id: string;
@@ -3330,6 +3425,8 @@ export interface components {
3330
3425
  covers_through_sequence?: number;
3331
3426
  /** @description Monotonic per-session sequence number assigned at append time. */
3332
3427
  sequence: number;
3428
+ /** @description AgentTurn that produced this message. Run, step, and channel identity for the message are read from this turn. Absent for compaction summaries and messages not tied to a turn. */
3429
+ turn_id?: string;
3333
3430
  /** @description Free-form caller metadata for this message. */
3334
3431
  metadata?: {
3335
3432
  [key: string]: unknown;
@@ -3390,8 +3487,6 @@ export interface components {
3390
3487
  project_id: string;
3391
3488
  /** @description Human-readable toolkit name. */
3392
3489
  name: string;
3393
- /** @description Stable slug used in API paths and references. */
3394
- slug?: string;
3395
3490
  /** @description Markdown description of the toolkit's purpose. */
3396
3491
  description?: string;
3397
3492
  /**
@@ -3399,11 +3494,8 @@ export interface components {
3399
3494
  * @enum {string}
3400
3495
  */
3401
3496
  source: "system" | "project";
3402
- /**
3403
- * @description Lifecycle status of the toolkit.
3404
- * @enum {string}
3405
- */
3406
- status: "active" | "archived";
3497
+ /** @description Resource tags applied to this toolkit. */
3498
+ tags?: components["schemas"]["TagMap"];
3407
3499
  /** @description Action selectors granted by this toolkit. Each entry is matched against the unified action catalog at manifest-resolution time. */
3408
3500
  action_grants: components["schemas"]["ToolkitActionGrant"][];
3409
3501
  /** @description User ID of the principal who created this toolkit. */
@@ -3424,12 +3516,12 @@ export interface components {
3424
3516
  ToolkitRequest: {
3425
3517
  /** @description Human-readable toolkit name. */
3426
3518
  name: string;
3427
- /** @description Optional stable slug. When omitted, the server derives one from `name`. */
3428
- slug?: string;
3429
3519
  /** @description Markdown description of the toolkit's purpose. */
3430
3520
  description?: string;
3431
3521
  /** @description Action selectors granted by this toolkit. */
3432
3522
  action_grants?: components["schemas"]["ToolkitActionGrant"][];
3523
+ /** @description Resource tags to apply to this toolkit. */
3524
+ tags?: components["schemas"]["TagMap"];
3433
3525
  };
3434
3526
  ToolkitListResponse: {
3435
3527
  /** @description The list of results for this page. */
@@ -3518,11 +3610,6 @@ export interface components {
3518
3610
  * @enum {string}
3519
3611
  */
3520
3612
  source: "system" | "project" | "imported";
3521
- /**
3522
- * @description Lifecycle status of the skill.
3523
- * @enum {string}
3524
- */
3525
- status: "active" | "archived";
3526
3613
  /** @description Markdown instructions loaded when the skill is active. */
3527
3614
  instructions: string;
3528
3615
  /** @description Canonical action names, wildcard selectors, or group references that narrow the agent's effective tool set while this skill is active. Uses the same selector vocabulary as toolkit grants. */
@@ -3535,6 +3622,8 @@ export interface components {
3535
3622
  model_hint?: string;
3536
3623
  /** @description Whether users may directly request this skill by name. */
3537
3624
  user_invocable?: boolean;
3625
+ /** @description Resource tags applied to this skill. */
3626
+ tags?: components["schemas"]["TagMap"];
3538
3627
  /** @description User ID of the principal who created this skill. */
3539
3628
  created_by?: string;
3540
3629
  /** @description User ID of the principal who last updated this skill. */
@@ -3569,6 +3658,8 @@ export interface components {
3569
3658
  model_hint?: string;
3570
3659
  /** @description Whether users may directly request this skill by name. */
3571
3660
  user_invocable?: boolean;
3661
+ /** @description Resource tags to apply to this skill. */
3662
+ tags?: components["schemas"]["TagMap"];
3572
3663
  };
3573
3664
  ImportSkillRequest: {
3574
3665
  /** @description Full skill document, optionally with YAML frontmatter. */
@@ -3664,7 +3755,7 @@ export interface components {
3664
3755
  policy_hash: string;
3665
3756
  /** @description Toolkit IDs that contributed to the resolved manifest. */
3666
3757
  toolkit_ids: string[];
3667
- /** @description Catalog entries the agent can invoke. Each entry surfaces to the LLM as its own named tool. Built-in, integration, automation, and custom-HTTP actions are intermingled here. */
3758
+ /** @description Catalog entries the agent can invoke. Each entry surfaces to the LLM as its own named tool. Built-in, integration, loop, and custom-HTTP actions are intermingled here. */
3668
3759
  tools: components["schemas"]["ActionCatalogEntry"][];
3669
3760
  /** @description Audit trail of group selectors that contributed to the resolved tool set. Operators see groups; the LLM only sees the flat `tools` list. */
3670
3761
  groups_resolved?: components["schemas"]["ResolvedActionGroup"][];
@@ -3724,26 +3815,26 @@ export interface components {
3724
3815
  /** @description When supplied, replaces the user tag set on the agent. System tags (`mobius:*`) are preserved. */
3725
3816
  tags?: components["schemas"]["TagMap"];
3726
3817
  };
3727
- /** @description An automation. The `triggers` array reports the currently materialized runnable triggers. Desired triggers are authored in `AutomationSpec.triggers` and reconciled when a version is published. */
3728
- Automation: {
3729
- /** @description Stable automation identifier. */
3818
+ /** @description A loop. The `triggers` array reports the currently materialized runnable triggers. Desired triggers are authored in `LoopSpec.triggers` and reconciled when a version is published. */
3819
+ Loop: {
3820
+ /** @description Stable loop identifier. */
3730
3821
  id: string;
3731
- /** @description Organization that owns this automation. */
3822
+ /** @description Organization that owns this loop. */
3732
3823
  org_id: string;
3733
- /** @description Project that owns this automation. */
3824
+ /** @description Project that owns this loop. */
3734
3825
  project_id: string;
3735
- /** @description Stable per-project automation handle. Immutable after creation. */
3826
+ /** @description Stable per-project loop handle. Immutable after creation. Use it for authored references and `?handle=` resolution; address the loop resource by `id`. */
3736
3827
  handle: string;
3737
3828
  /** @description Human-readable display name. */
3738
3829
  name: string;
3739
- /** @description Markdown description of the automation's purpose. */
3830
+ /** @description Markdown description of the loop's purpose. */
3740
3831
  description?: string;
3741
- status: components["schemas"]["AutomationStatus"];
3742
- /** @description User who created or currently owns this automation. */
3832
+ status: components["schemas"]["LoopStatus"];
3833
+ /** @description User who created or currently owns this loop. */
3743
3834
  owner?: string;
3744
3835
  /** @description Agent used by `agent` steps that do not pin an agent explicitly. */
3745
3836
  default_agent_id?: string;
3746
- /** @description Newest stored AutomationVersion number, regardless of publication status. */
3837
+ /** @description Newest stored LoopVersion number, regardless of publication status. */
3747
3838
  latest_version: number;
3748
3839
  /** @description Currently runnable version. Absent until a version is published. */
3749
3840
  published_version?: number;
@@ -3751,16 +3842,16 @@ export interface components {
3751
3842
  default_inputs?: {
3752
3843
  [key: string]: unknown;
3753
3844
  };
3754
- /** @description Free-form automation-level settings consumed by the engine. */
3845
+ /** @description Free-form loop-level settings consumed by the engine. */
3755
3846
  settings?: {
3756
3847
  [key: string]: unknown;
3757
3848
  };
3758
- /** @description Free-form label map used to organise automations in listings and search. */
3849
+ /** @description Free-form label map used to organise loops in listings and search. */
3759
3850
  tags?: {
3760
3851
  [key: string]: string;
3761
3852
  };
3762
- /** @description Triggers that can start runs of this automation. */
3763
- triggers: components["schemas"]["AutomationTrigger"][];
3853
+ /** @description Triggers that can start runs of this loop. */
3854
+ triggers: components["schemas"]["LoopTrigger"][];
3764
3855
  /**
3765
3856
  * Format: date-time
3766
3857
  * @description Timestamp of the most recent run start, if any.
@@ -3768,7 +3859,7 @@ export interface components {
3768
3859
  last_run_at?: string;
3769
3860
  /**
3770
3861
  * Format: date-time
3771
- * @description Soft-archive timestamp; absent on active automations.
3862
+ * @description Soft-archive timestamp; absent on active loops.
3772
3863
  */
3773
3864
  archived_at?: string;
3774
3865
  /**
@@ -3783,24 +3874,24 @@ export interface components {
3783
3874
  updated_at: string;
3784
3875
  };
3785
3876
  /**
3786
- * @description Lifecycle status of an automation.
3877
+ * @description Lifecycle status of a loop.
3787
3878
  * @enum {string}
3788
3879
  */
3789
- AutomationStatus: "draft" | "active" | "paused" | "archived";
3790
- AutomationListResponse: {
3880
+ LoopStatus: "draft" | "active" | "paused" | "archived";
3881
+ LoopListResponse: {
3791
3882
  /** @description The list of results for this page. */
3792
- items: components["schemas"]["Automation"][];
3883
+ items: components["schemas"]["Loop"][];
3793
3884
  /** @description Opaque cursor for the next page; absent when no more results. */
3794
3885
  next_cursor?: string;
3795
3886
  /** @description True when more items exist after this page. */
3796
3887
  has_more?: boolean;
3797
3888
  };
3798
- CreateAutomationRequest: {
3799
- /** @description Stable per-project automation handle. Immutable after creation. */
3889
+ CreateLoopRequest: {
3890
+ /** @description Stable per-project loop handle. Must be lowercase alphanumeric with single hyphen separators. Immutable after creation. */
3800
3891
  handle: string;
3801
3892
  /** @description Human-readable display name. */
3802
3893
  name: string;
3803
- /** @description Markdown description of the automation's purpose. */
3894
+ /** @description Markdown description of the loop's purpose. */
3804
3895
  description?: string;
3805
3896
  /** @description Agent used by `agent` steps that do not pin an agent explicitly. */
3806
3897
  default_agent_id?: string;
@@ -3808,58 +3899,61 @@ export interface components {
3808
3899
  default_inputs?: {
3809
3900
  [key: string]: unknown;
3810
3901
  };
3811
- /** @description Free-form automation-level settings consumed by the engine. */
3902
+ /** @description Free-form loop-level settings consumed by the engine. */
3812
3903
  settings?: {
3813
3904
  [key: string]: unknown;
3814
3905
  };
3815
- /** @description Free-form label map used to organise automations in listings and search. */
3906
+ /** @description Free-form label map used to organise loops in listings and search. */
3816
3907
  tags?: {
3817
3908
  [key: string]: string;
3818
3909
  };
3910
+ /** @description Optional initial loop spec to store as version 1 during creation. */
3911
+ spec?: components["schemas"]["LoopSpec"];
3912
+ /**
3913
+ * @description When true, `spec` is required. Mobius stores it as version 1, publishes it, materializes its triggers, and sets the loop status to `active` before returning.
3914
+ * @default false
3915
+ */
3916
+ activate: boolean;
3819
3917
  };
3820
- /** @description Partial update of automation metadata. Desired triggers live in `AutomationSpec.triggers` and are materialized when a version is published. */
3821
- UpdateAutomationRequest: {
3918
+ /** @description Partial update of loop metadata. Desired triggers live in `LoopSpec.triggers` and are materialized when a version is published. */
3919
+ UpdateLoopRequest: {
3822
3920
  /** @description Human-readable display name. */
3823
3921
  name?: string;
3824
- /** @description Markdown description of the automation's purpose. */
3922
+ /** @description Markdown description of the loop's purpose. */
3825
3923
  description?: string;
3826
- status?: components["schemas"]["AutomationStatus"];
3924
+ status?: components["schemas"]["LoopStatus"];
3827
3925
  /** @description Agent used by `agent` steps that do not pin an agent explicitly. */
3828
3926
  default_agent_id?: string;
3829
3927
  /** @description Default values merged into `inputs` when a run is started without overrides. */
3830
3928
  default_inputs?: {
3831
3929
  [key: string]: unknown;
3832
3930
  };
3833
- /** @description Free-form automation-level settings consumed by the engine. */
3931
+ /** @description Free-form loop-level settings consumed by the engine. */
3834
3932
  settings?: {
3835
3933
  [key: string]: unknown;
3836
3934
  };
3837
- /** @description Free-form label map used to organise automations in listings and search. */
3935
+ /** @description Free-form label map used to organise loops in listings and search. */
3838
3936
  tags?: {
3839
3937
  [key: string]: string;
3840
3938
  };
3841
3939
  };
3842
- AutomationVersion: {
3843
- /** @description Stable identifier for this AutomationVersion record. */
3940
+ LoopVersion: {
3941
+ /** @description Stable identifier for this LoopVersion record. */
3844
3942
  id: string;
3845
3943
  /** @description Organization that owns this version. */
3846
3944
  org_id: string;
3847
3945
  /** @description Project that owns this version. */
3848
3946
  project_id: string;
3849
- /** @description Automation this version belongs to. */
3850
- automation_id: string;
3851
- /** @description Monotonic version number, unique per automation. */
3947
+ /** @description Loop this version belongs to. */
3948
+ loop_id: string;
3949
+ /** @description Monotonic version number, unique per loop. */
3852
3950
  version: number;
3853
3951
  /**
3854
3952
  * @description Publication state. `draft` is editable but not runnable; `published` is the currently runnable version; `superseded` is a prior published version retained for historical runs.
3855
3953
  * @enum {string}
3856
3954
  */
3857
3955
  status: "draft" | "published" | "superseded";
3858
- spec?: components["schemas"]["AutomationSpec"];
3859
- /** @description Internal compiled execution plan derived from `spec`. Not part of the public contract. */
3860
- compiled_plan?: {
3861
- [key: string]: unknown;
3862
- };
3956
+ spec?: components["schemas"]["LoopSpec"];
3863
3957
  /** @description Validation result for `spec` produced at version-creation time. */
3864
3958
  validation?: {
3865
3959
  [key: string]: unknown;
@@ -3872,38 +3966,44 @@ export interface components {
3872
3966
  */
3873
3967
  created_at: string;
3874
3968
  };
3875
- /** @description Authoring representation of an automation. */
3876
- AutomationSpec: {
3969
+ /** @description Authoring representation of a loop. */
3970
+ LoopSpec: {
3877
3971
  /**
3878
- * @description Automation spec schema version. Current value is `1`.
3972
+ * @description Loop spec schema version. `"1"` renders strings with Go text/template `{{ .inputs.x }}` / `{{ .context.x }}` actions. `"2"` uses expr `${{ ... }}` templates and bare expr predicates over the `inputs`, `event`, `meta`, and `steps.<key>.output` namespace.
3879
3973
  * @default 1
3880
3974
  * @enum {string}
3881
3975
  */
3882
- schema_version: "1";
3976
+ schema_version: "1" | "2";
3883
3977
  /** @description Optional spec-local display name. */
3884
3978
  name?: string;
3885
3979
  /** @description Optional spec-local Markdown description. */
3886
3980
  description?: string;
3981
+ /** @description Declared run inputs. In schema_version 2 these form the run-input contract — undeclared keys are dropped and required inputs without defaults fail the start. */
3887
3982
  inputs?: {
3888
- [key: string]: components["schemas"]["AutomationSpecInput"];
3983
+ [key: string]: components["schemas"]["LoopSpecInput"];
3889
3984
  };
3890
3985
  /**
3891
- * @description Behavior when a run starts while another run of the same automation is active.
3986
+ * @description Behavior when a run starts while another run of the same loop is active.
3892
3987
  * @enum {string}
3893
3988
  */
3894
3989
  concurrency?: "allow" | "queue" | "skip" | "replace";
3895
3990
  /** @description Desired triggers materialized when a version is published. */
3896
- triggers?: components["schemas"]["AutomationSpecTrigger"][];
3897
- /** @description Source repositories the automation targets. When a shared managed environment is selected, the runtime prepares these repositories before user-authored steps run. */
3898
- repositories?: components["schemas"]["AutomationSpecRepository"][];
3899
- steps: components["schemas"]["AutomationStep"][];
3991
+ triggers?: components["schemas"]["LoopSpecTrigger"][];
3992
+ /** @description Source repositories the loop targets. When a shared managed environment is selected, the runtime prepares these repositories before user-authored steps run. */
3993
+ repositories?: components["schemas"]["LoopSpecRepository"][];
3994
+ steps: components["schemas"]["LoopStep"][];
3995
+ /** @description Declared run result. When present, string leaves are rendered against the run inputs and saved step outputs at completion and the rendered map is the run's result — the contract for API consumers, `run.completed` subscribers, and parent loops. When absent, the result is the full accumulated context map. In schema_version 2 string leaves use `${{ ... }}` interpolation. */
3996
+ output?: {
3997
+ [key: string]: unknown;
3998
+ };
3900
3999
  cleanup?: {
3901
4000
  [key: string]: unknown;
3902
4001
  }[];
3903
- defaults?: components["schemas"]["AutomationSpecDefaults"];
4002
+ limits?: components["schemas"]["LoopSpecLimits"];
4003
+ defaults?: components["schemas"]["LoopSpecDefaults"];
3904
4004
  };
3905
- /** @description Source repository target attached to an automation spec. */
3906
- AutomationSpecRepository: {
4005
+ /** @description Source repository target attached to a loop spec. */
4006
+ LoopSpecRepository: {
3907
4007
  /**
3908
4008
  * @description Repository provider. GitHub is the only supported provider today.
3909
4009
  * @default github
@@ -3917,14 +4017,14 @@ export interface components {
3917
4017
  /** @description Whether the provider reports this repository as private. */
3918
4018
  private?: boolean;
3919
4019
  };
3920
- AutomationSpecInput: {
4020
+ LoopSpecInput: {
3921
4021
  type?: string;
3922
4022
  description?: string;
3923
4023
  required?: boolean;
3924
4024
  /** @description Optional default value for this input. May be any JSON value. */
3925
4025
  default?: unknown;
3926
4026
  };
3927
- AutomationSpecTrigger: {
4027
+ LoopSpecTrigger: {
3928
4028
  /** @description Stable user-authored trigger key within the spec. */
3929
4029
  key?: string;
3930
4030
  /** @description Human-readable trigger name. */
@@ -3932,45 +4032,211 @@ export interface components {
3932
4032
  /** @enum {string} */
3933
4033
  kind: "http" | "schedule" | "event" | "manual";
3934
4034
  enabled?: boolean;
3935
- /** @description Kind-specific trigger configuration. */
3936
- config?: {
3937
- [key: string]: unknown;
3938
- };
4035
+ /** @description Kind-specific trigger configuration. Use `HTTPTriggerConfig` for `kind: http`, `ScheduleTriggerConfig` for `kind: schedule`, and `EventTriggerConfig` for `kind: event`. Omit for manual triggers. */
4036
+ config?: components["schemas"]["HTTPTriggerConfig"] | components["schemas"]["ScheduleTriggerConfig"] | components["schemas"]["EventTriggerConfig"];
3939
4037
  /** @enum {string} */
3940
4038
  concurrency_policy?: "allow" | "queue" | "skip" | "replace";
3941
4039
  max_concurrent_runs?: number;
3942
4040
  };
3943
- AutomationStep: {
4041
+ /** @description Configuration for `LoopSpec.triggers[]` entries with `kind` set to `http`. */
4042
+ HTTPTriggerConfig: {
4043
+ /** @description Optional public delivery handle for `POST /v1/triggers/http/{http_handle}`. Omit to let Mobius use the materialized trigger id as the unguessable handle. */
4044
+ http_handle?: string;
4045
+ };
4046
+ /** @description Configuration for `LoopSpec.triggers[]` entries with `kind` set to `schedule`. Provide exactly one of `cron` or `interval`; the compiler rejects configs that omit both or set both. */
4047
+ ScheduleTriggerConfig: {
4048
+ /** @description Standard five-field cron expression or descriptor such as `@hourly`. */
4049
+ cron?: string;
4050
+ /** @description Go duration string such as `5m`, `1h`, or `24h`. */
4051
+ interval?: string;
4052
+ /** @description IANA time zone for cron schedules, such as `America/New_York`. */
4053
+ timezone?: string;
4054
+ };
4055
+ /** @description Configuration for `LoopSpec.triggers[]` entries with `kind` set to `event`. */
4056
+ EventTriggerConfig: {
4057
+ /** @description Source-event type or catalog pattern this trigger subscribes to. */
4058
+ event_type: string;
4059
+ /** @description Optional source identifier used to scope event matching. */
4060
+ source_id?: string;
4061
+ /** @description Optional expr predicate evaluated against the public `{ event, meta }` envelope. */
4062
+ condition?: string;
4063
+ };
4064
+ /** @description User-authored loop step, discriminated by `kind`. */
4065
+ LoopStep: components["schemas"]["LoopAgentStepSpec"] | components["schemas"]["LoopActionStepSpec"] | components["schemas"]["LoopSleepStepSpec"] | components["schemas"]["LoopWaitForEventStepSpec"] | components["schemas"]["LoopSubLoopStepSpec"] | components["schemas"]["LoopCheckStepSpec"];
4066
+ LoopAgentStepSpec: {
3944
4067
  /** @description Stable step key within the spec. */
3945
4068
  key: string;
3946
4069
  /** @description Human-readable step name. */
3947
4070
  name?: string;
3948
- /** @enum {string} */
3949
- kind: "agent" | "action" | "sleep" | "wait_for_event" | "automation";
3950
- /** @description Kind-specific step configuration. */
3951
- config: components["schemas"]["AutomationAgentStep"] | components["schemas"]["AutomationActionStep"] | components["schemas"]["AutomationSleepStep"] | components["schemas"]["AutomationWaitForEventStep"] | components["schemas"]["AutomationSubAutomationStep"];
3952
- /** @description Step-local input object resolved when the step starts. String leaves may contain `{{ .inputs.* }}` or `{{ .context.* }}` Go text/template actions. */
4071
+ /** @description Bare expr predicate evaluated before the step runs; false skips the step. Requires schema_version "2". */
4072
+ if?: string;
4073
+ /**
4074
+ * @description discriminator enum property added by openapi-typescript
4075
+ * @enum {string}
4076
+ */
4077
+ kind: "agent";
4078
+ config: components["schemas"]["LoopAgentStep"];
4079
+ /** @description Step-local input object resolved when the step starts. String leaves may contain `{{ .inputs.* }}` or `{{ .context.* }}` Go text/template actions. schema_version 1 only; removed in 2 (reference inputs/event/meta/steps directly in config fields). */
3953
4080
  input?: {
3954
4081
  [key: string]: unknown;
3955
4082
  };
3956
- retry?: components["schemas"]["AutomationRetryPolicy"];
3957
- timeout?: components["schemas"]["AutomationTimeoutPolicy"];
3958
- /** @description Context key used to store this step's output. Defaults to `key`. */
4083
+ retry?: components["schemas"]["LoopRetryPolicy"];
4084
+ timeout?: components["schemas"]["LoopTimeoutPolicy"];
4085
+ /** @description Context key used to store this step's output. Defaults to `key`. schema_version 1 only; removed in 2 (outputs are always at steps.<key>.output). */
3959
4086
  save_as?: string;
3960
4087
  };
3961
- /** @description Run-level defaults inside the automation spec. Lives at `spec.defaults` in the JSON the engine compiles. */
3962
- AutomationSpecDefaults: {
3963
- /** @description Run wall-clock budget as a Go duration string (e.g. `30m`, `2h`, `90s`). When set, the engine stamps `wall_clock_deadline_at = run.started_at + wall_clock_timeout` and the reaper fails the run after that instant even if a step executor is still grinding. Omit or set to `0` to disable the guard. */
3964
- wall_clock_timeout?: string;
3965
- environment?: components["schemas"]["AutomationEnvironmentPolicy"];
3966
- agent_session?: components["schemas"]["AutomationAgentSessionPolicy"];
4088
+ LoopActionStepSpec: {
4089
+ /** @description Stable step key within the spec. */
4090
+ key: string;
4091
+ /** @description Human-readable step name. */
4092
+ name?: string;
4093
+ /** @description Bare expr predicate evaluated before the step runs; false skips the step. Requires schema_version "2". */
4094
+ if?: string;
4095
+ /**
4096
+ * @description discriminator enum property added by openapi-typescript
4097
+ * @enum {string}
4098
+ */
4099
+ kind: "action";
4100
+ config: components["schemas"]["LoopActionStep"];
4101
+ /** @description Step-local input object resolved when the step starts. String leaves may contain `{{ .inputs.* }}` or `{{ .context.* }}` Go text/template actions. schema_version 1 only; removed in 2 (reference inputs/event/meta/steps directly in config fields). */
4102
+ input?: {
4103
+ [key: string]: unknown;
4104
+ };
4105
+ retry?: components["schemas"]["LoopRetryPolicy"];
4106
+ timeout?: components["schemas"]["LoopTimeoutPolicy"];
4107
+ /** @description Context key used to store this step's output. Defaults to `key`. schema_version 1 only; removed in 2 (outputs are always at steps.<key>.output). */
4108
+ save_as?: string;
4109
+ };
4110
+ LoopSleepStepSpec: {
4111
+ /** @description Stable step key within the spec. */
4112
+ key: string;
4113
+ /** @description Human-readable step name. */
4114
+ name?: string;
4115
+ /** @description Bare expr predicate evaluated before the step runs; false skips the step. Requires schema_version "2". */
4116
+ if?: string;
4117
+ /**
4118
+ * @description discriminator enum property added by openapi-typescript
4119
+ * @enum {string}
4120
+ */
4121
+ kind: "sleep";
4122
+ config: components["schemas"]["LoopSleepStep"];
4123
+ /** @description Step-local input object resolved when the step starts. String leaves may contain `{{ .inputs.* }}` or `{{ .context.* }}` Go text/template actions. schema_version 1 only; removed in 2 (reference inputs/event/meta/steps directly in config fields). */
4124
+ input?: {
4125
+ [key: string]: unknown;
4126
+ };
4127
+ retry?: components["schemas"]["LoopRetryPolicy"];
4128
+ timeout?: components["schemas"]["LoopTimeoutPolicy"];
4129
+ /** @description Context key used to store this step's output. Defaults to `key`. schema_version 1 only; removed in 2 (outputs are always at steps.<key>.output). */
4130
+ save_as?: string;
4131
+ };
4132
+ LoopWaitForEventStepSpec: {
4133
+ /** @description Stable step key within the spec. */
4134
+ key: string;
4135
+ /** @description Human-readable step name. */
4136
+ name?: string;
4137
+ /** @description Bare expr predicate evaluated before the step runs; false skips the step. Requires schema_version "2". */
4138
+ if?: string;
4139
+ /**
4140
+ * @description discriminator enum property added by openapi-typescript
4141
+ * @enum {string}
4142
+ */
4143
+ kind: "wait_for_event";
4144
+ config: components["schemas"]["LoopWaitForEventStep"];
4145
+ /** @description Step-local input object resolved when the step starts. String leaves may contain `{{ .inputs.* }}` or `{{ .context.* }}` Go text/template actions. schema_version 1 only; removed in 2 (reference inputs/event/meta/steps directly in config fields). */
4146
+ input?: {
4147
+ [key: string]: unknown;
4148
+ };
4149
+ retry?: components["schemas"]["LoopRetryPolicy"];
4150
+ timeout?: components["schemas"]["LoopTimeoutPolicy"];
4151
+ /** @description Context key used to store this step's output. Defaults to `key`. schema_version 1 only; removed in 2 (outputs are always at steps.<key>.output). */
4152
+ save_as?: string;
4153
+ };
4154
+ LoopSubLoopStepSpec: {
4155
+ /** @description Stable step key within the spec. */
4156
+ key: string;
4157
+ /** @description Human-readable step name. */
4158
+ name?: string;
4159
+ /** @description Bare expr predicate evaluated before the step runs; false skips the step. Requires schema_version "2". */
4160
+ if?: string;
4161
+ /**
4162
+ * @description discriminator enum property added by openapi-typescript
4163
+ * @enum {string}
4164
+ */
4165
+ kind: "loop";
4166
+ config: components["schemas"]["LoopSubLoopStep"];
4167
+ /** @description Step-local input object resolved when the step starts. String leaves may contain `{{ .inputs.* }}` or `{{ .context.* }}` Go text/template actions. schema_version 1 only; removed in 2 (reference inputs/event/meta/steps directly in config fields). */
4168
+ input?: {
4169
+ [key: string]: unknown;
4170
+ };
4171
+ retry?: components["schemas"]["LoopRetryPolicy"];
4172
+ timeout?: components["schemas"]["LoopTimeoutPolicy"];
4173
+ /** @description Context key used to store this step's output. Defaults to `key`. schema_version 1 only; removed in 2 (outputs are always at steps.<key>.output). */
4174
+ save_as?: string;
4175
+ };
4176
+ LoopCheckStepSpec: {
4177
+ /** @description Stable step key within the spec. */
4178
+ key: string;
4179
+ /** @description Human-readable step name. */
4180
+ name?: string;
4181
+ /** @description Bare expr predicate evaluated before the step runs; false skips the step. Requires schema_version "2". */
4182
+ if?: string;
4183
+ /**
4184
+ * @description discriminator enum property added by openapi-typescript
4185
+ * @enum {string}
4186
+ */
4187
+ kind: "check";
4188
+ config: components["schemas"]["LoopCheckStep"];
4189
+ /** @description Step-local input object resolved when the step starts. String leaves may contain `{{ .inputs.* }}` or `{{ .context.* }}` Go text/template actions. schema_version 1 only; removed in 2 (reference inputs/event/meta/steps directly in config fields). */
4190
+ input?: {
4191
+ [key: string]: unknown;
4192
+ };
4193
+ retry?: components["schemas"]["LoopRetryPolicy"];
4194
+ timeout?: components["schemas"]["LoopTimeoutPolicy"];
4195
+ /** @description Context key used to store this step's output. Defaults to `key`. schema_version 1 only; removed in 2 (outputs are always at steps.<key>.output). */
4196
+ save_as?: string;
3967
4197
  };
3968
- /** @description Automatic managed-environment policy for automation execution. Omit to use the product default: each agent gets a persistent agent-bound environment, while direct environment actions get a run-bound environment. Set `disabled: true` to opt out. */
3969
- AutomationEnvironmentPolicy: {
4198
+ /** @description Run guardrails. Lives at `spec.limits` in the JSON the engine compiles. Every limit is optional; absent or zero means unbounded (plan-level org caps still apply), with one exception trial-plan runs default to a 100-credit ($1) budget when no budget is set here or on the start request. Paid plans default to unbounded. */
4199
+ LoopSpecLimits: {
4200
+ /**
4201
+ * Format: double
4202
+ * @description Run budget in US dollars (1 credit = $0.01). The run halts with stop reason `budget_exceeded` at the next checkpoint (step boundary or agent tool iteration) once its metered spend reaches the ceiling; a `run.budget_warning` event fires once at 80%. Enforcement granularity is one model call or metered action — a run can overshoot by at most the call in flight. Mutually exclusive with `credit_budget`; values finer than $0.00001 (one milli-credit) are rejected at compile.
4203
+ */
4204
+ budget_usd?: number;
4205
+ /**
4206
+ * Format: int64
4207
+ * @description Run budget in whole credits (1 credit = $0.01). Same ceiling semantics as `budget_usd`; set exactly one.
4208
+ */
4209
+ credit_budget?: number;
4210
+ /** @description Run wall-clock limit as a Go duration string (e.g. `30m`, `2h`, `90s`). When set, the engine stamps `wall_clock_deadline_at = run.started_at + wall_clock_timeout` and the reaper fails the run (stop reason `wall_clock_exceeded`) after that instant even if a step executor is still grinding. Omit or set to `0` to disable. */
4211
+ wall_clock_timeout?: string;
4212
+ /** @description Run-wide cap on agent turns across all steps. Each agent step execution (including retries and resumed turns) consumes one turn. Breach halts the run with stop reason `turn_limit_reached`. Distinct from a step's `max_turns`, which bounds tool iterations within a single turn. */
4213
+ max_agent_turns?: number;
4214
+ /**
4215
+ * Format: double
4216
+ * @description Rolling-24h spend ceiling in US dollars across ALL runs of this loop (the fleet-level counterpart of `budget_usd`). Enforced at run start (new runs are refused while the window is exhausted) and at the platform funding gate (an in-flight run halts at its next platform-funded call with stop reason `budget_exceeded`). Counts platform-billed spend; mutually exclusive with `daily_credit_budget`.
4217
+ */
4218
+ daily_budget_usd?: number;
4219
+ /**
4220
+ * Format: int64
4221
+ * @description Rolling-24h loop spend ceiling in whole credits. Same semantics as `daily_budget_usd`; set exactly one.
4222
+ */
4223
+ daily_credit_budget?: number;
4224
+ /** @description How many identical tool calls (same tool name and canonicalized arguments) one agent turn tolerates before the turn halts with a `progress_stalled` error — the duplicate-tool-call breaker. The step's retry policy applies; if the run fails from it the stop reason is `progress_stalled` and a `run.progress_stalled` event is emitted on each trip. Omit for the platform default (3). */
4225
+ max_duplicate_tool_calls?: number;
4226
+ /** @description Loop circuit breaker. After this many consecutive failed runs the loop auto-pauses (status `paused`) and emits a `loop.auto_paused` event, so a bad deploy cannot burn all night at one run per trigger fire. Completed runs reset the streak; cancelled runs are neutral. Omit to disable. */
4227
+ pause_after_consecutive_failures?: number;
4228
+ };
4229
+ /** @description Run-level defaults inside the loop spec. Lives at `spec.defaults` in the JSON the engine compiles. The run wall-clock limit moved to `limits.wall_clock_timeout`. */
4230
+ LoopSpecDefaults: {
4231
+ environment?: components["schemas"]["LoopEnvironmentPolicy"];
4232
+ agent_session?: components["schemas"]["LoopAgentSessionPolicy"];
4233
+ };
4234
+ /** @description Automatic managed-environment policy for loop execution. Omit to use the product default: each agent gets a persistent agent-bound environment, while direct environment actions get a run-bound environment. Set `disabled: true` to opt out. */
4235
+ LoopEnvironmentPolicy: {
3970
4236
  /** @description Disable automatic environment allocation. */
3971
4237
  disabled?: boolean;
3972
4238
  mode?: components["schemas"]["EnvironmentMode"];
3973
- /** @description Existing dedicated environment to use for this automation. */
4239
+ /** @description Existing dedicated environment to use for this loop. */
3974
4240
  environment_id?: string;
3975
4241
  /** @description Environment template to use when Mobius creates one. */
3976
4242
  template_id?: string;
@@ -3981,29 +4247,32 @@ export interface components {
3981
4247
  auto_start_worker?: boolean;
3982
4248
  retention_policy?: components["schemas"]["EnvironmentRetentionPolicy"];
3983
4249
  };
3984
- /** @description Agent step configuration recognised inside `AutomationSpec.steps[].config`. */
3985
- AutomationAgentStep: {
4250
+ /** @description Agent step configuration recognised inside `LoopSpec.steps[].config`. */
4251
+ LoopAgentStep: {
3986
4252
  agent_id: string;
3987
4253
  instructions: string;
4254
+ /** @description Optional per-step tool allow-list. When omitted, prompt-only managed agent steps default to no tools; set `disable_tools: false` to allow the agent's full granted tool set. */
3988
4255
  tool_names?: string[];
4256
+ /** @description Disable all tool calls for this agent step. When omitted, prompt-only managed agent steps (no `tool_names`, output schema, memory tables, or worker/BYOK model route) default to tool-less execution and skip managed environment allocation. Set `false` explicitly to opt back into the agent's granted tools. */
4257
+ disable_tools?: boolean;
3989
4258
  output_schema?: {
3990
4259
  [key: string]: unknown;
3991
4260
  };
3992
4261
  max_turns?: number;
3993
- model_route?: components["schemas"]["AutomationModelRoute"];
3994
- memory_tables?: components["schemas"]["AutomationAgentMemoryTableRef"][];
3995
- session?: components["schemas"]["AutomationAgentSessionPolicy"];
4262
+ model_route?: components["schemas"]["LoopModelRoute"];
4263
+ memory_tables?: components["schemas"]["LoopAgentMemoryTableRef"][];
4264
+ session?: components["schemas"]["LoopAgentSessionPolicy"];
3996
4265
  };
3997
- /** @description Durable conversation-session policy for automation agent steps. Omit to enable the product default: automation-scoped sessions keyed from the triggering conversation when Mobius can identify one, such as a Telegram chat ID. */
3998
- AutomationAgentSessionPolicy: {
4266
+ /** @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. */
4267
+ LoopAgentSessionPolicy: {
3999
4268
  /** @description Disable durable session context and transcript writes for the affected agent step(s). */
4000
4269
  disabled?: boolean;
4001
4270
  /**
4002
- * @description Named-session boundary. `auto` and omitted use `automation`. `agent` intentionally shares the named session across automations using the same agent.
4271
+ * @description Named-session boundary. `auto` and omitted use `loop`. `agent` intentionally shares the named session across loops using the same agent.
4003
4272
  * @enum {string}
4004
4273
  */
4005
- scope?: "auto" | "automation" | "agent";
4006
- /** @description Optional Go-template string rendered against `inputs`, `context`, `agent`, `automation`, `run`, `source`, and `step`. When omitted, Mobius derives a stable name from the event payload, falling back to the trigger or `default`. */
4274
+ scope?: "auto" | "loop" | "agent";
4275
+ /** @description Optional Go-template string rendered against `inputs`, `context`, `agent`, `loop`, `run`, `source`, and `step`. When omitted, Mobius derives a stable name from the event payload, falling back to the trigger or `default`. */
4007
4276
  name?: string;
4008
4277
  /** @description Optional Go-template string for the session display title. */
4009
4278
  title?: string;
@@ -4028,7 +4297,7 @@ export interface components {
4028
4297
  summary_model?: string;
4029
4298
  };
4030
4299
  };
4031
- AutomationModelRoute: {
4300
+ LoopModelRoute: {
4032
4301
  /** @enum {string} */
4033
4302
  mode: "managed" | "byo_provider" | "worker";
4034
4303
  /** @description Managed environment to route worker-backed model calls to. */
@@ -4038,14 +4307,14 @@ export interface components {
4038
4307
  queue?: string;
4039
4308
  required_capabilities?: string[];
4040
4309
  };
4041
- AutomationAgentMemoryTableRef: {
4310
+ LoopAgentMemoryTableRef: {
4042
4311
  table_id: string;
4043
4312
  /** @enum {string} */
4044
4313
  access_mode: "read" | "append" | "write";
4045
4314
  instructions?: string;
4046
4315
  };
4047
- /** @description Action step configuration recognised inside `AutomationSpec.steps[].config`. */
4048
- AutomationActionStep: {
4316
+ /** @description Action step configuration recognised inside `LoopSpec.steps[].config`. */
4317
+ LoopActionStep: {
4049
4318
  action_name: string;
4050
4319
  /** @enum {string} */
4051
4320
  execution_location?: "managed" | "worker" | "environment";
@@ -4055,15 +4324,15 @@ export interface components {
4055
4324
  [key: string]: unknown;
4056
4325
  };
4057
4326
  };
4058
- /** @description Sleep step configuration recognised inside `AutomationSpec.steps[].config`. */
4059
- AutomationSleepStep: {
4327
+ /** @description Sleep step configuration recognised inside `LoopSpec.steps[].config`. */
4328
+ LoopSleepStep: {
4060
4329
  /** @description Go duration string such as `30s`, `5m`, or `2h`. */
4061
4330
  duration?: string;
4062
4331
  /** Format: date-time */
4063
4332
  until?: string;
4064
4333
  };
4065
- /** @description Wait-for-event step configuration recognised inside `AutomationSpec.steps[].config`. */
4066
- AutomationWaitForEventStep: {
4334
+ /** @description Wait-for-event step configuration recognised inside `LoopSpec.steps[].config`. */
4335
+ LoopWaitForEventStep: {
4067
4336
  event_type: string;
4068
4337
  source_id?: string;
4069
4338
  match?: {
@@ -4076,10 +4345,10 @@ export interface components {
4076
4345
  [key: string]: string;
4077
4346
  };
4078
4347
  };
4079
- /** @description Automation-trigger step configuration recognised inside `AutomationSpec.steps[].config`. Triggers another automation in the same project as an independent child run (fire-and-forget). The child run records `parent_run_id`, `parent_automation_id`, and `parent_step_key` so the lineage is visible from the child. */
4080
- AutomationSubAutomationStep: {
4081
- /** @description Stable handle of the automation to trigger, scoped to the same project as the parent automation. */
4082
- automation_handle: string;
4348
+ /** @description Loop-trigger step configuration recognised inside `LoopSpec.steps[].config`. Triggers another loop in the same project as an independent child run (fire-and-forget). The child run records `parent_run_id`, `parent_loop_id`, and `parent_step_key` so the lineage is visible from the child. */
4349
+ LoopSubLoopStep: {
4350
+ /** @description Stable handle of the loop to trigger, scoped to the same project as the parent loop. */
4351
+ loop_handle: string;
4083
4352
  /** @description Input map handed to the child run. String leaves may contain `{{ .inputs.* }}` or `{{ .context.* }}` Go text/template actions resolved against the parent run. When omitted the parent step's resolved input map is forwarded. */
4084
4353
  inputs?: {
4085
4354
  [key: string]: unknown;
@@ -4087,38 +4356,70 @@ export interface components {
4087
4356
  /** @description Optional expr predicate evaluated against the `{ inputs, context }` envelope of the parent run before the child is triggered. It must evaluate to a bool; a false result skips the step and starts no child run. Same predicate language as `wait_for_event` and event trigger conditions. */
4088
4357
  condition?: string;
4089
4358
  };
4359
+ /** @description Check step configuration recognised inside `LoopSpec.steps[].config`. A check step evaluates typed assertions over the run's `{ inputs, context }` envelope — deterministic `expr` predicates, or `agent` judges for everything that isn't deterministic — records a per-assertion verdict with cited evidence, and routes on failure: fail the run (stop reason `check_failed`), continue with the red verdict on the record, or open an approval gate carrying the evidence (rejection stops the run with `gate_rejected`). All assertions are evaluated; there is no short-circuit. An assertion that errors (bad expr, judge model failure, unparseable verdict) fails closed — never a silent pass. */
4360
+ LoopCheckStep: {
4361
+ /** @description Assertions evaluated in order; names must be unique. */
4362
+ checks: components["schemas"]["LoopCheckAssertion"][];
4363
+ /**
4364
+ * @description Routing when any assertion fails. `fail` stops the run with stop reason `check_failed`. `continue` proceeds with the red verdict recorded. `gate` opens a `request_approval` interaction carrying the failed assertions and evidence; approval resumes the run with the verdict recorded as overridden, rejection stops it with `gate_rejected`.
4365
+ * @default fail
4366
+ * @enum {string}
4367
+ */
4368
+ on_fail: "fail" | "continue" | "gate";
4369
+ gate?: components["schemas"]["LoopCheckGate"];
4370
+ };
4371
+ LoopCheckAssertion: {
4372
+ /** @description Unique assertion name shown on the timeline proof row. */
4373
+ name: string;
4374
+ /**
4375
+ * @description `expr` evaluates a deterministic predicate with the same language as step conditions and event waits. `agent` runs a bounded judge turn returning a strict `{pass, reason}` verdict; its spend counts against the run budget and it consumes one run agent turn.
4376
+ * @enum {string}
4377
+ */
4378
+ kind: "expr" | "agent";
4379
+ /** @description Predicate for `kind: expr`, evaluated against the `{ inputs, context }` envelope. Required for expr assertions. */
4380
+ expr?: string;
4381
+ /** @description Judge agent id for `kind: agent`. Omit to use the built-in platform reviewer `mobius-reviewer`. The judge should be a different agent than the one that produced the evidence; the compiler warns when a judge grades its own work. */
4382
+ agent?: string;
4383
+ /** @description Judge instruction for `kind: agent`, rendered with `{{ .inputs.* }}` / `{{ .context.* }}` template actions before the cited evidence is appended. Required for agent assertions. */
4384
+ prompt?: string;
4385
+ /** @description Step keys whose saved outputs this assertion judges. Each must reference an earlier step. Cited outputs are shown to agent judges and recorded on the verdict. */
4386
+ evidence?: string[];
4387
+ };
4388
+ /** @description Approval gate opened when `on_fail: gate` trips. */
4389
+ LoopCheckGate: {
4390
+ /** @description Principals who must respond. String entries may contain template actions resolved against the run. */
4391
+ targets: string[];
4392
+ /** @description Prompt shown to reviewers. Defaults to a generated summary of the failed assertions. */
4393
+ prompt?: string;
4394
+ };
4090
4395
  /** @description Retry policy for a step. `max_attempts` is the total number of attempts (1 = no retry); it bounds both worker-reported failures and lease-loss recovery for worker-executed action steps. A worker that reports a failure with attempts remaining re-queues for another attempt rather than failing the run; the run fails once attempts are exhausted. The attempt count is visible on the run timeline (`action.retried`, `action.failed`) and on the executing job (`claim_attempt` / `max_attempts`). Cancellation is always terminal. Capped server-side at 10 attempts. */
4091
- AutomationRetryPolicy: {
4396
+ LoopRetryPolicy: {
4092
4397
  max_attempts?: number;
4093
4398
  /** @description Go duration string such as `30s`, `5m`, or `2h`. Applied between attempts for in-process (synchronous) action retries; worker-executed actions re-queue immediately for the next attempt. */
4094
4399
  delay?: string;
4095
4400
  };
4096
- AutomationTimeoutPolicy: {
4401
+ LoopTimeoutPolicy: {
4097
4402
  /** @description Go duration string such as `30s`, `5m`, or `2h`. */
4098
4403
  duration?: string;
4099
4404
  /** @enum {string} */
4100
4405
  on_timeout?: "fail";
4101
4406
  };
4102
- AutomationVersionListResponse: {
4103
- /** @description AutomationVersions returned for this automation, newest version first. */
4104
- items: components["schemas"]["AutomationVersion"][];
4407
+ LoopVersionListResponse: {
4408
+ /** @description LoopVersions returned for this loop, newest version first. */
4409
+ items: components["schemas"]["LoopVersion"][];
4105
4410
  };
4106
- CreateAutomationVersionRequest: {
4107
- spec: components["schemas"]["AutomationSpec"];
4108
- /** @description Optional precompiled execution plan. The engine will recompile from `spec` if omitted. */
4109
- compiled_plan?: {
4110
- [key: string]: unknown;
4111
- };
4411
+ CreateLoopVersionRequest: {
4412
+ spec: components["schemas"]["LoopSpec"];
4112
4413
  };
4113
- AutomationTrigger: {
4414
+ LoopTrigger: {
4114
4415
  /** @description Stable trigger identifier. */
4115
4416
  id: string;
4116
4417
  /** @description Organization that owns this trigger. */
4117
4418
  org_id: string;
4118
4419
  /** @description Project that owns this trigger. */
4119
4420
  project_id: string;
4120
- /** @description Automation this trigger belongs to. */
4121
- automation_id: string;
4421
+ /** @description Loop this trigger belongs to. */
4422
+ loop_id: string;
4122
4423
  /** @description Human-readable trigger name. */
4123
4424
  name: string;
4124
4425
  /** @description One of: http, schedule, event. */
@@ -4130,13 +4431,13 @@ export interface components {
4130
4431
  [key: string]: unknown;
4131
4432
  };
4132
4433
  /**
4133
- * @description Behavior when a fire arrives while prior runs of this automation are still active.
4434
+ * @description Behavior when a fire arrives while prior runs of this loop are still active.
4134
4435
  * @enum {string}
4135
4436
  */
4136
4437
  concurrency_policy: "allow" | "queue" | "skip" | "replace";
4137
4438
  /** @description Cap on concurrent runs allowed from this trigger. */
4138
4439
  max_concurrent_runs: number;
4139
- /** @description Public, project-scoped handle exposed in the HTTP-trigger delivery URL. Set only for http-kind triggers. */
4440
+ /** @description Public, globally unique delivery handle exposed in `POST /v1/triggers/http/{http_handle}`. The delivery endpoint has no project path segment, so the handle is resolved globally. Set only for http-kind triggers. */
4140
4441
  http_handle?: string;
4141
4442
  /** @description Whether an HMAC signing secret is configured on this HTTP trigger. The secret value itself is never returned — rotate it via the signing-secret endpoint to reveal a new value once. Set only for http-kind triggers. */
4142
4443
  signing_secret_set?: boolean;
@@ -4167,23 +4468,24 @@ export interface components {
4167
4468
  */
4168
4469
  updated_at: string;
4169
4470
  };
4471
+ /** @description Free-form JSON object delivered to the HTTP trigger. The payload is recorded on the source event and forwarded to the run as inputs. */
4472
+ HTTPTriggerDeliveryRequest: {
4473
+ [key: string]: unknown;
4474
+ };
4170
4475
  /** @description Synchronous receipt for an inbound HTTP-trigger delivery. The trigger dispatch and run start happen asynchronously after this response. Clients can poll via `GET /v1/projects/{project}/runs?source_event_id=<source_event_id>` to discover the run once the source-event processor reserves it. */
4171
4476
  HTTPTriggerDeliveryResponse: {
4172
4477
  /** @description Durable source-event id (also the `dedup_key` seed). Stable across retries with the same `Idempotency-Key`. */
4173
4478
  source_event_id: string;
4174
4479
  /**
4175
- * @description Acceptance status of the source-event row:
4176
- * * `accepted` — the row is durable; processing happens asynchronously.
4177
- * * `skipped` — the trigger is disabled or has no live subscribers.
4178
- * * `failed` — the row could not be enqueued (synchronous validation error).
4480
+ * @description Acceptance status of the source-event row. The only synchronous success value is `accepted`; processing happens asynchronously after the source event is durable.
4179
4481
  * @enum {string}
4180
4482
  */
4181
- status: "accepted" | "skipped" | "failed";
4483
+ status: "accepted";
4182
4484
  /** @description True when an existing source-event row was returned for the same idempotency key. */
4183
4485
  deduped?: boolean;
4184
4486
  };
4185
4487
  /**
4186
- * @description Body for `POST /v1/projects/{project}/automations/{handle}/runs`. All fields are optional; an empty body starts a run with no inputs and no attribution.
4488
+ * @description Body for `POST /v1/projects/{project}/loops/{id}/runs`. All fields are optional; an empty body starts a run with no inputs and no attribution.
4187
4489
  * @example {
4188
4490
  * "inputs": {
4189
4491
  * "issue_id": "42"
@@ -4193,17 +4495,28 @@ export interface components {
4193
4495
  * "id": "review-service",
4194
4496
  * "label": "review-service"
4195
4497
  * },
4196
- * "external_id": "review-service:issue-42"
4498
+ * "idempotency_key": "review-service:issue-42",
4499
+ * "credit_budget": 1000
4197
4500
  * }
4198
4501
  */
4199
- StartAutomationRunRequest: {
4502
+ StartLoopRunRequest: {
4200
4503
  /** @description Free-form input map passed to the run. Available to steps via `{{ .inputs.<key> }}` Go text/template actions. */
4201
4504
  inputs?: {
4202
4505
  [key: string]: unknown;
4203
4506
  };
4204
- source?: components["schemas"]["AutomationRunSource"];
4205
- /** @description Caller-supplied idempotency key, scoped to (org, project). Repeat calls with the same `external_id` while the prior run is still non-terminal return the existing run (same `id`). A repeat after the prior run terminated returns `409 Conflict` with code `external_id_conflict` and details containing the existing run id and its terminal status. */
4206
- external_id?: string;
4507
+ source?: components["schemas"]["LoopRunSource"];
4508
+ /** @description Caller-supplied idempotency key, scoped to (org, project). Repeat calls with the same `idempotency_key` while the prior run is still non-terminal return the existing run (same `id`). A repeat after the prior run terminated returns `409 Conflict` with code `idempotency_key_conflict` and details containing the existing run id and its terminal status. */
4509
+ idempotency_key?: string;
4510
+ /**
4511
+ * Format: double
4512
+ * @description Per-run budget override in US dollars (1 credit = $0.01). Overrides the loop spec's `limits` budget for this run only. Mutually exclusive with `credit_budget` — setting both is a `400`. Values finer than $0.00001 (one milli-credit) are rejected. The run halts at the next checkpoint (step boundary or agent tool iteration) once spend reaches the budget; enforcement granularity is one model call or metered action.
4513
+ */
4514
+ budget_usd?: number;
4515
+ /**
4516
+ * Format: int64
4517
+ * @description Per-run budget override in whole credits (1 credit = $0.01). Same ceiling semantics as `budget_usd`; set exactly one.
4518
+ */
4519
+ credit_budget?: number;
4207
4520
  };
4208
4521
  /**
4209
4522
  * @description Body for the cancellation endpoint. All fields optional.
@@ -4211,12 +4524,12 @@ export interface components {
4211
4524
  * "reason": "superseded by manual remediation"
4212
4525
  * }
4213
4526
  */
4214
- CancelAutomationRunRequest: {
4527
+ CancelLoopRunRequest: {
4215
4528
  /** @description Human-readable cancellation reason recorded on the run. */
4216
4529
  reason?: string;
4217
4530
  };
4218
4531
  /**
4219
- * @description Body for resuming a suspended automation step.
4532
+ * @description Body for resuming a suspended loop step.
4220
4533
  * @example {
4221
4534
  * "step_key": "wait_for_external_result",
4222
4535
  * "result": {
@@ -4225,45 +4538,63 @@ export interface components {
4225
4538
  * }
4226
4539
  * }
4227
4540
  */
4228
- SignalAutomationRunRequest: {
4229
- /** @description Step key currently in `suspended` state that should resume. Must match a step declared in the run's automation version spec. */
4541
+ SignalLoopRunRequest: {
4542
+ /** @description Step key currently in `suspended` state that should resume. Must match a step declared in the run's loop version spec. */
4230
4543
  step_key: string;
4231
4544
  /** @description Free-form payload saved as the resumed step's output. */
4232
4545
  result?: {
4233
4546
  [key: string]: unknown;
4234
4547
  };
4235
4548
  };
4236
- /** @description Optional attribution for the call that started this run. Triggers and webhooks populate `trigger_id` and `trigger_fire_id`; API callers usually only set `type` and `id`. */
4237
- AutomationRunSource: {
4238
- /** @description One of `api`, `trigger`, `manual`, `signal`. */
4239
- type?: string;
4549
+ /** @description Optional attribution for the call that started this run. Triggers and HTTP trigger dispatch populate `trigger_id` and `trigger_fire_id`. API callers usually only set `type` and `id`. */
4550
+ LoopRunSource: {
4551
+ /**
4552
+ * @description Source category for the run start.
4553
+ * @enum {string}
4554
+ */
4555
+ type?: "api" | "trigger" | "manual" | "signal";
4240
4556
  /** @description Identifier within the source type's namespace. */
4241
4557
  id?: string;
4242
4558
  /** @description Display label. */
4243
4559
  label?: string;
4244
4560
  /** @description Trigger that fired this run, if any. */
4245
- trigger_id?: string;
4246
- /** @description Idempotency key for trigger retries. When set, Engine.Start returns the existing run for this fire instead of creating a duplicate. */
4247
- trigger_fire_id?: string;
4561
+ readonly trigger_id?: string;
4562
+ /** @description Internal trigger-fire ledger id used to deduplicate trigger dispatch retries. Present only for trigger-started runs. */
4563
+ readonly trigger_fire_id?: string;
4248
4564
  };
4249
- /** @description One automation run record. */
4250
- AutomationRun: {
4565
+ /** @description One loop run record. */
4566
+ LoopRun: {
4251
4567
  /** @description Stable run identifier. */
4252
4568
  id: string;
4253
4569
  /** @description Organization that owns this run. */
4254
4570
  org_id: string;
4255
4571
  /** @description Project that owns this run. */
4256
4572
  project_id: string;
4257
- /** @description Automation this run belongs to. */
4258
- automation_id: string;
4259
- /** @description Human-readable name of the automation this run belongs to. */
4260
- automation_name?: string;
4261
- /** @description AutomationVersion record this run is executing. */
4262
- automation_version_id: string;
4263
- /** @description Version number of the AutomationVersion this run is executing. */
4264
- automation_version: number;
4265
- status: components["schemas"]["AutomationRunStatus"];
4266
- /** @description Input map supplied when the run started, merged over the automation's `default_inputs`, and reachable in step templates at `{{ .inputs.<key> }}`. For event-kind trigger runs this is the normalized `{ event, meta }` envelope (`{{ .inputs.event.* }}`, `{{ .inputs.meta.* }}`) — see the automation templating guide. */
4573
+ /** @description Loop this run belongs to. */
4574
+ loop_id: string;
4575
+ /** @description Human-readable name of the loop this run belongs to. */
4576
+ loop_name?: string;
4577
+ /** @description LoopVersion record this run is executing. */
4578
+ loop_version_id: string;
4579
+ /** @description Version number of the LoopVersion this run is executing. */
4580
+ loop_version: number;
4581
+ status: components["schemas"]["LoopRunStatus"];
4582
+ stop_reason?: components["schemas"]["LoopRunStopReason"];
4583
+ /**
4584
+ * Format: int64
4585
+ * @description The run's budget ceiling in milli-credits (1 credit = 1,000 milli-credits = $0.01). Resolved at run start from the StartRun override, the loop spec's `limits` block, or the trial-plan default, in that order. Absent when the run is unbounded.
4586
+ */
4587
+ credit_budget_milli?: number;
4588
+ /**
4589
+ * Format: int64
4590
+ * @description Metered spend attributed to this run so far, in milli-credits. Incremented atomically with each usage-ledger insert that carries this run's id. Counts all metered work regardless of credential source (BYOK calls count at their rate-card equivalent even though they bill zero credits).
4591
+ */
4592
+ credit_spent_milli?: number;
4593
+ /** @description Run-wide cap on agent turns across all steps, from the loop spec's `limits.max_agent_turns`. Absent when unbounded. */
4594
+ max_agent_turns?: number;
4595
+ /** @description Number of agent turns started for this run so far. Compared against `max_agent_turns` when that cap is set. */
4596
+ agent_turns_used?: number;
4597
+ /** @description Input map supplied when the run started, merged over the loop's `default_inputs`, and reachable in step templates at `{{ .inputs.<key> }}`. For event-kind trigger runs this is the normalized `{ event, meta }` envelope (`{{ .inputs.event.* }}`, `{{ .inputs.meta.* }}`) — see the loop templating guide. */
4267
4598
  inputs?: {
4268
4599
  [key: string]: unknown;
4269
4600
  };
@@ -4271,12 +4602,12 @@ export interface components {
4271
4602
  result?: {
4272
4603
  [key: string]: unknown;
4273
4604
  };
4274
- source?: components["schemas"]["AutomationRunSource"];
4275
- /** @description Run that triggered this run via an `automation` step. Present only on child runs; absent for top-level runs. */
4605
+ source?: components["schemas"]["LoopRunSource"];
4606
+ /** @description Run that triggered this run via an `loop` step. Present only on child runs; absent for top-level runs. */
4276
4607
  parent_run_id?: string;
4277
- /** @description Automation that triggered this run via an `automation` step. Present only on child runs. */
4278
- parent_automation_id?: string;
4279
- /** @description Step key within the parent run's automation that triggered this run. Present only on child runs. */
4608
+ /** @description Loop that triggered this run via an `loop` step. Present only on child runs. */
4609
+ parent_loop_id?: string;
4610
+ /** @description Step key within the parent run's loop that triggered this run. Present only on child runs. */
4280
4611
  parent_step_key?: string;
4281
4612
  /** @description Human-readable failure summary; populated on `failed` runs. */
4282
4613
  error_message?: string;
@@ -4289,7 +4620,7 @@ export interface components {
4289
4620
  wake_at?: string;
4290
4621
  /**
4291
4622
  * Format: date-time
4292
- * @description Deadline after which the automation reaper fails the run.
4623
+ * @description Deadline after which the loop reaper fails the run.
4293
4624
  */
4294
4625
  wall_clock_deadline_at?: string;
4295
4626
  /**
@@ -4314,29 +4645,36 @@ export interface components {
4314
4645
  updated_at: string;
4315
4646
  };
4316
4647
  /**
4317
- * @description Lifecycle state of an automation run.
4648
+ * @description Lifecycle state of a loop run.
4649
+ * @enum {string}
4650
+ */
4651
+ LoopRunStatus: "queued" | "running" | "suspended" | "completed" | "failed" | "cancelled";
4652
+ /**
4653
+ * @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.
4654
+ *
4655
+ * Grouping: `completed` is the success terminal. `step_failed`, `check_failed`, and `gate_rejected` mean the work failed (an error, a failed verification, or a human rejection at a gate). `budget_exceeded`, `turn_limit_reached`, `wall_clock_exceeded`, `step_limit_reached`, and `progress_stalled` mean a configured guardrail halted the run — the limit worked; the loop did not break. `cancelled` and `replaced` mean somebody (or a concurrency policy) chose to stop it.
4318
4656
  * @enum {string}
4319
4657
  */
4320
- AutomationRunStatus: "queued" | "running" | "suspended" | "completed" | "failed" | "cancelled";
4321
- AutomationRunListResponse: {
4658
+ LoopRunStopReason: "completed" | "step_failed" | "check_failed" | "gate_rejected" | "cancelled" | "replaced" | "wall_clock_exceeded" | "budget_exceeded" | "turn_limit_reached" | "progress_stalled" | "step_limit_reached";
4659
+ LoopRunListResponse: {
4322
4660
  /** @description The list of results for this page. */
4323
- items: components["schemas"]["AutomationRun"][];
4661
+ items: components["schemas"]["LoopRun"][];
4324
4662
  /** @description Opaque cursor for the next page; absent when no more results. */
4325
4663
  next_cursor?: string;
4326
4664
  /** @description True when more items exist after this page. */
4327
4665
  has_more?: boolean;
4328
4666
  };
4329
4667
  /**
4330
- * @description The step type. `cleanup` is system-materialized — it appears in run step listings for terminal cleanup work but cannot be authored in an `AutomationSpec`.
4668
+ * @description The step type. `cleanup` is system-materialized — it appears in run step listings for terminal cleanup work but cannot be authored in an `LoopSpec`.
4331
4669
  * @enum {string}
4332
4670
  */
4333
- AutomationRunStepKind: "agent" | "action" | "sleep" | "wait_for_event" | "cleanup";
4671
+ LoopRunStepKind: "agent" | "action" | "sleep" | "wait_for_event" | "interaction" | "loop" | "check" | "cleanup";
4334
4672
  /**
4335
- * @description Lifecycle state of an automation run step.
4673
+ * @description Lifecycle state of a loop run step.
4336
4674
  * @enum {string}
4337
4675
  */
4338
- AutomationRunStepStatus: "pending" | "running" | "suspended" | "completed" | "failed" | "skipped" | "cancelled";
4339
- AutomationRunStep: {
4676
+ LoopRunStepStatus: "pending" | "running" | "suspended" | "completed" | "failed" | "skipped" | "cancelled";
4677
+ LoopRunStep: {
4340
4678
  /** @description Stable step identifier. */
4341
4679
  id: string;
4342
4680
  /** @description Organization that owns the parent run. */
@@ -4345,12 +4683,12 @@ export interface components {
4345
4683
  project_id: string;
4346
4684
  /** @description Run this step belongs to. */
4347
4685
  run_id: string;
4348
- /** @description Stable key for this step within its automation version. */
4686
+ /** @description Stable key for this step within its loop version. */
4349
4687
  step_key: string;
4350
4688
  /** @description Display name from the authored spec, when present. */
4351
4689
  step_name?: string;
4352
- kind: components["schemas"]["AutomationRunStepKind"];
4353
- status: components["schemas"]["AutomationRunStepStatus"];
4690
+ kind: components["schemas"]["LoopRunStepKind"];
4691
+ status: components["schemas"]["LoopRunStepStatus"];
4354
4692
  /**
4355
4693
  * Format: int64
4356
4694
  * @description Zero-indexed ordinal of this step within its run.
@@ -4376,6 +4714,15 @@ export interface components {
4376
4714
  error_type?: string;
4377
4715
  /** @description Human-readable error message populated on failure. */
4378
4716
  error_message?: string;
4717
+ /**
4718
+ * @description Check outcome for `check`-kind steps; absent on every other kind. A failed check routed `on_fail: continue` completes the step with `verdict: fail` — status and verdict are separate axes (the step did its job: it checked).
4719
+ * @enum {string}
4720
+ */
4721
+ verdict?: "pass" | "fail";
4722
+ /** @description Verdict document for `check`-kind steps: `verdict`, `on_fail`, `checks` (per-assertion results — name, kind, pass, expr or judge reason, judge identity, evidence refs), `failed` (red assertion names), and `overridden_by` / `gate` records when an approval gate resolved the verdict. */
4723
+ verdict_detail?: {
4724
+ [key: string]: unknown;
4725
+ };
4379
4726
  /**
4380
4727
  * Format: date-time
4381
4728
  * @description Time the step entered `running`.
@@ -4397,11 +4744,11 @@ export interface components {
4397
4744
  */
4398
4745
  updated_at: string;
4399
4746
  };
4400
- AutomationRunStepListResponse: {
4747
+ LoopRunStepListResponse: {
4401
4748
  /** @description Steps for this run in `seq` order. */
4402
- items: components["schemas"]["AutomationRunStep"][];
4749
+ items: components["schemas"]["LoopRunStep"][];
4403
4750
  };
4404
- AutomationRunEvent: {
4751
+ LoopRunEvent: {
4405
4752
  /** @description Stable event identifier. */
4406
4753
  id: string;
4407
4754
  /** @description Organization that owns the parent run. */
@@ -4415,11 +4762,15 @@ export interface components {
4415
4762
  * @description Monotonic per-run sequence number used for ordering and resume.
4416
4763
  */
4417
4764
  sequence: number;
4418
- /** @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`). */
4765
+ /**
4766
+ * @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`).
4767
+ *
4768
+ * Guardrail events: `run.budget_warning` fires once when run spend first reaches 80% of the run budget (payload: `credit_budget_milli`, `credit_spent_milli`, `percent`); `run.budget_exceeded` fires when the budget halts the run at a checkpoint (same payload plus the `step` it halted before). `usage.recorded` payloads carry `step_key`, the event's `credit_cost_milli`, its `budget_cost_milli` (rate-card cost counted against the run budget, nonzero even for BYOK), and the cumulative `run_credit_spent_milli`.
4769
+ */
4419
4770
  event_type: string;
4420
4771
  /** @description ID of the step this event belongs to, when applicable. */
4421
4772
  step_id?: string | null;
4422
- /** @description Automation step key this event belongs to, when applicable. */
4773
+ /** @description Loop step key this event belongs to, when applicable. */
4423
4774
  step_key?: string | null;
4424
4775
  /** @description Event-type-specific payload. See the run-event taxonomy for shapes. */
4425
4776
  payload?: {
@@ -4431,9 +4782,9 @@ export interface components {
4431
4782
  */
4432
4783
  created_at: string;
4433
4784
  };
4434
- AutomationRunEventListResponse: {
4785
+ LoopRunEventListResponse: {
4435
4786
  /** @description Run events in this page, ordered by `sequence` ascending. */
4436
- items: components["schemas"]["AutomationRunEvent"][];
4787
+ items: components["schemas"]["LoopRunEvent"][];
4437
4788
  /**
4438
4789
  * Format: int64
4439
4790
  * @description Sequence number of the most recent event in `items`; clients can pass this back as `since_sequence` on the next poll.
@@ -4657,9 +5008,9 @@ export interface components {
4657
5008
  /** @description User-keyed private artifact-space owner. Empty for project-shared artifacts. */
4658
5009
  owner_id: string;
4659
5010
  visibility: components["schemas"]["ArtifactVisibility"];
4660
- /** @description Automation run that produced this artifact, derived from the active worker lease. */
5011
+ /** @description Loop run that produced this artifact, derived from the active worker lease. */
4661
5012
  run_id?: string;
4662
- /** @description Automation step that produced this artifact, derived from the active worker lease. */
5013
+ /** @description Loop step that produced this artifact, derived from the active worker lease. */
4663
5014
  step_id?: string;
4664
5015
  /** @description Display name or relative virtual path. Forward slash may be used to organize artifacts inside private or shared project space. */
4665
5016
  name: string;
@@ -4837,7 +5188,7 @@ export interface components {
4837
5188
  ProjectHandleParam: string;
4838
5189
  /** @description Resource ID. */
4839
5190
  IDParam: string;
4840
- /** @description Project-scoped action name used in automation step definitions. */
5191
+ /** @description Project-scoped action name used in loop step definitions. */
4841
5192
  ActionNameParam: string;
4842
5193
  /** @description Principal ID. */
4843
5194
  principal_id: string;
@@ -4881,7 +5232,7 @@ export interface components {
4881
5232
  TableOwnedByMeParam: boolean;
4882
5233
  /** @description TypeID of the artifact (`art_...`) */
4883
5234
  ArtifactIdParam: string;
4884
- /** @description Automation run ID */
5235
+ /** @description Loop run ID */
4885
5236
  RunIdParam: string;
4886
5237
  };
4887
5238
  requestBodies: never;
@@ -5052,7 +5403,7 @@ export interface operations {
5052
5403
  path: {
5053
5404
  /** @description Project handle (unique per organization) */
5054
5405
  project: components["parameters"]["ProjectHandleParam"];
5055
- /** @description Project-scoped action name used in automation step definitions. */
5406
+ /** @description Project-scoped action name used in loop step definitions. */
5056
5407
  action_name: components["parameters"]["ActionNameParam"];
5057
5408
  };
5058
5409
  cookie?: never;
@@ -5073,7 +5424,7 @@ export interface operations {
5073
5424
  path: {
5074
5425
  /** @description Project handle (unique per organization) */
5075
5426
  project: components["parameters"]["ProjectHandleParam"];
5076
- /** @description Project-scoped action name used in automation step definitions. */
5427
+ /** @description Project-scoped action name used in loop step definitions. */
5077
5428
  action_name: components["parameters"]["ActionNameParam"];
5078
5429
  };
5079
5430
  cookie?: never;
@@ -5106,7 +5457,7 @@ export interface operations {
5106
5457
  path: {
5107
5458
  /** @description Project handle (unique per organization) */
5108
5459
  project: components["parameters"]["ProjectHandleParam"];
5109
- /** @description Project-scoped action name used in automation step definitions. */
5460
+ /** @description Project-scoped action name used in loop step definitions. */
5110
5461
  action_name: components["parameters"]["ActionNameParam"];
5111
5462
  };
5112
5463
  cookie?: never;
@@ -5134,7 +5485,7 @@ export interface operations {
5134
5485
  cursor?: components["parameters"]["CursorParam"];
5135
5486
  /** @description Maximum number of items to return */
5136
5487
  limit?: components["parameters"]["LimitParam"];
5137
- /** @description Filter to invocations from a specific automation run. */
5488
+ /** @description Filter to invocations from a specific loop run. */
5138
5489
  run_id?: string;
5139
5490
  /** @description Filter to invocations from a specific job. */
5140
5491
  job_id?: string;
@@ -5172,7 +5523,7 @@ export interface operations {
5172
5523
  path: {
5173
5524
  /** @description Project handle (unique per organization) */
5174
5525
  project: components["parameters"]["ProjectHandleParam"];
5175
- /** @description Project-scoped action name used in automation step definitions. */
5526
+ /** @description Project-scoped action name used in loop step definitions. */
5176
5527
  action_name: components["parameters"]["ActionNameParam"];
5177
5528
  };
5178
5529
  cookie?: never;
@@ -5265,7 +5616,7 @@ export interface operations {
5265
5616
  path: {
5266
5617
  /** @description Project handle (unique per organization) */
5267
5618
  project: components["parameters"]["ProjectHandleParam"];
5268
- /** @description Project-scoped action name used in automation step definitions. */
5619
+ /** @description Project-scoped action name used in loop step definitions. */
5269
5620
  action_name: components["parameters"]["ActionNameParam"];
5270
5621
  };
5271
5622
  cookie?: never;
@@ -6658,6 +7009,67 @@ export interface operations {
6658
7009
  404: components["responses"]["NotFound"];
6659
7010
  };
6660
7011
  };
7012
+ listSessionTurns: {
7013
+ parameters: {
7014
+ query?: never;
7015
+ header?: never;
7016
+ path: {
7017
+ /** @description Project handle (unique per organization) */
7018
+ project: components["parameters"]["ProjectHandleParam"];
7019
+ /** @description Resource ID. */
7020
+ id: components["parameters"]["IDParam"];
7021
+ /** @description Session identifier. */
7022
+ session_id: string;
7023
+ };
7024
+ cookie?: never;
7025
+ };
7026
+ requestBody?: never;
7027
+ responses: {
7028
+ /** @description OK */
7029
+ 200: {
7030
+ headers: {
7031
+ [name: string]: unknown;
7032
+ };
7033
+ content: {
7034
+ "application/json": components["schemas"]["AgentTurnListResponse"];
7035
+ };
7036
+ };
7037
+ 401: components["responses"]["Unauthorized"];
7038
+ 404: components["responses"]["NotFound"];
7039
+ };
7040
+ };
7041
+ listTurnMessages: {
7042
+ parameters: {
7043
+ query?: {
7044
+ /** @description Only include messages with sequence greater than this value. */
7045
+ after_sequence?: number;
7046
+ /** @description Maximum number of items to return */
7047
+ limit?: components["parameters"]["LimitParam"];
7048
+ };
7049
+ header?: never;
7050
+ path: {
7051
+ /** @description Project handle (unique per organization) */
7052
+ project: components["parameters"]["ProjectHandleParam"];
7053
+ /** @description Resource ID. */
7054
+ id: components["parameters"]["IDParam"];
7055
+ };
7056
+ cookie?: never;
7057
+ };
7058
+ requestBody?: never;
7059
+ responses: {
7060
+ /** @description OK */
7061
+ 200: {
7062
+ headers: {
7063
+ [name: string]: unknown;
7064
+ };
7065
+ content: {
7066
+ "application/json": components["schemas"]["SessionMessageListResponse"];
7067
+ };
7068
+ };
7069
+ 401: components["responses"]["Unauthorized"];
7070
+ 404: components["responses"]["NotFound"];
7071
+ };
7072
+ };
6661
7073
  listAgentMessagingBindings: {
6662
7074
  parameters: {
6663
7075
  query?: never;
@@ -6996,11 +7408,13 @@ export interface operations {
6996
7408
  404: components["responses"]["NotFound"];
6997
7409
  };
6998
7410
  };
6999
- listAutomations: {
7411
+ listLoops: {
7000
7412
  parameters: {
7001
7413
  query?: {
7002
- /** @description Filter by lifecycle status. Omit to return all non-archived automations (the default). Pass a single status to filter to it exactly, or `all` to include archived automations too. */
7414
+ /** @description Filter by lifecycle status. Omit to return all non-archived loops (the default). Pass a single status to filter to it exactly, or `all` to include archived loops too. */
7003
7415
  status?: "draft" | "active" | "paused" | "archived" | "all";
7416
+ /** @description Exact loop handle filter for resolving a handle to its loop ID in one request. */
7417
+ handle?: string;
7004
7418
  /** @description Opaque pagination cursor from a prior response. */
7005
7419
  cursor?: string;
7006
7420
  /** @description Maximum number of items to return. */
@@ -7021,14 +7435,14 @@ export interface operations {
7021
7435
  [name: string]: unknown;
7022
7436
  };
7023
7437
  content: {
7024
- "application/json": components["schemas"]["AutomationListResponse"];
7438
+ "application/json": components["schemas"]["LoopListResponse"];
7025
7439
  };
7026
7440
  };
7027
7441
  401: components["responses"]["Unauthorized"];
7028
7442
  403: components["responses"]["Forbidden"];
7029
7443
  };
7030
7444
  };
7031
- createAutomation: {
7445
+ createLoop: {
7032
7446
  parameters: {
7033
7447
  query?: never;
7034
7448
  header?: never;
@@ -7040,7 +7454,7 @@ export interface operations {
7040
7454
  };
7041
7455
  requestBody: {
7042
7456
  content: {
7043
- "application/json": components["schemas"]["CreateAutomationRequest"];
7457
+ "application/json": components["schemas"]["CreateLoopRequest"];
7044
7458
  };
7045
7459
  };
7046
7460
  responses: {
@@ -7050,7 +7464,7 @@ export interface operations {
7050
7464
  [name: string]: unknown;
7051
7465
  };
7052
7466
  content: {
7053
- "application/json": components["schemas"]["Automation"];
7467
+ "application/json": components["schemas"]["Loop"];
7054
7468
  };
7055
7469
  };
7056
7470
  400: components["responses"]["BadRequest"];
@@ -7059,15 +7473,15 @@ export interface operations {
7059
7473
  409: components["responses"]["Conflict"];
7060
7474
  };
7061
7475
  };
7062
- getAutomation: {
7476
+ getLoop: {
7063
7477
  parameters: {
7064
7478
  query?: never;
7065
7479
  header?: never;
7066
7480
  path: {
7067
7481
  /** @description Project handle (unique per organization) */
7068
7482
  project: components["parameters"]["ProjectHandleParam"];
7069
- /** @description Project-unique automation handle. */
7070
- handle: string;
7483
+ /** @description Resource ID. */
7484
+ id: components["parameters"]["IDParam"];
7071
7485
  };
7072
7486
  cookie?: never;
7073
7487
  };
@@ -7079,7 +7493,7 @@ export interface operations {
7079
7493
  [name: string]: unknown;
7080
7494
  };
7081
7495
  content: {
7082
- "application/json": components["schemas"]["Automation"];
7496
+ "application/json": components["schemas"]["Loop"];
7083
7497
  };
7084
7498
  };
7085
7499
  401: components["responses"]["Unauthorized"];
@@ -7087,15 +7501,15 @@ export interface operations {
7087
7501
  404: components["responses"]["NotFound"];
7088
7502
  };
7089
7503
  };
7090
- deleteAutomation: {
7504
+ deleteLoop: {
7091
7505
  parameters: {
7092
7506
  query?: never;
7093
7507
  header?: never;
7094
7508
  path: {
7095
7509
  /** @description Project handle (unique per organization) */
7096
7510
  project: components["parameters"]["ProjectHandleParam"];
7097
- /** @description Project-unique automation handle. */
7098
- handle: string;
7511
+ /** @description Resource ID. */
7512
+ id: components["parameters"]["IDParam"];
7099
7513
  };
7100
7514
  cookie?: never;
7101
7515
  };
@@ -7113,21 +7527,21 @@ export interface operations {
7113
7527
  404: components["responses"]["NotFound"];
7114
7528
  };
7115
7529
  };
7116
- updateAutomation: {
7530
+ updateLoop: {
7117
7531
  parameters: {
7118
7532
  query?: never;
7119
7533
  header?: never;
7120
7534
  path: {
7121
7535
  /** @description Project handle (unique per organization) */
7122
7536
  project: components["parameters"]["ProjectHandleParam"];
7123
- /** @description Project-unique automation handle. */
7124
- handle: string;
7537
+ /** @description Resource ID. */
7538
+ id: components["parameters"]["IDParam"];
7125
7539
  };
7126
7540
  cookie?: never;
7127
7541
  };
7128
7542
  requestBody: {
7129
7543
  content: {
7130
- "application/json": components["schemas"]["UpdateAutomationRequest"];
7544
+ "application/json": components["schemas"]["UpdateLoopRequest"];
7131
7545
  };
7132
7546
  };
7133
7547
  responses: {
@@ -7137,7 +7551,7 @@ export interface operations {
7137
7551
  [name: string]: unknown;
7138
7552
  };
7139
7553
  content: {
7140
- "application/json": components["schemas"]["Automation"];
7554
+ "application/json": components["schemas"]["Loop"];
7141
7555
  };
7142
7556
  };
7143
7557
  400: components["responses"]["BadRequest"];
@@ -7146,15 +7560,15 @@ export interface operations {
7146
7560
  404: components["responses"]["NotFound"];
7147
7561
  };
7148
7562
  };
7149
- listAutomationVersions: {
7563
+ listLoopVersions: {
7150
7564
  parameters: {
7151
7565
  query?: never;
7152
7566
  header?: never;
7153
7567
  path: {
7154
7568
  /** @description Project handle (unique per organization) */
7155
7569
  project: components["parameters"]["ProjectHandleParam"];
7156
- /** @description Project-unique automation handle. */
7157
- handle: string;
7570
+ /** @description Resource ID. */
7571
+ id: components["parameters"]["IDParam"];
7158
7572
  };
7159
7573
  cookie?: never;
7160
7574
  };
@@ -7166,7 +7580,7 @@ export interface operations {
7166
7580
  [name: string]: unknown;
7167
7581
  };
7168
7582
  content: {
7169
- "application/json": components["schemas"]["AutomationVersionListResponse"];
7583
+ "application/json": components["schemas"]["LoopVersionListResponse"];
7170
7584
  };
7171
7585
  };
7172
7586
  401: components["responses"]["Unauthorized"];
@@ -7174,21 +7588,21 @@ export interface operations {
7174
7588
  404: components["responses"]["NotFound"];
7175
7589
  };
7176
7590
  };
7177
- createAutomationVersion: {
7591
+ createLoopVersion: {
7178
7592
  parameters: {
7179
7593
  query?: never;
7180
7594
  header?: never;
7181
7595
  path: {
7182
7596
  /** @description Project handle (unique per organization) */
7183
7597
  project: components["parameters"]["ProjectHandleParam"];
7184
- /** @description Project-unique automation handle. */
7185
- handle: string;
7598
+ /** @description Resource ID. */
7599
+ id: components["parameters"]["IDParam"];
7186
7600
  };
7187
7601
  cookie?: never;
7188
7602
  };
7189
7603
  requestBody: {
7190
7604
  content: {
7191
- "application/json": components["schemas"]["CreateAutomationVersionRequest"];
7605
+ "application/json": components["schemas"]["CreateLoopVersionRequest"];
7192
7606
  };
7193
7607
  };
7194
7608
  responses: {
@@ -7198,7 +7612,7 @@ export interface operations {
7198
7612
  [name: string]: unknown;
7199
7613
  };
7200
7614
  content: {
7201
- "application/json": components["schemas"]["AutomationVersion"];
7615
+ "application/json": components["schemas"]["LoopVersion"];
7202
7616
  };
7203
7617
  };
7204
7618
  400: components["responses"]["BadRequest"];
@@ -7207,16 +7621,16 @@ export interface operations {
7207
7621
  404: components["responses"]["NotFound"];
7208
7622
  };
7209
7623
  };
7210
- publishAutomationVersion: {
7624
+ publishLoopVersion: {
7211
7625
  parameters: {
7212
7626
  query?: never;
7213
7627
  header?: never;
7214
7628
  path: {
7215
7629
  /** @description Project handle (unique per organization) */
7216
7630
  project: components["parameters"]["ProjectHandleParam"];
7217
- /** @description Project-unique automation handle. */
7218
- handle: string;
7219
- /** @description Version number of the AutomationVersion to publish. */
7631
+ /** @description Resource ID. */
7632
+ id: components["parameters"]["IDParam"];
7633
+ /** @description Version number of the LoopVersion to publish. */
7220
7634
  version: number;
7221
7635
  };
7222
7636
  cookie?: never;
@@ -7229,7 +7643,7 @@ export interface operations {
7229
7643
  [name: string]: unknown;
7230
7644
  };
7231
7645
  content: {
7232
- "application/json": components["schemas"]["Automation"];
7646
+ "application/json": components["schemas"]["Loop"];
7233
7647
  };
7234
7648
  };
7235
7649
  401: components["responses"]["Unauthorized"];
@@ -7247,6 +7661,8 @@ export interface operations {
7247
7661
  header?: {
7248
7662
  /** @description Alternative to the `idempotency_key` query parameter. When both are present the query parameter wins. Repeats with the same key return the same `source_event_id` (resolve the run via `source_event_id`) without enqueuing a duplicate. */
7249
7663
  "X-Idempotency-Key"?: string;
7664
+ /** @description HMAC-SHA256 signature of the raw request body under the trigger's signing secret, formatted as `sha256=<hex>`. Required only when the HTTP trigger has a signing secret configured; unsigned deliveries are accepted for triggers without one. */
7665
+ "X-Mobius-Signature"?: string;
7250
7666
  };
7251
7667
  path: {
7252
7668
  /** @description Globally unique identifier for the trigger. The endpoint carries no project context, so the handle is resolved on its own; it defaults to the trigger's globally unique id and is treated as an unguessable delivery token. */
@@ -7256,9 +7672,14 @@ export interface operations {
7256
7672
  };
7257
7673
  requestBody?: {
7258
7674
  content: {
7259
- "application/json": {
7260
- [key: string]: unknown;
7261
- };
7675
+ /**
7676
+ * @example {
7677
+ * "customer_id": "cus_123",
7678
+ * "event_type": "invoice.paid",
7679
+ * "amount_cents": 4200
7680
+ * }
7681
+ */
7682
+ "application/json": components["schemas"]["HTTPTriggerDeliveryRequest"];
7262
7683
  };
7263
7684
  };
7264
7685
  responses: {
@@ -7268,12 +7689,53 @@ export interface operations {
7268
7689
  [name: string]: unknown;
7269
7690
  };
7270
7691
  content: {
7692
+ /**
7693
+ * @example {
7694
+ * "source_event_id": "sevt_01HHTTPTRIGGER",
7695
+ * "status": "accepted",
7696
+ * "deduped": false
7697
+ * }
7698
+ */
7271
7699
  "application/json": components["schemas"]["HTTPTriggerDeliveryResponse"];
7272
7700
  };
7273
7701
  };
7274
7702
  400: components["responses"]["BadRequest"];
7703
+ /** @description Invalid signature */
7704
+ 401: {
7705
+ headers: {
7706
+ [name: string]: unknown;
7707
+ };
7708
+ content: {
7709
+ /**
7710
+ * @example {
7711
+ * "error": {
7712
+ * "code": "invalid_signature",
7713
+ * "message": "missing or invalid request signature"
7714
+ * }
7715
+ * }
7716
+ */
7717
+ "application/json": components["schemas"]["ErrorResponse"];
7718
+ };
7719
+ };
7275
7720
  404: components["responses"]["NotFound"];
7276
7721
  409: components["responses"]["Conflict"];
7722
+ /** @description Payload too large */
7723
+ 413: {
7724
+ headers: {
7725
+ [name: string]: unknown;
7726
+ };
7727
+ content: {
7728
+ /**
7729
+ * @example {
7730
+ * "error": {
7731
+ * "code": "payload_too_large",
7732
+ * "message": "request body exceeds the maximum allowed size"
7733
+ * }
7734
+ * }
7735
+ */
7736
+ "application/json": components["schemas"]["ErrorResponse"];
7737
+ };
7738
+ };
7277
7739
  };
7278
7740
  };
7279
7741
  startRun: {
@@ -7283,14 +7745,28 @@ export interface operations {
7283
7745
  path: {
7284
7746
  /** @description Project handle (unique per organization) */
7285
7747
  project: components["parameters"]["ProjectHandleParam"];
7286
- /** @description Automation handle (unique per project). */
7287
- handle: string;
7748
+ /** @description Resource ID. */
7749
+ id: components["parameters"]["IDParam"];
7288
7750
  };
7289
7751
  cookie?: never;
7290
7752
  };
7291
7753
  requestBody?: {
7292
7754
  content: {
7293
- "application/json": components["schemas"]["StartAutomationRunRequest"];
7755
+ /**
7756
+ * @example {
7757
+ * "inputs": {
7758
+ * "issue_id": "42"
7759
+ * },
7760
+ * "source": {
7761
+ * "type": "api",
7762
+ * "id": "review-service",
7763
+ * "label": "review-service"
7764
+ * },
7765
+ * "idempotency_key": "review-service:issue-42",
7766
+ * "credit_budget": 1000
7767
+ * }
7768
+ */
7769
+ "application/json": components["schemas"]["StartLoopRunRequest"];
7294
7770
  };
7295
7771
  };
7296
7772
  responses: {
@@ -7300,7 +7776,29 @@ export interface operations {
7300
7776
  [name: string]: unknown;
7301
7777
  };
7302
7778
  content: {
7303
- "application/json": components["schemas"]["AutomationRun"];
7779
+ /**
7780
+ * @example {
7781
+ * "id": "run_01JZ0000000000000000000000",
7782
+ * "org_id": "org_01JZ0000000000000000000000",
7783
+ * "project_id": "prj_01JZ0000000000000000000000",
7784
+ * "loop_id": "loop_01JZ0000000000000000000000",
7785
+ * "loop_name": "Review Pull Request",
7786
+ * "loop_version_id": "lver_01JZ0000000000000000000000",
7787
+ * "loop_version": 3,
7788
+ * "status": "queued",
7789
+ * "inputs": {
7790
+ * "issue_id": "42"
7791
+ * },
7792
+ * "source": {
7793
+ * "type": "api",
7794
+ * "id": "review-service",
7795
+ * "label": "review-service"
7796
+ * },
7797
+ * "created_at": "2026-06-12T14:00:00Z",
7798
+ * "updated_at": "2026-06-12T14:00:00Z"
7799
+ * }
7800
+ */
7801
+ "application/json": components["schemas"]["LoopRun"];
7304
7802
  };
7305
7803
  };
7306
7804
  400: components["responses"]["BadRequest"];
@@ -7314,9 +7812,9 @@ export interface operations {
7314
7812
  parameters: {
7315
7813
  query?: {
7316
7814
  /** @description Filter to one status. */
7317
- status?: components["schemas"]["AutomationRunStatus"];
7318
- /** @description Filter to one automation's runs. */
7319
- automation_id?: string;
7815
+ status?: components["schemas"]["LoopRunStatus"];
7816
+ /** @description Filter to one loop's runs. */
7817
+ loop_id?: string;
7320
7818
  /** @description Filter to runs originating from a single source event. Pass the `source_event_id` returned by the HTTP-trigger delivery endpoint to discover the run it started. */
7321
7819
  source_event_id?: string;
7322
7820
  /** @description Opaque pagination cursor from a prior response. */
@@ -7339,7 +7837,7 @@ export interface operations {
7339
7837
  [name: string]: unknown;
7340
7838
  };
7341
7839
  content: {
7342
- "application/json": components["schemas"]["AutomationRunListResponse"];
7840
+ "application/json": components["schemas"]["LoopRunListResponse"];
7343
7841
  };
7344
7842
  };
7345
7843
  401: components["responses"]["Unauthorized"];
@@ -7366,7 +7864,7 @@ export interface operations {
7366
7864
  [name: string]: unknown;
7367
7865
  };
7368
7866
  content: {
7369
- "application/json": components["schemas"]["AutomationRun"];
7867
+ "application/json": components["schemas"]["LoopRun"];
7370
7868
  };
7371
7869
  };
7372
7870
  401: components["responses"]["Unauthorized"];
@@ -7388,7 +7886,7 @@ export interface operations {
7388
7886
  };
7389
7887
  requestBody?: {
7390
7888
  content: {
7391
- "application/json": components["schemas"]["CancelAutomationRunRequest"];
7889
+ "application/json": components["schemas"]["CancelLoopRunRequest"];
7392
7890
  };
7393
7891
  };
7394
7892
  responses: {
@@ -7398,7 +7896,7 @@ export interface operations {
7398
7896
  [name: string]: unknown;
7399
7897
  };
7400
7898
  content: {
7401
- "application/json": components["schemas"]["AutomationRun"];
7899
+ "application/json": components["schemas"]["LoopRun"];
7402
7900
  };
7403
7901
  };
7404
7902
  401: components["responses"]["Unauthorized"];
@@ -7426,7 +7924,7 @@ export interface operations {
7426
7924
  [name: string]: unknown;
7427
7925
  };
7428
7926
  content: {
7429
- "application/json": components["schemas"]["AutomationRunStepListResponse"];
7927
+ "application/json": components["schemas"]["LoopRunStepListResponse"];
7430
7928
  };
7431
7929
  };
7432
7930
  401: components["responses"]["Unauthorized"];
@@ -7459,7 +7957,7 @@ export interface operations {
7459
7957
  [name: string]: unknown;
7460
7958
  };
7461
7959
  content: {
7462
- "application/json": components["schemas"]["AutomationRunEventListResponse"];
7960
+ "application/json": components["schemas"]["LoopRunEventListResponse"];
7463
7961
  };
7464
7962
  };
7465
7963
  401: components["responses"]["Unauthorized"];
@@ -7512,7 +8010,7 @@ export interface operations {
7512
8010
  };
7513
8011
  requestBody: {
7514
8012
  content: {
7515
- "application/json": components["schemas"]["SignalAutomationRunRequest"];
8013
+ "application/json": components["schemas"]["SignalLoopRunRequest"];
7516
8014
  };
7517
8015
  };
7518
8016
  responses: {
@@ -7522,7 +8020,7 @@ export interface operations {
7522
8020
  [name: string]: unknown;
7523
8021
  };
7524
8022
  content: {
7525
- "application/json": components["schemas"]["AutomationRun"];
8023
+ "application/json": components["schemas"]["LoopRun"];
7526
8024
  };
7527
8025
  };
7528
8026
  400: components["responses"]["BadRequest"];
@@ -7536,8 +8034,14 @@ export interface operations {
7536
8034
  query?: {
7537
8035
  /** @description Include read-only system templates. */
7538
8036
  include_system?: boolean;
7539
- /** @description Filter by lifecycle status. Omit for active toolkits. */
7540
- status?: "active" | "archived" | "all";
8037
+ /**
8038
+ * @description Filter results by tag. Repeatable; multiple values combine with AND. Format: `Key:Value`, `Key:*` for any value, `Key:a,b,c` for IN.
8039
+ *
8040
+ * Tag values containing `:` or `,` cannot be filtered with this grammar — the parser splits on those literally. Constrain values to plain identifiers when you intend to filter on them.
8041
+ *
8042
+ * Some high-cardinality resources may ignore ad-hoc tag filtering.
8043
+ */
8044
+ tag?: components["parameters"]["TagFilterParam"];
7541
8045
  };
7542
8046
  header?: never;
7543
8047
  path: {
@@ -7688,8 +8192,14 @@ export interface operations {
7688
8192
  query?: {
7689
8193
  /** @description Include read-only system skill templates. */
7690
8194
  include_system?: boolean;
7691
- /** @description Filter by lifecycle status. Omit for active skills. */
7692
- status?: "active" | "archived" | "all";
8195
+ /**
8196
+ * @description Filter results by tag. Repeatable; multiple values combine with AND. Format: `Key:Value`, `Key:*` for any value, `Key:a,b,c` for IN.
8197
+ *
8198
+ * Tag values containing `:` or `,` cannot be filtered with this grammar — the parser splits on those literally. Constrain values to plain identifiers when you intend to filter on them.
8199
+ *
8200
+ * Some high-cardinality resources may ignore ad-hoc tag filtering.
8201
+ */
8202
+ tag?: components["parameters"]["TagFilterParam"];
7693
8203
  };
7694
8204
  header?: never;
7695
8205
  path: {
@@ -8324,7 +8834,7 @@ export interface operations {
8324
8834
  listArtifacts: {
8325
8835
  parameters: {
8326
8836
  query?: {
8327
- /** @description Filter to artifacts produced by this automation run. */
8837
+ /** @description Filter to artifacts produced by this loop run. */
8328
8838
  run_id?: string;
8329
8839
  /** @description Filter to artifacts produced by this run step. */
8330
8840
  step_id?: string;