copilotkit 4.9.24 → 4.9.31

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 (46) hide show
  1. package/README.md +141 -53
  2. package/cli-build-info.json +8 -8
  3. package/index.js +4460 -3157
  4. package/onboarding/index.json +1 -1
  5. package/onboarding/prompts/authenticate/start.md +27 -8
  6. package/onboarding/prompts/conversion/plan.md +6 -5
  7. package/onboarding/prompts/credentials/finalize-plan.md +39 -26
  8. package/onboarding/prompts/credentials/plan.md +20 -20
  9. package/onboarding/prompts/fallback/best-effort.md +15 -7
  10. package/onboarding/prompts/framework/ag2.md +2 -2
  11. package/onboarding/prompts/framework/agno.md +2 -2
  12. package/onboarding/prompts/framework/built-in.md +2 -2
  13. package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
  14. package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
  15. package/onboarding/prompts/framework/crewai-flows.md +2 -2
  16. package/onboarding/prompts/framework/deep-agents.md +2 -2
  17. package/onboarding/prompts/framework/google-adk.md +2 -2
  18. package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
  19. package/onboarding/prompts/framework/langgraph-python.md +2 -2
  20. package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
  21. package/onboarding/prompts/framework/llamaindex.md +2 -2
  22. package/onboarding/prompts/framework/mastra.md +2 -2
  23. package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
  24. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
  25. package/onboarding/prompts/framework/ms-agent-python.md +2 -2
  26. package/onboarding/prompts/framework/pydantic-ai.md +2 -2
  27. package/onboarding/prompts/framework/strands-python.md +2 -2
  28. package/onboarding/prompts/framework/strands-typescript.md +2 -2
  29. package/onboarding/prompts/frontend/angular.md +32 -4
  30. package/onboarding/prompts/frontend/nextjs.md +3 -3
  31. package/onboarding/prompts/frontend/plan.md +6 -6
  32. package/onboarding/prompts/frontend/react-native.md +2 -2
  33. package/onboarding/prompts/frontend/react-spa.md +2 -2
  34. package/onboarding/prompts/frontend/vue.md +2 -2
  35. package/onboarding/prompts/implementation/build-and-validate.md +32 -10
  36. package/onboarding/prompts/proof/complete.md +10 -6
  37. package/onboarding/prompts/proof/oss-baseline.md +13 -6
  38. package/onboarding/prompts/proof/round-trip.md +16 -8
  39. package/onboarding/prompts/starter/clone.md +4 -4
  40. package/onboarding/prompts/subagent/create-plan.md +23 -1
  41. package/onboarding/prompts/subagent/implement-and-validate.md +30 -1
  42. package/onboarding/prompts/subagent/prove-oss-baseline.md +16 -7
  43. package/onboarding/prompts/subagent/prove-round-trip.md +17 -7
  44. package/onboarding/prompts/unsupported/no-validated-path.md +6 -2
  45. package/package.json +1 -1
  46. package/release/release-tool.js +15 -1
@@ -5,7 +5,7 @@ Preserve an existing Angular frontend. Use the selected page for a new frontend.
5
5
  Use the starter shortcut only if all these facts are true: the target directory contains
6
6
  no entries, its name is a valid `init` project name, and the selected framework is ADK.
7
7
  If all three facts are true, record Angular as the selected frontend. Then run
8
- `npx --yes copilotkit@4.9.24 onboard read starter/clone` before you fetch documentation.
8
+ `npx --yes copilotkit@4.9.31 onboard read starter/clone` before you fetch documentation.
9
9
 
10
10
  ## Documentation
11
11
 
@@ -30,12 +30,40 @@ same `component` and `handler: async () => {}` instead, and record that substitu
30
30
  not give the handler a body: a display-only tool that returns a value writes it into the
31
31
  thread as the tool's result.
32
32
 
33
+ ## Version lines
34
+
35
+ `@copilotkit/angular` publishes on a `0.x` line of its own. Every other `@copilotkit/*`
36
+ package publishes on the `1.x` line. Never move either onto the other's line.
37
+
38
+ The two lines are released separately, so a published `@copilotkit/angular` declares a
39
+ `@copilotkit/core` chosen when that Angular release was cut, not when this run happens.
40
+ Read that declaration before you plan any dependency change:
41
+
42
+ ```text
43
+ npm view @copilotkit/angular@latest dependencies
44
+ ```
45
+
46
+ If the `@copilotkit/core` it declares cannot be satisfied by the version the floor
47
+ requires, the two published packages do not fit together. Installing both resolves two
48
+ copies of `@copilotkit/core`, the Angular package's calls land on the copy that does not
49
+ export what they need, and the threads drawer and the Inspector threads view throw in the
50
+ browser while every command-line check passes.
51
+
52
+ That is a version-line mismatch. Report it naming both versions -- the `@copilotkit/core`
53
+ the Angular package declares, and the one the floor requires -- and take the unsupported
54
+ route at the end of this page. Do not add an `overrides`, `resolutions`, or
55
+ `pnpm.overrides` block to force them together. That is a repair the developer did not
56
+ approve, it silently pins their whole tree, and it hides a mismatch between two packages
57
+ CopilotKit publishes rather than reporting it.
58
+
59
+ ## Node
60
+
33
61
  Angular CLI 22 requires Node `^22.22.3 || ^24.15.0 || >=26`. Check the Node version before
34
62
  you create or build an Angular project. If the installed version is lower, select a
35
63
  supported version first and use it for every later command in this project.
36
64
 
37
65
  If the pages support the selection, record Angular and these URLs. Then run
38
- `npx --yes copilotkit@4.9.24 onboard read credentials/finalize-plan`.
66
+ `npx --yes copilotkit@4.9.31 onboard read credentials/finalize-plan`.
39
67
 
40
- If the documentation does not support the selection, run
41
- `npx --yes copilotkit@4.9.24 onboard read unsupported/no-validated-path`.
68
+ If the documentation does not support the selection, or the two version lines do not fit
69
+ together, run `npx --yes copilotkit@4.9.31 onboard read unsupported/no-validated-path`.
@@ -15,7 +15,7 @@ These TypeScript options have starters: Claude Agent SDK TypeScript, LangGraph T
15
15
  Mastra, and Strands Agents TypeScript. The .NET option is Microsoft Agent Framework .NET.
16
16
 
17
17
  If all shortcut conditions are true, record Next.js as the selected frontend. Then run
18
- `npx --yes copilotkit@4.9.24 onboard read starter/clone` before you fetch documentation.
18
+ `npx --yes copilotkit@4.9.31 onboard read starter/clone` before you fetch documentation.
19
19
 
20
20
  ## Documentation
21
21
 
@@ -27,7 +27,7 @@ agent as the default agent, which is correct only for a project that has no agen
27
27
  Do not replace the developer's existing agent with the built-in agent.
28
28
 
29
29
  If the page supports the selection, record Next.js and this URL. Then run
30
- `npx --yes copilotkit@4.9.24 onboard read credentials/finalize-plan`.
30
+ `npx --yes copilotkit@4.9.31 onboard read credentials/finalize-plan`.
31
31
 
32
32
  If the documentation does not support the selection, run
33
- `npx --yes copilotkit@4.9.24 onboard read unsupported/no-validated-path`.
33
+ `npx --yes copilotkit@4.9.31 onboard read unsupported/no-validated-path`.
@@ -24,11 +24,11 @@ process.
24
24
 
25
25
  Use exactly one matching internal route:
26
26
 
27
- 1. React SPA: `npx --yes copilotkit@4.9.24 onboard read frontend/react-spa`
28
- 2. Next.js: `npx --yes copilotkit@4.9.24 onboard read frontend/nextjs`
29
- 3. Angular: `npx --yes copilotkit@4.9.24 onboard read frontend/angular`
30
- 4. Vue 3: `npx --yes copilotkit@4.9.24 onboard read frontend/vue`
31
- 5. React Native: `npx --yes copilotkit@4.9.24 onboard read frontend/react-native`
27
+ 1. React SPA: `npx --yes copilotkit@4.9.31 onboard read frontend/react-spa`
28
+ 2. Next.js: `npx --yes copilotkit@4.9.31 onboard read frontend/nextjs`
29
+ 3. Angular: `npx --yes copilotkit@4.9.31 onboard read frontend/angular`
30
+ 4. Vue 3: `npx --yes copilotkit@4.9.31 onboard read frontend/vue`
31
+ 5. React Native: `npx --yes copilotkit@4.9.31 onboard read frontend/react-native`
32
32
 
33
33
  If no listed frontend fits, run
34
- `npx --yes copilotkit@4.9.24 onboard read unsupported/no-validated-path`.
34
+ `npx --yes copilotkit@4.9.31 onboard read unsupported/no-validated-path`.
@@ -15,7 +15,7 @@ documents `useRenderTool`, which is React Native's own hook for drawing a tool t
15
15
  already has. That is a different job and needs a tool in the agent.
16
16
 
17
17
  If the pages support the selection, record React Native and these URLs. Then run
18
- `npx --yes copilotkit@4.9.24 onboard read credentials/finalize-plan`.
18
+ `npx --yes copilotkit@4.9.31 onboard read credentials/finalize-plan`.
19
19
 
20
20
  If the documentation does not support the selection, run
21
- `npx --yes copilotkit@4.9.24 onboard read unsupported/no-validated-path`.
21
+ `npx --yes copilotkit@4.9.31 onboard read unsupported/no-validated-path`.
@@ -11,7 +11,7 @@ not move the agent into it.
11
11
  - https://docs.copilotkit.ai/react-spa.md
12
12
 
13
13
  If the page supports the selection, record React SPA and this URL. Then run
14
- `npx --yes copilotkit@4.9.24 onboard read credentials/finalize-plan`.
14
+ `npx --yes copilotkit@4.9.31 onboard read credentials/finalize-plan`.
15
15
 
16
16
  If the documentation does not support the selection, run
17
- `npx --yes copilotkit@4.9.24 onboard read unsupported/no-validated-path`.
17
+ `npx --yes copilotkit@4.9.31 onboard read unsupported/no-validated-path`.
@@ -16,7 +16,7 @@ page above. Vue has its own `useComponent`, which is not the React package. Take
16
16
  that reference page rather than from a Vue generative-UI guide, which is not published.
17
17
 
18
18
  If the pages support the selection, record Vue 3 and these URLs. Then run
19
- `npx --yes copilotkit@4.9.24 onboard read credentials/finalize-plan`.
19
+ `npx --yes copilotkit@4.9.31 onboard read credentials/finalize-plan`.
20
20
 
21
21
  If the documentation does not support the selection, run
22
- `npx --yes copilotkit@4.9.24 onboard read unsupported/no-validated-path`.
22
+ `npx --yes copilotkit@4.9.31 onboard read unsupported/no-validated-path`.
@@ -7,25 +7,46 @@ Do not implement the plan yourself. Use the step order in the approved plan.
7
7
  Run the audit from the target app directory:
8
8
 
9
9
  ```text
10
- npx --yes copilotkit@4.9.24 onboard audit
10
+ npx --yes copilotkit@4.9.31 onboard audit
11
11
  ```
12
12
 
13
13
  It compares every protected path with the digest the CLI captured for it. Its result starts
14
14
  with `Status: passed`, `Status: failed`, or `Status: blocked`. The audit passes only when
15
15
  the result starts with `Status: passed`.
16
16
 
17
- `Status: failed` names each protected path that changed and how. If an audit reports a
18
- changed protected path, use the route-out rules. Never repair, reset, or revert a protected
19
- path. Also do not retry the audit: it reads files, so a second run of it answers the same.
17
+ `Status: failed` names each protected path that changed and how. Never repair, reset, or
18
+ revert a protected path. Also do not retry the audit: it reads files, so a second run of it
19
+ answers the same.
20
+
21
+ Decide each path the audit names, one at a time. Accept a path only when you can show that
22
+ this run did not write it. Every implementation subagent reports what it touched in its
23
+ Files changed section, so the test is whether the path appears in any Files changed section
24
+ this run collected. If it appears in one, or the sections do not settle it, the change is
25
+ this run's own: use the route-out rules. The plan cannot name a protected path, so a plan
26
+ that does not name it proves nothing on its own.
27
+
28
+ A path that no Files changed section names changed outside the run, and it is the
29
+ developer's own file. Accept it by name:
30
+
31
+ ```text
32
+ npx --yes copilotkit@4.9.31 onboard protect --accept-external --path <path>
33
+ ```
34
+
35
+ Pass one `--path` for each path you accept. Accept only a path the audit named, and only
36
+ when no step of this run wrote it. The command re-captures that path, records that this
37
+ run accepted the change, and prints it. Run the audit again afterwards: it passes and
38
+ names every accepted path, and the closing summary must name them too. An acceptance is
39
+ not a repair. It proves nothing about what the file now holds.
20
40
 
21
41
  `Status: blocked` means the audit has no baseline to read. A blocked audit compared
22
42
  nothing and proved nothing changed. It is not a preservation failure: do not report a
23
43
  protected path as changed. Report the printed reason and use the route-out rules.
24
44
 
25
- A non-pass audit never continues the run. Do not send an audit result to a repair worker.
45
+ An audit that has not passed never continues the run by itself. Continue only after an
46
+ acceptance clears it, or route out. Do not send an audit result to a repair worker.
26
47
 
27
48
  Spawn one implementation subagent. Tell it to run
28
- `npx --yes copilotkit@4.9.24 onboard read subagent/implement-and-validate` first and follow
49
+ `npx --yes copilotkit@4.9.31 onboard read subagent/implement-and-validate` first and follow
29
50
  the prompt it returns. If that read fails because the subagent cannot use the shell, stop that
30
51
  subagent. Run the same command yourself, then spawn a fresh subagent with the returned prompt
31
52
  and the same handoff. Give it the plan, selected framework, frontend, model, exact target app
@@ -38,11 +59,12 @@ One subagent implements the whole plan. Do not divide the work across concurrent
38
59
  and do not spawn a second subagent to reconcile a split.
39
60
 
40
61
  If the implementation result does not start with `Status: passed`, do not continue to proof.
41
- Run the protected-path audit after the implementation subagent passes. If any protected path
42
- changed, use the route-out rules. Continue to proof only when that audit passes.
62
+ Run the protected-path audit after the implementation subagent passes. Decide each path it
63
+ names the same way as above, against the Files changed section that subagent just
64
+ returned. Continue to proof only when that audit passes.
43
65
 
44
66
  After the selected implementation path passes, run
45
- `npx --yes copilotkit@4.9.24 onboard read proof/round-trip`.
67
+ `npx --yes copilotkit@4.9.31 onboard read proof/round-trip`.
46
68
 
47
69
  ## Repair rules
48
70
 
@@ -60,4 +82,4 @@ Route out for `Status: blocked`. Route out only when the failure is not yours to
60
82
  failure is in code this run did not write, the fix requires changing the developer's existing
61
83
  agent or frontend, the same command still fails after three repair attempts, or the
62
84
  documentation does not support the plan. In those cases run
63
- `npx --yes copilotkit@4.9.24 onboard read unsupported/no-validated-path`.
85
+ `npx --yes copilotkit@4.9.31 onboard read unsupported/no-validated-path`.
@@ -47,6 +47,10 @@ The handoff must include:
47
47
  - On a conversion, the criterion this run was judged against, in the words the run was
48
48
  given.
49
49
  - Any path this run created that git does not ignore, and what to do with each.
50
+ - Any protected path this run accepted as changed from outside it, and what changed. The
51
+ command at the end of this prompt prints each one, so copy them from its output rather
52
+ than from memory. This run did not change them and cannot say what did, so the developer
53
+ decides what to do about each.
50
54
 
51
55
  A run leaves paths beside the credential file. Tool output such as `.playwright-mcp/` and
52
56
  `.langgraph_api/` is regenerable, so the developer normally wants it ignored.
@@ -60,7 +64,7 @@ Name the debugging surface this journey's frontend can reach, rather than the on
60
64
  of the documentation leads with. For a web frontend it is the CopilotKit Inspector. For
61
65
  React Native there is no Inspector: it is a browser overlay built on a DOM custom element,
62
66
  and `@copilotkit/react-native` does not ship it. Give a mobile developer
63
- `npx --yes copilotkit@4.9.24 verify --round-trip`, the runtime's own log, the AG-UI
67
+ `npx --yes copilotkit@4.9.31 verify --round-trip`, the runtime's own log, the AG-UI
64
68
  Event Inspector in the CopilotKit VS Code extension, and the Intelligence thread view
65
69
  instead. Naming the Inspector to a developer who cannot open it costs them the time it
66
70
  takes to conclude their own wiring is broken.
@@ -72,7 +76,7 @@ the friction commands without another developer question. The CLI telemetry gate
72
76
  whether the report is sent.
73
77
 
74
78
  ```text
75
- npx --yes copilotkit@4.9.24 onboard friction --category <slug> --cost-seconds <seconds>
79
+ npx --yes copilotkit@4.9.31 onboard friction --category <slug> --cost-seconds <seconds>
76
80
  ```
77
81
 
78
82
  Write one or two sentences on the command's standard input. Pick one category from
@@ -89,14 +93,14 @@ Tell the developer when you send a friction report. Do not quote or summarize th
89
93
  unless the developer asks. If the CLI says that telemetry is disabled or unavailable,
90
94
  state that the report was not sent and continue without another question.
91
95
 
92
- When the evidence is gathered, run `npx --yes copilotkit@4.9.24 onboard complete`, carrying
96
+ When the evidence is gathered, run `npx --yes copilotkit@4.9.31 onboard complete`, carrying
93
97
  the surface-check outcome the proof subagent returned. Pass exactly one flag, and pass the
94
98
  one that matches this journey's surface.
95
99
 
96
100
  For a web frontend -- React SPA, Next.js, Angular, Vue:
97
101
 
98
102
  ```text
99
- npx --yes copilotkit@4.9.24 onboard complete --visual-check <outcome>
103
+ npx --yes copilotkit@4.9.31 onboard complete --visual-check <outcome>
100
104
  ```
101
105
 
102
106
  The outcome is one of `performed`, `skipped-no-browser-tool`, or `failed`.
@@ -104,7 +108,7 @@ The outcome is one of `performed`, `skipped-no-browser-tool`, or `failed`.
104
108
  For React Native:
105
109
 
106
110
  ```text
107
- npx --yes copilotkit@4.9.24 onboard complete --device-check <outcome>
111
+ npx --yes copilotkit@4.9.31 onboard complete --device-check <outcome>
108
112
  ```
109
113
 
110
114
  The outcome is one of `performed`, `skipped-no-device`, or `failed`.
@@ -122,7 +126,7 @@ If the round trip proved and something after it still blocked this run, add `--b
122
126
  to the same command:
123
127
 
124
128
  ```text
125
- npx --yes copilotkit@4.9.24 onboard complete --visual-check performed --blocked-by <cause>
129
+ npx --yes copilotkit@4.9.31 onboard complete --visual-check performed --blocked-by <cause>
126
130
  ```
127
131
 
128
132
  The cause is one of `inspector` for a debugging surface that did not open,
@@ -1,24 +1,31 @@
1
1
  # Prove the existing OSS baseline
2
2
 
3
3
  Do not prove the baseline yourself. Spawn one proof subagent. Tell it to run
4
- `npx --yes copilotkit@4.9.24 onboard read subagent/prove-oss-baseline` first and follow the
4
+ `npx --yes copilotkit@4.9.31 onboard read subagent/prove-oss-baseline` first and follow the
5
5
  prompt it returns. If that read fails because the subagent cannot use the shell, stop that
6
6
  subagent. Run the same command yourself, then spawn a fresh subagent with the returned prompt
7
- and the same handoff. Give it the repository findings and exact CLI package spec. Wait for the
8
- subagent to finish.
7
+ and the same handoff. Give it the repository findings and exact CLI package spec.
8
+
9
+ Give it the browser or device control you recorded in the preflight as well. The subagent
10
+ proves the runtime from a shell and needs no browser for that. The control is for the one
11
+ predicate that drives the existing frontend. Where the preflight recorded `unavailable`, say
12
+ so, so the subagent records that predicate as skipped instead of spending the step looking
13
+ for a substitute.
14
+
15
+ Wait for the subagent to finish.
9
16
 
10
17
  Do not change project files before this proof ends. Starting existing development
11
18
  processes and their ignored runtime files is allowed.
12
19
 
13
20
  If the subagent proves the `both-oss` predicate, keep its evidence with the plan and run
14
- `npx --yes copilotkit@4.9.24 onboard read conversion/plan`. That project already works.
21
+ `npx --yes copilotkit@4.9.31 onboard read conversion/plan`. That project already works.
15
22
  What it needs is the conversion, not a build.
16
23
 
17
24
  If it proves another supported starting state, record that state and run
18
- `npx --yes copilotkit@4.9.24 onboard read credentials/plan`. This prompt is served
25
+ `npx --yes copilotkit@4.9.31 onboard read credentials/plan`. This prompt is served
19
26
  whenever a project looks like an OSS integration, so a baseline that did not prove is an
20
27
  ordinary starting state rather than a failure.
21
28
 
22
29
  If it cannot identify the running process safely, exposes a secret, or finds a baseline
23
30
  failure that cannot be classified, run
24
- `npx --yes copilotkit@4.9.24 onboard read unsupported/no-validated-path`.
31
+ `npx --yes copilotkit@4.9.31 onboard read unsupported/no-validated-path`.
@@ -1,7 +1,7 @@
1
1
  # Prove the user journey
2
2
 
3
3
  Do not do the proof work yourself. Spawn one proof subagent. Tell it to run
4
- `npx --yes copilotkit@4.9.24 onboard read subagent/prove-round-trip` first and follow the
4
+ `npx --yes copilotkit@4.9.31 onboard read subagent/prove-round-trip` first and follow the
5
5
  prompt it returns. If that read fails because the subagent cannot use the shell, stop that
6
6
  subagent. Run the same command yourself, then spawn a fresh subagent with the returned prompt
7
7
  and the same handoff. Give it the selected framework, frontend, model, approved plan, selected
@@ -17,18 +17,26 @@ this frontend needs reports the skip outcome rather than looking for a way aroun
17
17
  Give the subagent this guide for continued-development tools:
18
18
  https://docs.copilotkit.ai/build-with-agents.md
19
19
 
20
- Wait for the subagent to finish.
20
+ Wait for the subagent to finish. Its result arrives as a notification. Do not sleep to
21
+ pass the time.
21
22
 
22
23
  For every protected-path audit in this prompt, run
23
- `npx --yes copilotkit@4.9.24 onboard audit` from the target app directory. If its result
24
+ `npx --yes copilotkit@4.9.31 onboard audit` from the target app directory. If its result
24
25
  starts with `Status: blocked`, report the printed reason and use the route-out rules below.
25
26
  A blocked audit proved nothing changed and is not a preservation failure. If a
26
- protected-path audit reports a changed path, use the route-out rules below. Never repair,
27
- reset, or revert a protected path.
27
+ protected-path audit reports a changed path, decide it the way the implementation prompt
28
+ does, against the Files changed sections this run has collected. The proof subagent
29
+ returns none, so a finding with no Files changed section to test against routes out. A
30
+ path one of those sections names is this run's own change and routes out too. Accept a
31
+ path only when a section this run collected covers the step that wrote it and does not
32
+ name it:
33
+ `npx --yes copilotkit@4.9.31 onboard protect --accept-external --path <path>`. Then run
34
+ the audit again and name the path in the closing summary. Never repair, reset, or revert a
35
+ protected path.
28
36
 
29
37
  If the proof result starts with `Status: passed`, run the protected-path audit. Continue to
30
38
  `proof/complete` only if that audit passes. After the audit passes, run
31
- `npx --yes copilotkit@4.9.24 onboard read proof/complete`. A performed surface outcome with
39
+ `npx --yes copilotkit@4.9.31 onboard read proof/complete`. A performed surface outcome with
32
40
  the full round trip is core success even if a continued-development tool fails. A skipped
33
41
  surface outcome still enters `proof/complete` so the CLI records the blocked result. Do not
34
42
  describe a skipped surface as proved. Keep the Skills and MCP results separate from the proof
@@ -95,7 +103,7 @@ and proof cycles.
95
103
 
96
104
  Route out only when the failure is not yours to fix, when the same proof still fails after
97
105
  three attempts, or when no evidence of the round trip can be produced. In those cases run
98
- `npx --yes copilotkit@4.9.24 onboard read unsupported/no-validated-path`. All three are
106
+ `npx --yes copilotkit@4.9.31 onboard read unsupported/no-validated-path`. All three are
99
107
  about the round trip itself. A round trip that proved is not one of them, whatever failed
100
108
  after it.
101
109
 
@@ -105,7 +113,7 @@ Run the feedback command without another developer question. The CLI telemetry g
105
113
  whether the report is sent.
106
114
 
107
115
  ```text
108
- npx --yes copilotkit@4.9.24 onboard feedback
116
+ npx --yes copilotkit@4.9.31 onboard feedback
109
117
  ```
110
118
 
111
119
  Write at most four lines to standard input: the step you stopped at and what stopped it.
@@ -43,7 +43,7 @@ the derived name.
43
43
  Only if the developer asks for an existing project, or asks to see the projects they have,
44
44
  read the choices:
45
45
 
46
- `npx --yes copilotkit@4.9.24 project list --json`
46
+ `npx --yes copilotkit@4.9.31 project list --json`
47
47
 
48
48
  Then ask which one to use. Do not order the projects by creation time. If the developer
49
49
  already gave this answer, do not ask again. Do not read a secret value. Do not show or
@@ -53,7 +53,7 @@ Run the command from the parent directory. Do not inspect another entry in the p
53
53
  directory. Replace each placeholder with the recorded value. Do not run a placeholder as
54
54
  a shell argument.
55
55
 
56
- `npx --yes copilotkit@4.9.24 init --name <project-name> --framework <framework-id> --channel none --no-banner --create <name> --install`
56
+ `npx --yes copilotkit@4.9.31 init --name <project-name> --framework <framework-id> --channel none --no-banner --create <name> --install`
57
57
 
58
58
  Pass the confirmed name to both `--name` and `--create`: the app directory and its
59
59
  Intelligence project take the same name here. If the developer names an existing project,
@@ -69,8 +69,8 @@ account. The command does not need terminal input.
69
69
  If the command succeeds, do not rebuild the starter by hand. Inspect only the generated
70
70
  paths inside the target directory. Record the files, install result, project connection,
71
71
  and validation commands. Then run
72
- `npx --yes copilotkit@4.9.24 onboard read proof/round-trip`.
72
+ `npx --yes copilotkit@4.9.31 onboard read proof/round-trip`.
73
73
 
74
74
  If the command fails, report its exact error and do not claim that the starter is ready.
75
75
  Then run
76
- `npx --yes copilotkit@4.9.24 onboard read unsupported/no-validated-path`.
76
+ `npx --yes copilotkit@4.9.31 onboard read unsupported/no-validated-path`.
@@ -47,6 +47,28 @@ authority from that version. A runtime below it reports its license from a self-
47
47
  token alone. A managed project holds no such token, so the threads drawer this conversion
48
48
  adds lists nothing even after every command-line check passes.
49
49
 
50
+ The upgrade moves more than the `@copilotkit/*` namespace. Intersect the dependencies the
51
+ app declares directly with what the target `@copilotkit/*` versions require, and name in the
52
+ plan every one whose declared range excludes the version the target needs, with the version
53
+ it moves to. The `@ag-ui/*` packages are the CopilotKit protocol layer, on their own version
54
+ line, so they are the ones this meets most often, but the rule is the intersection rather
55
+ than that namespace.
56
+
57
+ The intersection includes what a `@copilotkit/*` package on its own version line declares
58
+ about the `1.x` line. `@copilotkit/angular` is the one that has this, and its declaration
59
+ is materialized at publish time rather than written in the repository, so read it from the
60
+ registry rather than from any checkout. Where it cannot be satisfied by the version the
61
+ floor requires, there is no upgrade to plan: that is `unsupported/no-validated-path`.
62
+
63
+ An exact pin is usually deliberate. Naming the move here is what makes it a step the
64
+ developer approved rather than a repair the run invents halfway through. Do not move a pin
65
+ the developer did not approve moving. Where the developer needs one held, that is
66
+ `unsupported/no-validated-path`, and the upgrade step's revert is the way back.
67
+
68
+ Name the exact version the target requires. A caret does not stand in for it below `0.1.0`:
69
+ `^0.0.59` admits only `0.0.59`, so a pin rewritten that way is the same pin under a
70
+ different spelling, and it breaks again as soon as CopilotKit moves to `0.0.60`.
71
+
50
72
  Plan the upgrade as its own step before the Intelligence runtime wiring, and plan to
51
73
  re-run the recorded baseline checks immediately after it. Name the revert: restore the
52
74
  manifest and lockfile to their recorded state and stop, rather than wiring Intelligence
@@ -100,7 +122,7 @@ here is work the developer did not ask for.
100
122
  Plan the threads drawer itself: add it from the selected drawer page, where this frontend
101
123
  does not already render one. Where this journey's frontend framework ships no threads
102
124
  drawer -- React Native --, plan that the thread is proved by
103
- `npx --yes copilotkit@4.9.24 verify --round-trip`, which needs no browser. Do not plan a
125
+ `npx --yes copilotkit@4.9.31 verify --round-trip`, which needs no browser. Do not plan a
104
126
  step that opens the managed Intelligence dashboard.
105
127
 
106
128
  ## Order the plan into steps
@@ -51,7 +51,36 @@ Where the plan names a CopilotKit dependency upgrade:
51
51
 
52
52
  1. Apply the planned CopilotKit dependency upgrade before you wire Intelligence.
53
53
  2. Report each `@copilotkit/*` version before and after the upgrade.
54
- 3. Then re-run the recorded baseline checks.
54
+ 3. Prove that every dependency the app declares directly resolves to exactly one version in
55
+ the installed tree.
56
+ 4. Then re-run the recorded baseline checks.
57
+
58
+ The package manager does not fail on this. Where the app pins a package exactly and the
59
+ upgraded CopilotKit needs a different version of it, npm keeps the pin at the top of the
60
+ tree and nests the other copy, so the install exits zero and `--dry-run` shows nothing.
61
+ Two copies of a package that carries types fail the type check in some field that has
62
+ nothing to do with either version, so the developer reads it as a bug in their own code.
63
+ Read the installed tree, not the manifest: ask the package manager how many versions of
64
+ each direct dependency it resolved, with `npm ls <name>`, `pnpm why <name>`, or the
65
+ equivalent for the lockfile this project uses. Direct dependencies are a short list, and
66
+ they are the ones whose duplicate breaks a build, so this catches `react`, `zod`,
67
+ `graphql`, and the next protocol package as well as `@ag-ui/*`.
68
+
69
+ `@copilotkit/*` counts here, not only third-party packages. `@copilotkit/angular`
70
+ publishes on a version line of its own and declares a `@copilotkit/core` chosen when that
71
+ Angular release was cut, so the upgrade can install one `@copilotkit/core` while the
72
+ Angular package demands another. That is the case this catches most expensively, because
73
+ it fails in the threads drawer rather than at the install.
74
+
75
+ If one of them resolves to more than one version, restore the manifest and lockfile to
76
+ their recorded state, leave Intelligence unwired, and report which package resolved to more
77
+ than one version, which versions, and which declared range held the top of the tree. Stop.
78
+ Do not wire Intelligence onto a tree carrying two copies of a package.
79
+
80
+ Never add an `overrides`, `resolutions`, or `pnpm.overrides` block to collapse the two
81
+ copies. It forces a version the developer did not approve onto their whole tree, and it
82
+ turns a reportable mismatch between two published packages into a local workaround nobody
83
+ else can see.
55
84
 
56
85
  If the baseline regresses, restore the manifest and lockfile to their recorded state, leave
57
86
  Intelligence unwired, and report the regression with the failing check. Stop. Where the plan
@@ -16,17 +16,26 @@ 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.24 verify --expect-runtime oss --round-trip --agent <expected-agent-id> --json`,
19
+ `npx --yes copilotkit@4.9.31 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
23
- agent. Require the existing user-visible result. If no browser tool is available, the
24
- round trip is not proved and the state is `unproved`.
23
+ agent. Require the existing user-visible result.
25
24
 
26
- Classify the state as `both-oss` only when all six predicates are true: agent present,
27
- interface present, CopilotKit present, CopilotKit round trip proven, runtime connection
28
- `oss`, and managed Intelligence not configured. Return each predicate and its secret-safe
29
- evidence.
25
+ Use the surface control the main coding agent recorded for your environment. It either had
26
+ one already or registered one before this step, so that finding is the answer and there is
27
+ nothing here for you to go looking for. Do not add a browser or device driver to this
28
+ project: a devDependency and a browser download land in the diff of a repository that never
29
+ asked for one, which is a different thing from a server registered against the coding agent.
30
+ Where the recorded control is `unavailable`, record predicate 6 as skipped, with that as the
31
+ reason, and prove the rest.
32
+
33
+ Classify the state as `both-oss` when predicates 1 to 5 are all true. Predicate 5 proves the
34
+ CopilotKit round trip from a shell, so those five settle the starting state on their own.
35
+ Predicate 6 adds the user-visible surface on top of a state already proved: record it as
36
+ passed, failed, or skipped, and do not withhold `both-oss` for a skip. A failed predicate 6
37
+ on an available surface is a baseline failure and is not a skip. Return each predicate and
38
+ its secret-safe evidence.
30
39
 
31
40
  The default in-memory OSS runner is ephemeral. SQLite, custom, or framework persistence
32
41
  can be durable. Report the persistence that project evidence proves, or `unproved`. Do not
@@ -120,15 +120,25 @@ IPv6 only, so an IPv4 literal fails against the correct port.
120
120
  ## Step 4 -- Check the wiring
121
121
 
122
122
  With both running, check the wiring in one command before you open a browser:
123
- `npx --yes copilotkit@4.9.24 verify --json`. Add `--runtime-url` when the runtime is not at
124
- `http://localhost:3000/api/copilotkit`. Read the individual checks rather than the summary
125
- alone: a check reported `undetermined` did not run, and that is not a pass. Repair a failed
126
- check only within the limits above. Otherwise, return the check and its evidence before the
127
- browser.
123
+ `npx --yes copilotkit@4.9.31 verify --json`. It reads the port from this project, so a
124
+ non-default port needs no flag. The payload reports `runtimeUrl` and `runtimeUrlSource`. A
125
+ `runtimeUrlSource` of `default` means nothing in the project named a port, so pass
126
+ `--runtime-url` with the URL from step 1 in that case. Read the individual checks rather than
127
+ the summary alone: a check reported `undetermined` did not run, and that is not a pass.
128
+ Repair a failed check only within the limits above. Otherwise, return the check and its
129
+ evidence before the browser.
128
130
 
129
131
  Treat `intelligence_consumed` as the check that matters most here. It proves that the runtime
130
132
  used the Intelligence credential. `api_key_authenticates` proves only that the key is valid.
131
133
 
134
+ `api_key_loadable_by_app` fails when the key is in a file the application's own process
135
+ will not read. `verify` searches upward for the credential and a framework's env loader
136
+ does not, so a key at the repository root is invisible to an app in a subdirectory. The
137
+ check names the file to write instead. Write the key there, or run
138
+ `npx --yes copilotkit@4.9.31 project select` from the app directory. Do not link,
139
+ copy, or symlink the file to work around it, and do not treat the credential as missing:
140
+ the check above already reported that it exists.
141
+
132
142
  `intelligence_thread_routes` fails when a licensed runtime serves no thread routes. A handler
133
143
  mounted `mode: "single-route"` is the usual cause. Return it for implementation to remove the
134
144
  option and use a catch-all route. Do not edit it. If the check is `undetermined` because no
@@ -136,7 +146,7 @@ thread-endpoint state exists, the runtime predates the field. Record that and co
136
146
 
137
147
  ## Step 5 -- Prove that the agent runs
138
148
 
139
- Run `npx --yes copilotkit@4.9.24 verify --round-trip --json`. It sends one request through
149
+ Run `npx --yes copilotkit@4.9.31 verify --round-trip --json`. It sends one request through
140
150
  the runtime and reads the answer back from the thread, so it separates an agent that is
141
151
  configured from an agent that works. Use `--agent <id>` when the runtime declares more
142
152
  than one. If it reports `user-not-identified`, this project's `identifyUser` reads a
@@ -213,7 +223,7 @@ For a recorded `both-oss` starting state, this step has no component to render.
213
223
  same request the baseline recorded, require the same kind of user-visible result the
214
224
  baseline produced, and require that the thread for that request is listed in the drawer.
215
225
  Where this journey's frontend framework ships no threads drawer -- React Native --, prove
216
- that thread with `npx --yes copilotkit@4.9.24 verify --round-trip`, which reads the
226
+ that thread with `npx --yes copilotkit@4.9.31 verify --round-trip`, which reads the
217
227
  answer back off the thread and needs no browser. Record which of the two you proved.
218
228
 
219
229
  Use the surface control the main coding agent recorded for your environment. It either had
@@ -6,6 +6,10 @@ Explain the exact step that failed. State whether authentication, project select
6
6
  credentials, the journey, a documentation URL, implementation, validation, or the round
7
7
  trip caused the route change. Do not say a path works when this release does not support it.
8
8
 
9
+ If a protected path stopped this run, name that path and how it changed, in the words the
10
+ audit printed. A report that says only that protected files changed cannot be acted on:
11
+ nobody reading it can tell which file moved, or whether this run or the developer moved it.
12
+
9
13
  Stop onboarding without making more repository changes by default.
10
14
 
11
15
  The documentation-gap exception applies only before implementation starts. If implementation,
@@ -26,13 +30,13 @@ Before you show the best-effort plan, require this complete packet:
26
30
  - Give the ordered proof rules.
27
31
 
28
32
  After the developer approves the best-effort plan, run
29
- `npx --yes copilotkit@4.9.24 onboard read fallback/best-effort`.
33
+ `npx --yes copilotkit@4.9.31 onboard read fallback/best-effort`.
30
34
 
31
35
  Send one short report. Run the feedback command without another developer question. The
32
36
  CLI telemetry gate decides whether the report is sent.
33
37
 
34
38
  ```text
35
- npx --yes copilotkit@4.9.24 onboard feedback
39
+ npx --yes copilotkit@4.9.31 onboard feedback
36
40
  ```
37
41
 
38
42
  Write the feedback message to the command's standard input, in at most four lines.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "copilotkit",
3
- "version": "4.9.24",
3
+ "version": "4.9.31",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14698,7 +14698,7 @@ import * as path4 from "node:path";
14698
14698
 
14699
14699
  // apps/cli/src/config.ts
14700
14700
  function getTemplateRef() {
14701
- return true ? "2d44d3ff00910e9f3494d5e57aaa7bdd69a82e04" : "main";
14701
+ return true ? "c2038cf52ced16dc814e2ff0bd60894f2a53f5c1" : "main";
14702
14702
  }
14703
14703
 
14704
14704
  // apps/cli/src/services/agentcore-config.ts
@@ -14881,6 +14881,20 @@ var TELEMETRY_ERROR_CODES = {
14881
14881
  * tell "the caller guessed a slug" from a malformed request.
14882
14882
  */
14883
14883
  PROJECT_NOT_FOUND: "PROJECT_NOT_FOUND",
14884
+ /**
14885
+ * `project select` persisted the record and the key-provisioning call did
14886
+ * not succeed. Buckets as `network` because that is what it almost always
14887
+ * is, and because the funnel needs half-applied selections visible next to
14888
+ * the upstream failures that cause them (OSS-1089).
14889
+ */
14890
+ KEY_PROVISION_FAILED: "KEY_PROVISION_FAILED",
14891
+ /**
14892
+ * `project select` persisted the record and declined to write the key
14893
+ * because git tracks the env file. Distinct from
14894
+ * {@link TELEMETRY_ERROR_CODES.KEY_PROVISION_FAILED}: nothing upstream
14895
+ * failed, and a retry alone will not clear it.
14896
+ */
14897
+ KEY_PROVISION_REFUSED: "KEY_PROVISION_REFUSED",
14884
14898
  CLI_PRODUCT_BINARY_TOO_LARGE: "CLI_PRODUCT_BINARY_TOO_LARGE",
14885
14899
  LEARNING_CONTAINER_ID_INVALID: "LEARNING_CONTAINER_ID_INVALID",
14886
14900
  LEARNING_PROJECT_ID_INVALID: "LEARNING_PROJECT_ID_INVALID",