copilotkit 4.9.60 → 4.10.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 (73) hide show
  1. package/cli-build-info.json +7 -7
  2. package/index.js +324 -162
  3. package/onboarding/index.json +81 -18
  4. package/onboarding/prompts/authenticate/start.md +41 -202
  5. package/onboarding/prompts/conversion/plan.md +3 -3
  6. package/onboarding/prompts/credentials/finalize-plan.md +15 -129
  7. package/onboarding/prompts/credentials/plan.md +20 -20
  8. package/onboarding/prompts/credentials/settle-credentials.md +153 -0
  9. package/onboarding/prompts/credentials/write-plan.md +93 -0
  10. package/onboarding/prompts/fallback/best-effort.md +12 -9
  11. package/onboarding/prompts/feature/a2ui/implement.md +35 -6
  12. package/onboarding/prompts/feature/a2ui/proof.md +30 -6
  13. package/onboarding/prompts/feature/a2ui/start.md +29 -6
  14. package/onboarding/prompts/feature/chat-suggestions/implement.md +36 -6
  15. package/onboarding/prompts/feature/chat-suggestions/proof.md +30 -5
  16. package/onboarding/prompts/feature/chat-suggestions/start.md +29 -6
  17. package/onboarding/prompts/feature/complete.md +11 -0
  18. package/onboarding/prompts/feature/learning/implement.md +41 -12
  19. package/onboarding/prompts/feature/learning/proof.md +32 -6
  20. package/onboarding/prompts/feature/learning/start.md +28 -5
  21. package/onboarding/prompts/feature/open-generative-ui/implement.md +37 -6
  22. package/onboarding/prompts/feature/open-generative-ui/proof.md +30 -5
  23. package/onboarding/prompts/feature/open-generative-ui/start.md +29 -6
  24. package/onboarding/prompts/feature/realtime-sync/implement.md +36 -7
  25. package/onboarding/prompts/feature/realtime-sync/proof.md +29 -5
  26. package/onboarding/prompts/feature/realtime-sync/start.md +28 -5
  27. package/onboarding/prompts/feature/rich-threads/implement.md +37 -8
  28. package/onboarding/prompts/feature/rich-threads/proof.md +31 -5
  29. package/onboarding/prompts/feature/rich-threads/start.md +28 -5
  30. package/onboarding/prompts/feature/stop.md +9 -6
  31. package/onboarding/prompts/feature/voice/implement.md +35 -6
  32. package/onboarding/prompts/feature/voice/proof.md +30 -5
  33. package/onboarding/prompts/feature/voice/start.md +29 -6
  34. package/onboarding/prompts/framework/ag2.md +2 -2
  35. package/onboarding/prompts/framework/agno.md +2 -2
  36. package/onboarding/prompts/framework/built-in.md +2 -2
  37. package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
  38. package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
  39. package/onboarding/prompts/framework/crewai-flows.md +2 -2
  40. package/onboarding/prompts/framework/deep-agents.md +2 -2
  41. package/onboarding/prompts/framework/google-adk.md +2 -2
  42. package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
  43. package/onboarding/prompts/framework/langgraph-python.md +2 -2
  44. package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
  45. package/onboarding/prompts/framework/llamaindex.md +2 -2
  46. package/onboarding/prompts/framework/mastra.md +2 -2
  47. package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
  48. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
  49. package/onboarding/prompts/framework/ms-agent-python.md +2 -2
  50. package/onboarding/prompts/framework/pydantic-ai.md +2 -2
  51. package/onboarding/prompts/framework/strands-python.md +2 -2
  52. package/onboarding/prompts/framework/strands-typescript.md +2 -2
  53. package/onboarding/prompts/frontend/angular.md +3 -3
  54. package/onboarding/prompts/frontend/nextjs.md +3 -3
  55. package/onboarding/prompts/frontend/plan.md +6 -6
  56. package/onboarding/prompts/frontend/react-native.md +2 -2
  57. package/onboarding/prompts/frontend/react-spa.md +2 -2
  58. package/onboarding/prompts/frontend/vue.md +2 -2
  59. package/onboarding/prompts/implementation/build-and-validate.md +75 -15
  60. package/onboarding/prompts/proof/complete.md +21 -8
  61. package/onboarding/prompts/proof/oss-baseline.md +6 -5
  62. package/onboarding/prompts/proof/round-trip.md +27 -14
  63. package/onboarding/prompts/research/gather.md +121 -0
  64. package/onboarding/prompts/research/route.md +81 -0
  65. package/onboarding/prompts/starter/clone.md +18 -9
  66. package/onboarding/prompts/stopped/run-failed.md +44 -0
  67. package/onboarding/prompts/subagent/create-plan.md +32 -1
  68. package/onboarding/prompts/subagent/implement-and-validate.md +9 -1
  69. package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
  70. package/onboarding/prompts/subagent/prove-round-trip.md +52 -8
  71. package/onboarding/prompts/unsupported/no-validated-path.md +9 -6
  72. package/package.json +1 -1
  73. package/release/release-tool.js +39 -3
@@ -1,4 +1,4 @@
1
- # Select the Intelligence project and create the plan
1
+ # Select the Intelligence project
2
2
 
3
3
  Use the selected framework, frontend, model vendor, model, documentation URLs, and
4
4
  repository findings. On a conversion these were read from the baseline rather than
@@ -19,14 +19,18 @@ that reports a false field, a failed credential check, a model credential nobody
19
19
  place. Each one ends a run that reached project selection and never got a plan, and more
20
20
  runs stop here than anywhere else. Name the exact file, value, or check that stopped you:
21
21
  a report that names only the step cannot be acted on. Send one short report before you
22
- stop. Run the feedback command without another developer question. The CLI telemetry gate
22
+ stop. Run the friction command without another developer question. The CLI telemetry gate
23
23
  decides whether the report is sent.
24
24
 
25
25
  ```text
26
- npx --yes copilotkit@4.9.60 onboard feedback
26
+ npx --yes copilotkit@4.10.0 onboard friction --phase stop --category <slug>
27
27
  ```
28
28
 
29
- Write at most four lines to standard input: the step you stopped at and what stopped it.
29
+ Write one or two sentences to standard input: the step you stopped at and what stopped it.
30
+ Pick the category that fits from docs-missing, docs-wrong, docs-sequential, cli-gap,
31
+ sdk-gap, environment, port-collision, credential, validation-loop, and other. Leave
32
+ --cost-seconds off. A run that stopped cannot separate one papercut's cost from the cost
33
+ of the whole run, so the estimate is optional on a stop report and only there.
30
34
  Send no secrets, source code, logs, or command output. The command refuses a report that
31
35
  carries any of those, prints the reason, and exits zero. A refused report is not a failed
32
36
  step. Send the report, then stop the way the rule that stopped you says to. Reporting is
@@ -54,7 +58,7 @@ the command refuses one of them from a run that was served that node.
54
58
  Run this command with the exact selected slugs:
55
59
 
56
60
  ```text
57
- npx --yes copilotkit@4.9.60 onboard classify --starting-state <starting-state> --agent-framework <agent-framework> --frontend <frontend>
61
+ npx --yes copilotkit@4.10.0 onboard classify --starting-state <starting-state> --agent-framework <agent-framework> --frontend <frontend>
58
62
  ```
59
63
 
60
64
  Do not continue if a value is refused. Fix the value from the choices that the earlier
@@ -148,7 +152,7 @@ passes against the wrong one.
148
152
  Create it, from the target directory:
149
153
 
150
154
  ```text
151
- npx --yes copilotkit@4.9.60 project select --create <name> --json
155
+ npx --yes copilotkit@4.10.0 project select --create <name> --json
152
156
  ```
153
157
 
154
158
  If the command fails as a duplicate, the organization already holds that display name and
@@ -162,13 +166,13 @@ Take this branch only when the developer asks for an existing project, or asks t
162
166
  projects they have. Read the choices:
163
167
 
164
168
  ```text
165
- npx --yes copilotkit@4.9.60 project list --json
169
+ npx --yes copilotkit@4.10.0 project list --json
166
170
  ```
167
171
 
168
172
  Narrow them:
169
173
 
170
174
  ```text
171
- npx --yes copilotkit@4.9.60 project list --search <query> --json
175
+ npx --yes copilotkit@4.10.0 project list --search <query> --json
172
176
  ```
173
177
 
174
178
  With `--json` the payload is the only thing on standard output, so it is safe to parse. Do
@@ -180,7 +184,7 @@ this directory's.
180
184
  Then record the project they name, from the target directory:
181
185
 
182
186
  ```text
183
- npx --yes copilotkit@4.9.60 project select --project <slug-or-id> --json
187
+ npx --yes copilotkit@4.10.0 project select --project <slug-or-id> --json
184
188
  ```
185
189
 
186
190
  The two flags cannot be combined. A slug that does not exist fails and lists the real ones,
@@ -221,123 +225,5 @@ Continue only if the environment follow-up result starts with `Status: passed`.
221
225
  project-record path and environment path as the credential setup path list. Do not add them
222
226
  to the baseline yet.
223
227
 
224
- ## Where a model credential comes from
225
-
226
- The plan names the model credential variables. Finding their values is not its job.
227
-
228
- If the project has no value for one, ask the developer where it lives. Never read a file
229
- outside the project directory to find one. A key found that way belongs to another
230
- project: it bills that project for these model calls, points attribution at a project
231
- nobody chose, and leaves no trace, because the scaffold works.
232
-
233
- Asking where a credential lives is not requesting a secret value. Ask for a path, or ask
234
- the developer to write the value into the project's env file themselves. A path the
235
- developer names is theirs to give, including one outside the project. A path this run
236
- finds is not.
237
-
238
- If no answer comes, stop. Do not write a placeholder or an empty value. A scaffold
239
- carrying a dummy key looks finished and fails at the first model call, which is worse
240
- than stopping here.
241
-
242
- After model credential placement is complete, add each credential setup path to the
243
- protected path list. Also add each project file that the developer changed for model
244
- credentials. Record them in the baseline from the target app directory:
245
-
246
- ```text
247
- npx --yes copilotkit@4.9.60 onboard protect --path <path>
248
- ```
249
-
250
- Pass one `--path` for each. The command captures a digest for each path and never re-reads
251
- a path the baseline already holds.
252
-
253
- Then re-capture the files this graph wrote itself. For each path the first capture printed
254
- as `deferred` that this run has now written, run:
255
-
256
- ```text
257
- npx --yes copilotkit@4.9.60 onboard protect --rebaseline --path <path>
258
- ```
259
-
260
- From that point they are protected like any other path, so a later step that rewrites
261
- `.env` and drops its key fails the audit rather than passing it. Continue only if every
262
- result starts with `Status: passed`.
263
-
264
- ### When the developer writes a credential after the baseline
265
-
266
- Asking the developer to place a credential themselves means their edit lands when they get
267
- to it, and often after the paths above are captured. A later audit then reports the
268
- environment path as changed. That change is the one this run asked for, so it is not
269
- damage, and the credential route is how the run says so.
270
-
271
- Do not run that route here as a step of its own. Run it only when an audit names the
272
- environment path. The command below is what to run at that point, from the target app
273
- directory:
274
-
275
- ```text
276
- npx --yes copilotkit@4.9.60 onboard protect --accept-credential --path <environment path>
277
- ```
278
-
279
- The command compares the variable names the baseline recorded with the names the file holds
280
- now. Read its result:
281
-
282
- - `Status: passed` means the developer added a credential and every recorded credential is
283
- still there. Carry the accepted path into the summary.
284
- - `credential-lost` means a variable the baseline recorded is gone or empty, and the
285
- refusal names it. Do not repair or rewrite the file. Report the named variable and stop
286
- onboarding. A run that lost the project key has nothing to prove a round trip with.
287
- - `unchanged-path` means the file matches its baseline, so nothing was placed in it. That
288
- is not a failed step. It answers the question and the run carries on.
289
-
290
- ## Wire the runtime to Intelligence
291
-
292
- The key in `.env` does nothing on its own. The runtime reads no environment variable for
293
- it. The credential reaches the platform only when the runtime is constructed with an
294
- Intelligence client, and a runtime built without one compiles, serves, answers in a
295
- browser, and never touches the platform.
296
-
297
- Add these pages to the selected documentation URLs for the planning, implementation, and
298
- proof subagents:
299
-
300
- - https://docs.copilotkit.ai/intelligence/connect-your-runtime.md
301
- - https://docs.copilotkit.ai/backend/runtime-endpoints.md
302
- - https://docs.copilotkit.ai/intelligence/managed-intelligence-platform.md
303
-
304
- Fetch them together with the pages already selected rather than on their own.
305
-
306
- Spawn one planning subagent. Tell it to run
307
- `npx --yes copilotkit@4.9.60 onboard read subagent/create-plan` first and follow the prompt
308
- it returns. If that read fails because the subagent cannot use the shell, stop that subagent.
309
- Run the same command yourself, then spawn a fresh subagent with the returned prompt and the
310
- same handoff. Give it the repository findings, selected framework, frontend, model, credential
311
- variable names, selected documentation URLs, and documentation policy. On a conversion, also
312
- give it the frozen criterion. Give the planning subagent the updated protected path list.
313
- Wait for the subagent to finish.
314
-
315
- Continue only if the planning result starts with `Status: passed`. For `Status: failed`,
316
- send the result back to the planning subagent for repair, up to three attempts. For
317
- `Status: blocked`, or a third failed result, use the unsupported route below. Do not show or
318
- ask for approval of a non-pass plan.
319
-
320
- Make sure that the plan preserves each part that already exists. The plan must name the
321
- credential variables, the Intelligence runtime wiring, the application the project asks
322
- for, implementation steps, validation steps, and proof steps. Where the plan upgrades the
323
- CopilotKit dependencies, it must name the versions it moves, every other pin it has to
324
- move with them, and the revert it falls back to. It must not contain secret values.
325
-
326
- Show only the selected framework, frontend, model, planned file changes, any ignore-file line this run adds, the CopilotKit dependency upgrade and the versions it moves, every other dependency the upgrade moves and the versions it moves them to, validation commands, and proof steps.
327
-
328
- An upgrade to a working install is the developer's call, so it belongs in the plan they
329
- approve rather than in the implementation that follows. Do not upgrade a dependency the
330
- developer did not approve.
331
-
332
- When you ask for approval, tell the developer in one line that this is the last thing you
333
- need from them, and that they can leave the run once they approve. That is a fact about
334
- this graph rather than a reassurance: no step after approval asks the developer a question,
335
- and the steps that follow are the longest ones in the run. A developer who does not know
336
- that waits at the terminal through all of them for a question that never comes. Say it in
337
- the same message as the plan, and do not turn it into a second question.
338
-
339
- If the developer approves the plan, run
340
- `npx --yes copilotkit@4.9.60 onboard read implementation/build-and-validate`.
341
-
342
- If no exact supported path or documentation URL exists, run
343
- `npx --yes copilotkit@4.9.60 onboard read unsupported/no-validated-path`.
228
+ When project selection is settled, run
229
+ `npx --yes copilotkit@4.10.0 onboard read credentials/settle-credentials`.
@@ -68,26 +68,26 @@ another framework. Do not show the internal route.
68
68
 
69
69
  Use exactly one matching internal route:
70
70
 
71
- 1. AG2: `npx --yes copilotkit@4.9.60 onboard read framework/ag2`
72
- 2. Agno: `npx --yes copilotkit@4.9.60 onboard read framework/agno`
73
- 3. Built-in CopilotKit agent: `npx --yes copilotkit@4.9.60 onboard read framework/built-in`
74
- 4. Claude Agent SDK Python: `npx --yes copilotkit@4.9.60 onboard read framework/claude-sdk-python`
75
- 5. Claude Agent SDK TypeScript: `npx --yes copilotkit@4.9.60 onboard read framework/claude-sdk-typescript`
76
- 6. CrewAI Flows: `npx --yes copilotkit@4.9.60 onboard read framework/crewai-flows`
77
- 7. Deep Agents: `npx --yes copilotkit@4.9.60 onboard read framework/deep-agents`
78
- 8. LangGraph Python: `npx --yes copilotkit@4.9.60 onboard read framework/langgraph-python`
79
- 9. LangGraph FastAPI: `npx --yes copilotkit@4.9.60 onboard read framework/langgraph-fastapi`
80
- 10. LangGraph TypeScript: `npx --yes copilotkit@4.9.60 onboard read framework/langgraph-typescript`
81
- 11. LlamaIndex: `npx --yes copilotkit@4.9.60 onboard read framework/llamaindex`
82
- 12. ADK: `npx --yes copilotkit@4.9.60 onboard read framework/google-adk`
83
- 13. Microsoft Agent Framework Python: `npx --yes copilotkit@4.9.60 onboard read framework/ms-agent-python`
84
- 14. Microsoft Agent Framework .NET: `npx --yes copilotkit@4.9.60 onboard read framework/ms-agent-dotnet`
85
- 15. Mastra: `npx --yes copilotkit@4.9.60 onboard read framework/mastra`
86
- 16. MS Agent Harness .NET: `npx --yes copilotkit@4.9.60 onboard read framework/ms-agent-harness-dotnet`
87
- 17. Pydantic AI: `npx --yes copilotkit@4.9.60 onboard read framework/pydantic-ai`
88
- 18. Strands Agents Python: `npx --yes copilotkit@4.9.60 onboard read framework/strands-python`
89
- 19. Strands Agents TypeScript: `npx --yes copilotkit@4.9.60 onboard read framework/strands-typescript`
71
+ 1. AG2: `npx --yes copilotkit@4.10.0 onboard read framework/ag2`
72
+ 2. Agno: `npx --yes copilotkit@4.10.0 onboard read framework/agno`
73
+ 3. Built-in CopilotKit agent: `npx --yes copilotkit@4.10.0 onboard read framework/built-in`
74
+ 4. Claude Agent SDK Python: `npx --yes copilotkit@4.10.0 onboard read framework/claude-sdk-python`
75
+ 5. Claude Agent SDK TypeScript: `npx --yes copilotkit@4.10.0 onboard read framework/claude-sdk-typescript`
76
+ 6. CrewAI Flows: `npx --yes copilotkit@4.10.0 onboard read framework/crewai-flows`
77
+ 7. Deep Agents: `npx --yes copilotkit@4.10.0 onboard read framework/deep-agents`
78
+ 8. LangGraph Python: `npx --yes copilotkit@4.10.0 onboard read framework/langgraph-python`
79
+ 9. LangGraph FastAPI: `npx --yes copilotkit@4.10.0 onboard read framework/langgraph-fastapi`
80
+ 10. LangGraph TypeScript: `npx --yes copilotkit@4.10.0 onboard read framework/langgraph-typescript`
81
+ 11. LlamaIndex: `npx --yes copilotkit@4.10.0 onboard read framework/llamaindex`
82
+ 12. ADK: `npx --yes copilotkit@4.10.0 onboard read framework/google-adk`
83
+ 13. Microsoft Agent Framework Python: `npx --yes copilotkit@4.10.0 onboard read framework/ms-agent-python`
84
+ 14. Microsoft Agent Framework .NET: `npx --yes copilotkit@4.10.0 onboard read framework/ms-agent-dotnet`
85
+ 15. Mastra: `npx --yes copilotkit@4.10.0 onboard read framework/mastra`
86
+ 16. MS Agent Harness .NET: `npx --yes copilotkit@4.10.0 onboard read framework/ms-agent-harness-dotnet`
87
+ 17. Pydantic AI: `npx --yes copilotkit@4.10.0 onboard read framework/pydantic-ai`
88
+ 18. Strands Agents Python: `npx --yes copilotkit@4.10.0 onboard read framework/strands-python`
89
+ 19. Strands Agents TypeScript: `npx --yes copilotkit@4.10.0 onboard read framework/strands-typescript`
90
90
 
91
91
  If the project has an agent in another framework, or no listed framework fits, keep the
92
92
  developer's current agent and run
93
- `npx --yes copilotkit@4.9.60 onboard read unsupported/no-validated-path`.
93
+ `npx --yes copilotkit@4.10.0 onboard read unsupported/no-validated-path`.
@@ -0,0 +1,153 @@
1
+ # Settle the Learning Container and the model credential
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.
6
+
7
+ ## If you stop in this phase
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. The CLI telemetry gate decides whether
11
+ the report is sent.
12
+
13
+ ```text
14
+ npx --yes copilotkit@4.10.0 onboard friction --phase stop --category <slug>
15
+ ```
16
+
17
+ Write one or two sentences to standard input: 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
+ ## Settle the Learning Container for this project
26
+
27
+ Do this now, directly after project selection reports `selected_project_slug`, and before
28
+ the plan. On a run that reused a project rather than selecting one, take the slug from the
29
+ `projectSlug` field in the project record, which the follow-up check above already proved
30
+ is non-empty. Both paths reach this step. Learning assigns real threads to a Learning Container, and a thread takes its
31
+ container before its first agent run. A thread whose agent already ran can never receive a
32
+ first assignment later, so every thread the developer creates between this run and some
33
+ later `add-learning` run is lost to Learning for good. Setting it up here is not a
34
+ convenience. It is the only point at which this project's first threads can be reached.
35
+
36
+ Derive the id from the selected project slug: lowercase it, replace each run of characters
37
+ outside `a-z0-9` with one hyphen, drop a leading or trailing hyphen, cut the result to 64
38
+ characters, and drop a trailing hyphen the cut leaves behind. The container id contract is
39
+ 1-64 lowercase letters, numbers, and single hyphens, so an id that skips the last step
40
+ fails the create call on the developer's behalf. Derive it this exact way: the
41
+ `add-learning` intent derives the same id from the same slug, and two spellings of one
42
+ project's id give it two containers, each below the 15-conversation line on its own.
43
+
44
+ One container for this project is the default scope. If the slug leaves nothing usable,
45
+ skip this step and name the skip, rather than inventing a name.
46
+
47
+ Then ask the platform about that id, from the target directory:
48
+
49
+ ```text
50
+ npx --yes copilotkit@4.10.0 learning containers get <id> --json
51
+ ```
52
+
53
+ The read carries the same availability gate as the create, so it answers the entitlement
54
+ question in one call and writes nothing. Read `status` and `error.code` from the payload.
55
+ Route on the code rather than on the exit status:
56
+
57
+ - `"status": "success"` means the container already exists. Reuse it and create nothing.
58
+ - `LEARNING_CONTAINER_NOT_FOUND` means it does not exist yet. This is the normal first run.
59
+ Plan it, and create it after the developer approves the plan.
60
+ - `LEARNING_NOT_ENABLED` means this organization cannot use Learning. Skip the whole step:
61
+ plan no container, plan no selector, and name the skip in the plan and again in the
62
+ closing report. Do not stop. Learning is not on every plan, and a stop here ends a
63
+ paying customer's onboarding over a feature they never asked for.
64
+ - `LEARNING_AVAILABILITY_UNAVAILABLE` means the platform did not resolve the answer. It is
65
+ unknown rather than denied. Run the same command once more. If the second call answers the
66
+ same way, report the code and stop onboarding.
67
+ - Any other code: report it and stop onboarding, the way a false `api_key_provisioned`
68
+ stops the run.
69
+
70
+ Never invent an id, scrape a dashboard, or treat an arbitrary string as a container.
71
+
72
+ Report what the read found, before anything is planned:
73
+
74
+ ```text
75
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase container-surveyed
76
+ ```
77
+
78
+ Carry the derived id into the planning subagent's handoff, with whether the platform
79
+ already holds it. Where the step was skipped, carry the skip instead, so the plan names no
80
+ container and no selector.
81
+
82
+ ## Where a model credential comes from
83
+
84
+ The plan names the model credential variables. Finding their values is not its job.
85
+
86
+ If the project has no value for one, ask the developer where it lives. Never read a file
87
+ outside the project directory to find one. A key found that way belongs to another
88
+ project: it bills that project for these model calls, points attribution at a project
89
+ nobody chose, and leaves no trace, because the scaffold works.
90
+
91
+ Asking where a credential lives is not requesting a secret value. Ask for a path, or ask
92
+ the developer to write the value into the project's env file themselves. A path the
93
+ developer names is theirs to give, including one outside the project. A path this run
94
+ finds is not.
95
+
96
+ If no answer comes, stop. Do not write a placeholder or an empty value. A scaffold
97
+ carrying a dummy key looks finished and fails at the first model call, which is worse
98
+ than stopping here.
99
+
100
+ After model credential placement is complete, add each credential setup path to the
101
+ protected path list. Also add each project file that the developer changed for model
102
+ credentials. Record them in the baseline from the target app directory:
103
+
104
+ ```text
105
+ npx --yes copilotkit@4.10.0 onboard protect --path <path>
106
+ ```
107
+
108
+ Pass one `--path` for each. The command captures a digest for each path and never re-reads
109
+ a path the baseline already holds.
110
+
111
+ Give each path relative to the project root, exactly as the capture printed it. A relative
112
+ path is read against the run's own root, not against the directory you are standing in, so
113
+ one path names one file from anywhere in the project.
114
+
115
+ Then re-capture the files this graph wrote itself. For each path the first capture printed
116
+ as `deferred` that this run has now written, run:
117
+
118
+ ```text
119
+ npx --yes copilotkit@4.10.0 onboard protect --rebaseline --path <path>
120
+ ```
121
+
122
+ From that point they are protected like any other path, so a later step that rewrites
123
+ `.env` and drops its key fails the audit rather than passing it. Continue only if every
124
+ result starts with `Status: passed`.
125
+
126
+ ### When the developer writes a credential after the baseline
127
+
128
+ Asking the developer to place a credential themselves means their edit lands when they get
129
+ to it, and often after the paths above are captured. A later audit then reports the
130
+ environment path as changed. That change is the one this run asked for, so it is not
131
+ damage, and the credential route is how the run says so.
132
+
133
+ Do not run that route here as a step of its own. Run it only when an audit names the
134
+ environment path. The command below is what to run at that point, from the target app
135
+ directory:
136
+
137
+ ```text
138
+ npx --yes copilotkit@4.10.0 onboard protect --accept-credential --path <environment path>
139
+ ```
140
+
141
+ The command compares the variable names the baseline recorded with the names the file holds
142
+ now. Read its result:
143
+
144
+ - `Status: passed` means the developer added a credential and every recorded credential is
145
+ still there. Carry the accepted path into the summary.
146
+ - `credential-lost` means a variable the baseline recorded is gone or empty, and the
147
+ refusal names it. Do not repair or rewrite the file. Report the named variable and stop
148
+ onboarding. A run that lost the project key has nothing to prove a round trip with.
149
+ - `unchanged-path` means the file matches its baseline, so nothing was placed in it. That
150
+ is not a failed step. It answers the question and the run carries on.
151
+
152
+ When the credential question is answered, run
153
+ `npx --yes copilotkit@4.10.0 onboard read credentials/write-plan`.
@@ -0,0 +1,93 @@
1
+ # Write the plan and get it approved
2
+
3
+ The project and its credentials are settled. This phase wires the runtime, has a
4
+ subagent write the plan, and asks the developer to approve it. This is the last thing
5
+ the run needs from them.
6
+
7
+ ## If you stop in this phase
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. The CLI telemetry gate decides whether
11
+ the report is sent.
12
+
13
+ ```text
14
+ npx --yes copilotkit@4.10.0 onboard friction --phase stop --category <slug>
15
+ ```
16
+
17
+ Write one or two sentences to standard input: 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
+ ## Wire the runtime to Intelligence
26
+
27
+ The key in `.env` does nothing on its own. The runtime reads no environment variable for
28
+ it. The credential reaches the platform only when the runtime is constructed with an
29
+ Intelligence client, and a runtime built without one compiles, serves, answers in a
30
+ browser, and never touches the platform.
31
+
32
+ Mount the runtime on the full route subtree. An Intelligence runtime serves its runs over
33
+ two REST paths: `/agent/<id>/run` and `/agent/<id>/connect`. The Intelligence client
34
+ addresses those paths for every transport the provider selects. A runtime mounted with
35
+ `mode: "single-route"` answers every other call. It returns not found for every run and
36
+ every thread reopen.
37
+
38
+ For a Next.js app, mount the handler at `app/api/copilotkit/[[...slug]]/route.ts`. Export
39
+ `GET`, `POST`, `PATCH` and `DELETE`. Pass `useSingleEndpoint={false}` to the React
40
+ provider.
41
+
42
+ One page below offers single-route as an equal option. It is not an equal option here. The
43
+ round-trip check passes either way, so nothing later in this run catches the mistake.
44
+
45
+ Add these pages to the selected documentation URLs for the planning, implementation, and
46
+ proof subagents:
47
+
48
+ - https://docs.copilotkit.ai/intelligence/connect-your-runtime.md
49
+ - https://docs.copilotkit.ai/backend/runtime-endpoints.md
50
+ - https://docs.copilotkit.ai/intelligence/managed-intelligence-platform.md
51
+
52
+ Fetch them together with the pages already selected rather than on their own.
53
+
54
+ Spawn one planning subagent. Tell it to run
55
+ `npx --yes copilotkit@4.10.0 onboard read subagent/create-plan` first and follow the prompt
56
+ it returns. If that read fails because the subagent cannot use the shell, stop that subagent.
57
+ Run the same command yourself, then spawn a fresh subagent with the returned prompt and the
58
+ same handoff. Give it the repository findings, selected framework, frontend, model, credential
59
+ variable names, selected documentation URLs, and documentation policy. On a conversion, also
60
+ give it the frozen criterion. Give the planning subagent the updated protected path list.
61
+ Wait for the subagent to finish.
62
+
63
+ Continue only if the planning result starts with `Status: passed`. For `Status: failed`,
64
+ send the result back to the planning subagent for repair, up to three attempts. For
65
+ `Status: blocked`, or a third failed result, run
66
+ `npx --yes copilotkit@4.10.0 onboard read stopped/run-failed`. A plan this run cannot
67
+ write is a run that broke, not a stack the documentation does not cover. Do not show or
68
+ ask for approval of a non-pass plan.
69
+
70
+ Make sure that the plan preserves each part that already exists. The plan must name the
71
+ credential variables, the Intelligence runtime wiring, the application the project asks
72
+ for, implementation steps, validation steps, and proof steps. Where the plan upgrades the
73
+ CopilotKit dependencies, it must name the versions it moves, every other pin it has to
74
+ move with them, and the revert it falls back to. It must not contain secret values.
75
+
76
+ Show only the selected framework, frontend, model, planned file changes, any ignore-file line this run adds, the CopilotKit dependency upgrade and the versions it moves, every other dependency the upgrade moves and the versions it moves them to, validation commands, and proof steps.
77
+
78
+ An upgrade to a working install is the developer's call, so it belongs in the plan they
79
+ approve rather than in the implementation that follows. Do not upgrade a dependency the
80
+ developer did not approve.
81
+
82
+ When you ask for approval, tell the developer in one line that this is the last thing you
83
+ need from them, and that they can leave the run once they approve. That is a fact about
84
+ this graph rather than a reassurance: no step after approval asks the developer a question,
85
+ and the steps that follow are the longest ones in the run. A developer who does not know
86
+ that waits at the terminal through all of them for a question that never comes. Say it in
87
+ the same message as the plan, and do not turn it into a second question.
88
+
89
+ If the developer approves the plan, run
90
+ `npx --yes copilotkit@4.10.0 onboard read implementation/build-and-validate`.
91
+
92
+ If no exact supported path or documentation URL exists, run
93
+ `npx --yes copilotkit@4.10.0 onboard read unsupported/no-validated-path`.
@@ -9,15 +9,18 @@ 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
  changed protected path, a blocked or third failed proof, a fix that needs changes to the
12
- existing agent or frontend. Send one short report before you stop. Run the feedback
13
- command without another developer question. The CLI telemetry gate decides whether the
12
+ existing agent or frontend. Send one short report before you stop. Run the friction command without another developer question. The CLI telemetry gate decides whether the
14
13
  report is sent.
15
14
 
16
15
  ```text
17
- npx --yes copilotkit@4.9.60 onboard feedback
16
+ npx --yes copilotkit@4.10.0 onboard friction --phase stop --category <slug>
18
17
  ```
19
18
 
20
- Write at most four lines to standard input: the step you stopped at and what stopped it.
19
+ Write one or two sentences to standard input: the step you stopped at and what stopped it.
20
+ Pick the category that fits from docs-missing, docs-wrong, docs-sequential, cli-gap,
21
+ sdk-gap, environment, port-collision, credential, validation-loop, and other. Leave
22
+ --cost-seconds off. A run that stopped cannot separate one papercut's cost from the cost
23
+ of the whole run, so the estimate is optional on a stop report and only there.
21
24
  Send no secrets, source code, logs, or command output. The command refuses a report that
22
25
  carries any of those, prints the reason, and exits zero. A refused report is not a failed
23
26
  step. Send the report, then stop the way the rule that stopped you says to. This fallback
@@ -56,13 +59,13 @@ stop.
56
59
 
57
60
  Use these rules for every protected-path check in this fallback:
58
61
 
59
- - Run `npx --yes copilotkit@4.9.60 onboard audit` from the target app directory.
62
+ - Run `npx --yes copilotkit@4.10.0 onboard audit` from the target app directory.
60
63
  - If a result starts with `Status: blocked`, stop onboarding and report the printed reason.
61
64
  It proved nothing changed, so do not report a preservation failure.
62
65
  - If a result reports a changed protected path this run wrote, stop onboarding.
63
66
  - If a result reports a changed path that no Files changed section from this run names,
64
67
  the change came from outside the run. Accept it by name with
65
- `npx --yes copilotkit@4.9.60 onboard protect --accept-external --path <path>`, run the
68
+ `npx --yes copilotkit@4.10.0 onboard protect --accept-external --path <path>`, run the
66
69
  audit again, and name it in the closing report.
67
70
  - If no Files changed section from this run covers the step that wrote it, stop
68
71
  onboarding. The proof subagent here returns no such section, so a finding it raises is
@@ -115,13 +118,13 @@ application passes proof. Report each tool result separately from the proof resu
115
118
  Report the documentation gap and each assumption with the proof evidence. Do not claim
116
119
  that the selected documentation proved an inferred step.
117
120
 
118
- When the proof is complete, run `npx --yes copilotkit@4.9.60 onboard complete`, carrying the
121
+ When the proof is complete, run `npx --yes copilotkit@4.10.0 onboard complete`, carrying the
119
122
  surface-check result the proof subagent returned. Pass exactly one flag, matching this
120
123
  journey's surface:
121
124
 
122
125
  ```text
123
- npx --yes copilotkit@4.9.60 onboard complete --visual-check <outcome>
124
- npx --yes copilotkit@4.9.60 onboard complete --device-check <outcome>
126
+ npx --yes copilotkit@4.10.0 onboard complete --visual-check <outcome>
127
+ npx --yes copilotkit@4.10.0 onboard complete --device-check <outcome>
125
128
  ```
126
129
 
127
130
  `--visual-check` is for a web frontend and takes `performed`, `skipped-no-browser-tool`, or
@@ -15,18 +15,47 @@ Start the app with its documented command. Confirm `/info` reports the expected
15
15
  capability, but do not treat that flag as proof. Record changed paths and validation output
16
16
  without exposing secrets.
17
17
 
18
- When implementation validation passes, report it:
18
+ After validation and each repair, run:
19
+
20
+ ```text
21
+ npx --yes copilotkit@4.10.0 onboard audit
22
+ ```
23
+
24
+ Continue only when it starts with `Status: passed`. A path under `Authorized to change:` is
25
+ not a finding. Carry it into the final summary with its reason.
26
+
27
+ If the audit fails, never repair, reset, or revert a protected path. Compare each named path
28
+ with the implementation subagent's `Files changed` section. If that section does not name
29
+ the path, accept the developer's external change:
30
+
31
+ ```text
32
+ npx --yes copilotkit@4.10.0 onboard protect --accept-external --path <path>
33
+ ```
34
+
35
+ For an env file where the developer placed a requested credential, use
36
+ `onboard protect --accept-credential --path <path>` instead. If the subagent names the path,
37
+ or its report does not settle who changed it, ask the developer to allow the unplanned
38
+ change. Only after they agree, record their answer:
39
+
40
+ ```text
41
+ npx --yes copilotkit@4.10.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
42
+ ```
43
+
44
+ Run the audit again after each accepted or authorized change. If it still fails, or starts
45
+ with `Status: blocked`, route out and stop:
19
46
 
20
47
  ```text
21
- npx --yes copilotkit@4.9.60 onboard checkpoint --phase build-validated
48
+ npx --yes copilotkit@4.10.0 onboard read feature/stop
22
49
  ```
23
50
 
24
- If validation cannot pass, or this intent needs a prerequisite the app does not have, stop
25
- without further changes:
51
+ When implementation validation passes, report it:
26
52
 
27
53
  ```text
28
- npx --yes copilotkit@4.9.60 onboard read feature/stop
54
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase build-validated
29
55
  ```
30
56
 
57
+ If validation cannot pass, or this intent needs a prerequisite the app does not have, use
58
+ the feature stop route above without further changes.
59
+
31
60
  Otherwise run
32
- `npx --yes copilotkit@4.9.60 onboard read feature/a2ui/proof`.
61
+ `npx --yes copilotkit@4.10.0 onboard read feature/a2ui/proof`.
@@ -19,16 +19,40 @@ user's agent response with a hard-coded UI.
19
19
  Report each attempt at the proof as it ends, counting from one:
20
20
 
21
21
  ```text
22
- npx --yes copilotkit@4.9.60 onboard checkpoint --phase journey-attempted --attempt 1
22
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase journey-attempted --attempt 1
23
23
  ```
24
24
 
25
25
  Report each repair cycle the same way, counting from one:
26
26
 
27
27
  ```text
28
- npx --yes copilotkit@4.9.60 onboard checkpoint --phase repair-attempted --attempt 1
28
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase repair-attempted --attempt 1
29
29
  ```
30
30
 
31
- When the actual surface was driven, run
32
- `npx --yes copilotkit@4.9.60 onboard complete --visual-check performed`. If it could not
33
- be driven because no browser tool is available, run the same command with
34
- `--visual-check skipped-no-browser-tool`; if it failed, use `--visual-check failed`.
31
+ After the final attempt, report the gate exactly once:
32
+
33
+ ```text
34
+ npx --yes copilotkit@4.10.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
35
+ ```
36
+
37
+ Use `passed` only for a proved A2UI surface, `failed` for an attempted proof that failed,
38
+ and `skipped` when the proof could not run. Then run `npx --yes copilotkit@4.10.0 onboard audit`.
39
+ Continue only when it starts with `Status: passed`.
40
+
41
+ If the audit fails, never repair, reset, or revert a protected path. Compare each named path
42
+ with the proof subagent's `Files changed` section. If that section does not name the path,
43
+ run `onboard protect --accept-external --path <path>`, or
44
+ `onboard protect --accept-credential --path <path>` for an env file where the developer
45
+ placed a requested credential. If the subagent names the path, or its report does not settle
46
+ who changed it, ask the developer to allow it. Only after they agree, run
47
+ `onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"`.
48
+ Run the audit again after each accepted or authorized change.
49
+
50
+ If the audit still fails, or starts with `Status: blocked`, route out and stop:
51
+
52
+ ```text
53
+ npx --yes copilotkit@4.10.0 onboard read feature/stop
54
+ ```
55
+
56
+ When the audit passes, run
57
+ `npx --yes copilotkit@4.10.0 onboard read feature/complete` with the actual browser-proof
58
+ outcome.