copilotkit 4.16.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 (83) hide show
  1. package/README.md +195 -8
  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 +13890 -9434
  6. package/onboarding/index.json +1 -1
  7. package/onboarding/prompts/authenticate/start.md +24 -23
  8. package/onboarding/prompts/conversion/plan.md +3 -3
  9. package/onboarding/prompts/credentials/finalize-plan.md +56 -199
  10. package/onboarding/prompts/credentials/plan.md +24 -23
  11. package/onboarding/prompts/credentials/settle-credentials.md +40 -177
  12. package/onboarding/prompts/credentials/write-plan.md +47 -23
  13. package/onboarding/prompts/fallback/best-effort.md +25 -17
  14. package/onboarding/prompts/feature/a2ui/implement.md +40 -12
  15. package/onboarding/prompts/feature/a2ui/proof.md +29 -9
  16. package/onboarding/prompts/feature/a2ui/start.md +54 -12
  17. package/onboarding/prompts/feature/blocked-by-plan.md +4 -4
  18. package/onboarding/prompts/feature/channels/implement.md +41 -13
  19. package/onboarding/prompts/feature/channels/proof.md +30 -11
  20. package/onboarding/prompts/feature/channels/start.md +54 -9
  21. package/onboarding/prompts/feature/chat-suggestions/implement.md +40 -12
  22. package/onboarding/prompts/feature/chat-suggestions/proof.md +29 -9
  23. package/onboarding/prompts/feature/chat-suggestions/start.md +51 -10
  24. package/onboarding/prompts/feature/complete.md +2 -2
  25. package/onboarding/prompts/feature/learning/implement.md +66 -29
  26. package/onboarding/prompts/feature/learning/proof.md +30 -10
  27. package/onboarding/prompts/feature/learning/start.md +46 -20
  28. package/onboarding/prompts/feature/open-generative-ui/implement.md +41 -13
  29. package/onboarding/prompts/feature/open-generative-ui/proof.md +29 -9
  30. package/onboarding/prompts/feature/open-generative-ui/start.md +51 -10
  31. package/onboarding/prompts/feature/realtime-sync/implement.md +41 -13
  32. package/onboarding/prompts/feature/realtime-sync/proof.md +31 -10
  33. package/onboarding/prompts/feature/realtime-sync/start.md +51 -9
  34. package/onboarding/prompts/feature/rich-threads/implement.md +42 -14
  35. package/onboarding/prompts/feature/rich-threads/proof.md +31 -10
  36. package/onboarding/prompts/feature/rich-threads/start.md +51 -9
  37. package/onboarding/prompts/feature/stop.md +5 -5
  38. package/onboarding/prompts/feature/voice/implement.md +40 -12
  39. package/onboarding/prompts/feature/voice/proof.md +29 -9
  40. package/onboarding/prompts/feature/voice/start.md +51 -9
  41. package/onboarding/prompts/framework/ag2.md +2 -2
  42. package/onboarding/prompts/framework/agno.md +4 -4
  43. package/onboarding/prompts/framework/built-in.md +2 -2
  44. package/onboarding/prompts/framework/claude-sdk-python.md +8 -7
  45. package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
  46. package/onboarding/prompts/framework/crewai-flows.md +15 -7
  47. package/onboarding/prompts/framework/deep-agents.md +4 -3
  48. package/onboarding/prompts/framework/google-adk.md +7 -7
  49. package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
  50. package/onboarding/prompts/framework/langgraph-python.md +2 -2
  51. package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
  52. package/onboarding/prompts/framework/llamaindex.md +4 -4
  53. package/onboarding/prompts/framework/mastra.md +2 -2
  54. package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
  55. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
  56. package/onboarding/prompts/framework/ms-agent-python.md +6 -6
  57. package/onboarding/prompts/framework/pydantic-ai.md +2 -2
  58. package/onboarding/prompts/framework/strands-python.md +4 -4
  59. package/onboarding/prompts/framework/strands-typescript.md +4 -4
  60. package/onboarding/prompts/frontend/angular.md +3 -3
  61. package/onboarding/prompts/frontend/nextjs.md +16 -3
  62. package/onboarding/prompts/frontend/plan.md +9 -8
  63. package/onboarding/prompts/frontend/react-native.md +2 -2
  64. package/onboarding/prompts/frontend/react-spa.md +2 -2
  65. package/onboarding/prompts/frontend/vue.md +2 -2
  66. package/onboarding/prompts/implementation/build-and-validate.md +68 -30
  67. package/onboarding/prompts/proof/complete.md +24 -17
  68. package/onboarding/prompts/proof/oss-baseline.md +16 -12
  69. package/onboarding/prompts/proof/round-trip.md +39 -27
  70. package/onboarding/prompts/research/gather.md +8 -7
  71. package/onboarding/prompts/research/merge.md +3 -3
  72. package/onboarding/prompts/research/preflight.md +4 -4
  73. package/onboarding/prompts/research/route.md +6 -6
  74. package/onboarding/prompts/starter/clone.md +16 -12
  75. package/onboarding/prompts/stopped/run-failed.md +11 -11
  76. package/onboarding/prompts/subagent/create-plan.md +24 -10
  77. package/onboarding/prompts/subagent/implement-and-validate.md +25 -11
  78. package/onboarding/prompts/subagent/inspect-repository.md +21 -6
  79. package/onboarding/prompts/subagent/prove-oss-baseline.md +5 -4
  80. package/onboarding/prompts/subagent/prove-round-trip.md +77 -23
  81. package/onboarding/prompts/unsupported/no-validated-path.md +4 -4
  82. package/package.json +1 -5
  83. package/release/release-tool.js +189 -44
@@ -1,192 +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.16.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.
45
-
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.
48
-
49
- ## Settle the Learning Container for this project
50
-
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:
61
-
62
- ```text
63
- npx --prefer-offline --yes copilotkit@4.16.0 learning containers default-id --json
64
- ```
65
-
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.16.0 learning containers get <id> --json
83
- ```
84
-
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.
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.
101
14
 
102
- Never invent an id, scrape a dashboard, or treat an arbitrary string as a container.
15
+ Carry it into the planning handoff. Never spell the id yourself: two spellings give one
16
+ project two containers.
103
17
 
104
- Report what the read found, before anything is planned:
18
+ ## Check the model credential
105
19
 
106
- ```text
107
- npx --prefer-offline --yes copilotkit@4.16.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.16.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
- After model credential placement is complete, add each credential setup path to the
140
- protected path list. Also add each project file that the developer changed for model
141
- credentials. Record them in the baseline from the target app directory:
142
-
143
- ```text
144
- npx --prefer-offline --yes copilotkit@4.16.0 onboard protect --path <path>
145
- ```
146
-
147
- Pass one `--path` for each. The command captures a digest for each path and never re-reads
148
- a path the baseline already holds.
149
-
150
- Give each path relative to the project root, exactly as the capture printed it. A relative
151
- path is read against the run's own root, not against the directory you are standing in, so
152
- one path names one file from anywhere in the project.
153
-
154
- Then re-capture the files this graph wrote itself. For each path the first capture printed
155
- as `deferred` that this run has now written, run:
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:
156
22
 
157
23
  ```text
158
- npx --prefer-offline --yes copilotkit@4.16.0 onboard protect --rebaseline --path <path>
24
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard credentials --model-key <variable> --json
159
25
  ```
160
26
 
161
- From that point they are protected like any other path, so a later step that rewrites
162
- `.env` and drops its key fails the audit rather than passing it. Continue only if every
163
- result starts with `Status: passed`.
164
-
165
- ### When the developer writes a credential after the baseline
166
-
167
- Asking the developer to place a credential themselves means their edit lands when they get
168
- to it, and often after the paths above are captured. A later audit then reports the
169
- environment path as changed. That change is the one this run asked for, so it is not
170
- damage, and the credential route is how the run says so.
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`:
171
32
 
172
- Do not run that route here as a step of its own. Run it only when an audit names the
173
- environment path. The command below is what to run at that point, from the target app
174
- directory:
175
-
176
- ```text
177
- npx --prefer-offline --yes copilotkit@4.16.0 onboard protect --accept-credential --path <environment path>
178
- ```
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.
179
42
 
180
- The command compares the variable names the baseline recorded with the names the file holds
181
- 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.
182
49
 
183
- - `Status: passed` means the developer added a credential and every recorded credential is
184
- still there. Carry the accepted path into the summary.
185
- - `credential-lost` means a variable the baseline recorded is gone or empty, and the
186
- refusal names it. Do not repair or rewrite the file. Report the named variable and stop
187
- onboarding. A run that lost the project key has nothing to prove a round trip with.
188
- - `unchanged-path` means the file matches its baseline, so nothing was placed in it. That
189
- 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.
190
54
 
191
- When the credential question is answered, run
192
- `npx --prefer-offline --yes copilotkit@4.16.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.16.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.
@@ -29,30 +29,50 @@ it. The credential reaches the platform only when the runtime is constructed wit
29
29
  Intelligence client, and a runtime built without one compiles, serves, answers in a
30
30
  browser, and never touches the platform.
31
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.
32
+ Which mount works depends on the `@copilotkit/core` version the app runs: the installed
33
+ version the inspection reported, or the version the plan upgrades to. Do not detect it
34
+ again. Where the inspection reports no `@copilotkit/core`, as a pnpm tree often does, read
35
+ the `@copilotkit/react-core` or `@copilotkit/runtime` version: the three release together.
36
+ Give this rule and that version to the planning subagent below.
37
+
38
+ From `@copilotkit/core` 1.73.1, the Intelligence client honors a single-route transport,
39
+ so either mount works. Keep the mount the project already has, together with its provider
40
+ setting: `mode: "single-route"` with `useSingleEndpoint` true or unset, or the full route
41
+ subtree with `useSingleEndpoint={false}`. For a new mount, use the full route subtree below.
42
+
43
+ Below 1.73.1, mount the runtime on the full route subtree. An Intelligence runtime serves
44
+ its runs over two REST paths: `/agent/<id>/run` and `/agent/<id>/connect`, and the
45
+ Intelligence client of those versions addresses them for every transport the provider
46
+ selects. A runtime mounted with `mode: "single-route"` answers every other call. It
47
+ returns not found for every run and every thread reopen. The other fix is an upgrade of
48
+ the CopilotKit packages to 1.73.1 or later, which the plan can name as its dependency
49
+ upgrade. The round-trip check passes with either mount, so nothing later in this run
50
+ catches the mistake.
51
+
52
+ For the full route subtree in a Next.js app, mount the handler at
53
+ `app/api/copilotkit/[[...slug]]/route.ts`. Export `GET`, `POST`, `PATCH` and `DELETE`.
54
+ Pass `useSingleEndpoint={false}` to the React provider.
44
55
 
45
56
  Add these pages to the selected documentation URLs for the planning, implementation, and
46
57
  proof subagents:
47
58
 
48
- - https://docs.copilotkit.ai/intelligence/connect-your-runtime.md
59
+ - https://docs.copilotkit.ai/intelligence/quickstart.md
49
60
  - https://docs.copilotkit.ai/backend/runtime-endpoints.md
50
61
  - https://docs.copilotkit.ai/intelligence/managed-intelligence-platform.md
51
62
 
52
63
  Fetch them together with the pages already selected rather than on their own.
53
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
+
54
74
  Spawn one planning subagent. Tell it to run
55
- `npx --prefer-offline --yes copilotkit@4.16.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
56
76
  it returns. If that read fails because the subagent cannot use the shell, stop that subagent.
57
77
  Run the same command yourself, then spawn a fresh subagent with the returned prompt and the
58
78
  same handoff. Give it the repository findings, selected framework, frontend, model, credential
@@ -63,8 +83,11 @@ Wait for the subagent to finish.
63
83
  Continue only if the planning result starts with `Status: passed`. For `Status: failed`,
64
84
  send the result back to the planning subagent for repair, up to three attempts. For
65
85
  `Status: blocked`, or a third failed result, run
66
- `npx --prefer-offline --yes copilotkit@4.16.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
86
+ `npx --prefer-offline --yes copilotkit@4.18.0 onboard read stopped/run-failed`. A plan this run cannot
87
+ write is a run that broke, not a stack the documentation does not cover. The exception is
88
+ a blocked result that names `unsupported/no-validated-path`: the planning subagent found
89
+ that no page supports the plan, so take the no-supported-path route at the end of this
90
+ prompt instead. Do not show or
68
91
  ask for approval of a non-pass plan.
69
92
 
70
93
  Make sure that the plan preserves each part that already exists. The plan must name the
@@ -95,7 +118,8 @@ developer did not approve.
95
118
  When you ask for approval, tell the developer in one line that this is the last thing you
96
119
  need from them, and, unless your harness makes the developer approve commands before they
97
120
  run, that they can leave the run once they approve. That is a fact about this graph rather
98
- than a reassurance: no step after approval asks the developer a question, and the steps
121
+ than a reassurance: no step after approval asks the developer a question unless a step
122
+ cannot be built as approved, and the steps
99
123
  that follow are the longest ones in the run. A developer who does not know that waits at
100
124
  the terminal through all of them for a question that never comes. Say it in the same
101
125
  message as the plan, and do not turn it into a second question.
@@ -107,7 +131,7 @@ build. Keep this window open until the app runs." Decide from your own approval
107
131
  as the welcome did, not from your coding-agent slug.
108
132
 
109
133
  If the developer approves the plan, run
110
- `npx --prefer-offline --yes copilotkit@4.16.0 onboard read implementation/build-and-validate`.
134
+ `npx --prefer-offline --yes copilotkit@4.18.0 onboard read implementation/build-and-validate`.
111
135
 
112
136
  If no exact supported path or documentation URL exists, run
113
- `npx --prefer-offline --yes copilotkit@4.16.0 onboard read unsupported/no-validated-path`.
137
+ `npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
@@ -8,13 +8,15 @@ This fallback contains unproved steps. Use the approved plan in step order.
8
8
  ## If you stop in this fallback
9
9
 
10
10
  Several rules below stop onboarding: a blocked or third failed implementation result, a
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 friction
13
- command without another developer question. Do not ask the developer about telemetry: the
14
- command applies the setting they already have.
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
+ 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.
15
17
 
16
18
  ```text
17
- npx --prefer-offline --yes copilotkit@4.16.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>"
18
20
  ```
19
21
 
20
22
  `--message` takes one or two sentences: the step you stopped at and what stopped it.
@@ -60,17 +62,23 @@ or frontend, stop onboarding.
60
62
 
61
63
  Use these rules for every protected-path check in this fallback:
62
64
 
63
- - Run `npx --prefer-offline --yes copilotkit@4.16.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.
64
66
  - If a result starts with `Status: blocked`, stop onboarding and report the printed reason.
65
67
  It proved nothing changed, so do not report a preservation failure.
66
68
  - If a result reports a changed protected path this run wrote, stop onboarding.
67
- - If a result reports a changed path that no Files changed section from this run names,
68
- the change came from outside the run. Accept it by name with
69
- `npx --prefer-offline --yes copilotkit@4.16.0 onboard protect --accept-external --path <path>`, run the
69
+ - If a result reports a changed env file, this rule replaces the one above, even when this
70
+ run wrote the file. This run asked the developer to place a
71
+ credential there, so take the credential route rather than the external one. Accept it
72
+ with `npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --accept-credential --path <path>`,
73
+ run the audit again, and name it in the closing report. If the command refuses because
74
+ it names a lost variable, stop onboarding.
75
+ - Before any proof subagent runs, a changed path that no Files changed section from this
76
+ run names came from outside the run. Accept it by name with
77
+ `npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --accept-external --path <path>`, run the
70
78
  audit again, and name it in the closing report.
71
- - If no Files changed section from this run covers the step that wrote it, stop
72
- onboarding. The proof subagent here returns no such section, so a finding it raises is
73
- unsettled rather than outside the run.
79
+ - After a proof subagent runs, a changed path that no Files changed section from this run
80
+ names is unsettled rather than outside the run, because the proof subagent here returns
81
+ no such section. Stop onboarding.
74
82
  - Never repair, reset, or revert a protected path.
75
83
 
76
84
  Run the protected-path check now. Apply the protected-path rules. Continue only when the
@@ -119,13 +127,13 @@ application passes proof. Report each tool result separately from the proof resu
119
127
  Report the documentation gap and each assumption with the proof evidence. Do not claim
120
128
  that the selected documentation proved an inferred step.
121
129
 
122
- When the proof is complete, run `npx --prefer-offline --yes copilotkit@4.16.0 onboard complete`, carrying the
123
- surface-check result the proof subagent returned. Pass exactly one flag, matching this
124
- journey's surface:
130
+ When the proof is complete, run `npx --prefer-offline --yes copilotkit@4.18.0 onboard complete`, carrying the
131
+ surface-check result the proof subagent returned. Pass exactly one of `--visual-check` or
132
+ `--device-check`, matching this journey's surface:
125
133
 
126
134
  ```text
127
- npx --prefer-offline --yes copilotkit@4.16.0 onboard complete --visual-check <outcome>
128
- npx --prefer-offline --yes copilotkit@4.16.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>
129
137
  ```
130
138
 
131
139
  `--visual-check` is for a web frontend and takes `performed`, `skipped-no-browser-tool`, or
@@ -15,10 +15,41 @@ 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
+ Before you spawn the implementation subagent, take the authorized list from the CLI:
19
+
20
+ ```text
21
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard audit
22
+ ```
23
+
24
+ From its result, copy the paths under `Authorized to modify:`. A passed or failed audit with
25
+ no such block means that nothing is authorized. Read only that block now, and decide the
26
+ findings of a failed audit after implementation, with the audit rules below. If this audit
27
+ starts with `Status: blocked`, the CLI cannot supply the list. Report the printed reason and
28
+ take the feature stop route below.
29
+
30
+ Give the implementation subagent the protected path list and the authorized list. Tell it
31
+ this rule: it can change a path on the authorized list. When the work needs any other
32
+ protected path, it must not edit it. It returns a result that starts with `Status: blocked`
33
+ and names the file under Blockers.
34
+
35
+ That result is a question for the developer. The file has not changed yet, so consent can
36
+ still go on the record. Name the file and why the work needs it, then end your turn and wait
37
+ for the developer's answer. If they allow it, record their answer before any edit:
38
+
39
+ ```text
40
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
41
+ ```
42
+
43
+ Continue only when the result starts with `Status: passed`. Run the audit again, take the
44
+ new list from its `Authorized to modify:` block, and spawn a fresh implementation subagent
45
+ with the same handoff and that list. A subagent that already returned cannot pick up consent
46
+ recorded after it was spawned. If you cannot ask, or the developer declines, take the
47
+ feature stop route below.
48
+
18
49
  After validation and each repair, run:
19
50
 
20
51
  ```text
21
- npx --prefer-offline --yes copilotkit@4.16.0 onboard audit
52
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard audit
22
53
  ```
23
54
 
24
55
  Continue only when it starts with `Status: passed`. A path under `Authorized to modify:` is
@@ -29,33 +60,30 @@ with the implementation subagent's `Files changed` section. If that section does
29
60
  the path, accept the developer's external change:
30
61
 
31
62
  ```text
32
- npx --prefer-offline --yes copilotkit@4.16.0 onboard protect --accept-external --path <path>
63
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --accept-external --path <path>
33
64
  ```
34
65
 
35
66
  For an env file where the developer placed a requested credential, use
36
67
  `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 --prefer-offline --yes copilotkit@4.16.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
42
- ```
68
+ or its report does not settle who changed it, the change is this run's own, made without
69
+ consent. Do not ask the developer to allow it: the CLI refuses consent for a path that
70
+ already changed. Route out, and name the path and the change the audit reports.
43
71
 
44
- Run the audit again after each accepted or authorized change. If it still fails, or starts
72
+ Run the audit again after each accepted change. If it still fails, or starts
45
73
  with `Status: blocked`, route out and stop:
46
74
 
47
75
  ```text
48
- npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/stop
76
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
49
77
  ```
50
78
 
51
79
  When implementation validation passes, report it:
52
80
 
53
81
  ```text
54
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase build-validated
82
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase build-validated
55
83
  ```
56
84
 
57
85
  If validation cannot pass, or this intent needs a prerequisite the app does not have, use
58
86
  the feature stop route above without further changes.
59
87
 
60
88
  Otherwise run
61
- `npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/a2ui/proof`.
89
+ `npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/a2ui/proof`.
@@ -16,26 +16,46 @@ is unavailable, report that the browser proof is blocked rather than claiming su
16
16
  Fix proof failures caused by changed files, then repeat the same proof. Do not replace the
17
17
  user's agent response with a hard-coded UI.
18
18
 
19
+ Give the proof subagent the protected path list and the authorized list. Take that list from
20
+ the latest audit, and copy the paths under `Authorized to modify:`. Tell it this rule: a fix
21
+ can change a path on the authorized list. When a fix needs any other protected path, it must
22
+ not edit it. It returns a result that starts with `Status: blocked` and names the file under
23
+ Blockers.
24
+
25
+ That result is a question for the developer. The file has not changed yet, so consent can
26
+ still go on the record. Name the file and why the fix needs it, then end your turn and wait
27
+ for the developer's answer. If they allow it, record their answer before any edit:
28
+
29
+ ```text
30
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
31
+ ```
32
+
33
+ Continue only when the result starts with `Status: passed`. Run the audit again, take the
34
+ new list from its `Authorized to modify:` block, and spawn a fresh proof subagent with the
35
+ same handoff and that list. A subagent that already returned cannot pick up consent recorded
36
+ after it was spawned. If you cannot ask, or the developer declines, take the feature stop
37
+ route below.
38
+
19
39
  Report each attempt at the proof as it ends, counting from one:
20
40
 
21
41
  ```text
22
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase journey-attempted --attempt 1
42
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase journey-attempted --attempt 1
23
43
  ```
24
44
 
25
45
  Report each repair cycle the same way, counting from one:
26
46
 
27
47
  ```text
28
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase repair-attempted --attempt 1
48
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase repair-attempted --attempt 1
29
49
  ```
30
50
 
31
51
  After the final attempt, report the gate exactly once:
32
52
 
33
53
  ```text
34
- npx --prefer-offline --yes copilotkit@4.16.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>
35
55
  ```
36
56
 
37
57
  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 --prefer-offline --yes copilotkit@4.16.0 onboard audit`.
58
+ and `skipped` when the proof could not run. Then run `npx --prefer-offline --yes copilotkit@4.18.0 onboard audit`.
39
59
  Continue only when it starts with `Status: passed`.
40
60
 
41
61
  If the audit fails, never repair, reset, or revert a protected path. Compare each named path
@@ -43,16 +63,16 @@ with the proof subagent's `Files changed` section. If that section does not name
43
63
  run `onboard protect --accept-external --path <path>`, or
44
64
  `onboard protect --accept-credential --path <path>` for an env file where the developer
45
65
  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.
66
+ who changed it, the change is this run's own, made without consent. Do not ask the developer
67
+ to allow it: the CLI refuses consent for a path that already changed. Route out, and name
68
+ the path and the change the audit reports. Run the audit again after each accepted change.
49
69
 
50
70
  If the audit still fails, or starts with `Status: blocked`, route out and stop:
51
71
 
52
72
  ```text
53
- npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/stop
73
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
54
74
  ```
55
75
 
56
76
  When the audit passes, run
57
- `npx --prefer-offline --yes copilotkit@4.16.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
58
78
  outcome.