copilotkit 4.9.1 → 4.9.4

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 (45) hide show
  1. package/cli-build-info.json +8 -8
  2. package/index.js +151 -21
  3. package/onboarding/index.json +11 -0
  4. package/onboarding/prompts/authenticate/start.md +83 -32
  5. package/onboarding/prompts/credentials/finalize-plan.md +51 -33
  6. package/onboarding/prompts/credentials/plan.md +37 -25
  7. package/onboarding/prompts/fallback/best-effort.md +22 -11
  8. package/onboarding/prompts/framework/ag2.md +4 -15
  9. package/onboarding/prompts/framework/agno.md +4 -15
  10. package/onboarding/prompts/framework/built-in.md +4 -14
  11. package/onboarding/prompts/framework/claude-sdk-python.md +4 -14
  12. package/onboarding/prompts/framework/claude-sdk-typescript.md +4 -14
  13. package/onboarding/prompts/framework/crewai-flows.md +11 -23
  14. package/onboarding/prompts/framework/deep-agents.md +4 -15
  15. package/onboarding/prompts/framework/google-adk.md +3 -15
  16. package/onboarding/prompts/framework/langgraph-fastapi.md +3 -15
  17. package/onboarding/prompts/framework/langgraph-python.md +3 -15
  18. package/onboarding/prompts/framework/langgraph-typescript.md +3 -15
  19. package/onboarding/prompts/framework/llamaindex.md +4 -15
  20. package/onboarding/prompts/framework/mastra.md +3 -15
  21. package/onboarding/prompts/framework/ms-agent-dotnet.md +18 -49
  22. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +20 -30
  23. package/onboarding/prompts/framework/ms-agent-python.md +3 -15
  24. package/onboarding/prompts/framework/pydantic-ai.md +4 -14
  25. package/onboarding/prompts/framework/strands-python.md +4 -14
  26. package/onboarding/prompts/framework/strands-typescript.md +4 -14
  27. package/onboarding/prompts/frontend/angular.md +13 -18
  28. package/onboarding/prompts/frontend/nextjs.md +20 -15
  29. package/onboarding/prompts/frontend/plan.md +9 -14
  30. package/onboarding/prompts/frontend/react-native.md +7 -15
  31. package/onboarding/prompts/frontend/react-spa.md +5 -15
  32. package/onboarding/prompts/frontend/vue.md +8 -15
  33. package/onboarding/prompts/implementation/build-and-validate.md +22 -13
  34. package/onboarding/prompts/proof/complete.md +32 -5
  35. package/onboarding/prompts/proof/oss-baseline.md +3 -3
  36. package/onboarding/prompts/proof/round-trip.md +197 -72
  37. package/onboarding/prompts/starter/clone.md +67 -0
  38. package/onboarding/prompts/subagent/create-plan.md +26 -15
  39. package/onboarding/prompts/subagent/implement-and-validate.md +19 -10
  40. package/onboarding/prompts/subagent/inspect-repository.md +19 -7
  41. package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
  42. package/onboarding/prompts/subagent/prove-round-trip.md +176 -68
  43. package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
  44. package/package.json +1 -1
  45. package/release/release-tool.js +15 -1
@@ -4,24 +4,41 @@ Do not do the proof work yourself. Spawn one proof subagent.
4
4
 
5
5
  Give the subagent the full text of the proof brief at the end of this prompt, the selected
6
6
  framework, frontend, model, approved plan, selected documentation URLs, and validation
7
- evidence.
8
- Wait for the subagent to finish.
7
+ evidence. Give it the documentation policy recorded during framework selection.
8
+
9
+ Give it the browser or device control you recorded in the preflight as well. The subagent
10
+ drives the surface and cannot see your environment, so without that finding it spends the
11
+ step discovering what you already know. A subagent told it has no control for the surface
12
+ this frontend needs reports the skip outcome rather than looking for a way around it.
9
13
 
10
14
  Give the subagent this guide for continued-development tools:
11
15
  https://docs.copilotkit.ai/build-with-agents.md
12
16
 
17
+ Wait for the subagent to finish.
18
+
13
19
  If the subagent proves the complete round trip, run
14
- `npx --yes copilotkit@4.9.1 onboard read proof/complete`. The round trip proves core success
20
+ `npx --yes copilotkit@4.9.4 onboard read proof/complete`. The round trip proves core success
15
21
  even if a continued-development tool fails. Keep the Skills and MCP results separate from
16
22
  the proof result.
17
23
 
24
+ If the round trip proves and something after it blocks this run anyway -- the managed
25
+ Intelligence dashboard, the debugging surface, or a capability the approved plan already
26
+ excluded for this framework -- read `proof/complete` all the same, with the command above,
27
+ and carry the blocker there with `--blocked-by`.
28
+ The stop terminal is for a journey this release cannot carry. It is
29
+ not for a journey that worked and then hit a wall: routing a proved run there tells the
30
+ developer that a framework and frontend that just worked are unsupported, and hands them a
31
+ stop report instead of the application they now have.
32
+
18
33
  If the round trip fails, decide which kind of failure it is before you route. A failure
19
34
  caused by a file this run created or changed is a defect in the new work. Send it back to
20
35
  the proof subagent to fix and prove again, at most three attempts.
21
36
 
22
37
  Route out only when the failure is not yours to fix, when the same proof still fails after
23
38
  three attempts, or when no evidence of the round trip can be produced. In those cases run
24
- `npx --yes copilotkit@4.9.1 onboard read unsupported/no-validated-path`.
39
+ `npx --yes copilotkit@4.9.4 onboard read unsupported/no-validated-path`. All three are
40
+ about the round trip itself. A round trip that proved is not one of them, whatever failed
41
+ after it.
25
42
 
26
43
  ## Proof subagent brief
27
44
 
@@ -31,28 +48,109 @@ Everything below the rule is the subagent's prompt. Give it verbatim.
31
48
 
32
49
  # Prove the complete round trip
33
50
 
34
- Use the proof steps and documentation URLs from the approved plan. Fetch every selected
35
- URL in one step before you start, rather than one after another.
36
- Do not use remembered CopilotKit instructions.
51
+ Use the proof steps and documentation URLs from the approved plan. Follow the documentation
52
+ policy the main coding agent gives you before you start.
53
+
54
+ Run the steps below in the order they appear. They are the proof. Do not design a
55
+ different sequence of your own, and do not drop a step because an earlier one looked
56
+ convincing. Step 6 has a web form and a React Native form: run the one that matches this
57
+ journey's frontend, and run only that one.
58
+
59
+ Record the result of every step as you go. A step with nothing recorded did not happen.
60
+ Write each captured file to `.copilotkit/proof/` inside the project and name the path in
61
+ the record. That directory holds regenerable evidence rather than application code. Where
62
+ a browser or device tool writes to a location of its own, keep that location and record
63
+ it instead.
64
+
65
+ Gather what you need in as few commands as possible. Combine independent reads into one
66
+ command rather than running them one at a time. Split a command only when its result decides
67
+ what you run next.
68
+
69
+ ## Step 1 -- Read what the proof needs
70
+
71
+ Read all of this from the approved plan in one pass, before you start anything:
72
+
73
+ - the exact request to send through the frontend, in the words the plan gave it,
74
+ - the user-visible result that request has to produce,
75
+ - the expected agent id,
76
+ - where the project's own data lives, and which entities the answer has to name,
77
+ - the start command for the agent and for the frontend, from the plan where it named
78
+ one and from the project's own scripts otherwise,
79
+ - the runtime URL.
80
+
81
+ Where the plan named no request, write one that produces the outcome the plan named, and
82
+ record the request you wrote. Every later step uses these words unchanged, so that the
83
+ browser, the device, and the grounding check all speak about one request.
84
+
85
+ ## Step 2 -- Start the agent and the frontend
86
+
87
+ Read the port the developer's agent already serves from this project's own configuration.
88
+ Do not assume a default, and do not start a second copy of an agent this project is
89
+ already running. Before you bind any new server, check that the port is free and pick
90
+ another one if it is not. Record every port you used.
91
+
92
+ The table names what each frontend's own scaffolder writes, for recognizing a port in a
93
+ started process's output. The project's configuration wins over the table.
37
94
 
38
- A fetch tool that refuses a URL, or fails to reach it, reports a limit of the tool and
39
- not a fact about the page. Retrieve the same URL a second way before you judge it. Run
40
- `curl -fsSL <url>`, or read the same page without the `.md` suffix. Report a
41
- documentation gap only after a second method also fails.
95
+ | Frontend | Dev server the scaffolder writes |
96
+ | ------------ | -------------------------------- |
97
+ | Next.js | `next dev`, port 3000 |
98
+ | React SPA | Vite, port 5173 |
99
+ | Vue 3 | Vite, port 5173 |
100
+ | Angular | `ng serve`, port 4200 |
101
+ | React Native | Metro, port 8081 |
42
102
 
43
- Read the port the developer's agent already serves from this project's own
44
- configuration. Do not assume a default, and do not start a second copy of an agent this
45
- project is already running. Before you bind any new server, check that the port is free
46
- and pick another one if it is not. Record every port you used.
103
+ Where this project's runtime runs as a process of its own, the frontend documentation
104
+ puts it on port 8200. Use the runtime URL from step 1 rather than that number.
47
105
 
48
- Start the agent and the selected frontend.
106
+ Start each server in the background with the project's own script. Then wait for it to
107
+ answer rather than for a fixed number of seconds:
108
+
109
+ ```bash
110
+ ready=
111
+ for _ in $(seq 90); do
112
+ curl -fs -o /dev/null "<url>" && ready=1 && break
113
+ sleep 1
114
+ done
115
+ [ "$ready" = 1 ] && echo "up" || echo "no answer from <url> after 90 seconds"
116
+ ```
117
+
118
+ Read the loop's own last line rather than assuming it ended because the server answered.
119
+ A server that never answered has written the reason to its own output, and reading that
120
+ output is faster than starting it again.
49
121
 
50
122
  Leave the agent and frontend servers running after proof. Record each process ID and a
51
123
  safe command that stops that process. Record the frontend URL and the commands that start
52
124
  both servers again.
53
125
 
126
+ ## Step 3 -- Identify the process that answered
127
+
128
+ Before you trust the agent, confirm that the process answering is the one in this
129
+ repository. `verify` reports which agents the runtime declares and has nothing to compare
130
+ them against, and `--round-trip` proves an agent answers under the declared id without
131
+ proving which deployment did, so this comparison is yours. A health endpoint that returns
132
+ success proves only that something listens on
133
+ that port. An agent from earlier work often still holds it, and a stale process answers
134
+ as though it were the new one. Ask the running agent which graph or agent id it serves
135
+ and compare that with the id declared in this project.
136
+
137
+ If they do not match, find out whose process it is before you signal anything.
138
+ `lsof -ti :<port> -sTCP:LISTEN` gives the process id, and `lsof -a -p <pid> -d cwd` gives
139
+ the directory it runs in. Stop it only when that directory is inside this project, and
140
+ stop its children before the parent so nothing survives by reparenting. A holder outside
141
+ this project belongs to other work: leave it running, report it, and bind to another port.
142
+ Never stop a process because its command line matches a name. One `pkill` pattern reaches
143
+ every project on the machine and takes down work that has nothing to do with this run.
144
+ Never continue against a process you cannot identify, and never report a round trip proven
145
+ by one.
146
+
147
+ Address a local agent by host name rather than by an IP literal. Some local agents bind
148
+ IPv6 only, so an IPv4 literal fails against the correct port.
149
+
150
+ ## Step 4 -- Check the wiring
151
+
54
152
  With both running, check the wiring in one command before you open a browser:
55
- `npx --yes copilotkit@4.9.1 verify --json`. Add `--runtime-url` when the runtime is not at
153
+ `npx --yes copilotkit@4.9.4 verify --json`. Add `--runtime-url` when the runtime is not at
56
154
  `http://localhost:3000/api/copilotkit`. Read the individual checks rather than the summary
57
155
  alone: a check reported `undetermined` did not run, and that is not a pass. Fix anything
58
156
  that is not a pass before the browser, because a browser failure stacked on broken wiring
@@ -68,11 +166,12 @@ thread routes, which means saved Threads cannot load in a browser. The usual cau
68
166
  handler mounted `mode: "single-route"`: remove that option so the handler serves its full
69
167
  route set, and mount it at a catch-all route. If instead that check is `undetermined`
70
168
  because the runtime reports no thread-endpoint state, the runtime predates the field.
71
- Record that and move on — there is nothing to repair.
169
+ Record that and move on -- there is nothing to repair.
170
+
171
+ ## Step 5 -- Prove that the agent runs
72
172
 
73
- Then prove that the agent actually runs, which is the gate for this node:
74
- `npx --yes copilotkit@4.9.1 verify --round-trip --json`. It sends one request through the
75
- runtime and reads the answer back from the thread, so it separates an agent that is
173
+ Run `npx --yes copilotkit@4.9.4 verify --round-trip --json`. It sends one request through
174
+ the runtime and reads the answer back from the thread, so it separates an agent that is
76
175
  configured from an agent that works. Use `--agent <id>` when the runtime declares more
77
176
  than one. If it reports `user-not-identified`, this project's `identifyUser` reads a
78
177
  session the CLI does not carry: pass what it reads with `--header "Name: value"` and run
@@ -80,64 +179,80 @@ it again, because an auth-gated app refusing an unauthenticated caller is that a
80
179
  working. Do not continue until this passes, and never report a round trip proven without
81
180
  it.
82
181
 
83
- Then send one real request through the frontend. Make sure that the request passes through
84
- CopilotKit and reaches the selected agent.
182
+ ## Step 6 -- Drive the surface
85
183
 
86
- For a recorded `both-oss` starting state: Compare the final round trip with the recorded
87
- OSS baseline. The same frontend request must still reach the same agent and produce the
88
- same kind of user-visible result. The runtime must now report `licenseStatus`, and the
89
- authenticated Intelligence checks must pass. Record both before and after evidence.
184
+ Now send one real request through the running frontend, on this journey's own surface.
185
+ Make sure that the request passes through CopilotKit and reaches the selected agent, and
186
+ that the frontend receives working generative UI from the agent. This is the step that
187
+ covers realtime delivery, the frontend provider being wired to this runtime, and a
188
+ generative UI component actually rendering, and no command-line check reaches any of them.
189
+ It is not optional polish: a run that skips it has proven the agent and not the journey,
190
+ and the graph ends such a run as blocked rather than complete.
90
191
 
91
- Before you trust the agent, confirm that the process answering is the one in this
92
- repository. `verify` reports which agents the runtime declares and has nothing to compare
93
- them against, and `--round-trip` proves an agent answers under the declared id without
94
- proving which deployment did, so this comparison is yours. A health endpoint that returns success proves only that something listens on
95
- that port. An agent from earlier work often still holds it, and a stale process answers
96
- as though it were the new one. Ask the running agent which graph or agent id it serves
97
- and compare that with the id declared in this project.
192
+ Use the surface control the main coding agent recorded for your environment. It either had
193
+ one already or registered one before this step, so that finding is the answer and there is
194
+ nothing here for you to go looking for. Do not add a browser driver or a device tool to this
195
+ project: a devDependency and a browser download land in the diff and tax a repository that
196
+ never asked for one, which is a different thing from the server registered against the
197
+ coding agent. If nothing in your environment can drive the surface this journey needs, skip
198
+ this step rather than installing one, and report the skip outcome named below.
98
199
 
99
- If they do not match, find out whose process it is before you signal anything.
100
- `lsof -ti :<port> -sTCP:LISTEN` gives the process id, and `lsof -a -p <pid> -d cwd` gives
101
- the directory it runs in. Stop it only when that directory is inside this project, and
102
- stop its children before the parent so nothing survives by reparenting. A holder outside
103
- this project belongs to other work: leave it running, report it, and bind to another port.
104
- Never stop a process because its command line matches a name. One `pkill` pattern reaches
105
- every project on the machine and takes down work that has nothing to do with this run.
106
- Never continue against a process you cannot identify, and never report a round trip proven
107
- by one.
108
-
109
- Address a local agent by host name rather than by an IP literal. Some local agents bind
110
- IPv6 only, so an IPv4 literal fails against the correct port.
111
-
112
- Drive the real UI on this journey's own surface, and make sure that the frontend receives
113
- working generative UI from the agent. This is the step that covers realtime delivery, the
114
- frontend provider being wired to this runtime, and a generative UI component actually
115
- rendering, and no command-line check reaches any of them. It is not optional polish: a run
116
- that skips it has proven the agent and not the journey, and the graph ends such a run as
117
- blocked rather than complete.
200
+ Never report a result you did not see, on either surface.
118
201
 
119
- For a web frontend, that surface is a browser, and it also covers browser-origin CORS and
120
- CSP, which a CLI request never exercises. Use a browser MCP server already configured for
121
- the coding agent you are running as, the same way the CopilotKit documentation MCP server
122
- below is configured. Do not add a browser driver to this project: a devDependency and a
123
- browser download land in the diff and tax a repository that never asked for one. If nothing
124
- in your environment can drive a browser, skip this step rather than installing one.
202
+ ### Step 6a -- Web frontends: React SPA, Next.js, Angular, Vue 3
203
+
204
+ The surface is a browser, and it also covers browser-origin CORS and CSP, which a CLI
205
+ request never exercises. Drive it with the browser control step 6 named.
206
+
207
+ 1. Open the frontend URL from step 2 and wait for the page to finish loading.
208
+ 2. Take one page snapshot. Record whether the CopilotKit surface is on the page. A page
209
+ that renders without it is a wiring failure rather than a proof to retry.
210
+ 3. Read the browser console before you type anything, and record every error already
211
+ there. An error at this point belongs to page load rather than to the request.
212
+ 4. Enter the step 1 request into the CopilotKit input, in the words step 1 recorded, and
213
+ submit it.
214
+ 5. Wait for the assistant turn to finish rather than for a fixed number of seconds. The
215
+ turn is finished when the streamed text stops growing and the generative UI component
216
+ has rendered.
217
+ 6. Take one screenshot of the finished turn and record where you wrote it.
218
+ 7. Read the browser console a second time, and record every error that step 3 did not
219
+ already list. Those belong to the request.
220
+ 8. Read the network requests. Record every request the page made to the runtime endpoint
221
+ and the status each returned. An answer on the page with no successful request to this
222
+ runtime behind it came from something else, and that is a failed proof rather than a
223
+ passing one.
224
+ 9. Record one line for the finished turn: the time, the page URL, the element you read
225
+ the answer from, and what that element showed.
125
226
 
126
227
  Report exactly one of `performed`, `skipped-no-browser-tool`, or `failed` for a web
127
228
  frontend.
128
229
 
129
- For React Native, that surface is a device or emulator, and a browser cannot stand in for
130
- it. Run the app on a booted emulator, drive the same request, and capture the terminal
131
- state with `adb exec-out screencap -p`. Read `adb logcat` as well: a redbox is a runtime
132
- failure the terminal output never shows. If no device or emulator is available, skip this
133
- step rather than substituting a browser.
230
+ ### Step 6b -- React Native
231
+
232
+ The surface is a device or emulator, and a browser cannot stand in for it.
233
+
234
+ 1. List the booted devices in one command: `adb devices -l`. With no booted device this
235
+ step is `skipped-no-device`. Do not substitute a browser.
236
+ 2. Build and install the app on the booted device with the project's own script, which
237
+ an Expo or React Native CLI project names in `package.json`.
238
+ 3. Clear the log buffer before the request: `adb logcat -c`.
239
+ 4. Open the CopilotKit surface in the running app and enter the step 1 request, in the
240
+ words step 1 recorded.
241
+ 5. Wait for the assistant turn to finish rather than for a fixed number of seconds.
242
+ 6. Capture the terminal state with
243
+ `adb exec-out screencap -p > .copilotkit/proof/surface.png`, and record that path.
244
+ 7. Read the log for the request with `adb logcat -d -t 500`. A redbox is a runtime failure
245
+ the terminal state never shows.
246
+ 8. Record one line for the finished turn: the time, the platform, the device id, the
247
+ screen you were on, and what that screen showed.
248
+
249
+ An Android emulator reaches a runtime on the host machine at `10.0.2.2` rather than at
250
+ `localhost`. A request that fails against the runtime with nothing in the runtime's own
251
+ log is that, rather than a broken runtime.
134
252
 
135
253
  Report exactly one of `performed`, `skipped-no-device`, or `failed` for React Native.
136
254
 
137
- Never report a result you did not see, on either surface.
138
-
139
- Record the input, visible result, relevant process status, and evidence locations. Do not
140
- return secret values.
255
+ ## Step 7 -- Check the answer against the project's data
141
256
 
142
257
  Where the answer is meant to be about data the project holds, check it against that data.
143
258
  Read the entities the project holds -- the ids, names, or records the answer claims to
@@ -153,6 +268,16 @@ project's data never reaches the agent, the agent receives it and its instructio
153
268
  it, the page loads its data after the context was registered, or the run wired a different
154
269
  source than the page renders. Fix that cause, then prove again.
155
270
 
271
+ ## Step 8 -- Compare with the recorded OSS baseline
272
+
273
+ Run this step only for a recorded `both-oss` starting state. Compare the final round trip
274
+ with the recorded OSS baseline. The same frontend request must still reach the same agent
275
+ and produce the same kind of user-visible result. The runtime must now report
276
+ `licenseStatus`, and the authenticated Intelligence checks must pass. Record both before
277
+ and after evidence.
278
+
279
+ ## Step 9 -- Set up the continued-development tools
280
+
156
281
  Fetch the continued-development guide from the main coding agent with the proof
157
282
  documentation. Try the continued-development tools after the application passes proof.
158
283
  Use it to install the project-scoped CopilotKit Skills.
@@ -162,9 +287,9 @@ Do not validate whether the Skills or MCP server installed correctly. Record the
162
287
  result for each attempt. Report each tool result separately. A tool error does not change
163
288
  the proof result.
164
289
 
165
- Gather what you need in as few commands as possible. Combine independent reads into one
166
- command rather than running them one at a time. Split a command only when its result decides
167
- what you run next.
290
+ ## Step 10 -- Return the result
168
291
 
169
292
  Return the proof or the exact failed step to the main coding agent, together with the
170
- surface-check outcome and which surface it speaks for. Stop after you return the result.
293
+ input, the visible result, the relevant process status, the evidence locations, the
294
+ surface-check outcome, and which surface that outcome speaks for. Do not return secret
295
+ values. Stop after you return the result.
@@ -0,0 +1,67 @@
1
+ # Clone a starter
2
+
3
+ Use this shortcut only when the repository findings prove that the target project
4
+ directory contains no entries. If the directory contains a file or directory, do not use
5
+ this shortcut.
6
+
7
+ Match the selected agent framework and frontend to this table:
8
+
9
+ | Agent framework | Frontend | Framework ID |
10
+ | -------------------------------- | -------- | ---------------------------------- |
11
+ | Agno | Next.js | `agno` |
12
+ | Claude Agent SDK Python | Next.js | `claude-sdk-python` |
13
+ | Claude Agent SDK TypeScript | Next.js | `claude-sdk-typescript` |
14
+ | CrewAI Flows | Next.js | `flows` |
15
+ | LangGraph Python | Next.js | `langgraph-py` |
16
+ | LangGraph TypeScript | Next.js | `langgraph-js` |
17
+ | LlamaIndex | Next.js | `llamaindex` |
18
+ | ADK | Next.js | `adk` |
19
+ | ADK | Angular | `adk-angular` |
20
+ | Microsoft Agent Framework Python | Next.js | `microsoft-agent-framework-py` |
21
+ | Microsoft Agent Framework .NET | Next.js | `microsoft-agent-framework-dotnet` |
22
+ | Mastra | Next.js | `mastra` |
23
+ | Pydantic AI | Next.js | `pydantic-ai` |
24
+ | Strands Agents Python | Next.js | `aws-strands-py` |
25
+ | Strands Agents TypeScript | Next.js | `aws-strands-ts` |
26
+
27
+ Each Framework ID selects a starter that the CLI ships with Intelligence. Do not infer a
28
+ different pair from a similar name. AG2 does not use this shortcut because its starter does
29
+ not include Intelligence.
30
+
31
+ Get the target directory name from its path. The project name must contain 1 to 30
32
+ lowercase letters, numbers, or hyphens. It must not start or end with a hyphen. If the
33
+ selected pair is not in the table, or the directory name is not valid, stop the shortcut.
34
+ Do not run `init`. Treat this result as a failed shortcut and follow the final failure
35
+ instruction in this prompt.
36
+
37
+ If the developer did not name an Intelligence project, list the available projects:
38
+
39
+ `npx --yes copilotkit@4.9.4 project list --json`
40
+
41
+ Ask the developer to select a project or give a name for a new project. If the developer
42
+ already gave this answer, do not ask again. Do not read a secret value. Do not show or
43
+ store a secret value.
44
+
45
+ Run the command from the parent directory. Do not inspect another entry in the parent
46
+ directory. Replace each placeholder with the recorded value. Do not run a placeholder as
47
+ a shell argument.
48
+
49
+ `npx --yes copilotkit@4.9.4 init --name <project-name> --framework <framework-id> --channel none --no-banner --project <slug-or-id> --install`
50
+
51
+ If the developer wants a new project, use `--create <name>` instead of
52
+ `--project <slug-or-id>`. If the developer asked to skip the dependency install, use
53
+ `--no-install` instead of `--install`. Do not wait for an interactive prompt. Pass every
54
+ answer as a flag.
55
+
56
+ The command clones the starter into the empty target directory. It also connects the
57
+ starter to the developer's Intelligence project. The earlier login phase supplies the
58
+ account. The command does not need terminal input.
59
+
60
+ If the command succeeds, do not rebuild the starter by hand. Inspect only the generated
61
+ paths inside the target directory. Record the files, install result, project connection,
62
+ and validation commands. Then run
63
+ `npx --yes copilotkit@4.9.4 onboard read proof/round-trip`.
64
+
65
+ If the command fails, report its exact error and do not claim that the starter is ready.
66
+ Then run
67
+ `npx --yes copilotkit@4.9.4 onboard read unsupported/no-validated-path`.
@@ -1,20 +1,13 @@
1
1
  # Create the onboarding plan
2
2
 
3
3
  Use the selected framework, frontend, model, repository findings, and documentation URLs
4
- from the main coding agent. Fetch every selected URL in one step rather than one after
5
- another. Do not use remembered CopilotKit instructions.
6
-
7
- A fetch tool that refuses a URL, or fails to reach it, reports a limit of the tool and
8
- not a fact about the page. Retrieve the same URL a second way before you judge it. Run
9
- `curl -fsSL <url>`, or read the same page without the `.md` suffix. Report a
10
- documentation gap only after a second method also fails.
4
+ from the main coding agent. Follow the documentation policy it gives you.
11
5
 
12
6
  Name the application the project asks for, and plan that application. Each documentation
13
7
  page teaches through one worked example, and that example carries a domain of its own.
14
- The domain belongs to the page. The project's purpose from the repository findings
15
- decides what gets built. Where the two differ, the project wins. Where the repository
16
- never states a purpose, say so in the plan and ask the developer before you adopt the
17
- domain of an example.
8
+ The domain belongs to the page. Use the purpose from the repository findings, or the
9
+ developer outcome if the repository purpose was unproved. Do not ask for it again. Where
10
+ the documentation example differs from that purpose, the project wins.
18
11
 
19
12
  Read only inside the project directory. Answer an API question from the documentation
20
13
  URLs you were given, not from another checkout on this machine.
@@ -31,10 +24,28 @@ combined. Take the constructor from the connect-your-runtime page. Where a frame
31
24
  quickstart shows a `runner` option instead, the connect-your-runtime page wins.
32
25
 
33
26
  When the starting state is `both-oss`, use its recorded live baseline evidence. Preserve
34
- the working agent, frontend, CopilotKit integration, and OSS behavior. Plan only the
35
- project selection, Intelligence runtime configuration, and authenticated proof needed for
36
- the conversion. Preserve the existing persistence and user-visible request. Do not
37
- rebuild a path that already works.
27
+ the working agent, frontend, CopilotKit integration, and OSS behavior. Plan the project
28
+ selection, the CopilotKit dependency upgrade below, the Intelligence runtime
29
+ configuration, and the authenticated proof needed for the conversion. Preserve the
30
+ existing persistence and user-visible request. Do not rebuild a path that already works.
31
+
32
+ Preserving the OSS baseline preserves the application, not its CopilotKit dependency
33
+ versions. An install that predates the managed platform defaults carries a bundled
34
+ reference naming hosts that route nothing, and it requires the platform URLs the same
35
+ documentation calls optional. A run that reads that reference configures the runtime
36
+ against a dead host, and the failure arrives as an empty-body 404 with no cause named.
37
+
38
+ If any `@copilotkit/*` dependency is below 1.64.0, plan to upgrade every `@copilotkit/*`
39
+ dependency to its latest published version. Packages that share a version line must end
40
+ on the same version. Never force a package onto a version line it does not publish on.
41
+ Resolve each latest version at run time rather than from a remembered version number.
42
+ Where every `@copilotkit/*` dependency already meets that floor, plan no dependency
43
+ change.
44
+
45
+ Plan the upgrade as its own step before the Intelligence runtime wiring, and plan to
46
+ re-run the recorded baseline checks immediately after it. Name the revert: restore the
47
+ manifest and lockfile to their recorded state and stop, rather than wiring Intelligence
48
+ onto a baseline the upgrade broke.
38
49
 
39
50
  Where the SDK requires an application-level value that the repository cannot supply, such
40
51
  as an end-user identity for threads, use one clearly marked local placeholder and name what
@@ -1,13 +1,7 @@
1
1
  # Implement and validate the approved plan
2
2
 
3
- Use only the approved plan and the selected documentation URLs. Fetch every URL in one
4
- step, before you change the project, rather than one after another.
5
- Do not use remembered CopilotKit instructions.
6
-
7
- A fetch tool that refuses a URL, or fails to reach it, reports a limit of the tool and
8
- not a fact about the page. Retrieve the same URL a second way before you judge it. Run
9
- `curl -fsSL <url>`, or read the same page without the `.md` suffix. Report a
10
- documentation gap only after a second method also fails.
3
+ Use only the approved plan and the selected documentation URLs. Follow the documentation
4
+ policy the main coding agent gives you before you change the project.
11
5
 
12
6
  Add only the props, options, and imports that appear in the fetched documentation. A
13
7
  remembered API from an earlier CopilotKit version will fail type checking against this
@@ -27,8 +21,23 @@ for.
27
21
 
28
22
  For a recorded `both-oss` baseline, preserve the existing agent, frontend, CopilotKit
29
23
  integration, user-visible request, and runtime behavior. Do not replace the existing
30
- persistence. Change only the approved project selection and Intelligence runtime wiring.
31
- Run the recorded baseline checks after the change and report any regression.
24
+ persistence. Change only the approved project selection, the approved CopilotKit
25
+ dependency upgrade, and the Intelligence runtime wiring.
26
+ Run the recorded baseline checks again after the Intelligence wiring and report any
27
+ regression.
28
+
29
+ Apply the planned CopilotKit dependency upgrade before you wire Intelligence, as its own
30
+ step, and record each version it changed. Then re-run the recorded baseline checks. A
31
+ regression at this point can only be the upgrade, which is why it is checked here rather
32
+ than after the wiring.
33
+
34
+ If the baseline regresses, restore the manifest and lockfile to their recorded state,
35
+ leave Intelligence unwired, and report the regression with the failing check. A
36
+ half-upgraded project with no working chat is worse than the one this run was given, and
37
+ finishing the wiring on top of a broken baseline hides which change broke it.
38
+
39
+ Report each `@copilotkit/*` version before and after the upgrade. Where the plan named no
40
+ dependency change, say that the installed versions already met the floor.
32
41
 
33
42
  When the documentation creates the frontend with the framework's own scaffolder,
34
43
  run that scaffolder rather than hand-authoring what it emits.
@@ -3,16 +3,27 @@
3
3
  Inspect the repository without changing it. Find evidence for:
4
4
 
5
5
  - what the project is for, in the project's own words
6
- - any existing agent framework
7
- - any existing frontend
8
- - current CopilotKit packages and configuration
6
+ - the target app or runtime directory that owns `.env` and the CopilotKit setup
7
+ - whether the target project directory contains any entries
8
+ - any existing agent framework and frontend
9
+ - current CopilotKit integration and configuration, including whether
10
+ `.copilotkit/project.json` has `projectId`, `projectSlug`, and `clerkOrgId`
9
11
  - authentication boundaries
10
- - names of required credential variables, without reading their values
12
+ - names of required credential variables and whether `.env` has a non-empty
13
+ `INTELLIGENCE_API_KEY`
14
+ - retain the `.env` modification time for a later comparison without returning it
11
15
  - package manager and lockfile
12
16
  - required toolchains and their installed versions
13
17
  - declared ports and whether each port is available
18
+ - whether the runtime constructor uses a `runner` option, an `intelligence` option, or
19
+ neither can be proved from project files
14
20
  - CopilotKit package versions and package compatibility risks
15
21
 
22
+ For the CopilotKit versions, report the exact installed version of every `@copilotkit/*`
23
+ dependency, read from the lockfile rather than a manifest range, and state whether any of
24
+ them is below 1.64.0. The conversion decides its upgrade from exactly that, and a caret
25
+ range does not answer it.
26
+
16
27
  A project states what it is for in its `README.md`, in its package description, or in
17
28
  the prompt of an agent it already has. Quote that statement rather than rewriting it. An
18
29
  empty project carries it in the README alone, and that makes the README the whole of the
@@ -24,6 +35,7 @@ what you run next. Keep this preflight read-only. Do not install packages, stop
24
35
  or change a port. Check only the toolchains and ports that repository files require.
25
36
 
26
37
  Return the file paths and a short finding for each item. State each absent or unproved item.
27
- Do not read, print, or return secret values. Do not read a file outside the project
28
- directory. Do not run or return another onboarding command. Stop after returning the
29
- findings to the main coding agent.
38
+ Do not read, print, or return secret values. For `.env` and `.copilotkit/project.json`
39
+ checks, return only paths, presence checks, and missing field names. Do not read a file
40
+ outside the project directory. Do not run or return another onboarding command. Stop after
41
+ returning the findings to the main coding agent.
@@ -16,7 +16,7 @@ Prove the live runtime in this order:
16
16
  4. Confirm from project files that the runtime constructor passes a `runner` option rather
17
17
  than an `intelligence` option. A package, import, project file, or key is not use proof.
18
18
  5. Run
19
- `npx --yes copilotkit@4.9.1 verify --expect-runtime oss --round-trip --agent <expected-agent-id> --json`,
19
+ `npx --yes copilotkit@4.9.4 verify --expect-runtime oss --round-trip --agent <expected-agent-id> --json`,
20
20
  with the runtime URL or auth header options that this project needs. Require exit zero
21
21
  and the JSON `ok` field to be `true`.
22
22
  6. Drive one real request through the existing frontend, CopilotKit runtime, and expected