@ai-matrx/api 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE +21 -0
  3. package/README.md +22 -2
  4. package/dist/account.cjs +670 -0
  5. package/dist/account.d.cts +3246 -0
  6. package/dist/account.d.ts +3246 -0
  7. package/dist/account.js +558 -0
  8. package/dist/agents.cjs +598 -0
  9. package/dist/agents.d.cts +3417 -0
  10. package/dist/agents.d.ts +3417 -0
  11. package/dist/agents.js +497 -0
  12. package/dist/ai.cjs +109 -0
  13. package/dist/ai.d.cts +493 -0
  14. package/dist/ai.d.ts +493 -0
  15. package/dist/ai.js +91 -0
  16. package/dist/apps.cjs +394 -0
  17. package/dist/apps.d.cts +1094 -0
  18. package/dist/apps.d.ts +1094 -0
  19. package/dist/apps.js +328 -0
  20. package/dist/architecture.cjs +1223 -0
  21. package/dist/architecture.d.cts +4701 -0
  22. package/dist/architecture.d.ts +4701 -0
  23. package/dist/architecture.js +1016 -0
  24. package/dist/audio.cjs +226 -0
  25. package/dist/audio.d.cts +723 -0
  26. package/dist/audio.d.ts +723 -0
  27. package/dist/audio.js +188 -0
  28. package/dist/chat.cjs +538 -0
  29. package/dist/chat.d.cts +2251 -0
  30. package/dist/chat.d.ts +2251 -0
  31. package/dist/chat.js +447 -0
  32. package/dist/chunk-2SXAAKGV.cjs +279 -0
  33. package/dist/chunk-5WJLKYH6.cjs +48 -0
  34. package/dist/chunk-FNIYADWI.cjs +59 -0
  35. package/dist/chunk-HER22VVH.cjs +1047 -0
  36. package/dist/chunk-KIEAFMKB.js +264 -0
  37. package/dist/chunk-TSHL7Z53.js +1012 -0
  38. package/dist/chunk-VTZKJMSY.js +43 -0
  39. package/dist/chunk-YTEOFGFC.js +57 -0
  40. package/dist/code.cjs +561 -0
  41. package/dist/code.d.cts +1976 -0
  42. package/dist/code.d.ts +1976 -0
  43. package/dist/code.js +467 -0
  44. package/dist/commerce.cjs +22 -0
  45. package/dist/commerce.d.cts +45 -0
  46. package/dist/commerce.d.ts +45 -0
  47. package/dist/commerce.js +18 -0
  48. package/dist/communications.cjs +215 -0
  49. package/dist/communications.d.cts +948 -0
  50. package/dist/communications.d.ts +948 -0
  51. package/dist/communications.js +179 -0
  52. package/dist/computer.cjs +330 -0
  53. package/dist/computer.d.cts +733 -0
  54. package/dist/computer.d.ts +733 -0
  55. package/dist/computer.js +275 -0
  56. package/dist/content.cjs +425 -0
  57. package/dist/content.d.cts +1796 -0
  58. package/dist/content.d.ts +1796 -0
  59. package/dist/content.js +354 -0
  60. package/dist/credentials.cjs +22 -0
  61. package/dist/credentials.d.cts +82 -0
  62. package/dist/credentials.d.ts +82 -0
  63. package/dist/credentials.js +1 -0
  64. package/dist/crm.cjs +271 -0
  65. package/dist/crm.d.cts +1731 -0
  66. package/dist/crm.d.ts +1731 -0
  67. package/dist/crm.js +226 -0
  68. package/dist/data.cjs +382 -0
  69. package/dist/data.d.cts +1860 -0
  70. package/dist/data.d.ts +1860 -0
  71. package/dist/data.js +318 -0
  72. package/dist/education.cjs +28 -0
  73. package/dist/education.d.cts +73 -0
  74. package/dist/education.d.ts +73 -0
  75. package/dist/education.js +23 -0
  76. package/dist/files.cjs +1330 -0
  77. package/dist/files.d.cts +4956 -0
  78. package/dist/files.d.ts +4956 -0
  79. package/dist/files.js +1104 -0
  80. package/dist/human-resources.cjs +178 -0
  81. package/dist/human-resources.d.cts +1208 -0
  82. package/dist/human-resources.d.ts +1208 -0
  83. package/dist/human-resources.js +148 -0
  84. package/dist/index-C2E-Cp19.d.ts +385 -0
  85. package/dist/index-wC2vtb70.d.cts +385 -0
  86. package/dist/index.cjs +2016 -0
  87. package/dist/index.d.cts +2069 -0
  88. package/dist/index.d.ts +2069 -0
  89. package/dist/index.js +1746 -0
  90. package/dist/integrations.cjs +5116 -0
  91. package/dist/integrations.d.cts +19213 -0
  92. package/dist/integrations.d.ts +19213 -0
  93. package/dist/integrations.js +4263 -0
  94. package/dist/intelligence.cjs +1305 -0
  95. package/dist/intelligence.d.cts +4658 -0
  96. package/dist/intelligence.d.ts +4658 -0
  97. package/dist/intelligence.js +1196 -0
  98. package/dist/knowledge.cjs +1113 -0
  99. package/dist/knowledge.d.cts +5427 -0
  100. package/dist/knowledge.d.ts +5427 -0
  101. package/dist/knowledge.js +921 -0
  102. package/dist/legal.cjs +225 -0
  103. package/dist/legal.d.cts +1038 -0
  104. package/dist/legal.d.ts +1038 -0
  105. package/dist/legal.js +187 -0
  106. package/dist/marketing.cjs +1155 -0
  107. package/dist/marketing.d.cts +7741 -0
  108. package/dist/marketing.d.ts +7741 -0
  109. package/dist/marketing.js +951 -0
  110. package/dist/masterwork.cjs +283 -0
  111. package/dist/masterwork.d.cts +1938 -0
  112. package/dist/masterwork.d.ts +1938 -0
  113. package/dist/masterwork.js +231 -0
  114. package/dist/media.cjs +610 -0
  115. package/dist/media.d.cts +2270 -0
  116. package/dist/media.d.ts +2270 -0
  117. package/dist/media.js +507 -0
  118. package/dist/net.cjs +67 -0
  119. package/dist/net.d.cts +204 -0
  120. package/dist/net.d.ts +204 -0
  121. package/dist/net.js +2 -0
  122. package/dist/platform.cjs +150 -0
  123. package/dist/platform.d.cts +572 -0
  124. package/dist/platform.d.ts +572 -0
  125. package/dist/platform.js +125 -0
  126. package/dist/publish.cjs +248 -0
  127. package/dist/publish.d.cts +1431 -0
  128. package/dist/publish.d.ts +1431 -0
  129. package/dist/publish.js +206 -0
  130. package/dist/schemas.cjs +2 -0
  131. package/dist/schemas.d.cts +1353 -0
  132. package/dist/schemas.d.ts +1353 -0
  133. package/dist/schemas.js +1 -0
  134. package/dist/stream.cjs +44 -0
  135. package/dist/stream.d.cts +2 -0
  136. package/dist/stream.d.ts +2 -0
  137. package/dist/stream.js +3 -0
  138. package/dist/web.cjs +1045 -0
  139. package/dist/web.d.cts +4186 -0
  140. package/dist/web.d.ts +4186 -0
  141. package/dist/web.js +867 -0
  142. package/dist/workflows.cjs +825 -0
  143. package/dist/workflows.d.cts +4699 -0
  144. package/dist/workflows.d.ts +4699 -0
  145. package/dist/workflows.js +686 -0
  146. package/package.json +419 -4
@@ -0,0 +1,4699 @@
1
+ import { A as Api, C as CallOptions, a as ApiStream, N as NdjsonEvent, S as SseEvent } from './index-wC2vtb70.cjs';
2
+ import { JsonValue, RunNowResponse, ClientContext, UserOverrides, ContextAnchor, ComputeNextDueResponse, ValidateCronRequest, ValidateCronResponse } from './schemas.cjs';
3
+ import './credentials.cjs';
4
+
5
+ /**
6
+ * GENERATED by @ai-matrx/api scripts/generate.mjs from aidream/api-contract — never edit by hand.
7
+ * CONTRACT_SHA256 50a790edb39e682b46e0fa9e674faf5ce2a0ba7de2cd01930a497fca4c47844a
8
+ */
9
+
10
+ /** AddEdgeOp */
11
+ type AddEdgeOp = {
12
+ op?: "add_edge";
13
+ edge: EdgeDef;
14
+ };
15
+ /** AddNodeOp */
16
+ type AddNodeOp_Input = {
17
+ op?: "add_node";
18
+ node: NodeDef;
19
+ };
20
+ /** AddNodeOp */
21
+ type AddNodeOp_Output = {
22
+ op?: "add_node";
23
+ node: NodeDef;
24
+ };
25
+ /** HTTP form of the workflow batch input with client-injected scope support. */
26
+ type AgentAssignmentRunRequest = {
27
+ /** Saved-agent invocation template applied once to every resolved assignment. */
28
+ agent: AssignmentAgentInput;
29
+ /** Coordinated rows, random options, or Cartesian values to materialize once. */
30
+ plan: CoordinatedRowsPlan | IndependentRandomPlan | CartesianPlan;
31
+ /** Optional caller-owned idempotency key. Workflow execution identity is used when omitted, so a node retry resumes the same session. */
32
+ session_key?: string | null;
33
+ /** Maximum execution attempts allowed for each item. */
34
+ max_attempts?: number;
35
+ /** Seconds an item claim remains valid without renewal. */
36
+ lease_seconds?: number;
37
+ /** Maximum assignment items executed concurrently by this run. */
38
+ max_concurrency?: number;
39
+ /** Delay before a retryable item becomes claimable again. */
40
+ retry_delay_seconds?: number;
41
+ /** Caller metadata preserved on the durable assignment session. */
42
+ metadata?: {
43
+ [key: string]: JsonValue;
44
+ };
45
+ /** Allow an item's answer to come back with every declared field empty. Omit to follow the organization's setting (refuse by default). */
46
+ allow_empty_structured_output?: boolean | null;
47
+ /** Organization context for the request; omitted to use the authenticated context. */
48
+ organization_id?: string | null;
49
+ /** Optional associated project selected by the caller. */
50
+ project_id?: string | null;
51
+ /** Optional associated task selected by the caller. */
52
+ task_id?: string | null;
53
+ /** Stable application slug that initiated the request. */
54
+ source_app?: string | null;
55
+ /** Stable feature slug within the source application. */
56
+ source_feature?: string | null;
57
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
58
+ initiation?: ("user" | "auto") | null;
59
+ };
60
+ /** Body for POST /recovery/workflows/{definition_id}/apply-patch. */
61
+ type ApplyWorkflowPatchRequest = {
62
+ /** Organization context for the request; omitted to use the authenticated context. */
63
+ organization_id?: string | null;
64
+ /** Optional associated project selected by the caller. */
65
+ project_id?: string | null;
66
+ /** Optional associated task selected by the caller. */
67
+ task_id?: string | null;
68
+ /** Stable application slug that initiated the request. */
69
+ source_app?: string | null;
70
+ /** Stable feature slug within the source application. */
71
+ source_feature?: string | null;
72
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
73
+ initiation?: ("user" | "auto") | null;
74
+ patch: DefinitionPatch_Input;
75
+ /** Optimistic-concurrency guard: the definition's updated_at the client last saw (ISO 8601). A concurrent studio edit turns the apply into a 409 instead of a silent clobber. */
76
+ expected_updated_at?: string | null;
77
+ /** Recovery audit row to mark applied on success. */
78
+ audit_id?: string | null;
79
+ /** THE PLAN NODE IS THE USER'S. Default False means this patch may not remove a plan.step node or change what it is — the guarantee that no agent, tool, or service can take a Plan away from the person wh */
80
+ plan_anchors_removable?: boolean;
81
+ };
82
+ /** ApplyWorkflowPatchResult */
83
+ type ApplyWorkflowPatchResult = {
84
+ definition_id: string;
85
+ applied: boolean;
86
+ summary: string;
87
+ validation: ValidationResult;
88
+ updated_at?: string | null;
89
+ pre_existing_issues?: string[];
90
+ };
91
+ /** ArchiveWorkflowResponse */
92
+ type ArchiveWorkflowResponse = {
93
+ archived: boolean;
94
+ deleted?: boolean;
95
+ };
96
+ /** One competitor: a workflow definition at a pinned version. */
97
+ type ArmSpec = {
98
+ label: string;
99
+ definition_id: string;
100
+ version_number?: number | null;
101
+ input_overrides?: {
102
+ [key: string]: JsonValue;
103
+ };
104
+ };
105
+ /** The per-item invocation template: an agent id, or a Mandate key. */
106
+ type AssignmentAgentInput = {
107
+ /** User message to append before running. Accepts a string or a list of content parts. */
108
+ user_input?: string | {
109
+ [key: string]: JsonValue;
110
+ }[] | null;
111
+ /** Agent variable overrides for this invocation. */
112
+ variables?: {
113
+ [key: string]: JsonValue;
114
+ };
115
+ /** Per-request media-context presentation policy keyed by agent variable name (promote/exclude a resource's representations). Changes context presentation only, never the saved agent definition. Validate */
116
+ variable_resource_context?: {
117
+ [key: string]: JsonValue;
118
+ } | null;
119
+ /** LLM parameter overrides (temperature, max_tokens, model, ...) the workflow AUTHOR set for this step. Static by nature — it is part of the saved definition. Validated against LLMParams by the host's Ag */
120
+ config_overrides?: {
121
+ [key: string]: JsonValue;
122
+ } | null;
123
+ /** Per-RUN LLM parameter overrides, meant to arrive on an EDGE from an upstream step (e.g. a voice map computed from the run's cast). Merged on TOP of both the mandate's config and this step's authored c */
124
+ runtime_config_overrides?: {
125
+ [key: string]: JsonValue;
126
+ } | null;
127
+ /** Continue an existing conversation. Leave blank for a fresh thread. */
128
+ conversation_id?: string | null;
129
+ /** Explicit assertion about whether this is a new conversation. True = create new (409 if id already exists), False = continue (404 if id missing). Blank means: new when no conversation_id was given, con */
130
+ is_new?: boolean | null;
131
+ /** Transcript of THIS ephemeral run, owned by the caller and ordered oldest-first — appended after the agent's own definition messages and before user_input. The server still owns the agent (model, tools */
132
+ prior_messages?: {
133
+ [key: string]: JsonValue;
134
+ }[];
135
+ /** Client capability envelope: surface, active capabilities (editor-state, sandbox-fs, browser-dom, desktop-native, ...), and their typed state payloads. Gates every client-capability tool bundle and des */
136
+ client?: ClientContext | null;
137
+ /** Per-request user-level tool inclusion/exclusion overrides (add/remove, apply_policy). Highest inclusion precedence: user.remove beats everything, user.add beats agent.forbidden. */
138
+ user?: UserOverrides | null;
139
+ /** IDE / editor state from the caller (vsc_* variables, active file, selection, diagnostics, workspace, git). Validated against the host's IdeState model on entry. */
140
+ ide_state?: {
141
+ [key: string]: JsonValue;
142
+ } | null;
143
+ /** Sandbox binding for this step (container/session identity for sandbox-delegated tool calls). Validated against the host's SandboxBindingRequest model on entry. */
144
+ sandbox?: {
145
+ [key: string]: JsonValue;
146
+ } | null;
147
+ /** Deferred context objects keyed by name (context / context_patch payloads). */
148
+ context?: {
149
+ [key: string]: JsonValue;
150
+ };
151
+ /** Variables the agent is allowed to mutate at runtime via context_patch. */
152
+ writable_variables?: string[];
153
+ /** Permit the agent to spawn new context objects via the context tool's create action. */
154
+ allow_context_create?: boolean;
155
+ /** Additive ToolSpec list merged into the agent's resolved tool set. Each item is {kind: 'registered'|'inline'|'agent', ...}; validated against the host's ToolSpec union on entry. */
156
+ tools?: {
157
+ [key: string]: JsonValue;
158
+ }[];
159
+ /** When set, this list becomes the agent's ENTIRE tool set for the turn — capability defaults and the agent's own declared tools are skipped. Same ToolSpec item shape as `tools`. */
160
+ tools_replace?: {
161
+ [key: string]: JsonValue;
162
+ }[] | null;
163
+ /** Organization scope applied to every item execution. */
164
+ organization_id?: string | null;
165
+ /** Optional project context applied to every item execution. */
166
+ project_id?: string | null;
167
+ /** Optional task context applied to every item execution. */
168
+ task_id?: string | null;
169
+ /** Stable application slug that initiated the agent run. */
170
+ source_app?: string | null;
171
+ /** Stable feature slug within the source application. */
172
+ source_feature?: string | null;
173
+ /** Persist each item's conversation and messages when true. */
174
+ store?: boolean;
175
+ /** Active context-scope ids selected by the caller's global picker, membership-validated server-side. Threads the selected scopes' context cells to the agent even when the entity carries no scope tags of */
176
+ scope_ids?: string[] | null;
177
+ /** Durable resource identity ({resource_type, resource_id}) from which authoritative organization/project/task context is reloaded, overruling ambient picker values. Validated against the host's ContextA */
178
+ context_anchor?: {
179
+ [key: string]: JsonValue;
180
+ } | null;
181
+ /** How the caller initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for ordinary workflow/API-triggered steps. */
182
+ initiation?: ("user" | "auto") | null;
183
+ /** Stream the agent's tokens as they are produced. */
184
+ stream?: boolean;
185
+ /** Enable verbose execution diagnostics for the agent run. */
186
+ debug?: boolean;
187
+ /** Return block-oriented output events when supported by the agent. */
188
+ block_mode?: boolean;
189
+ /** Run the full pre-LLM assembly (context, system-prompt render, message + tool merge) and return it as JSON instead of streaming an LLM turn. Pair with store=false for a true read-only preview — enables */
190
+ dry_run?: boolean;
191
+ /** Request-snapshot capture override. Omit for the platform default (capture ON — the exact provider request/response of every persisted iteration is recorded for replay); false to opt this step out; tru */
192
+ snapshot?: boolean | null;
193
+ /** True = enable OM and persist on conversation; False = disable and persist; None = inherit persisted state. */
194
+ memory?: boolean | null;
195
+ /** Optional model override for observational-memory processing. */
196
+ memory_model?: string | null;
197
+ /** The chosen class of the model (an ai.offering id). Set together with the model; empty runs the model's preferred class. */
198
+ memory_offering_id?: string | null;
199
+ /** Observational-memory scope, normally the current thread. */
200
+ memory_scope?: string;
201
+ /** Per-call cache invalidation flags ({conversation, agent, tools, models}). Validated against the host's CacheBypass model on entry. */
202
+ cache_bypass?: {
203
+ [key: string]: JsonValue;
204
+ } | null;
205
+ /** Maximum agent reasoning/tool-loop iterations for this step. Leave empty to use your organization's setting “Workflows › Agent step iteration limit” (100 unless changed). */
206
+ max_iterations?: number | null;
207
+ /** Maximum provider retries allowed within one agent iteration. */
208
+ max_retries_per_iteration?: number;
209
+ /** Per-request skill exposure override (Smart Input additive picks). Validated against the host's skill-config shape on entry. */
210
+ skill_config?: {
211
+ [key: string]: JsonValue;
212
+ } | null;
213
+ /** The job this step performs, named as a Mandate key (e.g. 'podcast.deep_research'). Your organization decides which agent or workflow actually does it, looked up every time the step runs — so the job c */
214
+ mandate_key?: string | null;
215
+ /** The agent this step runs. Pick one of your saved agents — this step runs that agent, every time. (Turn on 'Pin to this version' to freeze it at one saved version instead of always using the agent's cu */
216
+ agent_id?: string | null;
217
+ /** Pin to this version: run the exact saved version named above instead of the agent's current form. */
218
+ is_version?: boolean;
219
+ };
220
+ /** AssignmentBatchResult */
221
+ type AssignmentBatchResult = {
222
+ /** Aggregate state and counters for the durable session. */
223
+ session: AssignmentSessionSummary;
224
+ /** Materialized item results in stable ordinal order. */
225
+ items: AssignmentItemResult[];
226
+ };
227
+ /** AssignmentError */
228
+ type AssignmentError = {
229
+ /** Stable machine-readable failure code. */
230
+ code: string;
231
+ /** Human-readable explanation of the assignment failure. */
232
+ message: string;
233
+ /** Whether another execution attempt may succeed. */
234
+ retryable: boolean;
235
+ /** Structured diagnostic details supplied by the executor. */
236
+ details?: {
237
+ [key: string]: JsonValue;
238
+ };
239
+ };
240
+ /** AssignmentItemResult */
241
+ type AssignmentItemResult = {
242
+ /** Durable assignment-item identifier. */
243
+ id: string;
244
+ /** Zero-based position in the once-materialized plan. */
245
+ ordinal: number;
246
+ /** Stable caller-facing key for this assignment item. */
247
+ key: string;
248
+ /** Terminal or current lifecycle state of the item. */
249
+ status: AssignmentItemStatus;
250
+ /** Resolved variable map passed to the executor. */
251
+ values: {
252
+ [key: string]: JsonValue;
253
+ };
254
+ /** Executor result value, or null when no result was produced. */
255
+ output?: JsonValue;
256
+ /** Content-kind slug describing the output value. */
257
+ output_kind?: string | null;
258
+ /** Version of the declared output kind. */
259
+ output_kind_version?: number | null;
260
+ /** Durable conversation created for this item, when applicable. */
261
+ conversation_id?: string | null;
262
+ /** Request-runtime execution associated with this item. */
263
+ runtime_execution_id?: string | null;
264
+ /** Structured terminal failure, or null on success. */
265
+ error?: AssignmentError | null;
266
+ /** How many times this item was executed. The durable item row has always tracked it and the result dropped it, so a consumer could not tell a first-try success from one that burned two retries (real ses */
267
+ attempt_count?: number;
268
+ /** The retry budget this item was given — the number ``attempt_count`` was racing. 0 means the producer did not say. */
269
+ max_attempts?: number;
270
+ };
271
+ /** AssignmentItemStatus */
272
+ type AssignmentItemStatus = "pending" | "leased" | "running" | "completed" | "retryable_failed" | "terminal_failed" | "cancelled";
273
+ /** AssignmentOrder */
274
+ type AssignmentOrder = "declared" | "random";
275
+ /** AssignmentRow */
276
+ type AssignmentRow = {
277
+ /** Stable caller key for this coordinated row. */
278
+ key: string;
279
+ /** Variable names mapped to the values assigned together in this row. */
280
+ values: {
281
+ [key: string]: JsonValue;
282
+ };
283
+ /** Caller metadata preserved on the materialized assignment item. */
284
+ metadata?: {
285
+ [key: string]: JsonValue;
286
+ };
287
+ };
288
+ /** AssignmentSessionStatus */
289
+ type AssignmentSessionStatus = "pending" | "running" | "completed" | "partially_failed" | "failed" | "cancelled";
290
+ /** AssignmentSessionSummary */
291
+ type AssignmentSessionSummary = {
292
+ /** Durable assignment-session identifier. */
293
+ id: string;
294
+ /** Caller key that makes retries resume this session. */
295
+ idempotency_key: string;
296
+ /** SHA-256 fingerprint of the plan materialized for this session. */
297
+ plan_fingerprint: string;
298
+ /** Aggregate lifecycle state of the assignment session. */
299
+ status: AssignmentSessionStatus;
300
+ /** Total materialized items in the session. */
301
+ total_items: number;
302
+ /** Items still waiting to be claimed. */
303
+ pending_items: number;
304
+ /** Items currently leased or executing. */
305
+ running_items: number;
306
+ /** Items that completed successfully. */
307
+ completed_items: number;
308
+ /** Items that reached terminal failure. */
309
+ failed_items: number;
310
+ /** Items cancelled without execution completion. */
311
+ cancelled_items: number;
312
+ /** UTC timestamp when the session was created. */
313
+ created_at: string;
314
+ /** UTC timestamp of the latest session state change. */
315
+ updated_at: string;
316
+ /** UTC terminal timestamp, or null while the session is active. */
317
+ completed_at?: string | null;
318
+ };
319
+ /** AssignmentUniqueness */
320
+ type AssignmentUniqueness = "allow_repeats" | "without_replacement";
321
+ /** AuditTotals */
322
+ type AuditTotals = {
323
+ nodes: number;
324
+ full: number;
325
+ dynamic: number;
326
+ partial: number;
327
+ non_conformant: number;
328
+ percent_full: number;
329
+ leaks_by_rule: RuleCount[];
330
+ };
331
+ /** A headless start missing require/ask inputs PARKED instead of dying */
332
+ type AwaitingInputRunResponse = {
333
+ run_id: string;
334
+ mode?: "awaiting_input";
335
+ status?: "awaiting_input";
336
+ missing?: {
337
+ [key: string]: unknown;
338
+ }[];
339
+ message?: string;
340
+ };
341
+ /** BuilderRun */
342
+ type BuilderRun = {
343
+ run_id?: string | null;
344
+ workflow_id?: string | null;
345
+ record_id?: string | null;
346
+ /** The run's status, or the fire's when no run started. */
347
+ status: string;
348
+ status_label: string;
349
+ started_at?: string | null;
350
+ finished_at?: string | null;
351
+ says?: string | null;
352
+ steps?: RunStep[];
353
+ };
354
+ /** BuilderRuns */
355
+ type BuilderRuns = {
356
+ runs: BuilderRun[];
357
+ };
358
+ /** A builder Workflow as the builder reads it. */
359
+ type BuilderSpecView = {
360
+ workflow_id: string;
361
+ name: string;
362
+ version: number;
363
+ updated_at?: string | null;
364
+ table_id?: string | null;
365
+ spec?: {
366
+ [key: string]: JsonValue;
367
+ } | null;
368
+ detached?: boolean;
369
+ detached_says?: string | null;
370
+ event_source?: {
371
+ [key: string]: JsonValue;
372
+ } | null;
373
+ trigger_id?: string | null;
374
+ is_on?: boolean;
375
+ bound_version_id?: string | null;
376
+ /** Whether the reader may change this Workflow. */
377
+ can_edit?: boolean;
378
+ /** Why not, when they may not. */
379
+ can_edit_says?: string | null;
380
+ };
381
+ /** BulkIdsRequest */
382
+ type BulkIdsRequest = {
383
+ ids: string[];
384
+ };
385
+ /** BulkOpResponse */
386
+ type BulkOpResponse = {
387
+ succeeded: number;
388
+ failed: number;
389
+ results: BulkOpResult[];
390
+ };
391
+ /** BulkOpResult */
392
+ type BulkOpResult = {
393
+ id: string;
394
+ ok: boolean;
395
+ error?: string | null;
396
+ live_request_id?: string | null;
397
+ };
398
+ /** CartesianPlan */
399
+ type CartesianPlan = {
400
+ /** Materialize the Cartesian product of all variable option lists. */
401
+ strategy?: "cartesian";
402
+ /** Variable names mapped to the options used in the Cartesian product. */
403
+ variables: {
404
+ [key: string]: JsonValue[];
405
+ };
406
+ /** Whether combinations keep product order or are securely shuffled once. */
407
+ order?: AssignmentOrder;
408
+ /** Optional cap on materialized Cartesian combinations. */
409
+ limit?: number | null;
410
+ };
411
+ /** Declarative spec for a channel in a workflow definition. */
412
+ type ChannelSpec = {
413
+ name: string;
414
+ reducer?: "replace" | "append" | "merge" | "sum" | "last_writer_wins" | "topic_map";
415
+ description?: string | null;
416
+ default?: unknown;
417
+ };
418
+ /** Snapshot used by the studio's time-travel preview mode. */
419
+ type CheckpointPreview = {
420
+ checkpoint_id: string;
421
+ run_id: string;
422
+ step: number;
423
+ parent_checkpoint_id?: string | null;
424
+ interrupt_payload?: {
425
+ [key: string]: unknown;
426
+ } | null;
427
+ created_at?: string | null;
428
+ node_states: NodeStateAtCheckpoint[];
429
+ };
430
+ /** ``wf_checkpoint`` row — durable per-super-step snapshot. */
431
+ type CheckpointRecord = {
432
+ checkpoint_id?: string | null;
433
+ run_id?: string | null;
434
+ thread_id?: string | null;
435
+ parent_checkpoint_id?: string | null;
436
+ step?: number | null;
437
+ channel_values?: {
438
+ [key: string]: unknown;
439
+ } | null;
440
+ pending_bindings?: {
441
+ [key: string]: unknown;
442
+ } | null;
443
+ next_invocations?: {
444
+ [key: string]: unknown;
445
+ }[] | null;
446
+ interrupt_payload?: {
447
+ [key: string]: unknown;
448
+ } | null;
449
+ [key: string]: unknown;
450
+ };
451
+ /** CloneTemplateResponse */
452
+ type CloneTemplateResponse = {
453
+ workflow_id: string;
454
+ };
455
+ /** One comparison's locked spec — the SAME inputs to every arm. */
456
+ type ComparisonRequest = {
457
+ /** Organization context for the request; omitted to use the authenticated context. */
458
+ organization_id?: string | null;
459
+ /** Optional associated project selected by the caller. */
460
+ project_id?: string | null;
461
+ /** Optional associated task selected by the caller. */
462
+ task_id?: string | null;
463
+ /** Stable application slug that initiated the request. */
464
+ source_app?: string | null;
465
+ /** Stable feature slug within the source application. */
466
+ source_feature?: string | null;
467
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
468
+ initiation?: ("user" | "auto") | null;
469
+ /** Active context-scope ids selected by the caller and membership-validated server-side. */
470
+ scope_ids?: string[] | null;
471
+ /** Active scope-type ids selected by the caller (type-level selection with no specific scope chosen). */
472
+ active_scope_type_ids?: string[] | null;
473
+ /** Durable resource identity from which authoritative organization and task context is reloaded. */
474
+ context_anchor?: ContextAnchor | null;
475
+ /** Persist request outputs when true; run ephemerally when false. */
476
+ store?: boolean;
477
+ /** Specific connected desktop instance allowed to claim delegated local tools. */
478
+ target_instance_id?: string | null;
479
+ title?: string;
480
+ shared_inputs?: {
481
+ [key: string]: unknown;
482
+ };
483
+ arms: ArmSpec[];
484
+ input_sources?: {
485
+ [key: string]: string;
486
+ };
487
+ normalization?: {
488
+ [key: string]: unknown;
489
+ };
490
+ };
491
+ /** Everything the studio needs to open the Conductor for one workflow: */
492
+ type ConductorChatContext = {
493
+ mandate_key: string;
494
+ agent_id: string;
495
+ organization_id: string;
496
+ is_version: boolean;
497
+ provenance?: string;
498
+ can_edit?: boolean;
499
+ workflow_id: string;
500
+ workflow_name: string;
501
+ step_count: number;
502
+ open_plan_count: number;
503
+ /** The organization's `workflow.conductor.apply_mode` knob: `auto` — the Conductor's writes land on the canvas as they are saved; `review` — the canvas holds still and the chat offers Apply / Take it bac */
504
+ apply_mode?: string;
505
+ /** The ONE stored Conductor conversation for this person and this workflow (deterministic; the studio continues it with is_new=false when conversation_exists, else starts it). */
506
+ conversation_id: string;
507
+ conversation_exists?: boolean;
508
+ /** Which conversation on this person's ladder for this workflow is open. */
509
+ conversation_generation?: number;
510
+ /** Every conversation this person holds with this workflow's Conductor, most recently touched first. Reopen one by sending its `conversation_id` back as the `conversation_id` query — the client never inv */
511
+ conversations?: LauncherConversation[];
512
+ /** The `workflow.conductor.test_run_mode` knob for this person and org: `ask` — the Conductor must get the Creator's word before it test-runs the workflow (the server refuses an unapproved run); `auto` — */
513
+ test_run_mode?: string;
514
+ /** The stored transcript so far, oldest first — the panel reopens with it. */
515
+ messages?: {
516
+ [key: string]: unknown;
517
+ }[];
518
+ /** Pass as the agent-start `variables` on the FIRST turn only: workflow_id, workflow_name. */
519
+ variables?: {
520
+ [key: string]: string;
521
+ };
522
+ /** Pass as the agent-start `context` on EVERY turn: workflow_context (the XML envelope, rebuilt fresh each time). */
523
+ context?: {
524
+ [key: string]: unknown;
525
+ };
526
+ };
527
+ /** ConformanceState */
528
+ type ConformanceState = "full" | "dynamic" | "partial" | "non_conformant";
529
+ /** ContractAuditReport */
530
+ type ContractAuditReport = {
531
+ ruleset: Ruleset;
532
+ totals: AuditTotals;
533
+ nodes: NodeContractReport[];
534
+ models: ModelReport[];
535
+ };
536
+ /** CoordinatedRowsPlan */
537
+ type CoordinatedRowsPlan = {
538
+ /** Use caller-supplied rows whose values stay paired. */
539
+ strategy?: "coordinated_rows";
540
+ /** Paired value rows to materialize as assignment items. */
541
+ rows: AssignmentRow[];
542
+ /** Whether rows keep declared order or are securely shuffled once. */
543
+ order?: AssignmentOrder;
544
+ /** Optional maximum number of coordinated rows to materialize. */
545
+ limit?: number | null;
546
+ };
547
+ /** CreateBuilderWorkflowRequest */
548
+ type CreateBuilderWorkflowRequest = {
549
+ /** Organization context for the request; omitted to use the authenticated context. */
550
+ organization_id?: string | null;
551
+ /** Optional associated project selected by the caller. */
552
+ project_id?: string | null;
553
+ /** Optional associated task selected by the caller. */
554
+ task_id?: string | null;
555
+ /** Stable application slug that initiated the request. */
556
+ source_app?: string | null;
557
+ /** Stable feature slug within the source application. */
558
+ source_feature?: string | null;
559
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
560
+ initiation?: ("user" | "auto") | null;
561
+ name: string;
562
+ description?: string | null;
563
+ spec: {
564
+ [key: string]: JsonValue;
565
+ };
566
+ };
567
+ /** CreatePlanRequest */
568
+ type CreatePlanRequest = {
569
+ /** Organization context for the request; omitted to use the authenticated context. */
570
+ organization_id?: string | null;
571
+ /** Optional associated project selected by the caller. */
572
+ project_id?: string | null;
573
+ /** Optional associated task selected by the caller. */
574
+ task_id?: string | null;
575
+ /** Stable application slug that initiated the request. */
576
+ source_app?: string | null;
577
+ /** Stable feature slug within the source application. */
578
+ source_feature?: string | null;
579
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
580
+ initiation?: ("user" | "auto") | null;
581
+ node_id: string;
582
+ name?: string;
583
+ intent?: string;
584
+ parent_plan_id?: string | null;
585
+ };
586
+ /** CreateTriggerRequest */
587
+ type CreateTriggerRequest = {
588
+ /** Organization context for the request; omitted to use the authenticated context. */
589
+ organization_id?: string | null;
590
+ /** Optional associated project selected by the caller. */
591
+ project_id?: string | null;
592
+ /** Optional associated task selected by the caller. */
593
+ task_id?: string | null;
594
+ /** Stable application slug that initiated the request. */
595
+ source_app?: string | null;
596
+ /** Stable feature slug within the source application. */
597
+ source_feature?: string | null;
598
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
599
+ initiation?: ("user" | "auto") | null;
600
+ definition_id: string;
601
+ name: string;
602
+ kind: "cron" | "webhook" | "manual" | "event";
603
+ /** Required when kind='cron'. Standard 5-field syntax. */
604
+ cron_expression?: string | null;
605
+ /** IANA timezone name. */
606
+ timezone?: string;
607
+ /** Optional secret required as X-Matrx-Trigger-Secret on webhook fires. */
608
+ webhook_secret?: string | null;
609
+ /** Required when kind='event': which data change fires this trigger. source='table' (the default): a watched table + operation + optional when-transition + input_map; the table must be instrumented via w */
610
+ event_source?: (TableEventSource | StoreEventSource) | null;
611
+ default_inputs?: {
612
+ [key: string]: unknown;
613
+ };
614
+ max_steps?: number;
615
+ description?: string | null;
616
+ definition_version_id?: string | null;
617
+ /** Optional URL POSTed the terminal run summary (run_id, status, outputs/error, duration, cost) once per fired run when it completes / fails / cancels. Single-request semantics for external callers — no */
618
+ callback_url?: string | null;
619
+ };
620
+ /** CreateWorkflowRequest */
621
+ type CreateWorkflowRequest = {
622
+ /** Organization context for the request; omitted to use the authenticated context. */
623
+ organization_id?: string | null;
624
+ /** Optional associated project selected by the caller. */
625
+ project_id?: string | null;
626
+ /** Optional associated task selected by the caller. */
627
+ task_id?: string | null;
628
+ /** Stable application slug that initiated the request. */
629
+ source_app?: string | null;
630
+ /** Stable feature slug within the source application. */
631
+ source_feature?: string | null;
632
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
633
+ initiation?: ("user" | "auto") | null;
634
+ name: string;
635
+ description?: string | null;
636
+ definition?: Definition;
637
+ tags?: string[];
638
+ category?: string | null;
639
+ shown_to?: ("only_me" | "my_team" | "everyone" | "everyone_on_ai_matrx") | null;
640
+ visibility?: ("personal" | "internal" | "link") | null;
641
+ };
642
+ /** One day's slice of the workflow cost rollup. */
643
+ type DailyCostBreakdown = {
644
+ date: string;
645
+ runs: number;
646
+ cost_usd: number;
647
+ input_tokens: number;
648
+ output_tokens: number;
649
+ };
650
+ /** DbJobItem */
651
+ type DbJobItem = {
652
+ jobid: number;
653
+ jobname?: string | null;
654
+ schedule: string;
655
+ command: string;
656
+ active: boolean;
657
+ /** Feature Registry node classifying the job; null when the job is unregistered. */
658
+ taxonomy_node_id?: string | null;
659
+ taxonomy_path: SystemTaskTaxonomyNode[];
660
+ /** Set when the job has no live Feature Registry classification: what is missing and the remedy. */
661
+ unregistered_reason?: string | null;
662
+ last_run?: DbJobLastRun | null;
663
+ };
664
+ /** DbJobLastRun */
665
+ type DbJobLastRun = {
666
+ status?: string | null;
667
+ start_time?: string | null;
668
+ end_time?: string | null;
669
+ return_message?: string | null;
670
+ };
671
+ /** DbJobPatchRequest */
672
+ type DbJobPatchRequest = {
673
+ schedule?: string | null;
674
+ active?: boolean | null;
675
+ taxonomy_node_id?: string | null;
676
+ };
677
+ /** DbJobsResponse */
678
+ type DbJobsResponse = {
679
+ jobs: DbJobItem[];
680
+ taxonomy_nodes: SystemTaskTaxonomyNode[];
681
+ };
682
+ /** The canonical workflow definition — ReactFlow-compatible, user-authored. */
683
+ type Definition = {
684
+ version?: "1";
685
+ nodes?: NodeDef[];
686
+ edges?: EdgeDef[];
687
+ viewport?: Viewport;
688
+ /** Explicitly declared channels. A node that writes to a channel not declared here gets an implicit 'replace' channel at compile time unless strict_channels=True. */
689
+ channels?: ChannelSpec[];
690
+ strict_channels?: boolean;
691
+ /** Optional. If set, the scheduler starts from these node ids. If empty, the compiler derives entry nodes (nodes with no incoming edges). */
692
+ entry_nodes?: string[];
693
+ /** Declared run variables. Node static inputs reference them with {'$var': name}; run-time initial_variables supply the values. A reference to an UNDECLARED variable fails compile/validate loudly (see ma */
694
+ variables?: VariableSpec[];
695
+ /** True when this workflow's output is PUBLISHED — read by an anonymous viewer on an episode page, a blog article, a share page. Every media artifact the run generates is then persisted PUBLIC, so it get */
696
+ public_media?: boolean;
697
+ metadata?: {
698
+ [key: string]: unknown;
699
+ };
700
+ [key: string]: unknown;
701
+ };
702
+ /** A page of workflow definitions PLUS the size of the scope it came from. */
703
+ type DefinitionListPage = {
704
+ items: DefinitionRecord[];
705
+ total: number;
706
+ limit: number;
707
+ offset: number;
708
+ has_more: boolean;
709
+ [key: string]: unknown;
710
+ };
711
+ /** A flat, ordered list of typed edits to one Definition. */
712
+ type DefinitionPatch_Input = {
713
+ version?: "1";
714
+ /** One-line human-readable description of what the patch does. */
715
+ summary?: string;
716
+ ops: (UpdateNodeDataOp | UpdateNodeTypeOp | AddNodeOp_Input | ReplaceNodeOp_Input | RemoveNodeOp | AddEdgeOp | ReplaceEdgeOp | RemoveEdgeOp | SetVariableOp | RemoveVariableOp)[];
717
+ };
718
+ /** A flat, ordered list of typed edits to one Definition. */
719
+ type DefinitionPatch_Output = {
720
+ version?: "1";
721
+ /** One-line human-readable description of what the patch does. */
722
+ summary?: string;
723
+ ops: (UpdateNodeDataOp | UpdateNodeTypeOp | AddNodeOp_Output | ReplaceNodeOp_Output | RemoveNodeOp | AddEdgeOp | ReplaceEdgeOp | RemoveEdgeOp | SetVariableOp | RemoveVariableOp)[];
724
+ };
725
+ /** ``workflow.definition`` (or ``workflow.definition_version``) row as */
726
+ type DefinitionRecord = {
727
+ published_version_id?: string | null;
728
+ id?: string | null;
729
+ definition_id?: string | null;
730
+ name?: string | null;
731
+ description?: string | null;
732
+ version?: number | null;
733
+ is_version?: boolean | null;
734
+ is_active?: boolean | null;
735
+ is_archived?: boolean | null;
736
+ published_to_web?: boolean | null;
737
+ shown_to?: string | null;
738
+ workflow_type?: string | null;
739
+ tags?: string[] | null;
740
+ category?: string | null;
741
+ created_by?: string | null;
742
+ organization_id?: string | null;
743
+ project_id?: string | null;
744
+ task_id?: string | null;
745
+ input_kind?: string | null;
746
+ output_kind?: string | null;
747
+ updated_at?: string | null;
748
+ shared?: boolean | null;
749
+ validation?: ValidationResult | null;
750
+ [key: string]: unknown;
751
+ };
752
+ /** Per-node slot map for a whole definition — the studio's bulk fetch */
753
+ type DefinitionSlotsResponse = {
754
+ definition_id: string;
755
+ nodes: {
756
+ [key: string]: NodeSlotsMapEntry;
757
+ };
758
+ };
759
+ /** DeleteSlotResponse */
760
+ type DeleteSlotResponse = {
761
+ deleted: boolean;
762
+ definition_id: string;
763
+ node_id: string;
764
+ slot: "declared_sample" | "last_test_output" | "last_live_output";
765
+ };
766
+ /** DeleteTriggerResponse */
767
+ type DeleteTriggerResponse = {
768
+ deleted: boolean;
769
+ };
770
+ /** One declared deliverable of a workflow (SPEC §2.2/§2.4): an */
771
+ type Deliverable = {
772
+ node_id: string;
773
+ title: string;
774
+ output_kind?: string | null;
775
+ json_schema?: {
776
+ [key: string]: unknown;
777
+ };
778
+ presentation?: string;
779
+ is_primary?: boolean;
780
+ [key: string]: unknown;
781
+ };
782
+ /** DiagSpawnDetachedResponse */
783
+ type DiagSpawnDetachedResponse = {
784
+ ok: boolean;
785
+ message: string;
786
+ detached_tasks_in_set: number;
787
+ };
788
+ /** DissolvePlanRequest */
789
+ type DissolvePlanRequest = {
790
+ /** Organization context for the request; omitted to use the authenticated context. */
791
+ organization_id?: string | null;
792
+ /** Optional associated project selected by the caller. */
793
+ project_id?: string | null;
794
+ /** Optional associated task selected by the caller. */
795
+ task_id?: string | null;
796
+ /** Stable application slug that initiated the request. */
797
+ source_app?: string | null;
798
+ /** Stable feature slug within the source application. */
799
+ source_feature?: string | null;
800
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
801
+ initiation?: ("user" | "auto") | null;
802
+ rationale?: string;
803
+ };
804
+ /** DryRunEdgeReport */
805
+ type DryRunEdgeReport = {
806
+ state: "satisfied" | "unsatisfied" | "pruned" | "unknowable";
807
+ slot_used?: string | null;
808
+ /** For a conditional connection: its `condition` TRIED against the payload the source's sample would deliver (W57). */
809
+ predicate_preview?: PredicatePreview | null;
810
+ };
811
+ /** DryRunNodeReport */
812
+ type DryRunNodeReport = {
813
+ state: "ready" | "blocked" | "unknowable";
814
+ missing_required?: MissingBinding[];
815
+ mapping_issues?: MappingIssue[];
816
+ would_receive?: {
817
+ [key: string]: unknown;
818
+ } | null;
819
+ diagnostics?: string[];
820
+ /** For a predicate step (data.filter / data.assert / control.branch): the author's expression TRIED against the upstream sample, item by item. None when the step has no predicate or no sample to try it o */
821
+ predicate_preview?: PredicatePreview | null;
822
+ };
823
+ /** DryRunReport */
824
+ type DryRunReport = {
825
+ /** True when no error-severity finding exists. */
826
+ ok: boolean;
827
+ nodes: {
828
+ [key: string]: DryRunNodeReport;
829
+ };
830
+ edges: {
831
+ [key: string]: DryRunEdgeReport;
832
+ };
833
+ errors?: string[];
834
+ warnings?: string[];
835
+ /** False when ≥1 node type is not registered in the supplied registry — their input contracts were NOT checked, so a green report is hollow and cannot be fully trusted. A caller running against the bare */
836
+ registry_complete?: boolean;
837
+ };
838
+ /** POST /workflows/{id}/dry-run body (ENGINE_SPEC §8) — mirrors the run */
839
+ type DryRunRequest = {
840
+ inputs?: {
841
+ [key: string]: unknown;
842
+ };
843
+ node_inputs?: {
844
+ [key: string]: {
845
+ [key: string]: unknown;
846
+ };
847
+ };
848
+ variables?: {
849
+ [key: string]: unknown;
850
+ };
851
+ /** Dry-run this published snapshot instead of the current draft. */
852
+ version_number?: number | null;
853
+ };
854
+ /** DryRunResponse */
855
+ type DryRunResponse = {
856
+ definition_id: string;
857
+ report: DryRunReport;
858
+ /** Which §7 data slot fed each node's design-time sample (last_live_output > last_test_output > declared_sample). */
859
+ samples_used?: {
860
+ [key: string]: "declared_sample" | "last_test_output" | "last_live_output";
861
+ };
862
+ };
863
+ /** User-authored edge in a ReactFlow-compatible definition. */
864
+ type EdgeDef = {
865
+ id: string;
866
+ source: string;
867
+ target: string;
868
+ sourceHandle?: string | null;
869
+ targetHandle?: string | null;
870
+ /** ReactFlow visual style hint (e.g. 'smoothstep'). Not the semantic kind. */
871
+ type?: string | null;
872
+ data?: {
873
+ [key: string]: unknown;
874
+ };
875
+ [key: string]: unknown;
876
+ };
877
+ /** Replace the failed invocation's inputs and retry. */
878
+ type EditInputsRetryProposal = {
879
+ action?: "edit_inputs_retry";
880
+ node_id: string;
881
+ inputs: {
882
+ [key: string]: unknown;
883
+ };
884
+ };
885
+ /** A typed graph edit (config / structure / variables). Applied with one */
886
+ type EditWorkflowProposal = {
887
+ action?: "edit_workflow";
888
+ node_id?: string | null;
889
+ patch: DefinitionPatch_Output;
890
+ rationale: string;
891
+ };
892
+ /** `emit` — a real step comes out, the plan KEEPS WORKING (FEATURE.md */
893
+ type EmitFromPlanRequest = {
894
+ /** Organization context for the request; omitted to use the authenticated context. */
895
+ organization_id?: string | null;
896
+ /** Optional associated project selected by the caller. */
897
+ project_id?: string | null;
898
+ /** Optional associated task selected by the caller. */
899
+ task_id?: string | null;
900
+ /** Stable application slug that initiated the request. */
901
+ source_app?: string | null;
902
+ /** Stable feature slug within the source application. */
903
+ source_feature?: string | null;
904
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
905
+ initiation?: ("user" | "auto") | null;
906
+ target_spec_type: string;
907
+ target_config?: {
908
+ [key: string]: unknown;
909
+ } | null;
910
+ target_input?: {
911
+ [key: string]: unknown;
912
+ } | null;
913
+ label?: string | null;
914
+ rationale?: string;
915
+ upstream_node_ids?: string[] | null;
916
+ downstream_node_ids?: string[] | null;
917
+ parallel?: boolean;
918
+ };
919
+ /** EmitFromPlanResponse */
920
+ type EmitFromPlanResponse = {
921
+ emitted_node_id: string;
922
+ spec_type: string;
923
+ plan_id: string;
924
+ definition_id: string;
925
+ plan_still_active?: boolean;
926
+ emitted_so_far: number;
927
+ wired: EmittedWiring;
928
+ wiring_mode: "explicit" | "chained" | "parallel" | "default" | "unwired";
929
+ chained_from?: {
930
+ [key: string]: string;
931
+ };
932
+ wired_note: string;
933
+ handshake_warnings?: HandshakeWarning[];
934
+ anchor?: PlanAnchorState | null;
935
+ };
936
+ /** EmittedWiring */
937
+ type EmittedWiring = {
938
+ upstream?: string[];
939
+ downstream?: string[];
940
+ };
941
+ /** EngramDemoteRequest */
942
+ type EngramDemoteRequest = {
943
+ /** Why this path is being sent back. Required — a demotion that teaches nobody anything is worse than none. */
944
+ reason: string;
945
+ };
946
+ /** Everything the lifecycle surface renders for one path. */
947
+ type EngramStatus = {
948
+ definition_id: string;
949
+ engram_state: "improvised" | "provisional" | "compiled" | "demoted";
950
+ confirmed_success_count: number;
951
+ required_k: number;
952
+ promotion_threshold_k?: number | null;
953
+ grounding_score?: number | null;
954
+ compiled_at?: string | null;
955
+ demoted_at?: string | null;
956
+ demotion_reason?: string | null;
957
+ version_tags_agents?: EngramVersionTagAgent[];
958
+ version_tags_published_version?: number | null;
959
+ staleness?: string[];
960
+ can_promote?: boolean;
961
+ promotion_blocker?: string | null;
962
+ };
963
+ /** EngramVersionTagAgent */
964
+ type EngramVersionTagAgent = {
965
+ agent_id: string;
966
+ version?: number | null;
967
+ model_id?: string | null;
968
+ name?: string | null;
969
+ missing?: boolean;
970
+ };
971
+ /** Body for POST /runs/{id}/nodes/{nid}/execute — run exactly this node. */
972
+ type ExecuteNodeRequest = {
973
+ inputs?: {
974
+ [key: string]: unknown;
975
+ } | null;
976
+ config_override?: {
977
+ [key: string]: unknown;
978
+ } | null;
979
+ rerun?: boolean;
980
+ [key: string]: unknown;
981
+ };
982
+ /** One workflow to pull the run out of. */
983
+ type ExtractOccurrence = {
984
+ definition_id: string;
985
+ node_ids: string[];
986
+ /** Optimistic-concurrency guard: the definition's updated_at the client last saw (ISO 8601). A concurrent studio edit turns the rewire into a 409 instead of a silent clobber. */
987
+ expected_updated_at?: string | null;
988
+ };
989
+ /** ExtractResult */
990
+ type ExtractResult = {
991
+ dry_run: boolean;
992
+ child_definition_id?: string | null;
993
+ child_name: string;
994
+ child_description?: string;
995
+ steps?: ExtractedStep[];
996
+ occurrences?: OccurrenceOutcome[];
997
+ assist_status?: string | null;
998
+ };
999
+ /** ExtractedStep */
1000
+ type ExtractedStep = {
1001
+ node_id: string;
1002
+ spec_type: string;
1003
+ label: string;
1004
+ };
1005
+ /** The typed proposal riding on the assist's ``navigate`` action. */
1006
+ type ExtractionProposal = {
1007
+ assist_id: string;
1008
+ fingerprint: string;
1009
+ workflow_name: string;
1010
+ description?: string;
1011
+ steps?: ProposalStep[];
1012
+ occurrences?: ProposalOccurrence[];
1013
+ status?: string;
1014
+ title?: string;
1015
+ body?: string;
1016
+ reasoning?: string;
1017
+ confidence?: number | null;
1018
+ };
1019
+ /** FireResponse */
1020
+ type FireResponse = {
1021
+ trigger_id: string;
1022
+ run_id: string;
1023
+ job_id: string;
1024
+ mode?: "queued";
1025
+ };
1026
+ /** FireTriggerRequest */
1027
+ type FireTriggerRequest = {
1028
+ /** Merged on top of the trigger's default_inputs for this invocation. */
1029
+ inputs?: {
1030
+ [key: string]: unknown;
1031
+ };
1032
+ [key: string]: unknown;
1033
+ };
1034
+ /** ForceDisableResponse */
1035
+ type ForceDisableResponse = {
1036
+ disabled: boolean;
1037
+ };
1038
+ /** The agent recommends giving up on this run. */
1039
+ type ForceFailProposal = {
1040
+ action?: "force_fail";
1041
+ rationale: string;
1042
+ };
1043
+ /** ForceFailRunResponse */
1044
+ type ForceFailRunResponse = {
1045
+ run_id: string;
1046
+ force_failed: boolean;
1047
+ previous_status: string;
1048
+ reason?: string | null;
1049
+ };
1050
+ /** ForkFromRequest */
1051
+ type ForkFromRequest = {
1052
+ /** Optional one-shot config tweak applied ONLY to the forked re-run of this node; neither the source run nor the saved workflow draft is touched. Same shape as the node's config_schema. Use to test a cha */
1053
+ config_override?: {
1054
+ [key: string]: unknown;
1055
+ } | null;
1056
+ max_steps?: number;
1057
+ };
1058
+ /** FrontierInvocation */
1059
+ type FrontierInvocation = {
1060
+ node_id: string;
1061
+ attempt?: number;
1062
+ [key: string]: unknown;
1063
+ };
1064
+ /** GenericFloorBoard */
1065
+ type GenericFloorBoard = {
1066
+ total: number;
1067
+ incidents: GenericFloorIncident[];
1068
+ };
1069
+ /** One open creator alarm, as the shapes board reads it. */
1070
+ type GenericFloorIncident = {
1071
+ incident_id: string;
1072
+ kind: string;
1073
+ platform?: string | null;
1074
+ role?: string | null;
1075
+ occurrences?: number;
1076
+ first_seen_at?: string | null;
1077
+ last_seen_at?: string | null;
1078
+ surfaces?: string[];
1079
+ message?: string | null;
1080
+ };
1081
+ /** One generic-floor render, reported by the surface that took it. */
1082
+ type GenericFloorReport = {
1083
+ /** The registered kind slug that fell through. */
1084
+ kind: string;
1085
+ /** Render target: web | vite | mobile | desktop. */
1086
+ platform?: string;
1087
+ role?: string;
1088
+ /** Where it rendered — e.g. 'workflow-studio/result', 'matrx-user/workflow'. */
1089
+ surface?: string | null;
1090
+ /** Why the resolver fell through, in the resolver's own words ('no rows', 'all rows inactive', 'unknown component_key'). */
1091
+ reason?: string | null;
1092
+ run_id?: string | null;
1093
+ node_id?: string | null;
1094
+ };
1095
+ /** GenericFloorReportResponse */
1096
+ type GenericFloorReportResponse = {
1097
+ recorded: boolean;
1098
+ incident_id?: string | null;
1099
+ };
1100
+ /** One certain interface break at the placed step's joints (handshake.py). */
1101
+ type HandshakeWarning = {
1102
+ kind: string;
1103
+ node_id: string;
1104
+ node_label?: string;
1105
+ spec_type?: string;
1106
+ field?: string;
1107
+ message: string;
1108
+ };
1109
+ /** A held step's change was refused: the run ended as refused (lane HELD-WRITE-RESUME). */
1110
+ type HeldStepRefusedResponse = {
1111
+ run_id: string;
1112
+ status?: "cancelled";
1113
+ cause?: "refused";
1114
+ message: string;
1115
+ };
1116
+ /** Returned when X-Idempotency-Key matches a prior request. */
1117
+ type IdempotentDuplicateRunResponse = {
1118
+ run_id: string;
1119
+ mode?: "duplicate";
1120
+ status: string;
1121
+ message?: string;
1122
+ };
1123
+ /** IndependentRandomPlan */
1124
+ type IndependentRandomPlan = {
1125
+ /** Draw each variable independently from its option list. */
1126
+ strategy?: "independent_random";
1127
+ /** Variable names mapped to their non-empty candidate value lists. */
1128
+ variables: {
1129
+ [key: string]: JsonValue[];
1130
+ };
1131
+ /** Number of random assignments to materialize. */
1132
+ count: number;
1133
+ /** Whether the materialized combinations may repeat. */
1134
+ uniqueness?: AssignmentUniqueness;
1135
+ };
1136
+ /** Body for POST /runs/{run_id}/inject — live mid-run node injection */
1137
+ type InjectRunRequest = {
1138
+ patch: DefinitionPatch_Input;
1139
+ max_steps?: number;
1140
+ };
1141
+ /** InternalGraphRequest */
1142
+ type InternalGraphRequest = {
1143
+ /** Organization context for the request; omitted to use the authenticated context. */
1144
+ organization_id?: string | null;
1145
+ /** Optional associated project selected by the caller. */
1146
+ project_id?: string | null;
1147
+ /** Optional associated task selected by the caller. */
1148
+ task_id?: string | null;
1149
+ /** Stable application slug that initiated the request. */
1150
+ source_app?: string | null;
1151
+ /** Stable feature slug within the source application. */
1152
+ source_feature?: string | null;
1153
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
1154
+ initiation?: ("user" | "auto") | null;
1155
+ internal_definition?: {
1156
+ [key: string]: unknown;
1157
+ } | null;
1158
+ };
1159
+ /** The picker payload for one workflow (optionally one node's view). */
1160
+ type KindAvailabilityResponse = {
1161
+ definition_id: string;
1162
+ node_id?: string | null;
1163
+ entries?: KindPickerEntry[];
1164
+ unresolved_kinds?: string[];
1165
+ total?: number;
1166
+ unused_count?: number;
1167
+ used_count?: number;
1168
+ nested_count?: number;
1169
+ etag?: string;
1170
+ };
1171
+ /** KindCatalogResponse */
1172
+ type KindCatalogResponse = {
1173
+ kinds: KindDescriptor[];
1174
+ etag: string;
1175
+ };
1176
+ /** One kind_component row — a (platform, role) → renderer binding. */
1177
+ type KindComponentDescriptor = {
1178
+ platform: string;
1179
+ role: string;
1180
+ component_key: string;
1181
+ source: string;
1182
+ is_default: boolean;
1183
+ is_active: boolean;
1184
+ sort_order: number;
1185
+ version: number;
1186
+ component_source?: string | null;
1187
+ props_transform?: string | null;
1188
+ config?: {
1189
+ [key: string]: JsonValue;
1190
+ } | null;
1191
+ };
1192
+ /** Wire view of one resolved kind_definition row (Content-IR spec §4). */
1193
+ type KindDescriptor = {
1194
+ kind: string;
1195
+ label: string;
1196
+ version: number;
1197
+ is_contract_artifact?: boolean;
1198
+ emitted_json_schema?: {
1199
+ [key: string]: JsonValue;
1200
+ } | null;
1201
+ data?: JsonValue | null;
1202
+ variants?: JsonValue[];
1203
+ edges?: KindEdgeDescriptor[];
1204
+ components?: KindComponentDescriptor[];
1205
+ surfaces?: KindSurfaceDescriptor[];
1206
+ examples?: KindExampleDescriptor[];
1207
+ metadata?: {
1208
+ [key: string]: JsonValue;
1209
+ };
1210
+ updated_at?: string | null;
1211
+ };
1212
+ /** One composition edge: parent kind's ``field_name`` → child kind. */
1213
+ type KindEdgeDescriptor = {
1214
+ field_name: string;
1215
+ child_kind: string;
1216
+ pinned_child_version?: number | null;
1217
+ position?: number | null;
1218
+ };
1219
+ /** One kind_example row — a validated sample value for the kind. */
1220
+ type KindExampleDescriptor = {
1221
+ label?: string | null;
1222
+ data: JsonValue;
1223
+ source: string;
1224
+ is_canonical: boolean;
1225
+ validation_status: string;
1226
+ };
1227
+ /** One row in the picker — everything the UI needs, nothing it must derive. */
1228
+ type KindPickerEntry = {
1229
+ kind: string;
1230
+ reference: string;
1231
+ source_node_id: string;
1232
+ source_node_label?: string;
1233
+ path?: string;
1234
+ depth?: number;
1235
+ is_nested?: boolean;
1236
+ is_collection?: boolean;
1237
+ used?: boolean;
1238
+ truncated?: boolean;
1239
+ step?: number | null;
1240
+ };
1241
+ /** One kind_surface row — the detection list (fence_lang / xml_tag / */
1242
+ type KindSurfaceDescriptor = {
1243
+ surface_type: string;
1244
+ token: string;
1245
+ parser_strategy: string;
1246
+ streaming: boolean;
1247
+ priority: number;
1248
+ is_active: boolean;
1249
+ };
1250
+ /** One of a person's conversations with one launcher target. */
1251
+ type LauncherConversation = {
1252
+ conversation_id: string;
1253
+ generation: number;
1254
+ title: string;
1255
+ started_at?: string | null;
1256
+ updated_at?: string | null;
1257
+ message_count?: number;
1258
+ };
1259
+ /** Why a branch of a contract is considered untyped. */
1260
+ type LeakRule = "any" | "object" | "bare_container" | "extra_allow" | "unbound_typevar" | "unknown_type" | "acknowledged_dynamic";
1261
+ /** User-supplied output for the failed node. */
1262
+ type ManualResultProposal = {
1263
+ action?: "manual_result";
1264
+ node_id: string;
1265
+ output: {
1266
+ [key: string]: unknown;
1267
+ };
1268
+ };
1269
+ /** ManualResultRequest */
1270
+ type ManualResultRequest = {
1271
+ /** User-supplied output to record for the failed node. Should validate against the node's output_schema — downstream nodes consume this exactly as if the executor produced it. */
1272
+ output: {
1273
+ [key: string]: unknown;
1274
+ };
1275
+ /** Fan-out correlation (ENGINE_SPEC §4.5): dispatch id of the specific fanned invocation the result is for. Required together with item_index when several items of this node are pending. */
1276
+ dispatch_id?: string | null;
1277
+ /** Fan-out correlation (ENGINE_SPEC §4.5): item index within dispatch_id. */
1278
+ item_index?: number | null;
1279
+ max_steps?: number;
1280
+ };
1281
+ /** MappingIssue */
1282
+ type MappingIssue = {
1283
+ edge_id: string;
1284
+ target_key: string;
1285
+ source_key: string;
1286
+ severity: "error" | "warning";
1287
+ message: string;
1288
+ };
1289
+ /** MergePlanRequest */
1290
+ type MergePlanRequest = {
1291
+ /** Organization context for the request; omitted to use the authenticated context. */
1292
+ organization_id?: string | null;
1293
+ /** Optional associated project selected by the caller. */
1294
+ project_id?: string | null;
1295
+ /** Optional associated task selected by the caller. */
1296
+ task_id?: string | null;
1297
+ /** Stable application slug that initiated the request. */
1298
+ source_app?: string | null;
1299
+ /** Stable feature slug within the source application. */
1300
+ source_feature?: string | null;
1301
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
1302
+ initiation?: ("user" | "auto") | null;
1303
+ absorbed_plan_id: string;
1304
+ };
1305
+ /** MissingBinding */
1306
+ type MissingBinding = {
1307
+ /** Unresolved inbound edge id; '' for node-level var_missing. */
1308
+ edge_id: string;
1309
+ reason: "no_source_data" | "mapping_unresolvable" | "var_missing";
1310
+ message?: string;
1311
+ };
1312
+ /** One input a node needs before it can run — surfaced so the studio can */
1313
+ type MissingInputField = {
1314
+ key: string;
1315
+ required?: boolean;
1316
+ reason?: "missing" | "invalid";
1317
+ message?: string | null;
1318
+ json_schema?: {
1319
+ [key: string]: unknown;
1320
+ };
1321
+ [key: string]: unknown;
1322
+ };
1323
+ /** Cost subtotal for one model within a run. */
1324
+ type ModelCostBreakdown = {
1325
+ model_name: string;
1326
+ request_count: number;
1327
+ input_tokens: number;
1328
+ output_tokens: number;
1329
+ cost_usd: number;
1330
+ };
1331
+ /** A distinct model class and every node that (transitively) uses it — */
1332
+ type ModelReport = {
1333
+ schema_name: string;
1334
+ module: string;
1335
+ state: ConformanceState;
1336
+ own_leak_count: number;
1337
+ referenced_by: string[];
1338
+ };
1339
+ /** Everything the studio needs to open the Steward for one step: the */
1340
+ type NodeAgentChatContext = {
1341
+ mandate_key: string;
1342
+ agent_id: string;
1343
+ organization_id: string;
1344
+ is_version: boolean;
1345
+ provenance?: string;
1346
+ can_edit?: boolean;
1347
+ node_id: string;
1348
+ node_label: string;
1349
+ spec_type: string;
1350
+ backing_agent_id?: string | null;
1351
+ wizard?: "run_agent" | null;
1352
+ wizard_step?: ("agent" | "variables") | null;
1353
+ /** The ONE stored Steward conversation for this person and this step (deterministic; the studio continues it with is_new=false when conversation_exists, else starts it). */
1354
+ conversation_id: string;
1355
+ conversation_exists?: boolean;
1356
+ /** Which conversation on this person's ladder for this step is open. */
1357
+ conversation_generation?: number;
1358
+ /** Every conversation this person holds with this step's Steward, most recently touched first. Reopen one by sending its `conversation_id` back as the `conversation_id` query — the client never invents o */
1359
+ conversations?: LauncherConversation[];
1360
+ /** The stored transcript so far, oldest first — the panel reopens with it. */
1361
+ messages?: {
1362
+ [key: string]: unknown;
1363
+ }[];
1364
+ /** Pass as the agent-start `variables` on EVERY turn (the Mandate route re-checks the provision): workflow_id, node_id, node_label, spec_type. */
1365
+ variables?: {
1366
+ [key: string]: string;
1367
+ };
1368
+ /** Pass as the agent-start `context` on EVERY turn: node_context (the XML envelope, rebuilt fresh each time). */
1369
+ context?: {
1370
+ [key: string]: unknown;
1371
+ };
1372
+ };
1373
+ /** NodeContractReport */
1374
+ type NodeContractReport = {
1375
+ node_type: string;
1376
+ category: string;
1377
+ display_name: string;
1378
+ state: ConformanceState;
1379
+ input: SchemaReport;
1380
+ output: SchemaReport;
1381
+ config: SchemaReport;
1382
+ };
1383
+ /** Wire shape of one persisted data slot. */
1384
+ type NodeDataSlotPayload = {
1385
+ slot: "declared_sample" | "last_test_output" | "last_live_output";
1386
+ value?: unknown;
1387
+ emissions?: {
1388
+ [key: string]: unknown;
1389
+ };
1390
+ output_kind?: string | null;
1391
+ source: string;
1392
+ captured_at?: string | null;
1393
+ captured_by?: string | null;
1394
+ };
1395
+ /** User-authored node in a ReactFlow-compatible definition. */
1396
+ type NodeDef = {
1397
+ id: string;
1398
+ /** NodeSpec.type — must match a registered node type at compile time. */
1399
+ type: string;
1400
+ position: Position;
1401
+ data?: {
1402
+ [key: string]: unknown;
1403
+ };
1404
+ [key: string]: unknown;
1405
+ };
1406
+ /** The input form for ONE node — GET /workflows/{id}/nodes/{nid}/input-form. */
1407
+ type NodeInputFormResponse = {
1408
+ node_id: string;
1409
+ spec_type: string;
1410
+ title: string;
1411
+ source: "input_schema" | "effective_output_schema" | "kind";
1412
+ json_schema?: {
1413
+ [key: string]: unknown;
1414
+ };
1415
+ required?: string[];
1416
+ input_kind?: string | null;
1417
+ output_kind?: string | null;
1418
+ [key: string]: unknown;
1419
+ };
1420
+ /** One resolved input field — what value the node WILL receive and where it */
1421
+ type NodeInputStatusField = {
1422
+ key: string;
1423
+ required?: boolean;
1424
+ satisfied?: boolean;
1425
+ provenance?: "upstream" | "static" | "seed" | "none";
1426
+ source_node_id?: string | null;
1427
+ value?: unknown;
1428
+ [key: string]: unknown;
1429
+ };
1430
+ /** Whether a node can run yet, field-by-field — GET */
1431
+ type NodeInputStatusResponse = {
1432
+ run_id?: string | null;
1433
+ definition_id: string;
1434
+ node_id: string;
1435
+ spec_type: string;
1436
+ in_frontier?: boolean;
1437
+ step?: number | null;
1438
+ attempt?: number;
1439
+ already_ran?: boolean;
1440
+ executable?: boolean;
1441
+ fields?: NodeInputStatusField[];
1442
+ missing?: MissingInputField[];
1443
+ form_schema?: {
1444
+ [key: string]: unknown;
1445
+ };
1446
+ [key: string]: unknown;
1447
+ };
1448
+ /** NodeSlotsMapEntry */
1449
+ type NodeSlotsMapEntry = {
1450
+ slots: NodeDataSlotPayload[];
1451
+ best?: ("declared_sample" | "last_test_output" | "last_live_output") | null;
1452
+ };
1453
+ /** NodeSlotsResponse */
1454
+ type NodeSlotsResponse = {
1455
+ definition_id: string;
1456
+ node_id: string;
1457
+ slots: NodeDataSlotPayload[];
1458
+ /** The best available sample among the present slots: the NEWER of last_live_output / last_test_output by captured_at (live wins a tie or missing timestamp), else declared_sample. */
1459
+ best?: ("declared_sample" | "last_test_output" | "last_live_output") | null;
1460
+ };
1461
+ /** The state of one node at a given checkpoint, derived from wf_node_outcome. */
1462
+ type NodeStateAtCheckpoint = {
1463
+ node_id: string;
1464
+ state: "pending" | "completed" | "failed" | "skipped";
1465
+ attempt?: number;
1466
+ output?: {
1467
+ [key: string]: unknown;
1468
+ } | null;
1469
+ error_type?: string | null;
1470
+ error_message?: string | null;
1471
+ error_code?: string | null;
1472
+ error_details?: {
1473
+ [key: string]: unknown;
1474
+ } | null;
1475
+ duration_ms?: number | null;
1476
+ source?: string | null;
1477
+ };
1478
+ /** One palette item from ``GET /workflow/node-types`` / */
1479
+ type NodeTypeDescriptor = {
1480
+ type?: string | null;
1481
+ display_name?: string | null;
1482
+ category?: string | null;
1483
+ description?: string | null;
1484
+ determinism?: string | null;
1485
+ version?: string | null;
1486
+ icon?: string | null;
1487
+ emits_stream?: boolean | null;
1488
+ can_interrupt?: boolean | null;
1489
+ input_kind?: string | null;
1490
+ output_kind?: string | null;
1491
+ dynamic_output?: boolean | null;
1492
+ input_schema?: {
1493
+ [key: string]: unknown;
1494
+ } | null;
1495
+ config_schema?: {
1496
+ [key: string]: unknown;
1497
+ } | null;
1498
+ output_schema?: {
1499
+ [key: string]: unknown;
1500
+ } | null;
1501
+ handles?: {
1502
+ [key: string]: unknown;
1503
+ }[] | null;
1504
+ [key: string]: unknown;
1505
+ };
1506
+ /** OccurrenceOutcome */
1507
+ type OccurrenceOutcome = {
1508
+ definition_id: string;
1509
+ definition_name?: string;
1510
+ applied?: boolean;
1511
+ call_node_id?: string;
1512
+ removed_node_ids?: string[];
1513
+ reattached_edge_ids?: string[];
1514
+ issues?: string[];
1515
+ updated_at?: string | null;
1516
+ };
1517
+ /** OnOff */
1518
+ type OnOff = {
1519
+ workflow_id: string;
1520
+ is_on: boolean;
1521
+ trigger_id?: string | null;
1522
+ bound_version_id?: string | null;
1523
+ };
1524
+ /** PauseRunResponse */
1525
+ type PauseRunResponse = {
1526
+ run_id: string;
1527
+ pausing: boolean;
1528
+ previous_status: string;
1529
+ };
1530
+ /** The draft's post-stitch state for ONE plan anchor — what the caller */
1531
+ type PlanAnchorState = {
1532
+ definition_id: string;
1533
+ node_id: string;
1534
+ config?: {
1535
+ [key: string]: unknown;
1536
+ };
1537
+ definition_updated_at?: string | null;
1538
+ definition_version?: number | null;
1539
+ };
1540
+ /** PlanAssistRequest */
1541
+ type PlanAssistRequest = {
1542
+ /** Organization context for the request; omitted to use the authenticated context. */
1543
+ organization_id?: string | null;
1544
+ /** Optional associated project selected by the caller. */
1545
+ project_id?: string | null;
1546
+ /** Optional associated task selected by the caller. */
1547
+ task_id?: string | null;
1548
+ /** Stable application slug that initiated the request. */
1549
+ source_app?: string | null;
1550
+ /** Stable feature slug within the source application. */
1551
+ source_feature?: string | null;
1552
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
1553
+ initiation?: ("user" | "auto") | null;
1554
+ action: "notes" | "input_shape" | "output_shape" | "recommend_type";
1555
+ /** The user's rough input for the agent (dictated braindump, shape description, or empty to work from what the plan already holds). */
1556
+ instruction?: string;
1557
+ };
1558
+ /** PlanBlockerEntry */
1559
+ type PlanBlockerEntry = {
1560
+ node_id?: string | null;
1561
+ plan_id?: string | null;
1562
+ name: string;
1563
+ acknowledged: boolean;
1564
+ };
1565
+ /** PlanBlockersResponse */
1566
+ type PlanBlockersResponse = {
1567
+ entries: PlanBlockerEntry[];
1568
+ blocking: number;
1569
+ };
1570
+ /** PlanEventRecord */
1571
+ type PlanEventRecord = {
1572
+ id: string;
1573
+ plan_id: string;
1574
+ kind: string;
1575
+ payload?: {
1576
+ [key: string]: unknown;
1577
+ };
1578
+ actor?: string;
1579
+ created_at?: string | null;
1580
+ };
1581
+ /** PlanFullResponse */
1582
+ type PlanFullResponse = {
1583
+ plan: PlanRecord;
1584
+ samples: PlanSampleRecord[];
1585
+ events: PlanEventRecord[];
1586
+ messages?: StoredMessageRecord[];
1587
+ };
1588
+ /** PlanListResponse */
1589
+ type PlanListResponse = {
1590
+ plans: PlanRecord[];
1591
+ };
1592
+ /** PlanRecord */
1593
+ type PlanRecord = {
1594
+ id: string;
1595
+ organization_id: string;
1596
+ definition_id: string;
1597
+ node_id?: string | null;
1598
+ name?: string;
1599
+ intent?: string;
1600
+ notes?: string;
1601
+ phase?: string;
1602
+ input_shape?: {
1603
+ [key: string]: unknown;
1604
+ } | null;
1605
+ output_shape?: {
1606
+ [key: string]: unknown;
1607
+ } | null;
1608
+ has_internal_graph?: boolean;
1609
+ promoted_definition_id?: string | null;
1610
+ parent_plan_id?: string | null;
1611
+ merged_into_plan_id?: string | null;
1612
+ origin?: string;
1613
+ conversation_id?: string | null;
1614
+ allow_stand_in_in_production?: boolean;
1615
+ alternatives?: {
1616
+ [key: string]: unknown;
1617
+ }[];
1618
+ resolution?: {
1619
+ [key: string]: unknown;
1620
+ } | null;
1621
+ verification?: {
1622
+ [key: string]: unknown;
1623
+ } | null;
1624
+ resolved_at?: string | null;
1625
+ status?: string;
1626
+ version?: number;
1627
+ created_at?: string | null;
1628
+ updated_at?: string | null;
1629
+ anchor?: PlanAnchorState | null;
1630
+ };
1631
+ /** PlanSampleRecord */
1632
+ type PlanSampleRecord = {
1633
+ id: string;
1634
+ plan_id: string;
1635
+ direction: string;
1636
+ scenario: string;
1637
+ data?: {
1638
+ [key: string]: unknown;
1639
+ };
1640
+ source?: string;
1641
+ is_stand_in?: boolean;
1642
+ anchor?: PlanAnchorState | null;
1643
+ };
1644
+ /** One platform table a data step may name — shown by its label, stored as schema.table. */
1645
+ type PlatformTableEntry = {
1646
+ token: string;
1647
+ label: string;
1648
+ table: string;
1649
+ title_column?: string;
1650
+ columns?: string[];
1651
+ };
1652
+ /** Position */
1653
+ type Position = {
1654
+ x: number;
1655
+ y: number;
1656
+ };
1657
+ /** An author-written predicate, TRIED against the sample, per item. */
1658
+ type PredicatePreview = {
1659
+ kind: "filter" | "assert" | "branch" | "edge";
1660
+ expression: string;
1661
+ /** Plain language for what `inputs` was bound to, per item. */
1662
+ binding: string;
1663
+ /** Sample items the predicate was tried against. */
1664
+ total: number;
1665
+ kept?: number;
1666
+ dropped?: number;
1667
+ errors?: number;
1668
+ rows?: PredicateRow[];
1669
+ /** True when `rows` shows fewer than `total`. */
1670
+ truncated?: boolean;
1671
+ row_limit?: number;
1672
+ /** The predicate answered the same for every distinct sample item. */
1673
+ constant?: boolean;
1674
+ /** The findings derived from THIS evaluation — never a second pass. */
1675
+ warnings?: string[];
1676
+ /** One readable line about the trial. */
1677
+ summary?: string;
1678
+ };
1679
+ /** One sample item, and what the author's predicate actually answered. */
1680
+ type PredicateRow = {
1681
+ /** Position in the sample (0-based). */
1682
+ index: number;
1683
+ /** The payload the predicate saw, rendered for reading (truncated). */
1684
+ item: string;
1685
+ /** The value the expression returned; null when it raised. */
1686
+ result?: unknown;
1687
+ verdict: "kept" | "dropped" | "passed" | "failed" | "error";
1688
+ /** The sandbox's own reason when this item raised. */
1689
+ error?: string | null;
1690
+ };
1691
+ /** PromotePlanResponse */
1692
+ type PromotePlanResponse = {
1693
+ definition_id: string;
1694
+ };
1695
+ /** ProposalOccurrence */
1696
+ type ProposalOccurrence = {
1697
+ definition_id: string;
1698
+ definition_name?: string;
1699
+ node_ids?: string[];
1700
+ };
1701
+ /** ProposalStep */
1702
+ type ProposalStep = {
1703
+ type?: string;
1704
+ label?: string;
1705
+ };
1706
+ /** Read-only public view — only the fields safe to expose anonymously. */
1707
+ type PublicWorkflowRecord = {
1708
+ id: string;
1709
+ name: string;
1710
+ description?: string | null;
1711
+ definition?: {
1712
+ [key: string]: unknown;
1713
+ } | null;
1714
+ version?: number | null;
1715
+ };
1716
+ /** PublishBuilderRequest */
1717
+ type PublishBuilderRequest = {
1718
+ /** Organization context for the request; omitted to use the authenticated context. */
1719
+ organization_id?: string | null;
1720
+ /** Optional associated project selected by the caller. */
1721
+ project_id?: string | null;
1722
+ /** Optional associated task selected by the caller. */
1723
+ task_id?: string | null;
1724
+ /** Stable application slug that initiated the request. */
1725
+ source_app?: string | null;
1726
+ /** Stable feature slug within the source application. */
1727
+ source_feature?: string | null;
1728
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
1729
+ initiation?: ("user" | "auto") | null;
1730
+ change_note?: string | null;
1731
+ };
1732
+ /** PublishedBuilder */
1733
+ type PublishedBuilder = {
1734
+ workflow_id: string;
1735
+ version: number;
1736
+ published_version_id: string | null;
1737
+ };
1738
+ /** PutDeclaredSampleRequest */
1739
+ type PutDeclaredSampleRequest = {
1740
+ /** The declared sample output for this node. */
1741
+ value: unknown;
1742
+ output_kind?: string | null;
1743
+ emissions?: {
1744
+ [key: string]: unknown;
1745
+ };
1746
+ };
1747
+ /** PutDeclaredSampleResponse */
1748
+ type PutDeclaredSampleResponse = {
1749
+ slot: NodeDataSlotPayload;
1750
+ /** Schema-mismatch warnings (warn-not-block, spec §7.2): the sample was stored, but these fields disagree with the node's output schema. */
1751
+ warnings?: string[];
1752
+ };
1753
+ /** Lightweight ack for POST /api/recovery/audit/{audit_id}/applied. */
1754
+ type RecoveryApplyAck = {
1755
+ /** Organization context for the request; omitted to use the authenticated context. */
1756
+ organization_id?: string | null;
1757
+ /** Optional associated project selected by the caller. */
1758
+ project_id?: string | null;
1759
+ /** Optional associated task selected by the caller. */
1760
+ task_id?: string | null;
1761
+ /** Stable application slug that initiated the request. */
1762
+ source_app?: string | null;
1763
+ /** Stable feature slug within the source application. */
1764
+ source_feature?: string | null;
1765
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
1766
+ initiation?: ("user" | "auto") | null;
1767
+ audit_id: string;
1768
+ was_applied: boolean;
1769
+ was_overridden: boolean;
1770
+ };
1771
+ /** Body for POST /api/recovery/handle. */
1772
+ type RecoveryRequest = {
1773
+ /** Organization context for the request; omitted to use the authenticated context. */
1774
+ organization_id?: string | null;
1775
+ /** Optional associated project selected by the caller. */
1776
+ project_id?: string | null;
1777
+ /** Optional associated task selected by the caller. */
1778
+ task_id?: string | null;
1779
+ /** Stable application slug that initiated the request. */
1780
+ source_app?: string | null;
1781
+ /** Stable feature slug within the source application. */
1782
+ source_feature?: string | null;
1783
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
1784
+ initiation?: ("user" | "auto") | null;
1785
+ /** The XML envelope built by the studio's CopyMenu via lib/xml-envelope.ts. Carries workflow context + payload + available_actions so the agent can suggest a fix without follow-up questions. */
1786
+ envelope_xml: string;
1787
+ surface?: "node_error" | "node_output" | "node_inputs" | "checkpoint" | "run_summary" | "validation_issue" | "stream_log" | "raw_value";
1788
+ workflow_id: string;
1789
+ run_id?: string | null;
1790
+ /** Optional hint to the agent: which node the user wants the proposal to target. Falls back to the run's first failed node. */
1791
+ failed_node_id?: string | null;
1792
+ };
1793
+ /** Returned by POST /api/recovery/handle. */
1794
+ type RecoveryResponse = {
1795
+ audit_id: string;
1796
+ proposal: RetryProposal | SkipProposal | ManualResultProposal | EditInputsRetryProposal | EditWorkflowProposal | ForceFailProposal;
1797
+ agent_reasoning: string;
1798
+ confidence: number;
1799
+ run_id?: string | null;
1800
+ /** True when the agent call failed and the response is a deterministic fallback (typically a force_fail with the error message in rationale). The UI should warn the user before applying a fallback propos */
1801
+ fallback?: boolean;
1802
+ };
1803
+ /** What one accessor resolved to against one run. */
1804
+ type ReferenceResolution = {
1805
+ run_id: string;
1806
+ reference: string;
1807
+ source_node_id?: string;
1808
+ values?: JsonValue[];
1809
+ count?: number;
1810
+ notes?: string[];
1811
+ source_missing?: boolean;
1812
+ };
1813
+ /** RefreshNodeTypesResponse */
1814
+ type RefreshNodeTypesResponse = {
1815
+ refreshed: boolean;
1816
+ node_type_count: number;
1817
+ };
1818
+ /** RemoveEdgeOp */
1819
+ type RemoveEdgeOp = {
1820
+ op?: "remove_edge";
1821
+ edge_id: string;
1822
+ };
1823
+ /** Remove a node. Edges touching it are removed too (a dangling edge */
1824
+ type RemoveNodeOp = {
1825
+ op?: "remove_node";
1826
+ node_id: string;
1827
+ };
1828
+ /** RemoveVariableOp */
1829
+ type RemoveVariableOp = {
1830
+ op?: "remove_variable";
1831
+ name: string;
1832
+ };
1833
+ /** Replace an existing edge WHOLE (source, target, handles, data). */
1834
+ type ReplaceEdgeOp = {
1835
+ op?: "replace_edge";
1836
+ edge: EdgeDef;
1837
+ };
1838
+ /** Replace an existing node WHOLE — type, position and data all become */
1839
+ type ReplaceNodeOp_Input = {
1840
+ op?: "replace_node";
1841
+ node: NodeDef;
1842
+ };
1843
+ /** Replace an existing node WHOLE — type, position and data all become */
1844
+ type ReplaceNodeOp_Output = {
1845
+ op?: "replace_node";
1846
+ node: NodeDef;
1847
+ };
1848
+ /** RerunFromRequest */
1849
+ type RerunFromRequest = {
1850
+ /** Optional one-shot config tweak applied ONLY to the re-run of this node; the saved workflow draft is NOT touched. Same shape as the node's config_schema. Use to test a change (swap a model, raise max_t */
1851
+ config_override?: {
1852
+ [key: string]: unknown;
1853
+ } | null;
1854
+ max_steps?: number;
1855
+ };
1856
+ /** ResolvePlanRequest */
1857
+ type ResolvePlanRequest = {
1858
+ /** Organization context for the request; omitted to use the authenticated context. */
1859
+ organization_id?: string | null;
1860
+ /** Optional associated project selected by the caller. */
1861
+ project_id?: string | null;
1862
+ /** Optional associated task selected by the caller. */
1863
+ task_id?: string | null;
1864
+ /** Stable application slug that initiated the request. */
1865
+ source_app?: string | null;
1866
+ /** Stable feature slug within the source application. */
1867
+ source_feature?: string | null;
1868
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
1869
+ initiation?: ("user" | "auto") | null;
1870
+ target_spec_type: string;
1871
+ target_config?: {
1872
+ [key: string]: unknown;
1873
+ } | null;
1874
+ target_input?: {
1875
+ [key: string]: unknown;
1876
+ } | null;
1877
+ rationale?: string;
1878
+ };
1879
+ /** ResumeQueuedRunResponse */
1880
+ type ResumeQueuedRunResponse = {
1881
+ run_id: string;
1882
+ job_id: string;
1883
+ mode?: "queued";
1884
+ status?: "running";
1885
+ };
1886
+ /** ResumeRunRequest */
1887
+ type ResumeRunRequest = {
1888
+ /** The interrupt checkpoint to resume from. REQUIRED for an 'interrupted' run; omitted for an 'awaiting_input' run (a start-time park has no checkpoint — supply the missing values in `inputs` instead and */
1889
+ checkpoint_id?: string | null;
1890
+ resume_value?: {
1891
+ [key: string]: unknown;
1892
+ } | null;
1893
+ /** Surface values supplied to an 'awaiting_input' run (INPUT-SURFACE.md): flat name → value. Provenance-stamped exactly like run start (input_sources, same source=human invariant). */
1894
+ inputs?: {
1895
+ [key: string]: unknown;
1896
+ };
1897
+ /** Per-input provenance claims for `inputs` — same contract as run start. */
1898
+ input_sources?: {
1899
+ [key: string]: "human" | "caller";
1900
+ };
1901
+ /** Override the original run's initial_variables for the resumed leg. Leave None to inherit from the original run. */
1902
+ initial_variables?: {
1903
+ [key: string]: unknown;
1904
+ } | null;
1905
+ /** Override LLM parameters for the resumed leg. */
1906
+ initial_overrides?: {
1907
+ [key: string]: unknown;
1908
+ } | null;
1909
+ max_steps?: number;
1910
+ mode?: "inline" | "queued";
1911
+ };
1912
+ /** RetryNodeRequest */
1913
+ type RetryNodeRequest = {
1914
+ /** If provided, replaces the failed invocation's inputs. Useful for 'edit inputs and retry' — the user fixed a bad URL, tweaked a prompt variable, etc. Leave None to retry with the original inputs. */
1915
+ inputs?: {
1916
+ [key: string]: unknown;
1917
+ } | null;
1918
+ /** Phase 5.3 — one-shot config tweak applied ONLY to this retry attempt; the workflow draft is NOT touched. Use when the user wants to test a config change (e.g. bump max_tokens, swap a model) without co */
1919
+ config_override?: {
1920
+ [key: string]: unknown;
1921
+ } | null;
1922
+ /** If True (default), the retried invocation runs at attempt+1 so the prior failure outcome stays as a forensic record. If False, the original outcome is overwritten by the new attempt. Leave True unless */
1923
+ attempt_bump?: boolean;
1924
+ /** Fan-out correlation (ENGINE_SPEC §4.5): dispatch id of the specific fanned invocation to retry. Omit for ordinary nodes; required together with item_index when several items of this node are pending ( */
1925
+ dispatch_id?: string | null;
1926
+ /** Fan-out correlation (ENGINE_SPEC §4.5): item index within dispatch_id. 'Retry item 3 alone' = item_index=3. */
1927
+ item_index?: number | null;
1928
+ max_steps?: number;
1929
+ };
1930
+ /** Re-run the failed node with the same (or edited) inputs. */
1931
+ type RetryProposal = {
1932
+ action?: "retry";
1933
+ node_id: string;
1934
+ inputs?: {
1935
+ [key: string]: unknown;
1936
+ } | null;
1937
+ };
1938
+ /** RuleCount */
1939
+ type RuleCount = {
1940
+ rule: LeakRule;
1941
+ count: number;
1942
+ };
1943
+ /** The conformance rules in force. Versioned, additive-only. */
1944
+ type Ruleset = {
1945
+ version: number;
1946
+ enabled_rules: LeakRule[];
1947
+ allowed_scalars: string[];
1948
+ allowed_aliases?: string[];
1949
+ input_rules?: LeakRule[] | null;
1950
+ };
1951
+ /** Aggregated cost for one workflow run. */
1952
+ type RunCostSummary = {
1953
+ run_id: string;
1954
+ total_cost_usd?: number;
1955
+ external_api_cost_usd?: number;
1956
+ total_input_tokens?: number;
1957
+ total_output_tokens?: number;
1958
+ total_cached_tokens?: number;
1959
+ request_count?: number;
1960
+ avg_request_duration_ms?: number;
1961
+ by_model?: ModelCostBreakdown[];
1962
+ };
1963
+ /** One row from ``wf_node_events``. Shape mirrors */
1964
+ type RunEventRecord = {
1965
+ event_type: string;
1966
+ step?: number | null;
1967
+ node_id?: string | null;
1968
+ spec_type?: string | null;
1969
+ attempt?: number | null;
1970
+ duration_ms?: number | null;
1971
+ checkpoint_id?: string | null;
1972
+ error_type?: string | null;
1973
+ error_message?: string | null;
1974
+ payload: {
1975
+ [key: string]: unknown;
1976
+ };
1977
+ event_ts: unknown;
1978
+ seq?: number | null;
1979
+ [key: string]: unknown;
1980
+ };
1981
+ /** One section of the generated run form (GET /workflows/{id}/run-form). */
1982
+ type RunFormField = {
1983
+ node_id: string;
1984
+ title: string;
1985
+ json_schema?: {
1986
+ [key: string]: unknown;
1987
+ };
1988
+ required?: boolean;
1989
+ input_kind?: string | null;
1990
+ output_kind?: string | null;
1991
+ [key: string]: unknown;
1992
+ };
1993
+ /** The form a non-technical user fills to start a run — generated, never */
1994
+ type RunFormSchema = {
1995
+ definition_id: string;
1996
+ version: number;
1997
+ /** SPEC §1.3/§2.1: the kind this workflow consumes. The AUTHOR'S DECLARATION when the definition carries one, otherwise derived from the entry nodes. NULL = collected via this form (the normal case). */
1998
+ input_kind?: string | null;
1999
+ /** True when input_kind came from the declared column, not from derivation. */
2000
+ input_kind_declared?: boolean;
2001
+ sections?: RunFormField[];
2002
+ /** Declared run variables (Definition.variables). The studio renders one field per variable; values come back as RunWorkflowRequest.initial_variables. LEGACY — folded into ``inputs``; dies with the 2.1 c */
2003
+ variables?: RunFormVariable[];
2004
+ /** THE compiled input surface: name-unique, kind-addressed, one sourcing rule each. Values come back as RunWorkflowRequest.inputs[name]. */
2005
+ inputs?: ServedInput[];
2006
+ [key: string]: unknown;
2007
+ };
2008
+ /** One declared run variable (Definition.variables) surfaced on the run */
2009
+ type RunFormVariable = {
2010
+ name: string;
2011
+ description?: string;
2012
+ default?: unknown;
2013
+ required?: boolean;
2014
+ };
2015
+ /** ``wf_run`` row as returned by RunStore.load / list_recent / */
2016
+ type RunRecord = {
2017
+ id?: string | null;
2018
+ thread_id?: string | null;
2019
+ parent_run_id?: string | null;
2020
+ definition_id?: string | null;
2021
+ definition_version_id?: string | null;
2022
+ definition_hash?: string | null;
2023
+ status?: string | null;
2024
+ input?: {
2025
+ [key: string]: unknown;
2026
+ } | null;
2027
+ output?: {
2028
+ [key: string]: unknown;
2029
+ } | null;
2030
+ error?: {
2031
+ [key: string]: unknown;
2032
+ } | null;
2033
+ interrupt_payload?: {
2034
+ [key: string]: unknown;
2035
+ } | null;
2036
+ steps_executed?: number | null;
2037
+ last_checkpoint_id?: string | null;
2038
+ user_id?: string | null;
2039
+ organization_id?: string | null;
2040
+ project_id?: string | null;
2041
+ task_id?: string | null;
2042
+ conversation_id?: string | null;
2043
+ agent_id?: string | null;
2044
+ agent_version_id?: string | null;
2045
+ metadata?: {
2046
+ [key: string]: unknown;
2047
+ } | null;
2048
+ created_by?: string | null;
2049
+ shared?: boolean | null;
2050
+ start_wait?: RunStartWait | null;
2051
+ result?: {
2052
+ [key: string]: unknown;
2053
+ } | null;
2054
+ [key: string]: unknown;
2055
+ };
2056
+ /** GET /workflows/{id}/result-schema — the twin of /run-form (SPEC §2.4): */
2057
+ type RunResultSchema = {
2058
+ definition_id: string;
2059
+ version: number;
2060
+ input_kind?: string | null;
2061
+ output_kind?: string | null;
2062
+ input_kind_declared?: boolean;
2063
+ output_kind_declared?: boolean;
2064
+ declaration_error?: string | null;
2065
+ deliverables?: Deliverable[];
2066
+ [key: string]: unknown;
2067
+ };
2068
+ /** A pending run that should have started by now, and why it has not. */
2069
+ type RunStartWait = {
2070
+ reason: "no_worker" | "backlog" | "never_queued";
2071
+ says: string;
2072
+ waiting_seconds: number;
2073
+ };
2074
+ /** RunStep */
2075
+ type RunStep = {
2076
+ node_id: string;
2077
+ label: string;
2078
+ status: "done" | "failed" | "waiting_for_approval" | "waiting" | "condition_not_met" | "stopped_loop_cap" | "off";
2079
+ status_label: string;
2080
+ /** The step's own sentence, when it has one. */
2081
+ says?: string | null;
2082
+ };
2083
+ /** Body for POST /runs/{run_id}/suggestions (all fields optional). */
2084
+ type RunSuggestionsRequest = {
2085
+ /** Organization context for the request; omitted to use the authenticated context. */
2086
+ organization_id?: string | null;
2087
+ /** Optional associated project selected by the caller. */
2088
+ project_id?: string | null;
2089
+ /** Optional associated task selected by the caller. */
2090
+ task_id?: string | null;
2091
+ /** Stable application slug that initiated the request. */
2092
+ source_app?: string | null;
2093
+ /** Stable feature slug within the source application. */
2094
+ source_feature?: string | null;
2095
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
2096
+ initiation?: ("user" | "auto") | null;
2097
+ /** Optional hint: which failed node to analyze. Defaults to the run's most recent node_failed event. */
2098
+ node_id?: string | null;
2099
+ };
2100
+ /** RunWorkflowRequest */
2101
+ type RunWorkflowRequest = {
2102
+ /** Organization context for the request; omitted to use the authenticated context. */
2103
+ organization_id?: string | null;
2104
+ /** Optional associated project selected by the caller. */
2105
+ project_id?: string | null;
2106
+ /** Optional associated task selected by the caller. */
2107
+ task_id?: string | null;
2108
+ /** Stable application slug that initiated the request. */
2109
+ source_app?: string | null;
2110
+ /** Stable feature slug within the source application. */
2111
+ source_feature?: string | null;
2112
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
2113
+ initiation?: ("user" | "auto") | null;
2114
+ /** THE input surface channel (INPUT-SURFACE.md): flat name → value against the workflow's compiled input surface (the union of its input nodes' fields + declared variables). Values are provenance-stamped */
2115
+ inputs?: {
2116
+ [key: string]: unknown;
2117
+ };
2118
+ /** Per-input provenance claims for `inputs`. Default 'caller'. 'human' is accepted ONLY from the human-facing form path (a human-attached session) — a programmatic caller claiming it is REFUSED with erro */
2119
+ input_sources?: {
2120
+ [key: string]: "human" | "caller";
2121
+ };
2122
+ /** Per-node user-supplied inputs keyed by node_id, merged on top of `inputs` for the addressed entry node at seed time. This is what the generated run form submits — one section per io.user_input node. ` */
2123
+ node_inputs?: {
2124
+ [key: string]: {
2125
+ [key: string]: unknown;
2126
+ };
2127
+ };
2128
+ /** If set, run the snapshot at this version_number instead of the current draft. */
2129
+ version_number?: number | null;
2130
+ thread_id?: string | null;
2131
+ conversation_id?: string | null;
2132
+ /** Name → value pairs available to every agent node for prompt variable substitution. Distinct from `inputs`, which is the typed payload to the entry node. */
2133
+ initial_variables?: {
2134
+ [key: string]: unknown;
2135
+ };
2136
+ /** LLM parameter overrides applied across the run (temperature, max_tokens, model, etc.). Empty by default. */
2137
+ initial_overrides?: {
2138
+ [key: string]: unknown;
2139
+ };
2140
+ /** Node IDs to short-circuit pre-emptively. Each one emits a node_skipped event with empty output and lets downstream edges route an empty payload. Use this when you want to test the workflow without fir */
2141
+ skip_node_ids?: string[];
2142
+ /** Phase 5.2 — edge IDs the scheduler should NOT route along. When a source node completes, any outgoing edges in this set are silently dropped — downstream targets receive no payload from them. Useful f */
2143
+ skip_edge_ids?: string[];
2144
+ max_steps?: number;
2145
+ /** Max node invocations of one super-step executing at once (BS-6 bounded fan-out). A 50-item map with step_concurrency=3 runs 3 at a time instead of all 50 — the declarative form of rate-limited fan-out */
2146
+ step_concurrency?: number | null;
2147
+ /** 'inline' streams the run through this HTTP response as NDJSON. 'queued' enqueues a wf_job row and returns immediately with the run_id — a worker process picks it up. Use queued for anything expected t */
2148
+ mode?: "inline" | "queued";
2149
+ /** Optional URL POSTed the terminal run summary (run_id, status, outputs/error, duration, cost) exactly once when the run completes / fails / cancels — by ANY path, including worker runs and cancels. Giv */
2150
+ callback_url?: string | null;
2151
+ };
2152
+ /** SaveAsTemplateRequest */
2153
+ type SaveAsTemplateRequest = {
2154
+ /** Organization context for the request; omitted to use the authenticated context. */
2155
+ organization_id?: string | null;
2156
+ /** Optional associated project selected by the caller. */
2157
+ project_id?: string | null;
2158
+ /** Optional associated task selected by the caller. */
2159
+ task_id?: string | null;
2160
+ /** Stable application slug that initiated the request. */
2161
+ source_app?: string | null;
2162
+ /** Stable feature slug within the source application. */
2163
+ source_feature?: string | null;
2164
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
2165
+ initiation?: ("user" | "auto") | null;
2166
+ name: string;
2167
+ description?: string | null;
2168
+ category?: string | null;
2169
+ };
2170
+ /** SaveAsTemplateResponse */
2171
+ type SaveAsTemplateResponse = {
2172
+ template_id: string;
2173
+ };
2174
+ /** SaveBuilderWorkflowRequest */
2175
+ type SaveBuilderWorkflowRequest = {
2176
+ /** Organization context for the request; omitted to use the authenticated context. */
2177
+ organization_id?: string | null;
2178
+ /** Optional associated project selected by the caller. */
2179
+ project_id?: string | null;
2180
+ /** Optional associated task selected by the caller. */
2181
+ task_id?: string | null;
2182
+ /** Stable application slug that initiated the request. */
2183
+ source_app?: string | null;
2184
+ /** Stable feature slug within the source application. */
2185
+ source_feature?: string | null;
2186
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
2187
+ initiation?: ("user" | "auto") | null;
2188
+ spec: {
2189
+ [key: string]: JsonValue;
2190
+ };
2191
+ name?: string | null;
2192
+ expected_updated_at?: string | null;
2193
+ };
2194
+ /** Draft save body. Inherits the canonical ``expected_version`` */
2195
+ type SaveDraftRequest = {
2196
+ /** Optimistic concurrency: the record `version` this write was based on. When set, the write only lands if the stored version still matches; otherwise the API returns 409 version_conflict with the curren */
2197
+ expected_version?: number | null;
2198
+ definition: Definition;
2199
+ name?: string | null;
2200
+ description?: string | null;
2201
+ expected_updated_at?: string | null;
2202
+ input_kind?: string | null;
2203
+ output_kind?: string | null;
2204
+ };
2205
+ /** Audit of one schema class (an input/output/config root, or a shared model). */
2206
+ type SchemaReport = {
2207
+ schema_name: string;
2208
+ module: string;
2209
+ state: ConformanceState;
2210
+ leaks: TypeLeak[];
2211
+ field_count: number;
2212
+ cyclic?: boolean;
2213
+ };
2214
+ /** One entry of the SERVED compiled input surface (INPUT-SURFACE.md) — */
2215
+ type ServedInput = {
2216
+ name: string;
2217
+ kind: string;
2218
+ sourcing: "ask" | "require" | "optional";
2219
+ variant?: string | null;
2220
+ default?: unknown;
2221
+ label?: string;
2222
+ help?: string;
2223
+ placeholder?: string;
2224
+ options?: string[];
2225
+ origin?: "field" | "variable";
2226
+ node_id?: string | null;
2227
+ json_schema?: {
2228
+ [key: string]: unknown;
2229
+ };
2230
+ required?: boolean;
2231
+ pinned?: boolean;
2232
+ read_only?: boolean;
2233
+ pinned_value?: unknown;
2234
+ [key: string]: unknown;
2235
+ };
2236
+ /** SetSampleRequest */
2237
+ type SetSampleRequest = {
2238
+ /** Organization context for the request; omitted to use the authenticated context. */
2239
+ organization_id?: string | null;
2240
+ /** Optional associated project selected by the caller. */
2241
+ project_id?: string | null;
2242
+ /** Optional associated task selected by the caller. */
2243
+ task_id?: string | null;
2244
+ /** Stable application slug that initiated the request. */
2245
+ source_app?: string | null;
2246
+ /** Stable feature slug within the source application. */
2247
+ source_feature?: string | null;
2248
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
2249
+ initiation?: ("user" | "auto") | null;
2250
+ direction: "input" | "output";
2251
+ scenario?: string;
2252
+ data?: {
2253
+ [key: string]: unknown;
2254
+ };
2255
+ source?: "authored" | "captured" | "generated";
2256
+ is_stand_in?: boolean | null;
2257
+ };
2258
+ /** SetShapeRequest */
2259
+ type SetShapeRequest = {
2260
+ /** Organization context for the request; omitted to use the authenticated context. */
2261
+ organization_id?: string | null;
2262
+ /** Optional associated project selected by the caller. */
2263
+ project_id?: string | null;
2264
+ /** Optional associated task selected by the caller. */
2265
+ task_id?: string | null;
2266
+ /** Stable application slug that initiated the request. */
2267
+ source_app?: string | null;
2268
+ /** Stable feature slug within the source application. */
2269
+ source_feature?: string | null;
2270
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
2271
+ initiation?: ("user" | "auto") | null;
2272
+ direction: "input" | "output";
2273
+ shape?: {
2274
+ [key: string]: unknown;
2275
+ } | null;
2276
+ };
2277
+ /** Upsert a declared run variable by name. */
2278
+ type SetVariableOp = {
2279
+ op?: "set_variable";
2280
+ variable: VariableSpec;
2281
+ };
2282
+ /** SettlePlanRequest */
2283
+ type SettlePlanRequest = {
2284
+ /** Organization context for the request; omitted to use the authenticated context. */
2285
+ organization_id?: string | null;
2286
+ /** Optional associated project selected by the caller. */
2287
+ project_id?: string | null;
2288
+ /** Optional associated task selected by the caller. */
2289
+ task_id?: string | null;
2290
+ /** Stable application slug that initiated the request. */
2291
+ source_app?: string | null;
2292
+ /** Stable feature slug within the source application. */
2293
+ source_feature?: string | null;
2294
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
2295
+ initiation?: ("user" | "auto") | null;
2296
+ rationale?: string;
2297
+ };
2298
+ /** SettlePlanResponse */
2299
+ type SettlePlanResponse = {
2300
+ plan: PlanRecord;
2301
+ node_ids: string[];
2302
+ emitted_count: number;
2303
+ detached_edges: number;
2304
+ needs_wiring: string[];
2305
+ note: string;
2306
+ };
2307
+ /** ShapeConformanceBoard */
2308
+ type ShapeConformanceBoard = {
2309
+ counts: ShapeConformanceCounts;
2310
+ total_matching: number;
2311
+ shapes: ShapeConformanceRow[];
2312
+ };
2313
+ /** One number per state, over every Shape. */
2314
+ type ShapeConformanceCounts = {
2315
+ live?: number;
2316
+ not_live?: number;
2317
+ ready?: number;
2318
+ example_contradicts_schema?: number;
2319
+ no_matching_example?: number;
2320
+ generic_view_only?: number;
2321
+ no_view_at_all?: number;
2322
+ duplicate_shape?: number;
2323
+ record_behind_live_check?: number;
2324
+ };
2325
+ /** One Shape's state. Open shape — the view owns the column list. */
2326
+ type ShapeConformanceRow = {
2327
+ kind?: string | null;
2328
+ label?: string | null;
2329
+ version?: number | null;
2330
+ is_active?: boolean | null;
2331
+ family?: string | null;
2332
+ state?: string | null;
2333
+ passes_every_check?: boolean | null;
2334
+ example_matches_schema?: boolean | null;
2335
+ example_contradicts_schema?: boolean | null;
2336
+ example_record_is_stale?: boolean | null;
2337
+ has_real_view?: boolean | null;
2338
+ only_the_generic_view?: boolean | null;
2339
+ needs_a_view?: boolean | null;
2340
+ shape_is_unique?: boolean | null;
2341
+ duplicate_of?: string | null;
2342
+ example_count?: number | null;
2343
+ canonical_example_count?: number | null;
2344
+ real_view_count?: number | null;
2345
+ generic_view_count?: number | null;
2346
+ nests_kinds?: number | null;
2347
+ nested_by_kinds?: number | null;
2348
+ stored_instances?: number | null;
2349
+ mandates_declaring?: number | null;
2350
+ outcomes_30d?: number | null;
2351
+ [key: string]: unknown;
2352
+ };
2353
+ /** Set who a workflow is shown to in lists (access ladder T-13 — a list filter, */
2354
+ type ShownToRequest = {
2355
+ /** Organization context for the request; omitted to use the authenticated context. */
2356
+ organization_id?: string | null;
2357
+ /** Optional associated project selected by the caller. */
2358
+ project_id?: string | null;
2359
+ /** Optional associated task selected by the caller. */
2360
+ task_id?: string | null;
2361
+ /** Stable application slug that initiated the request. */
2362
+ source_app?: string | null;
2363
+ /** Stable feature slug within the source application. */
2364
+ source_feature?: string | null;
2365
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
2366
+ initiation?: ("user" | "auto") | null;
2367
+ shown_to?: ("only_me" | "my_team" | "everyone" | "everyone_on_ai_matrx") | null;
2368
+ visibility?: ("personal" | "internal" | "link") | null;
2369
+ };
2370
+ /** The list filter that now applies (null = follow the type's default). */
2371
+ type ShownToResponse = {
2372
+ definition_id: string;
2373
+ shown_to?: string | null;
2374
+ };
2375
+ /** SkipNodeRequest */
2376
+ type SkipNodeRequest = {
2377
+ /** Output to record for the skipped node. Defaults to {} — downstream nodes see an empty payload. The scheduler's idempotency replay treats this exactly like a successful executor run. */
2378
+ output?: {
2379
+ [key: string]: unknown;
2380
+ };
2381
+ /** Fan-out correlation (ENGINE_SPEC §4.5): dispatch id of the specific fanned invocation to skip. Required together with item_index when several items of this node are pending. */
2382
+ dispatch_id?: string | null;
2383
+ /** Fan-out correlation (ENGINE_SPEC §4.5): item index within dispatch_id. */
2384
+ item_index?: number | null;
2385
+ max_steps?: number;
2386
+ };
2387
+ /** Synthesize a (possibly empty) output and continue. */
2388
+ type SkipProposal = {
2389
+ action?: "skip";
2390
+ node_id: string;
2391
+ output?: {
2392
+ [key: string]: unknown;
2393
+ } | null;
2394
+ };
2395
+ /** SplitPlanRequest */
2396
+ type SplitPlanRequest = {
2397
+ /** Organization context for the request; omitted to use the authenticated context. */
2398
+ organization_id?: string | null;
2399
+ /** Optional associated project selected by the caller. */
2400
+ project_id?: string | null;
2401
+ /** Optional associated task selected by the caller. */
2402
+ task_id?: string | null;
2403
+ /** Stable application slug that initiated the request. */
2404
+ source_app?: string | null;
2405
+ /** Stable feature slug within the source application. */
2406
+ source_feature?: string | null;
2407
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
2408
+ initiation?: ("user" | "auto") | null;
2409
+ names: string[];
2410
+ };
2411
+ /** SplitPlanResponse */
2412
+ type SplitPlanResponse = {
2413
+ plans: PlanRecord[];
2414
+ };
2415
+ /** StartQueuedRunResponse */
2416
+ type StartQueuedRunResponse = {
2417
+ run_id: string;
2418
+ job_id: string;
2419
+ mode?: "queued";
2420
+ status?: "pending";
2421
+ };
2422
+ /** A freshly created step-mode run — a ``paused`` run seeded at its entry */
2423
+ type StartStepRunResponse = {
2424
+ run_id: string;
2425
+ seed_checkpoint_id: string;
2426
+ status?: string;
2427
+ frontier?: FrontierInvocation[];
2428
+ [key: string]: unknown;
2429
+ };
2430
+ /** kind='event' config, ``source='store'`` arm — a change to a record of a custom Table. */
2431
+ type StoreEventSource = {
2432
+ source: "store";
2433
+ event: "record.created" | "record.updated" | "record.archived" | "record.matches" | "form.answered" | "booking.made";
2434
+ table_id: string;
2435
+ operations?: ("created" | "updated" | "deleted")[];
2436
+ field_ids?: string[];
2437
+ via?: ("form" | "booking" | "import" | "agent" | "api" | "person")[];
2438
+ to?: {
2439
+ [key: string]: JsonValue;
2440
+ } | null;
2441
+ debounce_per_record?: boolean;
2442
+ bound_graph_hash?: string | null;
2443
+ };
2444
+ /** One normalized visible `chat.message` — the same projection every */
2445
+ type StoredMessageRecord = {
2446
+ message_id: string;
2447
+ role: string;
2448
+ text?: string;
2449
+ position?: number;
2450
+ };
2451
+ /** SystemTaskItem */
2452
+ type SystemTaskItem = {
2453
+ id: string;
2454
+ title: string;
2455
+ description?: string | null;
2456
+ tool_name?: string | null;
2457
+ enabled: boolean;
2458
+ handler_gate_pending: boolean;
2459
+ handler_registered: boolean;
2460
+ taxonomy_node_id: string;
2461
+ taxonomy_path: SystemTaskTaxonomyNode[];
2462
+ variables_args?: {
2463
+ [key: string]: JsonValue;
2464
+ };
2465
+ trigger?: SystemTaskTriggerInfo | null;
2466
+ last_run?: SystemTaskLastRun | null;
2467
+ };
2468
+ /** SystemTaskLastRun */
2469
+ type SystemTaskLastRun = {
2470
+ id: string;
2471
+ status: string;
2472
+ started_at?: string | null;
2473
+ finished_at?: string | null;
2474
+ error_message?: string | null;
2475
+ };
2476
+ /** SystemTaskPatchRequest */
2477
+ type SystemTaskPatchRequest = {
2478
+ enabled?: boolean | null;
2479
+ taxonomy_node_id?: string | null;
2480
+ trigger?: SystemTaskTriggerPatch | null;
2481
+ variables_args?: {
2482
+ [key: string]: JsonValue;
2483
+ } | null;
2484
+ };
2485
+ /** SystemTaskTaxonomyNode */
2486
+ type SystemTaskTaxonomyNode = {
2487
+ id: string;
2488
+ slug: string;
2489
+ name: string;
2490
+ level: string;
2491
+ parent_id?: string | null;
2492
+ };
2493
+ /** SystemTaskTriggerInfo */
2494
+ type SystemTaskTriggerInfo = {
2495
+ id: string;
2496
+ type: string;
2497
+ config: {
2498
+ [key: string]: JsonValue;
2499
+ };
2500
+ enabled: boolean;
2501
+ next_due_at?: string | null;
2502
+ };
2503
+ /** SystemTaskTriggerPatch */
2504
+ type SystemTaskTriggerPatch = {
2505
+ type?: string | null;
2506
+ config?: {
2507
+ [key: string]: JsonValue;
2508
+ } | null;
2509
+ };
2510
+ /** SystemTasksResponse */
2511
+ type SystemTasksResponse = {
2512
+ tasks: SystemTaskItem[];
2513
+ taxonomy_nodes: SystemTaskTaxonomyNode[];
2514
+ };
2515
+ /** kind='event' config, ``source='table'`` arm — a raw-table data change. */
2516
+ type TableEventSource = {
2517
+ source?: "table";
2518
+ /** Schema-qualified watched table. */
2519
+ table: string;
2520
+ operation?: "insert" | "update";
2521
+ when_column?: string | null;
2522
+ when_value?: string | null;
2523
+ entity_key_column?: string;
2524
+ debounce_seconds?: number;
2525
+ input_map?: {
2526
+ [key: string]: string;
2527
+ };
2528
+ include_event?: boolean;
2529
+ };
2530
+ /** TableWorkflow */
2531
+ type TableWorkflow = {
2532
+ kind: "workflow" | "button" | "stage_rule" | "notify" | "digest" | "webhook" | "agent_on_change" | "enrich";
2533
+ name: string;
2534
+ is_on: boolean;
2535
+ last_run_at?: string | null;
2536
+ /** The existing editor's key: {editor, …ids}. The screen opens that editor. */
2537
+ open: {
2538
+ [key: string]: JsonValue;
2539
+ };
2540
+ };
2541
+ /** TableWorkflows */
2542
+ type TableWorkflows = {
2543
+ table_id: string;
2544
+ workflows: TableWorkflow[];
2545
+ /** Features whose list could not be read for you. */
2546
+ unavailable?: string[];
2547
+ };
2548
+ /** TemplateRecord */
2549
+ type TemplateRecord = {
2550
+ id: string;
2551
+ name: string;
2552
+ description?: string | null;
2553
+ category?: string | null;
2554
+ preview_image_url?: string | null;
2555
+ popularity?: number;
2556
+ step_count?: number;
2557
+ definition?: {
2558
+ [key: string]: unknown;
2559
+ } | null;
2560
+ [key: string]: unknown;
2561
+ };
2562
+ /** TestNodeRequest */
2563
+ type TestNodeRequest = {
2564
+ /** Inputs to pass to the node's executor. Validated against the node's input_schema at execution time; a validation error comes back in the response. */
2565
+ inputs?: {
2566
+ [key: string]: unknown;
2567
+ };
2568
+ /** Optional override for the node's saved config. Useful for tweaking a model / temperature / system prompt without editing and saving the workflow. None = use the saved config. */
2569
+ config_override?: {
2570
+ [key: string]: unknown;
2571
+ } | null;
2572
+ /** Run-variable values for {'$var': name} references authored in the node's static inputs. The test path resolves them through the SAME merge the scheduler uses (resolve_invocation_inputs), so a node tes */
2573
+ variables?: {
2574
+ [key: string]: unknown;
2575
+ };
2576
+ };
2577
+ /** TestWithRecordRequest */
2578
+ type TestWithRecordRequest = {
2579
+ /** Organization context for the request; omitted to use the authenticated context. */
2580
+ organization_id?: string | null;
2581
+ /** Optional associated project selected by the caller. */
2582
+ project_id?: string | null;
2583
+ /** Optional associated task selected by the caller. */
2584
+ task_id?: string | null;
2585
+ /** Stable application slug that initiated the request. */
2586
+ source_app?: string | null;
2587
+ /** Stable feature slug within the source application. */
2588
+ source_feature?: string | null;
2589
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
2590
+ initiation?: ("user" | "auto") | null;
2591
+ record_id: string;
2592
+ /** A real change to replay; a fresh id when left empty. */
2593
+ change_id?: string | null;
2594
+ };
2595
+ /** Queue row behind a kind='event' trigger — wire shape of */
2596
+ type TriggerEventRecord = {
2597
+ id: string;
2598
+ trigger_id: string;
2599
+ entity_key: string;
2600
+ status: "pending" | "claimed" | "fired" | "dead";
2601
+ claim_at?: string | null;
2602
+ attempts?: number;
2603
+ max_attempts?: number;
2604
+ run_id?: string | null;
2605
+ last_error?: string | null;
2606
+ created_at?: string | null;
2607
+ [key: string]: unknown;
2608
+ };
2609
+ /** Audit row for one trigger fire attempt — wire shape of */
2610
+ type TriggerFireRecord = {
2611
+ id: string;
2612
+ trigger_id: string;
2613
+ user_id: string;
2614
+ fired_at: string;
2615
+ fired_by_user_id?: string | null;
2616
+ source_ip?: string | null;
2617
+ request_body_hash?: string | null;
2618
+ run_id?: string | null;
2619
+ status: "queued" | "failed";
2620
+ error_type?: string | null;
2621
+ error_message?: string | null;
2622
+ [key: string]: unknown;
2623
+ };
2624
+ /** Trigger row as returned by ``TriggerStore``'s Pydantic model. */
2625
+ type TriggerRecord = {
2626
+ id?: string | null;
2627
+ definition_id?: string | null;
2628
+ definition_version_id?: string | null;
2629
+ name?: string | null;
2630
+ kind?: string | null;
2631
+ cron_expression?: string | null;
2632
+ event_source?: {
2633
+ [key: string]: unknown;
2634
+ } | null;
2635
+ timezone?: string | null;
2636
+ description?: string | null;
2637
+ is_active?: boolean | null;
2638
+ user_id?: string | null;
2639
+ organization_id?: string | null;
2640
+ project_id?: string | null;
2641
+ task_id?: string | null;
2642
+ max_steps?: number | null;
2643
+ callback_url?: string | null;
2644
+ [key: string]: unknown;
2645
+ };
2646
+ /** TurnOnRequest */
2647
+ type TurnOnRequest = {
2648
+ /** Organization context for the request; omitted to use the authenticated context. */
2649
+ organization_id?: string | null;
2650
+ /** Optional associated project selected by the caller. */
2651
+ project_id?: string | null;
2652
+ /** Optional associated task selected by the caller. */
2653
+ task_id?: string | null;
2654
+ /** Stable application slug that initiated the request. */
2655
+ source_app?: string | null;
2656
+ /** Stable feature slug within the source application. */
2657
+ source_feature?: string | null;
2658
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
2659
+ initiation?: ("user" | "auto") | null;
2660
+ published_version_id: string;
2661
+ };
2662
+ /** One exact point where typing stops. */
2663
+ type TypeLeak = {
2664
+ path: string;
2665
+ rule: LeakRule;
2666
+ annotation: string;
2667
+ owner_model: string;
2668
+ depth: number;
2669
+ };
2670
+ /** UnarchiveWorkflowResponse */
2671
+ type UnarchiveWorkflowResponse = {
2672
+ unarchived: boolean;
2673
+ };
2674
+ /** Deep-merge ``data`` into an existing node's ``data`` payload. */
2675
+ type UpdateNodeDataOp = {
2676
+ op?: "update_node_data";
2677
+ node_id: string;
2678
+ data: {
2679
+ [key: string]: unknown;
2680
+ };
2681
+ };
2682
+ /** Replace an existing node's top-level React Flow renderer type. */
2683
+ type UpdateNodeTypeOp = {
2684
+ op?: "update_node_type";
2685
+ node_id: string;
2686
+ type: string;
2687
+ };
2688
+ /** UpdatePlanRequest */
2689
+ type UpdatePlanRequest = {
2690
+ /** Organization context for the request; omitted to use the authenticated context. */
2691
+ organization_id?: string | null;
2692
+ /** Optional associated project selected by the caller. */
2693
+ project_id?: string | null;
2694
+ /** Optional associated task selected by the caller. */
2695
+ task_id?: string | null;
2696
+ /** Stable application slug that initiated the request. */
2697
+ source_app?: string | null;
2698
+ /** Stable feature slug within the source application. */
2699
+ source_feature?: string | null;
2700
+ /** How the client initiated this request: 'user' for a direct human action, 'auto' for client-code automation. Omit for API callers. */
2701
+ initiation?: ("user" | "auto") | null;
2702
+ name?: string | null;
2703
+ intent?: string | null;
2704
+ notes?: string | null;
2705
+ node_id?: string | null;
2706
+ allow_stand_in_in_production?: boolean | null;
2707
+ conversation_id?: string | null;
2708
+ expected_version?: number | null;
2709
+ };
2710
+ /** UpdateTriggerActiveRequest */
2711
+ type UpdateTriggerActiveRequest = {
2712
+ is_active: boolean;
2713
+ /** Turning a record trigger on: the published version to run — the published_version_id the publish returned. Required for record triggers. */
2714
+ definition_version_id?: string | null;
2715
+ };
2716
+ /** UpdateTriggerActiveResponse */
2717
+ type UpdateTriggerActiveResponse = {
2718
+ is_active: boolean;
2719
+ };
2720
+ /** ValidateRequest */
2721
+ type ValidateRequest = {
2722
+ definition: Definition;
2723
+ };
2724
+ /** A single problem with a Definition. Rendered as a badge in the UI. */
2725
+ type ValidationIssue = {
2726
+ path: string;
2727
+ message: string;
2728
+ node_id?: string | null;
2729
+ edge_id?: string | null;
2730
+ severity?: string;
2731
+ };
2732
+ /** ValidationResult */
2733
+ type ValidationResult = {
2734
+ valid: boolean;
2735
+ issues?: ValidationIssue[];
2736
+ };
2737
+ /** One declared run variable on a Definition. */
2738
+ type VariableSpec = {
2739
+ name: string;
2740
+ description?: string;
2741
+ default?: unknown;
2742
+ };
2743
+ /** Viewport */
2744
+ type Viewport = {
2745
+ x?: number;
2746
+ y?: number;
2747
+ zoom?: number;
2748
+ };
2749
+ /** One missing input on an ``awaiting_input`` park — the compiled input */
2750
+ type WaitingGap = {
2751
+ name: string;
2752
+ kind?: string | null;
2753
+ sourcing?: string | null;
2754
+ variant?: string | null;
2755
+ label?: string | null;
2756
+ help?: string | null;
2757
+ placeholder?: string | null;
2758
+ options?: unknown[];
2759
+ json_schema?: {
2760
+ [key: string]: unknown;
2761
+ } | null;
2762
+ };
2763
+ /** One row of the inbox. Every field a "Waiting on you" list needs, and */
2764
+ type WaitingRun = {
2765
+ run_id: string;
2766
+ definition_id?: string | null;
2767
+ workflow_name?: string | null;
2768
+ status: string;
2769
+ snapshot: WaitingSnapshot;
2770
+ asked_at?: string | null;
2771
+ deadline?: string | null;
2772
+ parent_run_id?: string | null;
2773
+ };
2774
+ /** WaitingRunsResponse */
2775
+ type WaitingRunsResponse = {
2776
+ runs: WaitingRun[];
2777
+ total: number;
2778
+ };
2779
+ /** WHAT the run is waiting for — the two park shapes under one roof. */
2780
+ type WaitingSnapshot = {
2781
+ kind: string;
2782
+ node_id?: string | null;
2783
+ checkpoint_id?: string | null;
2784
+ title?: string | null;
2785
+ prompt?: string | null;
2786
+ presentation?: string;
2787
+ preset?: string;
2788
+ schema_hint?: {
2789
+ [key: string]: unknown;
2790
+ } | null;
2791
+ missing?: WaitingGap[];
2792
+ stale?: boolean;
2793
+ };
2794
+ /** Aggregated cost for one definition across a time window. */
2795
+ type WorkflowCostRollup = {
2796
+ workflow_id: string;
2797
+ range_days: number;
2798
+ range_start: string;
2799
+ range_end: string;
2800
+ total_runs?: number;
2801
+ total_cost_usd?: number;
2802
+ avg_run_cost_usd?: number;
2803
+ runs_per_day?: DailyCostBreakdown[];
2804
+ };
2805
+ /** ComputeNextDueRequest */
2806
+ type aidream__api__routers__scheduling__ComputeNextDueRequest = {
2807
+ trigger_type: "one-shot" | "interval" | "cron" | "heartbeat" | "context-match" | "event" | "manual" | "dependency";
2808
+ config?: {
2809
+ [key: string]: JsonValue;
2810
+ };
2811
+ };
2812
+ /** ScannerStatusResponse */
2813
+ type aidream__api__routers__scheduling__ScannerStatusResponse = {
2814
+ running: boolean;
2815
+ platform_scanner_live?: boolean;
2816
+ platform_scanner_count?: number;
2817
+ platform_last_seen_at?: string | null;
2818
+ platform_note?: string | null;
2819
+ started_at?: string | null;
2820
+ last_tick_at?: string | null;
2821
+ last_tick_duration_ms?: number | null;
2822
+ last_tick_claimed?: number;
2823
+ last_tick_expired_sweeps?: number;
2824
+ total_runs_dispatched?: number;
2825
+ consecutive_errors?: number;
2826
+ error_message?: string | null;
2827
+ };
2828
+ /** CancelRunResponse */
2829
+ type aidream__api__routers__workflow__CancelRunResponse = {
2830
+ run_id: string;
2831
+ cancelling: boolean;
2832
+ previous_status: string;
2833
+ mode: "graceful" | "immediate";
2834
+ task_cancelled: boolean;
2835
+ };
2836
+ /** PublishRequest */
2837
+ type aidream__api__routers__workflow__PublishRequest = {
2838
+ change_note?: string | null;
2839
+ };
2840
+ /** ExtractRequest */
2841
+ type aidream__services__workflow_extract__materialize__ExtractRequest = {
2842
+ name: string;
2843
+ description?: string;
2844
+ occurrences: ExtractOccurrence[];
2845
+ /** Assist chip to mark accepted once the extraction lands. */
2846
+ assist_id?: string | null;
2847
+ /** Run every gate and report exactly what WOULD happen, writing nothing. What the studio's confirm dialog is built on. */
2848
+ dry_run?: boolean;
2849
+ };
2850
+ type RunAssignmentsArgs = {
2851
+ body: AgentAssignmentRunRequest;
2852
+ };
2853
+ type RunAssignmentsResult = unknown;
2854
+ /** Run Assignments */
2855
+ /** `POST /ai/agent-assignments` · aidream · auth guest · org required · ndjson */
2856
+ declare function runAssignments(api: Api, args: RunAssignmentsArgs, options?: CallOptions): Promise<ApiStream<NdjsonEvent>>;
2857
+ type GetSessionArgs = {
2858
+ path: {
2859
+ session_id: string;
2860
+ };
2861
+ };
2862
+ type GetSessionResult = AssignmentBatchResult;
2863
+ /** Get Session */
2864
+ /** `GET /ai/agent-assignments/sessions/{session_id}` · aidream · auth guest · org required */
2865
+ declare function getSession(api: Api, args: GetSessionArgs, options?: CallOptions): Promise<GetSessionResult>;
2866
+ type CancelSessionArgs = {
2867
+ path: {
2868
+ session_id: string;
2869
+ };
2870
+ };
2871
+ type CancelSessionResult = AssignmentBatchResult;
2872
+ /** Cancel Session */
2873
+ /** `POST /ai/agent-assignments/sessions/{session_id}/cancel` · aidream · auth guest · org required */
2874
+ declare function cancelSession(api: Api, args: CancelSessionArgs, options?: CallOptions): Promise<CancelSessionResult>;
2875
+ type AdminGetWorkflowArgs = {
2876
+ path: {
2877
+ definition_id: string;
2878
+ };
2879
+ query?: {
2880
+ is_version?: boolean;
2881
+ version_number?: number | null;
2882
+ };
2883
+ };
2884
+ type AdminGetWorkflowResult = DefinitionRecord;
2885
+ /** Admin Get Workflow */
2886
+ /** `GET /admin/workflows/{definition_id}` · aidream · auth admin · org exempt */
2887
+ declare function adminGetWorkflow(api: Api, args: AdminGetWorkflowArgs, options?: CallOptions): Promise<AdminGetWorkflowResult>;
2888
+ type AdminListWorkflowRunsArgs = {
2889
+ path: {
2890
+ definition_id: string;
2891
+ };
2892
+ query?: {
2893
+ limit?: number;
2894
+ offset?: number;
2895
+ };
2896
+ };
2897
+ type AdminListWorkflowRunsResult = RunRecord[];
2898
+ /** Admin List Workflow Runs */
2899
+ /** `GET /admin/workflows/{definition_id}/runs` · aidream · auth admin · org exempt */
2900
+ declare function adminListWorkflowRuns(api: Api, args: AdminListWorkflowRunsArgs, options?: CallOptions): Promise<AdminListWorkflowRunsResult>;
2901
+ type AdminGetRunArgs = {
2902
+ path: {
2903
+ run_id: string;
2904
+ };
2905
+ };
2906
+ type AdminGetRunResult = RunRecord;
2907
+ /** Admin Get Run */
2908
+ /** `GET /admin/runs/{run_id}` · aidream · auth admin · org exempt */
2909
+ declare function adminGetRun(api: Api, args: AdminGetRunArgs, options?: CallOptions): Promise<AdminGetRunResult>;
2910
+ type AdminListPlansArgs = {
2911
+ path: {
2912
+ definition_id: string;
2913
+ };
2914
+ };
2915
+ type AdminListPlansResult = PlanListResponse;
2916
+ /** Admin List Plans */
2917
+ /** `GET /admin/workflows/{definition_id}/plans` · aidream · auth admin · org exempt */
2918
+ declare function adminListPlans(api: Api, args: AdminListPlansArgs, options?: CallOptions): Promise<AdminListPlansResult>;
2919
+ type AdminGetPlanArgs = {
2920
+ path: {
2921
+ plan_id: string;
2922
+ };
2923
+ };
2924
+ type AdminGetPlanResult = PlanFullResponse;
2925
+ /** Admin Get Plan */
2926
+ /** `GET /admin/workflow-plans/{plan_id}` · aidream · auth admin · org exempt */
2927
+ declare function adminGetPlan(api: Api, args: AdminGetPlanArgs, options?: CallOptions): Promise<AdminGetPlanResult>;
2928
+ type ListNodeTypesArgs = {
2929
+ [key: string]: never;
2930
+ };
2931
+ type ListNodeTypesResult = NodeTypeDescriptor[];
2932
+ /** List Node Types */
2933
+ /** `GET /workflow/node-types` · aidream · auth guest · org optional */
2934
+ declare function listNodeTypes(api: Api, args?: ListNodeTypesArgs, options?: CallOptions): Promise<ListNodeTypesResult>;
2935
+ type ListPlatformTablesArgs = {
2936
+ [key: string]: never;
2937
+ };
2938
+ type ListPlatformTablesResult = PlatformTableEntry[];
2939
+ /** List Platform Tables */
2940
+ /** `GET /workflow/platform-tables` · aidream · auth guest · org optional */
2941
+ declare function listPlatformTables(api: Api, args?: ListPlatformTablesArgs, options?: CallOptions): Promise<ListPlatformTablesResult>;
2942
+ type ListWorkflowKindsArgs = {
2943
+ [key: string]: never;
2944
+ };
2945
+ type ListWorkflowKindsResult = KindCatalogResponse;
2946
+ /** List Workflow Kinds */
2947
+ /** `GET /workflow/kinds` · aidream · auth guest · org exempt */
2948
+ declare function listWorkflowKinds(api: Api, args?: ListWorkflowKindsArgs, options?: CallOptions): Promise<ListWorkflowKindsResult>;
2949
+ type ShapeConformanceBoardArgs = {
2950
+ query?: {
2951
+ state?: string | null;
2952
+ limit?: number;
2953
+ };
2954
+ };
2955
+ type ShapeConformanceBoardResult = ShapeConformanceBoard;
2956
+ /** Shape Conformance Board */
2957
+ /** `GET /workflow/kinds/conformance` · aidream · auth guest · org exempt */
2958
+ declare function shapeConformanceBoard(api: Api, args?: ShapeConformanceBoardArgs, options?: CallOptions): Promise<ShapeConformanceBoardResult>;
2959
+ type GetWorkflowKindArgs = {
2960
+ path: {
2961
+ slug: string;
2962
+ };
2963
+ };
2964
+ type GetWorkflowKindResult = KindDescriptor;
2965
+ /** Get Workflow Kind */
2966
+ /** `GET /workflow/kinds/{slug}` · aidream · auth guest · org exempt */
2967
+ declare function getWorkflowKind(api: Api, args: GetWorkflowKindArgs, options?: CallOptions): Promise<GetWorkflowKindResult>;
2968
+ type ReportGenericFloorRenderArgs = {
2969
+ body: GenericFloorReport;
2970
+ };
2971
+ type ReportGenericFloorRenderResult = GenericFloorReportResponse;
2972
+ /** Report Generic Floor Render */
2973
+ /** `POST /workflow/kinds/generic-floor` · aidream · auth guest · org exempt */
2974
+ declare function reportGenericFloorRender(api: Api, args: ReportGenericFloorRenderArgs, options?: CallOptions): Promise<ReportGenericFloorRenderResult>;
2975
+ type ListGenericFloorIncidentsArgs = {
2976
+ query?: {
2977
+ limit?: number;
2978
+ };
2979
+ };
2980
+ type ListGenericFloorIncidentsResult = GenericFloorBoard;
2981
+ /** List Generic Floor Incidents */
2982
+ /** `GET /workflow/kinds/generic-floor/open` · aidream · auth guest · org exempt */
2983
+ declare function listGenericFloorIncidents(api: Api, args?: ListGenericFloorIncidentsArgs, options?: CallOptions): Promise<ListGenericFloorIncidentsResult>;
2984
+ type ContractAuditArgs = {
2985
+ [key: string]: never;
2986
+ };
2987
+ type ContractAuditResult = ContractAuditReport;
2988
+ /** Contract Audit */
2989
+ /** `GET /workflow/contracts/audit` · aidream · auth guest · org exempt */
2990
+ declare function contractAudit(api: Api, args?: ContractAuditArgs, options?: CallOptions): Promise<ContractAuditResult>;
2991
+ type RefreshNodeTypesArgs = {
2992
+ [key: string]: never;
2993
+ };
2994
+ type RefreshNodeTypesResult = RefreshNodeTypesResponse;
2995
+ /** Refresh Node Types */
2996
+ /** `POST /workflow/node-types/refresh` · aidream · auth guest · org required */
2997
+ declare function refreshNodeTypes(api: Api, args?: RefreshNodeTypesArgs, options?: CallOptions): Promise<RefreshNodeTypesResult>;
2998
+ type ListActionsArgs = {
2999
+ [key: string]: never;
3000
+ };
3001
+ type ListActionsResult = NodeTypeDescriptor[];
3002
+ /** List Actions */
3003
+ /** `GET /actions` · aidream · auth guest · org optional */
3004
+ declare function listActions(api: Api, args?: ListActionsArgs, options?: CallOptions): Promise<ListActionsResult>;
3005
+ type ListWorkflowsArgs = {
3006
+ query?: {
3007
+ limit?: number;
3008
+ offset?: number;
3009
+ archived?: string;
3010
+ project_id?: string | null;
3011
+ organization_id?: string | null;
3012
+ include_generated?: boolean;
3013
+ };
3014
+ };
3015
+ type ListWorkflowsResult = DefinitionListPage;
3016
+ /** List Workflows */
3017
+ /** `GET /workflows` · aidream · auth guest · org optional */
3018
+ declare function listWorkflows(api: Api, args?: ListWorkflowsArgs, options?: CallOptions): Promise<ListWorkflowsResult>;
3019
+ type CreateWorkflowArgs = {
3020
+ body: CreateWorkflowRequest;
3021
+ };
3022
+ type CreateWorkflowResult = DefinitionRecord;
3023
+ /** Create Workflow */
3024
+ /** `POST /workflows` · aidream · auth guest · org required */
3025
+ declare function createWorkflow(api: Api, args: CreateWorkflowArgs, options?: CallOptions): Promise<CreateWorkflowResult>;
3026
+ type GetWorkflowArgs = {
3027
+ path: {
3028
+ definition_id: string;
3029
+ };
3030
+ query?: {
3031
+ is_version?: boolean;
3032
+ version_number?: number | null;
3033
+ };
3034
+ };
3035
+ type GetWorkflowResult = DefinitionRecord;
3036
+ /** Get Workflow */
3037
+ /** `GET /workflows/{definition_id}` · aidream · auth guest · org optional */
3038
+ declare function getWorkflow(api: Api, args: GetWorkflowArgs, options?: CallOptions): Promise<GetWorkflowResult>;
3039
+ type ArchiveWorkflowArgs = {
3040
+ path: {
3041
+ definition_id: string;
3042
+ };
3043
+ query?: {
3044
+ permanent?: boolean;
3045
+ };
3046
+ };
3047
+ type ArchiveWorkflowResult = ArchiveWorkflowResponse;
3048
+ /** Archive Workflow */
3049
+ /** `DELETE /workflows/{definition_id}` · aidream · auth guest · org required */
3050
+ declare function archiveWorkflow(api: Api, args: ArchiveWorkflowArgs, options?: CallOptions): Promise<ArchiveWorkflowResult>;
3051
+ type ListWorkflowVersionsArgs = {
3052
+ path: {
3053
+ definition_id: string;
3054
+ };
3055
+ };
3056
+ type ListWorkflowVersionsResult = DefinitionRecord[];
3057
+ /** List Workflow Versions */
3058
+ /** `GET /workflows/{definition_id}/versions` · aidream · auth guest · org optional */
3059
+ declare function listWorkflowVersions(api: Api, args: ListWorkflowVersionsArgs, options?: CallOptions): Promise<ListWorkflowVersionsResult>;
3060
+ type ListWorkflowHistoryArgs = {
3061
+ path: {
3062
+ definition_id: string;
3063
+ };
3064
+ };
3065
+ type ListWorkflowHistoryResult = DefinitionRecord[];
3066
+ /** List Workflow History */
3067
+ /** `GET /workflows/{definition_id}/history` · aidream · auth guest · org optional */
3068
+ declare function listWorkflowHistory(api: Api, args: ListWorkflowHistoryArgs, options?: CallOptions): Promise<ListWorkflowHistoryResult>;
3069
+ type GetWorkflowHistoryRevisionArgs = {
3070
+ path: {
3071
+ definition_id: string;
3072
+ revision: number;
3073
+ };
3074
+ };
3075
+ type GetWorkflowHistoryRevisionResult = DefinitionRecord;
3076
+ /** Get Workflow History Revision */
3077
+ /** `GET /workflows/{definition_id}/history/{revision}` · aidream · auth guest · org optional */
3078
+ declare function getWorkflowHistoryRevision(api: Api, args: GetWorkflowHistoryRevisionArgs, options?: CallOptions): Promise<GetWorkflowHistoryRevisionResult>;
3079
+ type GetWorkflowEngramArgs = {
3080
+ path: {
3081
+ definition_id: string;
3082
+ };
3083
+ };
3084
+ type GetWorkflowEngramResult = EngramStatus;
3085
+ /** Get Workflow Engram */
3086
+ /** `GET /workflows/{definition_id}/engram` · aidream · auth guest · org optional */
3087
+ declare function getWorkflowEngram(api: Api, args: GetWorkflowEngramArgs, options?: CallOptions): Promise<GetWorkflowEngramResult>;
3088
+ type PromoteWorkflowEngramArgs = {
3089
+ path: {
3090
+ definition_id: string;
3091
+ };
3092
+ };
3093
+ type PromoteWorkflowEngramResult = EngramStatus;
3094
+ /** Promote Workflow Engram */
3095
+ /** `POST /workflows/{definition_id}/engram/promote` · aidream · auth guest · org required */
3096
+ declare function promoteWorkflowEngram(api: Api, args: PromoteWorkflowEngramArgs, options?: CallOptions): Promise<PromoteWorkflowEngramResult>;
3097
+ type DemoteWorkflowEngramArgs = {
3098
+ path: {
3099
+ definition_id: string;
3100
+ };
3101
+ body: EngramDemoteRequest;
3102
+ };
3103
+ type DemoteWorkflowEngramResult = EngramStatus;
3104
+ /** Demote Workflow Engram */
3105
+ /** `POST /workflows/{definition_id}/engram/demote` · aidream · auth guest · org required */
3106
+ declare function demoteWorkflowEngram(api: Api, args: DemoteWorkflowEngramArgs, options?: CallOptions): Promise<DemoteWorkflowEngramResult>;
3107
+ type SaveWorkflowDraftArgs = {
3108
+ path: {
3109
+ definition_id: string;
3110
+ };
3111
+ body: SaveDraftRequest;
3112
+ };
3113
+ type SaveWorkflowDraftResult = DefinitionRecord;
3114
+ /** Save Workflow Draft */
3115
+ /** `PATCH /workflows/{definition_id}/draft` · aidream · auth guest · org required */
3116
+ declare function saveWorkflowDraft(api: Api, args: SaveWorkflowDraftArgs, options?: CallOptions): Promise<SaveWorkflowDraftResult>;
3117
+ type PublishWorkflowArgs = {
3118
+ path: {
3119
+ definition_id: string;
3120
+ };
3121
+ body: aidream__api__routers__workflow__PublishRequest;
3122
+ };
3123
+ type PublishWorkflowResult = DefinitionRecord;
3124
+ /** Publish Workflow */
3125
+ /** `POST /workflows/{definition_id}/publish` · aidream · auth guest · org required */
3126
+ declare function publishWorkflow(api: Api, args: PublishWorkflowArgs, options?: CallOptions): Promise<PublishWorkflowResult>;
3127
+ type ValidateWorkflowArgs = {
3128
+ body: ValidateRequest;
3129
+ };
3130
+ type ValidateWorkflowResult = ValidationResult;
3131
+ /** Validate Workflow */
3132
+ /** `POST /workflows/validate` · aidream · auth guest · org required */
3133
+ declare function validateWorkflow(api: Api, args: ValidateWorkflowArgs, options?: CallOptions): Promise<ValidateWorkflowResult>;
3134
+ type TestSingleNodeArgs = {
3135
+ path: {
3136
+ definition_id: string;
3137
+ node_id: string;
3138
+ };
3139
+ body: TestNodeRequest;
3140
+ };
3141
+ type TestSingleNodeResult = unknown;
3142
+ /** Test Single Node */
3143
+ /** `POST /workflows/{definition_id}/nodes/{node_id}/test` · aidream · auth guest · org required · ndjson */
3144
+ declare function testSingleNode(api: Api, args: TestSingleNodeArgs, options?: CallOptions): Promise<ApiStream<NdjsonEvent>>;
3145
+ type GetNodeDataSlotsArgs = {
3146
+ path: {
3147
+ definition_id: string;
3148
+ node_id: string;
3149
+ };
3150
+ };
3151
+ type GetNodeDataSlotsResult = NodeSlotsResponse;
3152
+ /** Get Node Data Slots */
3153
+ /** `GET /workflows/{definition_id}/nodes/{node_id}/slots` · aidream · auth guest · org optional */
3154
+ declare function getNodeDataSlots(api: Api, args: GetNodeDataSlotsArgs, options?: CallOptions): Promise<GetNodeDataSlotsResult>;
3155
+ type GetDefinitionDataSlotsArgs = {
3156
+ path: {
3157
+ definition_id: string;
3158
+ };
3159
+ };
3160
+ type GetDefinitionDataSlotsResult = DefinitionSlotsResponse;
3161
+ /** Get Definition Data Slots */
3162
+ /** `GET /workflows/{definition_id}/slots` · aidream · auth guest · org optional */
3163
+ declare function getDefinitionDataSlots(api: Api, args: GetDefinitionDataSlotsArgs, options?: CallOptions): Promise<GetDefinitionDataSlotsResult>;
3164
+ type PutDeclaredSampleArgs = {
3165
+ path: {
3166
+ definition_id: string;
3167
+ node_id: string;
3168
+ };
3169
+ body: PutDeclaredSampleRequest;
3170
+ };
3171
+ type PutDeclaredSampleResult = PutDeclaredSampleResponse;
3172
+ /** Put Declared Sample */
3173
+ /** `PUT /workflows/{definition_id}/nodes/{node_id}/slots/declared_sample` · aidream · auth guest · org required */
3174
+ declare function putDeclaredSample(api: Api, args: PutDeclaredSampleArgs, options?: CallOptions): Promise<PutDeclaredSampleResult>;
3175
+ type DeleteNodeDataSlotArgs = {
3176
+ path: {
3177
+ definition_id: string;
3178
+ node_id: string;
3179
+ slot: "declared_sample" | "last_test_output" | "last_live_output";
3180
+ };
3181
+ };
3182
+ type DeleteNodeDataSlotResult = DeleteSlotResponse;
3183
+ /** Delete Node Data Slot */
3184
+ /** `DELETE /workflows/{definition_id}/nodes/{node_id}/slots/{slot}` · aidream · auth guest · org required */
3185
+ declare function deleteNodeDataSlot(api: Api, args: DeleteNodeDataSlotArgs, options?: CallOptions): Promise<DeleteNodeDataSlotResult>;
3186
+ type DryRunWorkflowArgs = {
3187
+ path: {
3188
+ definition_id: string;
3189
+ };
3190
+ body: DryRunRequest;
3191
+ };
3192
+ type DryRunWorkflowResult = DryRunResponse;
3193
+ /** Dry Run Workflow */
3194
+ /** `POST /workflows/{definition_id}/dry-run` · aidream · auth guest · org required */
3195
+ declare function dryRunWorkflow(api: Api, args: DryRunWorkflowArgs, options?: CallOptions): Promise<DryRunWorkflowResult>;
3196
+ type GetNodeInputFormArgs = {
3197
+ path: {
3198
+ definition_id: string;
3199
+ node_id: string;
3200
+ };
3201
+ };
3202
+ type GetNodeInputFormResult = NodeInputFormResponse;
3203
+ /** Get Node Input Form */
3204
+ /** `GET /workflows/{definition_id}/nodes/{node_id}/input-form` · aidream · auth guest · org optional */
3205
+ declare function getNodeInputForm(api: Api, args: GetNodeInputFormArgs, options?: CallOptions): Promise<GetNodeInputFormResult>;
3206
+ type GetNodeAgentContextArgs = {
3207
+ path: {
3208
+ definition_id: string;
3209
+ node_id: string;
3210
+ };
3211
+ query?: {
3212
+ conversation_id?: string | null;
3213
+ new_conversation?: boolean;
3214
+ wizard?: "run_agent" | null;
3215
+ wizard_step?: ("agent" | "variables") | null;
3216
+ };
3217
+ };
3218
+ type GetNodeAgentContextResult = NodeAgentChatContext;
3219
+ /** Get Node Agent Context */
3220
+ /** `GET /workflows/{definition_id}/nodes/{node_id}/agent-context` · aidream · auth guest · org required */
3221
+ declare function getNodeAgentContext(api: Api, args: GetNodeAgentContextArgs, options?: CallOptions): Promise<GetNodeAgentContextResult>;
3222
+ type GetConductorContextArgs = {
3223
+ path: {
3224
+ definition_id: string;
3225
+ };
3226
+ query?: {
3227
+ selected_node_id?: string | null;
3228
+ conversation_id?: string | null;
3229
+ new_conversation?: boolean;
3230
+ };
3231
+ };
3232
+ type GetConductorContextResult = ConductorChatContext;
3233
+ /** Get Conductor Context */
3234
+ /** `GET /workflows/{definition_id}/conductor-context` · aidream · auth guest · org required */
3235
+ declare function getConductorContext(api: Api, args: GetConductorContextArgs, options?: CallOptions): Promise<GetConductorContextResult>;
3236
+ type GetDefinitionNodeInputStatusArgs = {
3237
+ path: {
3238
+ definition_id: string;
3239
+ node_id: string;
3240
+ };
3241
+ };
3242
+ type GetDefinitionNodeInputStatusResult = NodeInputStatusResponse;
3243
+ /** Get Definition Node Input Status */
3244
+ /** `GET /workflows/{definition_id}/nodes/{node_id}/input-status` · aidream · auth guest · org optional */
3245
+ declare function getDefinitionNodeInputStatus(api: Api, args: GetDefinitionNodeInputStatusArgs, options?: CallOptions): Promise<GetDefinitionNodeInputStatusResult>;
3246
+ type GetRunNodeInputStatusArgs = {
3247
+ path: {
3248
+ run_id: string;
3249
+ node_id: string;
3250
+ };
3251
+ };
3252
+ type GetRunNodeInputStatusResult = NodeInputStatusResponse;
3253
+ /** Get Run Node Input Status */
3254
+ /** `GET /runs/{run_id}/nodes/{node_id}/input-status` · aidream · auth guest · org optional */
3255
+ declare function getRunNodeInputStatus(api: Api, args: GetRunNodeInputStatusArgs, options?: CallOptions): Promise<GetRunNodeInputStatusResult>;
3256
+ type StartStepRunArgs = {
3257
+ path: {
3258
+ definition_id: string;
3259
+ };
3260
+ body: RunWorkflowRequest;
3261
+ };
3262
+ type StartStepRunResult = StartStepRunResponse;
3263
+ /** Start Step Run */
3264
+ /** `POST /workflows/{definition_id}/step-runs` · aidream · auth guest · org required */
3265
+ declare function startStepRun(api: Api, args: StartStepRunArgs, options?: CallOptions): Promise<StartStepRunResult>;
3266
+ type ExecuteNodeArgs = {
3267
+ path: {
3268
+ run_id: string;
3269
+ node_id: string;
3270
+ };
3271
+ body?: ExecuteNodeRequest | null;
3272
+ };
3273
+ type ExecuteNodeResult = unknown;
3274
+ /** Execute Node */
3275
+ /** `POST /runs/{run_id}/nodes/{node_id}/execute` · aidream · auth guest · org required */
3276
+ declare function executeNode(api: Api, args: ExecuteNodeArgs, options?: CallOptions): Promise<ExecuteNodeResult>;
3277
+ type UnarchiveWorkflowArgs = {
3278
+ path: {
3279
+ definition_id: string;
3280
+ };
3281
+ };
3282
+ type UnarchiveWorkflowResult = UnarchiveWorkflowResponse;
3283
+ /** Unarchive Workflow */
3284
+ /** `POST /workflows/{definition_id}/unarchive` · aidream · auth guest · org required */
3285
+ declare function unarchiveWorkflow(api: Api, args: UnarchiveWorkflowArgs, options?: CallOptions): Promise<UnarchiveWorkflowResult>;
3286
+ type BulkArchiveWorkflowsArgs = {
3287
+ body: BulkIdsRequest;
3288
+ };
3289
+ type BulkArchiveWorkflowsResult = BulkOpResponse;
3290
+ /** Bulk Archive Workflows */
3291
+ /** `POST /workflows/bulk-archive` · aidream · auth guest · org required */
3292
+ declare function bulkArchiveWorkflows(api: Api, args: BulkArchiveWorkflowsArgs, options?: CallOptions): Promise<BulkArchiveWorkflowsResult>;
3293
+ type BulkCancelRunsArgs = {
3294
+ body: BulkIdsRequest;
3295
+ };
3296
+ type BulkCancelRunsResult = BulkOpResponse;
3297
+ /** Bulk Cancel Runs */
3298
+ /** `POST /runs/bulk-cancel` · aidream · auth guest · org required */
3299
+ declare function bulkCancelRuns(api: Api, args: BulkCancelRunsArgs, options?: CallOptions): Promise<BulkCancelRunsResult>;
3300
+ type BulkRetryErroredRunsArgs = {
3301
+ body: BulkIdsRequest;
3302
+ };
3303
+ type BulkRetryErroredRunsResult = BulkOpResponse;
3304
+ /** Bulk Retry Errored Runs */
3305
+ /** `POST /runs/bulk-retry-errored` · aidream · auth guest · org required */
3306
+ declare function bulkRetryErroredRuns(api: Api, args: BulkRetryErroredRunsArgs, options?: CallOptions): Promise<BulkRetryErroredRunsResult>;
3307
+ type GetRunFormArgs = {
3308
+ path: {
3309
+ definition_id: string;
3310
+ };
3311
+ query?: {
3312
+ version_number?: number | null;
3313
+ };
3314
+ };
3315
+ type GetRunFormResult = RunFormSchema;
3316
+ /** Get Run Form */
3317
+ /** `GET /workflows/{definition_id}/run-form` · aidream · auth guest · org optional */
3318
+ declare function getRunForm(api: Api, args: GetRunFormArgs, options?: CallOptions): Promise<GetRunFormResult>;
3319
+ type GetResultSchemaArgs = {
3320
+ path: {
3321
+ definition_id: string;
3322
+ };
3323
+ query?: {
3324
+ version_number?: number | null;
3325
+ };
3326
+ };
3327
+ type GetResultSchemaResult = RunResultSchema;
3328
+ /** Get Result Schema */
3329
+ /** `GET /workflows/{definition_id}/result-schema` · aidream · auth guest · org optional */
3330
+ declare function getResultSchema(api: Api, args: GetResultSchemaArgs, options?: CallOptions): Promise<GetResultSchemaResult>;
3331
+ type ListRunsForWorkflowArgs = {
3332
+ path: {
3333
+ definition_id: string;
3334
+ };
3335
+ query?: {
3336
+ limit?: number;
3337
+ offset?: number;
3338
+ };
3339
+ };
3340
+ type ListRunsForWorkflowResult = RunRecord[];
3341
+ /** List Runs For Workflow */
3342
+ /** `GET /workflows/{definition_id}/runs` · aidream · auth guest · org optional */
3343
+ declare function listRunsForWorkflow(api: Api, args: ListRunsForWorkflowArgs, options?: CallOptions): Promise<ListRunsForWorkflowResult>;
3344
+ type StartWorkflowRunArgs = {
3345
+ path: {
3346
+ definition_id: string;
3347
+ };
3348
+ body: RunWorkflowRequest;
3349
+ };
3350
+ type StartWorkflowRunResult = IdempotentDuplicateRunResponse | AwaitingInputRunResponse | StartQueuedRunResponse;
3351
+ /** Start Workflow Run */
3352
+ /** `POST /workflows/{definition_id}/runs` · aidream · auth guest · org required · ndjson */
3353
+ declare function startWorkflowRun(api: Api, args: StartWorkflowRunArgs, options?: CallOptions): Promise<ApiStream<NdjsonEvent>>;
3354
+ type ResumeWorkflowRunArgs = {
3355
+ path: {
3356
+ run_id: string;
3357
+ };
3358
+ body: ResumeRunRequest;
3359
+ };
3360
+ type ResumeWorkflowRunResult = AwaitingInputRunResponse | HeldStepRefusedResponse | ResumeQueuedRunResponse;
3361
+ /** Resume Workflow Run */
3362
+ /** `POST /runs/{run_id}/resume` · aidream · auth guest · org required · ndjson */
3363
+ declare function resumeWorkflowRun(api: Api, args: ResumeWorkflowRunArgs, options?: CallOptions): Promise<ApiStream<NdjsonEvent>>;
3364
+ type ListRunsArgs = {
3365
+ query?: {
3366
+ status?: string | null;
3367
+ limit?: number;
3368
+ offset?: number;
3369
+ scope?: "mine" | "organization";
3370
+ include_children?: boolean;
3371
+ organization_id?: string | null;
3372
+ };
3373
+ };
3374
+ type ListRunsResult = RunRecord[];
3375
+ /** List Runs */
3376
+ /** `GET /runs` · aidream · auth guest · org optional */
3377
+ declare function listRuns(api: Api, args?: ListRunsArgs, options?: CallOptions): Promise<ListRunsResult>;
3378
+ type StreamRunAnnouncementsArgs = {
3379
+ [key: string]: never;
3380
+ };
3381
+ type StreamRunAnnouncementsResult = unknown;
3382
+ /** Stream Run Announcements */
3383
+ /** `GET /runs/stream` · aidream · auth guest · org optional · sse */
3384
+ declare function streamRunAnnouncements(api: Api, args?: StreamRunAnnouncementsArgs, options?: CallOptions): Promise<ApiStream<SseEvent>>;
3385
+ type ListWaitingRunsEndpointArgs = {
3386
+ query?: {
3387
+ limit?: number;
3388
+ offset?: number;
3389
+ };
3390
+ };
3391
+ type ListWaitingRunsEndpointResult = WaitingRunsResponse;
3392
+ /** List Waiting Runs Endpoint */
3393
+ /** `GET /runs/waiting` · aidream · auth guest · org optional */
3394
+ declare function listWaitingRunsEndpoint(api: Api, args?: ListWaitingRunsEndpointArgs, options?: CallOptions): Promise<ListWaitingRunsEndpointResult>;
3395
+ type GetRunArgs = {
3396
+ path: {
3397
+ run_id: string;
3398
+ };
3399
+ };
3400
+ type GetRunResult = RunRecord;
3401
+ /** Get Run */
3402
+ /** `GET /runs/{run_id}` · aidream · auth guest · org optional */
3403
+ declare function getRun(api: Api, args: GetRunArgs, options?: CallOptions): Promise<GetRunResult>;
3404
+ type CancelRunArgs = {
3405
+ path: {
3406
+ run_id: string;
3407
+ };
3408
+ query?: {
3409
+ mode?: "graceful" | "immediate";
3410
+ };
3411
+ };
3412
+ type CancelRunResult = aidream__api__routers__workflow__CancelRunResponse;
3413
+ /** Cancel Run */
3414
+ /** `POST /runs/{run_id}/cancel` · aidream · auth guest · org required */
3415
+ declare function cancelRun(api: Api, args: CancelRunArgs, options?: CallOptions): Promise<CancelRunResult>;
3416
+ type PauseRunArgs = {
3417
+ path: {
3418
+ run_id: string;
3419
+ };
3420
+ };
3421
+ type PauseRunResult = PauseRunResponse;
3422
+ /** Pause Run */
3423
+ /** `POST /runs/{run_id}/pause` · aidream · auth guest · org required */
3424
+ declare function pauseRun(api: Api, args: PauseRunArgs, options?: CallOptions): Promise<PauseRunResult>;
3425
+ type ResumePausedRunArgs = {
3426
+ path: {
3427
+ run_id: string;
3428
+ };
3429
+ body?: ResumeRunRequest | null;
3430
+ };
3431
+ type ResumePausedRunResult = unknown;
3432
+ /** Resume Paused Run */
3433
+ /** `POST /runs/{run_id}/resume-paused` · aidream · auth guest · org required · ndjson */
3434
+ declare function resumePausedRun(api: Api, args: ResumePausedRunArgs, options?: CallOptions): Promise<ApiStream<NdjsonEvent>>;
3435
+ type InjectRunArgs = {
3436
+ path: {
3437
+ run_id: string;
3438
+ };
3439
+ body: InjectRunRequest;
3440
+ };
3441
+ type InjectRunResult = unknown;
3442
+ /** Inject Run */
3443
+ /** `POST /runs/{run_id}/inject` · aidream · auth guest · org required */
3444
+ declare function injectRun(api: Api, args: InjectRunArgs, options?: CallOptions): Promise<InjectRunResult>;
3445
+ type ForceFailRunArgs = {
3446
+ path: {
3447
+ run_id: string;
3448
+ };
3449
+ };
3450
+ type ForceFailRunResult = ForceFailRunResponse;
3451
+ /** Force Fail Run */
3452
+ /** `POST /runs/{run_id}/force-fail` · aidream · auth guest · org required */
3453
+ declare function forceFailRun(api: Api, args: ForceFailRunArgs, options?: CallOptions): Promise<ForceFailRunResult>;
3454
+ type ListRunCheckpointsArgs = {
3455
+ path: {
3456
+ run_id: string;
3457
+ };
3458
+ };
3459
+ type ListRunCheckpointsResult = CheckpointRecord[];
3460
+ /** List Run Checkpoints */
3461
+ /** `GET /runs/{run_id}/checkpoints` · aidream · auth guest · org optional */
3462
+ declare function listRunCheckpoints(api: Api, args: ListRunCheckpointsArgs, options?: CallOptions): Promise<ListRunCheckpointsResult>;
3463
+ type GetCheckpointPreviewArgs = {
3464
+ path: {
3465
+ run_id: string;
3466
+ checkpoint_id: string;
3467
+ };
3468
+ };
3469
+ type GetCheckpointPreviewResult = CheckpointPreview;
3470
+ /** Get Checkpoint Preview */
3471
+ /** `GET /runs/{run_id}/checkpoints/{checkpoint_id}/preview` · aidream · auth guest · org optional */
3472
+ declare function getCheckpointPreview(api: Api, args: GetCheckpointPreviewArgs, options?: CallOptions): Promise<GetCheckpointPreviewResult>;
3473
+ type RetryNodeArgs = {
3474
+ path: {
3475
+ run_id: string;
3476
+ node_id: string;
3477
+ };
3478
+ body?: RetryNodeRequest | null;
3479
+ };
3480
+ type RetryNodeResult = unknown;
3481
+ /** Retry Node */
3482
+ /** `POST /runs/{run_id}/nodes/{node_id}/retry` · aidream · auth guest · org required */
3483
+ declare function retryNode(api: Api, args: RetryNodeArgs, options?: CallOptions): Promise<RetryNodeResult>;
3484
+ type SkipNodeArgs = {
3485
+ path: {
3486
+ run_id: string;
3487
+ node_id: string;
3488
+ };
3489
+ body?: SkipNodeRequest | null;
3490
+ };
3491
+ type SkipNodeResult = unknown;
3492
+ /** Skip Node */
3493
+ /** `POST /runs/{run_id}/nodes/{node_id}/skip` · aidream · auth guest · org required */
3494
+ declare function skipNode(api: Api, args: SkipNodeArgs, options?: CallOptions): Promise<SkipNodeResult>;
3495
+ type ManualResultNodeArgs = {
3496
+ path: {
3497
+ run_id: string;
3498
+ node_id: string;
3499
+ };
3500
+ body: ManualResultRequest;
3501
+ };
3502
+ type ManualResultNodeResult = unknown;
3503
+ /** Manual Result Node */
3504
+ /** `POST /runs/{run_id}/nodes/{node_id}/manual-result` · aidream · auth guest · org required */
3505
+ declare function manualResultNode(api: Api, args: ManualResultNodeArgs, options?: CallOptions): Promise<ManualResultNodeResult>;
3506
+ type ResumeErroredRunArgs = {
3507
+ path: {
3508
+ run_id: string;
3509
+ };
3510
+ };
3511
+ type ResumeErroredRunResult = unknown;
3512
+ /** Resume Errored Run */
3513
+ /** `POST /runs/{run_id}/resume-errored` · aidream · auth guest · org required */
3514
+ declare function resumeErroredRun(api: Api, args: ResumeErroredRunArgs, options?: CallOptions): Promise<ResumeErroredRunResult>;
3515
+ type RerunFromNodeArgs = {
3516
+ path: {
3517
+ run_id: string;
3518
+ node_id: string;
3519
+ };
3520
+ body?: RerunFromRequest | null;
3521
+ };
3522
+ type RerunFromNodeResult = unknown;
3523
+ /** Rerun From Node */
3524
+ /** `POST /runs/{run_id}/nodes/{node_id}/rerun-from` · aidream · auth guest · org required */
3525
+ declare function rerunFromNode(api: Api, args: RerunFromNodeArgs, options?: CallOptions): Promise<RerunFromNodeResult>;
3526
+ type ForkFromNodeArgs = {
3527
+ path: {
3528
+ run_id: string;
3529
+ node_id: string;
3530
+ };
3531
+ body?: ForkFromRequest | null;
3532
+ };
3533
+ type ForkFromNodeResult = unknown;
3534
+ /** Fork From Node */
3535
+ /** `POST /runs/{run_id}/nodes/{node_id}/fork-from` · aidream · auth guest · org required */
3536
+ declare function forkFromNode(api: Api, args: ForkFromNodeArgs, options?: CallOptions): Promise<ForkFromNodeResult>;
3537
+ type StreamRunEventsArgs = {
3538
+ path: {
3539
+ run_id: string;
3540
+ };
3541
+ };
3542
+ type StreamRunEventsResult = unknown;
3543
+ /** Stream Run Events */
3544
+ /** `GET /runs/{run_id}/events/stream` · aidream · auth guest · org optional */
3545
+ declare function streamRunEvents(api: Api, args: StreamRunEventsArgs, options?: CallOptions): Promise<StreamRunEventsResult>;
3546
+ type StreamRunDebugArgs = {
3547
+ path: {
3548
+ run_id: string;
3549
+ };
3550
+ query?: {
3551
+ node_id?: string | null;
3552
+ };
3553
+ };
3554
+ type StreamRunDebugResult = unknown;
3555
+ /** Stream Run Debug */
3556
+ /** `GET /runs/{run_id}/stream/debug` · aidream · auth guest · org optional · sse */
3557
+ declare function streamRunDebug(api: Api, args: StreamRunDebugArgs, options?: CallOptions): Promise<ApiStream<SseEvent>>;
3558
+ type ListRunEventsArgs = {
3559
+ path: {
3560
+ run_id: string;
3561
+ };
3562
+ query?: {
3563
+ limit?: number | null;
3564
+ after_event_ts?: string | null;
3565
+ event_type?: string[] | null;
3566
+ after_seq?: number | null;
3567
+ };
3568
+ };
3569
+ type ListRunEventsResult = RunEventRecord[];
3570
+ /** List Run Events */
3571
+ /** `GET /runs/{run_id}/events` · aidream · auth guest · org optional */
3572
+ declare function listRunEvents(api: Api, args: ListRunEventsArgs, options?: CallOptions): Promise<ListRunEventsResult>;
3573
+ type GetRunCostArgs = {
3574
+ path: {
3575
+ run_id: string;
3576
+ };
3577
+ };
3578
+ type GetRunCostResult = RunCostSummary;
3579
+ /** Get Run Cost */
3580
+ /** `GET /runs/{run_id}/cost` · aidream · auth guest · org optional */
3581
+ declare function getRunCost(api: Api, args: GetRunCostArgs, options?: CallOptions): Promise<GetRunCostResult>;
3582
+ type GetWorkflowCostRollupArgs = {
3583
+ path: {
3584
+ definition_id: string;
3585
+ };
3586
+ query?: {
3587
+ range?: number;
3588
+ };
3589
+ };
3590
+ type GetWorkflowCostRollupResult = WorkflowCostRollup;
3591
+ /** Get Workflow Cost Rollup */
3592
+ /** `GET /workflows/{definition_id}/cost-rollup` · aidream · auth guest · org optional */
3593
+ declare function getWorkflowCostRollup(api: Api, args: GetWorkflowCostRollupArgs, options?: CallOptions): Promise<GetWorkflowCostRollupResult>;
3594
+ type TestSpawnDetachedArgs = {
3595
+ [key: string]: never;
3596
+ };
3597
+ type TestSpawnDetachedResult = DiagSpawnDetachedResponse;
3598
+ /** Test Spawn Detached */
3599
+ /** `POST /_test/spawn-detached` · aidream · auth guest · org required */
3600
+ declare function testSpawnDetached(api: Api, args?: TestSpawnDetachedArgs, options?: CallOptions): Promise<TestSpawnDetachedResult>;
3601
+ type ListTriggersArgs = {
3602
+ query?: {
3603
+ definition_id?: string | null;
3604
+ kind?: ("cron" | "webhook" | "manual" | "event") | null;
3605
+ limit?: number;
3606
+ offset?: number;
3607
+ };
3608
+ };
3609
+ type ListTriggersResult = TriggerRecord[];
3610
+ /** List Triggers */
3611
+ /** `GET /triggers` · aidream · auth guest · org optional */
3612
+ declare function listTriggers(api: Api, args?: ListTriggersArgs, options?: CallOptions): Promise<ListTriggersResult>;
3613
+ type CreateTriggerArgs = {
3614
+ body: CreateTriggerRequest;
3615
+ };
3616
+ type CreateTriggerResult = TriggerRecord;
3617
+ /** Create Trigger */
3618
+ /** `POST /triggers` · aidream · auth guest · org required */
3619
+ declare function createTrigger(api: Api, args: CreateTriggerArgs, options?: CallOptions): Promise<CreateTriggerResult>;
3620
+ type GetTriggerArgs = {
3621
+ path: {
3622
+ trigger_id: string;
3623
+ };
3624
+ };
3625
+ type GetTriggerResult = TriggerRecord;
3626
+ /** Get Trigger */
3627
+ /** `GET /triggers/{trigger_id}` · aidream · auth guest · org optional */
3628
+ declare function getTrigger(api: Api, args: GetTriggerArgs, options?: CallOptions): Promise<GetTriggerResult>;
3629
+ type UpdateTriggerArgs = {
3630
+ path: {
3631
+ trigger_id: string;
3632
+ };
3633
+ body: UpdateTriggerActiveRequest;
3634
+ };
3635
+ type UpdateTriggerResult = UpdateTriggerActiveResponse;
3636
+ /** Update Trigger */
3637
+ /** `PATCH /triggers/{trigger_id}` · aidream · auth guest · org required */
3638
+ declare function updateTrigger(api: Api, args: UpdateTriggerArgs, options?: CallOptions): Promise<UpdateTriggerResult>;
3639
+ type DeleteTriggerArgs = {
3640
+ path: {
3641
+ trigger_id: string;
3642
+ };
3643
+ };
3644
+ type DeleteTriggerResult = DeleteTriggerResponse;
3645
+ /** Delete Trigger */
3646
+ /** `DELETE /triggers/{trigger_id}` · aidream · auth guest · org required */
3647
+ declare function deleteTrigger(api: Api, args: DeleteTriggerArgs, options?: CallOptions): Promise<DeleteTriggerResult>;
3648
+ type FireTriggerArgs = {
3649
+ path: {
3650
+ trigger_id: string;
3651
+ };
3652
+ body?: FireTriggerRequest | null;
3653
+ };
3654
+ type FireTriggerResult = FireResponse;
3655
+ /** Fire Trigger */
3656
+ /** `POST /triggers/{trigger_id}/fire` · aidream · auth guest · org required */
3657
+ declare function fireTrigger(api: Api, args: FireTriggerArgs, options?: CallOptions): Promise<FireTriggerResult>;
3658
+ type ListTriggerFiresArgs = {
3659
+ path: {
3660
+ trigger_id: string;
3661
+ };
3662
+ query?: {
3663
+ limit?: number;
3664
+ };
3665
+ };
3666
+ type ListTriggerFiresResult = TriggerFireRecord[];
3667
+ /** List Trigger Fires */
3668
+ /** `GET /triggers/{trigger_id}/fires` · aidream · auth guest · org optional */
3669
+ declare function listTriggerFires(api: Api, args: ListTriggerFiresArgs, options?: CallOptions): Promise<ListTriggerFiresResult>;
3670
+ type ListTriggerEventsArgs = {
3671
+ path: {
3672
+ trigger_id: string;
3673
+ };
3674
+ query?: {
3675
+ limit?: number;
3676
+ };
3677
+ };
3678
+ type ListTriggerEventsResult = TriggerEventRecord[];
3679
+ /** List Trigger Events */
3680
+ /** `GET /triggers/{trigger_id}/events` · aidream · auth guest · org optional */
3681
+ declare function listTriggerEvents(api: Api, args: ListTriggerEventsArgs, options?: CallOptions): Promise<ListTriggerEventsResult>;
3682
+ type CreateBuilderWorkflowArgs = {
3683
+ body: CreateBuilderWorkflowRequest;
3684
+ };
3685
+ type CreateBuilderWorkflowResult = BuilderSpecView;
3686
+ /** Create Builder Workflow */
3687
+ /** `POST /workflow-builder/workflows` · aidream · auth guest · org required */
3688
+ declare function createBuilderWorkflow(api: Api, args: CreateBuilderWorkflowArgs, options?: CallOptions): Promise<CreateBuilderWorkflowResult>;
3689
+ type ReadBuilderWorkflowArgs = {
3690
+ path: {
3691
+ workflow_id: string;
3692
+ };
3693
+ };
3694
+ type ReadBuilderWorkflowResult = BuilderSpecView;
3695
+ /** Read Builder Workflow */
3696
+ /** `GET /workflow-builder/workflows/{workflow_id}` · aidream · auth guest · org optional */
3697
+ declare function readBuilderWorkflow(api: Api, args: ReadBuilderWorkflowArgs, options?: CallOptions): Promise<ReadBuilderWorkflowResult>;
3698
+ type SaveBuilderWorkflowArgs = {
3699
+ path: {
3700
+ workflow_id: string;
3701
+ };
3702
+ body: SaveBuilderWorkflowRequest;
3703
+ };
3704
+ type SaveBuilderWorkflowResult = BuilderSpecView;
3705
+ /** Save Builder Workflow */
3706
+ /** `PUT /workflow-builder/workflows/{workflow_id}` · aidream · auth guest · org required */
3707
+ declare function saveBuilderWorkflow(api: Api, args: SaveBuilderWorkflowArgs, options?: CallOptions): Promise<SaveBuilderWorkflowResult>;
3708
+ type PublishBuilderWorkflowArgs = {
3709
+ path: {
3710
+ workflow_id: string;
3711
+ };
3712
+ body?: PublishBuilderRequest | null;
3713
+ };
3714
+ type PublishBuilderWorkflowResult = PublishedBuilder;
3715
+ /** Publish Builder Workflow */
3716
+ /** `POST /workflow-builder/workflows/{workflow_id}/publish` · aidream · auth guest · org required */
3717
+ declare function publishBuilderWorkflow(api: Api, args: PublishBuilderWorkflowArgs, options?: CallOptions): Promise<PublishBuilderWorkflowResult>;
3718
+ type TurnBuilderWorkflowOnArgs = {
3719
+ path: {
3720
+ workflow_id: string;
3721
+ };
3722
+ body: TurnOnRequest;
3723
+ };
3724
+ type TurnBuilderWorkflowOnResult = OnOff;
3725
+ /** Turn Builder Workflow On */
3726
+ /** `POST /workflow-builder/workflows/{workflow_id}/on` · aidream · auth guest · org required */
3727
+ declare function turnBuilderWorkflowOn(api: Api, args: TurnBuilderWorkflowOnArgs, options?: CallOptions): Promise<TurnBuilderWorkflowOnResult>;
3728
+ type TurnBuilderWorkflowOffArgs = {
3729
+ path: {
3730
+ workflow_id: string;
3731
+ };
3732
+ };
3733
+ type TurnBuilderWorkflowOffResult = OnOff;
3734
+ /** Turn Builder Workflow Off */
3735
+ /** `POST /workflow-builder/workflows/{workflow_id}/off` · aidream · auth guest · org required */
3736
+ declare function turnBuilderWorkflowOff(api: Api, args: TurnBuilderWorkflowOffArgs, options?: CallOptions): Promise<TurnBuilderWorkflowOffResult>;
3737
+ type TestBuilderWorkflowWithARecordArgs = {
3738
+ path: {
3739
+ workflow_id: string;
3740
+ };
3741
+ body: TestWithRecordRequest;
3742
+ };
3743
+ type TestBuilderWorkflowWithARecordResult = FireResponse;
3744
+ /** Test Builder Workflow With A Record */
3745
+ /** `POST /workflow-builder/workflows/{workflow_id}/test` · aidream · auth guest · org required */
3746
+ declare function testBuilderWorkflowWithARecord(api: Api, args: TestBuilderWorkflowWithARecordArgs, options?: CallOptions): Promise<TestBuilderWorkflowWithARecordResult>;
3747
+ type ListBuilderRunsArgs = {
3748
+ path: {
3749
+ workflow_id: string;
3750
+ };
3751
+ query?: {
3752
+ limit?: number;
3753
+ };
3754
+ };
3755
+ type ListBuilderRunsResult = BuilderRuns;
3756
+ /** List Builder Runs */
3757
+ /** `GET /workflow-builder/workflows/{workflow_id}/runs` · aidream · auth guest · org optional */
3758
+ declare function listBuilderRuns(api: Api, args: ListBuilderRunsArgs, options?: CallOptions): Promise<ListBuilderRunsResult>;
3759
+ type ListRunsOnRecordArgs = {
3760
+ path: {
3761
+ record_id: string;
3762
+ };
3763
+ query: {
3764
+ organization_id: string;
3765
+ limit?: number;
3766
+ };
3767
+ };
3768
+ type ListRunsOnRecordResult = BuilderRuns;
3769
+ /** List Runs On Record */
3770
+ /** `GET /workflow-builder/records/{record_id}/runs` · aidream · auth guest · org optional */
3771
+ declare function listRunsOnRecord(api: Api, args: ListRunsOnRecordArgs, options?: CallOptions): Promise<ListRunsOnRecordResult>;
3772
+ type ListTableWorkflowsArgs = {
3773
+ path: {
3774
+ table_id: string;
3775
+ };
3776
+ query: {
3777
+ organization_id: string;
3778
+ };
3779
+ };
3780
+ type ListTableWorkflowsResult = TableWorkflows;
3781
+ /** List Table Workflows */
3782
+ /** `GET /workflow-builder/tables/{table_id}/workflows` · aidream · auth guest · org optional */
3783
+ declare function listTableWorkflows(api: Api, args: ListTableWorkflowsArgs, options?: CallOptions): Promise<ListTableWorkflowsResult>;
3784
+ type ListPlansArgs = {
3785
+ path: {
3786
+ definition_id: string;
3787
+ };
3788
+ };
3789
+ type ListPlansResult = PlanListResponse;
3790
+ /** List Plans */
3791
+ /** `GET /workflows/{definition_id}/plans` · aidream · auth guest · org optional */
3792
+ declare function listPlans(api: Api, args: ListPlansArgs, options?: CallOptions): Promise<ListPlansResult>;
3793
+ type CreatePlanArgs = {
3794
+ path: {
3795
+ definition_id: string;
3796
+ };
3797
+ body: CreatePlanRequest;
3798
+ };
3799
+ type CreatePlanResult = PlanRecord;
3800
+ /** Create Plan */
3801
+ /** `POST /workflows/{definition_id}/plans` · aidream · auth guest · org required */
3802
+ declare function createPlan(api: Api, args: CreatePlanArgs, options?: CallOptions): Promise<CreatePlanResult>;
3803
+ type PlanBlockersArgs = {
3804
+ path: {
3805
+ definition_id: string;
3806
+ };
3807
+ };
3808
+ type PlanBlockersResult = PlanBlockersResponse;
3809
+ /** Plan Blockers */
3810
+ /** `GET /workflows/{definition_id}/plan-blockers` · aidream · auth guest · org optional */
3811
+ declare function planBlockers(api: Api, args: PlanBlockersArgs, options?: CallOptions): Promise<PlanBlockersResult>;
3812
+ type GetPlanArgs = {
3813
+ path: {
3814
+ plan_id: string;
3815
+ };
3816
+ };
3817
+ type GetPlanResult = PlanFullResponse;
3818
+ /** Get Plan */
3819
+ /** `GET /plans/{plan_id}` · aidream · auth guest · org optional */
3820
+ declare function getPlan(api: Api, args: GetPlanArgs, options?: CallOptions): Promise<GetPlanResult>;
3821
+ type UpdatePlanArgs = {
3822
+ path: {
3823
+ plan_id: string;
3824
+ };
3825
+ body: UpdatePlanRequest;
3826
+ };
3827
+ type UpdatePlanResult = PlanRecord;
3828
+ /** Update Plan */
3829
+ /** `PATCH /plans/{plan_id}` · aidream · auth guest · org required */
3830
+ declare function updatePlan(api: Api, args: UpdatePlanArgs, options?: CallOptions): Promise<UpdatePlanResult>;
3831
+ type SetShapeArgs = {
3832
+ path: {
3833
+ plan_id: string;
3834
+ };
3835
+ body: SetShapeRequest;
3836
+ };
3837
+ type SetShapeResult = PlanRecord;
3838
+ /** Set Shape */
3839
+ /** `PUT /plans/{plan_id}/shape` · aidream · auth guest · org required */
3840
+ declare function setShape(api: Api, args: SetShapeArgs, options?: CallOptions): Promise<SetShapeResult>;
3841
+ type SetSampleArgs = {
3842
+ path: {
3843
+ plan_id: string;
3844
+ };
3845
+ body: SetSampleRequest;
3846
+ };
3847
+ type SetSampleResult = PlanSampleRecord;
3848
+ /** Set Sample */
3849
+ /** `PUT /plans/{plan_id}/sample` · aidream · auth guest · org required */
3850
+ declare function setSample(api: Api, args: SetSampleArgs, options?: CallOptions): Promise<SetSampleResult>;
3851
+ type SplitPlanArgs = {
3852
+ path: {
3853
+ plan_id: string;
3854
+ };
3855
+ body: SplitPlanRequest;
3856
+ };
3857
+ type SplitPlanResult = SplitPlanResponse;
3858
+ /** Split Plan */
3859
+ /** `POST /plans/{plan_id}/split` · aidream · auth guest · org required */
3860
+ declare function splitPlan(api: Api, args: SplitPlanArgs, options?: CallOptions): Promise<SplitPlanResult>;
3861
+ type MergePlanArgs = {
3862
+ path: {
3863
+ plan_id: string;
3864
+ };
3865
+ body: MergePlanRequest;
3866
+ };
3867
+ type MergePlanResult = PlanRecord;
3868
+ /** Merge Plan */
3869
+ /** `POST /plans/{plan_id}/merge` · aidream · auth guest · org required */
3870
+ declare function mergePlan(api: Api, args: MergePlanArgs, options?: CallOptions): Promise<MergePlanResult>;
3871
+ type SetInternalGraphArgs = {
3872
+ path: {
3873
+ plan_id: string;
3874
+ };
3875
+ body: InternalGraphRequest;
3876
+ };
3877
+ type SetInternalGraphResult = PlanRecord;
3878
+ /** Set Internal Graph */
3879
+ /** `POST /plans/{plan_id}/internal` · aidream · auth guest · org required */
3880
+ declare function setInternalGraph(api: Api, args: SetInternalGraphArgs, options?: CallOptions): Promise<SetInternalGraphResult>;
3881
+ type PromotePlanArgs = {
3882
+ path: {
3883
+ plan_id: string;
3884
+ };
3885
+ };
3886
+ type PromotePlanResult = PromotePlanResponse;
3887
+ /** Promote Plan */
3888
+ /** `POST /plans/{plan_id}/promote` · aidream · auth guest · org required */
3889
+ declare function promotePlan(api: Api, args: PromotePlanArgs, options?: CallOptions): Promise<PromotePlanResult>;
3890
+ type ResolvePlanArgs = {
3891
+ path: {
3892
+ plan_id: string;
3893
+ };
3894
+ body: ResolvePlanRequest;
3895
+ };
3896
+ type ResolvePlanResult = PlanRecord;
3897
+ /** Resolve Plan */
3898
+ /** `POST /plans/{plan_id}/resolve` · aidream · auth guest · org required */
3899
+ declare function resolvePlan(api: Api, args: ResolvePlanArgs, options?: CallOptions): Promise<ResolvePlanResult>;
3900
+ type EmitFromPlanArgs = {
3901
+ path: {
3902
+ plan_id: string;
3903
+ };
3904
+ body: EmitFromPlanRequest;
3905
+ };
3906
+ type EmitFromPlanResult = EmitFromPlanResponse;
3907
+ /** Emit From Plan */
3908
+ /** `POST /plans/{plan_id}/emit` · aidream · auth guest · org required */
3909
+ declare function emitFromPlan(api: Api, args: EmitFromPlanArgs, options?: CallOptions): Promise<EmitFromPlanResult>;
3910
+ type SettlePlanArgs = {
3911
+ path: {
3912
+ plan_id: string;
3913
+ };
3914
+ body: SettlePlanRequest;
3915
+ };
3916
+ type SettlePlanResult = SettlePlanResponse;
3917
+ /** Settle Plan */
3918
+ /** `POST /plans/{plan_id}/settle` · aidream · auth guest · org required */
3919
+ declare function settlePlan(api: Api, args: SettlePlanArgs, options?: CallOptions): Promise<SettlePlanResult>;
3920
+ type DissolvePlanArgs = {
3921
+ path: {
3922
+ plan_id: string;
3923
+ };
3924
+ body: DissolvePlanRequest;
3925
+ };
3926
+ type DissolvePlanResult = PlanRecord;
3927
+ /** Dissolve Plan */
3928
+ /** `POST /plans/{plan_id}/dissolve` · aidream · auth guest · org required */
3929
+ declare function dissolvePlan(api: Api, args: DissolvePlanArgs, options?: CallOptions): Promise<DissolvePlanResult>;
3930
+ type PlanAssistArgs = {
3931
+ path: {
3932
+ plan_id: string;
3933
+ };
3934
+ body: PlanAssistRequest;
3935
+ };
3936
+ type PlanAssistResult = unknown;
3937
+ /** Plan Assist */
3938
+ /** `POST /plans/{plan_id}/assist` · aidream · auth guest · org required · ndjson */
3939
+ declare function planAssist(api: Api, args: PlanAssistArgs, options?: CallOptions): Promise<ApiStream<NdjsonEvent>>;
3940
+ type SyncPlanAnchorArgs = {
3941
+ path: {
3942
+ plan_id: string;
3943
+ };
3944
+ };
3945
+ type SyncPlanAnchorResult = PlanRecord;
3946
+ /** Sync Plan Anchor */
3947
+ /** `POST /plans/{plan_id}/sync` · aidream · auth guest · org required */
3948
+ declare function syncPlanAnchor(api: Api, args: SyncPlanAnchorArgs, options?: CallOptions): Promise<SyncPlanAnchorResult>;
3949
+ type HandleRecoveryArgs = {
3950
+ body: RecoveryRequest;
3951
+ };
3952
+ type HandleRecoveryResult = RecoveryResponse;
3953
+ /** Handle Recovery */
3954
+ /** `POST /recovery/handle` · aidream · auth guest · org required */
3955
+ declare function handleRecovery(api: Api, args: HandleRecoveryArgs, options?: CallOptions): Promise<HandleRecoveryResult>;
3956
+ type MarkRecoveryAppliedEndpointArgs = {
3957
+ path: {
3958
+ audit_id: string;
3959
+ };
3960
+ body: RecoveryApplyAck;
3961
+ };
3962
+ type MarkRecoveryAppliedEndpointResult = RecoveryApplyAck;
3963
+ /** Mark Recovery Applied Endpoint */
3964
+ /** `POST /recovery/audit/{audit_id}/applied` · aidream · auth guest · org required */
3965
+ declare function markRecoveryAppliedEndpoint(api: Api, args: MarkRecoveryAppliedEndpointArgs, options?: CallOptions): Promise<MarkRecoveryAppliedEndpointResult>;
3966
+ type ApplyWorkflowPatchEndpointArgs = {
3967
+ path: {
3968
+ definition_id: string;
3969
+ };
3970
+ body: ApplyWorkflowPatchRequest;
3971
+ };
3972
+ type ApplyWorkflowPatchEndpointResult = ApplyWorkflowPatchResult;
3973
+ /** Apply Workflow Patch Endpoint */
3974
+ /** `POST /recovery/workflows/{definition_id}/apply-patch` · aidream · auth guest · org required */
3975
+ declare function applyWorkflowPatchEndpoint(api: Api, args: ApplyWorkflowPatchEndpointArgs, options?: CallOptions): Promise<ApplyWorkflowPatchEndpointResult>;
3976
+ type RunSuggestionsArgs = {
3977
+ path: {
3978
+ run_id: string;
3979
+ };
3980
+ body?: RunSuggestionsRequest | null;
3981
+ };
3982
+ type RunSuggestionsResult = unknown;
3983
+ /** Run Suggestions */
3984
+ /** `POST /runs/{run_id}/suggestions` · aidream · auth guest · org required · ndjson */
3985
+ declare function runSuggestions(api: Api, args: RunSuggestionsArgs, options?: CallOptions): Promise<ApiStream<NdjsonEvent>>;
3986
+ type GetExtractProposalArgs = {
3987
+ path: {
3988
+ definition_id: string;
3989
+ };
3990
+ query: {
3991
+ fingerprint: string;
3992
+ };
3993
+ };
3994
+ type GetExtractProposalResult = ExtractionProposal;
3995
+ /** Get Extract Proposal */
3996
+ /** `GET /workflows/{definition_id}/extract-proposal` · aidream · auth guest · org optional */
3997
+ declare function getExtractProposal(api: Api, args: GetExtractProposalArgs, options?: CallOptions): Promise<GetExtractProposalResult>;
3998
+ type ExtractWorkflowArgs = {
3999
+ path: {
4000
+ definition_id: string;
4001
+ };
4002
+ body: aidream__services__workflow_extract__materialize__ExtractRequest;
4003
+ };
4004
+ type ExtractWorkflowResult = ExtractResult;
4005
+ /** Extract Workflow */
4006
+ /** `POST /workflows/{definition_id}/extract` · aidream · auth guest · org required */
4007
+ declare function extractWorkflow(api: Api, args: ExtractWorkflowArgs, options?: CallOptions): Promise<ExtractWorkflowResult>;
4008
+ type GetKindAvailabilityArgs = {
4009
+ path: {
4010
+ definition_id: string;
4011
+ };
4012
+ query?: {
4013
+ node_id?: string | null;
4014
+ respect_order?: boolean;
4015
+ is_version?: boolean;
4016
+ version_number?: number | null;
4017
+ };
4018
+ };
4019
+ type GetKindAvailabilityResult = KindAvailabilityResponse;
4020
+ /** Get Kind Availability */
4021
+ /** `GET /workflows/{definition_id}/kind-availability` · aidream · auth guest · org optional */
4022
+ declare function getKindAvailability(api: Api, args: GetKindAvailabilityArgs, options?: CallOptions): Promise<GetKindAvailabilityResult>;
4023
+ type GetRunKindReferenceArgs = {
4024
+ path: {
4025
+ run_id: string;
4026
+ };
4027
+ query: {
4028
+ reference: string;
4029
+ };
4030
+ };
4031
+ type GetRunKindReferenceResult = ReferenceResolution;
4032
+ /** Get Run Kind Reference */
4033
+ /** `GET /runs/{run_id}/kind-reference` · aidream · auth guest · org optional */
4034
+ declare function getRunKindReference(api: Api, args: GetRunKindReferenceArgs, options?: CallOptions): Promise<GetRunKindReferenceResult>;
4035
+ type ListTemplatesArgs = {
4036
+ [key: string]: never;
4037
+ };
4038
+ type ListTemplatesResult = TemplateRecord[];
4039
+ /** List Templates */
4040
+ /** `GET /templates` · aidream · auth guest · org optional */
4041
+ declare function listTemplates(api: Api, args?: ListTemplatesArgs, options?: CallOptions): Promise<ListTemplatesResult>;
4042
+ type CloneTemplateArgs = {
4043
+ path: {
4044
+ template_id: string;
4045
+ };
4046
+ };
4047
+ type CloneTemplateResult = CloneTemplateResponse;
4048
+ /** Clone Template */
4049
+ /** `POST /templates/{template_id}/clone` · aidream · auth guest · org required */
4050
+ declare function cloneTemplate(api: Api, args: CloneTemplateArgs, options?: CallOptions): Promise<CloneTemplateResult>;
4051
+ type SaveAsTemplateArgs = {
4052
+ path: {
4053
+ definition_id: string;
4054
+ };
4055
+ body: SaveAsTemplateRequest;
4056
+ };
4057
+ type SaveAsTemplateResult = SaveAsTemplateResponse;
4058
+ /** Save As Template */
4059
+ /** `POST /workflows/{definition_id}/save-as-template` · aidream · auth guest · org required */
4060
+ declare function saveAsTemplate(api: Api, args: SaveAsTemplateArgs, options?: CallOptions): Promise<SaveAsTemplateResult>;
4061
+ type SetWorkflowShownToArgs = {
4062
+ path: {
4063
+ definition_id: string;
4064
+ };
4065
+ body: ShownToRequest;
4066
+ };
4067
+ type SetWorkflowShownToResult = ShownToResponse;
4068
+ /** Set Workflow Shown To */
4069
+ /** `PATCH /workflows/{definition_id}/shown_to` · aidream · auth guest · org required */
4070
+ declare function setWorkflowShownTo(api: Api, args: SetWorkflowShownToArgs, options?: CallOptions): Promise<SetWorkflowShownToResult>;
4071
+ type SetWorkflowShownToTransitionalArgs = {
4072
+ path: {
4073
+ definition_id: string;
4074
+ };
4075
+ body: ShownToRequest;
4076
+ };
4077
+ type SetWorkflowShownToTransitionalResult = ShownToResponse;
4078
+ /** Set Workflow Shown To Transitional */
4079
+ /** `PATCH /workflows/{definition_id}/visibility` · aidream · auth guest · org required */
4080
+ declare function setWorkflowShownToTransitional(api: Api, args: SetWorkflowShownToTransitionalArgs, options?: CallOptions): Promise<SetWorkflowShownToTransitionalResult>;
4081
+ type GetPublicWorkflowArgs = {
4082
+ path: {
4083
+ definition_id: string;
4084
+ };
4085
+ };
4086
+ type GetPublicWorkflowResult = PublicWorkflowRecord;
4087
+ /** Get Public Workflow */
4088
+ /** `GET /public/workflows/{definition_id}` · aidream · auth guest · org exempt */
4089
+ declare function getPublicWorkflow(api: Api, args: GetPublicWorkflowArgs, options?: CallOptions): Promise<GetPublicWorkflowResult>;
4090
+ type StartComparisonArgs = {
4091
+ body: ComparisonRequest;
4092
+ };
4093
+ type StartComparisonResult = unknown;
4094
+ /** Start Comparison */
4095
+ /** `POST /workflows/comparisons` · aidream · auth guest · org required · ndjson */
4096
+ declare function startComparison(api: Api, args: StartComparisonArgs, options?: CallOptions): Promise<ApiStream<NdjsonEvent>>;
4097
+ type RerunComparisonArmArgs = {
4098
+ path: {
4099
+ comparison_id: string;
4100
+ arm_index: number;
4101
+ };
4102
+ };
4103
+ type RerunComparisonArmResult = unknown;
4104
+ /** Rerun Comparison Arm */
4105
+ /** `POST /workflows/comparisons/{comparison_id}/arms/{arm_index}/rerun` · aidream · auth guest · org required · ndjson */
4106
+ declare function rerunComparisonArm(api: Api, args: RerunComparisonArmArgs, options?: CallOptions): Promise<ApiStream<NdjsonEvent>>;
4107
+ type ValidateCronArgs = {
4108
+ body: ValidateCronRequest;
4109
+ };
4110
+ type ValidateCronResult = ValidateCronResponse;
4111
+ /** Validate Cron */
4112
+ /** `POST /scheduling/validate-cron` · aidream · auth guest · org required */
4113
+ declare function validateCron(api: Api, args: ValidateCronArgs, options?: CallOptions): Promise<ValidateCronResult>;
4114
+ type ComputeNextDueAtArgs = {
4115
+ body: aidream__api__routers__scheduling__ComputeNextDueRequest;
4116
+ };
4117
+ type ComputeNextDueAtResult = ComputeNextDueResponse;
4118
+ /** Compute Next Due At */
4119
+ /** `POST /scheduling/compute-next-due-at` · aidream · auth guest · org required */
4120
+ declare function computeNextDueAt(api: Api, args: ComputeNextDueAtArgs, options?: CallOptions): Promise<ComputeNextDueAtResult>;
4121
+ type RunNowArgs = {
4122
+ path: {
4123
+ task_id: string;
4124
+ };
4125
+ };
4126
+ type RunNowResult = RunNowResponse;
4127
+ /** Run Now */
4128
+ /** `POST /scheduling/run-now/{task_id}` · aidream · auth guest · org required */
4129
+ declare function runNow(api: Api, args: RunNowArgs, options?: CallOptions): Promise<RunNowResult>;
4130
+ type ScannerStatusArgs = {
4131
+ [key: string]: never;
4132
+ };
4133
+ type ScannerStatusResult = aidream__api__routers__scheduling__ScannerStatusResponse;
4134
+ /** Scanner Status */
4135
+ /** `GET /scheduling/scanner-status` · aidream · auth guest · org exempt */
4136
+ declare function scannerStatus(api: Api, args?: ScannerStatusArgs, options?: CallOptions): Promise<ScannerStatusResult>;
4137
+ type AdminListSystemTasksArgs = {
4138
+ [key: string]: never;
4139
+ };
4140
+ type AdminListSystemTasksResult = SystemTasksResponse;
4141
+ /** Admin List System Tasks */
4142
+ /** `GET /scheduling/admin/system-tasks` · aidream · auth guest · org exempt */
4143
+ declare function adminListSystemTasks(api: Api, args?: AdminListSystemTasksArgs, options?: CallOptions): Promise<AdminListSystemTasksResult>;
4144
+ type AdminPatchSystemTaskArgs = {
4145
+ path: {
4146
+ task_id: string;
4147
+ };
4148
+ body: SystemTaskPatchRequest;
4149
+ };
4150
+ type AdminPatchSystemTaskResult = SystemTaskItem;
4151
+ /** Admin Patch System Task */
4152
+ /** `PATCH /scheduling/admin/system-tasks/{task_id}` · aidream · auth guest · org exempt */
4153
+ declare function adminPatchSystemTask(api: Api, args: AdminPatchSystemTaskArgs, options?: CallOptions): Promise<AdminPatchSystemTaskResult>;
4154
+ type AdminListDbJobsArgs = {
4155
+ [key: string]: never;
4156
+ };
4157
+ type AdminListDbJobsResult = DbJobsResponse;
4158
+ /** Admin List Db Jobs */
4159
+ /** `GET /scheduling/admin/db-jobs` · aidream · auth guest · org exempt */
4160
+ declare function adminListDbJobs(api: Api, args?: AdminListDbJobsArgs, options?: CallOptions): Promise<AdminListDbJobsResult>;
4161
+ type AdminPatchDbJobArgs = {
4162
+ path: {
4163
+ jobid: number;
4164
+ };
4165
+ body: DbJobPatchRequest;
4166
+ };
4167
+ type AdminPatchDbJobResult = DbJobItem;
4168
+ /** Admin Patch Db Job */
4169
+ /** `PATCH /scheduling/admin/db-jobs/{jobid}` · aidream · auth guest · org exempt */
4170
+ declare function adminPatchDbJob(api: Api, args: AdminPatchDbJobArgs, options?: CallOptions): Promise<AdminPatchDbJobResult>;
4171
+ type AdminForceDisableArgs = {
4172
+ path: {
4173
+ task_id: string;
4174
+ };
4175
+ };
4176
+ type AdminForceDisableResult = ForceDisableResponse;
4177
+ /** Admin Force Disable */
4178
+ /** `POST /scheduling/admin/force-disable/{task_id}` · aidream · auth guest · org exempt */
4179
+ declare function adminForceDisable(api: Api, args: AdminForceDisableArgs, options?: CallOptions): Promise<AdminForceDisableResult>;
4180
+ type AdminRunNowArgs = {
4181
+ path: {
4182
+ task_id: string;
4183
+ };
4184
+ };
4185
+ type AdminRunNowResult = RunNowResponse;
4186
+ /** Admin Run Now */
4187
+ /** `POST /scheduling/admin/run-now/{task_id}` · aidream · auth guest · org exempt */
4188
+ declare function adminRunNow(api: Api, args: AdminRunNowArgs, options?: CallOptions): Promise<AdminRunNowResult>;
4189
+ /** Every JSON operation of this domain by `METHOD path` — for path-keyed calls. */
4190
+ interface Operations {
4191
+ "GET /ai/agent-assignments/sessions/{session_id}": {
4192
+ args: GetSessionArgs;
4193
+ result: GetSessionResult;
4194
+ };
4195
+ "POST /ai/agent-assignments/sessions/{session_id}/cancel": {
4196
+ args: CancelSessionArgs;
4197
+ result: CancelSessionResult;
4198
+ };
4199
+ "GET /admin/workflows/{definition_id}": {
4200
+ args: AdminGetWorkflowArgs;
4201
+ result: AdminGetWorkflowResult;
4202
+ };
4203
+ "GET /admin/workflows/{definition_id}/runs": {
4204
+ args: AdminListWorkflowRunsArgs;
4205
+ result: AdminListWorkflowRunsResult;
4206
+ };
4207
+ "GET /admin/runs/{run_id}": {
4208
+ args: AdminGetRunArgs;
4209
+ result: AdminGetRunResult;
4210
+ };
4211
+ "GET /admin/workflows/{definition_id}/plans": {
4212
+ args: AdminListPlansArgs;
4213
+ result: AdminListPlansResult;
4214
+ };
4215
+ "GET /admin/workflow-plans/{plan_id}": {
4216
+ args: AdminGetPlanArgs;
4217
+ result: AdminGetPlanResult;
4218
+ };
4219
+ "GET /workflow/node-types": {
4220
+ args: ListNodeTypesArgs;
4221
+ result: ListNodeTypesResult;
4222
+ };
4223
+ "GET /workflow/platform-tables": {
4224
+ args: ListPlatformTablesArgs;
4225
+ result: ListPlatformTablesResult;
4226
+ };
4227
+ "GET /workflow/kinds": {
4228
+ args: ListWorkflowKindsArgs;
4229
+ result: ListWorkflowKindsResult;
4230
+ };
4231
+ "GET /workflow/kinds/conformance": {
4232
+ args: ShapeConformanceBoardArgs;
4233
+ result: ShapeConformanceBoardResult;
4234
+ };
4235
+ "GET /workflow/kinds/{slug}": {
4236
+ args: GetWorkflowKindArgs;
4237
+ result: GetWorkflowKindResult;
4238
+ };
4239
+ "POST /workflow/kinds/generic-floor": {
4240
+ args: ReportGenericFloorRenderArgs;
4241
+ result: ReportGenericFloorRenderResult;
4242
+ };
4243
+ "GET /workflow/kinds/generic-floor/open": {
4244
+ args: ListGenericFloorIncidentsArgs;
4245
+ result: ListGenericFloorIncidentsResult;
4246
+ };
4247
+ "GET /workflow/contracts/audit": {
4248
+ args: ContractAuditArgs;
4249
+ result: ContractAuditResult;
4250
+ };
4251
+ "POST /workflow/node-types/refresh": {
4252
+ args: RefreshNodeTypesArgs;
4253
+ result: RefreshNodeTypesResult;
4254
+ };
4255
+ "GET /actions": {
4256
+ args: ListActionsArgs;
4257
+ result: ListActionsResult;
4258
+ };
4259
+ "GET /workflows": {
4260
+ args: ListWorkflowsArgs;
4261
+ result: ListWorkflowsResult;
4262
+ };
4263
+ "POST /workflows": {
4264
+ args: CreateWorkflowArgs;
4265
+ result: CreateWorkflowResult;
4266
+ };
4267
+ "GET /workflows/{definition_id}": {
4268
+ args: GetWorkflowArgs;
4269
+ result: GetWorkflowResult;
4270
+ };
4271
+ "DELETE /workflows/{definition_id}": {
4272
+ args: ArchiveWorkflowArgs;
4273
+ result: ArchiveWorkflowResult;
4274
+ };
4275
+ "GET /workflows/{definition_id}/versions": {
4276
+ args: ListWorkflowVersionsArgs;
4277
+ result: ListWorkflowVersionsResult;
4278
+ };
4279
+ "GET /workflows/{definition_id}/history": {
4280
+ args: ListWorkflowHistoryArgs;
4281
+ result: ListWorkflowHistoryResult;
4282
+ };
4283
+ "GET /workflows/{definition_id}/history/{revision}": {
4284
+ args: GetWorkflowHistoryRevisionArgs;
4285
+ result: GetWorkflowHistoryRevisionResult;
4286
+ };
4287
+ "GET /workflows/{definition_id}/engram": {
4288
+ args: GetWorkflowEngramArgs;
4289
+ result: GetWorkflowEngramResult;
4290
+ };
4291
+ "POST /workflows/{definition_id}/engram/promote": {
4292
+ args: PromoteWorkflowEngramArgs;
4293
+ result: PromoteWorkflowEngramResult;
4294
+ };
4295
+ "POST /workflows/{definition_id}/engram/demote": {
4296
+ args: DemoteWorkflowEngramArgs;
4297
+ result: DemoteWorkflowEngramResult;
4298
+ };
4299
+ "PATCH /workflows/{definition_id}/draft": {
4300
+ args: SaveWorkflowDraftArgs;
4301
+ result: SaveWorkflowDraftResult;
4302
+ };
4303
+ "POST /workflows/{definition_id}/publish": {
4304
+ args: PublishWorkflowArgs;
4305
+ result: PublishWorkflowResult;
4306
+ };
4307
+ "POST /workflows/validate": {
4308
+ args: ValidateWorkflowArgs;
4309
+ result: ValidateWorkflowResult;
4310
+ };
4311
+ "GET /workflows/{definition_id}/nodes/{node_id}/slots": {
4312
+ args: GetNodeDataSlotsArgs;
4313
+ result: GetNodeDataSlotsResult;
4314
+ };
4315
+ "GET /workflows/{definition_id}/slots": {
4316
+ args: GetDefinitionDataSlotsArgs;
4317
+ result: GetDefinitionDataSlotsResult;
4318
+ };
4319
+ "PUT /workflows/{definition_id}/nodes/{node_id}/slots/declared_sample": {
4320
+ args: PutDeclaredSampleArgs;
4321
+ result: PutDeclaredSampleResult;
4322
+ };
4323
+ "DELETE /workflows/{definition_id}/nodes/{node_id}/slots/{slot}": {
4324
+ args: DeleteNodeDataSlotArgs;
4325
+ result: DeleteNodeDataSlotResult;
4326
+ };
4327
+ "POST /workflows/{definition_id}/dry-run": {
4328
+ args: DryRunWorkflowArgs;
4329
+ result: DryRunWorkflowResult;
4330
+ };
4331
+ "GET /workflows/{definition_id}/nodes/{node_id}/input-form": {
4332
+ args: GetNodeInputFormArgs;
4333
+ result: GetNodeInputFormResult;
4334
+ };
4335
+ "GET /workflows/{definition_id}/nodes/{node_id}/agent-context": {
4336
+ args: GetNodeAgentContextArgs;
4337
+ result: GetNodeAgentContextResult;
4338
+ };
4339
+ "GET /workflows/{definition_id}/conductor-context": {
4340
+ args: GetConductorContextArgs;
4341
+ result: GetConductorContextResult;
4342
+ };
4343
+ "GET /workflows/{definition_id}/nodes/{node_id}/input-status": {
4344
+ args: GetDefinitionNodeInputStatusArgs;
4345
+ result: GetDefinitionNodeInputStatusResult;
4346
+ };
4347
+ "GET /runs/{run_id}/nodes/{node_id}/input-status": {
4348
+ args: GetRunNodeInputStatusArgs;
4349
+ result: GetRunNodeInputStatusResult;
4350
+ };
4351
+ "POST /workflows/{definition_id}/step-runs": {
4352
+ args: StartStepRunArgs;
4353
+ result: StartStepRunResult;
4354
+ };
4355
+ "POST /runs/{run_id}/nodes/{node_id}/execute": {
4356
+ args: ExecuteNodeArgs;
4357
+ result: ExecuteNodeResult;
4358
+ };
4359
+ "POST /workflows/{definition_id}/unarchive": {
4360
+ args: UnarchiveWorkflowArgs;
4361
+ result: UnarchiveWorkflowResult;
4362
+ };
4363
+ "POST /workflows/bulk-archive": {
4364
+ args: BulkArchiveWorkflowsArgs;
4365
+ result: BulkArchiveWorkflowsResult;
4366
+ };
4367
+ "POST /runs/bulk-cancel": {
4368
+ args: BulkCancelRunsArgs;
4369
+ result: BulkCancelRunsResult;
4370
+ };
4371
+ "POST /runs/bulk-retry-errored": {
4372
+ args: BulkRetryErroredRunsArgs;
4373
+ result: BulkRetryErroredRunsResult;
4374
+ };
4375
+ "GET /workflows/{definition_id}/run-form": {
4376
+ args: GetRunFormArgs;
4377
+ result: GetRunFormResult;
4378
+ };
4379
+ "GET /workflows/{definition_id}/result-schema": {
4380
+ args: GetResultSchemaArgs;
4381
+ result: GetResultSchemaResult;
4382
+ };
4383
+ "GET /workflows/{definition_id}/runs": {
4384
+ args: ListRunsForWorkflowArgs;
4385
+ result: ListRunsForWorkflowResult;
4386
+ };
4387
+ "GET /runs": {
4388
+ args: ListRunsArgs;
4389
+ result: ListRunsResult;
4390
+ };
4391
+ "GET /runs/waiting": {
4392
+ args: ListWaitingRunsEndpointArgs;
4393
+ result: ListWaitingRunsEndpointResult;
4394
+ };
4395
+ "GET /runs/{run_id}": {
4396
+ args: GetRunArgs;
4397
+ result: GetRunResult;
4398
+ };
4399
+ "POST /runs/{run_id}/cancel": {
4400
+ args: CancelRunArgs;
4401
+ result: CancelRunResult;
4402
+ };
4403
+ "POST /runs/{run_id}/pause": {
4404
+ args: PauseRunArgs;
4405
+ result: PauseRunResult;
4406
+ };
4407
+ "POST /runs/{run_id}/inject": {
4408
+ args: InjectRunArgs;
4409
+ result: InjectRunResult;
4410
+ };
4411
+ "POST /runs/{run_id}/force-fail": {
4412
+ args: ForceFailRunArgs;
4413
+ result: ForceFailRunResult;
4414
+ };
4415
+ "GET /runs/{run_id}/checkpoints": {
4416
+ args: ListRunCheckpointsArgs;
4417
+ result: ListRunCheckpointsResult;
4418
+ };
4419
+ "GET /runs/{run_id}/checkpoints/{checkpoint_id}/preview": {
4420
+ args: GetCheckpointPreviewArgs;
4421
+ result: GetCheckpointPreviewResult;
4422
+ };
4423
+ "POST /runs/{run_id}/nodes/{node_id}/retry": {
4424
+ args: RetryNodeArgs;
4425
+ result: RetryNodeResult;
4426
+ };
4427
+ "POST /runs/{run_id}/nodes/{node_id}/skip": {
4428
+ args: SkipNodeArgs;
4429
+ result: SkipNodeResult;
4430
+ };
4431
+ "POST /runs/{run_id}/nodes/{node_id}/manual-result": {
4432
+ args: ManualResultNodeArgs;
4433
+ result: ManualResultNodeResult;
4434
+ };
4435
+ "POST /runs/{run_id}/resume-errored": {
4436
+ args: ResumeErroredRunArgs;
4437
+ result: ResumeErroredRunResult;
4438
+ };
4439
+ "POST /runs/{run_id}/nodes/{node_id}/rerun-from": {
4440
+ args: RerunFromNodeArgs;
4441
+ result: RerunFromNodeResult;
4442
+ };
4443
+ "POST /runs/{run_id}/nodes/{node_id}/fork-from": {
4444
+ args: ForkFromNodeArgs;
4445
+ result: ForkFromNodeResult;
4446
+ };
4447
+ "GET /runs/{run_id}/events/stream": {
4448
+ args: StreamRunEventsArgs;
4449
+ result: StreamRunEventsResult;
4450
+ };
4451
+ "GET /runs/{run_id}/events": {
4452
+ args: ListRunEventsArgs;
4453
+ result: ListRunEventsResult;
4454
+ };
4455
+ "GET /runs/{run_id}/cost": {
4456
+ args: GetRunCostArgs;
4457
+ result: GetRunCostResult;
4458
+ };
4459
+ "GET /workflows/{definition_id}/cost-rollup": {
4460
+ args: GetWorkflowCostRollupArgs;
4461
+ result: GetWorkflowCostRollupResult;
4462
+ };
4463
+ "POST /_test/spawn-detached": {
4464
+ args: TestSpawnDetachedArgs;
4465
+ result: TestSpawnDetachedResult;
4466
+ };
4467
+ "GET /triggers": {
4468
+ args: ListTriggersArgs;
4469
+ result: ListTriggersResult;
4470
+ };
4471
+ "POST /triggers": {
4472
+ args: CreateTriggerArgs;
4473
+ result: CreateTriggerResult;
4474
+ };
4475
+ "GET /triggers/{trigger_id}": {
4476
+ args: GetTriggerArgs;
4477
+ result: GetTriggerResult;
4478
+ };
4479
+ "PATCH /triggers/{trigger_id}": {
4480
+ args: UpdateTriggerArgs;
4481
+ result: UpdateTriggerResult;
4482
+ };
4483
+ "DELETE /triggers/{trigger_id}": {
4484
+ args: DeleteTriggerArgs;
4485
+ result: DeleteTriggerResult;
4486
+ };
4487
+ "POST /triggers/{trigger_id}/fire": {
4488
+ args: FireTriggerArgs;
4489
+ result: FireTriggerResult;
4490
+ };
4491
+ "GET /triggers/{trigger_id}/fires": {
4492
+ args: ListTriggerFiresArgs;
4493
+ result: ListTriggerFiresResult;
4494
+ };
4495
+ "GET /triggers/{trigger_id}/events": {
4496
+ args: ListTriggerEventsArgs;
4497
+ result: ListTriggerEventsResult;
4498
+ };
4499
+ "POST /workflow-builder/workflows": {
4500
+ args: CreateBuilderWorkflowArgs;
4501
+ result: CreateBuilderWorkflowResult;
4502
+ };
4503
+ "GET /workflow-builder/workflows/{workflow_id}": {
4504
+ args: ReadBuilderWorkflowArgs;
4505
+ result: ReadBuilderWorkflowResult;
4506
+ };
4507
+ "PUT /workflow-builder/workflows/{workflow_id}": {
4508
+ args: SaveBuilderWorkflowArgs;
4509
+ result: SaveBuilderWorkflowResult;
4510
+ };
4511
+ "POST /workflow-builder/workflows/{workflow_id}/publish": {
4512
+ args: PublishBuilderWorkflowArgs;
4513
+ result: PublishBuilderWorkflowResult;
4514
+ };
4515
+ "POST /workflow-builder/workflows/{workflow_id}/on": {
4516
+ args: TurnBuilderWorkflowOnArgs;
4517
+ result: TurnBuilderWorkflowOnResult;
4518
+ };
4519
+ "POST /workflow-builder/workflows/{workflow_id}/off": {
4520
+ args: TurnBuilderWorkflowOffArgs;
4521
+ result: TurnBuilderWorkflowOffResult;
4522
+ };
4523
+ "POST /workflow-builder/workflows/{workflow_id}/test": {
4524
+ args: TestBuilderWorkflowWithARecordArgs;
4525
+ result: TestBuilderWorkflowWithARecordResult;
4526
+ };
4527
+ "GET /workflow-builder/workflows/{workflow_id}/runs": {
4528
+ args: ListBuilderRunsArgs;
4529
+ result: ListBuilderRunsResult;
4530
+ };
4531
+ "GET /workflow-builder/records/{record_id}/runs": {
4532
+ args: ListRunsOnRecordArgs;
4533
+ result: ListRunsOnRecordResult;
4534
+ };
4535
+ "GET /workflow-builder/tables/{table_id}/workflows": {
4536
+ args: ListTableWorkflowsArgs;
4537
+ result: ListTableWorkflowsResult;
4538
+ };
4539
+ "GET /workflows/{definition_id}/plans": {
4540
+ args: ListPlansArgs;
4541
+ result: ListPlansResult;
4542
+ };
4543
+ "POST /workflows/{definition_id}/plans": {
4544
+ args: CreatePlanArgs;
4545
+ result: CreatePlanResult;
4546
+ };
4547
+ "GET /workflows/{definition_id}/plan-blockers": {
4548
+ args: PlanBlockersArgs;
4549
+ result: PlanBlockersResult;
4550
+ };
4551
+ "GET /plans/{plan_id}": {
4552
+ args: GetPlanArgs;
4553
+ result: GetPlanResult;
4554
+ };
4555
+ "PATCH /plans/{plan_id}": {
4556
+ args: UpdatePlanArgs;
4557
+ result: UpdatePlanResult;
4558
+ };
4559
+ "PUT /plans/{plan_id}/shape": {
4560
+ args: SetShapeArgs;
4561
+ result: SetShapeResult;
4562
+ };
4563
+ "PUT /plans/{plan_id}/sample": {
4564
+ args: SetSampleArgs;
4565
+ result: SetSampleResult;
4566
+ };
4567
+ "POST /plans/{plan_id}/split": {
4568
+ args: SplitPlanArgs;
4569
+ result: SplitPlanResult;
4570
+ };
4571
+ "POST /plans/{plan_id}/merge": {
4572
+ args: MergePlanArgs;
4573
+ result: MergePlanResult;
4574
+ };
4575
+ "POST /plans/{plan_id}/internal": {
4576
+ args: SetInternalGraphArgs;
4577
+ result: SetInternalGraphResult;
4578
+ };
4579
+ "POST /plans/{plan_id}/promote": {
4580
+ args: PromotePlanArgs;
4581
+ result: PromotePlanResult;
4582
+ };
4583
+ "POST /plans/{plan_id}/resolve": {
4584
+ args: ResolvePlanArgs;
4585
+ result: ResolvePlanResult;
4586
+ };
4587
+ "POST /plans/{plan_id}/emit": {
4588
+ args: EmitFromPlanArgs;
4589
+ result: EmitFromPlanResult;
4590
+ };
4591
+ "POST /plans/{plan_id}/settle": {
4592
+ args: SettlePlanArgs;
4593
+ result: SettlePlanResult;
4594
+ };
4595
+ "POST /plans/{plan_id}/dissolve": {
4596
+ args: DissolvePlanArgs;
4597
+ result: DissolvePlanResult;
4598
+ };
4599
+ "POST /plans/{plan_id}/sync": {
4600
+ args: SyncPlanAnchorArgs;
4601
+ result: SyncPlanAnchorResult;
4602
+ };
4603
+ "POST /recovery/handle": {
4604
+ args: HandleRecoveryArgs;
4605
+ result: HandleRecoveryResult;
4606
+ };
4607
+ "POST /recovery/audit/{audit_id}/applied": {
4608
+ args: MarkRecoveryAppliedEndpointArgs;
4609
+ result: MarkRecoveryAppliedEndpointResult;
4610
+ };
4611
+ "POST /recovery/workflows/{definition_id}/apply-patch": {
4612
+ args: ApplyWorkflowPatchEndpointArgs;
4613
+ result: ApplyWorkflowPatchEndpointResult;
4614
+ };
4615
+ "GET /workflows/{definition_id}/extract-proposal": {
4616
+ args: GetExtractProposalArgs;
4617
+ result: GetExtractProposalResult;
4618
+ };
4619
+ "POST /workflows/{definition_id}/extract": {
4620
+ args: ExtractWorkflowArgs;
4621
+ result: ExtractWorkflowResult;
4622
+ };
4623
+ "GET /workflows/{definition_id}/kind-availability": {
4624
+ args: GetKindAvailabilityArgs;
4625
+ result: GetKindAvailabilityResult;
4626
+ };
4627
+ "GET /runs/{run_id}/kind-reference": {
4628
+ args: GetRunKindReferenceArgs;
4629
+ result: GetRunKindReferenceResult;
4630
+ };
4631
+ "GET /templates": {
4632
+ args: ListTemplatesArgs;
4633
+ result: ListTemplatesResult;
4634
+ };
4635
+ "POST /templates/{template_id}/clone": {
4636
+ args: CloneTemplateArgs;
4637
+ result: CloneTemplateResult;
4638
+ };
4639
+ "POST /workflows/{definition_id}/save-as-template": {
4640
+ args: SaveAsTemplateArgs;
4641
+ result: SaveAsTemplateResult;
4642
+ };
4643
+ "PATCH /workflows/{definition_id}/shown_to": {
4644
+ args: SetWorkflowShownToArgs;
4645
+ result: SetWorkflowShownToResult;
4646
+ };
4647
+ "PATCH /workflows/{definition_id}/visibility": {
4648
+ args: SetWorkflowShownToTransitionalArgs;
4649
+ result: SetWorkflowShownToTransitionalResult;
4650
+ };
4651
+ "GET /public/workflows/{definition_id}": {
4652
+ args: GetPublicWorkflowArgs;
4653
+ result: GetPublicWorkflowResult;
4654
+ };
4655
+ "POST /scheduling/validate-cron": {
4656
+ args: ValidateCronArgs;
4657
+ result: ValidateCronResult;
4658
+ };
4659
+ "POST /scheduling/compute-next-due-at": {
4660
+ args: ComputeNextDueAtArgs;
4661
+ result: ComputeNextDueAtResult;
4662
+ };
4663
+ "POST /scheduling/run-now/{task_id}": {
4664
+ args: RunNowArgs;
4665
+ result: RunNowResult;
4666
+ };
4667
+ "GET /scheduling/scanner-status": {
4668
+ args: ScannerStatusArgs;
4669
+ result: ScannerStatusResult;
4670
+ };
4671
+ "GET /scheduling/admin/system-tasks": {
4672
+ args: AdminListSystemTasksArgs;
4673
+ result: AdminListSystemTasksResult;
4674
+ };
4675
+ "PATCH /scheduling/admin/system-tasks/{task_id}": {
4676
+ args: AdminPatchSystemTaskArgs;
4677
+ result: AdminPatchSystemTaskResult;
4678
+ };
4679
+ "GET /scheduling/admin/db-jobs": {
4680
+ args: AdminListDbJobsArgs;
4681
+ result: AdminListDbJobsResult;
4682
+ };
4683
+ "PATCH /scheduling/admin/db-jobs/{jobid}": {
4684
+ args: AdminPatchDbJobArgs;
4685
+ result: AdminPatchDbJobResult;
4686
+ };
4687
+ "POST /scheduling/admin/force-disable/{task_id}": {
4688
+ args: AdminForceDisableArgs;
4689
+ result: AdminForceDisableResult;
4690
+ };
4691
+ "POST /scheduling/admin/run-now/{task_id}": {
4692
+ args: AdminRunNowArgs;
4693
+ result: AdminRunNowResult;
4694
+ };
4695
+ }
4696
+ /** Path-keyed call, scoped to this domain only (never a global path map). */
4697
+ declare function call<K extends keyof Operations>(api: Api, key: K, args?: Operations[K]["args"], options?: CallOptions): Promise<Operations[K]["result"]>;
4698
+
4699
+ export { type AddEdgeOp, type AddNodeOp_Input, type AddNodeOp_Output, type AdminForceDisableArgs, type AdminForceDisableResult, type AdminGetPlanArgs, type AdminGetPlanResult, type AdminGetRunArgs, type AdminGetRunResult, type AdminGetWorkflowArgs, type AdminGetWorkflowResult, type AdminListDbJobsArgs, type AdminListDbJobsResult, type AdminListPlansArgs, type AdminListPlansResult, type AdminListSystemTasksArgs, type AdminListSystemTasksResult, type AdminListWorkflowRunsArgs, type AdminListWorkflowRunsResult, type AdminPatchDbJobArgs, type AdminPatchDbJobResult, type AdminPatchSystemTaskArgs, type AdminPatchSystemTaskResult, type AdminRunNowArgs, type AdminRunNowResult, type AgentAssignmentRunRequest, type ApplyWorkflowPatchEndpointArgs, type ApplyWorkflowPatchEndpointResult, type ApplyWorkflowPatchRequest, type ApplyWorkflowPatchResult, type ArchiveWorkflowArgs, type ArchiveWorkflowResponse, type ArchiveWorkflowResult, type ArmSpec, type AssignmentAgentInput, type AssignmentBatchResult, type AssignmentError, type AssignmentItemResult, type AssignmentItemStatus, type AssignmentOrder, type AssignmentRow, type AssignmentSessionStatus, type AssignmentSessionSummary, type AssignmentUniqueness, type AuditTotals, type AwaitingInputRunResponse, type BuilderRun, type BuilderRuns, type BuilderSpecView, type BulkArchiveWorkflowsArgs, type BulkArchiveWorkflowsResult, type BulkCancelRunsArgs, type BulkCancelRunsResult, type BulkIdsRequest, type BulkOpResponse, type BulkOpResult, type BulkRetryErroredRunsArgs, type BulkRetryErroredRunsResult, type CancelRunArgs, type CancelRunResult, type CancelSessionArgs, type CancelSessionResult, type CartesianPlan, type ChannelSpec, type CheckpointPreview, type CheckpointRecord, type CloneTemplateArgs, type CloneTemplateResponse, type CloneTemplateResult, type ComparisonRequest, type ComputeNextDueAtArgs, type ComputeNextDueAtResult, type ConductorChatContext, type ConformanceState, type ContractAuditArgs, type ContractAuditReport, type ContractAuditResult, type CoordinatedRowsPlan, type CreateBuilderWorkflowArgs, type CreateBuilderWorkflowRequest, type CreateBuilderWorkflowResult, type CreatePlanArgs, type CreatePlanRequest, type CreatePlanResult, type CreateTriggerArgs, type CreateTriggerRequest, type CreateTriggerResult, type CreateWorkflowArgs, type CreateWorkflowRequest, type CreateWorkflowResult, type DailyCostBreakdown, type DbJobItem, type DbJobLastRun, type DbJobPatchRequest, type DbJobsResponse, type Definition, type DefinitionListPage, type DefinitionPatch_Input, type DefinitionPatch_Output, type DefinitionRecord, type DefinitionSlotsResponse, type DeleteNodeDataSlotArgs, type DeleteNodeDataSlotResult, type DeleteSlotResponse, type DeleteTriggerArgs, type DeleteTriggerResponse, type DeleteTriggerResult, type Deliverable, type DemoteWorkflowEngramArgs, type DemoteWorkflowEngramResult, type DiagSpawnDetachedResponse, type DissolvePlanArgs, type DissolvePlanRequest, type DissolvePlanResult, type DryRunEdgeReport, type DryRunNodeReport, type DryRunReport, type DryRunRequest, type DryRunResponse, type DryRunWorkflowArgs, type DryRunWorkflowResult, type EdgeDef, type EditInputsRetryProposal, type EditWorkflowProposal, type EmitFromPlanArgs, type EmitFromPlanRequest, type EmitFromPlanResponse, type EmitFromPlanResult, type EmittedWiring, type EngramDemoteRequest, type EngramStatus, type EngramVersionTagAgent, type ExecuteNodeArgs, type ExecuteNodeRequest, type ExecuteNodeResult, type ExtractOccurrence, type ExtractResult, type ExtractWorkflowArgs, type ExtractWorkflowResult, type ExtractedStep, type ExtractionProposal, type FireResponse, type FireTriggerArgs, type FireTriggerRequest, type FireTriggerResult, type ForceDisableResponse, type ForceFailProposal, type ForceFailRunArgs, type ForceFailRunResponse, type ForceFailRunResult, type ForkFromNodeArgs, type ForkFromNodeResult, type ForkFromRequest, type FrontierInvocation, type GenericFloorBoard, type GenericFloorIncident, type GenericFloorReport, type GenericFloorReportResponse, type GetCheckpointPreviewArgs, type GetCheckpointPreviewResult, type GetConductorContextArgs, type GetConductorContextResult, type GetDefinitionDataSlotsArgs, type GetDefinitionDataSlotsResult, type GetDefinitionNodeInputStatusArgs, type GetDefinitionNodeInputStatusResult, type GetExtractProposalArgs, type GetExtractProposalResult, type GetKindAvailabilityArgs, type GetKindAvailabilityResult, type GetNodeAgentContextArgs, type GetNodeAgentContextResult, type GetNodeDataSlotsArgs, type GetNodeDataSlotsResult, type GetNodeInputFormArgs, type GetNodeInputFormResult, type GetPlanArgs, type GetPlanResult, type GetPublicWorkflowArgs, type GetPublicWorkflowResult, type GetResultSchemaArgs, type GetResultSchemaResult, type GetRunArgs, type GetRunCostArgs, type GetRunCostResult, type GetRunFormArgs, type GetRunFormResult, type GetRunKindReferenceArgs, type GetRunKindReferenceResult, type GetRunNodeInputStatusArgs, type GetRunNodeInputStatusResult, type GetRunResult, type GetSessionArgs, type GetSessionResult, type GetTriggerArgs, type GetTriggerResult, type GetWorkflowArgs, type GetWorkflowCostRollupArgs, type GetWorkflowCostRollupResult, type GetWorkflowEngramArgs, type GetWorkflowEngramResult, type GetWorkflowHistoryRevisionArgs, type GetWorkflowHistoryRevisionResult, type GetWorkflowKindArgs, type GetWorkflowKindResult, type GetWorkflowResult, type HandleRecoveryArgs, type HandleRecoveryResult, type HandshakeWarning, type HeldStepRefusedResponse, type IdempotentDuplicateRunResponse, type IndependentRandomPlan, type InjectRunArgs, type InjectRunRequest, type InjectRunResult, type InternalGraphRequest, type KindAvailabilityResponse, type KindCatalogResponse, type KindComponentDescriptor, type KindDescriptor, type KindEdgeDescriptor, type KindExampleDescriptor, type KindPickerEntry, type KindSurfaceDescriptor, type LauncherConversation, type LeakRule, type ListActionsArgs, type ListActionsResult, type ListBuilderRunsArgs, type ListBuilderRunsResult, type ListGenericFloorIncidentsArgs, type ListGenericFloorIncidentsResult, type ListNodeTypesArgs, type ListNodeTypesResult, type ListPlansArgs, type ListPlansResult, type ListPlatformTablesArgs, type ListPlatformTablesResult, type ListRunCheckpointsArgs, type ListRunCheckpointsResult, type ListRunEventsArgs, type ListRunEventsResult, type ListRunsArgs, type ListRunsForWorkflowArgs, type ListRunsForWorkflowResult, type ListRunsOnRecordArgs, type ListRunsOnRecordResult, type ListRunsResult, type ListTableWorkflowsArgs, type ListTableWorkflowsResult, type ListTemplatesArgs, type ListTemplatesResult, type ListTriggerEventsArgs, type ListTriggerEventsResult, type ListTriggerFiresArgs, type ListTriggerFiresResult, type ListTriggersArgs, type ListTriggersResult, type ListWaitingRunsEndpointArgs, type ListWaitingRunsEndpointResult, type ListWorkflowHistoryArgs, type ListWorkflowHistoryResult, type ListWorkflowKindsArgs, type ListWorkflowKindsResult, type ListWorkflowVersionsArgs, type ListWorkflowVersionsResult, type ListWorkflowsArgs, type ListWorkflowsResult, type ManualResultNodeArgs, type ManualResultNodeResult, type ManualResultProposal, type ManualResultRequest, type MappingIssue, type MarkRecoveryAppliedEndpointArgs, type MarkRecoveryAppliedEndpointResult, type MergePlanArgs, type MergePlanRequest, type MergePlanResult, type MissingBinding, type MissingInputField, type ModelCostBreakdown, type ModelReport, type NodeAgentChatContext, type NodeContractReport, type NodeDataSlotPayload, type NodeDef, type NodeInputFormResponse, type NodeInputStatusField, type NodeInputStatusResponse, type NodeSlotsMapEntry, type NodeSlotsResponse, type NodeStateAtCheckpoint, type NodeTypeDescriptor, type OccurrenceOutcome, type OnOff, type Operations, type PauseRunArgs, type PauseRunResponse, type PauseRunResult, type PlanAnchorState, type PlanAssistArgs, type PlanAssistRequest, type PlanAssistResult, type PlanBlockerEntry, type PlanBlockersArgs, type PlanBlockersResponse, type PlanBlockersResult, type PlanEventRecord, type PlanFullResponse, type PlanListResponse, type PlanRecord, type PlanSampleRecord, type PlatformTableEntry, type Position, type PredicatePreview, type PredicateRow, type PromotePlanArgs, type PromotePlanResponse, type PromotePlanResult, type PromoteWorkflowEngramArgs, type PromoteWorkflowEngramResult, type ProposalOccurrence, type ProposalStep, type PublicWorkflowRecord, type PublishBuilderRequest, type PublishBuilderWorkflowArgs, type PublishBuilderWorkflowResult, type PublishWorkflowArgs, type PublishWorkflowResult, type PublishedBuilder, type PutDeclaredSampleArgs, type PutDeclaredSampleRequest, type PutDeclaredSampleResponse, type PutDeclaredSampleResult, type ReadBuilderWorkflowArgs, type ReadBuilderWorkflowResult, type RecoveryApplyAck, type RecoveryRequest, type RecoveryResponse, type ReferenceResolution, type RefreshNodeTypesArgs, type RefreshNodeTypesResponse, type RefreshNodeTypesResult, type RemoveEdgeOp, type RemoveNodeOp, type RemoveVariableOp, type ReplaceEdgeOp, type ReplaceNodeOp_Input, type ReplaceNodeOp_Output, type ReportGenericFloorRenderArgs, type ReportGenericFloorRenderResult, type RerunComparisonArmArgs, type RerunComparisonArmResult, type RerunFromNodeArgs, type RerunFromNodeResult, type RerunFromRequest, type ResolvePlanArgs, type ResolvePlanRequest, type ResolvePlanResult, type ResumeErroredRunArgs, type ResumeErroredRunResult, type ResumePausedRunArgs, type ResumePausedRunResult, type ResumeQueuedRunResponse, type ResumeRunRequest, type ResumeWorkflowRunArgs, type ResumeWorkflowRunResult, type RetryNodeArgs, type RetryNodeRequest, type RetryNodeResult, type RetryProposal, type RuleCount, type Ruleset, type RunAssignmentsArgs, type RunAssignmentsResult, type RunCostSummary, type RunEventRecord, type RunFormField, type RunFormSchema, type RunFormVariable, type RunNowArgs, type RunNowResult, type RunRecord, type RunResultSchema, type RunStartWait, type RunStep, type RunSuggestionsArgs, type RunSuggestionsRequest, type RunSuggestionsResult, type RunWorkflowRequest, type SaveAsTemplateArgs, type SaveAsTemplateRequest, type SaveAsTemplateResponse, type SaveAsTemplateResult, type SaveBuilderWorkflowArgs, type SaveBuilderWorkflowRequest, type SaveBuilderWorkflowResult, type SaveDraftRequest, type SaveWorkflowDraftArgs, type SaveWorkflowDraftResult, type ScannerStatusArgs, type ScannerStatusResult, type SchemaReport, type ServedInput, type SetInternalGraphArgs, type SetInternalGraphResult, type SetSampleArgs, type SetSampleRequest, type SetSampleResult, type SetShapeArgs, type SetShapeRequest, type SetShapeResult, type SetVariableOp, type SetWorkflowShownToArgs, type SetWorkflowShownToResult, type SetWorkflowShownToTransitionalArgs, type SetWorkflowShownToTransitionalResult, type SettlePlanArgs, type SettlePlanRequest, type SettlePlanResponse, type SettlePlanResult, type ShapeConformanceBoard, type ShapeConformanceBoardArgs, type ShapeConformanceBoardResult, type ShapeConformanceCounts, type ShapeConformanceRow, type ShownToRequest, type ShownToResponse, type SkipNodeArgs, type SkipNodeRequest, type SkipNodeResult, type SkipProposal, type SplitPlanArgs, type SplitPlanRequest, type SplitPlanResponse, type SplitPlanResult, type StartComparisonArgs, type StartComparisonResult, type StartQueuedRunResponse, type StartStepRunArgs, type StartStepRunResponse, type StartStepRunResult, type StartWorkflowRunArgs, type StartWorkflowRunResult, type StoreEventSource, type StoredMessageRecord, type StreamRunAnnouncementsArgs, type StreamRunAnnouncementsResult, type StreamRunDebugArgs, type StreamRunDebugResult, type StreamRunEventsArgs, type StreamRunEventsResult, type SyncPlanAnchorArgs, type SyncPlanAnchorResult, type SystemTaskItem, type SystemTaskLastRun, type SystemTaskPatchRequest, type SystemTaskTaxonomyNode, type SystemTaskTriggerInfo, type SystemTaskTriggerPatch, type SystemTasksResponse, type TableEventSource, type TableWorkflow, type TableWorkflows, type TemplateRecord, type TestBuilderWorkflowWithARecordArgs, type TestBuilderWorkflowWithARecordResult, type TestNodeRequest, type TestSingleNodeArgs, type TestSingleNodeResult, type TestSpawnDetachedArgs, type TestSpawnDetachedResult, type TestWithRecordRequest, type TriggerEventRecord, type TriggerFireRecord, type TriggerRecord, type TurnBuilderWorkflowOffArgs, type TurnBuilderWorkflowOffResult, type TurnBuilderWorkflowOnArgs, type TurnBuilderWorkflowOnResult, type TurnOnRequest, type TypeLeak, type UnarchiveWorkflowArgs, type UnarchiveWorkflowResponse, type UnarchiveWorkflowResult, type UpdateNodeDataOp, type UpdateNodeTypeOp, type UpdatePlanArgs, type UpdatePlanRequest, type UpdatePlanResult, type UpdateTriggerActiveRequest, type UpdateTriggerActiveResponse, type UpdateTriggerArgs, type UpdateTriggerResult, type ValidateCronArgs, type ValidateCronResult, type ValidateRequest, type ValidateWorkflowArgs, type ValidateWorkflowResult, type ValidationIssue, type ValidationResult, type VariableSpec, type Viewport, type WaitingGap, type WaitingRun, type WaitingRunsResponse, type WaitingSnapshot, type WorkflowCostRollup, adminForceDisable, adminGetPlan, adminGetRun, adminGetWorkflow, adminListDbJobs, adminListPlans, adminListSystemTasks, adminListWorkflowRuns, adminPatchDbJob, adminPatchSystemTask, adminRunNow, type aidream__api__routers__scheduling__ComputeNextDueRequest, type aidream__api__routers__scheduling__ScannerStatusResponse, type aidream__api__routers__workflow__CancelRunResponse, type aidream__api__routers__workflow__PublishRequest, type aidream__services__workflow_extract__materialize__ExtractRequest, applyWorkflowPatchEndpoint, archiveWorkflow, bulkArchiveWorkflows, bulkCancelRuns, bulkRetryErroredRuns, call, cancelRun, cancelSession, cloneTemplate, computeNextDueAt, contractAudit, createBuilderWorkflow, createPlan, createTrigger, createWorkflow, deleteNodeDataSlot, deleteTrigger, demoteWorkflowEngram, dissolvePlan, dryRunWorkflow, emitFromPlan, executeNode, extractWorkflow, fireTrigger, forceFailRun, forkFromNode, getCheckpointPreview, getConductorContext, getDefinitionDataSlots, getDefinitionNodeInputStatus, getExtractProposal, getKindAvailability, getNodeAgentContext, getNodeDataSlots, getNodeInputForm, getPlan, getPublicWorkflow, getResultSchema, getRun, getRunCost, getRunForm, getRunKindReference, getRunNodeInputStatus, getSession, getTrigger, getWorkflow, getWorkflowCostRollup, getWorkflowEngram, getWorkflowHistoryRevision, getWorkflowKind, handleRecovery, injectRun, listActions, listBuilderRuns, listGenericFloorIncidents, listNodeTypes, listPlans, listPlatformTables, listRunCheckpoints, listRunEvents, listRuns, listRunsForWorkflow, listRunsOnRecord, listTableWorkflows, listTemplates, listTriggerEvents, listTriggerFires, listTriggers, listWaitingRunsEndpoint, listWorkflowHistory, listWorkflowKinds, listWorkflowVersions, listWorkflows, manualResultNode, markRecoveryAppliedEndpoint, mergePlan, pauseRun, planAssist, planBlockers, promotePlan, promoteWorkflowEngram, publishBuilderWorkflow, publishWorkflow, putDeclaredSample, readBuilderWorkflow, refreshNodeTypes, reportGenericFloorRender, rerunComparisonArm, rerunFromNode, resolvePlan, resumeErroredRun, resumePausedRun, resumeWorkflowRun, retryNode, runAssignments, runNow, runSuggestions, saveAsTemplate, saveBuilderWorkflow, saveWorkflowDraft, scannerStatus, setInternalGraph, setSample, setShape, setWorkflowShownTo, setWorkflowShownToTransitional, settlePlan, shapeConformanceBoard, skipNode, splitPlan, startComparison, startStepRun, startWorkflowRun, streamRunAnnouncements, streamRunDebug, streamRunEvents, syncPlanAnchor, testBuilderWorkflowWithARecord, testSingleNode, testSpawnDetached, turnBuilderWorkflowOff, turnBuilderWorkflowOn, unarchiveWorkflow, updatePlan, updateTrigger, validateCron, validateWorkflow };