@controllerai/cli 0.2.13 → 0.2.15
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/README.md +13 -4
- package/dist/commands/connection.js +98 -13
- package/dist/commands/connection.js.map +1 -1
- package/dist/commands/data.js +26 -15
- package/dist/commands/data.js.map +1 -1
- package/dist/commands/doctor.js +2 -2
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/exec.js +284 -133
- package/dist/commands/exec.js.map +1 -1
- package/dist/commands/expr.js +89 -5
- package/dist/commands/expr.js.map +1 -1
- package/dist/commands/integration.js +170 -49
- package/dist/commands/integration.js.map +1 -1
- package/dist/commands/node.js +11 -287
- package/dist/commands/node.js.map +1 -1
- package/dist/commands/organize.js +182 -219
- package/dist/commands/organize.js.map +1 -1
- package/dist/commands/run.js +342 -77
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/signup.js +10 -7
- package/dist/commands/signup.js.map +1 -1
- package/dist/commands/trigger.js +14 -8
- package/dist/commands/trigger.js.map +1 -1
- package/dist/commands/workflow.js +203 -61
- package/dist/commands/workflow.js.map +1 -1
- package/dist/errors.js +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/nodeProps.js +1 -1
- package/dist/nodeProps.js.map +1 -1
- package/package.json +3 -3
- package/skills/controllerai-agents/SKILL.md +27 -19
- package/skills/controllerai-agents/references/instructions-and-versioning.md +2 -0
- package/skills/controllerai-ai-nodes/SKILL.md +10 -4
- package/skills/controllerai-ai-nodes/references/selection-and-testing.md +2 -0
- package/skills/controllerai-data/SKILL.md +18 -6
- package/skills/controllerai-data/references/data-rails.md +4 -2
- package/skills/controllerai-expressions/SKILL.md +24 -4
- package/skills/controllerai-expressions/references/dsl-and-recipes.md +5 -1
- package/skills/controllerai-flow-control/SKILL.md +12 -3
- package/skills/controllerai-flow-control/references/patterns.md +4 -0
- package/skills/controllerai-integration-actions/SKILL.md +21 -11
- package/skills/controllerai-node-config/SKILL.md +31 -8
- package/skills/controllerai-node-config/references/prop-and-readiness.md +9 -3
- package/skills/controllerai-runs/SKILL.md +21 -9
- package/skills/controllerai-runs/references/debugging.md +11 -7
- package/skills/controllerai-start/SKILL.md +30 -7
- package/skills/controllerai-start/references/mcp-tool-map.md +170 -0
- package/skills/controllerai-triggers/SKILL.md +14 -6
- package/skills/controllerai-triggers/references/lifecycle.md +5 -3
- package/skills/controllerai-workflows/SKILL.md +17 -9
- package/skills/controllerai-workflows/references/command-map.md +21 -6
- package/skills/manifest.json +79 -73
|
@@ -5,7 +5,9 @@ description: Discover, connect, attach, update, and verify ready integration act
|
|
|
5
5
|
|
|
6
6
|
# Controller AI integration actions
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
The `cai ...` examples are canonical grammar. Use the transport selected in `controllerai-start` and its MCP tool map; never mix transports in one task.
|
|
9
|
+
|
|
10
|
+
Ready integration actions give a hosted agent one app operation without first building a workflow. Use the canonical operations below through the selected transport; do not call Controller AI REST routes directly.
|
|
9
11
|
|
|
10
12
|
## Choose direct action or workflow
|
|
11
13
|
|
|
@@ -17,10 +19,11 @@ Use a workflow tool instead when the capability needs multiple operations, trans
|
|
|
17
19
|
|
|
18
20
|
```bash
|
|
19
21
|
cai integration search "<app or capability>" --json
|
|
20
|
-
cai integration actions <
|
|
22
|
+
cai integration actions "<operation>" --integration <integrationSlug> --json
|
|
23
|
+
cai integration action --integration <integrationSlug> --key <actionKey> --json
|
|
21
24
|
```
|
|
22
25
|
|
|
23
|
-
Preserve
|
|
26
|
+
Preserve each returned `nodeSlug` and `key` pair exactly, then inspect that action's static props before using it. Never derive either identifier from a display label. Narrow the query or raise `--limit` when more matches exist.
|
|
24
27
|
|
|
25
28
|
## Select a connection
|
|
26
29
|
|
|
@@ -28,25 +31,28 @@ Preserve the returned integration `slug` and action `key` exactly. Never derive
|
|
|
28
31
|
cai connection list --integration <integrationSlug> --json
|
|
29
32
|
```
|
|
30
33
|
|
|
31
|
-
Use an active connection whose `
|
|
34
|
+
Use an active connection whose `integration` exactly matches the integration slug. If none exists:
|
|
32
35
|
|
|
33
36
|
```bash
|
|
34
37
|
cai connection connect <integrationSlug>
|
|
35
38
|
```
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
MCP: call `connection_connect_url`, show its `url` as a markdown link, ask the user to finish, then confirm with `connection_list` using its `integration`; it has no `open` or `wait` parameter.
|
|
41
|
+
|
|
42
|
+
The connection handoff keeps provider credentials out of the agent context. The CLI may open the URL; MCP returns it. Re-list connections after the user finishes, then attach the action.
|
|
43
|
+
|
|
44
|
+
Rename or change the default with `cai connection update <id> [--name "<displayName>"] [--default|--no-default]` (MCP: `connection_update`); delete only intentionally with `cai connection delete <id> --yes` (MCP: `connection_delete`).
|
|
45
|
+
Deleting a connection immediately removes authorization from bound nodes and agent tools.
|
|
38
46
|
|
|
39
|
-
A missing connection is never a reason to substitute `registry_http-http-request` for a catalog component. For a workflow node, add the real component and leave it unconnected; `missingConnection: true` is a valid handoff state. For a direct action, preserve the selected integration and action and stop at the connection handoff. Give the user `cai connection connect <slug
|
|
47
|
+
A missing connection is never a reason to substitute `registry_http-http-request` for a catalog component. For a workflow node, add the real component and leave it unconnected; `missingConnection: true` is a valid handoff state. For a direct action, preserve the selected integration and action and stop at the connection handoff. Give the user the returned connection URL; on CLI, `cai connection connect <slug>` obtains it. A raw endpoint mentioned by the user is background context, not an instruction to hand-roll the call.
|
|
40
48
|
|
|
41
49
|
## Decide approval before attaching
|
|
42
50
|
|
|
43
|
-
|
|
51
|
+
Attached actions run without a human approval step unless `requireConfirmation` is `true`. When attaching an action that sends, posts, spends, or deletes, choose `true` or explicitly tell the user that it will run unattended. Mention the confirmation choice in the report to the user.
|
|
44
52
|
|
|
45
|
-
-
|
|
53
|
+
- Prefer confirmation for permission changes, irreversible writes, or an ambiguous destination.
|
|
46
54
|
- Usually omit confirmation for read-only retrieval and low-risk, reversible operations the user clearly asked the agent to perform autonomously.
|
|
47
55
|
|
|
48
|
-
Tell the user which policy was selected and why when it has a meaningful consequence.
|
|
49
|
-
|
|
50
56
|
```bash
|
|
51
57
|
cai agent add-action <agentId> \
|
|
52
58
|
--integration <integrationSlug> \
|
|
@@ -57,7 +63,7 @@ cai agent add-action <agentId> \
|
|
|
57
63
|
--json
|
|
58
64
|
```
|
|
59
65
|
|
|
60
|
-
|
|
66
|
+
MCP: call `agent_tool_action_add`; `requireConfirmation` is optional and defaults to `false`. On CLI, `--require-confirmation` selects `true` and omission preserves the `false` default. Do not attach the same action twice.
|
|
61
67
|
|
|
62
68
|
Read the saved grant back:
|
|
63
69
|
|
|
@@ -75,6 +81,8 @@ cai agent update-tool <agentId> --tool <toolId> --require-confirmation --json
|
|
|
75
81
|
cai agent update-tool <agentId> --tool <toolId> --no-confirmation --json
|
|
76
82
|
```
|
|
77
83
|
|
|
84
|
+
MCP: call `agent_tool_update`; use `connectionId` and `requireConfirmation: true` or `requireConfirmation: false`.
|
|
85
|
+
|
|
78
86
|
`--connection` can redirect the published action immediately because authorization is live-bound. Description and confirmation-policy edits remain draft changes until the agent is published.
|
|
79
87
|
|
|
80
88
|
## Verify through the hosted agent
|
|
@@ -86,6 +94,8 @@ cai agent test <agentId> --draft --message "<request>" --json
|
|
|
86
94
|
cai agent conversation history <conversationId> --json
|
|
87
95
|
```
|
|
88
96
|
|
|
97
|
+
MCP: call `agent_test` with `rail: draft` and `waitSeconds`.
|
|
98
|
+
|
|
89
99
|
A direct action runs inline and does not create a workflow execution ID. Evidence is the persisted conversation, its direct-action tool/run events, the returned result, and any observed external side effect. Never invent a workflow execution ID for it.
|
|
90
100
|
|
|
91
101
|
If confirmation is required, inspect the pending action and exact arguments before approving or denying its request. A successful assistant reply alone does not prove the intended action ran.
|
|
@@ -5,6 +5,8 @@ description: Discover, initialize, configure, connect, and verify Controller AI
|
|
|
5
5
|
|
|
6
6
|
# Controller AI node configuration
|
|
7
7
|
|
|
8
|
+
The `cai ...` examples are canonical grammar. Use the transport selected in `controllerai-start` and its MCP tool map; never mix transports in one task.
|
|
9
|
+
|
|
8
10
|
A node is ready only after its component, connection, dependency-ordered props, wiring, and output type are valid. Treat configuration as a state machine, not a bag of property writes.
|
|
9
11
|
|
|
10
12
|
## Deterministic sequence
|
|
@@ -12,15 +14,15 @@ A node is ready only after its component, connection, dependency-ordered props,
|
|
|
12
14
|
### 1. Find an exact component
|
|
13
15
|
|
|
14
16
|
```bash
|
|
15
|
-
cai
|
|
16
|
-
cai
|
|
17
|
+
cai integration actions "<capability>" --json
|
|
18
|
+
cai integration action --integration <nodeSlug> --key <nodeKey> --json
|
|
17
19
|
```
|
|
18
20
|
|
|
19
|
-
Use the returned `nodeSlug` and full `
|
|
21
|
+
Use the returned `nodeSlug` and full `key`. Do not infer a component key from its display name. If discovery is broad, narrow it with:
|
|
20
22
|
|
|
21
23
|
```bash
|
|
22
|
-
cai
|
|
23
|
-
cai
|
|
24
|
+
cai integration search "<integration>" --actions --json
|
|
25
|
+
cai integration actions "<action>" --integration <nodeSlug> --json
|
|
24
26
|
```
|
|
25
27
|
|
|
26
28
|
Inspect static prop metadata before creating the node. `required`, `remoteOptions`, and `reloadProps` determine configuration order.
|
|
@@ -33,12 +35,19 @@ If the component requires auth:
|
|
|
33
35
|
cai connection list --node <nodeSlug> --json
|
|
34
36
|
```
|
|
35
37
|
|
|
36
|
-
- One active connection: use its exact `connectionId`.
|
|
38
|
+
- One active connection: use its exact `id` as the `connectionId`.
|
|
37
39
|
- Several: use an explicit user preference; otherwise ask which account.
|
|
38
|
-
- None: add the real component without `--connection`; `missingConnection: true` is a valid handoff state.
|
|
40
|
+
- None: add the real component without `--connection`; `missingConnection: true` is a valid handoff state. On CLI, get the link with `cai connection connect <nodeSlug> --no-open` and share it right away; do not block on `--wait` before sharing.
|
|
41
|
+
|
|
42
|
+
MCP: call `connection_connect_url` with `nodeSlug`, show its `url` as a markdown link, ask the user to finish, then confirm with `connection_list` using its `integration`.
|
|
43
|
+
|
|
44
|
+
After they confirm, run `cai connection list --integration <nodeSlug> --json` and bind the new ID with `cai node set-connection <nodeId> --connection <connectionId>`.
|
|
39
45
|
|
|
40
46
|
Never substitute a connection from a similar slug.
|
|
41
47
|
|
|
48
|
+
Rename or change the default with `cai connection update <id> [--name "<displayName>"] [--default|--no-default]` (MCP: `connection_update`); delete only intentionally with `cai connection delete <id> --yes` (MCP: `connection_delete`).
|
|
49
|
+
Deleting a connection immediately removes authorization from bound nodes and agent tools.
|
|
50
|
+
|
|
42
51
|
A missing connection is never a reason to substitute `registry_http-http-request` for a catalog component. A raw endpoint mentioned by the user is background context, not an instruction to hand-roll the call.
|
|
43
52
|
|
|
44
53
|
### 3. Initialize once
|
|
@@ -54,6 +63,8 @@ cai node init \
|
|
|
54
63
|
--json
|
|
55
64
|
```
|
|
56
65
|
|
|
66
|
+
MCP: use `node_add`; `cai node init` is the CLI alias of `cai node add`.
|
|
67
|
+
|
|
57
68
|
Omit flags that do not apply. `--after` creates the ordinary main/error wire at creation. Use it when later props need upstream data. Initialization also accepts `--props`, but use it only for static, non-option values already present in the inspected component metadata. Never inline a `remoteOptions` value, a reload selector and its dependents, or a prop that has not materialized yet; initialize first and set those sequentially. Use `--enable-prop <name...>` only for optional props confirmed by component metadata.
|
|
58
69
|
|
|
59
70
|
Capture the returned `nodeId`; do not rediscover it by name.
|
|
@@ -89,6 +100,8 @@ Static value:
|
|
|
89
100
|
cai node set <nodeId> --prop <exactName> --value '<literal-or-json>' --json
|
|
90
101
|
```
|
|
91
102
|
|
|
103
|
+
MCP: use `node_prop_set` with `value`; it also handles expression writes through `js`.
|
|
104
|
+
|
|
92
105
|
Optional prop:
|
|
93
106
|
|
|
94
107
|
```bash
|
|
@@ -97,8 +110,12 @@ cai node set <nodeId> --prop <exactName> --value '<literal-or-json>' --json
|
|
|
97
110
|
# or: cai expr set <nodeId> --prop <exactName> --js '<expression>' --json
|
|
98
111
|
```
|
|
99
112
|
|
|
113
|
+
MCP: `cai expr set` is the `js` form of `node_prop_set`.
|
|
114
|
+
|
|
100
115
|
`node set` and `expr set` auto-enable a catalog-only optional prop, refresh its metadata, then write. Do not run a separate enable step first. If validation or the later write fails, the prop stays enabled; repair with `cai node disable-prop <nodeId> --prop <exactName>` and re-read props. This is also the repair for the Update-data wipe footgun: that action writes every enabled field, so disable any accidentally enabled field before running it.
|
|
101
116
|
|
|
117
|
+
MCP: use `node_optional_prop_set` with `enabled: false` to disable or `enabled: true` to enable.
|
|
118
|
+
|
|
102
119
|
Remote or dynamic option:
|
|
103
120
|
|
|
104
121
|
```bash
|
|
@@ -112,7 +129,7 @@ cai node set <nodeId> \
|
|
|
112
129
|
|
|
113
130
|
`node options` also supports `--prev-context '<context JSON>'` from the preceding page and repeatable `--for '<earlierProp>=<value>'` overrides for read-only hypothetical resolution; JSON literals are accepted and bare text stays a string. If options are `blocked_upstream`, both `node options` and `node set` name the blocking prop and print the exact `cai node set` command to run first.
|
|
114
131
|
|
|
115
|
-
For an ordinary remote option, preserve both fields from the same returned option. The label is not cosmetic:
|
|
132
|
+
For an ordinary remote option, preserve both fields from the same returned option. The label is not cosmetic: it is used to search providers that do not index opaque IDs, then the returned value is verified before writing. For a multi-select, pass a JSON array of returned values and one `--label` argument per value, in the same order. The write supplies the persisted label shape, chooses the correct expression storage channel, and verifies read-back.
|
|
116
133
|
|
|
117
134
|
When an earlier selector makes the prop `dynamic_upstream`, no option list exists. Use a known exact ID or an expression:
|
|
118
135
|
|
|
@@ -144,14 +161,20 @@ cai node status <nodeId> --json
|
|
|
144
161
|
cai run node <nodeId> --inputs <values.json> --json
|
|
145
162
|
```
|
|
146
163
|
|
|
164
|
+
MCP: `run_node` takes the parsed `inputs` object and `waitSeconds` (default 60, max 120).
|
|
165
|
+
|
|
147
166
|
If the node has a wired input or consumes `inputs.<name>`, the node test is only an isolated configuration check. Run `cai run flow <flowId> --inputs <values.json> --json` before declaring its upstream expressions verified.
|
|
148
167
|
|
|
168
|
+
MCP: `run_flow` takes the parsed `inputs` object and `waitSeconds` (default 60, max 120).
|
|
169
|
+
|
|
149
170
|
If a dynamic provider action cannot be run but its response is documented, declare an unverified output contract:
|
|
150
171
|
|
|
151
172
|
```bash
|
|
152
173
|
cai node declare-output <nodeId> --sample-file provider-response.json --json
|
|
153
174
|
```
|
|
154
175
|
|
|
176
|
+
MCP: call `node_output_type_declare` with the parsed provider response in `sample`; the server cannot read `provider-response.json`.
|
|
177
|
+
|
|
155
178
|
The sample must be a JSON object or a non-empty JSON array of provider items. Re-read status and expression context afterward; the first real completed run verifies the declaration.
|
|
156
179
|
|
|
157
180
|
Read [references/prop-and-readiness.md](references/prop-and-readiness.md) when a prop is dynamic, option-backed, expression-capable, or unexpectedly absent.
|
|
@@ -13,7 +13,7 @@ The JSON response reports:
|
|
|
13
13
|
- `readyForExpressions`: connection and required/reload props are complete. The source still must be wired before its binding appears in expression context.
|
|
14
14
|
- `readyForRun`: connection and required/reload props are complete; running may be the step that discovers a concrete output type.
|
|
15
15
|
- `readyForDownstreamExpressions`: the node is runnable and its actual process output type is concrete enough for downstream field bindings.
|
|
16
|
-
- `next`: the
|
|
16
|
+
- `next`: the canonical next diagnostic command.
|
|
17
17
|
|
|
18
18
|
Follow `next`, then read status again. Do not treat `readyForRun` as proof that downstream fields are typed; require `readyForDownstreamExpressions` for that.
|
|
19
19
|
|
|
@@ -26,6 +26,8 @@ cai node set-connection <nodeId> --connection <connectionId> --json
|
|
|
26
26
|
cai node status <nodeId> --json
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
MCP: replace `cai connection connect` with `connection_connect_url { nodeSlug }`; the other calls map directly.
|
|
30
|
+
|
|
29
31
|
## Prop channels
|
|
30
32
|
|
|
31
33
|
Use `cai node set`; it selects the persisted shape from live metadata.
|
|
@@ -36,6 +38,8 @@ Use `cai node set`; it selects the persisted shape from live metadata.
|
|
|
36
38
|
| Dynamic text, JSON text, or custom data | `--js` | `valueJs` |
|
|
37
39
|
| Dynamic non-text prop with expression mode | `--js` | `expressionValueJs` |
|
|
38
40
|
|
|
41
|
+
MCP: both `cai node set` and `cai expr set` use `node_prop_set`; pass exactly one of `value`, `js`, or `rawExpressionJson`.
|
|
42
|
+
|
|
39
43
|
Do not force a channel with internal fields. `cai node set` and `cai expr set` compile first and verify the actual channel after writing.
|
|
40
44
|
|
|
41
45
|
## Option-backed props
|
|
@@ -55,7 +59,7 @@ cai node options <nodeId> --prop <name> --query "<specific search>" --json
|
|
|
55
59
|
cai node set <nodeId> --prop <name> --value '<option.value>' --label '<option.label>' --json
|
|
56
60
|
```
|
|
57
61
|
|
|
58
|
-
Pass the value and label from the same live option. Remote providers often search labels rather than opaque values, so omitting `--label` can make a valid copied ID impossible to re-verify. For multi-select, pass a JSON array of returned values plus one `--label` argument per value in matching order. The
|
|
62
|
+
Pass the value and label from the same live option. Remote providers often search labels rather than opaque values, so omitting `--label` can make a valid copied ID impossible to re-verify. For multi-select, pass a JSON array of returned values plus one `--label` argument per value in matching order. The write constructs the required array of `{value,label}` records for read-back/UI compatibility.
|
|
59
63
|
|
|
60
64
|
Continue a provider page with the opaque context printed by the previous call:
|
|
61
65
|
|
|
@@ -103,4 +107,6 @@ An unresolved output blocks trustworthy downstream field expressions. Resolve it
|
|
|
103
107
|
|
|
104
108
|
After the run, read `cai node status` and `cai expr context` again. Do not infer fields from an example response alone if the platform did not adopt a concrete type.
|
|
105
109
|
|
|
106
|
-
|
|
110
|
+
Completed node and flow runs pass the exact node-execution ID back for ownership, workflow, node, component-snapshot, and terminal-status checks before deriving the persisted output shape; callers never supply the type name. Adoption updates only that non-static node, so separate instances of generic components such as HTTP can learn different schemas. Inspect `outputTypeAdoption`/`outputTypeAdoptions` in the run result. If it reports `no_observed_output`, use a representative input that returns data and rerun. If it reports `error`, stop and surface that error rather than inventing a schema.
|
|
111
|
+
|
|
112
|
+
MCP: `run_node` and `run_flow` take `inputs` inline and `waitSeconds` from 0 through 120.
|
|
@@ -5,6 +5,8 @@ description: Run and debug Controller AI nodes on development and flows on devel
|
|
|
5
5
|
|
|
6
6
|
# Controller AI runs
|
|
7
7
|
|
|
8
|
+
The `cai ...` examples are canonical grammar. Use the transport selected in `controllerai-start` and its MCP tool map; never mix transports in one task.
|
|
9
|
+
|
|
8
10
|
Think "real run", not "simulation". `run node` always uses development; `run flow` defaults to development and can target the published live version. Both rails execute real integration actions (messages send, records change, provider usage is spent); development isolation covers the data store only. Running is a required part of building — one successful run is how a dynamic node's output type gets resolved for the next step — so mitigate risk before running.
|
|
9
11
|
|
|
10
12
|
## Consequential actions: mitigate with the user, don't refuse
|
|
@@ -21,6 +23,8 @@ If the user declines running the action, accept it. Then keep the build honest:
|
|
|
21
23
|
cai node declare-output <nodeId> --sample-file shape.json
|
|
22
24
|
```
|
|
23
25
|
|
|
26
|
+
MCP: call `node_output_type_declare` with parsed JSON in `sample`; the server cannot read `shape.json`.
|
|
27
|
+
|
|
24
28
|
— where `shape.json` is a representative response object from the provider's API reference. The contract is marked `declared (unverified)`; the first real completed run verifies and upgrades it automatically. State clearly that it is unverified until then, and make the first live run the explicit verification step. Never silently skip the question and never present an unrun action as verified.
|
|
25
29
|
|
|
26
30
|
## First live run is part of development
|
|
@@ -31,6 +35,8 @@ After publishing, run the published version directly under supervision:
|
|
|
31
35
|
cai run flow <flowId> --inputs values.json --target live --confirm-live --json
|
|
32
36
|
```
|
|
33
37
|
|
|
38
|
+
MCP: pass parsed values in `inputs` and set `waitSeconds` on `run_flow`.
|
|
39
|
+
|
|
34
40
|
This command fires external actions and spends usage. For risky sends, build the safe-audience harness: branch on the `isLiveVersion` data source with If/Else — the false branch targets the developer (own email/channel), the true branch targets the real audience. Use this direct live run for explicit verification; do not wait for a real trigger event.
|
|
35
41
|
|
|
36
42
|
## Prepare exact run inputs
|
|
@@ -40,7 +46,7 @@ cai run inputs <nodeId> --json
|
|
|
40
46
|
cai run inputs <flowId> --flow --json
|
|
41
47
|
```
|
|
42
48
|
|
|
43
|
-
Use returned opaque input IDs. Flow mode lists EVERY declared input with a `used` flag: supply the used ones (an unsupplied used input falls back to its saved test value), while values keyed to unused inputs are accepted and ignored.
|
|
49
|
+
Use returned opaque input IDs. Flow mode lists EVERY declared input with a `used` flag: supply the used ones (an unsupplied used input falls back to its saved test value), while values keyed to unused inputs are accepted and ignored. The input object can be a flat map; the CLI may load it from a file:
|
|
44
50
|
|
|
45
51
|
```json
|
|
46
52
|
{
|
|
@@ -63,9 +69,11 @@ cai run node <nodeId> --inputs values.json --json
|
|
|
63
69
|
cai run flow <flowId> --inputs values.json --json
|
|
64
70
|
```
|
|
65
71
|
|
|
72
|
+
MCP: pass parsed values in `inputs` and set `waitSeconds` on `run_node` or `run_flow`.
|
|
73
|
+
|
|
66
74
|
`run node` is deliberately isolated: it does not execute wired upstream nodes. Read its `runScope`. If `endToEndValidationRequired` is true, values derived from upstream can be empty even when the selected node is green; do not accept that run as expression proof. `run flow` is the end-to-end check that executes upstream wiring.
|
|
67
75
|
|
|
68
|
-
The CLI waits for a terminal execution state. Capture `workflowExecutionId` and `nodeExecutionId` from the result.
|
|
76
|
+
The CLI waits for a terminal execution state by default. MCP polling is bounded by `waitSeconds` and may return an unfinished execution ID. Capture `workflowExecutionId` and `nodeExecutionId` from the result.
|
|
69
77
|
|
|
70
78
|
For every node test, inspect:
|
|
71
79
|
|
|
@@ -73,7 +81,7 @@ For every node test, inspect:
|
|
|
73
81
|
- `skipReason`
|
|
74
82
|
- `runScope`, especially `upstreamNodesExecuted` and `endToEndValidationRequired`
|
|
75
83
|
- `resolvedConfigs`
|
|
76
|
-
- `resolvedConfigs[].resolutionWarnings`: trust every structured entry; `[]` is authoritatively clean.
|
|
84
|
+
- `resolvedConfigs[].resolutionWarnings`: trust every structured entry; `[]` is authoritatively clean. Also read any transport warnings; CLI runs may mirror them on stderr.
|
|
77
85
|
- `outputTypeAdoption`: the server verifies the exact completed `nodeExecutionId`, derives its persisted output shape, and updates only that non-static node. `adopted` or `already_typed` lets the next `node status` converge; `no_observed_output` means the representative run returned no reusable shape. `adoptedNodeIds` must be empty or contain only the tested node; stop if it names a sibling.
|
|
78
86
|
- output shape and values
|
|
79
87
|
|
|
@@ -82,14 +90,16 @@ A dynamic prop with a null/empty resolved config is a failure even when status i
|
|
|
82
90
|
## Debug from the execution tree
|
|
83
91
|
|
|
84
92
|
```bash
|
|
85
|
-
cai exec tree <workflowExecutionId> --json
|
|
93
|
+
cai exec tree <workflowExecutionId> --limit 50 --json
|
|
86
94
|
cai exec get <workflowExecutionId> --json
|
|
87
95
|
cai exec flow <flowExecutionId> --json
|
|
88
|
-
cai exec node <nodeExecutionId> --json
|
|
89
|
-
cai exec ports <nodeExecutionId> --json
|
|
96
|
+
cai exec node <nodeExecutionId> --full --json
|
|
90
97
|
```
|
|
91
98
|
|
|
92
|
-
|
|
99
|
+
Page with the returned `nextCursor` via `--cursor`; narrow large runs with repeatable `--status`
|
|
100
|
+
or `--flow <flowId>`. Use the tree to locate the first unexpected status. Use the full node
|
|
101
|
+
execution to inspect its status, resolved configuration, and untruncated output. Read
|
|
102
|
+
[references/debugging.md](references/debugging.md) for the fault-isolation order.
|
|
93
103
|
|
|
94
104
|
## Output discovery
|
|
95
105
|
|
|
@@ -104,13 +114,15 @@ cai run discover \
|
|
|
104
114
|
--json
|
|
105
115
|
```
|
|
106
116
|
|
|
107
|
-
|
|
117
|
+
MCP: `run_discover` always removes the scratch graph and exposes neither `keep` nor `waitSeconds`.
|
|
118
|
+
|
|
119
|
+
This calls the real third-party action and spends usage. For a destructive action, do not probe merely to learn its output — first ask the user for a safe target (see "Consequential actions" above); if they decline, declare the expected shape instead. On CLI, use `--keep` only when the user wants the scratch node retained.
|
|
108
120
|
|
|
109
121
|
After successful output discovery, re-read `cai node status` and downstream `cai expr context`; verify the adopted output type is concrete.
|
|
110
122
|
|
|
111
123
|
## Completion gate
|
|
112
124
|
|
|
113
|
-
-
|
|
125
|
+
- CLI scripts may gate on `cai workflow validate` exiting 1; MCP callers inspect `valid` and `errors`.
|
|
114
126
|
- The test exercised the changed path with credible values.
|
|
115
127
|
- The first unexpected node, if any, was identified rather than inferred from the final error.
|
|
116
128
|
- All dynamic configs resolved to intended values.
|
|
@@ -11,26 +11,30 @@ cai flow get <flowId> --json
|
|
|
11
11
|
|
|
12
12
|
Node runs use development. Flow runs default to development; `cai run flow <flowId> --target live --confirm-live` runs the published version. Trigger replay also defaults to development and uses the same flags for live. Every rail can call real providers and create external effects.
|
|
13
13
|
|
|
14
|
+
MCP: `run_flow` takes `waitSeconds` and may return before the execution is terminal.
|
|
15
|
+
|
|
14
16
|
## 2. Find the first divergence
|
|
15
17
|
|
|
16
18
|
```bash
|
|
17
|
-
cai exec tree <workflowExecutionId> --json
|
|
19
|
+
cai exec tree <workflowExecutionId> --limit 50 --json
|
|
18
20
|
```
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
Follow `nextCursor` with `--cursor`, and use repeatable `--status` or `--flow <flowId>` when the
|
|
23
|
+
run is large. Classify each node as completed, failed, skipped intentionally, skipped unexpectedly,
|
|
24
|
+
or absent. The first divergence is usually the cause; later failures are often consequences.
|
|
21
25
|
|
|
22
26
|
## 3. Inspect the node boundary
|
|
23
27
|
|
|
24
28
|
```bash
|
|
25
|
-
cai exec
|
|
29
|
+
cai exec node <nodeExecutionId> --full --json
|
|
26
30
|
```
|
|
27
31
|
|
|
28
32
|
Check:
|
|
29
33
|
|
|
30
|
-
1.
|
|
31
|
-
2.
|
|
32
|
-
3.
|
|
33
|
-
4.
|
|
34
|
+
1. Resolved configs: did each expression resolve, and to the correct type/value?
|
|
35
|
+
2. Output: did the component return the promised shape and value?
|
|
36
|
+
3. Status/error: did the provider or engine reject the call?
|
|
37
|
+
4. Upstream execution rows and wiring: did every expected producer run and connect to this node?
|
|
34
38
|
|
|
35
39
|
## 4. Fix by category
|
|
36
40
|
|
|
@@ -1,23 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: controllerai-start
|
|
3
|
-
description: Connect, orient, and route work across Controller AI agents and no-code automations. Use when starting a Controller AI coding-agent session, after `cai connect`, or when deciding whether an outcome should be a ready integration action, a workflow, an agent, or a combination.
|
|
3
|
+
description: Connect, orient, and route work across Controller AI agents and no-code automations. Use when starting a Controller AI coding-agent or MCP session, after `cai connect`, or when deciding whether an outcome should be a ready integration action, a workflow, an agent, or a combination.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Start with Controller AI
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Transports
|
|
9
|
+
|
|
10
|
+
The `cai ...` examples are canonical grammar. Use either the CLI or the typed MCP tools for a task; never mix transports within one task.
|
|
11
|
+
|
|
12
|
+
MCP tool names are domain-first snake_case derived from CLI command paths (`cai flow input add` -> `flow_input_add`). Read [references/mcp-tool-map.md](references/mcp-tool-map.md) for every command and reviewed exception. MCP has no workflow pin: pass `workflowId` on every workflow-scoped tool. Long-running MCP tools take `waitSeconds` (default 60, maximum 120) instead of CLI wait or timeout flags.
|
|
13
|
+
|
|
14
|
+
Local CLI setup commands do not exist on MCP. Use `account_status` for `auth status` and `doctor`, `account_claim_start`/`account_claim_verify` for email claiming, and `guide_list`/`guide_get` for bundled skills. `cai connect`, root `cai signup`, `cai auth login` and other local auth mutations, `cai skills install`, `cai skills update`, `cai use`, `cai config reset`, and `cai connection request` remain local-only; `cai agent present` and `cai file share` stay available to the in-app builder while hosted MCP uses their equivalents below.
|
|
15
|
+
|
|
16
|
+
- **Connect:** Call `connection_connect_url`, show its `url` as a markdown link, ask the user to finish connecting, then confirm with `connection_list` using its `integration`.
|
|
17
|
+
- **Finished agent:** Call `agent_present` and relay the returned agent card, including its link.
|
|
18
|
+
- **File for the user:** Call `file_share` and relay its returned link; Claude Code users may also just read it from the terminal.
|
|
19
|
+
|
|
20
|
+
## Your account on MCP
|
|
21
|
+
|
|
22
|
+
Call `account_status` first. During OAuth, the user explicitly chose **My Controller account** or **Separate agent account**; do not infer that choice from browser state. In your first reply, say which account `account_status` reports they are using. If it is an unclaimed agent account, offer to claim it with their email at any time. Never ask for passwords—the claim uses the 6-digit code sent to their email. After a successful claim, tell them they can open the app URL from `account_status`, choose **Forgot password** with that email, set a password, and sign in to the same workspace.
|
|
9
23
|
|
|
10
24
|
## Confirm the setup
|
|
11
25
|
|
|
12
|
-
|
|
26
|
+
On the CLI, run:
|
|
13
27
|
|
|
14
28
|
```bash
|
|
15
29
|
cai doctor
|
|
16
30
|
```
|
|
17
31
|
|
|
18
|
-
|
|
32
|
+
MCP: use `account_status`; local diagnosis, login, and `cai connect` do not exist.
|
|
33
|
+
|
|
34
|
+
On the CLI, if authentication is missing and the human already has an account, run `cai connect`. If no account exists, run `cai signup` to create a provisional workspace and start building immediately. An unclaimed signup has the same functional access as a free account, including workflow and agent publishing; its workspace is not automatically deleted, and it has a $1 monthly usage cap (`cai signup` prints the exact amount). Email claiming is optional: run `cai signup email <address>`, ask the human account owner for the 6-digit code delivered to their inbox (never guess it), then run `cai signup verify <code>` to raise the monthly cap to $5 and enable durable account recovery. If agent signup is disabled, ask the human to register at https://app.getcontroller.ai/register, then run `cai connect`.
|
|
35
|
+
|
|
36
|
+
MCP: the OAuth caller is already provisioned; use `account_claim_start` and `account_claim_verify` for optional email claiming.
|
|
37
|
+
|
|
38
|
+
On the CLI, if `cai doctor` reports missing, stale, or damaged managed skills, run `cai skills update`, then run `cai doctor` again. When the `CLI version` row says a newer cai is available, upgrade before continuing (`npm install -g @controllerai/cli@latest`, then `cai skills update`) — new versions carry fixes the rest of these skills assume. Skill updates are setup maintenance, not a step to repeat during every build.
|
|
39
|
+
|
|
40
|
+
MCP: use `guide_list` and `guide_get`; skill installation, updates, and CLI upgrades are not hosted-session steps. Never ask the user to paste a password, provider token, or Controller AI credential into chat.
|
|
19
41
|
|
|
20
|
-
|
|
42
|
+
Rename or change the default with `cai connection update <id> [--name "<displayName>"] [--default|--no-default]` (MCP: `connection_update`); delete only intentionally with `cai connection delete <id> --yes` (MCP: `connection_delete`).
|
|
43
|
+
Deleting a connection immediately removes authorization from bound nodes and agent tools.
|
|
21
44
|
|
|
22
45
|
## Route the outcome
|
|
23
46
|
|
|
@@ -36,14 +59,14 @@ If the user's outcome does not reveal whether they want an agent or an automatio
|
|
|
36
59
|
|
|
37
60
|
## Platform docs
|
|
38
61
|
|
|
39
|
-
The platform reference lives at https://docs.getcontroller.ai. Fetch https://docs.getcontroller.ai/llms.txt for the machine-readable index of every page; append `.md` to any page path for raw markdown (for example https://docs.getcontroller.ai/start/safety.md), or fetch /llms-full.txt for the whole corpus at once. Skills remain the procedural authority — consult the docs for what they do not carry: the execution and cost models, type-system and version-rail contracts, the full CLI and expression-operation references, and the workflow API. When a docs page and a skill disagree, prefer the skill and its live
|
|
62
|
+
The platform reference lives at https://docs.getcontroller.ai. Fetch https://docs.getcontroller.ai/llms.txt for the machine-readable index of every page; append `.md` to any page path for raw markdown (for example https://docs.getcontroller.ai/start/safety.md), or fetch /llms-full.txt for the whole corpus at once. Skills remain the procedural authority — consult the docs for what they do not carry: the execution and cost models, type-system and version-rail contracts, the full CLI and expression-operation references, and the workflow API. When a docs page and a skill disagree, prefer the skill and its live platform queries (`cai expr ops`, `cai integration actions`).
|
|
40
63
|
|
|
41
64
|
## Keep rails explicit
|
|
42
65
|
|
|
43
66
|
- Agent Test mode uses the owner's mutable draft, current workflow development heads, current draft knowledge, and live runtime files overlaid by development/test runtime files. Live mode uses the latest published agent version, each workflow's latest live release, frozen published knowledge, and live runtime files only.
|
|
44
67
|
- Agent draft edits require another agent publish to reach Live. Publishing restamps existing live conversations; shared users always receive the latest published version and never the draft.
|
|
45
68
|
- Workflow publishes and direct-action connection/authorization grants are live bindings: a rebind can redirect Live, while revocation or detachment can block Live without another agent publish.
|
|
46
|
-
-
|
|
69
|
+
- Coding-agent subscriptions cover builder reasoning, not Controller AI hosted-agent runtime usage.
|
|
47
70
|
- Provider actions can send messages, mutate or delete records, and incur provider charges. Decide the per-action confirmation policy before attaching one.
|
|
48
71
|
- Never publish, share with the organization, replay a live trigger, or perform a consequential external test without clear user intent.
|
|
49
72
|
- When a platform limitation blocks the outcome, STOP and report the partial result with the blocking error; never keep probing until the clock expires.
|