@controllerai/cli 0.2.18 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/package.json +6 -4
  2. package/skills/controllerai-agents/SKILL.md +66 -152
  3. package/skills/controllerai-agents/references/instructions-and-versioning.md +32 -34
  4. package/skills/controllerai-ai-nodes/SKILL.md +57 -65
  5. package/skills/controllerai-ai-nodes/references/selection-and-testing.md +44 -26
  6. package/skills/controllerai-data/SKILL.md +65 -118
  7. package/skills/controllerai-data/references/data-rails.md +24 -26
  8. package/skills/controllerai-expressions/SKILL.md +48 -117
  9. package/skills/controllerai-expressions/references/dsl-and-recipes.md +42 -40
  10. package/skills/controllerai-flow-control/SKILL.md +66 -122
  11. package/skills/controllerai-flow-control/references/patterns.md +23 -60
  12. package/skills/controllerai-integration-actions/SKILL.md +47 -75
  13. package/skills/controllerai-node-config/SKILL.md +60 -130
  14. package/skills/controllerai-node-config/references/prop-and-readiness.md +28 -78
  15. package/skills/controllerai-runs/SKILL.md +50 -85
  16. package/skills/controllerai-runs/references/debugging.md +24 -22
  17. package/skills/controllerai-start/SKILL.md +53 -58
  18. package/skills/controllerai-start/references/mcp-tool-map.md +21 -16
  19. package/skills/controllerai-triggers/SKILL.md +62 -159
  20. package/skills/controllerai-triggers/references/lifecycle.md +36 -48
  21. package/skills/controllerai-workflows/SKILL.md +70 -70
  22. package/skills/controllerai-workflows/references/command-map.md +19 -44
  23. package/skills/manifest.json +80 -77
  24. package/skills-mcp/controllerai-agents/SKILL.md +121 -0
  25. package/skills-mcp/controllerai-agents/references/instructions-and-versioning.md +76 -0
  26. package/skills-mcp/controllerai-ai-nodes/SKILL.md +92 -0
  27. package/skills-mcp/controllerai-ai-nodes/references/selection-and-testing.md +66 -0
  28. package/skills-mcp/controllerai-data/SKILL.md +119 -0
  29. package/skills-mcp/controllerai-data/references/data-rails.md +45 -0
  30. package/skills-mcp/controllerai-expressions/SKILL.md +98 -0
  31. package/skills-mcp/controllerai-expressions/references/dsl-and-recipes.md +136 -0
  32. package/skills-mcp/controllerai-flow-control/SKILL.md +114 -0
  33. package/skills-mcp/controllerai-flow-control/references/patterns.md +83 -0
  34. package/skills-mcp/controllerai-integration-actions/SKILL.md +89 -0
  35. package/skills-mcp/controllerai-node-config/SKILL.md +106 -0
  36. package/skills-mcp/controllerai-node-config/references/prop-and-readiness.md +49 -0
  37. package/skills-mcp/controllerai-runs/SKILL.md +88 -0
  38. package/skills-mcp/controllerai-runs/references/debugging.md +53 -0
  39. package/skills-mcp/controllerai-start/SKILL.md +80 -0
  40. package/skills-mcp/controllerai-start/references/mcp-tool-map.md +175 -0
  41. package/skills-mcp/controllerai-triggers/SKILL.md +112 -0
  42. package/skills-mcp/controllerai-triggers/references/lifecycle.md +59 -0
  43. package/skills-mcp/controllerai-workflows/SKILL.md +109 -0
  44. package/skills-mcp/controllerai-workflows/references/command-map.md +1 -0
  45. package/skills-mcp/manifest.json +189 -0
@@ -1,22 +1,46 @@
1
1
  ---
2
2
  name: controllerai-workflows
3
- description: Build, inspect, edit, test, recover, and publish Controller AI workflows through the cai CLI or typed MCP tools. Use when a user asks to create or change an automation, workflow, flow, or workflow release, or when another Controller AI skill needs the shared lifecycle and safety rules.
3
+ description: Build, inspect, edit, recover, and publish Controller AI workflows and their flows. Use when a user asks to create or change an automation, a flow, or a workflow release, and for the lifecycle rules every other workflow skill relies on.
4
4
  ---
5
+ <!-- generated from .claude/skills by cli/scripts/render-skills.mjs; edit the source -->
5
6
 
6
- # Controller AI workflows
7
+ # Workflows
7
8
 
8
- The `cai ...` examples are canonical grammar. Follow the transport rules and MCP map in `controllerai-start`; never mix transports within one task. Do not call private REST endpoints or invoke MCP routes outside the typed tools. When the selected transport lacks a capability, say so and name the UI path instead of bypassing it.
9
+ ## Use this when
9
10
 
10
- ## Rules that break tasks when skipped
11
+ - Creating a workflow, adding or repairing flows, orienting inside an existing graph, validating, checkpointing, restoring, publishing, or deleting.
12
+ - Another skill needs the shared lifecycle rules: which rail an edit lands on, how contracts and IDs behave, what validation and publishing require.
11
13
 
12
- - Lock the effective workflow ID and exact flow ID; see Establish context.
13
- - Repair the selected workflow and flow instead of creating replacements; see Build protocol.
14
- - Keep workflow, flow, node, input, and output IDs distinct; see Lifecycle rules.
15
- - Preserve contract fields in place and refresh their dependents; see Lifecycle rules.
16
- - Use save, history, and restore for recovery instead of rebuilding; see Lifecycle rules.
17
- - Treat validation counts as status; prove the requested rail and stop. See Lifecycle rules and Before you finish.
14
+ Load the narrow skill when the work reaches it: nodes, connections, props and wiring → `controllerai-node-config`; computed values and conditions → `controllerai-expressions`; Router, If/Else, loops, joins, subflows → `controllerai-flow-control`; runs and debugging → `controllerai-runs`; schedules, webhooks, app events → `controllerai-triggers`; schemas and records → `controllerai-data`; Ask AI and agent nodes → `controllerai-ai-nodes`; user-facing agents → `controllerai-agents`.
18
15
 
19
- ## Establish context
16
+ ## How it works
17
+
18
+ A **workflow** groups flows, custom schemas, data collections and triggers, and its flows share one data store per environment. A **flow** is one canvas and one callable contract: typed inputs, connected nodes, typed outputs. A Return node maps values into the declared outputs; declaring an output does not fill it. Workflow, flow, node, input and output IDs are distinct identities; never swap one for another.
19
+
20
+ Every graph edit lands on the **development** version. Publishing creates the **live** release; a live agent that uses the workflow as a tool follows its latest live release without an agent publish, while the owner's Test conversations run the development version. Publishing never copies development records into the live store, and every environment keeps its own data.
21
+
22
+ Every save is a **state**. History lists states in groups and gives candidate state IDs; a restore rolls the definition back to one state and leaves records and external effects untouched. How far back history is listed and how far back a state can be restored are two separate plan limits, so a listed state is not always restorable.
23
+
24
+ Deleting a workflow tears down its deployed triggers and soft-deletes it. It is refused while any draft or live agent depends on the workflow, and nothing undeletes. The dependency map shows a workflow's agent and workflow callers and the connections it uses. Deleting a flow removes its graph, its contract and the triggers targeting it, and breaks every caller bound to it.
25
+
26
+ The account event feed records only supported events: connections created, workflows created, updated, deleted, published and run, agents created and published, members added. Settings changes, member removals and label edits are not in it, and a past change that is not recorded cannot be reconstructed from names or current state.
27
+
28
+ ## Rules
29
+
30
+ 1. **Before changing an existing workflow, read its outline and the affected flow**, then repair those IDs rather than creating a replacement workflow or flow. A repair that recreates loses history, triggers and callers.
31
+ 2. **Rename contracts in place.** Deleting and recreating an input or output breaks every expression, subflow mapping and agent tool bound to it. After a rename or deletion, re-read the flow and repair the affected dependents before validating or running; a stored input-ID binding survives a rename, so the readback may show nothing to repair.
32
+ 3. **"Store, save, log, record" without a named destination means a custom data type plus a create-record node.** A flow output alone persists nothing. When the user names a destination (a sheet, a CRM, an app, a file), write there through that integration; add a platform record only if they also want a copy kept here.
33
+ 4. **Validate after structural edits and before publishing.** Fix every listed prop, wire, expression, type, subflow, branch and trigger error, or report each one with what it breaks. Publish refuses errors; `--acknowledge-validation-errors` is for issues the user has seen and accepted, never a shortcut. If the user forbids a repair, report and stop.
34
+ 5. **Validation counts are status.** Do not write them into unrelated workflow properties unless the user asks for exactly that.
35
+ 6. **Deleting a workflow needs the user's explicit intent.** A confirmation flag is not authorization. Check dependencies first; detach draft tools with `cai agent remove-tool <agentId> --tool <toolId>`, and treat a live agent's republish as its own decision.
36
+ 7. **Layout once per changed flow.** After adds, deletes or rewires, run the flow layout as the last structural step; placement at add time only avoids overlap.
37
+ 8. **Never weaken the request to make a test pass.** Report an unsupported capability or ask the product question. Keep deliberately armed triggers and advisory-only nodes the user chose.
38
+ 9. **A conflict means re-read, then reapply the intent to the current graph.** Never replay a stale document or old IDs; the retried write uses the IDs the current state holds.
39
+ 10. **Say "not recorded" and change nothing** when asked to reconstruct history the feed does not hold.
40
+
41
+ ## Recipes
42
+
43
+ ### Establish context
20
44
 
21
45
  ```bash
22
46
  cai auth status --json
@@ -25,82 +49,65 @@ cai use <workflowId>
25
49
  cai workflow status --json
26
50
  ```
27
51
 
28
- MCP: use `account_status`, then call `workflow_list` and `workflow_status` with explicit `workflowId`; there is no `cai use` or stored pin.
52
+ A create or `cai use` may not win the effective pin: read `selected`, `effectiveWorkflowId` and `pinSource`, and resolve as `pinSource` says (drop the command flag, use `cai use <id>`, or clear an inherited `CAI_WORKFLOW`). `cai config reset` clears stored pins only; `cai doctor` confirms the effective pin and development head.
29
53
 
30
- If no workflow exists, create it with its final name:
54
+ ### Create
31
55
 
32
56
  ```bash
33
57
  cai workflow create --name "<clear outcome-oriented name>" --json
34
58
  ```
35
59
 
36
- Read `selected`, `effectiveWorkflowId`, and `pinSource`; creation may not win the pin. If unselected, remove a command flag, use `cai use <id>` for a stored pin, or clear inherited `CAI_WORKFLOW`, as `pinSource` directs, then re-check. `cai config reset` clears only stored pins. `cai doctor` verifies the effective pin and development head. On MCP, capture and pass the new `workflowId`. Create with the final name.
37
-
38
- After `cai workflow create`, check `flowCount` in the output. If it is 0 (or the field is missing, run `cai flow list --json`), create the first flow with `cai flow create --name "<name>" --json`. If one empty flow already exists, rename it and build in it. Never add a second flow for the first piece of work; add flows only for genuinely separate canvases.
60
+ Create with the final name. Read `flowCount` and `nextStep`: with 0 flows, create the first flow with `cai flow create --name "<name>" --json`; with one empty default flow, rename it and build in it; when either field is missing, list the flows before deciding. Add flows only for genuinely separate canvases, and stop at an empty workflow when that is what was asked. A missing projected field is not a failed create: read the full result or the exact inventory before retrying.
39
61
 
40
- Use IDs returned by the selected transport. For account-wide lists, filter by exact ID or name and owning workflow; never choose the first or latest similar result. Read the selected object's ID, name, and owner once, reuse those IDs, and never rediscover the target by name. A missing projected create field is not failure: inspect the complete result and exact inventory before retrying. Never invent identifiers.
41
-
42
- To orient inside a workflow, prefer one call over many:
62
+ ### Orient
43
63
 
44
64
  ```bash
45
65
  cai workflow outline --json
66
+ cai workflow state --flow <flowId> --json
67
+ cai flow get <flowId> --json
46
68
  ```
47
69
 
48
- `cai workflow state --json` is bounded; add `--flow <flowId>` for node and edge identities. Use `workflow document` only for complete opaque JSON. `workflow outline` shows flows, contracts, graph `deps`, triggers, and data inventory. Use `flow get` for props and expressions.
49
-
50
- ## Build protocol
70
+ The outline shows flows, contracts, graph dependencies, triggers and data inventory in one call. State is a bounded projection; pass the flow ID for node and edge identities. The flow read exposes props and expressions.
51
71
 
52
- 1. Translate the request into inputs, steps, outputs, trigger, integrations, failure behavior, and publish intent. When the request says to store, save, log, or record something and names no external destination, that means a data type plus a create-record node (`controllerai-data`) — a flow output alone does not persist anything. When the user names the destination (a spreadsheet, a CRM, another app, a file), write there with that integration's node instead; add a platform record only when the user also wants a copy kept here.
53
- 2. Inspect the current workflow before editing: `cai workflow outline`, then `cai flow get <flowId>`. Repair those IDs; do not create replacements for a repair.
54
- 3. Create or select a flow. Define flow inputs and outputs before nodes that derive props from them.
55
- 4. Build in execution order. After each material change, read it back with the corresponding `get`, `props`, `status`, or `list` command.
56
- 5. Run `cai flow layout <flowId>` once per changed flow as the LAST step after a headless build or any batch of structural edits (adds, deletes, rewires) — add-time placement avoids overlap, but only layout produces clean left-to-right columns. An open builder adopts your layout automatically.
57
- 6. Test on the development rail. Debug every failed or suspicious node; a green top-level status alone is insufficient.
58
- 7. Re-read `cai workflow status`. Publish only when the user asked for a live change or clearly authorized deployment.
72
+ ### Build
59
73
 
60
- For multi-domain work, read [references/command-map.md](references/command-map.md) before editing.
74
+ 1. Translate the request into inputs, steps, outputs, trigger, integrations, failure behavior and publish intent.
75
+ 2. Declare flow inputs and outputs before nodes whose props derive from them. Pass a human display label; use the current binding from `flow get` (`jsBinding`) or the outline (`binding`), never the diagnostic `legacyBinding`.
76
+ 3. Add nodes in execution order and name each after the data it produces; downstream bindings are seeded from that name when wired.
77
+ 4. Lay out each changed flow, validate, test on development, re-read status. Publish only when the user asked for a live change or authorized deployment.
61
78
 
62
- ## Route specialized work
79
+ ### Publish
63
80
 
64
- Load the narrow skill when the task reaches that surface:
81
+ ```bash
82
+ cai workflow status --json
83
+ cai trigger list --json
84
+ cai workflow publish --json
85
+ ```
65
86
 
66
- - Node discovery, initialization, connections, props, or wiring: `controllerai-node-config`
67
- - Dynamic values or conditions: `controllerai-expressions`
68
- - Router, If/Else, loops, joins, or subflows: `controllerai-flow-control`
69
- - Test execution or debugging: `controllerai-runs`
70
- - Scheduled, webhook, or integration events: `controllerai-triggers`
71
- - Schemas or records: `controllerai-data`
72
- - Ask AI or Agent nodes: `controllerai-ai-nodes`
73
- - User-facing agents and their workflow tools: `controllerai-agents`
87
+ Read status and every trigger first: publishing activates enabled triggers on the live release. The publish refuses validation errors and may return an approval that the user must grant.
74
88
 
75
- ## Lifecycle rules
89
+ When the publish returns an approval, the CLI polls it; if polling is interrupted, `cai approval resume <approvalId>` continues the same intent instead of publishing again.
76
90
 
77
- - All graph edits target development. Live remains unchanged until `cai workflow publish`.
78
- - Email verification is not a publishing prerequisite. An unclaimed agent-created account may publish; email claiming only raises its monthly usage cap and enables account recovery.
79
- - On the CLI, prefer `--json` for decisions and IDs; human tables are for presentation. MCP tools return typed JSON. If human output looks odd, re-run the same read with `--json` before acting.
80
- - A workflow contains flows; a flow is one canvas. Do not confuse their IDs.
81
- - For flow inputs, pass a human `--display` label and use the current binding from `flow get` (`jsBinding`) or `workflow outline` (`binding`). Rename an existing contract input or output in place; do not delete and recreate it. After any rename or deletion, re-read the flow and repair every expression and subflow mapping before validation or execution. `legacyBinding` is diagnostic-only.
82
- - Name nodes after the data they produce. Downstream input bindings are seeded from that name when wired.
83
- - Use `cai workflow save --name "<checkpoint>"` before a risky rewrite. Named saves and state renames work on every plan.
91
+ ### Checkpoint and recover
84
92
 
85
93
  ```bash
94
+ cai workflow save --name "<checkpoint>" --json
86
95
  cai workflow history --json
87
96
  cai workflow history --group <groupId> --json
88
97
  cai workflow restore --state <stateId> --json
89
98
  ```
90
99
 
91
- - **Use version history for recovery.** Each save is a state. History retention is unlimited on Free, Max, and custom plans and 90 days on Pro/Starter; restore eligibility is 7 days on Free, 90 on Pro/Starter, and unlimited on Max/custom. Expand groups to capture state IDs. Restore rolls back the definition only; records and external effects remain.
92
- - **Validate after structural edits and before publish.** Fix every listed prop, wire, expression, type, subflow, branch, and trigger error. Publish refuses errors; use `--acknowledge-validation-errors` only after explicit approval of the listed issues. Flow deletion also removes its contract, graph, and triggers and breaks callers; validation shows each break.
93
- - Treat validation warning and error counts as status only. Never write them or their messages into unrelated workflow properties.
94
- - On a conflict, re-read current state and reapply intent. Do not replay stale IDs or whole documents.
95
- - Never delete a workflow without the user's explicit intent; the CLI requires `--yes` but that is not a substitute for authorization. MCP: `workflow_delete` has no `yes` parameter, but still requires the same explicit intent. `cai workflow delete` tears down deployed triggers and soft-deletes the workflow row. Historical workflow/version data remains stored, but there is currently no restore command for the deleted row.
96
- - **Check dependencies before shared-resource changes.** `cai deps` shows attached agents, workflow callers, and connections; `cai deps --account` maps the account. Deleting a workflow with agent dependents is refused server-side, and `--force` is a deprecated, inert compatibility flag. Detach draft tools with `cai agent remove-tool <agentId> --tool <toolId>`. If still LIVE, use `cai agent publish <agentId>` after explicit approval. A dependent agent publish or delete is its own live/destructive decision. Then retry deletion.
97
- - **Use the account feed only for recorded history.** Filter `cai events` by type, time, workflow, and cursor. It omits deletions, settings, member removals, and labels. For an unrecorded past change, say it is not recorded and change nothing; names and current state are not proof.
98
- - **Share real product links.** Relevant publish, development run, agent, connection, workflow get/status, and agent get outputs include `appUrl` when known. Share returned links; never guess one. MCP `connection_connect_url` returns its link immediately.
99
- - Never silently weaken the request to make a test pass. Report an unsupported capability or ask about a real product decision.
100
+ Save before a risky rewrite. Expand a group to find the state ID; restore by state, not by group.
101
+
102
+ ### Delete
100
103
 
101
- ## Before you finish
104
+ ```bash
105
+ cai deps --json
106
+ cai workflow delete <workflowId> --yes
107
+ ```
108
+ `cai deps --account` maps the whole account. The `--force` flag is deprecated and inert.
102
109
 
103
- Before claiming success, verify all of the following:
110
+ ## Verify
104
111
 
105
112
  ```bash
106
113
  cai workflow outline --json
@@ -110,17 +117,10 @@ cai flow get <flowId> --json
110
117
  cai run flow <flowId> --inputs <values.json> --json
111
118
  ```
112
119
 
113
- MCP: pass the parsed values in `inputs` and set `waitSeconds` on `run_flow`.
120
+ Evidence that a build works: validation reports zero errors, or each remaining error is reported with its effect; required connections and props are complete; expressions resolve to the expected values, with intentional empties explained; the expected branch and error paths ran where practical; the flow outputs contain the promised values; the development or live state matches the request; the final outline matches the request, with only your own abandoned scratch objects removed. A checkpoint or a rename needs its readback, not a run. Once the requested blockers are fixed and each changed path ran once, stop; warnings alone do not justify a redesign.
114
121
 
115
- Then confirm:
122
+ ## Report
116
123
 
117
- - **`cai workflow validate` reports `errors: 0`.** Every error is fixed, or explicitly reported to the user with what it breaks — never summarized away, never called cosmetic. A red canvas and a "done" claim cannot coexist.
118
- - Required node connections and props are complete.
119
- - Expressions compiled and their resolved configs are non-null.
120
- - Expected branch or error paths were exercised where practical.
121
- - Flow outputs contain the promised values.
122
- - The reported live/dev state matches what the user asked for.
123
- - Final outline inventory matches the request. Remove only scratch schemas, flows, nodes, and triggers created during abandoned attempts.
124
- - After fixing requested blockers and testing each changed path once, stop. Do not redesign for non-blocking warnings.
124
+ What was built, what ran and what it returned, whether it is published, and any connection or product decision still pending. Share returned product links only; never guess one.
125
125
 
126
- State what was built, what was tested, whether it was published, and any user-owned connection or product choice still pending.
126
+ Read [references/command-map.md](references/command-map.md) for the command families by domain when a task spans several areas.
@@ -1,40 +1,28 @@
1
- # Workflow command map
1
+ <!-- generated from .claude/skills by cli/scripts/render-skills.mjs; edit the source -->
2
+ # Workflow command families
2
3
 
3
- Read only the sections relevant to the requested work. On the CLI, use `cai <domain> --help` for flags. On MCP, inspect the typed tool schema and [the generated map](../../controllerai-start/references/mcp-tool-map.md).
4
+ Read the family you need; `cai <domain> --help` lists flags, and the [generated tool map](../../controllerai-start/references/mcp-tool-map.md) gives the MCP tool and parameter names.
4
5
 
5
- ## Setup and workflow lifecycle
6
+ ## Lifecycle
6
7
 
7
8
  ```text
8
- cai connect
9
- cai doctor
10
- cai config reset [--local|--global]
11
- cai auth status
12
9
  cai workflow list|create|get|rename|set-description|duplicate|delete
13
- cai workflow document|state|status|versions|releases|history|save|restore|publish
14
- cai use <workflowId>
10
+ cai workflow outline|document|state|status|versions|releases|history|save|restore|publish
15
11
  ```
16
12
 
17
- MCP: `account_status` replaces `auth status` and `doctor`; `cai connect`, `config reset`, and `use` are local-only, so pass `workflowId` explicitly.
13
+ `outline` is the compact inventory; `state --flow <flowId>` adds node and edge identities; `document` is the complete JSON. `save` creates a named checkpoint, `restore --state <stateId>` rolls the definition back, `publish` creates the live release and refuses validation errors unless the user has accepted them explicitly. `delete --yes` undeploys triggers and soft-deletes; it is refused while a draft or live agent depends on the workflow.
18
14
 
19
- `workflow state` is a bounded projection; use `--flow <flowId>` for node and edge identities. `workflow document` returns the complete opaque JSON. `workflow save` creates a named development checkpoint. `workflow publish` promotes development to live. Version history may be plan-gated. `workflow delete --yes` undeploys triggers and soft-deletes the workflow row; it refuses while any draft or LIVE agent depends on the workflow. Detach draft tools with `agent remove-tool`, publish detached drafts that are still LIVE, then retry. `--force` is deprecated and inert. Deletion is not a permanent history purge, and deleted rows currently have no CLI restore command.
20
-
21
- ## Canvas and graph
15
+ ## Canvas
22
16
 
23
17
  ```text
24
18
  cai flow list|get|create|rename|duplicate|delete|reorder|layout
25
19
  cai flow input add|update|delete
26
20
  cai flow output add|update|delete
27
21
  cai integration search|actions|action
28
- cai node init|status|get|props|set|connect|disconnect|delete
22
+ cai node add|status|get|props|set|connect|disconnect|delete
29
23
  ```
30
24
 
31
- MCP: `node set` and `expr set` are merged into `node_prop_set`.
32
-
33
- Declare flow outputs before adding a Return response node. Its props are derived from those outputs.
34
-
35
- `cai flow input add <flowId> --display "<human label>" --type <type>` returns the compiler-current `jsBinding`. Use the latest value from `flow get` (`jsBinding`) or `workflow outline` (`binding`), re-read it after every input rename, and never cache its spelling across renames. `legacyBinding` is diagnostic-only.
36
-
37
- ## Conditions and composition
25
+ ## Composition
38
26
 
39
27
  ```text
40
28
  cai node only-when
@@ -43,38 +31,25 @@ cai flow for-each
43
31
  cai node set-flow
44
32
  ```
45
33
 
46
- MCP: use `flow_for_each_scaffold` for `flow for-each` and `node_subflow_set` for `node set-flow`; pass file-based loop source inline as `listJs` and branch condition source as `js`.
47
-
48
- Use branch-specific connection commands for Router and If/Else outputs. Generic `node connect` supports only `main` and `error` outputs.
34
+ Router and If/Else outputs connect through the branch commands; generic `node connect` handles only `main` and `error` outputs.
49
35
 
50
36
  ## Verification
51
37
 
52
38
  ```text
53
39
  cai run inputs|node|flow|discover
54
- cai exec list|get|flow|node|ports|tree
40
+ cai exec list|get|flow|node|tree
55
41
  ```
56
42
 
57
- MCP: `run_node` and `run_flow` take `waitSeconds` (default 60, maximum 120). `run_discover` never keeps its scratch graph.
43
+ `run discover` executes the real action in a scratch flow and can cause third-party effects or charges; do not use it casually on mutating actions.
58
44
 
59
- `run discover` executes the real integration action in a scratch flow and can incur third-party effects or usage. Do not use it casually for mutating actions.
60
-
61
- ## Product surfaces
45
+ ## Other domains
62
46
 
63
47
  ```text
64
- cai connection list|connect
65
- cai trigger list|get|search|props|options|create|events|event|select-event|replay|set-enabled|rename|delete
66
- cai schema list|get|resolve|create|update|delete
67
- cai data collections|fields|query|get|create|update|delete|delete-many|import|copy-to-live
68
- cai agent list|get|create|update|add-workflow|remove-tool|add-file|tools|publish-preflight|publish|versions|visibility
69
- cai agent conversation list|create|status|history|send|approve|deny
48
+ cai connection list|update|delete
49
+ cai trigger list|get|create|search|replay|test-events
50
+ cai schema list|create|update|delete
51
+ cai data collections|query|create|update|delete|import
52
+ cai agent create|get|list|update|add-workflow|add-action|add-file|remove-tool|publish|conversation
70
53
  ```
71
54
 
72
- Connections are authorized in a browser. The CLI returns and may open the URL; MCP returns it from `connection_connect_url`.
73
-
74
- MCP: `trigger_set_enabled` takes the same explicit enabled state as the CLI setter.
75
-
76
- MCP: every data write requires explicit `env`; pass CSV text inline as `content` to `data_record_import`, and pass `env: "live"` to `data_copy_to_live`.
77
-
78
- MCP: `agent update` splits into `agent_update` and `agent_set_enabled`; `agent add-file` splits into `agent_knowledge_file_add` and `agent_workspace_file_add` with inline `content`. `agent_conversation_send` takes `waitSeconds`.
79
-
80
- Agent visibility supports only `private` and `organization`; organization is an explicit live access change after agent publish.
55
+ Each family has its own skill; the map above covers CLI-to-MCP names for all of them.