copilotkit 4.21.0 → 4.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +29 -6
  2. package/cli-build-info.json +8 -8
  3. package/index.js +4558 -3358
  4. package/onboarding/index.json +10 -1
  5. package/onboarding/prompts/authenticate/start.md +11 -17
  6. package/onboarding/prompts/conversion/plan.md +3 -3
  7. package/onboarding/prompts/credentials/finalize-plan.md +7 -7
  8. package/onboarding/prompts/credentials/plan.md +36 -25
  9. package/onboarding/prompts/credentials/settle-credentials.md +3 -3
  10. package/onboarding/prompts/credentials/write-plan.md +10 -18
  11. package/onboarding/prompts/fallback/best-effort.md +8 -8
  12. package/onboarding/prompts/feature/a2ui/implement.md +6 -6
  13. package/onboarding/prompts/feature/a2ui/proof.md +5 -5
  14. package/onboarding/prompts/feature/a2ui/start.md +9 -9
  15. package/onboarding/prompts/feature/channels/implement.md +7 -7
  16. package/onboarding/prompts/feature/channels/proof.md +5 -5
  17. package/onboarding/prompts/feature/channels/start.md +9 -9
  18. package/onboarding/prompts/feature/chat-suggestions/implement.md +6 -6
  19. package/onboarding/prompts/feature/chat-suggestions/proof.md +5 -5
  20. package/onboarding/prompts/feature/chat-suggestions/start.md +9 -9
  21. package/onboarding/prompts/feature/complete.md +2 -2
  22. package/onboarding/prompts/feature/learning/implement.md +13 -13
  23. package/onboarding/prompts/feature/learning/proof.md +6 -6
  24. package/onboarding/prompts/feature/learning/start.md +9 -9
  25. package/onboarding/prompts/feature/open-generative-ui/implement.md +6 -6
  26. package/onboarding/prompts/feature/open-generative-ui/proof.md +5 -5
  27. package/onboarding/prompts/feature/open-generative-ui/start.md +9 -9
  28. package/onboarding/prompts/feature/realtime-sync/implement.md +7 -7
  29. package/onboarding/prompts/feature/realtime-sync/proof.md +5 -5
  30. package/onboarding/prompts/feature/realtime-sync/start.md +8 -8
  31. package/onboarding/prompts/feature/rich-threads/implement.md +8 -8
  32. package/onboarding/prompts/feature/rich-threads/proof.md +5 -5
  33. package/onboarding/prompts/feature/rich-threads/start.md +8 -8
  34. package/onboarding/prompts/feature/stop.md +3 -3
  35. package/onboarding/prompts/feature/voice/implement.md +6 -6
  36. package/onboarding/prompts/feature/voice/proof.md +5 -5
  37. package/onboarding/prompts/feature/voice/start.md +9 -9
  38. package/onboarding/prompts/framework/ag2.md +2 -2
  39. package/onboarding/prompts/framework/agno.md +2 -2
  40. package/onboarding/prompts/framework/built-in.md +2 -2
  41. package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
  42. package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
  43. package/onboarding/prompts/framework/crewai-flows.md +2 -2
  44. package/onboarding/prompts/framework/custom-ag-ui.md +98 -0
  45. package/onboarding/prompts/framework/deep-agents.md +2 -2
  46. package/onboarding/prompts/framework/google-adk.md +2 -2
  47. package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
  48. package/onboarding/prompts/framework/langgraph-python.md +2 -2
  49. package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
  50. package/onboarding/prompts/framework/llamaindex.md +2 -2
  51. package/onboarding/prompts/framework/mastra.md +2 -2
  52. package/onboarding/prompts/framework/ms-agent-dotnet.md +3 -3
  53. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +3 -3
  54. package/onboarding/prompts/framework/ms-agent-python.md +2 -2
  55. package/onboarding/prompts/framework/pydantic-ai.md +2 -2
  56. package/onboarding/prompts/framework/strands-python.md +2 -2
  57. package/onboarding/prompts/framework/strands-typescript.md +2 -2
  58. package/onboarding/prompts/frontend/angular.md +10 -21
  59. package/onboarding/prompts/frontend/nextjs.md +3 -3
  60. package/onboarding/prompts/frontend/plan.md +7 -7
  61. package/onboarding/prompts/frontend/react-native.md +2 -2
  62. package/onboarding/prompts/frontend/react-spa.md +2 -2
  63. package/onboarding/prompts/frontend/vue.md +2 -2
  64. package/onboarding/prompts/implementation/build-and-validate.md +12 -12
  65. package/onboarding/prompts/proof/complete.md +3 -3
  66. package/onboarding/prompts/proof/oss-baseline.md +5 -5
  67. package/onboarding/prompts/proof/round-trip.md +10 -10
  68. package/onboarding/prompts/research/gather.md +5 -5
  69. package/onboarding/prompts/research/merge.md +2 -2
  70. package/onboarding/prompts/research/preflight.md +2 -2
  71. package/onboarding/prompts/research/route.md +9 -9
  72. package/onboarding/prompts/starter/clone.md +15 -14
  73. package/onboarding/prompts/stopped/run-failed.md +2 -2
  74. package/onboarding/prompts/subagent/create-plan.md +26 -40
  75. package/onboarding/prompts/subagent/implement-and-validate.md +26 -38
  76. package/onboarding/prompts/subagent/inspect-repository.md +4 -1
  77. package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
  78. package/onboarding/prompts/subagent/prove-round-trip.md +86 -244
  79. package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
  80. package/package.json +1 -1
  81. package/release/release-tool.js +1 -1
@@ -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 --prefer-offline --yes copilotkit@4.21.0 onboard read subagent/prove-round-trip` first and follow the
4
+ `npx --prefer-offline --yes copilotkit@4.22.0 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,7 +17,7 @@ A web run with no browser tool reports `skipped-no-browser-tool`. That outcome c
17
17
  run once the round trip is recorded as `passed`.
18
18
 
19
19
  A run that cloned a starter is the exception. Tell that subagent that this run cloned a
20
- starter, to finish after `verify --round-trip`, and to open no browser. The cloned code is what this repository's
20
+ starter, to finish after `onboard proof-check`, and to open no browser. The cloned code is what this repository's
21
21
  starter smoke jobs already drive on every change, so opening a browser re-proves in the
22
22
  developer's run what those jobs prove before the starter ships, and it is the most
23
23
  expensive step in this setup. `verify --round-trip` reads the answer back off the thread,
@@ -35,7 +35,7 @@ pass the time.
35
35
  Record what that proof returned before you route on it:
36
36
 
37
37
  ```text
38
- npx --prefer-offline --yes copilotkit@4.21.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
38
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
39
39
  ```
40
40
 
41
41
  Report the gate whatever it returned. A proof that never ran is `skipped`, not failed. A
@@ -44,7 +44,7 @@ to record it as `skipped`. The command prints one line and sends nothing else. W
44
44
  record each attempt as it ends.
45
45
 
46
46
  For every protected-path audit in this prompt, run
47
- `npx --prefer-offline --yes copilotkit@4.21.0 onboard audit` from the target app directory. If its result
47
+ `npx --prefer-offline --yes copilotkit@4.22.0 onboard audit` from the target app directory. If its result
48
48
  starts with `Status: blocked`, report the printed reason and use the route-out rules below.
49
49
  A blocked audit proved nothing changed and is not a preservation failure. If a
50
50
  protected-path audit reports a changed path, decide it the way the implementation prompt
@@ -53,7 +53,7 @@ returns none, so a finding with no Files changed section to test against routes
53
53
  path one of those sections names is this run's own change and routes out too. Accept a
54
54
  path only when a section this run collected covers the step that wrote it and does not
55
55
  name it:
56
- `npx --prefer-offline --yes copilotkit@4.21.0 onboard protect --accept-external --path <path>`. Then run
56
+ `npx --prefer-offline --yes copilotkit@4.22.0 onboard protect --accept-external --path <path>`. Then run
57
57
  the audit again and name the path in the closing summary. Never repair, reset, or revert a
58
58
  protected path.
59
59
 
@@ -61,12 +61,12 @@ That holds for a repair cycle too. When the fix for a failing check lands on a p
61
61
  path, the path is still the developer's, however right the diagnosis is and however small
62
62
  the fix. Reading the file never settles who wrote it. Ask the developer to allow the
63
63
  change, and record their answer with
64
- `npx --prefer-offline --yes copilotkit@4.21.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"`,
64
+ `npx --prefer-offline --yes copilotkit@4.22.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"`,
65
65
  or route out. Never repair it, and never send it to a repair worker.
66
66
 
67
67
  If the proof result starts with `Status: passed`, run the protected-path audit. Continue to
68
68
  `proof/complete` only if that audit passes. After the audit passes, run
69
- `npx --prefer-offline --yes copilotkit@4.21.0 onboard read proof/complete`. A performed surface outcome with
69
+ `npx --prefer-offline --yes copilotkit@4.22.0 onboard read proof/complete`. A performed surface outcome with
70
70
  the full round trip is core success even if a continued-development tool fails. A skipped
71
71
  surface outcome still enters `proof/complete`. The CLI records `skipped-cloned-starter` and
72
72
  `skipped-no-browser-tool` after a passed round trip as complete, and `skipped-no-device` as
@@ -90,7 +90,7 @@ stop report instead of the application they now have.
90
90
 
91
91
  If the round trip fails, decide which kind of failure it is before you route. The proof
92
92
  subagent can repair only project-owned processes, ports, and request options, and it can
93
- make the credential write that its Step 4 names for `api_key_loadable_by_app`. A failure caused
93
+ run the credential command that `verify:api_key_loadable_by_app` names. A failure caused
94
94
  by a source, configuration, dependency, or tracked-file change is a defect in the new work.
95
95
 
96
96
  Retry the proof subagent only for a project-owned process, port, request-option, or
@@ -161,7 +161,7 @@ proof cycles, use the route-out rules below.
161
161
 
162
162
  Route out only when the failure is not yours to fix, when the same proof still fails after
163
163
  three attempts, or when no evidence of the round trip can be produced. In those cases run
164
- `npx --prefer-offline --yes copilotkit@4.21.0 onboard read stopped/run-failed`. The stack is supported:
164
+ `npx --prefer-offline --yes copilotkit@4.22.0 onboard read stopped/run-failed`. The stack is supported:
165
165
  this run did not finish, which is a different ending and a different report. All three are
166
166
  about the round trip itself. A round trip that proved is not one of them, whatever failed
167
167
  after it.
@@ -172,7 +172,7 @@ friction command follows the telemetry setting the developer already chose, so i
172
172
  separate question.
173
173
 
174
174
  ```text
175
- npx --prefer-offline --yes copilotkit@4.21.0 onboard friction --phase stop --category <slug> --message "<sentences>"
175
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard friction --phase stop --category <slug> --message "<sentences>"
176
176
  ```
177
177
 
178
178
  `--message` takes one or two sentences: the step you stopped at and what stopped it.
@@ -44,7 +44,7 @@ Before you end your turn to wait for the developer where the prompt states no de
44
44
  report the pause:
45
45
 
46
46
  ```text
47
- npx --prefer-offline --yes copilotkit@4.21.0 onboard checkpoint --phase awaiting-developer
47
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard checkpoint --phase awaiting-developer
48
48
  ```
49
49
 
50
50
  When the answer or the result arrives, continue from the step that paused. Do not read an
@@ -64,7 +64,7 @@ Both research subagents failing means this harness has no working subagent at al
64
64
  is worth recording once:
65
65
 
66
66
  ```text
67
- npx --prefer-offline --yes copilotkit@4.21.0 onboard checkpoint --phase delegation-unavailable
67
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard checkpoint --phase delegation-unavailable
68
68
  ```
69
69
 
70
70
  Then say once, in your own words, that this environment has no working subagents, so you
@@ -77,7 +77,7 @@ Before you ask the developer any setup question, finish every read-only investig
77
77
  preflight check in this section.
78
78
 
79
79
  Prepare two research assignments. Give each research subagent one assignment. Tell it to run
80
- `npx --prefer-offline --yes copilotkit@4.21.0 onboard read subagent/inspect-repository` first and follow the
80
+ `npx --prefer-offline --yes copilotkit@4.22.0 onboard read subagent/inspect-repository` first and follow the
81
81
  prompt it returns. If that read fails because the subagent cannot use the shell, stop that
82
82
  subagent. Run the same command yourself, then spawn a fresh subagent with the returned prompt
83
83
  and the same handoff. Require only its assigned packet.
@@ -91,8 +91,8 @@ Start both research subagents in parallel:
91
91
  The research is under way. Continue to the surface-control preflight while it runs:
92
92
 
93
93
  ```text
94
- npx --prefer-offline --yes copilotkit@4.21.0 onboard read research/preflight
94
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard read research/preflight
95
95
  ```
96
96
 
97
97
  If inspection stops onboarding, run
98
- `npx --prefer-offline --yes copilotkit@4.21.0 onboard read stopped/run-failed`.
98
+ `npx --prefer-offline --yes copilotkit@4.22.0 onboard read stopped/run-failed`.
@@ -46,7 +46,7 @@ worker a focused directory check. Continue only when both workers return the sam
46
46
  app directory. Both results must start with `Status: passed`. Otherwise, use the stop route.
47
47
 
48
48
  When both research results are merged, run
49
- `npx --prefer-offline --yes copilotkit@4.21.0 onboard read research/route`.
49
+ `npx --prefer-offline --yes copilotkit@4.22.0 onboard read research/route`.
50
50
 
51
51
  If inspection stops onboarding, run
52
- `npx --prefer-offline --yes copilotkit@4.21.0 onboard read stopped/run-failed`.
52
+ `npx --prefer-offline --yes copilotkit@4.22.0 onboard read stopped/run-failed`.
@@ -27,8 +27,8 @@ Where the device probe found no booted device, that is the whole finding.
27
27
  Then merge the research:
28
28
 
29
29
  ```text
30
- npx --prefer-offline --yes copilotkit@4.21.0 onboard read research/merge
30
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard read research/merge
31
31
  ```
32
32
 
33
33
  If inspection stops onboarding, run
34
- `npx --prefer-offline --yes copilotkit@4.21.0 onboard read stopped/run-failed`.
34
+ `npx --prefer-offline --yes copilotkit@4.22.0 onboard read stopped/run-failed`.
@@ -9,7 +9,7 @@ sends the run down one path.
9
9
  Before you route on, run this from the target app directory:
10
10
 
11
11
  ```text
12
- npx --prefer-offline --yes copilotkit@4.21.0 onboard protect
12
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard protect
13
13
  ```
14
14
 
15
15
  It reads the working tree itself, records every changed or untracked path with a digest,
@@ -42,7 +42,7 @@ On either, run this before you read the three findings below, and without asking
42
42
  purpose question:
43
43
 
44
44
  ```text
45
- npx --prefer-offline --yes copilotkit@4.21.0 onboard read feature/channels/start
45
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard read feature/channels/start
46
46
  ```
47
47
 
48
48
  Name the provider to that node so it does not ask again. A Slack page names Slack. A Teams
@@ -78,10 +78,10 @@ directory behind each answer. Read it as a proposal.
78
78
  - `unmatched` names the dependencies it did not place. Use them as evidence for what the
79
79
  project runs.
80
80
 
81
- Detection proposes and you dispose. Keep the documentation-gap exception exactly as it is:
82
- an agent framework outside this set that speaks AG-UI is still yours to recognize and
83
- route to best effort. Where your reading disagrees with the proposal, record your own
84
- answer and say that the two disagreed.
81
+ Detection proposes and you dispose. An agent outside this set that already speaks AG-UI
82
+ is still yours to recognize. The framework question has a route for it, so record in the
83
+ findings that the agent speaks AG-UI and cite the file that proves it. Where your reading
84
+ disagrees with the proposal, record your own answer and say that the two disagreed.
85
85
 
86
86
  ## Route on the merged findings
87
87
 
@@ -97,7 +97,7 @@ settle these three from your own reading of the project. Each one comes from the
97
97
  packets or it is not proved.
98
98
 
99
99
  If all three are proved, prove the live starting state before any project file changes. Run
100
- `npx --prefer-offline --yes copilotkit@4.21.0 onboard read proof/oss-baseline`.
100
+ `npx --prefer-offline --yes copilotkit@4.22.0 onboard read proof/oss-baseline`.
101
101
 
102
102
  Route there before you ask the developer anything else. The questions after this prompt
103
103
  select a framework and a frontend that the findings already name, so a developer who
@@ -110,7 +110,7 @@ developer nor the repository findings prove what the project is for, ask one gui
110
110
  question about the user outcome. This asks what the developer wants to build before you
111
111
  select a framework. Give two or three short examples. Record the answer and give it to
112
112
  each later subagent. Then run
113
- `npx --prefer-offline --yes copilotkit@4.21.0 onboard read credentials/plan`.
113
+ `npx --prefer-offline --yes copilotkit@4.22.0 onboard read credentials/plan`.
114
114
 
115
115
  Do not ask that question on the route above. A project carrying all three states its
116
116
  purpose in the application it already serves.
@@ -124,5 +124,5 @@ A purpose question here names a domain before that choice.
124
124
  Take the same read named above without asking.
125
125
 
126
126
  If authentication, inspection, or the baseline capture stops onboarding, run
127
- `npx --prefer-offline --yes copilotkit@4.21.0 onboard read stopped/run-failed`. None of them says anything
127
+ `npx --prefer-offline --yes copilotkit@4.22.0 onboard read stopped/run-failed`. None of them says anything
128
128
  about whether this project's stack is supported, which is not yet known at this point.
@@ -55,7 +55,7 @@ the derived name.
55
55
  Only if the developer asks for an existing project, or asks to see the projects they have,
56
56
  read the choices:
57
57
 
58
- `npx --prefer-offline --yes copilotkit@4.21.0 project list --json`
58
+ `npx --prefer-offline --yes copilotkit@4.22.0 project list --json`
59
59
 
60
60
  Then ask which one to use. Do not order the projects by creation time. If the developer
61
61
  already gave this answer, do not ask again. Do not read a secret value. Do not show or
@@ -78,18 +78,19 @@ way bills a project nobody chose.
78
78
 
79
79
  ## Clone the starter
80
80
 
81
- Run the command from the parent directory. Do not inspect another entry in the parent
82
- directory. Replace each placeholder with the recorded value. Do not run a placeholder as
83
- a shell argument. If the directory name holds a space, put it in double quotes.
81
+ Run the command in one step, from any directory. `--dir` names the target, so the app
82
+ lands there whatever directory the shell is in. Do not change directory before the command.
83
+ Do not inspect another entry in the parent directory. Replace each placeholder with the
84
+ recorded value. Do not run a placeholder as a shell argument. If the path holds a space,
85
+ put it in double quotes.
84
86
 
85
- `npx --prefer-offline --yes copilotkit@4.21.0 init --name <directory-name> --framework <framework-id> --channel none --no-banner --no-key-prompt --create <name> --install`
87
+ `npx --prefer-offline --yes copilotkit@4.22.0 init --dir <absolute-target-directory> --framework <framework-id> --channel none --no-banner --no-key-prompt --create <name> --install`
86
88
 
87
- `--name` is always the target directory name derived above, because `init` creates the
88
- app at `<parent>/<name>`. Any other value puts the app in a new folder beside the target,
89
- outside the directory this run is bound to. Pass the confirmed project name to `--create`
90
- only. If the developer names an existing project,
91
- use `--project <slug-or-id>` instead of `--create <name>`. If the developer asked to skip
92
- the dependency install, use
89
+ `--dir` is always the absolute path of the target directory. `init` builds the app in that
90
+ directory and gives the app the directory's name. Do not add `--name`: `init` refuses
91
+ `--name` together with `--dir`. Pass the confirmed project name to `--create` only. If the
92
+ developer names an existing project, use `--project <slug-or-id>` instead of
93
+ `--create <name>`. If the developer asked to skip the dependency install, use
93
94
  `--no-install` instead of `--install`. Do not wait for an interactive prompt. Pass every
94
95
  answer as a flag. `--no-key-prompt` stops `init` from asking for a model key. The `init`
95
96
  output still names each missing key as `Set <VARIABLE> in .env`.
@@ -143,7 +144,7 @@ When you ask, name each variable and the file it goes in, and say that the run c
143
144
  when they reply or resume this session. Then report the pause and end your turn:
144
145
 
145
146
  ```text
146
- npx --prefer-offline --yes copilotkit@4.21.0 onboard checkpoint --phase awaiting-model-credential
147
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard checkpoint --phase awaiting-model-credential
147
148
  ```
148
149
 
149
150
  This is a pause, not a stop. Do not send a stop report, and do not take a stop route.
@@ -154,10 +155,10 @@ call.
154
155
 
155
156
  If no credential is missing, report no pause and continue.
156
157
 
157
- Then run `npx --prefer-offline --yes copilotkit@4.21.0 onboard read proof/round-trip`.
158
+ Then run `npx --prefer-offline --yes copilotkit@4.22.0 onboard read proof/round-trip`.
158
159
 
159
160
  If the command fails, report its exact error and do not claim that the starter is ready.
160
161
  Then run
161
- `npx --prefer-offline --yes copilotkit@4.21.0 onboard read stopped/run-failed`. The starter is one this
162
+ `npx --prefer-offline --yes copilotkit@4.22.0 onboard read stopped/run-failed`. The starter is one this
162
163
  graph ships and the stack was chosen from its own supported list, so a command that
163
164
  returned an error is a run that broke, not a setup this release does not support.
@@ -41,7 +41,7 @@ put to them, stop here and send the report below.
41
41
  If they approve it, make that one fix and nothing else. Then come back into this run:
42
42
 
43
43
  ```text
44
- npx --prefer-offline --yes copilotkit@4.21.0 onboard resume --message "<approval>"
44
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard resume --message "<approval>"
45
45
  ```
46
46
 
47
47
  Put the developer's approval in `--message`, in one or two sentences: the fix they
@@ -64,7 +64,7 @@ Send one short report. The friction command follows the telemetry setting the de
64
64
  already chose, so it needs no separate question.
65
65
 
66
66
  ```text
67
- npx --prefer-offline --yes copilotkit@4.21.0 onboard friction --phase stop --category <slug> --message "<sentences>"
67
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard friction --phase stop --category <slug> --message "<sentences>"
68
68
  ```
69
69
 
70
70
  `--message` takes one or two sentences: the step you stopped at and what stopped
@@ -84,24 +84,32 @@ reference naming hosts that route nothing, and it requires the platform URLs the
84
84
  documentation calls optional. A run that reads that reference configures the runtime
85
85
  against a dead host, and the failure arrives as an empty-body 404 with no cause named.
86
86
 
87
- If any `@copilotkit/*` dependency is below 1.70.0, plan to upgrade every `@copilotkit/*`
88
- dependency to its latest published version. Packages that share a version line must end
89
- on the same version. Never force a package onto a version line it does not publish on.
90
- Resolve each latest version at run time rather than from a remembered version number.
91
- Where every `@copilotkit/*` dependency already meets that floor, plan no dependency
92
- change.
87
+ Ask the CLI for the dependency upgrade, from the target directory:
93
88
 
94
- The floor is 1.70.0 because the runtime resolves managed Intelligence entitlement
95
- authority from that version. A runtime below it reports its license from a self-hosted
96
- token alone. A managed project holds no such token, so the threads drawer this conversion
97
- adds lists nothing even after every command-line check passes.
89
+ ```text
90
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard upgrade-plan --json
91
+ ```
98
92
 
99
- The upgrade moves more than the `@copilotkit/*` namespace. Intersect the dependencies the
100
- app declares directly with what the target `@copilotkit/*` versions require, and name in the
101
- plan every one whose declared range excludes the version the target needs, with the version
102
- it moves to. The `@ag-ui/*` packages are the CopilotKit protocol layer, on their own version
103
- line, so they are the ones this meets most often, but the rule is the intersection rather
104
- than that namespace.
93
+ It reads the installed tree and the registry. Read `status`:
94
+
95
+ - `none-needed`: every `@copilotkit/*` package already meets the 1.70.0 floor. Plan no
96
+ dependency change.
97
+ - `upgrade`: plan `moves` as their own step, before the Intelligence runtime wiring. Each
98
+ move names the app, the declared range, and the exact version to declare. A
99
+ `required-by` move is a direct dependency the target CopilotKit version needs at a
100
+ version the app's range excludes. Plan to re-run the recorded baseline checks right
101
+ after the upgrade. The revert is `onboard upgrade-plan --revert`, which restores the
102
+ manifests and lockfiles the command snapshotted.
103
+ - `blocked`: `blockedBy` names a package whose own declaration excludes the target.
104
+ Return `Status: blocked` and name `unsupported/no-validated-path` as the outcome.
105
+ - `undetermined`: the CLI did not reach the registry. Return `Status: blocked` with the
106
+ `detail`.
107
+
108
+ The floor is 1.70.0 because the runtime resolves managed Intelligence entitlement
109
+ authority from that version. Below it, the Intelligence features stay dark with no error.
110
+ An exact pin is usually deliberate, so each move is a step the developer approves, not a
111
+ repair the run invents halfway through. Where the developer needs a pin held, return
112
+ `Status: blocked` and name `unsupported/no-validated-path` as the outcome.
105
113
 
106
114
  A package the plan adds that a `@copilotkit/*` or `@ag-ui/*` package also depends on, such
107
115
  as `zod`, takes the version that tree resolves, not the latest published one. A peer range
@@ -110,29 +118,7 @@ does not settle it. `@copilotkit/react-core@1.75.0` declares `zod >=3.25`, while
110
118
  Read the range with `npm view @ag-ui/core@<version> dependencies`, for the `@ag-ui/core`
111
119
  version the target `@copilotkit/*` release requires, and plan the latest version inside it.
112
120
  Where the project already depends on that package, keep its version if that tree accepts
113
- it. Otherwise name the move as above.
114
-
115
- The intersection includes what a `@copilotkit/*` package on its own version line declares
116
- about the `1.x` line. `@copilotkit/angular` is the one that has this, and its declaration
117
- is materialized at publish time rather than written in the repository, so read it from the
118
- registry rather than from any checkout. Where it cannot be satisfied by the version the
119
- floor requires, there is no upgrade to plan: return `Status: blocked` and name
120
- `unsupported/no-validated-path` as the outcome.
121
-
122
- An exact pin is usually deliberate. Naming the move here is what makes it a step the
123
- developer approved rather than a repair the run invents halfway through. Do not move a pin
124
- the developer did not approve moving. Where the developer needs one held, return
125
- `Status: blocked` and name `unsupported/no-validated-path` as the outcome. The upgrade
126
- step's revert is the way back.
127
-
128
- Name the exact version the target requires. A caret does not stand in for it below `0.1.0`:
129
- `^0.0.59` admits only `0.0.59`, so a pin rewritten that way is the same pin under a
130
- different spelling, and it breaks again as soon as CopilotKit moves to `0.0.60`.
131
-
132
- Plan the upgrade as its own step before the Intelligence runtime wiring, and plan to
133
- re-run the recorded baseline checks immediately after it. Name the revert: restore the
134
- manifest and lockfile to their recorded state and report the break, rather than wiring
135
- Intelligence onto a baseline the upgrade broke.
121
+ it. Otherwise name the move in the plan, with the version it moves to.
136
122
 
137
123
  Where the SDK requires an application-level value that the repository cannot supply, such
138
124
  as an end-user identity for threads, use one clearly marked local placeholder and name what
@@ -183,7 +169,7 @@ here is work the developer did not ask for.
183
169
  Plan the threads drawer itself: add it from the selected drawer page, where this frontend
184
170
  does not already render one. Where this journey's frontend framework ships no threads
185
171
  drawer -- React Native --, plan that the thread is proved by
186
- `npx --prefer-offline --yes copilotkit@4.21.0 verify --round-trip`, which needs no browser. Do not plan a
172
+ `npx --prefer-offline --yes copilotkit@4.22.0 verify --round-trip`, which needs no browser. Do not plan a
187
173
  step that opens the managed Intelligence dashboard.
188
174
 
189
175
  ## Name the files the run writes itself
@@ -110,44 +110,32 @@ upgrade, Intelligence runtime wiring, and the approved threads drawer: the drawe
110
110
  in that list because the approved plan already named it, not because this step invents a
111
111
  new one. After wiring, run the recorded baseline checks and report any regression.
112
112
 
113
- Where the plan names a CopilotKit dependency upgrade:
114
-
115
- 1. Apply the planned CopilotKit dependency upgrade before you wire Intelligence.
116
- 2. Report each `@copilotkit/*` version before and after the upgrade.
117
- 3. Prove that every dependency the app declares directly resolves to exactly one version in
118
- the installed tree.
119
- 4. Then re-run the recorded baseline checks.
120
-
121
- The package manager does not fail on this. Where the app pins a package exactly and the
122
- upgraded CopilotKit needs a different version of it, npm keeps the pin at the top of the
123
- tree and nests the other copy, so the install exits zero and `--dry-run` shows nothing.
124
- Two copies of a package that carries types fail the type check in some field that has
125
- nothing to do with either version, so the developer reads it as a bug in their own code.
126
- Read the installed tree, not the manifest: ask the package manager how many versions of
127
- each direct dependency it resolved, with `npm ls <name>`, `pnpm why <name>`, or the
128
- equivalent for the lockfile this project uses. Direct dependencies are a short list, and
129
- they are the ones whose duplicate breaks a build, so this catches `react`, `zod`,
130
- `graphql`, and the next protocol package as well as `@ag-ui/*`.
131
-
132
- `@copilotkit/*` counts here, not only third-party packages. `@copilotkit/angular`
133
- publishes on a version line of its own and declares a `@copilotkit/core` chosen when that
134
- Angular release was cut, so the upgrade can install one `@copilotkit/core` while the
135
- Angular package demands another. That is the case this catches most expensively, because
136
- it fails in the threads drawer rather than at the install.
137
-
138
- If one of them resolves to more than one version, restore the manifest and lockfile to
139
- their recorded state, leave Intelligence unwired, and report which package resolved to more
140
- than one version, which versions, and which declared range held the top of the tree. Then
141
- end your turn. Do not wire Intelligence onto a tree carrying two copies of a package.
142
-
143
- Never add an `overrides`, `resolutions`, or `pnpm.overrides` block to collapse the two
144
- copies. It forces a version the developer did not approve onto their whole tree, and it
145
- turns a reportable mismatch between two published packages into a local workaround nobody
146
- else can see.
147
-
148
- If the baseline regresses, restore the manifest and lockfile to their recorded state, leave
149
- Intelligence unwired, and report the regression with the failing check. Then end your
150
- turn. Where the plan names no dependency change, report that the installed versions met
113
+ Where the plan names a CopilotKit dependency upgrade, apply its moves before you wire
114
+ Intelligence: declare each exact version in its app's manifest, then install with the
115
+ project's package manager. Then check the installed tree:
116
+
117
+ ```text
118
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard upgrade-plan --check --json
119
+ ```
120
+
121
+ `single` means every direct dependency resolved to one version. `duplicates` names each
122
+ package that resolved to more than one, and the versions. `no-tree` means the apps in
123
+ `unread` have no `node_modules` to read. Install first. Under Yarn Plug'n'Play, ask
124
+ `yarn why <name>` for each direct dependency. The install does not fail on this. npm
125
+ keeps a pin at the top of the tree and nests the copy the upgrade needs. Two copies of a
126
+ package that carries types then fail the type check in an unrelated field. Then re-run
127
+ the recorded baseline checks.
128
+
129
+ If the check finds duplicates or the baseline regresses, put the manifests and lockfiles
130
+ back, leave Intelligence unwired, and report what failed:
131
+
132
+ ```text
133
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard upgrade-plan --revert --json
134
+ ```
135
+
136
+ Then end your turn. Never add an `overrides`, `resolutions`, or `pnpm.overrides` block to
137
+ collapse two copies. It forces a version the developer did not approve onto their whole
138
+ tree. Where the plan names no dependency change, report that the installed versions met
151
139
  the floor.
152
140
 
153
141
  When the documentation uses the framework's scaffolder,
@@ -7,7 +7,7 @@ Work only on the packet you were assigned. Inspect the repository without changi
7
7
  Run this first, from the target project directory:
8
8
 
9
9
  ```text
10
- npx --prefer-offline --yes copilotkit@4.21.0 onboard inspect --json
10
+ npx --prefer-offline --yes copilotkit@4.22.0 onboard inspect --json
11
11
  ```
12
12
 
13
13
  It answers the deterministic half of both packets exactly, from the same code
@@ -50,6 +50,9 @@ Find evidence for:
50
50
  - whether the target project directory contains any entries
51
51
  - any existing agent framework and frontend, confirming or contradicting the
52
52
  `detection` block the CLI proposed
53
+ - for an existing agent in no listed framework, whether it speaks AG-UI: a class that
54
+ extends `AbstractAgent` and implements `run`, or an endpoint that streams AG-UI events.
55
+ Cite the file
53
56
  - current CopilotKit integration and configuration
54
57
  - authentication boundaries
55
58
  - initial changed and untracked paths, without file contents
@@ -32,7 +32,7 @@ Prove the live runtime in this order:
32
32
  4. Confirm from project files that the runtime constructor passes a `runner` option rather
33
33
  than an `intelligence` option. A package, import, project file, or key is not use proof.
34
34
  5. Run
35
- `npx --prefer-offline --yes copilotkit@4.21.0 verify --expect-runtime oss --round-trip --agent <expected-agent-id> --json`,
35
+ `npx --prefer-offline --yes copilotkit@4.22.0 verify --expect-runtime oss --round-trip --agent <expected-agent-id> --json`,
36
36
  with the runtime URL or auth header options that this project needs. Require exit zero
37
37
  and the JSON `ok` field to be `true`.
38
38
  6. Drive one real request through the existing frontend, CopilotKit runtime, and expected