@lunnoa/client 2.4.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -232,6 +232,26 @@ declare class AgentChatClient {
232
232
  */
233
233
 
234
234
  interface paths {
235
+ "/api/ai-connections": {
236
+ parameters: {
237
+ query?: never;
238
+ header?: never;
239
+ path?: never;
240
+ cookie?: never;
241
+ };
242
+ /**
243
+ * List AI connections available to the caller
244
+ * @description Returns AI provider connections the caller may assign to an agent, each with the catalogue model ids that connection accepts. Use `models[].id` as the agent `model`. `isDefault` marks the connection and model applied when a deploy omits them. App connections (Gmail, HTTP, and similar) are listed separately at `GET /api/connections`. Credentials are never returned. Requires `agents:create`.
245
+ */
246
+ get: operations["AiConnectionsController_list"];
247
+ put?: never;
248
+ post?: never;
249
+ delete?: never;
250
+ options?: never;
251
+ head?: never;
252
+ patch?: never;
253
+ trace?: never;
254
+ };
235
255
  "/api/discovery/enabled-features": {
236
256
  parameters: {
237
257
  query?: never;
@@ -714,8 +734,8 @@ interface paths {
714
734
  get?: never;
715
735
  put?: never;
716
736
  /**
717
- * Upsert a workflow by slug from a linear step list
718
- * @description Creates or updates a workflow identified by workspace-scoped `slug`. Builds a minimal valid graph (one catalogue trigger, Manually Run when omitted, then linear catalogue-action steps). Marks `managedByCode` by default. Prefer the CLI (`npx @lunnoa/client workflows deploy`) over calling this from application code.
737
+ * Upsert a workflow by slug
738
+ * @description Creates or replaces the workflow identified by a workspace-scoped slug. Send either catalogue steps (optional trigger; Manually Run when the trigger is omitted; the last step may branch with paths) or a graph of nodes and edges. Not both. codeSource defaults to generated. Updating a workflow the UI can edit is refused with 409 unless baseRevision is the current revision or force is true; both sides generated skips that check. A lost update race is the same 409. isActive changes only when the request sends it. Prefer the CLI (`npx @lunnoa/client workflows deploy`).
719
739
  */
720
740
  post: operations["WorkflowsController_upsertBySlug"];
721
741
  delete?: never;
@@ -724,6 +744,26 @@ interface paths {
724
744
  patch?: never;
725
745
  trace?: never;
726
746
  };
747
+ "/api/workflows/slug/{slug}/definition": {
748
+ parameters: {
749
+ query?: never;
750
+ header?: never;
751
+ path?: never;
752
+ cookie?: never;
753
+ };
754
+ /**
755
+ * Get a workflow definition by slug
756
+ * @description Returns the steps format when the stored graph round-trips through it, otherwise the graph format. Placeholder nodes are omitted.
757
+ */
758
+ get: operations["WorkflowsController_getDefinitionBySlug"];
759
+ put?: never;
760
+ post?: never;
761
+ delete?: never;
762
+ options?: never;
763
+ head?: never;
764
+ patch?: never;
765
+ trace?: never;
766
+ };
727
767
  "/api/workflows/{workflowId}": {
728
768
  parameters: {
729
769
  query?: never;
@@ -744,6 +784,26 @@ interface paths {
744
784
  patch?: never;
745
785
  trace?: never;
746
786
  };
787
+ "/api/code-sync/context": {
788
+ parameters: {
789
+ query?: never;
790
+ header?: never;
791
+ path?: never;
792
+ cookie?: never;
793
+ };
794
+ /**
795
+ * Get code-sync context for the current workspace
796
+ * @description Returns the workspace id and whether code-synced agents and workflows are locked so they can only be changed by a push.
797
+ */
798
+ get: operations["CodeSyncController_getContext"];
799
+ put?: never;
800
+ post?: never;
801
+ delete?: never;
802
+ options?: never;
803
+ head?: never;
804
+ patch?: never;
805
+ trace?: never;
806
+ };
747
807
  "/api/agents": {
748
808
  parameters: {
749
809
  query?: never;
@@ -775,7 +835,7 @@ interface paths {
775
835
  put?: never;
776
836
  /**
777
837
  * Upsert an agent by slug
778
- * @description Creates or updates an agent identified by workspace-scoped `slug`. Accepts instructions, model, optional aiConnectionId / connectionIds / workflowIds, and catalogue action tools. Marks `managedByCode` by default. Prefer the CLI (`npx @lunnoa/client agents deploy`) over calling this from application code.
838
+ * @description Creates or updates an agent identified by workspace-scoped `slug`. A field that is omitted is left unchanged on update. `codeSource` defaults to `generated`. Conflict rules: a generated redeploy over a generated agent needs no revision; otherwise an existing agent requires `baseRevision` equal to the current revision, or `force`. A missing or stale `baseRevision` answers 409, and so does a lost race with a UI edit. The 409 body includes `currentRevision` when it is known. Prefer the CLI (`npx @lunnoa/client agents deploy`) over calling this from application code.
779
839
  */
780
840
  post: operations["AgentsController_upsertBySlug"];
781
841
  delete?: never;
@@ -784,6 +844,26 @@ interface paths {
784
844
  patch?: never;
785
845
  trace?: never;
786
846
  };
847
+ "/api/agents/slug/{slug}/definition": {
848
+ parameters: {
849
+ query?: never;
850
+ header?: never;
851
+ path?: never;
852
+ cookie?: never;
853
+ };
854
+ /**
855
+ * Get an agent definition by slug
856
+ * @description Returns the agent definition in the file shape used by code sync, plus its id, code source, and revision.
857
+ */
858
+ get: operations["AgentsController_getDefinitionBySlug"];
859
+ put?: never;
860
+ post?: never;
861
+ delete?: never;
862
+ options?: never;
863
+ head?: never;
864
+ patch?: never;
865
+ trace?: never;
866
+ };
787
867
  "/api/agents/{agentId}": {
788
868
  parameters: {
789
869
  query?: never;
@@ -1452,26 +1532,6 @@ interface paths {
1452
1532
  patch?: never;
1453
1533
  trace?: never;
1454
1534
  };
1455
- "/api/ai-connections": {
1456
- parameters: {
1457
- query?: never;
1458
- header?: never;
1459
- path?: never;
1460
- cookie?: never;
1461
- };
1462
- /**
1463
- * List AI connections available to the caller
1464
- * @description Returns AI provider connections the caller may assign to an agent, each with the catalogue model ids that connection accepts. Use `models[].id` as the agent `model`. `isDefault` marks the connection and model applied when a deploy omits them. App connections (Gmail, HTTP, and similar) are listed separately at `GET /api/connections`. Credentials are never returned. Requires `agents:create`.
1465
- */
1466
- get: operations["AiConnectionsController_list"];
1467
- put?: never;
1468
- post?: never;
1469
- delete?: never;
1470
- options?: never;
1471
- head?: never;
1472
- patch?: never;
1473
- trace?: never;
1474
- };
1475
1535
  "/api/connections": {
1476
1536
  parameters: {
1477
1537
  query?: never;
@@ -1695,6 +1755,32 @@ interface paths {
1695
1755
  }
1696
1756
  interface components {
1697
1757
  schemas: {
1758
+ PublicAiModelResponseDto: {
1759
+ /** @description Catalogue model id passed to agent deploy as `model`. Example: `deepseek-ai/DeepSeek-V4-Pro`. */
1760
+ id: string;
1761
+ /** @description Display name. */
1762
+ name: string;
1763
+ /** @description True when this is the model used if an agent deploy omits `model` on this connection. */
1764
+ isDefault: boolean;
1765
+ /** @description Whether the model can call tools. */
1766
+ supportsTools: boolean;
1767
+ /** @description Whether the model accepts image input. */
1768
+ supportsVision: boolean;
1769
+ /** @description Whether the model exposes a reasoning mode. */
1770
+ supportsReasoning: boolean;
1771
+ };
1772
+ PublicAiConnectionResponseDto: {
1773
+ /** @description AiProviderConnection UUID. Pass as `aiConnectionId` / `defineAiConnection({ id })` when this connection is not the default. */
1774
+ id: string;
1775
+ /** @description Connection display name. Example: `Lunnoa LLMs`. */
1776
+ name: string;
1777
+ /** @description Provider slug. Example: `featherless` or `openai`. */
1778
+ provider: string;
1779
+ /** @description True for the connection used when an agent deploy omits `aiConnectionId`. */
1780
+ isDefault: boolean;
1781
+ /** @description Models this connection accepts. Inactive models are omitted. */
1782
+ models: components["schemas"]["PublicAiModelResponseDto"][];
1783
+ };
1698
1784
  AuthMethodFlagsDto: {
1699
1785
  /** @description True when password-based login is disabled for this deployment (via AUTH_DISABLED_METHODS). */
1700
1786
  passwordDisabled: boolean;
@@ -2298,26 +2384,13 @@ interface components {
2298
2384
  /** @description Number of item IDs submitted for deletion. */
2299
2385
  requestedCount: number;
2300
2386
  };
2301
- UpsertWorkflowStepDto: {
2302
- /**
2303
- * @description Name later steps use in ={{step:<key>,path}}. Keyed steps keep their node id across deploys. "trigger" is reserved.
2304
- * @example loadCase
2305
- */
2306
- key?: string;
2307
- /** @description Workflow app id (catalogue slug). */
2308
- appId: string;
2309
- /** @description Catalogue action id. */
2310
- actionId: string;
2311
- /** @description Connection instance UUID for this step. */
2312
- connectionId?: string;
2313
- /** @description Action input / config fields. String values may use ={{step:trigger,field}} or ={{step:<key>,path,to,value}}. */
2314
- input?: {
2315
- [key: string]: unknown;
2316
- };
2317
- /** @description Display name for the step node. */
2318
- name?: string;
2319
- /** @description Step description. */
2320
- description?: string;
2387
+ UpsertWorkflowPathConditionDto: {
2388
+ /** @description One step reference, e.g. ={{step:load,amount}}. */
2389
+ field: string;
2390
+ /** @description contains, does_not_contain, equals, does_not_equal, exists, does_not_exist, starts_with, ends_with, is_empty, is_not_empty, comes_before, comes_after, is_in_the_past, is_in_the_future, is_true, is_false, is_truthy, is_falsey, is_greater_than, is_less_than, is_greater_than_or_equal_to, is_less_than_or_equal_to, matches_regex, does_not_match_regex. */
2391
+ condition: string;
2392
+ /** @description Value to compare with. */
2393
+ value?: string;
2321
2394
  };
2322
2395
  UpsertWorkflowTriggerInputFieldDto: {
2323
2396
  /** @description Field id. Callers pass this key to workflows.execute. */
@@ -2328,14 +2401,10 @@ interface components {
2328
2401
  /** @description text, number, date, or select. Defaults to text. */
2329
2402
  inputType?: string;
2330
2403
  /** @description true, or { missingMessage, missingStatus }. */
2331
- required?: boolean | {
2332
- [key: string]: unknown;
2333
- };
2404
+ required?: Record<string, never>;
2334
2405
  /** @description Used when the caller omits the field. */
2335
- defaultValue?: unknown;
2336
- selectOptions?: {
2337
- [key: string]: unknown;
2338
- }[];
2406
+ defaultValue?: Record<string, never>;
2407
+ selectOptions?: Record<string, never>[];
2339
2408
  };
2340
2409
  UpsertWorkflowTriggerDto: {
2341
2410
  /** @description Catalogue trigger id, for example flow-control_trigger_manual. */
@@ -2354,6 +2423,59 @@ interface components {
2354
2423
  name?: string;
2355
2424
  description?: string;
2356
2425
  };
2426
+ UpsertWorkflowRetrySettingsDto: {
2427
+ enabled: boolean;
2428
+ /** @description How many times to attempt the step. */
2429
+ maxAttempts: number;
2430
+ /** @description Delay between attempts, in seconds. */
2431
+ delaySeconds: number;
2432
+ };
2433
+ UpsertWorkflowContinueOnFailureDto: {
2434
+ enabled: boolean;
2435
+ };
2436
+ UpsertWorkflowPathDto: {
2437
+ /** @description Path label, unique on its step. */
2438
+ label: string;
2439
+ /** @description Conditional Paths only. Groups are OR-ed, conditions inside a group AND-ed. Omit to always take this path. */
2440
+ when?: components["schemas"]["UpsertWorkflowPathConditionDto"][][];
2441
+ /** @description Steps on this path. */
2442
+ steps: components["schemas"]["UpsertWorkflowStepDto"][];
2443
+ };
2444
+ UpsertWorkflowStepDto: {
2445
+ /**
2446
+ * @description Name later steps use in ={{step:<key>,path}}. Keyed steps keep their node id across deploys. "trigger" is reserved.
2447
+ * @example loadCase
2448
+ */
2449
+ key?: string;
2450
+ /** @description Workflow app id (catalogue slug). */
2451
+ appId: string;
2452
+ /** @description Catalogue action id. */
2453
+ actionId: string;
2454
+ /** @description Connection instance UUID for this step. */
2455
+ connectionId?: string;
2456
+ /** @description Action input / config fields. String values may use ={{step:trigger,field}} or ={{step:<key>,path,to,value}}. */
2457
+ input?: {
2458
+ [key: string]: unknown;
2459
+ };
2460
+ /** @description Display name for the step node. */
2461
+ name?: string;
2462
+ /** @description Step description. */
2463
+ description?: string;
2464
+ retrySettings?: components["schemas"]["UpsertWorkflowRetrySettingsDto"];
2465
+ continueOnFailure?: components["schemas"]["UpsertWorkflowContinueOnFailureDto"];
2466
+ /** @description Branches after this step. Only on flow-control_action_conditional-paths, flow-control_action_manually-decide-paths, or flow-control_action_request-approval (approved path first, then rejected), and only on the last step of a list. */
2467
+ paths?: components["schemas"]["UpsertWorkflowPathDto"][];
2468
+ };
2469
+ UpsertWorkflowGraphDto: {
2470
+ /** @description Graph-file nodes. Each node has key, nodeType, appId, name, and value. The trigger key is "trigger". */
2471
+ nodes: {
2472
+ [key: string]: unknown;
2473
+ }[];
2474
+ /** @description Edges. source and target are node keys. */
2475
+ edges: {
2476
+ [key: string]: unknown;
2477
+ }[];
2478
+ };
2357
2479
  UpsertWorkflowBySlugDto: {
2358
2480
  /**
2359
2481
  * @description Stable workspace-scoped slug (lowercase, digits, hyphens). Used as the upsert key.
@@ -2365,22 +2487,39 @@ interface components {
2365
2487
  description?: string;
2366
2488
  /** @description Whether the workflow is active. */
2367
2489
  isActive?: boolean;
2368
- /** @description Catalogue trigger. Omit for a Manually Run trigger with no input fields. */
2490
+ /** @description Catalogue trigger for a steps body. Omit for a Manually Run trigger with no input fields. Not valid with `graph`. */
2369
2491
  trigger?: components["schemas"]["UpsertWorkflowTriggerDto"];
2370
- /** @description Linear catalogue-action steps (v1; no branches). */
2371
- steps: components["schemas"]["UpsertWorkflowStepDto"][];
2372
- /** @description Marks the row as managed by code (CLI / SDK). Defaults to true on this endpoint. */
2373
- managedByCode?: boolean;
2492
+ /** @description Catalogue-action steps in order. The last step may branch with `paths`. Send this or `graph`, not both. */
2493
+ steps?: components["schemas"]["UpsertWorkflowStepDto"][];
2494
+ /** @description Full graph in the graph-file shape. Send this or `steps`, not both. `trigger` is not valid with a graph. */
2495
+ graph?: components["schemas"]["UpsertWorkflowGraphDto"];
2496
+ /** @description Revision from the last pull. Required when updating a workflow that the UI can edit, unless `force` is true. */
2497
+ baseRevision?: string;
2498
+ /** @description Overwrite an existing workflow even when `baseRevision` is missing or stale. */
2499
+ force?: boolean;
2500
+ /**
2501
+ * @description How code owns this workflow. Defaults to generated on this endpoint.
2502
+ * @enum {string}
2503
+ */
2504
+ codeSource?: "synced" | "generated";
2374
2505
  };
2375
- WorkflowResponseDto: {
2506
+ UpsertWorkflowResponseDto: {
2376
2507
  /** @description Workflow ID */
2377
2508
  id: string;
2378
2509
  /** @description Workflow name */
2379
2510
  name: string;
2380
2511
  /** @description Stable workspace-scoped slug for CLI / code deploy upserts. Included when `expansion=slug` is requested. */
2381
2512
  slug?: string | null;
2382
- /** @description True when last written by code (CLI / SDK). Included when `expansion=managedByCode` is requested. */
2383
- managedByCode?: boolean;
2513
+ /**
2514
+ * @description Code source stored by this push. `generated` when the request omits it.
2515
+ * @enum {string}
2516
+ */
2517
+ codeSource?: "none" | "synced" | "generated";
2518
+ /**
2519
+ * @description Sync state against the definitions folder. Included when `expansion=codeSyncStatus` is requested.
2520
+ * @enum {string}
2521
+ */
2522
+ codeSyncStatus?: "none" | "in_sync" | "changed_in_ui" | "locked";
2384
2523
  /** @description Workflow description. Included when `expansion=description` is requested. */
2385
2524
  description?: string | null;
2386
2525
  /** @description Declared output schema from the workflow's Output Workflow Data node. Shape is a map of field ID to `{ type, description? }`. Included when `expansion=output` is requested. Null when the workflow has no declared output schema. */
@@ -2443,68 +2582,36 @@ interface components {
2443
2582
  aiConnectionId?: string | null;
2444
2583
  /** @description Selected model ID within the AI provider connection for workflow builder chat. Always returned on GET /workflows/{workflowId}. */
2445
2584
  selectedModelId?: string | null;
2446
- };
2447
- UpsertAgentToolDto: {
2448
- /** @description Workflow app id (catalogue slug). */
2449
- appId: string;
2450
- /** @description Catalogue action id. */
2451
- actionId: string;
2452
- /** @description Connection instance UUID pre-bound on the tool. */
2453
- connectionId?: string;
2454
- /** @description Tool display name for the model. */
2455
- name?: string;
2456
- /** @description Tool description shown to the model. */
2457
- description?: string;
2458
- /** @description Pre-filled tool config (fields left empty are filled by the model). */
2459
- input?: {
2585
+ /** @description sha256 hex of the canonical definition that was stored. */
2586
+ revision: string;
2587
+ /** @description Definition that was stored. Steps format when it round-trips, otherwise graph format. */
2588
+ definition: {
2460
2589
  [key: string]: unknown;
2461
2590
  };
2462
2591
  };
2463
- UpsertAgentBySlugDto: {
2464
- /**
2465
- * @description Stable workspace-scoped slug (lowercase, digits, hyphens). Used as the upsert key.
2466
- * @example support-triage
2467
- */
2468
- slug: string;
2469
- /** @description Display name. Defaults to the slug when omitted. */
2470
- name?: string;
2471
- description?: string;
2472
- /** @description System instructions / prompt for the agent. */
2473
- instructions: string;
2474
- /** @description Catalogue model id enabled on the AI connection. Example: `deepseek-ai/DeepSeek-V4-Pro`. Discover ids with GET /api/ai-connections. */
2475
- model: string;
2476
- /** @description AiProviderConnection UUID. When omitted, platform AI defaults apply. */
2477
- aiConnectionId?: string;
2478
- /** @description App Connection UUIDs the agent may use for tools. */
2479
- connectionIds?: string[];
2480
- /** @description Workflow UUIDs the agent may run (AgentWorkflow links). */
2481
- workflowIds?: string[];
2482
- /** @description Catalogue action tools (WorkflowNodeForRunner-shaped). */
2483
- tools?: components["schemas"]["UpsertAgentToolDto"][];
2484
- /** @description Marks the row as managed by code (CLI / SDK). Defaults to true on this endpoint. */
2485
- managedByCode?: boolean;
2486
- };
2487
- AgentResponseDto: {
2488
- /**
2489
- * @description Agent ID (UUID)
2490
- * @example 4f7c9d2e-8a1b-4c3d-9e5f-6a7b8c9d0e1f
2491
- */
2592
+ WorkflowResponseDto: {
2593
+ /** @description Workflow ID */
2492
2594
  id: string;
2493
- /**
2494
- * @description Agent name
2495
- * @example Invoice Triage Agent
2496
- */
2595
+ /** @description Workflow name */
2497
2596
  name: string;
2498
2597
  /** @description Stable workspace-scoped slug for CLI / code deploy upserts. Included when `expansion=slug` is requested. */
2499
2598
  slug?: string | null;
2500
- /** @description True when last written by code (CLI / SDK). Included when `expansion=managedByCode` is requested. */
2501
- managedByCode?: boolean;
2502
- /** @description ID of the AI provider connection assigned to the agent. Always included. Null when the agent falls back to the workspace default connection. */
2503
- FK_aiConnectionId: string | null;
2504
- /** @description Agent description. Included when `expansion=description` is requested. */
2599
+ /**
2600
+ * @description Where this workflow is defined. Included when `expansion=codeSource` is requested.
2601
+ * @enum {string}
2602
+ */
2603
+ codeSource?: "none" | "synced" | "generated";
2604
+ /**
2605
+ * @description Sync state against the definitions folder. Included when `expansion=codeSyncStatus` is requested.
2606
+ * @enum {string}
2607
+ */
2608
+ codeSyncStatus?: "none" | "in_sync" | "changed_in_ui" | "locked";
2609
+ /** @description Workflow description. Included when `expansion=description` is requested. */
2505
2610
  description?: string | null;
2506
- /** @description Public URL of the agent profile image. Included when `expansion=profileImageUrl` is requested. */
2507
- profileImageUrl?: string | null;
2611
+ /** @description Declared output schema from the workflow's Output Workflow Data node. Shape is a map of field ID to `{ type, description? }`. Included when `expansion=output` is requested. Null when the workflow has no declared output schema. */
2612
+ output?: {
2613
+ [key: string]: unknown;
2614
+ } | null;
2508
2615
  /**
2509
2616
  * Format: date-time
2510
2617
  * @description Creation timestamp. Included when `expansion=createdAt` is requested.
@@ -2515,19 +2622,304 @@ interface components {
2515
2622
  * @description Last update timestamp. Included when `expansion=updatedAt` is requested.
2516
2623
  */
2517
2624
  updatedAt?: string;
2518
- /** @description System instructions authored for the agent. Included when `expansion=instructions` is requested. */
2519
- instructions?: string | null;
2520
- /**
2521
- * @description Model temperature. Included when `expansion=temperature` is requested.
2522
- * @example 1
2523
- */
2524
- temperature?: number;
2525
- /** @description Maximum output tokens per turn. Included when `expansion=maxOutputTokens` is requested. */
2526
- maxOutputTokens?: number | null;
2527
- /**
2528
- * @description Top-p sampling. Included when `expansion=topP` is requested.
2529
- * @example 1
2530
- */
2625
+ /** @description Whether the workflow is active and can be triggered. Included when `expansion=isActive` is requested. */
2626
+ isActive?: boolean;
2627
+ /** @description Whether the workflow is internal (hidden from default listings). Included when `expansion=isInternal` is requested. */
2628
+ isInternal?: boolean;
2629
+ /** @description Object type whose records list this workflow's runs. Included when `expansion=objectLink` is requested. */
2630
+ objectTypeId?: string | null;
2631
+ /** @description Dot path on the trigger payload. A Lunnoa id when the type has no unique key, otherwise that key's value. Included when `expansion=objectLink` is requested. */
2632
+ objectIdPath?: string | null;
2633
+ /** @description Create a record when the unique key value is not found, then file the run on it. Included when `expansion=objectLink` is requested. */
2634
+ createObjectIfMissing?: boolean;
2635
+ /** @description Unique key on the linked object type (`name` or `attribute:<field>`). Included when `expansion=objectLink` is requested. */
2636
+ uniqueKeyField?: string | null;
2637
+ /** @description Workflow node definitions (JSON). Included when `expansion=nodes` is requested. */
2638
+ nodes?: {
2639
+ [key: string]: unknown;
2640
+ }[];
2641
+ /** @description Workflow edge definitions connecting nodes (JSON). Included when `expansion=edges` is requested. */
2642
+ edges?: {
2643
+ [key: string]: unknown;
2644
+ }[];
2645
+ /** @description The workflow trigger node definition (JSON). Included when `expansion=triggerNode` is requested. */
2646
+ triggerNode?: {
2647
+ [key: string]: unknown;
2648
+ } | null;
2649
+ /** @description IDs of the triggers and actions used by the workflow. Included when `expansion=triggerAndActionIds` is requested. */
2650
+ triggerAndActionIds?: string[];
2651
+ /** @description IDs of sub-workflows referenced by the workflow. Included when `expansion=subWorkflowIds` is requested. Only returned by GET /workflows/{workflowId}. */
2652
+ subWorkflowIds?: string[];
2653
+ /** @description IDs of agents referenced by the workflow. Included when `expansion=agentIds` is requested. Only returned by GET /workflows/{workflowId}. */
2654
+ agentIds?: string[];
2655
+ /** @description Internal polling trigger storage value. Included when `expansion=pollStorage` is requested. */
2656
+ pollStorage?: string | null;
2657
+ /**
2658
+ * Format: date-time
2659
+ * @description Timestamp of the next scheduled execution, if the workflow runs on a schedule. Included when `expansion=nextScheduledExecution` is requested.
2660
+ */
2661
+ nextScheduledExecution?: string | null;
2662
+ /**
2663
+ * @description Editor orientation of the workflow canvas. Included when `expansion=orientation` is requested.
2664
+ * @enum {string}
2665
+ */
2666
+ workflowOrientation?: "HORIZONTAL" | "VERTICAL";
2667
+ /** @description AI provider connection used by the workflow builder chat. Always returned on GET /workflows/{workflowId}. */
2668
+ aiConnectionId?: string | null;
2669
+ /** @description Selected model ID within the AI provider connection for workflow builder chat. Always returned on GET /workflows/{workflowId}. */
2670
+ selectedModelId?: string | null;
2671
+ };
2672
+ WorkflowDefinitionResponseDto: {
2673
+ /** @description Workflow ID. */
2674
+ id: string;
2675
+ /** @description Workspace-scoped slug. */
2676
+ slug: string;
2677
+ /** @description Workspace that owns the workflow. */
2678
+ workspaceId: string;
2679
+ /**
2680
+ * @description Where this workflow is defined.
2681
+ * @enum {string}
2682
+ */
2683
+ codeSource: "none" | "synced" | "generated";
2684
+ /** @description sha256 hex of the canonical workflow definition. */
2685
+ revision: string;
2686
+ /** @description Steps format when the graph round-trips through it, otherwise the graph format. */
2687
+ definition: {
2688
+ [key: string]: unknown;
2689
+ };
2690
+ };
2691
+ CodeSyncContextResponseDto: {
2692
+ /** @description Active workspace id. */
2693
+ workspaceId: string;
2694
+ /** @description When true, synced agents and workflows can only be changed by a code push. */
2695
+ lockCodeSyncedResources: boolean;
2696
+ };
2697
+ AgentSlugOrIdDto: {
2698
+ /**
2699
+ * @description Workspace slug. Send exactly one of slug or id.
2700
+ * @example support-triage
2701
+ */
2702
+ slug?: string;
2703
+ /**
2704
+ * Format: uuid
2705
+ * @description Resource UUID. Send exactly one of slug or id.
2706
+ */
2707
+ id?: string;
2708
+ };
2709
+ UpsertAgentMcpServerDto: {
2710
+ /**
2711
+ * Format: uuid
2712
+ * @description MCP server UUID.
2713
+ */
2714
+ id: string;
2715
+ /**
2716
+ * Format: uuid
2717
+ * @description User connection UUID for this server. Null clears a pinned connection.
2718
+ */
2719
+ connectionId?: string | null;
2720
+ };
2721
+ UpsertAgentToolDto: {
2722
+ /** @description Stable tool key. Omitted keys are assigned from the tool name. Pattern: ^[A-Za-z][A-Za-z0-9_-]*$. */
2723
+ key?: string;
2724
+ /** @description Workflow app id (catalogue slug). */
2725
+ appId: string;
2726
+ /** @description Catalogue action id. */
2727
+ actionId: string;
2728
+ /** @description Connection instance UUID pre-bound on the tool. */
2729
+ connectionId?: string;
2730
+ /** @description Tool display name for the model. */
2731
+ name?: string;
2732
+ /** @description Tool description shown to the model. */
2733
+ description?: string;
2734
+ /** @description Pre-filled tool config (fields left empty are filled by the model). */
2735
+ input?: {
2736
+ [key: string]: unknown;
2737
+ };
2738
+ };
2739
+ UpsertAgentSettingsDto: {
2740
+ /** @description Model temperature. */
2741
+ temperature?: number;
2742
+ /** @description Top-p sampling. */
2743
+ topP?: number;
2744
+ /** @description Maximum output tokens per turn. Null clears the cap. */
2745
+ maxOutputTokens?: number | null;
2746
+ /** @description Frequency penalty. */
2747
+ frequencyPenalty?: number;
2748
+ /** @description Presence penalty. */
2749
+ presencePenalty?: number;
2750
+ /** @description Fixed sampling seed. Null clears it. */
2751
+ seed?: number | null;
2752
+ /** @description Maximum retries for a failed model call. */
2753
+ maxRetries?: number;
2754
+ /** @description Maximum tool roundtrips per turn. */
2755
+ maxToolRoundtrips?: number;
2756
+ /** @description How many previous messages are sent to the model. */
2757
+ messageLookbackLimit?: number;
2758
+ /** @description Instructions used when auto-naming new tasks. Null clears them. */
2759
+ taskNamingInstructions?: string | null;
2760
+ /** @description IDs of enabled provider built-in tools. */
2761
+ enabledBuiltInTools?: string[];
2762
+ /** @description IDs of enabled platform tools. */
2763
+ enabledPlatformTools?: string[];
2764
+ /** @description Enabled tool-policy ids. */
2765
+ enabledToolPolicies?: string[];
2766
+ /** @description Per-tool force overrides, stored as JSON. */
2767
+ forcedTools?: {
2768
+ [key: string]: unknown;
2769
+ }[];
2770
+ /** @description Suggested prompts, in stored order. */
2771
+ suggestedPrompts?: string[];
2772
+ /** @description Index the workflow-app catalogue for discovery. */
2773
+ dynamicActionDiscoveryEnabled?: boolean;
2774
+ /** @description Index MCP servers visible to the user for discovery. */
2775
+ dynamicMcpDiscoveryEnabled?: boolean;
2776
+ /** @description Let the agent propose updates to its own instructions. */
2777
+ dynamicSelfInstructionsEnabled?: boolean;
2778
+ /** @description Whether agent memory is enabled. */
2779
+ memoryEnabled?: boolean;
2780
+ /**
2781
+ * @description Whose memories this agent reads and writes.
2782
+ * @enum {string}
2783
+ */
2784
+ memoryScope?: "PER_USER" | "PER_AGENT" | "PER_USER_PER_AGENT";
2785
+ /** @description How many days memories are kept. */
2786
+ memoryRetentionDays?: number;
2787
+ /** @description Opt in to runtime planning tools. */
2788
+ enablePlanning?: boolean;
2789
+ /** @description Gate heavy tools until the user approves a runtime plan. */
2790
+ requirePlanApproval?: boolean;
2791
+ /** @description Offload oversized tool results. */
2792
+ enableToolResultOffload?: boolean;
2793
+ /** @description Byte threshold for tool-result offload. */
2794
+ toolResultOffloadThresholdBytes?: number;
2795
+ /** @description Elevated step budget for long-running work. */
2796
+ longHorizonMode?: boolean;
2797
+ /** @description Step budget when long-horizon mode is on. Null clears it. */
2798
+ longHorizonMaxSteps?: number | null;
2799
+ /** @description Soft token budget for a long-horizon run. Null clears it. */
2800
+ longHorizonMaxTokensPerRun?: number | null;
2801
+ /**
2802
+ * @description How this agent routes prompts that contain PII.
2803
+ * @enum {string}
2804
+ */
2805
+ piiRoutingMode?: "INHERIT" | "AUTO_FALLBACK" | "ASK" | "BLOCK" | "ANONYMIZE";
2806
+ /**
2807
+ * Format: uuid
2808
+ * @description AI connection used when PII routing falls back. Null clears it.
2809
+ */
2810
+ piiFallbackConnectionId?: string | null;
2811
+ /** @description Model used when PII routing falls back. Null clears it. */
2812
+ piiFallbackModelId?: string | null;
2813
+ /** @description Web search access. Null removes the web-access row. */
2814
+ webAccess?: boolean | null;
2815
+ /** @description Outbound phone access. Null removes the phone-access row. */
2816
+ phoneAccess?: boolean | null;
2817
+ };
2818
+ UpsertAgentBySlugDto: {
2819
+ /**
2820
+ * @description Stable workspace-scoped slug (lowercase, digits, hyphens). Used as the upsert key.
2821
+ * @example support-triage
2822
+ */
2823
+ slug: string;
2824
+ /** @description Display name. Defaults to the slug when omitted on create. */
2825
+ name?: string;
2826
+ /** @description Agent description. Null clears it. */
2827
+ description?: string | null;
2828
+ /** @description System instructions / prompt for the agent. */
2829
+ instructions: string;
2830
+ /** @description Catalogue model id enabled on the AI connection. Omit or null when the definition has no model. Example: `deepseek-ai/DeepSeek-V4-Pro`. */
2831
+ model?: string | null;
2832
+ /**
2833
+ * Format: uuid
2834
+ * @description AiProviderConnection UUID. When omitted on create, platform AI defaults apply. Null clears it.
2835
+ */
2836
+ aiConnectionId?: string | null;
2837
+ /** @description App Connection UUIDs the agent may use for tools. */
2838
+ connectionIds?: string[];
2839
+ /** @description Workflow UUIDs the agent may run (AgentWorkflow links). */
2840
+ workflowIds?: string[];
2841
+ /** @description Workflows the agent may run, each by slug or id. Combined with workflowIds when both are sent. */
2842
+ workflows?: components["schemas"]["AgentSlugOrIdDto"][];
2843
+ /** @description Sub-agents, each by slug or id. */
2844
+ agents?: components["schemas"]["AgentSlugOrIdDto"][];
2845
+ /** @description Knowledge item UUIDs attached to the agent. */
2846
+ knowledgeIds?: string[];
2847
+ /** @description Variable UUIDs attached to the agent. */
2848
+ variableIds?: string[];
2849
+ /** @description Object UUIDs attached to the agent. */
2850
+ objectIds?: string[];
2851
+ /** @description Object type UUIDs attached to the agent. */
2852
+ objectTypeIds?: string[];
2853
+ /** @description A2A agent UUIDs attached to the agent. */
2854
+ a2aAgentIds?: string[];
2855
+ /** @description MCP servers pinned on the agent. */
2856
+ mcpServers?: components["schemas"]["UpsertAgentMcpServerDto"][];
2857
+ /** @description Catalogue action tools. A tool key is kept across pushes. */
2858
+ tools?: components["schemas"]["UpsertAgentToolDto"][];
2859
+ /** @description Agent settings. Omitted keys are left unchanged on update. */
2860
+ settings?: components["schemas"]["UpsertAgentSettingsDto"];
2861
+ /**
2862
+ * @description How code owns this agent. Defaults to generated on this endpoint.
2863
+ * @enum {string}
2864
+ */
2865
+ codeSource?: "synced" | "generated";
2866
+ /** @description Revision from the last pull. Required when updating an agent that is not a generated redeploy, unless force is set. */
2867
+ baseRevision?: string;
2868
+ /** @description Overwrite even when baseRevision is missing or stale. */
2869
+ force?: boolean;
2870
+ };
2871
+ AgentUpsertResponseDto: {
2872
+ /**
2873
+ * @description Agent ID (UUID)
2874
+ * @example 4f7c9d2e-8a1b-4c3d-9e5f-6a7b8c9d0e1f
2875
+ */
2876
+ id: string;
2877
+ /**
2878
+ * @description Agent name
2879
+ * @example Invoice Triage Agent
2880
+ */
2881
+ name: string;
2882
+ /** @description Stable workspace-scoped slug for CLI / code deploy upserts. Included when `expansion=slug` is requested. */
2883
+ slug?: string | null;
2884
+ /**
2885
+ * @description Where this agent is defined. Taken from the request, or generated when omitted.
2886
+ * @enum {string}
2887
+ */
2888
+ codeSource?: "none" | "synced" | "generated";
2889
+ /**
2890
+ * @description Sync state against the definitions folder. Included when `expansion=codeSyncStatus` is requested.
2891
+ * @enum {string}
2892
+ */
2893
+ codeSyncStatus?: "none" | "in_sync" | "changed_in_ui" | "locked";
2894
+ /** @description ID of the AI provider connection assigned to the agent. Always included. Null when the agent falls back to the workspace default connection. */
2895
+ FK_aiConnectionId: string | null;
2896
+ /** @description Agent description. Included when `expansion=description` is requested. */
2897
+ description?: string | null;
2898
+ /** @description Public URL of the agent profile image. Included when `expansion=profileImageUrl` is requested. */
2899
+ profileImageUrl?: string | null;
2900
+ /**
2901
+ * Format: date-time
2902
+ * @description Creation timestamp. Included when `expansion=createdAt` is requested.
2903
+ */
2904
+ createdAt?: string;
2905
+ /**
2906
+ * Format: date-time
2907
+ * @description Last update timestamp. Included when `expansion=updatedAt` is requested.
2908
+ */
2909
+ updatedAt?: string;
2910
+ /** @description System instructions authored for the agent. Included when `expansion=instructions` is requested. */
2911
+ instructions?: string | null;
2912
+ /**
2913
+ * @description Model temperature. Included when `expansion=temperature` is requested.
2914
+ * @example 1
2915
+ */
2916
+ temperature?: number;
2917
+ /** @description Maximum output tokens per turn. Included when `expansion=maxOutputTokens` is requested. */
2918
+ maxOutputTokens?: number | null;
2919
+ /**
2920
+ * @description Top-p sampling. Included when `expansion=topP` is requested.
2921
+ * @example 1
2922
+ */
2531
2923
  topP?: number;
2532
2924
  /**
2533
2925
  * @description Frequency penalty. Included when `expansion=frequencyPenalty` is requested.
@@ -2608,7 +3000,7 @@ interface components {
2608
3000
  suggestedPrompts?: string[];
2609
3001
  /**
2610
3002
  * Format: date-time
2611
- * @description When the first-time builder setup wizard was completed. Included when `expansion=builderSetupCompletedAt` is requested.
3003
+ * @description When builder setup was completed (the first-time wizard, or a code deploy). Included when `expansion=builderSetupCompletedAt` is requested.
2612
3004
  */
2613
3005
  builderSetupCompletedAt?: string | null;
2614
3006
  /** @description Saved canvas node positions for the agent builder. Included when `expansion=builderCanvasPositions` is requested. */
@@ -2738,6 +3130,294 @@ interface components {
2738
3130
  outboundCallsEnabled?: boolean;
2739
3131
  inboundCallsEnabled?: boolean;
2740
3132
  } | null;
3133
+ /** @description sha256 hex of the stored agent definition. */
3134
+ revision: string;
3135
+ /** @description Stored agent definition in the file shape, including settings, tools, and linked resources. */
3136
+ definition: {
3137
+ [key: string]: unknown;
3138
+ };
3139
+ };
3140
+ AgentResponseDto: {
3141
+ /**
3142
+ * @description Agent ID (UUID)
3143
+ * @example 4f7c9d2e-8a1b-4c3d-9e5f-6a7b8c9d0e1f
3144
+ */
3145
+ id: string;
3146
+ /**
3147
+ * @description Agent name
3148
+ * @example Invoice Triage Agent
3149
+ */
3150
+ name: string;
3151
+ /** @description Stable workspace-scoped slug for CLI / code deploy upserts. Included when `expansion=slug` is requested. */
3152
+ slug?: string | null;
3153
+ /**
3154
+ * @description Where this agent is defined. Included when `expansion=codeSource` is requested.
3155
+ * @enum {string}
3156
+ */
3157
+ codeSource?: "none" | "synced" | "generated";
3158
+ /**
3159
+ * @description Sync state against the definitions folder. Included when `expansion=codeSyncStatus` is requested.
3160
+ * @enum {string}
3161
+ */
3162
+ codeSyncStatus?: "none" | "in_sync" | "changed_in_ui" | "locked";
3163
+ /** @description ID of the AI provider connection assigned to the agent. Always included. Null when the agent falls back to the workspace default connection. */
3164
+ FK_aiConnectionId: string | null;
3165
+ /** @description Agent description. Included when `expansion=description` is requested. */
3166
+ description?: string | null;
3167
+ /** @description Public URL of the agent profile image. Included when `expansion=profileImageUrl` is requested. */
3168
+ profileImageUrl?: string | null;
3169
+ /**
3170
+ * Format: date-time
3171
+ * @description Creation timestamp. Included when `expansion=createdAt` is requested.
3172
+ */
3173
+ createdAt?: string;
3174
+ /**
3175
+ * Format: date-time
3176
+ * @description Last update timestamp. Included when `expansion=updatedAt` is requested.
3177
+ */
3178
+ updatedAt?: string;
3179
+ /** @description System instructions authored for the agent. Included when `expansion=instructions` is requested. */
3180
+ instructions?: string | null;
3181
+ /**
3182
+ * @description Model temperature. Included when `expansion=temperature` is requested.
3183
+ * @example 1
3184
+ */
3185
+ temperature?: number;
3186
+ /** @description Maximum output tokens per turn. Included when `expansion=maxOutputTokens` is requested. */
3187
+ maxOutputTokens?: number | null;
3188
+ /**
3189
+ * @description Top-p sampling. Included when `expansion=topP` is requested.
3190
+ * @example 1
3191
+ */
3192
+ topP?: number;
3193
+ /**
3194
+ * @description Frequency penalty. Included when `expansion=frequencyPenalty` is requested.
3195
+ * @example 0
3196
+ */
3197
+ frequencyPenalty?: number;
3198
+ /**
3199
+ * @description Presence penalty. Included when `expansion=presencePenalty` is requested.
3200
+ * @example 0
3201
+ */
3202
+ presencePenalty?: number;
3203
+ /**
3204
+ * @description Maximum retries for a failed model call. Included when `expansion=maxRetries` is requested.
3205
+ * @example 0
3206
+ */
3207
+ maxRetries?: number;
3208
+ /** @description Fixed sampling seed. Included when `expansion=seed` is requested. */
3209
+ seed?: number | null;
3210
+ /**
3211
+ * @description Maximum tool roundtrips per turn. Included when `expansion=maxToolRoundtrips` is requested.
3212
+ * @example 5
3213
+ */
3214
+ maxToolRoundtrips?: number;
3215
+ /**
3216
+ * @description How many previous messages are sent to the model. Included when `expansion=messageLookbackLimit` is requested.
3217
+ * @example 40
3218
+ */
3219
+ messageLookbackLimit?: number;
3220
+ /** @description Configured tool nodes (app actions) for the agent. Included when `expansion=tools` is requested. */
3221
+ tools?: {
3222
+ [key: string]: unknown;
3223
+ }[] | null;
3224
+ /** @description Action IDs of the configured tools. Included when `expansion=toolIds` is requested. */
3225
+ toolIds?: string[];
3226
+ /** @description Instructions used when auto-naming new tasks. Included when `expansion=taskNamingInstructions` is requested. */
3227
+ taskNamingInstructions?: string | null;
3228
+ /** @description IDs of enabled provider built-in tools. Included when `expansion=enabledBuiltInTools` is requested. */
3229
+ enabledBuiltInTools?: string[];
3230
+ /** @description IDs of enabled platform tools. Included when `expansion=enabledPlatformTools` is requested. */
3231
+ enabledPlatformTools?: string[];
3232
+ /** @description Whether dynamic workflow-app action discovery is enabled. Included when `expansion=dynamicActionDiscoveryEnabled` is requested. */
3233
+ dynamicActionDiscoveryEnabled?: boolean;
3234
+ /** @description Whether dynamic MCP server discovery is enabled. Included when `expansion=dynamicMcpDiscoveryEnabled` is requested. */
3235
+ dynamicMcpDiscoveryEnabled?: boolean;
3236
+ /** @description Whether the agent maintains its own instructions. Included when `expansion=dynamicSelfInstructionsEnabled` is requested. */
3237
+ dynamicSelfInstructionsEnabled?: boolean;
3238
+ /** @description Whether long-term memory is enabled. Included when `expansion=memoryEnabled` is requested. */
3239
+ memoryEnabled?: boolean;
3240
+ /** @description Whether runtime planning tools are enabled. Included when `expansion=enablePlanning` is requested. */
3241
+ enablePlanning?: boolean;
3242
+ /** @description Whether oversized tool-result offload is enabled. Included when `expansion=enableToolResultOffload` is requested. */
3243
+ enableToolResultOffload?: boolean;
3244
+ /** @description Byte threshold for tool-result offload. Included when `expansion=toolResultOffloadThresholdBytes` is requested. */
3245
+ toolResultOffloadThresholdBytes?: number;
3246
+ /** @description Whether long-horizon mode is enabled. Included when `expansion=longHorizonMode` is requested. */
3247
+ longHorizonMode?: boolean;
3248
+ /** @description prepareStep safety-net policy ids. Included when `expansion=enabledToolPolicies` is requested. */
3249
+ enabledToolPolicies?: string[];
3250
+ /** @description Per-tool force overrides. Included when `expansion=forcedTools` is requested. */
3251
+ forcedTools?: string[];
3252
+ /** @description When true with planning, gate heavy tools until plan approval. Included when `expansion=requirePlanApproval` is requested. */
3253
+ requirePlanApproval?: boolean;
3254
+ /** @description Optional elevated max steps for long-horizon mode. Included when `expansion=longHorizonMaxSteps` is requested. */
3255
+ longHorizonMaxSteps?: number | null;
3256
+ /** @description Optional max tokens per run hint for long-horizon mode. Included when `expansion=longHorizonMaxTokensPerRun` is requested. */
3257
+ longHorizonMaxTokensPerRun?: number | null;
3258
+ /**
3259
+ * @description Memory partitioning scope. Included when `expansion=memoryScope` is requested.
3260
+ * @enum {string}
3261
+ */
3262
+ memoryScope?: "PER_USER" | "PER_AGENT" | "PER_USER_PER_AGENT";
3263
+ /**
3264
+ * @description Days memories are retained. Included when `expansion=memoryRetentionDays` is requested.
3265
+ * @example 90
3266
+ */
3267
+ memoryRetentionDays?: number;
3268
+ /** @description Suggested prompts shown to users starting a conversation. Included when `expansion=suggestedPrompts` is requested. */
3269
+ suggestedPrompts?: string[];
3270
+ /**
3271
+ * Format: date-time
3272
+ * @description When builder setup was completed (the first-time wizard, or a code deploy). Included when `expansion=builderSetupCompletedAt` is requested.
3273
+ */
3274
+ builderSetupCompletedAt?: string | null;
3275
+ /** @description Saved canvas node positions for the agent builder. Included when `expansion=builderCanvasPositions` is requested. */
3276
+ builderCanvasPositions?: {
3277
+ [key: string]: unknown;
3278
+ } | null;
3279
+ /** @description Selected model ID within the AI provider connection. Included when `expansion=selectedModelId` is requested. */
3280
+ selectedModelId?: string | null;
3281
+ /** @description Assigned AI provider connection. Included when `expansion=aiConnection` is requested. */
3282
+ aiConnection?: {
3283
+ id?: string;
3284
+ name?: string;
3285
+ providerConfig?: {
3286
+ id?: string;
3287
+ providerSlug?: string;
3288
+ };
3289
+ } | null;
3290
+ /** @description Knowledge notebooks attached to the agent. Included when `expansion=knowledge` is requested. */
3291
+ agentKnowledge?: {
3292
+ id?: string;
3293
+ knowledge?: {
3294
+ id?: string;
3295
+ name?: string;
3296
+ };
3297
+ }[];
3298
+ /** @description Object types attached to the agent. Included when `expansion=objectTypes` is requested. */
3299
+ agentObjectTypes?: {
3300
+ id?: string;
3301
+ scope?: string;
3302
+ objectType?: {
3303
+ id?: string;
3304
+ name?: string;
3305
+ slug?: string;
3306
+ icon?: string | null;
3307
+ color?: string | null;
3308
+ };
3309
+ }[];
3310
+ /** @description Objects attached to the agent. Included when `expansion=objects` is requested. */
3311
+ agentObjects?: {
3312
+ id?: string;
3313
+ scope?: string;
3314
+ object?: {
3315
+ id?: string;
3316
+ name?: string;
3317
+ state?: string;
3318
+ objectType?: {
3319
+ id?: string;
3320
+ name?: string;
3321
+ slug?: string;
3322
+ icon?: string | null;
3323
+ color?: string | null;
3324
+ };
3325
+ };
3326
+ }[];
3327
+ /** @description App connections available to the agent. Included when `expansion=connections` is requested. */
3328
+ connections?: {
3329
+ id?: string;
3330
+ name?: string;
3331
+ }[];
3332
+ /** @description Variables attached to the agent. Included when `expansion=variables` is requested. */
3333
+ agentVariables?: {
3334
+ id?: string;
3335
+ variable?: {
3336
+ id?: string;
3337
+ name?: string;
3338
+ };
3339
+ }[];
3340
+ /** @description Workflows the agent can trigger. Included when `expansion=workflows` is requested. */
3341
+ agentWorkflows?: {
3342
+ id?: string;
3343
+ workflow?: {
3344
+ id?: string;
3345
+ name?: string;
3346
+ };
3347
+ }[];
3348
+ /** @description Sub-agent links for the agent. Included when `expansion=subAgents` is requested. */
3349
+ agentSubAgents?: {
3350
+ id?: string;
3351
+ subagent?: {
3352
+ id?: string;
3353
+ name?: string;
3354
+ };
3355
+ parentAgent?: {
3356
+ id?: string;
3357
+ name?: string;
3358
+ };
3359
+ }[];
3360
+ /** @description MCP servers attached to the agent, with per-tool overrides. Included when `expansion=mcpServers` is requested. */
3361
+ agentMcpServers?: {
3362
+ id?: string;
3363
+ mcpServer?: {
3364
+ id?: string;
3365
+ slug?: string;
3366
+ name?: string;
3367
+ provider?: string;
3368
+ logoUrl?: string | null;
3369
+ description?: string | null;
3370
+ };
3371
+ toolOverrides?: {
3372
+ id?: string;
3373
+ toolName?: string;
3374
+ enabled?: boolean;
3375
+ requireApproval?: boolean;
3376
+ }[];
3377
+ }[];
3378
+ /** @description A2A (agent-to-agent) endpoints attached to the agent. Included when `expansion=a2aAgents` is requested. */
3379
+ agentA2aAgents?: {
3380
+ id?: string;
3381
+ a2aAgent?: {
3382
+ id?: string;
3383
+ slug?: string;
3384
+ name?: string;
3385
+ logoUrl?: string | null;
3386
+ description?: string | null;
3387
+ authType?: string;
3388
+ };
3389
+ }[];
3390
+ /** @description Web access configuration. Included when `expansion=webAccess` is requested. */
3391
+ agentWebAccess?: {
3392
+ service?: string;
3393
+ webSearchEnabled?: boolean;
3394
+ websiteAccessEnabled?: boolean;
3395
+ } | null;
3396
+ /** @description Phone access configuration. Included when `expansion=phoneAccess` is requested. */
3397
+ agentPhoneAccess?: {
3398
+ service?: string;
3399
+ outboundCallsEnabled?: boolean;
3400
+ inboundCallsEnabled?: boolean;
3401
+ } | null;
3402
+ };
3403
+ AgentDefinitionResponseDto: {
3404
+ /** @description Agent ID (UUID). */
3405
+ id: string;
3406
+ /** @description Workspace-scoped slug. */
3407
+ slug: string;
3408
+ /** @description Workspace that owns the agent. */
3409
+ workspaceId: string;
3410
+ /**
3411
+ * @description Where this agent is defined.
3412
+ * @enum {string}
3413
+ */
3414
+ codeSource: "none" | "synced" | "generated";
3415
+ /** @description sha256 hex of the canonical agent definition. */
3416
+ revision: string;
3417
+ /** @description Agent definition in the file shape (kind, slug, settings, tools, and linked resources). */
3418
+ definition: {
3419
+ [key: string]: unknown;
3420
+ };
2741
3421
  };
2742
3422
  WorkflowAppResponseDto: {
2743
3423
  /** @description App ID, e.g. `gmail`. Matches the appId used in workflow execution steps. */
@@ -3610,32 +4290,6 @@ interface components {
3610
4290
  /** Format: date-time */
3611
4291
  updatedAt: string;
3612
4292
  };
3613
- PublicAiModelResponseDto: {
3614
- /** @description Catalogue model id passed to agent deploy as `model`. Example: `deepseek-ai/DeepSeek-V4-Pro`. */
3615
- id: string;
3616
- /** @description Display name. */
3617
- name: string;
3618
- /** @description True when this is the model used if an agent deploy omits `model` on this connection. */
3619
- isDefault: boolean;
3620
- /** @description Whether the model can call tools. */
3621
- supportsTools: boolean;
3622
- /** @description Whether the model accepts image input. */
3623
- supportsVision: boolean;
3624
- /** @description Whether the model exposes a reasoning mode. */
3625
- supportsReasoning: boolean;
3626
- };
3627
- PublicAiConnectionResponseDto: {
3628
- /** @description AiProviderConnection UUID. Pass as `aiConnectionId` / `defineAiConnection({ id })` when this connection is not the default. */
3629
- id: string;
3630
- /** @description Connection display name. Example: `Lunnoa LLMs`. */
3631
- name: string;
3632
- /** @description Provider slug. Example: `featherless` or `openai`. */
3633
- provider: string;
3634
- /** @description True for the connection used when an agent deploy omits `aiConnectionId`. */
3635
- isDefault: boolean;
3636
- /** @description Models this connection accepts. Inactive models are omitted. */
3637
- models: components["schemas"]["PublicAiModelResponseDto"][];
3638
- };
3639
4293
  ConnectionWorkspaceDto: {
3640
4294
  /** @description Workspace ID. */
3641
4295
  id: string;
@@ -3757,6 +4411,20 @@ interface components {
3757
4411
  activeStreamId?: string;
3758
4412
  /** @description Durable outcome of the most recent agent-turn run. Omitted when the task has never run. */
3759
4413
  latestRun?: components["schemas"]["TaskLatestRunDto"];
4414
+ /** @description Runtime todo/plan for this task when the agent has planning enabled (CTO-258). Always returned from the single-task endpoints. */
4415
+ runtimePlan?: {
4416
+ id?: string;
4417
+ content?: string;
4418
+ /** @enum {string} */
4419
+ status?: "pending" | "in_progress" | "completed" | "cancelled";
4420
+ /** Format: date-time */
4421
+ updatedAt?: string;
4422
+ }[] | null;
4423
+ /**
4424
+ * Format: date-time
4425
+ * @description When the current runtime plan was approved (HITL). Null until approved or after the plan is rewritten.
4426
+ */
4427
+ planApprovedAt?: string | null;
3760
4428
  /** @description Task description. Included when `expansion=description` is requested. */
3761
4429
  description?: string | null;
3762
4430
  /**
@@ -3868,7 +4536,7 @@ interface components {
3868
4536
  [key: string]: unknown;
3869
4537
  }[];
3870
4538
  /**
3871
- * @description Agent chat mode
4539
+ * @description Loop to run. Omit or send `preview` for an app, public chat, or workflow turn (10 model rounds). `builder` is the agent-editor interview and stops after 4 rounds.
3872
4540
  * @example preview
3873
4541
  * @enum {string}
3874
4542
  */
@@ -3900,6 +4568,26 @@ interface components {
3900
4568
  pathItems: never;
3901
4569
  }
3902
4570
  interface operations {
4571
+ AiConnectionsController_list: {
4572
+ parameters: {
4573
+ query?: never;
4574
+ header?: never;
4575
+ path?: never;
4576
+ cookie?: never;
4577
+ };
4578
+ requestBody?: never;
4579
+ responses: {
4580
+ /** @description AI connections and the models each one accepts. */
4581
+ 200: {
4582
+ headers: {
4583
+ [name: string]: unknown;
4584
+ };
4585
+ content: {
4586
+ "application/json": components["schemas"]["PublicAiConnectionResponseDto"][];
4587
+ };
4588
+ };
4589
+ };
4590
+ };
3903
4591
  DiscoveryController_getEnabledWorkspaceFeatures: {
3904
4592
  parameters: {
3905
4593
  query?: never;
@@ -4687,7 +5375,7 @@ interface operations {
4687
5375
  includeType?: string;
4688
5376
  /** @description Comma-separated key:value filters. Available: agentCanTrigger. Example: filterBy=agentCanTrigger:true */
4689
5377
  filterBy?: string;
4690
- /** @description Comma-separated fields to expand. Available: createdAt, updatedAt, isActive, isInternal, description, output, nodes, edges, triggerNode, triggerAndActionIds, pollStorage, nextScheduledExecution, orientation. Example: expansion=description,isActive */
5378
+ /** @description Comma-separated fields to expand. Available: createdAt, updatedAt, isActive, isInternal, slug, codeSource, codeSyncStatus, description, output, nodes, edges, triggerNode, triggerAndActionIds, pollStorage, nextScheduledExecution, orientation. Example: expansion=description,isActive */
4691
5379
  expansion?: string;
4692
5380
  };
4693
5381
  header?: never;
@@ -4720,21 +5408,57 @@ interface operations {
4720
5408
  };
4721
5409
  };
4722
5410
  responses: {
4723
- /** @description The created or updated workflow. */
5411
+ /** @description The created or updated workflow, including its stored revision and definition. */
4724
5412
  200: {
4725
5413
  headers: {
4726
5414
  [name: string]: unknown;
4727
5415
  };
4728
5416
  content: {
4729
- "application/json": components["schemas"]["WorkflowResponseDto"];
5417
+ "application/json": components["schemas"]["UpsertWorkflowResponseDto"];
5418
+ };
5419
+ };
5420
+ /** @description The slug already exists and baseRevision was omitted, or the workflow changed in the UI since baseRevision. The body message explains which, and currentRevision is set when the revision check failed. A lost optimistic-concurrency race returns the same 409. */
5421
+ 409: {
5422
+ headers: {
5423
+ [name: string]: unknown;
5424
+ };
5425
+ content?: never;
5426
+ };
5427
+ };
5428
+ };
5429
+ WorkflowsController_getDefinitionBySlug: {
5430
+ parameters: {
5431
+ query?: never;
5432
+ header?: never;
5433
+ path: {
5434
+ slug: string;
5435
+ };
5436
+ cookie?: never;
5437
+ };
5438
+ requestBody?: never;
5439
+ responses: {
5440
+ /** @description The workflow id, code source, revision, and definition. */
5441
+ 200: {
5442
+ headers: {
5443
+ [name: string]: unknown;
5444
+ };
5445
+ content: {
5446
+ "application/json": components["schemas"]["WorkflowDefinitionResponseDto"];
5447
+ };
5448
+ };
5449
+ /** @description No workflow with this slug exists in the workspace. */
5450
+ 404: {
5451
+ headers: {
5452
+ [name: string]: unknown;
4730
5453
  };
5454
+ content?: never;
4731
5455
  };
4732
5456
  };
4733
5457
  };
4734
5458
  WorkflowsController_findOne: {
4735
5459
  parameters: {
4736
5460
  query?: {
4737
- /** @description Comma-separated fields to expand. Available: createdAt, updatedAt, isActive, isInternal, description, output, project, nodes, edges, triggerNode, triggerAndActionIds, subWorkflowIds, agentIds, pollStorage, nextScheduledExecution, orientation. Example: expansion=description,nodes,edges */
5461
+ /** @description Comma-separated fields to expand. Available: createdAt, updatedAt, isActive, isInternal, slug, codeSource, codeSyncStatus, description, output, project, nodes, edges, triggerNode, triggerAndActionIds, subWorkflowIds, agentIds, pollStorage, nextScheduledExecution, orientation. Example: expansion=description,nodes,edges */
4738
5462
  expansion?: string;
4739
5463
  };
4740
5464
  header?: never;
@@ -4756,6 +5480,26 @@ interface operations {
4756
5480
  };
4757
5481
  };
4758
5482
  };
5483
+ CodeSyncController_getContext: {
5484
+ parameters: {
5485
+ query?: never;
5486
+ header?: never;
5487
+ path?: never;
5488
+ cookie?: never;
5489
+ };
5490
+ requestBody?: never;
5491
+ responses: {
5492
+ /** @description Workspace id and the lock-code-synced-resources preference. */
5493
+ 200: {
5494
+ headers: {
5495
+ [name: string]: unknown;
5496
+ };
5497
+ content: {
5498
+ "application/json": components["schemas"]["CodeSyncContextResponseDto"];
5499
+ };
5500
+ };
5501
+ };
5502
+ };
4759
5503
  AgentsController_findAllForWorkspace: {
4760
5504
  parameters: {
4761
5505
  query?: {
@@ -4763,7 +5507,7 @@ interface operations {
4763
5507
  includeType?: string;
4764
5508
  /** @description Filters in `key:value` format, comma-separated. */
4765
5509
  filterBy?: string;
4766
- /** @description Comma-separated fields to expand, e.g. `expansion=description,createdAt`. Available: createdAt, updatedAt, description, profileImageUrl, instructions, temperature, maxOutputTokens, topP, frequencyPenalty, presencePenalty, maxRetries, seed, maxToolRoundtrips, messageLookbackLimit, tools, toolIds, knowledge, objects, objectTypes, connections, variables, workflows, subAgents, webAccess, phoneAccess, aiConnection, selectedModelId, taskNamingInstructions, enabledBuiltInTools, enabledPlatformTools, mcpServers, a2aAgents, dynamicActionDiscoveryEnabled, dynamicMcpDiscoveryEnabled, dynamicSelfInstructionsEnabled, memoryEnabled, memoryScope, memoryRetentionDays, enablePlanning, enableToolResultOffload, toolResultOffloadThresholdBytes, longHorizonMode, longHorizonMaxSteps, longHorizonMaxTokensPerRun, enabledToolPolicies, forcedTools, requirePlanApproval, suggestedPrompts, builderSetupCompletedAt, builderCanvasPositions, slug, managedByCode */
5510
+ /** @description Comma-separated fields to expand, e.g. `expansion=description,createdAt`. Available: createdAt, updatedAt, description, profileImageUrl, instructions, temperature, maxOutputTokens, topP, frequencyPenalty, presencePenalty, maxRetries, seed, maxToolRoundtrips, messageLookbackLimit, tools, toolIds, knowledge, objects, objectTypes, connections, variables, workflows, subAgents, webAccess, phoneAccess, aiConnection, selectedModelId, taskNamingInstructions, enabledBuiltInTools, enabledPlatformTools, mcpServers, a2aAgents, dynamicActionDiscoveryEnabled, dynamicMcpDiscoveryEnabled, dynamicSelfInstructionsEnabled, memoryEnabled, memoryScope, memoryRetentionDays, enablePlanning, enableToolResultOffload, toolResultOffloadThresholdBytes, longHorizonMode, longHorizonMaxSteps, longHorizonMaxTokensPerRun, enabledToolPolicies, forcedTools, requirePlanApproval, suggestedPrompts, builderSetupCompletedAt, builderCanvasPositions, slug, codeSource, codeSyncStatus */
4767
5511
  expansion?: string;
4768
5512
  };
4769
5513
  header?: never;
@@ -4796,21 +5540,57 @@ interface operations {
4796
5540
  };
4797
5541
  };
4798
5542
  responses: {
4799
- /** @description The created or updated agent. */
5543
+ /** @description The created or updated agent, including its stored definition and revision. */
4800
5544
  200: {
4801
5545
  headers: {
4802
5546
  [name: string]: unknown;
4803
5547
  };
4804
5548
  content: {
4805
- "application/json": components["schemas"]["AgentResponseDto"];
5549
+ "application/json": components["schemas"]["AgentUpsertResponseDto"];
5550
+ };
5551
+ };
5552
+ /** @description The slug already exists and baseRevision is missing or stale, or the agent changed during the write. The body includes the server message and, when known, currentRevision. */
5553
+ 409: {
5554
+ headers: {
5555
+ [name: string]: unknown;
5556
+ };
5557
+ content?: never;
5558
+ };
5559
+ };
5560
+ };
5561
+ AgentsController_getDefinitionBySlug: {
5562
+ parameters: {
5563
+ query?: never;
5564
+ header?: never;
5565
+ path: {
5566
+ slug: string;
5567
+ };
5568
+ cookie?: never;
5569
+ };
5570
+ requestBody?: never;
5571
+ responses: {
5572
+ /** @description The agent definition and its revision. */
5573
+ 200: {
5574
+ headers: {
5575
+ [name: string]: unknown;
5576
+ };
5577
+ content: {
5578
+ "application/json": components["schemas"]["AgentDefinitionResponseDto"];
5579
+ };
5580
+ };
5581
+ /** @description No agent with this slug exists in the workspace. */
5582
+ 404: {
5583
+ headers: {
5584
+ [name: string]: unknown;
4806
5585
  };
5586
+ content?: never;
4807
5587
  };
4808
5588
  };
4809
5589
  };
4810
5590
  AgentsController_findOne: {
4811
5591
  parameters: {
4812
5592
  query?: {
4813
- /** @description Comma-separated fields to expand, e.g. `expansion=description,createdAt`. Available: createdAt, updatedAt, description, profileImageUrl, instructions, temperature, maxOutputTokens, topP, frequencyPenalty, presencePenalty, maxRetries, seed, maxToolRoundtrips, messageLookbackLimit, tools, toolIds, knowledge, objects, objectTypes, connections, variables, workflows, subAgents, webAccess, phoneAccess, aiConnection, selectedModelId, taskNamingInstructions, enabledBuiltInTools, enabledPlatformTools, mcpServers, a2aAgents, dynamicActionDiscoveryEnabled, dynamicMcpDiscoveryEnabled, dynamicSelfInstructionsEnabled, memoryEnabled, memoryScope, memoryRetentionDays, enablePlanning, enableToolResultOffload, toolResultOffloadThresholdBytes, longHorizonMode, longHorizonMaxSteps, longHorizonMaxTokensPerRun, enabledToolPolicies, forcedTools, requirePlanApproval, suggestedPrompts, builderSetupCompletedAt, builderCanvasPositions, slug, managedByCode */
5593
+ /** @description Comma-separated fields to expand, e.g. `expansion=description,createdAt`. Available: createdAt, updatedAt, description, profileImageUrl, instructions, temperature, maxOutputTokens, topP, frequencyPenalty, presencePenalty, maxRetries, seed, maxToolRoundtrips, messageLookbackLimit, tools, toolIds, knowledge, objects, objectTypes, connections, variables, workflows, subAgents, webAccess, phoneAccess, aiConnection, selectedModelId, taskNamingInstructions, enabledBuiltInTools, enabledPlatformTools, mcpServers, a2aAgents, dynamicActionDiscoveryEnabled, dynamicMcpDiscoveryEnabled, dynamicSelfInstructionsEnabled, memoryEnabled, memoryScope, memoryRetentionDays, enablePlanning, enableToolResultOffload, toolResultOffloadThresholdBytes, longHorizonMode, longHorizonMaxSteps, longHorizonMaxTokensPerRun, enabledToolPolicies, forcedTools, requirePlanApproval, suggestedPrompts, builderSetupCompletedAt, builderCanvasPositions, slug, codeSource, codeSyncStatus */
4814
5594
  expansion?: string;
4815
5595
  };
4816
5596
  header?: never;
@@ -5905,26 +6685,6 @@ interface operations {
5905
6685
  };
5906
6686
  };
5907
6687
  };
5908
- AiConnectionsController_list: {
5909
- parameters: {
5910
- query?: never;
5911
- header?: never;
5912
- path?: never;
5913
- cookie?: never;
5914
- };
5915
- requestBody?: never;
5916
- responses: {
5917
- /** @description AI connections and the models each one accepts. */
5918
- 200: {
5919
- headers: {
5920
- [name: string]: unknown;
5921
- };
5922
- content: {
5923
- "application/json": components["schemas"]["PublicAiConnectionResponseDto"][];
5924
- };
5925
- };
5926
- };
5927
- };
5928
6688
  ConnectionsController_findAllForWorkspace: {
5929
6689
  parameters: {
5930
6690
  query?: {
@@ -6349,15 +7109,38 @@ interface operations {
6349
7109
  */
6350
7110
 
6351
7111
  type Schemas = components['schemas'];
7112
+ /** Where an agent or workflow definition was last written from. */
7113
+ type CodeSource = 'none' | 'synced' | 'generated';
7114
+ /** Computed on read. `locked` means the UI cannot edit the definition. */
7115
+ type CodeSyncStatus = 'none' | 'in_sync' | 'changed_in_ui' | 'locked';
7116
+ interface CodeSyncContext {
7117
+ workspaceId: string;
7118
+ lockCodeSyncedResources: boolean;
7119
+ }
7120
+ /** `GET /api/{agents|workflows}/slug/:slug/definition`. */
7121
+ interface CodeDefinitionResponse<TDefinition> {
7122
+ id: string;
7123
+ slug: string;
7124
+ workspaceId: string;
7125
+ codeSource: CodeSource;
7126
+ revision: string;
7127
+ definition: TDefinition;
7128
+ }
6352
7129
  type EnabledFeatures = Schemas['EnabledFeaturesResponseDto'];
6353
- type Agent = Schemas['AgentResponseDto'];
7130
+ type Agent = Omit<Schemas['AgentResponseDto'], 'managedByCode'> & {
7131
+ codeSource?: CodeSource;
7132
+ codeSyncStatus?: CodeSyncStatus;
7133
+ };
6354
7134
  type Task = Schemas['TaskResponseDto'];
6355
7135
  type TaskListItem = Schemas['TaskListItemResponseDto'];
6356
7136
  type CreateTaskInput = Schemas['CreateTaskDto'];
6357
7137
  type UpdateTaskInput = Schemas['UpdateTaskDto'];
6358
7138
  type DeletedTask = Schemas['DeletedTaskResponseDto'];
6359
7139
  type MessageTaskInput = Schemas['MessageTaskDto'];
6360
- type Workflow = Schemas['WorkflowResponseDto'];
7140
+ type Workflow = Omit<Schemas['WorkflowResponseDto'], 'managedByCode'> & {
7141
+ codeSource?: CodeSource;
7142
+ codeSyncStatus?: CodeSyncStatus;
7143
+ };
6361
7144
  type Execution = Schemas['ExecutionResponseDto'];
6362
7145
  type ExecutionPathStep = Schemas['ExecutionPathStepDto'];
6363
7146
  type ExecuteWorkflowResult = Schemas['ExecuteWorkflowResponseDto'];
@@ -6639,12 +7422,222 @@ declare class ActionsResource {
6639
7422
  get(appId: string, actionId: string): Promise<Record<string, unknown> | undefined>;
6640
7423
  }
6641
7424
 
7425
+ /**
7426
+ * On-disk agent and workflow definitions (the pull/push file shape).
7427
+ * `$schema` is allowed on input and stripped; the CLI adds it when writing.
7428
+ */
7429
+ interface RetrySettings {
7430
+ enabled: boolean;
7431
+ maxAttempts: number;
7432
+ delaySeconds: number;
7433
+ }
7434
+ interface ContinueOnFailureSettings {
7435
+ enabled: boolean;
7436
+ }
7437
+ /** Every key is present on files the API returns. Hand-written files may omit unset keys. */
7438
+ interface AgentFileSettings {
7439
+ temperature?: number;
7440
+ topP?: number;
7441
+ maxOutputTokens?: number | null;
7442
+ frequencyPenalty?: number;
7443
+ presencePenalty?: number;
7444
+ seed?: number | null;
7445
+ maxRetries?: number;
7446
+ maxToolRoundtrips?: number;
7447
+ messageLookbackLimit?: number;
7448
+ taskNamingInstructions?: string | null;
7449
+ enabledBuiltInTools?: string[];
7450
+ enabledPlatformTools?: string[];
7451
+ enabledToolPolicies?: string[];
7452
+ forcedTools?: unknown;
7453
+ suggestedPrompts?: string[];
7454
+ dynamicActionDiscoveryEnabled?: boolean;
7455
+ dynamicMcpDiscoveryEnabled?: boolean;
7456
+ dynamicSelfInstructionsEnabled?: boolean;
7457
+ memoryEnabled?: boolean;
7458
+ memoryScope?: string;
7459
+ memoryRetentionDays?: number;
7460
+ enablePlanning?: boolean;
7461
+ requirePlanApproval?: boolean;
7462
+ enableToolResultOffload?: boolean;
7463
+ toolResultOffloadThresholdBytes?: number;
7464
+ longHorizonMode?: boolean;
7465
+ longHorizonMaxSteps?: number | null;
7466
+ longHorizonMaxTokensPerRun?: number | null;
7467
+ piiRoutingMode?: string;
7468
+ piiFallbackConnectionId?: string | null;
7469
+ piiFallbackModelId?: string | null;
7470
+ webAccess?: boolean | null;
7471
+ phoneAccess?: boolean | null;
7472
+ }
7473
+ interface AgentFileTool {
7474
+ key: string;
7475
+ /** Catalogue action id. */
7476
+ id: string;
7477
+ appId?: string;
7478
+ connection?: {
7479
+ id: string;
7480
+ };
7481
+ name: string;
7482
+ description?: string;
7483
+ input: Record<string, unknown>;
7484
+ }
7485
+ interface AgentLinkBySlug {
7486
+ slug: string;
7487
+ }
7488
+ interface AgentLinkById {
7489
+ id: string;
7490
+ }
7491
+ type AgentSlugOrId = AgentLinkBySlug | AgentLinkById;
7492
+ interface AgentFileDefinition {
7493
+ kind: 'agent';
7494
+ slug: string;
7495
+ name: string;
7496
+ description?: string;
7497
+ model?: string;
7498
+ aiConnection?: {
7499
+ id: string;
7500
+ };
7501
+ /**
7502
+ * API and TypeScript use a string. Files on disk point at
7503
+ * `<slug>.instructions.md`; only the CLI reads that file.
7504
+ */
7505
+ instructions: string | {
7506
+ file: string;
7507
+ };
7508
+ settings: AgentFileSettings;
7509
+ tools: AgentFileTool[];
7510
+ workflows: AgentSlugOrId[];
7511
+ agents: AgentSlugOrId[];
7512
+ connections: AgentLinkById[];
7513
+ knowledge: AgentLinkById[];
7514
+ variables: AgentLinkById[];
7515
+ objects: AgentLinkById[];
7516
+ objectTypes: AgentLinkById[];
7517
+ mcpServers: Array<{
7518
+ id: string;
7519
+ connectionId?: string;
7520
+ }>;
7521
+ a2aAgents: AgentLinkById[];
7522
+ }
7523
+ /** Authoring / `JSON.parse` input. Lists and settings may be omitted; pulled files include them. */
7524
+ type AgentFileInput = Omit<AgentFileDefinition, 'kind' | 'name' | 'instructions' | 'settings' | 'tools' | 'workflows' | 'agents' | 'connections' | 'knowledge' | 'variables' | 'objects' | 'objectTypes' | 'mcpServers' | 'a2aAgents'> & {
7525
+ $schema?: string;
7526
+ kind?: 'agent';
7527
+ name?: string;
7528
+ instructions: string | {
7529
+ file: string;
7530
+ };
7531
+ settings?: Partial<AgentFileSettings>;
7532
+ tools?: AgentFileTool[];
7533
+ workflows?: AgentSlugOrId[];
7534
+ agents?: AgentSlugOrId[];
7535
+ connections?: AgentLinkById[];
7536
+ knowledge?: AgentLinkById[];
7537
+ variables?: AgentLinkById[];
7538
+ objects?: AgentLinkById[];
7539
+ objectTypes?: AgentLinkById[];
7540
+ mcpServers?: Array<{
7541
+ id: string;
7542
+ connectionId?: string;
7543
+ }>;
7544
+ a2aAgents?: AgentLinkById[];
7545
+ };
7546
+ interface WorkflowUseFile {
7547
+ id: string;
7548
+ appId?: string;
7549
+ connection?: {
7550
+ id: string;
7551
+ };
7552
+ }
7553
+ interface WorkflowTriggerFile {
7554
+ id: string;
7555
+ appId?: string;
7556
+ connection?: {
7557
+ id: string;
7558
+ };
7559
+ input?: Record<string, unknown>;
7560
+ inputs?: Array<Record<string, unknown>>;
7561
+ name: string;
7562
+ description?: string;
7563
+ }
7564
+ interface WorkflowStepFile {
7565
+ key: string;
7566
+ name: string;
7567
+ description?: string;
7568
+ use: WorkflowUseFile;
7569
+ input: Record<string, unknown>;
7570
+ retrySettings?: RetrySettings;
7571
+ continueOnFailure?: ContinueOnFailureSettings;
7572
+ paths?: Array<{
7573
+ label: string;
7574
+ when?: Array<Array<{
7575
+ field: string;
7576
+ condition: string;
7577
+ value?: string;
7578
+ }>>;
7579
+ steps: WorkflowStepFile[];
7580
+ }>;
7581
+ }
7582
+ interface WorkflowStepsFileDefinition {
7583
+ kind: 'workflow';
7584
+ format: 'steps';
7585
+ slug: string;
7586
+ name: string;
7587
+ description?: string;
7588
+ trigger: WorkflowTriggerFile;
7589
+ steps: WorkflowStepFile[];
7590
+ }
7591
+ type WorkflowStepsFileInput = Omit<WorkflowStepsFileDefinition, 'kind'> & {
7592
+ $schema?: string;
7593
+ kind?: 'workflow';
7594
+ };
7595
+ interface WorkflowGraphNode {
7596
+ id?: string;
7597
+ key: string;
7598
+ nodeType: 'trigger' | 'action';
7599
+ appId: string;
7600
+ actionId?: string;
7601
+ triggerId?: string;
7602
+ name: string;
7603
+ description?: string;
7604
+ value: Record<string, unknown>;
7605
+ retrySettings?: Record<string, unknown>;
7606
+ continueOnFailure?: Record<string, unknown>;
7607
+ [other: string]: unknown;
7608
+ }
7609
+ interface WorkflowGraphEdge {
7610
+ id?: string;
7611
+ source: string;
7612
+ target: string;
7613
+ sourceHandle?: string;
7614
+ targetHandle?: string;
7615
+ type?: string;
7616
+ }
7617
+ interface WorkflowGraphFileDefinition {
7618
+ kind: 'workflow';
7619
+ format: 'graph';
7620
+ slug: string;
7621
+ name: string;
7622
+ description?: string;
7623
+ nodes: WorkflowGraphNode[];
7624
+ edges: WorkflowGraphEdge[];
7625
+ }
7626
+ type WorkflowGraphFileInput = Omit<WorkflowGraphFileDefinition, 'kind'> & {
7627
+ $schema?: string;
7628
+ kind?: 'workflow';
7629
+ };
7630
+ type WorkflowFileDefinition = WorkflowStepsFileDefinition | WorkflowGraphFileDefinition;
7631
+ /** True for a file-shaped agent after `$schema` has been stripped. */
7632
+ declare function isAgentFileShape(config: unknown): config is AgentFileDefinition;
7633
+
6642
7634
  /**
6643
7635
  * Pure typed definition factories for local workflow/agent authoring.
6644
7636
  * These do not call the network. Deploy with the CLI; run ad-hoc with `runs.start`.
6645
7637
  *
6646
7638
  * Not the same as `@lunnoa/toolkit` `createAction` / `createApp` (in-platform apps).
6647
7639
  */
7640
+
6648
7641
  declare const DEFINE_KINDS: {
6649
7642
  readonly connection: "connection";
6650
7643
  readonly aiConnection: "aiConnection";
@@ -6733,6 +7726,41 @@ interface WorkflowStepDefinition {
6733
7726
  /** Per-step input overrides. Values may contain `ref.trigger` / `ref.step`. */
6734
7727
  input?: Record<string, unknown>;
6735
7728
  name?: string;
7729
+ description?: string;
7730
+ retrySettings?: {
7731
+ enabled: boolean;
7732
+ maxAttempts: number;
7733
+ delaySeconds: number;
7734
+ };
7735
+ continueOnFailure?: {
7736
+ enabled: boolean;
7737
+ };
7738
+ /**
7739
+ * Branches after this step. Only on Conditional Paths, Manually Decide Path,
7740
+ * or Request Approval (approved path first, then rejected), and only on the
7741
+ * last step of a list. Put later steps inside each path.
7742
+ */
7743
+ paths?: WorkflowPathDefinition[];
7744
+ }
7745
+ /** Conditions Conditional Paths evaluates (same list as the builder). */
7746
+ declare const PATH_CONDITIONS: readonly ["contains", "does_not_contain", "equals", "does_not_equal", "exists", "does_not_exist", "starts_with", "ends_with", "is_empty", "is_not_empty", "comes_before", "comes_after", "is_in_the_past", "is_in_the_future", "is_true", "is_false", "is_truthy", "is_falsey", "is_greater_than", "is_less_than", "is_greater_than_or_equal_to", "is_less_than_or_equal_to", "matches_regex", "does_not_match_regex"];
7747
+ type PathConditionType = (typeof PATH_CONDITIONS)[number];
7748
+ interface PathCondition {
7749
+ /** One reference: `ref.trigger(...)` or `ref.step(...)`. */
7750
+ field: string;
7751
+ condition: PathConditionType;
7752
+ /** Compared as text. Omit for exists / is_empty / is_true and similar. */
7753
+ value?: string;
7754
+ }
7755
+ interface WorkflowPathDefinition {
7756
+ /** Unique on its step. On Request Approval use `Approved` / `Rejected`. */
7757
+ label: string;
7758
+ /**
7759
+ * Conditional Paths only. Groups are OR-ed, conditions in a group AND-ed.
7760
+ * Omit to always take this path.
7761
+ */
7762
+ when?: PathCondition[][];
7763
+ steps: WorkflowStepDefinition[];
6736
7764
  }
6737
7765
  interface WorkflowDefinition {
6738
7766
  kind: typeof DEFINE_KINDS.workflow;
@@ -6746,7 +7774,7 @@ interface WorkflowDefinition {
6746
7774
  * `runs.start` ignores this and runs the steps only.
6747
7775
  */
6748
7776
  trigger?: TriggerDefinition;
6749
- /** Linear steps (v1; no branches). */
7777
+ /** Steps in order. The last step may branch with `paths`. */
6750
7778
  steps: WorkflowStepDefinition[];
6751
7779
  }
6752
7780
  type AgentToolDefinition = ActionDefinition | WorkflowDefinition | {
@@ -6786,7 +7814,10 @@ declare const ref: {
6786
7814
  step: (key: string, ...path: Array<string | number>) => string;
6787
7815
  };
6788
7816
  declare function defineWorkflow(config: Omit<WorkflowDefinition, 'kind'>): WorkflowDefinition;
7817
+ declare function defineWorkflow(config: WorkflowStepsFileInput): WorkflowStepsFileDefinition;
7818
+ declare function defineWorkflow(config: WorkflowGraphFileInput): WorkflowGraphFileDefinition;
6789
7819
  declare function defineAgent(config: Omit<AgentDefinition, 'kind'>): AgentDefinition;
7820
+ declare function defineAgent(config: AgentFileInput): AgentFileDefinition;
6790
7821
  interface EntityTypeDefinition {
6791
7822
  kind: typeof DEFINE_KINDS.entityType;
6792
7823
  /** Stable deployment-wide slug (upsert key). Granted to the deployer's workspace when new. */
@@ -6812,9 +7843,11 @@ declare function resolveActionAppId(action: ActionDefinition): string;
6812
7843
  /** Infer appId from catalogue trigger ids like `flow-control_trigger_manual`. */
6813
7844
  declare function resolveTriggerAppId(trigger: TriggerDefinition): string;
6814
7845
  declare function resolveTriggerId(trigger: TriggerDefinition): string;
7846
+
6815
7847
  declare function resolveActionId(action: ActionDefinition): string;
6816
7848
 
6817
7849
  interface UpsertAgentToolInput {
7850
+ key?: string;
6818
7851
  appId: string;
6819
7852
  actionId: string;
6820
7853
  connectionId?: string;
@@ -6825,14 +7858,37 @@ interface UpsertAgentToolInput {
6825
7858
  interface UpsertAgentBySlugInput {
6826
7859
  slug: string;
6827
7860
  name?: string;
6828
- description?: string;
7861
+ /** Null clears a description that was removed from the definition file. */
7862
+ description?: string | null;
6829
7863
  instructions: string;
6830
- model: string;
7864
+ /** Null clears a model that was removed from the definition file. */
7865
+ model?: string | null;
6831
7866
  aiConnectionId?: string;
6832
7867
  connectionIds?: string[];
6833
7868
  workflowIds?: string[];
6834
7869
  tools?: UpsertAgentToolInput[];
6835
- managedByCode?: boolean;
7870
+ settings?: Partial<AgentFileSettings>;
7871
+ workflows?: AgentSlugOrId[];
7872
+ agents?: AgentSlugOrId[];
7873
+ knowledgeIds?: string[];
7874
+ variableIds?: string[];
7875
+ objectIds?: string[];
7876
+ objectTypeIds?: string[];
7877
+ mcpServers?: Array<{
7878
+ id: string;
7879
+ connectionId?: string;
7880
+ }>;
7881
+ a2aAgentIds?: string[];
7882
+ /** `generated` for TypeScript deploys, `synced` for definition files. */
7883
+ codeSource?: Extract<CodeSource, 'synced' | 'generated'>;
7884
+ baseRevision?: string;
7885
+ force?: boolean;
7886
+ }
7887
+ interface AgentUpsertOptions {
7888
+ workflowIds?: string[];
7889
+ codeSource?: Extract<CodeSource, 'synced' | 'generated'>;
7890
+ baseRevision?: string;
7891
+ force?: boolean;
6836
7892
  }
6837
7893
  declare class AgentsResource {
6838
7894
  private readonly http;
@@ -6841,13 +7897,13 @@ declare class AgentsResource {
6841
7897
  list(options?: ListQueryOptions): Promise<Agent[]>;
6842
7898
  /** Returns a single agent. */
6843
7899
  get(agentId: string, options?: Pick<ListQueryOptions, 'expansion'>): Promise<Agent>;
7900
+ /** Exported definition for `lunnoa/agents/<slug>.json`. */
7901
+ getDefinition(slug: string): Promise<CodeDefinitionResponse<AgentFileDefinition>>;
6844
7902
  /**
6845
7903
  * Upsert an agent by slug inside the workspace on the API key.
6846
7904
  * Prefer the CLI (`npx @lunnoa/client agents deploy`) for happy-path deploy.
6847
7905
  */
6848
- upsertBySlug(body: UpsertAgentBySlugInput | AgentDefinition, options?: {
6849
- workflowIds?: string[];
6850
- }): Promise<Agent>;
7906
+ upsertBySlug(body: UpsertAgentBySlugInput | AgentDefinition | AgentFileDefinition, options?: AgentUpsertOptions): Promise<Agent & CodeDefinitionResponse<AgentFileDefinition>>;
6851
7907
  }
6852
7908
 
6853
7909
  /**
@@ -7536,6 +8592,13 @@ declare class VariablesResource {
7536
8592
  delete(variableId: string): Promise<boolean>;
7537
8593
  }
7538
8594
 
8595
+ declare class CodeSyncResource {
8596
+ private readonly http;
8597
+ constructor(http: HttpClient);
8598
+ /** Workspace id and whether synced resources are locked in the UI. */
8599
+ context(): Promise<CodeSyncContext>;
8600
+ }
8601
+
7539
8602
  interface UpsertWorkflowStepInput {
7540
8603
  /** Name later steps use in `={{step:<key>,path}}`. Keeps the node id stable. */
7541
8604
  key?: string;
@@ -7545,6 +8608,21 @@ interface UpsertWorkflowStepInput {
7545
8608
  input?: Record<string, unknown>;
7546
8609
  name?: string;
7547
8610
  description?: string;
8611
+ retrySettings?: {
8612
+ enabled: boolean;
8613
+ maxAttempts: number;
8614
+ delaySeconds: number;
8615
+ };
8616
+ continueOnFailure?: {
8617
+ enabled: boolean;
8618
+ };
8619
+ /** Branches after this step (last step of a list only). */
8620
+ paths?: UpsertWorkflowPathInput[];
8621
+ }
8622
+ interface UpsertWorkflowPathInput {
8623
+ label: string;
8624
+ when?: WorkflowPathDefinition['when'];
8625
+ steps: UpsertWorkflowStepInput[];
7548
8626
  }
7549
8627
  interface UpsertWorkflowTriggerInput {
7550
8628
  triggerId: string;
@@ -7557,15 +8635,30 @@ interface UpsertWorkflowTriggerInput {
7557
8635
  name?: string;
7558
8636
  description?: string;
7559
8637
  }
8638
+ interface UpsertWorkflowGraphInput {
8639
+ nodes: WorkflowGraphFileDefinition['nodes'];
8640
+ edges: WorkflowGraphFileDefinition['edges'];
8641
+ }
7560
8642
  interface UpsertWorkflowBySlugInput {
7561
8643
  slug: string;
7562
8644
  name?: string;
7563
- description?: string;
8645
+ /** Null clears a description that was removed from the definition file. */
8646
+ description?: string | null;
7564
8647
  isActive?: boolean;
7565
8648
  /** Omit for Manually Run with no input fields. */
7566
8649
  trigger?: UpsertWorkflowTriggerInput;
7567
- steps: UpsertWorkflowStepInput[];
7568
- managedByCode?: boolean;
8650
+ steps?: UpsertWorkflowStepInput[];
8651
+ /** Lossless graph. Not sent together with `trigger` / `steps`. */
8652
+ graph?: UpsertWorkflowGraphInput;
8653
+ /** `generated` for TypeScript deploys, `synced` for definition files. */
8654
+ codeSource?: Extract<CodeSource, 'synced' | 'generated'>;
8655
+ baseRevision?: string;
8656
+ force?: boolean;
8657
+ }
8658
+ interface WorkflowUpsertOptions {
8659
+ codeSource?: Extract<CodeSource, 'synced' | 'generated'>;
8660
+ baseRevision?: string;
8661
+ force?: boolean;
7569
8662
  }
7570
8663
  declare class WorkflowsResource {
7571
8664
  private readonly http;
@@ -7578,11 +8671,13 @@ declare class WorkflowsResource {
7578
8671
  * the manual trigger's custom input field definitions.
7579
8672
  */
7580
8673
  get(workflowId: string, options?: Pick<ListQueryOptions, 'expansion'>): Promise<Workflow>;
8674
+ /** Exported definition for `lunnoa/workflows/<slug>.json`. */
8675
+ getDefinition(slug: string): Promise<CodeDefinitionResponse<WorkflowFileDefinition>>;
7581
8676
  /**
7582
8677
  * Upsert a workflow by slug inside the workspace on the API key.
7583
8678
  * Prefer the CLI (`npx @lunnoa/client workflows deploy`) for happy-path deploy.
7584
8679
  */
7585
- upsertBySlug(body: UpsertWorkflowBySlugInput | WorkflowDefinition): Promise<Workflow>;
8680
+ upsertBySlug(body: UpsertWorkflowBySlugInput | WorkflowDefinition | WorkflowFileDefinition, options?: WorkflowUpsertOptions): Promise<Workflow & CodeDefinitionResponse<WorkflowFileDefinition>>;
7586
8681
  /**
7587
8682
  * Starts a new execution of the workflow with the given trigger inputs.
7588
8683
  * Returns immediately with the execution ID.
@@ -7650,6 +8745,8 @@ declare class LunnoaClient {
7650
8745
  readonly aiConnections: AiConnectionsResource;
7651
8746
  readonly workflowApps: WorkflowAppsResource;
7652
8747
  readonly discovery: DiscoveryResource;
8748
+ /** Workspace id for the definitions lock, and the code-sync lock flag. */
8749
+ readonly codeSync: CodeSyncResource;
7653
8750
  constructor(options: LunnoaClientOptions);
7654
8751
  }
7655
8752
 
@@ -7663,6 +8760,8 @@ declare class LunnoaApiError extends Error {
7663
8760
  readonly method: string;
7664
8761
  /** Path of the failed request (without the base URL). */
7665
8762
  readonly path: string;
8763
+ /** Present on definition-sync 409s when the server sends the current revision. */
8764
+ readonly currentRevision?: string;
7666
8765
  constructor(args: {
7667
8766
  status: number;
7668
8767
  body: unknown;
@@ -7792,4 +8891,4 @@ interface CreateServerClientOptions {
7792
8891
  */
7793
8892
  declare function createServerClient(options: CreateServerClientOptions): LunnoaClient;
7794
8893
 
7795
- export { API_KEY_PREFIX, type ActionDefinition, ActionsResource, type AddQueueItemErrorInput, type Agent, AgentChatClient, AgentChatStream, type AgentDefinition, type AgentToolDefinition, AgentsResource, type AiConnection, type AiConnectionDefinition, type AiConnectionModel, AiConnectionsResource, type ApprovalInboxItem, ApprovalsResource, AuthResource, type AuthTokens, type BulkCreateQueueItemsInput, type BulkCreateQueueItemsResult, type ChangeEntityStateInput, type ChangeEntityStateResult, type ChatMode, type Connection, type ConnectionDefinition, ConnectionsResource, type CreateBrowserClientOptions, type CreateEntityInput, type CreateKnowledgeInput, type CreateQueueInput, type CreateQueueItemInput, type CreateServerClientOptions, type CreateTaskInput, type CreateVariableInput, type CurrentUser, DEFINE_KINDS, type DefineKind, type DeletedTask, DiscoveryResource, type EligibleApprover, type EnabledFeatures, EntitiesResource, type Entity, type EntityStateHistoryEntry, type EntityStateTransitions, type EntityType, type EntityTypeDefinition, type EntityTypeReadOptions, EntityTypesResource, type ExecuteWorkflowResult, type Execution, type ExecutionPathStep, type ExecutionProgress, type ExecutionProgressPayload, type ExecutionProgressStep, ExecutionProgressStream, type ExecutionStatus, type ExecutionStreamEvent, type ExecutionStreamEventType, ExecutionTimeoutError, ExecutionsResource, type ExportEntitiesInput, type FetchLike, HttpClient, type ImportEntitiesInput, type ImportEntitiesResult, type ImportTemplate, type Knowledge, type KnowledgeDocument, type KnowledgeDocumentGroup, KnowledgeResource, type ListEntitiesOptions, type ListQueryOptions, type ListQueueItemsByObjectOptions, type ListQueueItemsOptions, type LocalStorageTokenStoreOptions, type LoginRequires2FA, type LoginResult, type LoginSuccess, LunnoaApiError, LunnoaClient, type LunnoaClientOptions, type MessageTaskInput, type OffsetPagination, type PagePagination, type PaginatedEntities, type PendingInput, type PendingInputField, type QueryValue, type Queue, type QueueAllowedObjectType, type QueueItem, type QueueItemCreated, type QueueItemErrorEntry, type QueueItemFull, type QueueItemList, type QueueItemObjectSummary, type QueueItemStats, type QueueItemStatus, QueueItemsResource, type QueueStats, QueuesResource, type RecordMeasureValueInput, type RequestOptions, type RunActionInput, type RunActionOptions, type RunActionResult, RunsResource, type SaveUploadedTextInput, type Scorecard, type ScorecardMeasure, type ScorecardMeasureStatus, type ScorecardMeasureValue, type ScorecardObjective, type ScorecardSummary, ScorecardsResource, type SseEvent, SsoAuthResource, type SsoProviderSummary, type SsoProvidersResponse, type StartRunInput, type StartRunInputDto, type StartRunOptions, type StartRunStep, type StopStreamOptions, type StreamMessageOptions, type Table, TablesResource, type Task, type TaskListItem, TasksResource, type TokenStore, type TriggerDefinition, type TriggerInputFieldDefinition, type UpdateEntityInput, type UpdateKnowledgeInput, type UpdateQueueInput, type UpdateQueueItemInput, type UpdateTaskInput, type UpdateVariableInput, type UpsertAgentBySlugInput, type UpsertAgentBySlugInputDto, type UpsertAgentToolInput, type UpsertEntityTypeBySlugInput, type UpsertTableBySlugInput, type UpsertWorkflowBySlugInput, type UpsertWorkflowBySlugInputDto, type UpsertWorkflowStepInput, type UpsertWorkflowTriggerInput, type Variable, VariablesResource, type WaitUntilFinishedOptions, type WatchProgressOptions, type Workflow, type WorkflowApp, WorkflowAppsResource, type WorkflowDefinition, type WorkflowStepDefinition, WorkflowsResource, assertApiKeyAllowedInEnvironment, type components, createBrowserClient, createLocalStorageTokenStore, createMemoryTokenStore, createServerClient, defineAction, defineAgent, defineAiConnection, defineConnection, defineEntityType, defineTrigger, defineWorkflow, entityTypeDefinitionToUpsert, isBrowserEnvironment, isLoginRequires2FA, iterateOffset, iteratePages, type operations, parseSseEvents, parseSseStream, type paths, ref, resolveActionAppId, resolveActionId, resolveTriggerAppId, resolveTriggerId };
8894
+ export { API_KEY_PREFIX, type ActionDefinition, ActionsResource, type AddQueueItemErrorInput, type Agent, AgentChatClient, AgentChatStream, type AgentDefinition, type AgentFileDefinition, type AgentFileInput, type AgentFileSettings, type AgentFileTool, type AgentSlugOrId, type AgentToolDefinition, type AgentUpsertOptions, AgentsResource, type AiConnection, type AiConnectionDefinition, type AiConnectionModel, AiConnectionsResource, type ApprovalInboxItem, ApprovalsResource, AuthResource, type AuthTokens, type BulkCreateQueueItemsInput, type BulkCreateQueueItemsResult, type ChangeEntityStateInput, type ChangeEntityStateResult, type ChatMode, type CodeDefinitionResponse, type CodeSource, type CodeSyncContext, CodeSyncResource, type CodeSyncStatus, type Connection, type ConnectionDefinition, ConnectionsResource, type CreateBrowserClientOptions, type CreateEntityInput, type CreateKnowledgeInput, type CreateQueueInput, type CreateQueueItemInput, type CreateServerClientOptions, type CreateTaskInput, type CreateVariableInput, type CurrentUser, DEFINE_KINDS, type DefineKind, type DeletedTask, DiscoveryResource, type EligibleApprover, type EnabledFeatures, EntitiesResource, type Entity, type EntityStateHistoryEntry, type EntityStateTransitions, type EntityType, type EntityTypeDefinition, type EntityTypeReadOptions, EntityTypesResource, type ExecuteWorkflowResult, type Execution, type ExecutionPathStep, type ExecutionProgress, type ExecutionProgressPayload, type ExecutionProgressStep, ExecutionProgressStream, type ExecutionStatus, type ExecutionStreamEvent, type ExecutionStreamEventType, ExecutionTimeoutError, ExecutionsResource, type ExportEntitiesInput, type FetchLike, HttpClient, type ImportEntitiesInput, type ImportEntitiesResult, type ImportTemplate, type Knowledge, type KnowledgeDocument, type KnowledgeDocumentGroup, KnowledgeResource, type ListEntitiesOptions, type ListQueryOptions, type ListQueueItemsByObjectOptions, type ListQueueItemsOptions, type LocalStorageTokenStoreOptions, type LoginRequires2FA, type LoginResult, type LoginSuccess, LunnoaApiError, LunnoaClient, type LunnoaClientOptions, type MessageTaskInput, type OffsetPagination, PATH_CONDITIONS, type PagePagination, type PaginatedEntities, type PathCondition, type PathConditionType, type PendingInput, type PendingInputField, type QueryValue, type Queue, type QueueAllowedObjectType, type QueueItem, type QueueItemCreated, type QueueItemErrorEntry, type QueueItemFull, type QueueItemList, type QueueItemObjectSummary, type QueueItemStats, type QueueItemStatus, QueueItemsResource, type QueueStats, QueuesResource, type RecordMeasureValueInput, type RequestOptions, type RunActionInput, type RunActionOptions, type RunActionResult, RunsResource, type SaveUploadedTextInput, type Scorecard, type ScorecardMeasure, type ScorecardMeasureStatus, type ScorecardMeasureValue, type ScorecardObjective, type ScorecardSummary, ScorecardsResource, type SseEvent, SsoAuthResource, type SsoProviderSummary, type SsoProvidersResponse, type StartRunInput, type StartRunInputDto, type StartRunOptions, type StartRunStep, type StopStreamOptions, type StreamMessageOptions, type Table, TablesResource, type Task, type TaskListItem, TasksResource, type TokenStore, type TriggerDefinition, type TriggerInputFieldDefinition, type UpdateEntityInput, type UpdateKnowledgeInput, type UpdateQueueInput, type UpdateQueueItemInput, type UpdateTaskInput, type UpdateVariableInput, type UpsertAgentBySlugInput, type UpsertAgentBySlugInputDto, type UpsertAgentToolInput, type UpsertEntityTypeBySlugInput, type UpsertTableBySlugInput, type UpsertWorkflowBySlugInput, type UpsertWorkflowBySlugInputDto, type UpsertWorkflowGraphInput, type UpsertWorkflowPathInput, type UpsertWorkflowStepInput, type UpsertWorkflowTriggerInput, type Variable, VariablesResource, type WaitUntilFinishedOptions, type WatchProgressOptions, type Workflow, type WorkflowApp, WorkflowAppsResource, type WorkflowDefinition, type WorkflowFileDefinition, type WorkflowGraphFileDefinition, type WorkflowPathDefinition, type WorkflowStepDefinition, type WorkflowStepFile, type WorkflowStepsFileDefinition, type WorkflowTriggerFile, type WorkflowUpsertOptions, WorkflowsResource, assertApiKeyAllowedInEnvironment, type components, createBrowserClient, createLocalStorageTokenStore, createMemoryTokenStore, createServerClient, defineAction, defineAgent, defineAiConnection, defineConnection, defineEntityType, defineTrigger, defineWorkflow, entityTypeDefinitionToUpsert, isAgentFileShape, isBrowserEnvironment, isLoginRequires2FA, iterateOffset, iteratePages, type operations, parseSseEvents, parseSseStream, type paths, ref, resolveActionAppId, resolveActionId, resolveTriggerAppId, resolveTriggerId };