copilotkit 4.17.0 → 4.19.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 +133 -6
  2. package/cli-build-info.json +7 -7
  3. package/exporters/langgraph/README.md +118 -0
  4. package/exporters/langgraph/export_checkpointer.py +125 -0
  5. package/index.js +13382 -9313
  6. package/onboarding/index.json +1 -1
  7. package/onboarding/prompts/authenticate/start.md +31 -23
  8. package/onboarding/prompts/conversion/plan.md +3 -3
  9. package/onboarding/prompts/credentials/finalize-plan.md +57 -200
  10. package/onboarding/prompts/credentials/plan.md +50 -23
  11. package/onboarding/prompts/credentials/settle-credentials.md +56 -217
  12. package/onboarding/prompts/credentials/write-plan.md +17 -8
  13. package/onboarding/prompts/fallback/best-effort.md +36 -24
  14. package/onboarding/prompts/feature/a2ui/implement.md +7 -7
  15. package/onboarding/prompts/feature/a2ui/proof.md +8 -8
  16. package/onboarding/prompts/feature/a2ui/start.md +53 -9
  17. package/onboarding/prompts/feature/channels/implement.md +8 -8
  18. package/onboarding/prompts/feature/channels/proof.md +7 -7
  19. package/onboarding/prompts/feature/channels/start.md +50 -7
  20. package/onboarding/prompts/feature/chat-suggestions/implement.md +7 -7
  21. package/onboarding/prompts/feature/chat-suggestions/proof.md +7 -7
  22. package/onboarding/prompts/feature/chat-suggestions/start.md +50 -7
  23. package/onboarding/prompts/feature/complete.md +2 -2
  24. package/onboarding/prompts/feature/learning/implement.md +24 -19
  25. package/onboarding/prompts/feature/learning/proof.md +8 -8
  26. package/onboarding/prompts/feature/learning/start.md +43 -20
  27. package/onboarding/prompts/feature/open-generative-ui/implement.md +7 -7
  28. package/onboarding/prompts/feature/open-generative-ui/proof.md +7 -7
  29. package/onboarding/prompts/feature/open-generative-ui/start.md +50 -7
  30. package/onboarding/prompts/feature/realtime-sync/implement.md +8 -8
  31. package/onboarding/prompts/feature/realtime-sync/proof.md +7 -7
  32. package/onboarding/prompts/feature/realtime-sync/start.md +49 -6
  33. package/onboarding/prompts/feature/rich-threads/implement.md +9 -9
  34. package/onboarding/prompts/feature/rich-threads/proof.md +7 -7
  35. package/onboarding/prompts/feature/rich-threads/start.md +49 -6
  36. package/onboarding/prompts/feature/stop.md +5 -5
  37. package/onboarding/prompts/feature/voice/implement.md +7 -7
  38. package/onboarding/prompts/feature/voice/proof.md +7 -7
  39. package/onboarding/prompts/feature/voice/start.md +50 -7
  40. package/onboarding/prompts/framework/ag2.md +2 -2
  41. package/onboarding/prompts/framework/agno.md +2 -2
  42. package/onboarding/prompts/framework/built-in.md +2 -2
  43. package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
  44. package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
  45. package/onboarding/prompts/framework/crewai-flows.md +2 -2
  46. package/onboarding/prompts/framework/deep-agents.md +2 -2
  47. package/onboarding/prompts/framework/google-adk.md +2 -2
  48. package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
  49. package/onboarding/prompts/framework/langgraph-python.md +2 -2
  50. package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
  51. package/onboarding/prompts/framework/llamaindex.md +2 -2
  52. package/onboarding/prompts/framework/mastra.md +2 -2
  53. package/onboarding/prompts/framework/ms-agent-dotnet.md +8 -3
  54. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +8 -3
  55. package/onboarding/prompts/framework/ms-agent-python.md +2 -2
  56. package/onboarding/prompts/framework/pydantic-ai.md +2 -2
  57. package/onboarding/prompts/framework/strands-python.md +2 -2
  58. package/onboarding/prompts/framework/strands-typescript.md +2 -2
  59. package/onboarding/prompts/frontend/angular.md +3 -3
  60. package/onboarding/prompts/frontend/nextjs.md +3 -3
  61. package/onboarding/prompts/frontend/plan.md +9 -8
  62. package/onboarding/prompts/frontend/react-native.md +2 -2
  63. package/onboarding/prompts/frontend/react-spa.md +2 -2
  64. package/onboarding/prompts/frontend/vue.md +2 -2
  65. package/onboarding/prompts/implementation/build-and-validate.md +27 -20
  66. package/onboarding/prompts/proof/complete.md +35 -19
  67. package/onboarding/prompts/proof/oss-baseline.md +5 -5
  68. package/onboarding/prompts/proof/round-trip.md +29 -20
  69. package/onboarding/prompts/research/gather.md +6 -6
  70. package/onboarding/prompts/research/merge.md +5 -4
  71. package/onboarding/prompts/research/preflight.md +15 -50
  72. package/onboarding/prompts/research/route.md +7 -6
  73. package/onboarding/prompts/starter/clone.md +8 -7
  74. package/onboarding/prompts/stopped/run-failed.md +4 -4
  75. package/onboarding/prompts/subagent/create-plan.md +19 -1
  76. package/onboarding/prompts/subagent/inspect-repository.md +18 -3
  77. package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
  78. package/onboarding/prompts/subagent/prove-round-trip.md +106 -62
  79. package/onboarding/prompts/unsupported/no-validated-path.md +4 -4
  80. package/package.json +1 -1
  81. package/release/release-tool.js +28 -5
@@ -1,5 +1,5 @@
1
1
  {
2
- "graphTree": "fa93f36f3c0d982c90097ddd1e4c056a286cd83a",
2
+ "graphTree": "4c64f2832f1df5d9057a64635cfed9d00ad98710",
3
3
  "intentRoots": {
4
4
  "add-a2ui": "feature/a2ui/start",
5
5
  "add-chat-suggestions": "feature/chat-suggestions/start",
@@ -13,18 +13,27 @@ does is hidden from the developer.
13
13
  ## Command approvals
14
14
 
15
15
  Run each CLI call exactly as written, as its own command: no pipe, `tee`, `&&`, redirect,
16
- or variable prefix. If your harness asks the developer to approve commands, request
17
- escalation on the `onboard identify` call with the prefix rule
18
- `["npx", "--prefer-offline", "--yes", "copilotkit@4.17.0"]`. Every CLI call in this run
19
- matches it. Say then that the install, the dev servers, `curl` to the local app, and `ps`,
20
- `lsof`, and `kill` ask for approval later.
16
+ or variable prefix. Every CLI call in this run matches the prefix rule
17
+ `["npx", "--prefer-offline", "--yes", "copilotkit@4.19.0"]`. If a command can request
18
+ escalation with a prefix rule, request this one on the `onboard identify` call. If your
19
+ harness asks the developer to approve commands, tell them one approval of that prefix covers
20
+ every CLI call. Say then that the install, the dev servers, `curl` to the local app, and
21
+ `ps`, `lsof`, and `kill` ask for approval later.
22
+
23
+ Never add or edit a permission rule or a settings file yourself. That choice belongs to
24
+ the developer.
25
+
26
+ If your harness refuses a CLI call without asking the developer, do not retry it or run it
27
+ another way. Name the refused command, ask the developer to approve it or to switch to a
28
+ mode that asks them, and end your turn. When they answer, run it once more.
29
+ That refusal is a pause, not a stop.
21
30
 
22
31
  ## First, say which coding agent you are
23
32
 
24
33
  Run this before anything else in this prompt, including the welcome message below:
25
34
 
26
35
  ```text
27
- npx --prefer-offline --yes copilotkit@4.17.0 onboard identify --coding-agent <coding-agent-slug> --model <model-id>
36
+ npx --prefer-offline --yes copilotkit@4.19.0 onboard identify --coding-agent <coding-agent-slug> --model <model-id>
28
37
  ```
29
38
 
30
39
  Report your own product with one short slug, such as `codex` or `claude-code`. For
@@ -33,14 +42,14 @@ Report your own product with one short slug, such as `codex` or `claude-code`. F
33
42
 
34
43
  ## How to run this onboarding
35
44
 
36
- Act only as the orchestrator. Rely on subagents for all project work.
45
+ Act only as the orchestrator.
37
46
  Give every project task to a subagent.
38
47
  Do not inspect, change, implement, or validate the project yourself.
39
48
  Prompt names, internal route IDs, subagent names and storage field names are this graph's
40
49
  own bookkeeping. Say what the run is doing in the developer's words instead.
41
50
 
42
- Work from the target project directory. For an existing project, start at its inspection
43
- root.
51
+ Work from the target project directory. When `onboard start` listed several projects, the
52
+ one the developer chose is that directory.
44
53
 
45
54
  The command that began this run printed a line reading `onboarding_run_id:` followed by an
46
55
  id. Keep that id for the whole run. Every later command reports against it, and it is
@@ -49,10 +58,10 @@ printed once.
49
58
  Every later command must run from the directory this run started in. A command run
50
59
  somewhere else is refused, because the run it belongs to cannot be found from there. That
51
60
  refusal is a step, not a stop to report: run
52
- `npx --prefer-offline --yes copilotkit@4.17.0 onboard start --run <onboarding_run_id>` where you are
61
+ `npx --prefer-offline --yes copilotkit@4.19.0 onboard start --run <onboarding_run_id>` where you are
53
62
  standing, then run the refused command again.
54
63
 
55
- If you no longer hold the id, run `npx --prefer-offline --yes copilotkit@4.17.0 onboard start` in the
64
+ If you no longer hold the id, run `npx --prefer-offline --yes copilotkit@4.19.0 onboard start` in the
56
65
  directory this run started in, with no `--run` and no `--intent`. It reprints the id of the
57
66
  run under way and starts nothing. An id this project does not already hold starts a second
58
67
  run, and the work already done stops counting toward the first.
@@ -115,12 +124,11 @@ record to the repository root by itself and prints where it put it.
115
124
  This run reports its own stops. If you stop this run at any point, send one short report
116
125
  before you stop. That covers a stop this prompt names, a stop a later prompt names, and a
117
126
  stop no prompt anticipated, including one your own harness causes. A turn that ends while
118
- the run waits is a pause, not a stop, even when your harness ends it. A terminal that
119
- sends the report itself, or says to file none, overrides this.
120
- Run the friction command without another developer question.
127
+ the run waits is a pause, not a stop, even when your harness ends it. A terminal that sends
128
+ the report itself, or says to file none, overrides this.
121
129
 
122
130
  ```text
123
- npx --prefer-offline --yes copilotkit@4.17.0 onboard friction --phase stop --category <slug> --message "<sentences>"
131
+ npx --prefer-offline --yes copilotkit@4.19.0 onboard friction --phase stop --category <slug> --message "<sentences>"
124
132
  ```
125
133
 
126
134
  `--message` takes one or two sentences: the step you stopped at and what stopped it.
@@ -135,7 +143,7 @@ rule that stopped you says next: send the report, then stop.
135
143
 
136
144
  ## Check sign-in
137
145
 
138
- Run `npx --prefer-offline --yes copilotkit@4.17.0 login --json` before any project work. This command
146
+ Run `npx --prefer-offline --yes copilotkit@4.19.0 login --json` before any project work. This command
139
147
  checks the current session. It starts sign-in only as needed. Treat this as a long-lived
140
148
  streaming process. Do not wait for the command to exit before you read its standard output.
141
149
 
@@ -163,27 +171,27 @@ Read each JSON Lines record as the running command writes it:
163
171
  - Windows PowerShell: `Start-Process "<authentication_url>"`
164
172
  Pass the exact URL as one quoted argument, unchanged.
165
173
  4. If the matching opener is unavailable or exits with an error, show the clickable URL to
166
- the developer and ask them to finish sign-in there. Show any `user_code` too. The page
167
- works from any device. Do not retry the opener.
174
+ the developer and ask them to finish sign-in there. Do not retry the opener.
168
175
  5. Keep monitoring the original login process after the open attempt. Do not start a
169
176
  second login command. Do not treat the opener command finishing as sign-in finishing.
170
177
  6. Continue onboarding only after that same process emits `type: completed`.
171
178
  7. On `type: failed` with `reason: expired`, ask once whether to retry. If yes, start one
172
179
  new `login --json`. Use `--force` only when the developer asks.
173
- 8. If that process emits `type: failed`, report the error and stop onboarding.
180
+ 8. If that process emits `type: failed`, report the error and stop onboarding. On
181
+ `reason: repeated_expiry`, rerun `login` with `--force` only if the developer asks.
174
182
 
175
183
  If your harness ends the login process or your turn before the process emits
176
184
  `type: completed` or `type: failed`, that is a pause, not a failed sign-in. If the process
177
185
  still runs, end your turn and wait for the developer to say they signed in, then read the
178
- same process. If the process ended, run `login --json` again and handle a new
179
- `authentication_url` as above. Step 5 forbids a second login only while the first one runs.
186
+ same process. If the process ended without emitting `type: failed`, run `login --json`
187
+ again and handle a new `authentication_url` as above. Step 5 forbids a second login only while the first one runs.
180
188
 
181
189
  Do not use `whoami` for this check. Do not put account tokens or credentials in the
182
190
  conversation.
183
191
 
184
192
  When sign-in is settled, run
185
- `npx --prefer-offline --yes copilotkit@4.17.0 onboard read research/gather`.
193
+ `npx --prefer-offline --yes copilotkit@4.19.0 onboard read research/gather`.
186
194
 
187
195
  If sign-in stops onboarding, run
188
- `npx --prefer-offline --yes copilotkit@4.17.0 onboard read stopped/run-failed`. It says nothing about
196
+ `npx --prefer-offline --yes copilotkit@4.19.0 onboard read stopped/run-failed`. It says nothing about
189
197
  whether this project's stack is supported, which is not yet known at this point.
@@ -100,7 +100,7 @@ of this journey, and a drawer that lists nothing is not a reason to mint one. Li
100
100
  tokens stay a self-hosted concern.
101
101
 
102
102
  Where this journey's frontend framework ships no threads drawer -- React Native --, the
103
- fifth item is proved by `npx --prefer-offline --yes copilotkit@4.17.0 verify --round-trip`, which sends a
103
+ fifth item is proved by `npx --prefer-offline --yes copilotkit@4.19.0 verify --round-trip`, which sends a
104
104
  real request and reads the answer back off the thread it landed on. The run says which of
105
105
  the two it proved. Do not send a run to the managed Intelligence dashboard to prove this.
106
106
  An authenticated browser session at a hosted dashboard is the one thing an agent-driven run
@@ -116,7 +116,7 @@ and passed -- so a run scored on either one was scored on the same fact. Every r
116
116
  resolves that condition from, while `licenseStatus` is a compatibility projection of it
117
117
  for older thread surfaces and outlives them only until those surfaces go.
118
118
 
119
- Then run `npx --prefer-offline --yes copilotkit@4.17.0 onboard read credentials/finalize-plan`.
119
+ Then run `npx --prefer-offline --yes copilotkit@4.19.0 onboard read credentials/finalize-plan`.
120
120
 
121
121
  If a selected page does not load after the second method, run
122
- `npx --prefer-offline --yes copilotkit@4.17.0 onboard read unsupported/no-validated-path`.
122
+ `npx --prefer-offline --yes copilotkit@4.19.0 onboard read unsupported/no-validated-path`.
@@ -1,241 +1,98 @@
1
1
  # Select the Intelligence project
2
2
 
3
3
  Use the selected framework, frontend, model vendor, model, documentation URLs, and
4
- repository findings. On a conversion these were read from the baseline rather than
5
- selected, and the conversion prompt recorded them: use those values and ask no framework
6
- or frontend question here. Ask the developer only for choices that the repository does not
7
- show. Do not change application code in this phase. Do not read, show, store, or request
8
- a secret value.
9
-
10
- Use a gentle wizard. Ask one short question at a time. End your turn and wait for each
11
- answer. Do not combine separate choices in one question. Put the recommendation first,
12
- give its evidence in one sentence, and keep the alternatives short. When project selection
13
- is unknown, ask only which project to use. Keep final plan approval a separate, later
14
- question.
15
-
16
- ## If you stop in this phase
17
-
18
- Several rules below stop onboarding: an environment path that cannot be made ignored, a
19
- project selection that reports a false field, a project record written somewhere other
20
- than the expected path, and a failed credential check. Each one ends a run that never got
21
- a plan. Name the exact file, value, or check that stopped you, not only the step. Send one
22
- short report before you stop. Run the friction command without another
23
- developer question. Do not ask the developer about telemetry: the command applies the
24
- setting they already have.
4
+ repository findings. On a conversion, use the values the conversion prompt recorded, and
5
+ ask no framework or frontend question. Do not change application code in this phase. Do
6
+ not read, show, store, or request a secret value.
25
7
 
26
- ```text
27
- npx --prefer-offline --yes copilotkit@4.17.0 onboard friction --phase stop --category <slug> --message "<sentences>"
28
- ```
29
-
30
- `--message` takes one or two sentences: the step you stopped at and what stopped it.
31
- Pick the category that fits from docs-missing, docs-wrong, docs-sequential, cli-gap,
32
- sdk-gap, environment, port-collision, credential, validation-loop, and other. Leave
33
- --cost-seconds off: a stopped run cannot separate one papercut's cost from the whole run's.
34
- Send no secrets, source code, logs, or command output. The command refuses a report that
35
- carries any of those, prints the reason, and exits zero. A refused report is not a failed
36
- step. Send the report, then stop the way the rule that stopped you says to. Reporting is
37
- not a route change and does not resume the run.
8
+ Ask one short question at a time, and end your turn to wait for each answer. Do not
9
+ combine separate choices in one question. Put the recommendation first, with its evidence
10
+ in one sentence. Keep plan approval a separate, later question.
38
11
 
39
12
  ## Record the audit cell
40
13
 
41
- Use the repository findings and selected choices to record the path before project work
42
- starts. Choose one starting state: empty, agent-only, frontend-only, both,
43
- both-copilotkit-unproved, both-oss.
14
+ Choose the starting state from the repository findings:
44
15
 
45
16
  - `empty`: no agent and no frontend.
46
17
  - `agent-only`: an agent and no frontend.
47
18
  - `frontend-only`: a frontend and no agent.
48
19
  - `both`: an agent and frontend with no CopilotKit integration.
49
- - `both-copilotkit-unproved`: an agent, a frontend and a CopilotKit integration whose
20
+ - `both-copilotkit-unproved`: an agent, a frontend, and a CopilotKit integration whose
50
21
  round trip did not prove.
51
22
  - `both-oss`: an agent and frontend with the proved OSS CopilotKit baseline.
52
23
 
53
- The last two are the states of a project that has CopilotKit, and the baseline proof
54
- decides which one is true. A run served `proof/oss-baseline` records one of them. The
55
- first four say that an agent, a frontend, or the CopilotKit integration is absent, and
56
- the command refuses one of them from a run that was served that node.
57
-
58
- Run this command with the exact selected slugs:
24
+ A run served `proof/oss-baseline` records one of the last two.
59
25
 
60
26
  ```text
61
- npx --prefer-offline --yes copilotkit@4.17.0 onboard classify --starting-state <starting-state> --agent-framework <agent-framework> --frontend <frontend>
27
+ npx --prefer-offline --yes copilotkit@4.19.0 onboard classify --starting-state <starting-state> --agent-framework <agent-framework> --frontend <frontend>
62
28
  ```
63
29
 
64
- Do not continue if a value is refused. Fix the value from the choices that the earlier
65
- prompts gave, then run the command again.
30
+ If a value is refused, fix it from the choices the earlier prompts gave, and run the
31
+ command again.
66
32
 
67
- ## Select the Intelligence project
33
+ ## Settle the project
68
34
 
69
- Use the target app or runtime directory from the repository findings. If a nested app owns
70
- the runtime `.env` file, do not default to the repository root.
71
- Set the environment path to `<target>/.env`.
72
-
73
- Every credential this run writes goes to the environment path. That covers the project
74
- key and the model credential, unless the framework node names another location for the
75
- model credential. Do not write a credential to `.env.local`, or to any second
76
- env file beside it. A project ignore file usually covers `.env` and not
77
- `.env.local`, so a credential written there is untracked, visible, and added by the first
78
- `git add -A`. And a second env file beside `.env` outranks it when a key is read back, so
79
- the value the run depends on is the one it did not write.
80
-
81
- ### Prove the environment path is ignored
82
-
83
- Do this before the first credential is written. Ask git whether it ignores the environment
84
- path, from the repository the path lives in:
35
+ Run every command below from the target app or runtime directory. If a nested app owns the
36
+ runtime `.env` file, that directory is the target, not the repository root. Do not send
37
+ the developer to another terminal.
85
38
 
86
39
  ```text
87
- git check-ignore -q <environment path>
40
+ npx --prefer-offline --yes copilotkit@4.19.0 onboard credentials --json
88
41
  ```
89
42
 
90
- Ask git rather than reading `.gitignore`. The answer also comes from a parent ignore file,
91
- a global excludes file, or a pattern the developer already has, and reading one file gets
92
- each of those wrong.
93
-
94
- Exit zero means git ignores the path and nothing more is needed. Exit one means git tracks
95
- the path, and the credential this run is about to write lands in the first commit. Add the
96
- missing pattern to the ignore file the developer already keeps, and list that edit in the
97
- plan with every other file change. Any other exit means there is no work tree here to
98
- protect. Say so once and carry on.
99
-
100
- If the path cannot be made ignored, stop onboarding and report it. Do not write the
101
- credential and leave the problem in the closing report. A developer who commits before
102
- reading the last screen has already published the token.
103
-
104
- If valid project fields and a non-empty `CPK_INTELLIGENCE_API_KEY` already exist, use this
105
- rule: Reuse that project without another question. Do not mint another key. The round-trip
106
- proof later runs the authenticated Intelligence checks. Record the reused project
107
- credentials as unverified in the plan until those checks pass.
108
- If you reuse a project, set the project-record path to the exact evidence path from the
109
- project research subagent.
110
-
111
- If the developer needs a project, do the work yourself from the target directory.
112
- Do not send the developer to another terminal.
113
-
114
- Project selection writes the environment path. It updates the nearest project record from
115
- the target through the repository root. If no project record exists there, it writes one at
116
- the repository root. If no repository exists, use the target. If the repository root is the
117
- home directory, use the target.
118
-
119
- Before project selection, derive the expected project-record path from the repository
120
- findings. Compare that path and the environment path with the paths the first capture
121
- printed as `protected`. Use the path-segment overlap rule. Ignore every path it printed as
122
- `deferred`. Those are the files project selection exists to write, so the environment path
123
- always overlaps one of them, and a run that stops on that overlap never reaches the step
124
- that provisions its key.
125
-
126
- If an output path overlaps a `protected` path, do not stop. Name the path, say what
127
- project selection writes there, list that file in the plan with every other change, and
128
- carry on. A `protected` path overlap does not end the run. Project selection provisions
129
- this project's key, so a stop here leaves the developer with no key and no way to finish.
130
-
131
- ### Create a project for this directory
132
-
133
- No project is bound to this directory, so creating a project for this directory is the
134
- default. Take the name from the directory that holds the expected project-record path.
135
-
136
- The CLI refuses a name that says nothing: a layer word from `project`, `app`, `apps`,
137
- `src`, `web`, `frontend`, `backend`, `server`, `packages`, `repo`, a scratch name such as
138
- `run-a`, `test-2`, or `tmp`, and anything under three characters. When the directory name
139
- is one of those, use the nearest enclosing directory whose name is not. Ask when no
140
- enclosing directory passes either: the parent of a scratch directory is usually another
141
- one, and a second derived guess collides with the first.
142
-
143
- Ask one question: confirm that name, give another, or ask to use a project they already
144
- have. Name that third answer, so a developer who has one is not asked to guess
145
- that it is available. Do not list the organization's projects as part of the question: a
146
- menu of projects is what bound one onboarding to another one's project, and a developer who
147
- wants theirs will say so. If they ask for an existing project, take the branch below.
148
-
149
- Do not combine this question with a frontend, framework, model, credential, or
150
- plan-approval question. If no developer answers, create with the derived name. Never select
151
- a project from a listing without an answer that names it. A project another run created
152
- minutes ago reads exactly like this directory's own, and every check after the selection
153
- passes against the wrong one.
154
-
155
- Create it, from the target directory, passing the port research settled:
43
+ Every credential this run writes goes to the target's `.env`, the environment path. The
44
+ one exception is a model credential whose framework node names another file. Never write a
45
+ credential to `.env.local` or a second env file beside `.env`: an ignore file often misses
46
+ it, and the app reads its value ahead of the one in `.env`.
156
47
 
157
- ```text
158
- npx --prefer-offline --yes copilotkit@4.17.0 project select --create <name> \
159
- --runtime-url http://localhost:<port>/api/copilotkit --json
160
- ```
48
+ Read `status`:
161
49
 
162
- `--runtime-url` is the only place the settled port is written down. Give the URL the
163
- application serves on, mount path included.
50
+ - `ready`: go to the last section.
51
+ - `needs-developer`: ask the question the next section describes.
52
+ - `stopped`: the command already filed the stop report. Tell the developer
53
+ `stopReason.detail` in one sentence, then stop onboarding.
164
54
 
165
- If the command fails as a duplicate, the organization already holds that display name and
166
- the refusal names the colliding slug. Do not select the colliding project. Ask whether that
167
- project is this app's. If no developer answers, run the command again with the next free
168
- `-2`, `-3` suffix on the name.
55
+ ### Ask the question
169
56
 
170
- ### Select an existing project instead
57
+ `project-name` means that no project is bound here, so creating a project for this
58
+ directory is the default. Ask one question: use `suggestedName`, give another name, or ask
59
+ to use a project they already have. When there is no `suggestedName`, ask for a name. Do
60
+ not list the organization's projects as part of the question. When `question.taken` is
61
+ present, an existing project already has that name. Do not select the colliding project
62
+ unless the developer says that it is this app's.
171
63
 
172
- Take this branch only when the developer asks for an existing project, or asks to see the
173
- projects they have. Read the choices:
64
+ If no developer answers, create with the derived name in `suggestedName`. Never select a
65
+ project from a listing without an answer that names it.
66
+
67
+ `--runtime-url` is the URL port research settled, mount path included:
174
68
 
175
69
  ```text
176
- npx --prefer-offline --yes copilotkit@4.17.0 project list --json
70
+ npx --prefer-offline --yes copilotkit@4.19.0 onboard credentials --create <name> \
71
+ --runtime-url http://localhost:<port>/api/copilotkit --json
72
+ npx --prefer-offline --yes copilotkit@4.19.0 onboard credentials --project <slug-or-id> \
73
+ --runtime-url http://localhost:<port>/api/copilotkit --json
177
74
  ```
178
75
 
179
- Narrow them:
76
+ When `question.notFound` is present, the organization has no project with that slug or
77
+ id. Search for it and ask which project the developer meant. Do not run either list
78
+ command unless the developer asks to see their projects, or `notFound` is present. Then
79
+ show only what they asked for, and do not order it by creation time:
180
80
 
181
81
  ```text
182
- npx --prefer-offline --yes copilotkit@4.17.0 project list --search <query> --json
82
+ npx --prefer-offline --yes copilotkit@4.19.0 project list --json
83
+ npx --prefer-offline --yes copilotkit@4.19.0 project list --search <query> --json
183
84
  ```
184
85
 
185
- With `--json` the payload is the only thing on standard output, so it is safe to parse. Do
186
- not run either list command unless the developer asks. Show what they asked for and nothing
187
- more. Do not order the projects by creation time: the newest project in the organization is
188
- the one another run created while this one was working, and it is the least likely to be
189
- this directory's.
86
+ `app-directory` means that the key landed where no app reads it. Pick the directory in
87
+ `question.apps` that runs the CopilotKit runtime. If the findings do not show it, ask. Run
88
+ the `--project` command from there with `project.slug`. Do not copy or link the key file.
190
89
 
191
- Then record the project they name, from the target directory, with the same
192
- `--runtime-url`:
90
+ ## Carry the result into the plan
193
91
 
194
- ```text
195
- npx --prefer-offline --yes copilotkit@4.17.0 project select --project <slug-or-id> \
196
- --runtime-url http://localhost:<port>/api/copilotkit --json
197
- ```
92
+ - `planChanges`: list each file in the plan. `"protected": true` marks an overlap with a
93
+ protected path. Name it in the plan. It does not end the run.
94
+ - `project.slug` is the selected project. `"key": "unverified"` means the project was
95
+ reused. The round-trip proof later runs the authenticated Intelligence checks, so record
96
+ the reused project credentials as unverified in the plan until those checks pass.
198
97
 
199
- The two flags cannot be combined. A slug that does not exist fails and lists the real ones,
200
- so a typo cannot record a selection that points at nothing.
201
-
202
- Read the JSON result. It reports `selected_project_slug`, `config_path`,
203
- `api_key_provisioned`, `project_file_written`, `environment_file_written`, and
204
- `environment_file` at the top level. The result does not contain a secret. Report
205
- `selected_project_slug` as the project slug that the server selected or created.
206
- Require `api_key_provisioned`, `project_file_written`, and `environment_file_written`
207
- to be true.
208
-
209
- A run that wrote the project record without a key exits 75 and reports `"type": "partial"`
210
- with a `retry_command`. That is the recoverable half: the record is kept, and the failure
211
- is usually transient. Run the `retry_command` once. If the retry also reports
212
- `api_key_provisioned` false, report the error and stop onboarding.
213
- A scaffold with no key looks finished and is not.
214
-
215
- After project selection, set the project-record path to the absolute `config_path` from the
216
- JSON result. If it differs from the expected project-record path, report both paths and stop
217
- onboarding.
218
-
219
- Never print the payload or any secret value.
220
-
221
- After project reuse or a warning-free selection result, send the environment
222
- research subagent a focused follow-up check. Give it the exact target app directory, both
223
- credential paths, and the `.env` modification time the inspection returned. Require it to
224
- report these facts without values:
225
-
226
- - The project-record path has non-empty `projectId` and `projectSlug` fields. Unless
227
- `COPILOTKIT_DEPLOYMENT` is `self-hosted`, it also has a non-empty `clerkOrgId` field.
228
- - The environment path has a non-empty `CPK_INTELLIGENCE_API_KEY` entry.
229
- - If project selection ran, its selected slug matches `projectSlug`.
230
- - If project selection ran, the `.env` file was created or its modification time advanced.
231
-
232
- Do not print either file or any secret value. If a check fails, stop onboarding. A project
233
- selection success message alone does not prove key readiness. The CLI cannot prove key scope
234
- before an authenticated Intelligence call succeeds.
235
-
236
- Continue only if the environment follow-up result starts with `Status: passed`. Retain the
237
- project-record path and environment path as the credential setup path list. Do not add them
238
- to the baseline yet.
239
-
240
- When project selection is settled, run
241
- `npx --prefer-offline --yes copilotkit@4.17.0 onboard read credentials/settle-credentials`.
98
+ Then run `npx --prefer-offline --yes copilotkit@4.19.0 onboard read credentials/settle-credentials`.
@@ -20,7 +20,33 @@ If the target directory holds no project and the copied prompt came from the Sla
20
20
  Microsoft Teams docs page, do not ask the framework question. The Channel starter brings
21
21
  its own agent, so an answer here decides nothing. Tell the developer that the Channel
22
22
  starter decides the agent, then run
23
- `npx --prefer-offline --yes copilotkit@4.17.0 onboard read frontend/plan`.
23
+ `npx --prefer-offline --yes copilotkit@4.19.0 onboard read frontend/plan`.
24
+
25
+ ## Frameworks this machine cannot run yet
26
+
27
+ The research findings carry the CLI's toolchain reading. Its `unready` list names each
28
+ framework that this machine cannot run until a toolchain is installed, and the toolchain
29
+ it needs. Read that list before you ask the framework question, so the developer learns
30
+ about a missing toolchain before they choose, and not after.
31
+
32
+ - Do not recommend a framework on that list.
33
+ - When you show a framework on that list, show it after the ready ones. In the same line,
34
+ name the toolchain it needs and its install page.
35
+ - Do not install a toolchain yourself.
36
+
37
+ If the developer chooses a framework on that list, or the repository already has an agent
38
+ in one, keep that framework. Before the run changes the project, tell the developer three
39
+ things in one message:
40
+
41
+ 1. Which toolchain to install, and its install page.
42
+ 2. That the coding agent's shell reads PATH when it starts, so it cannot see the new
43
+ toolchain until the developer restarts the coding agent.
44
+ 3. That the run resumes after the restart with
45
+ `npx --prefer-offline --yes copilotkit@4.19.0 onboard start --run <onboarding_run_id>`.
46
+
47
+ Then end your turn and wait for the developer. That restart is a step here, not an error.
48
+
49
+ ## Choose the framework
24
50
 
25
51
  Use a gentle wizard. Ask one short question at a time. Do not combine separate choices in
26
52
  one question. Put the recommendation first, give its evidence in one sentence, and keep
@@ -69,31 +95,32 @@ Python, Microsoft Agent Framework .NET, and Mastra. Explain which default matche
69
95
  developer's stated purpose. Show the other listed frameworks as options. Do not describe a
70
96
  documented default as a repository-based recommendation.
71
97
 
72
- Do not offer a framework that is not listed above. Do not port an existing agent to
73
- another framework. Do not show the internal route.
98
+ Do not offer a framework that is not listed above. Do not port an existing agent to another
99
+ framework. Route names are this graph's own bookkeeping. Say what the run is doing in the
100
+ developer's words instead.
74
101
 
75
102
  Use exactly one matching internal route:
76
103
 
77
- 1. AG2: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/ag2`
78
- 2. Agno: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/agno`
79
- 3. Built-in CopilotKit agent: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/built-in`
80
- 4. Claude Agent SDK Python: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/claude-sdk-python`
81
- 5. Claude Agent SDK TypeScript: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/claude-sdk-typescript`
82
- 6. CrewAI Flows: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/crewai-flows`
83
- 7. Deep Agents: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/deep-agents`
84
- 8. LangGraph Python: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/langgraph-python`
85
- 9. LangGraph FastAPI: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/langgraph-fastapi`
86
- 10. LangGraph TypeScript: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/langgraph-typescript`
87
- 11. LlamaIndex: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/llamaindex`
88
- 12. ADK: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/google-adk`
89
- 13. Microsoft Agent Framework Python: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/ms-agent-python`
90
- 14. Microsoft Agent Framework .NET: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/ms-agent-dotnet`
91
- 15. Mastra: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/mastra`
92
- 16. MS Agent Harness .NET: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/ms-agent-harness-dotnet`
93
- 17. Pydantic AI: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/pydantic-ai`
94
- 18. Strands Agents Python: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/strands-python`
95
- 19. Strands Agents TypeScript: `npx --prefer-offline --yes copilotkit@4.17.0 onboard read framework/strands-typescript`
104
+ 1. AG2: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/ag2`
105
+ 2. Agno: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/agno`
106
+ 3. Built-in CopilotKit agent: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/built-in`
107
+ 4. Claude Agent SDK Python: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/claude-sdk-python`
108
+ 5. Claude Agent SDK TypeScript: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/claude-sdk-typescript`
109
+ 6. CrewAI Flows: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/crewai-flows`
110
+ 7. Deep Agents: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/deep-agents`
111
+ 8. LangGraph Python: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/langgraph-python`
112
+ 9. LangGraph FastAPI: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/langgraph-fastapi`
113
+ 10. LangGraph TypeScript: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/langgraph-typescript`
114
+ 11. LlamaIndex: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/llamaindex`
115
+ 12. ADK: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/google-adk`
116
+ 13. Microsoft Agent Framework Python: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/ms-agent-python`
117
+ 14. Microsoft Agent Framework .NET: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/ms-agent-dotnet`
118
+ 15. Mastra: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/mastra`
119
+ 16. MS Agent Harness .NET: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/ms-agent-harness-dotnet`
120
+ 17. Pydantic AI: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/pydantic-ai`
121
+ 18. Strands Agents Python: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/strands-python`
122
+ 19. Strands Agents TypeScript: `npx --prefer-offline --yes copilotkit@4.19.0 onboard read framework/strands-typescript`
96
123
 
97
124
  If the project has an agent in another framework, or no listed framework fits, keep the
98
125
  developer's current agent and run
99
- `npx --prefer-offline --yes copilotkit@4.17.0 onboard read unsupported/no-validated-path`.
126
+ `npx --prefer-offline --yes copilotkit@4.19.0 onboard read unsupported/no-validated-path`.