copilotkit 4.17.0 → 4.18.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/README.md +127 -5
- package/cli-build-info.json +7 -7
- package/exporters/langgraph/README.md +118 -0
- package/exporters/langgraph/export_checkpointer.py +125 -0
- package/index.js +12227 -9022
- package/onboarding/index.json +1 -1
- package/onboarding/prompts/authenticate/start.md +18 -19
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +57 -200
- package/onboarding/prompts/credentials/plan.md +24 -23
- package/onboarding/prompts/credentials/settle-credentials.md +40 -213
- package/onboarding/prompts/credentials/write-plan.md +17 -8
- package/onboarding/prompts/fallback/best-effort.md +12 -12
- package/onboarding/prompts/feature/a2ui/implement.md +7 -7
- package/onboarding/prompts/feature/a2ui/proof.md +7 -7
- package/onboarding/prompts/feature/a2ui/start.md +53 -9
- package/onboarding/prompts/feature/channels/implement.md +8 -8
- package/onboarding/prompts/feature/channels/proof.md +7 -7
- package/onboarding/prompts/feature/channels/start.md +50 -7
- package/onboarding/prompts/feature/chat-suggestions/implement.md +7 -7
- package/onboarding/prompts/feature/chat-suggestions/proof.md +7 -7
- package/onboarding/prompts/feature/chat-suggestions/start.md +50 -7
- package/onboarding/prompts/feature/complete.md +2 -2
- package/onboarding/prompts/feature/learning/implement.md +24 -19
- package/onboarding/prompts/feature/learning/proof.md +8 -8
- package/onboarding/prompts/feature/learning/start.md +43 -20
- package/onboarding/prompts/feature/open-generative-ui/implement.md +7 -7
- package/onboarding/prompts/feature/open-generative-ui/proof.md +7 -7
- package/onboarding/prompts/feature/open-generative-ui/start.md +50 -7
- package/onboarding/prompts/feature/realtime-sync/implement.md +8 -8
- package/onboarding/prompts/feature/realtime-sync/proof.md +7 -7
- package/onboarding/prompts/feature/realtime-sync/start.md +49 -6
- package/onboarding/prompts/feature/rich-threads/implement.md +9 -9
- package/onboarding/prompts/feature/rich-threads/proof.md +7 -7
- package/onboarding/prompts/feature/rich-threads/start.md +49 -6
- package/onboarding/prompts/feature/stop.md +5 -5
- package/onboarding/prompts/feature/voice/implement.md +7 -7
- package/onboarding/prompts/feature/voice/proof.md +7 -7
- package/onboarding/prompts/feature/voice/start.md +50 -7
- package/onboarding/prompts/framework/ag2.md +2 -2
- package/onboarding/prompts/framework/agno.md +2 -2
- package/onboarding/prompts/framework/built-in.md +2 -2
- package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
- package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
- package/onboarding/prompts/framework/crewai-flows.md +2 -2
- package/onboarding/prompts/framework/deep-agents.md +2 -2
- package/onboarding/prompts/framework/google-adk.md +2 -2
- package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
- package/onboarding/prompts/framework/langgraph-python.md +2 -2
- package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
- package/onboarding/prompts/framework/llamaindex.md +2 -2
- package/onboarding/prompts/framework/mastra.md +2 -2
- package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
- package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
- package/onboarding/prompts/framework/ms-agent-python.md +2 -2
- package/onboarding/prompts/framework/pydantic-ai.md +2 -2
- package/onboarding/prompts/framework/strands-python.md +2 -2
- package/onboarding/prompts/framework/strands-typescript.md +2 -2
- package/onboarding/prompts/frontend/angular.md +3 -3
- package/onboarding/prompts/frontend/nextjs.md +3 -3
- package/onboarding/prompts/frontend/plan.md +9 -8
- package/onboarding/prompts/frontend/react-native.md +2 -2
- package/onboarding/prompts/frontend/react-spa.md +2 -2
- package/onboarding/prompts/frontend/vue.md +2 -2
- package/onboarding/prompts/implementation/build-and-validate.md +19 -20
- package/onboarding/prompts/proof/complete.md +11 -11
- package/onboarding/prompts/proof/oss-baseline.md +5 -5
- package/onboarding/prompts/proof/round-trip.md +16 -15
- package/onboarding/prompts/research/gather.md +6 -6
- package/onboarding/prompts/research/merge.md +3 -3
- package/onboarding/prompts/research/preflight.md +4 -4
- package/onboarding/prompts/research/route.md +5 -5
- package/onboarding/prompts/starter/clone.md +8 -7
- package/onboarding/prompts/stopped/run-failed.md +4 -4
- package/onboarding/prompts/subagent/create-plan.md +10 -1
- package/onboarding/prompts/subagent/inspect-repository.md +9 -2
- package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
- package/onboarding/prompts/subagent/prove-round-trip.md +47 -17
- package/onboarding/prompts/unsupported/no-validated-path.md +4 -4
- package/package.json +1 -1
- package/release/release-tool.js +19 -5
|
@@ -1,228 +1,55 @@
|
|
|
1
|
-
# Settle the
|
|
1
|
+
# Settle the model credential
|
|
2
2
|
|
|
3
|
-
The
|
|
4
|
-
|
|
5
|
-
not read, show, store, or request a secret value.
|
|
3
|
+
The project is selected. This phase settles the model credential. Do not change
|
|
4
|
+
application code here. Do not read, show, store, or request a secret value.
|
|
6
5
|
|
|
7
|
-
##
|
|
6
|
+
## Carry the Learning Container into the plan
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
friction command without another developer question. Do not ask the developer about
|
|
11
|
-
telemetry: the command applies the setting they already have.
|
|
8
|
+
Read `learningContainer` from the `onboard credentials` result:
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
`--message` takes one or two sentences: the step you stopped at and what stopped it.
|
|
18
|
-
Pick the category that fits from docs-missing, docs-wrong, docs-sequential, cli-gap,
|
|
19
|
-
sdk-gap, environment, port-collision, credential, validation-loop, and other. Leave
|
|
20
|
-
--cost-seconds off. A run that stopped cannot separate one papercut's cost from the cost of
|
|
21
|
-
the whole run, so the estimate is optional on a stop report and only there. Send no secrets,
|
|
22
|
-
source code, logs, or command output. A refused report is not a failed step: reword it and
|
|
23
|
-
send it again, or stop without a report.
|
|
24
|
-
|
|
25
|
-
## Check that the key landed where the application reads it
|
|
26
|
-
|
|
27
|
-
Do this first, before the Learning Container, and only on a run that selected a project.
|
|
28
|
-
A run that reused one wrote no key and has nothing to read.
|
|
29
|
-
|
|
30
|
-
`environment_file_written` in the selection result says a file was written. It does not say
|
|
31
|
-
which file, and it does not say whether the application reads it. `environment_file` says
|
|
32
|
-
both: `path` is the file, and `loadable_by_app` is whether an application loads env files
|
|
33
|
-
from that directory. Project selection is the only step that can answer the second one.
|
|
34
|
-
|
|
35
|
-
- `pass`: the key is where the application's own process reads it. Continue.
|
|
36
|
-
- `fail`: it is not. `environment_file.apps` names the directories that do load env files.
|
|
37
|
-
Run the selection again from one of them, with `--project <selected slug>` and the same
|
|
38
|
-
`--runtime-url`, then read the new result.
|
|
39
|
-
- `undetermined`: no application package was found, so the question has no answer. Record
|
|
40
|
-
that and continue.
|
|
41
|
-
|
|
42
|
-
Do not repair a `fail` by copying the file, linking it, or writing the key a second time.
|
|
43
|
-
One key in two files is a secret in a place nobody tracks, and the copy goes stale as soon
|
|
44
|
-
as the original is rotated.
|
|
10
|
+
- `exists`: reuse `id` and create nothing.
|
|
11
|
+
- `plan-create`: plan `id`, and create it after the developer approves the plan.
|
|
12
|
+
- `skipped`: plan no container and no selector. Name `reason` in the plan and in the
|
|
13
|
+
closing report. Do not stop.
|
|
45
14
|
|
|
46
|
-
|
|
47
|
-
|
|
15
|
+
Carry it into the planning handoff. Never spell the id yourself: two spellings give one
|
|
16
|
+
project two containers.
|
|
48
17
|
|
|
49
|
-
##
|
|
18
|
+
## Check the model credential
|
|
50
19
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
`projectSlug` field in the project record, which the follow-up check above already proved
|
|
54
|
-
is non-empty. Both paths reach this step. Learning assigns real threads to a Learning Container once.
|
|
55
|
-
New and existing threads can receive their first assignment, including after agent runs.
|
|
56
|
-
Set up the container here so new conversations contribute from the start. Existing threads
|
|
57
|
-
can join later, and Learning can collect only history whose source events still survive.
|
|
58
|
-
|
|
59
|
-
One container for this project is the default scope, so the id comes from the selected
|
|
60
|
-
project slug. Ask the CLI for it, from the target directory:
|
|
20
|
+
The plan names the model credential variables. Run this from the directory that holds
|
|
21
|
+
`environmentPath` in the project step's result, with one `--model-key` for each variable:
|
|
61
22
|
|
|
62
23
|
```text
|
|
63
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
24
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard credentials --model-key <variable> --json
|
|
64
25
|
```
|
|
65
26
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
- `"status": "skipped"` means there is no id to use. `slug-unusable` means the slug leaves
|
|
72
|
-
nothing the id contract accepts. `no-project-record` means no project is selected in
|
|
73
|
-
this directory. Skip this step and name the skip, rather than inventing a name.
|
|
74
|
-
|
|
75
|
-
Never spell the id yourself. Two spellings of one project's id give it two containers,
|
|
76
|
-
each below the 15-conversation line on its own, and nothing reports that the split
|
|
77
|
-
happened.
|
|
78
|
-
|
|
79
|
-
Then ask the platform about that id, from the target directory:
|
|
80
|
-
|
|
81
|
-
```text
|
|
82
|
-
npx --prefer-offline --yes copilotkit@4.17.0 learning containers get <id> --json
|
|
83
|
-
```
|
|
27
|
+
When the framework node names another env file for the credential, add
|
|
28
|
+
`--env-file <file>`. Add one `--path <file>` for each project file the developer changed for the
|
|
29
|
+
credential. The command asks the vendor whether each key can pay for a model call, and it
|
|
30
|
+
never prints a value. When every key settles, it protects the credential paths. Read
|
|
31
|
+
`status`:
|
|
84
32
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
- `
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
closing report. Do not stop. Learning is not on every plan, and a stop here ends a
|
|
95
|
-
paying customer's onboarding over a feature they never asked for.
|
|
96
|
-
- `LEARNING_AVAILABILITY_UNAVAILABLE` means the platform did not resolve the answer. It is
|
|
97
|
-
unknown rather than denied. Run the same command once more. If the second call answers the
|
|
98
|
-
same way, report the code and stop onboarding.
|
|
99
|
-
- Any other code: report it and stop onboarding, the way a false `api_key_provisioned`
|
|
100
|
-
stops the run.
|
|
101
|
-
|
|
102
|
-
Never invent an id, scrape a dashboard, or treat an arbitrary string as a container.
|
|
103
|
-
|
|
104
|
-
Report what the read found, before anything is planned:
|
|
105
|
-
|
|
106
|
-
```text
|
|
107
|
-
npx --prefer-offline --yes copilotkit@4.17.0 onboard checkpoint --phase container-surveyed
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Carry the derived id into the planning subagent's handoff, with whether the platform
|
|
111
|
-
already holds it. Where the step was skipped, carry the skip instead, so the plan names no
|
|
112
|
-
container and no selector.
|
|
113
|
-
|
|
114
|
-
## Where a model credential comes from
|
|
115
|
-
|
|
116
|
-
The plan names the model credential variables. Finding their values is not its job.
|
|
117
|
-
|
|
118
|
-
If the project has no value for one, ask the developer where it lives. Never read a file
|
|
119
|
-
outside the project directory to find one. A key found that way belongs to another
|
|
120
|
-
project: it bills that project for these model calls, points attribution at a project
|
|
121
|
-
nobody chose, and leaves no trace, because the scaffold works.
|
|
122
|
-
|
|
123
|
-
Asking where a credential lives is not requesting a secret value. Ask for a path, or ask
|
|
124
|
-
the developer to write the value into the project's env file themselves. A path the
|
|
125
|
-
developer names is theirs to give, including one outside the project. A path this run
|
|
126
|
-
finds is not.
|
|
127
|
-
|
|
128
|
-
Until the developer answers, the run waits. Report the pause and end your turn:
|
|
129
|
-
|
|
130
|
-
```text
|
|
131
|
-
npx --prefer-offline --yes copilotkit@4.17.0 onboard checkpoint --phase awaiting-developer
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
This is a pause, not a stop. `research/gather` describes it under "Pausing vs stopping".
|
|
135
|
-
Do not send a stop report, and do not take a stop route. When the developer answers,
|
|
136
|
-
continue from this step. Do not write a placeholder or an empty value. A scaffold carrying
|
|
137
|
-
a dummy key looks finished and fails at the first model call.
|
|
138
|
-
|
|
139
|
-
## Check that the vendor accepts the model credential
|
|
140
|
-
|
|
141
|
-
When a model credential is in place, ask the vendor whether the key can pay for a model
|
|
142
|
-
call. Run this once for each model credential variable the plan names, from the
|
|
143
|
-
target app directory, with the env file the application reads it from:
|
|
144
|
-
|
|
145
|
-
```text
|
|
146
|
-
npx --prefer-offline --yes copilotkit@4.17.0 onboard model-key --key <variable name> --env-file <env file> --json
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
The command reads the value itself and sends one request with a one-token answer to that
|
|
150
|
-
vendor. It never prints the value, so you still do not read it. Read `status` from the
|
|
151
|
-
payload:
|
|
152
|
-
|
|
153
|
-
- `pass`: the vendor served a model call with this key. Continue.
|
|
154
|
-
- `fail`: the vendor refused the key, and it will refuse every model call the application
|
|
155
|
-
makes. `cause` says why. `model_quota` means the key has no credits. `model_auth` means
|
|
156
|
-
the vendor rejected the key. Tell the developer that exact cause, and offer the choices:
|
|
157
|
-
add credits, use another key, or switch the model provider. Then report the pause the
|
|
158
|
-
way the section above does, and end your turn. When the developer answers, place the
|
|
159
|
-
new credential and run this check again.
|
|
160
|
-
- `missing`: there is no real value to check. `reason` says which file or key is empty.
|
|
161
|
-
Go back to the section above and ask the developer where the credential lives.
|
|
162
|
-
- `unsupported` or `undetermined`: the check did not settle it. Name the `reason` in the
|
|
163
|
-
closing report and continue. `custom-endpoint` means a base URL sends the key to
|
|
164
|
-
another endpoint, such as a local Ollama, so the vendor was not asked.
|
|
165
|
-
`environment-override` means the shell sets a different value for the key, and the
|
|
166
|
-
application reads that value first. Do not stop the
|
|
167
|
-
run for either status.
|
|
168
|
-
|
|
169
|
-
Do not skip a `fail` to save time. The next model call is the round-trip proof, after the
|
|
170
|
-
whole build, and it reports a dead key only as a timeout that names no key.
|
|
171
|
-
|
|
172
|
-
## Protect the credential paths
|
|
173
|
-
|
|
174
|
-
After model credential placement is complete, add each credential setup path to the
|
|
175
|
-
protected path list. Also add each project file that the developer changed for model
|
|
176
|
-
credentials. Record them in the baseline from the target app directory:
|
|
177
|
-
|
|
178
|
-
```text
|
|
179
|
-
npx --prefer-offline --yes copilotkit@4.17.0 onboard protect --path <path>
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
Pass one `--path` for each. The command captures a digest for each path and never re-reads
|
|
183
|
-
a path the baseline already holds.
|
|
184
|
-
|
|
185
|
-
Give each path relative to the project root, exactly as the capture printed it. A relative
|
|
186
|
-
path is read against the run's own root, not against the directory you are standing in, so
|
|
187
|
-
one path names one file from anywhere in the project.
|
|
188
|
-
|
|
189
|
-
Then re-capture the files this graph wrote itself. For each path the first capture printed
|
|
190
|
-
as `deferred` that this run has now written, run:
|
|
191
|
-
|
|
192
|
-
```text
|
|
193
|
-
npx --prefer-offline --yes copilotkit@4.17.0 onboard protect --rebaseline --path <path>
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
From that point they are protected like any other path, so a later step that rewrites
|
|
197
|
-
`.env` and drops its key fails the audit rather than passing it. Continue only if every
|
|
198
|
-
result starts with `Status: passed`.
|
|
199
|
-
|
|
200
|
-
### When the developer writes a credential after the baseline
|
|
201
|
-
|
|
202
|
-
Asking the developer to place a credential themselves means their edit lands when they get
|
|
203
|
-
to it, and often after the paths above are captured. A later audit then reports the
|
|
204
|
-
environment path as changed. That change is the one this run asked for, so it is not
|
|
205
|
-
damage, and the credential route is how the run says so.
|
|
206
|
-
|
|
207
|
-
Do not run that route here as a step of its own. Run it only when an audit names the
|
|
208
|
-
environment path. The command below is what to run at that point, from the target app
|
|
209
|
-
directory:
|
|
210
|
-
|
|
211
|
-
```text
|
|
212
|
-
npx --prefer-offline --yes copilotkit@4.17.0 onboard protect --accept-credential --path <environment path>
|
|
213
|
-
```
|
|
33
|
+
- `ready`: continue. Name each `unsupported` or `undetermined` `reason` in `modelKeys` in
|
|
34
|
+
the closing report.
|
|
35
|
+
- `needs-developer` with `question.status` `missing`: ask the developer where the
|
|
36
|
+
credential lives.
|
|
37
|
+
- `needs-developer` with `question.status` `fail`: tell the developer `question.cause`.
|
|
38
|
+
`model_quota` means that the key has no credits, and `model_auth` means that the vendor
|
|
39
|
+
rejected it. Offer three choices: add credits, use another key, or switch the model
|
|
40
|
+
provider.
|
|
41
|
+
- `stopped`: the command already filed the stop report. Stop onboarding.
|
|
214
42
|
|
|
215
|
-
|
|
216
|
-
|
|
43
|
+
Until the developer answers, the run waits. When you ask, name each variable and the file
|
|
44
|
+
it goes in, and say that the run continues when they reply or resume this session. Under a
|
|
45
|
+
harness that ends the session with your turn, such as `codex exec`, that message is the only
|
|
46
|
+
thing the developer sees. This is a pause, not a stop. The command already reported it.
|
|
47
|
+
End your turn. When the developer answers, run the command again. Do not write a
|
|
48
|
+
placeholder or an empty value.
|
|
217
49
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
refusal names it. Do not repair or rewrite the file. Report the named variable and stop
|
|
223
|
-
onboarding. A run that lost the project key has nothing to prove a round trip with.
|
|
224
|
-
- `unchanged-path` means the file matches its baseline, so nothing was placed in it. That
|
|
225
|
-
is not a failed step. It answers the question and the run carries on.
|
|
50
|
+
Never read a file outside the project directory to find a credential: a key found that way
|
|
51
|
+
bills another project. Asking for a path is not requesting a secret, and neither is asking
|
|
52
|
+
the developer to write the value into the env file. A path the developer names is theirs
|
|
53
|
+
to give, including one outside the project. A path this run finds is not.
|
|
226
54
|
|
|
227
|
-
|
|
228
|
-
`npx --prefer-offline --yes copilotkit@4.17.0 onboard read credentials/write-plan`.
|
|
55
|
+
Then run `npx --prefer-offline --yes copilotkit@4.18.0 onboard read credentials/write-plan`.
|
|
@@ -6,12 +6,12 @@ the run asks them.
|
|
|
6
6
|
|
|
7
7
|
## If you stop in this phase
|
|
8
8
|
|
|
9
|
-
Name the exact file, value, or check that stopped you, then send one short report.
|
|
10
|
-
friction command
|
|
11
|
-
|
|
9
|
+
Name the exact file, value, or check that stopped you, then send one short report. The
|
|
10
|
+
friction command follows the telemetry setting the developer already chose, so it needs no
|
|
11
|
+
separate question.
|
|
12
12
|
|
|
13
13
|
```text
|
|
14
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
14
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard friction --phase stop --category <slug> --message "<sentences>"
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
`--message` takes one or two sentences: the step you stopped at and what stopped it.
|
|
@@ -62,8 +62,17 @@ proof subagents:
|
|
|
62
62
|
|
|
63
63
|
Fetch them together with the pages already selected rather than on their own.
|
|
64
64
|
|
|
65
|
+
The planning subagent adds a threads drawer from the selected drawer page. If no drawer
|
|
66
|
+
page is selected yet, add the one for the frontend selected above to the same list:
|
|
67
|
+
|
|
68
|
+
1. React SPA or Next.js: https://docs.copilotkit.ai/prebuilt-components/copilot-threads-drawer.md
|
|
69
|
+
2. Angular: https://docs.copilotkit.ai/angular/guides/threads-memory-attachments-headless.md
|
|
70
|
+
3. Vue 3: https://docs.copilotkit.ai/vue/guides/threads-and-drawer.md
|
|
71
|
+
4. React Native: select no drawer page. No page documents a threads drawer for React
|
|
72
|
+
Native, so the planner proves the thread with `verify --round-trip` instead.
|
|
73
|
+
|
|
65
74
|
Spawn one planning subagent. Tell it to run
|
|
66
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
75
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read subagent/create-plan` first and follow the prompt
|
|
67
76
|
it returns. If that read fails because the subagent cannot use the shell, stop that subagent.
|
|
68
77
|
Run the same command yourself, then spawn a fresh subagent with the returned prompt and the
|
|
69
78
|
same handoff. Give it the repository findings, selected framework, frontend, model, credential
|
|
@@ -74,7 +83,7 @@ Wait for the subagent to finish.
|
|
|
74
83
|
Continue only if the planning result starts with `Status: passed`. For `Status: failed`,
|
|
75
84
|
send the result back to the planning subagent for repair, up to three attempts. For
|
|
76
85
|
`Status: blocked`, or a third failed result, run
|
|
77
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
86
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read stopped/run-failed`. A plan this run cannot
|
|
78
87
|
write is a run that broke, not a stack the documentation does not cover. The exception is
|
|
79
88
|
a blocked result that names `unsupported/no-validated-path`: the planning subagent found
|
|
80
89
|
that no page supports the plan, so take the no-supported-path route at the end of this
|
|
@@ -122,7 +131,7 @@ build. Keep this window open until the app runs." Decide from your own approval
|
|
|
122
131
|
as the welcome did, not from your coding-agent slug.
|
|
123
132
|
|
|
124
133
|
If the developer approves the plan, run
|
|
125
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
134
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read implementation/build-and-validate`.
|
|
126
135
|
|
|
127
136
|
If no exact supported path or documentation URL exists, run
|
|
128
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
137
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -9,14 +9,14 @@ This fallback contains unproved steps. Use the approved plan in step order.
|
|
|
9
9
|
|
|
10
10
|
Several rules below stop onboarding: a blocked or third failed implementation result, a
|
|
11
11
|
blocked audit, a changed protected path this run wrote, a changed path that no Files
|
|
12
|
-
changed section accounts for after a proof subagent ran, a credential acceptance refused
|
|
13
|
-
|
|
14
|
-
agent or frontend. Send one short report before
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
changed section accounts for after a proof subagent ran, a credential acceptance refused
|
|
13
|
+
for a lost variable, a blocked or third failed proof, a blocked or third failed repair, and
|
|
14
|
+
a fix that needs changes to the existing agent or frontend. Send one short report before
|
|
15
|
+
you stop. The friction command follows the telemetry setting the developer already chose,
|
|
16
|
+
so it needs no separate question.
|
|
17
17
|
|
|
18
18
|
```text
|
|
19
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
19
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard friction --phase stop --category <slug> --message "<sentences>"
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
`--message` takes one or two sentences: the step you stopped at and what stopped it.
|
|
@@ -62,19 +62,19 @@ or frontend, stop onboarding.
|
|
|
62
62
|
|
|
63
63
|
Use these rules for every protected-path check in this fallback:
|
|
64
64
|
|
|
65
|
-
- Run `npx --prefer-offline --yes copilotkit@4.
|
|
65
|
+
- Run `npx --prefer-offline --yes copilotkit@4.18.0 onboard audit` from the target app directory.
|
|
66
66
|
- If a result starts with `Status: blocked`, stop onboarding and report the printed reason.
|
|
67
67
|
It proved nothing changed, so do not report a preservation failure.
|
|
68
68
|
- If a result reports a changed protected path this run wrote, stop onboarding.
|
|
69
69
|
- If a result reports a changed env file, this rule replaces the one above, even when this
|
|
70
70
|
run wrote the file. This run asked the developer to place a
|
|
71
71
|
credential there, so take the credential route rather than the external one. Accept it
|
|
72
|
-
with `npx --prefer-offline --yes copilotkit@4.
|
|
72
|
+
with `npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --accept-credential --path <path>`,
|
|
73
73
|
run the audit again, and name it in the closing report. If the command refuses because
|
|
74
74
|
it names a lost variable, stop onboarding.
|
|
75
75
|
- Before any proof subagent runs, a changed path that no Files changed section from this
|
|
76
76
|
run names came from outside the run. Accept it by name with
|
|
77
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
77
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --accept-external --path <path>`, run the
|
|
78
78
|
audit again, and name it in the closing report.
|
|
79
79
|
- After a proof subagent runs, a changed path that no Files changed section from this run
|
|
80
80
|
names is unsettled rather than outside the run, because the proof subagent here returns
|
|
@@ -127,13 +127,13 @@ application passes proof. Report each tool result separately from the proof resu
|
|
|
127
127
|
Report the documentation gap and each assumption with the proof evidence. Do not claim
|
|
128
128
|
that the selected documentation proved an inferred step.
|
|
129
129
|
|
|
130
|
-
When the proof is complete, run `npx --prefer-offline --yes copilotkit@4.
|
|
130
|
+
When the proof is complete, run `npx --prefer-offline --yes copilotkit@4.18.0 onboard complete`, carrying the
|
|
131
131
|
surface-check result the proof subagent returned. Pass exactly one of `--visual-check` or
|
|
132
132
|
`--device-check`, matching this journey's surface:
|
|
133
133
|
|
|
134
134
|
```text
|
|
135
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
136
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
135
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard complete --visual-check <outcome>
|
|
136
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard complete --device-check <outcome>
|
|
137
137
|
```
|
|
138
138
|
|
|
139
139
|
`--visual-check` is for a web frontend and takes `performed`, `skipped-no-browser-tool`, or
|
|
@@ -18,7 +18,7 @@ without exposing secrets.
|
|
|
18
18
|
Before you spawn the implementation subagent, take the authorized list from the CLI:
|
|
19
19
|
|
|
20
20
|
```text
|
|
21
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
21
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard audit
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
From its result, copy the paths under `Authorized to modify:`. A passed or failed audit with
|
|
@@ -37,7 +37,7 @@ still go on the record. Name the file and why the work needs it, then end your t
|
|
|
37
37
|
for the developer's answer. If they allow it, record their answer before any edit:
|
|
38
38
|
|
|
39
39
|
```text
|
|
40
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
40
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
Continue only when the result starts with `Status: passed`. Run the audit again, take the
|
|
@@ -49,7 +49,7 @@ feature stop route below.
|
|
|
49
49
|
After validation and each repair, run:
|
|
50
50
|
|
|
51
51
|
```text
|
|
52
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
52
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard audit
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
Continue only when it starts with `Status: passed`. A path under `Authorized to modify:` is
|
|
@@ -60,7 +60,7 @@ with the implementation subagent's `Files changed` section. If that section does
|
|
|
60
60
|
the path, accept the developer's external change:
|
|
61
61
|
|
|
62
62
|
```text
|
|
63
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
63
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --accept-external --path <path>
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
For an env file where the developer placed a requested credential, use
|
|
@@ -73,17 +73,17 @@ Run the audit again after each accepted change. If it still fails, or starts
|
|
|
73
73
|
with `Status: blocked`, route out and stop:
|
|
74
74
|
|
|
75
75
|
```text
|
|
76
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
76
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
When implementation validation passes, report it:
|
|
80
80
|
|
|
81
81
|
```text
|
|
82
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
82
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase build-validated
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
If validation cannot pass, or this intent needs a prerequisite the app does not have, use
|
|
86
86
|
the feature stop route above without further changes.
|
|
87
87
|
|
|
88
88
|
Otherwise run
|
|
89
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
89
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/a2ui/proof`.
|
|
@@ -27,7 +27,7 @@ still go on the record. Name the file and why the fix needs it, then end your tu
|
|
|
27
27
|
for the developer's answer. If they allow it, record their answer before any edit:
|
|
28
28
|
|
|
29
29
|
```text
|
|
30
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
30
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
Continue only when the result starts with `Status: passed`. Run the audit again, take the
|
|
@@ -39,23 +39,23 @@ route below.
|
|
|
39
39
|
Report each attempt at the proof as it ends, counting from one:
|
|
40
40
|
|
|
41
41
|
```text
|
|
42
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
42
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase journey-attempted --attempt 1
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
Report each repair cycle the same way, counting from one:
|
|
46
46
|
|
|
47
47
|
```text
|
|
48
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
48
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase repair-attempted --attempt 1
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
After the final attempt, report the gate exactly once:
|
|
52
52
|
|
|
53
53
|
```text
|
|
54
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
54
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
Use `passed` only for a proved A2UI surface, `failed` for an attempted proof that failed,
|
|
58
|
-
and `skipped` when the proof could not run. Then run `npx --prefer-offline --yes copilotkit@4.
|
|
58
|
+
and `skipped` when the proof could not run. Then run `npx --prefer-offline --yes copilotkit@4.18.0 onboard audit`.
|
|
59
59
|
Continue only when it starts with `Status: passed`.
|
|
60
60
|
|
|
61
61
|
If the audit fails, never repair, reset, or revert a protected path. Compare each named path
|
|
@@ -70,9 +70,9 @@ the path and the change the audit reports. Run the audit again after each accept
|
|
|
70
70
|
If the audit still fails, or starts with `Status: blocked`, route out and stop:
|
|
71
71
|
|
|
72
72
|
```text
|
|
73
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
73
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
When the audit passes, run
|
|
77
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
77
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/complete` with the actual browser-proof
|
|
78
78
|
outcome.
|
|
@@ -1,13 +1,57 @@
|
|
|
1
1
|
# Add A2UI to the existing CopilotKit app
|
|
2
2
|
|
|
3
3
|
Treat this as an additive OSS feature integration, not a new-app scaffold. Act as the
|
|
4
|
-
orchestrator and delegate inspection, implementation, and proof to focused subagents.
|
|
5
|
-
|
|
4
|
+
orchestrator and delegate inspection, implementation, and proof to focused subagents. Work
|
|
5
|
+
only inside the target project. Prompt names are this graph's own bookkeeping. Say what the
|
|
6
|
+
run is doing in the developer's words instead.
|
|
7
|
+
|
|
8
|
+
## Waits, stops, and subagents
|
|
9
|
+
|
|
10
|
+
A run that starts here has not read these rules yet, so they come first. They cover this
|
|
11
|
+
prompt and every later one.
|
|
12
|
+
|
|
13
|
+
Spawning a subagent returns almost at once. That return is the dispatch succeeding, not the
|
|
14
|
+
work finishing: the result reaches you as a notification, or with the dispatch itself where
|
|
15
|
+
your harness works that way. Do the work that does not depend on the result, then end your
|
|
16
|
+
turn and wait for the result. That wait is a pause. Do not sleep or poll.
|
|
17
|
+
|
|
18
|
+
A subagent that returns no usable result failed in your harness, not in this graph. Every
|
|
19
|
+
assignment here is work you can do yourself, slower, so run that assignment yourself and
|
|
20
|
+
carry on. Keep a read-only assignment read-only. If no subagent works at all, report it
|
|
21
|
+
once:
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase delegation-unavailable
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Before you end your turn to wait for the developer, report the pause:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase awaiting-developer
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
A turn that ends while the run waits is a pause, not a stop, even when your harness ends it.
|
|
34
|
+
When the answer or the result arrives, continue from the step that paused.
|
|
35
|
+
|
|
36
|
+
If you stop this run, send one short report before you stop. The friction command follows
|
|
37
|
+
the telemetry setting the developer already chose, so it needs no separate question.
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard friction --phase stop --category <slug> --message "<sentences>"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`--message` takes one or two sentences: the step you stopped at and what stopped it.
|
|
44
|
+
Pick the category that fits from docs-missing, docs-wrong, docs-sequential, cli-gap,
|
|
45
|
+
sdk-gap, environment, port-collision, credential, validation-loop, and other. Leave
|
|
46
|
+
--cost-seconds off. Send no secrets, source code, logs, or command output. A refused report
|
|
47
|
+
is not a failed step: reword it and send it again, or stop without a report. A stop that
|
|
48
|
+
routes to `feature/stop` sends no report here: that prompt first asks the developer about
|
|
49
|
+
one scoped fix, and sends the report itself when no fix is approved.
|
|
6
50
|
|
|
7
51
|
Before any subagent or project process runs, capture the developer's existing work:
|
|
8
52
|
|
|
9
53
|
```text
|
|
10
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
54
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect
|
|
11
55
|
```
|
|
12
56
|
|
|
13
57
|
Keep the exact protected path list it prints and give that list to every subagent. No
|
|
@@ -22,13 +66,13 @@ development/test commands. It must return paths and secret-safe presence checks
|
|
|
22
66
|
|
|
23
67
|
Require an existing frontend, agent, and CopilotKit round trip. Start only project-owned
|
|
24
68
|
processes when needed, inspect `/info`, and run
|
|
25
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
69
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 verify --expect-runtime oss --round-trip --agent <agent-id> --json`.
|
|
26
70
|
Also drive one existing request through the frontend when browser control is available.
|
|
27
71
|
|
|
28
72
|
Wait for the inspection subagent to finish. Then report that the inspection came back:
|
|
29
73
|
|
|
30
74
|
```text
|
|
31
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
75
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase research-returned
|
|
32
76
|
```
|
|
33
77
|
|
|
34
78
|
A refused checkpoint prints its reason and leaves onboarding unaffected. It is not a
|
|
@@ -38,7 +82,7 @@ If the inspection did not prove the baseline this intent extends, stop here with
|
|
|
38
82
|
changing files:
|
|
39
83
|
|
|
40
84
|
```text
|
|
41
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
85
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
|
|
42
86
|
```
|
|
43
87
|
|
|
44
88
|
Do not run `login`, select an Intelligence project, add an Intelligence client, mint a
|
|
@@ -62,7 +106,7 @@ one.
|
|
|
62
106
|
After approval, record each approved path before implementation:
|
|
63
107
|
|
|
64
108
|
```text
|
|
65
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
109
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --path <path> --reason "<the plan's sentence>"
|
|
66
110
|
```
|
|
67
111
|
|
|
68
112
|
If an approved path changed after capture and no implementation step has run, add
|
|
@@ -72,7 +116,7 @@ authorize a path the approved plan did not list.
|
|
|
72
116
|
Then report the plan this run is about to implement:
|
|
73
117
|
|
|
74
118
|
```text
|
|
75
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
119
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase plan-written
|
|
76
120
|
```
|
|
77
121
|
|
|
78
|
-
Then run `npx --prefer-offline --yes copilotkit@4.
|
|
122
|
+
Then run `npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/a2ui/implement`.
|