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.
Files changed (81) hide show
  1. package/README.md +127 -5
  2. package/cli-build-info.json +7 -7
  3. package/exporters/langgraph/README.md +118 -0
  4. package/exporters/langgraph/export_checkpointer.py +125 -0
  5. package/index.js +12227 -9022
  6. package/onboarding/index.json +1 -1
  7. package/onboarding/prompts/authenticate/start.md +18 -19
  8. package/onboarding/prompts/conversion/plan.md +3 -3
  9. package/onboarding/prompts/credentials/finalize-plan.md +57 -200
  10. package/onboarding/prompts/credentials/plan.md +24 -23
  11. package/onboarding/prompts/credentials/settle-credentials.md +40 -213
  12. package/onboarding/prompts/credentials/write-plan.md +17 -8
  13. package/onboarding/prompts/fallback/best-effort.md +12 -12
  14. package/onboarding/prompts/feature/a2ui/implement.md +7 -7
  15. package/onboarding/prompts/feature/a2ui/proof.md +7 -7
  16. package/onboarding/prompts/feature/a2ui/start.md +53 -9
  17. package/onboarding/prompts/feature/channels/implement.md +8 -8
  18. package/onboarding/prompts/feature/channels/proof.md +7 -7
  19. package/onboarding/prompts/feature/channels/start.md +50 -7
  20. package/onboarding/prompts/feature/chat-suggestions/implement.md +7 -7
  21. package/onboarding/prompts/feature/chat-suggestions/proof.md +7 -7
  22. package/onboarding/prompts/feature/chat-suggestions/start.md +50 -7
  23. package/onboarding/prompts/feature/complete.md +2 -2
  24. package/onboarding/prompts/feature/learning/implement.md +24 -19
  25. package/onboarding/prompts/feature/learning/proof.md +8 -8
  26. package/onboarding/prompts/feature/learning/start.md +43 -20
  27. package/onboarding/prompts/feature/open-generative-ui/implement.md +7 -7
  28. package/onboarding/prompts/feature/open-generative-ui/proof.md +7 -7
  29. package/onboarding/prompts/feature/open-generative-ui/start.md +50 -7
  30. package/onboarding/prompts/feature/realtime-sync/implement.md +8 -8
  31. package/onboarding/prompts/feature/realtime-sync/proof.md +7 -7
  32. package/onboarding/prompts/feature/realtime-sync/start.md +49 -6
  33. package/onboarding/prompts/feature/rich-threads/implement.md +9 -9
  34. package/onboarding/prompts/feature/rich-threads/proof.md +7 -7
  35. package/onboarding/prompts/feature/rich-threads/start.md +49 -6
  36. package/onboarding/prompts/feature/stop.md +5 -5
  37. package/onboarding/prompts/feature/voice/implement.md +7 -7
  38. package/onboarding/prompts/feature/voice/proof.md +7 -7
  39. package/onboarding/prompts/feature/voice/start.md +50 -7
  40. package/onboarding/prompts/framework/ag2.md +2 -2
  41. package/onboarding/prompts/framework/agno.md +2 -2
  42. package/onboarding/prompts/framework/built-in.md +2 -2
  43. package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
  44. package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
  45. package/onboarding/prompts/framework/crewai-flows.md +2 -2
  46. package/onboarding/prompts/framework/deep-agents.md +2 -2
  47. package/onboarding/prompts/framework/google-adk.md +2 -2
  48. package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
  49. package/onboarding/prompts/framework/langgraph-python.md +2 -2
  50. package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
  51. package/onboarding/prompts/framework/llamaindex.md +2 -2
  52. package/onboarding/prompts/framework/mastra.md +2 -2
  53. package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
  54. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
  55. package/onboarding/prompts/framework/ms-agent-python.md +2 -2
  56. package/onboarding/prompts/framework/pydantic-ai.md +2 -2
  57. package/onboarding/prompts/framework/strands-python.md +2 -2
  58. package/onboarding/prompts/framework/strands-typescript.md +2 -2
  59. package/onboarding/prompts/frontend/angular.md +3 -3
  60. package/onboarding/prompts/frontend/nextjs.md +3 -3
  61. package/onboarding/prompts/frontend/plan.md +9 -8
  62. package/onboarding/prompts/frontend/react-native.md +2 -2
  63. package/onboarding/prompts/frontend/react-spa.md +2 -2
  64. package/onboarding/prompts/frontend/vue.md +2 -2
  65. package/onboarding/prompts/implementation/build-and-validate.md +19 -20
  66. package/onboarding/prompts/proof/complete.md +11 -11
  67. package/onboarding/prompts/proof/oss-baseline.md +5 -5
  68. package/onboarding/prompts/proof/round-trip.md +16 -15
  69. package/onboarding/prompts/research/gather.md +6 -6
  70. package/onboarding/prompts/research/merge.md +3 -3
  71. package/onboarding/prompts/research/preflight.md +4 -4
  72. package/onboarding/prompts/research/route.md +5 -5
  73. package/onboarding/prompts/starter/clone.md +8 -7
  74. package/onboarding/prompts/stopped/run-failed.md +4 -4
  75. package/onboarding/prompts/subagent/create-plan.md +10 -1
  76. package/onboarding/prompts/subagent/inspect-repository.md +9 -2
  77. package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
  78. package/onboarding/prompts/subagent/prove-round-trip.md +47 -17
  79. package/onboarding/prompts/unsupported/no-validated-path.md +4 -4
  80. package/package.json +1 -1
  81. package/release/release-tool.js +19 -5
@@ -1,228 +1,55 @@
1
- # Settle the Learning Container and the model credential
1
+ # Settle the model credential
2
2
 
3
- The Intelligence project is selected. This phase settles what the project stores and
4
- which model credential the application uses. Do not change application code here, and do
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
- ## If you stop in this phase
6
+ ## Carry the Learning Container into the plan
8
7
 
9
- Name the exact file, value, or check that stopped you, then send one short report. Run the
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
- ```text
14
- npx --prefer-offline --yes copilotkit@4.17.0 onboard friction --phase stop --category <slug> --message "<sentences>"
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
- A key the application cannot load stops nothing here. It fails the round-trip proof
47
- instead, which is the most expensive step in the run.
15
+ Carry it into the planning handoff. Never spell the id yourself: two spellings give one
16
+ project two containers.
48
17
 
49
- ## Settle the Learning Container for this project
18
+ ## Check the model credential
50
19
 
51
- Do this now, directly after project selection reports `selected_project_slug`, and before
52
- the plan. On a run that reused a project rather than selecting one, take the slug from the
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.17.0 learning containers default-id --json
24
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard credentials --model-key <variable> --json
64
25
  ```
65
26
 
66
- The command reads the local project record. It needs no credential and makes no network
67
- call, so it answers before the run asks the platform anything. Read `status` from the
68
- payload:
69
-
70
- - `"status": "success"` carries the id in `containerId`. Use that exact string.
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
- The read carries the same availability gate as the create, so it answers the entitlement
86
- question in one call and writes nothing. Read `status` and `error.code` from the payload.
87
- Route on the code rather than on the exit status:
88
-
89
- - `"status": "success"` means the container already exists. Reuse it and create nothing.
90
- - `LEARNING_CONTAINER_NOT_FOUND` means it does not exist yet. This is the normal first run.
91
- Plan it, and create it after the developer approves the plan.
92
- - `LEARNING_NOT_ENABLED` means this organization cannot use Learning. Skip the whole step:
93
- plan no container, plan no selector, and name the skip in the plan and again in the
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
- The command compares the variable names the baseline recorded with the names the file holds
216
- now. Read its result:
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
- - `Status: passed` means the developer added a credential and every recorded credential is
219
- still there. Carry the accepted path into the summary. Then run the vendor check above
220
- for the credential the developer added.
221
- - `credential-lost` means a variable the baseline recorded is gone or empty, and the
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
- When the credential question is answered, run
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. Run the
10
- friction command without another developer question. Do not ask the developer about
11
- telemetry: the command applies the setting they already have.
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.17.0 onboard friction --phase stop --category <slug> --message "<sentences>"
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.17.0 onboard read subagent/create-plan` first and follow the prompt
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.17.0 onboard read stopped/run-failed`. A plan this run cannot
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.17.0 onboard read implementation/build-and-validate`.
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.17.0 onboard read unsupported/no-validated-path`.
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 for a lost variable, a blocked or third
13
- failed proof, a blocked or third failed repair, and a fix that needs changes to the existing
14
- agent or frontend. Send one short report before you stop. Run the friction
15
- command without another developer question. Do not ask the developer about telemetry: the
16
- command applies the setting they already have.
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.17.0 onboard friction --phase stop --category <slug> --message "<sentences>"
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.17.0 onboard audit` from the target app directory.
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.17.0 onboard protect --accept-credential --path <path>`,
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.17.0 onboard protect --accept-external --path <path>`, run the
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.17.0 onboard complete`, carrying the
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.17.0 onboard complete --visual-check <outcome>
136
- npx --prefer-offline --yes copilotkit@4.17.0 onboard complete --device-check <outcome>
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.17.0 onboard audit
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.17.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
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.17.0 onboard audit
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.17.0 onboard protect --accept-external --path <path>
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.17.0 onboard read feature/stop
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.17.0 onboard checkpoint --phase build-validated
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.17.0 onboard read feature/a2ui/proof`.
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.17.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
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.17.0 onboard checkpoint --phase journey-attempted --attempt 1
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.17.0 onboard checkpoint --phase repair-attempted --attempt 1
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.17.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
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.17.0 onboard audit`.
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.17.0 onboard read feature/stop
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.17.0 onboard read feature/complete` with the actual browser-proof
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
- Work only inside the target project. Do not show internal prompt names to the developer.
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.17.0 onboard protect
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.17.0 verify --expect-runtime oss --round-trip --agent <agent-id> --json`.
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.17.0 onboard checkpoint --phase research-returned
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.17.0 onboard read feature/stop
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.17.0 onboard protect --authorize --path <path> --reason "<the plan's sentence>"
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.17.0 onboard checkpoint --phase plan-written
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.17.0 onboard read feature/a2ui/implement`.
122
+ Then run `npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/a2ui/implement`.