copilotkit 4.16.0 → 4.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +195 -8
- package/cli-build-info.json +7 -7
- package/exporters/langgraph/README.md +118 -0
- package/exporters/langgraph/export_checkpointer.py +125 -0
- package/index.js +13890 -9434
- package/onboarding/index.json +1 -1
- package/onboarding/prompts/authenticate/start.md +24 -23
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +56 -199
- package/onboarding/prompts/credentials/plan.md +24 -23
- package/onboarding/prompts/credentials/settle-credentials.md +40 -177
- package/onboarding/prompts/credentials/write-plan.md +47 -23
- package/onboarding/prompts/fallback/best-effort.md +25 -17
- package/onboarding/prompts/feature/a2ui/implement.md +40 -12
- package/onboarding/prompts/feature/a2ui/proof.md +29 -9
- package/onboarding/prompts/feature/a2ui/start.md +54 -12
- package/onboarding/prompts/feature/blocked-by-plan.md +4 -4
- package/onboarding/prompts/feature/channels/implement.md +41 -13
- package/onboarding/prompts/feature/channels/proof.md +30 -11
- package/onboarding/prompts/feature/channels/start.md +54 -9
- package/onboarding/prompts/feature/chat-suggestions/implement.md +40 -12
- package/onboarding/prompts/feature/chat-suggestions/proof.md +29 -9
- package/onboarding/prompts/feature/chat-suggestions/start.md +51 -10
- package/onboarding/prompts/feature/complete.md +2 -2
- package/onboarding/prompts/feature/learning/implement.md +66 -29
- package/onboarding/prompts/feature/learning/proof.md +30 -10
- package/onboarding/prompts/feature/learning/start.md +46 -20
- package/onboarding/prompts/feature/open-generative-ui/implement.md +41 -13
- package/onboarding/prompts/feature/open-generative-ui/proof.md +29 -9
- package/onboarding/prompts/feature/open-generative-ui/start.md +51 -10
- package/onboarding/prompts/feature/realtime-sync/implement.md +41 -13
- package/onboarding/prompts/feature/realtime-sync/proof.md +31 -10
- package/onboarding/prompts/feature/realtime-sync/start.md +51 -9
- package/onboarding/prompts/feature/rich-threads/implement.md +42 -14
- package/onboarding/prompts/feature/rich-threads/proof.md +31 -10
- package/onboarding/prompts/feature/rich-threads/start.md +51 -9
- package/onboarding/prompts/feature/stop.md +5 -5
- package/onboarding/prompts/feature/voice/implement.md +40 -12
- package/onboarding/prompts/feature/voice/proof.md +29 -9
- package/onboarding/prompts/feature/voice/start.md +51 -9
- package/onboarding/prompts/framework/ag2.md +2 -2
- package/onboarding/prompts/framework/agno.md +4 -4
- package/onboarding/prompts/framework/built-in.md +2 -2
- package/onboarding/prompts/framework/claude-sdk-python.md +8 -7
- package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
- package/onboarding/prompts/framework/crewai-flows.md +15 -7
- package/onboarding/prompts/framework/deep-agents.md +4 -3
- package/onboarding/prompts/framework/google-adk.md +7 -7
- package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
- package/onboarding/prompts/framework/langgraph-python.md +2 -2
- package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
- package/onboarding/prompts/framework/llamaindex.md +4 -4
- package/onboarding/prompts/framework/mastra.md +2 -2
- package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
- package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
- package/onboarding/prompts/framework/ms-agent-python.md +6 -6
- package/onboarding/prompts/framework/pydantic-ai.md +2 -2
- package/onboarding/prompts/framework/strands-python.md +4 -4
- package/onboarding/prompts/framework/strands-typescript.md +4 -4
- package/onboarding/prompts/frontend/angular.md +3 -3
- package/onboarding/prompts/frontend/nextjs.md +16 -3
- package/onboarding/prompts/frontend/plan.md +9 -8
- package/onboarding/prompts/frontend/react-native.md +2 -2
- package/onboarding/prompts/frontend/react-spa.md +2 -2
- package/onboarding/prompts/frontend/vue.md +2 -2
- package/onboarding/prompts/implementation/build-and-validate.md +68 -30
- package/onboarding/prompts/proof/complete.md +24 -17
- package/onboarding/prompts/proof/oss-baseline.md +16 -12
- package/onboarding/prompts/proof/round-trip.md +39 -27
- package/onboarding/prompts/research/gather.md +8 -7
- package/onboarding/prompts/research/merge.md +3 -3
- package/onboarding/prompts/research/preflight.md +4 -4
- package/onboarding/prompts/research/route.md +6 -6
- package/onboarding/prompts/starter/clone.md +16 -12
- package/onboarding/prompts/stopped/run-failed.md +11 -11
- package/onboarding/prompts/subagent/create-plan.md +24 -10
- package/onboarding/prompts/subagent/implement-and-validate.md +25 -11
- package/onboarding/prompts/subagent/inspect-repository.md +21 -6
- package/onboarding/prompts/subagent/prove-oss-baseline.md +5 -4
- package/onboarding/prompts/subagent/prove-round-trip.md +77 -23
- package/onboarding/prompts/unsupported/no-validated-path.md +4 -4
- package/package.json +1 -5
- package/release/release-tool.js +189 -44
package/onboarding/index.json
CHANGED
|
@@ -15,7 +15,7 @@ does is hidden from the developer.
|
|
|
15
15
|
Run each CLI call exactly as written, as its own command: no pipe, `tee`, `&&`, redirect,
|
|
16
16
|
or variable prefix. If your harness asks the developer to approve commands, request
|
|
17
17
|
escalation on the `onboard identify` call with the prefix rule
|
|
18
|
-
`["npx", "--prefer-offline", "--yes", "copilotkit@4.
|
|
18
|
+
`["npx", "--prefer-offline", "--yes", "copilotkit@4.18.0"]`. Every CLI call in this run
|
|
19
19
|
matches it. Say then that the install, the dev servers, `curl` to the local app, and `ps`,
|
|
20
20
|
`lsof`, and `kill` ask for approval later.
|
|
21
21
|
|
|
@@ -24,21 +24,23 @@ matches it. Say then that the install, the dev servers, `curl` to the local app,
|
|
|
24
24
|
Run this before anything else in this prompt, including the welcome message below:
|
|
25
25
|
|
|
26
26
|
```text
|
|
27
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
27
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard identify --coding-agent <coding-agent-slug> --model <model-id>
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
Report your own product with one short slug, such as `codex` or `claude-code`.
|
|
30
|
+
Report your own product with one short slug, such as `codex` or `claude-code`. For
|
|
31
|
+
`--model`, give the exact model id your instructions name. If they name none, leave out
|
|
32
|
+
`--model` rather than guess.
|
|
31
33
|
|
|
32
34
|
## How to run this onboarding
|
|
33
35
|
|
|
34
|
-
Act only as the orchestrator.
|
|
36
|
+
Act only as the orchestrator.
|
|
35
37
|
Give every project task to a subagent.
|
|
36
38
|
Do not inspect, change, implement, or validate the project yourself.
|
|
37
39
|
Prompt names, internal route IDs, subagent names and storage field names are this graph's
|
|
38
40
|
own bookkeeping. Say what the run is doing in the developer's words instead.
|
|
39
41
|
|
|
40
|
-
Work from the target project directory.
|
|
41
|
-
|
|
42
|
+
Work from the target project directory. When `onboard start` listed several projects, the
|
|
43
|
+
one the developer chose is that directory.
|
|
42
44
|
|
|
43
45
|
The command that began this run printed a line reading `onboarding_run_id:` followed by an
|
|
44
46
|
id. Keep that id for the whole run. Every later command reports against it, and it is
|
|
@@ -47,10 +49,10 @@ printed once.
|
|
|
47
49
|
Every later command must run from the directory this run started in. A command run
|
|
48
50
|
somewhere else is refused, because the run it belongs to cannot be found from there. That
|
|
49
51
|
refusal is a step, not a stop to report: run
|
|
50
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
52
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard start --run <onboarding_run_id>` where you are
|
|
51
53
|
standing, then run the refused command again.
|
|
52
54
|
|
|
53
|
-
If you no longer hold the id, run `npx --prefer-offline --yes copilotkit@4.
|
|
55
|
+
If you no longer hold the id, run `npx --prefer-offline --yes copilotkit@4.18.0 onboard start` in the
|
|
54
56
|
directory this run started in, with no `--run` and no `--intent`. It reprints the id of the
|
|
55
57
|
run under way and starts nothing. An id this project does not already hold starts a second
|
|
56
58
|
run, and the work already done stops counting toward the first.
|
|
@@ -113,11 +115,11 @@ record to the repository root by itself and prints where it put it.
|
|
|
113
115
|
This run reports its own stops. If you stop this run at any point, send one short report
|
|
114
116
|
before you stop. That covers a stop this prompt names, a stop a later prompt names, and a
|
|
115
117
|
stop no prompt anticipated, including one your own harness causes. A turn that ends while
|
|
116
|
-
the run waits is a pause, not a stop, even when your harness ends it.
|
|
117
|
-
|
|
118
|
+
the run waits is a pause, not a stop, even when your harness ends it. A terminal that sends
|
|
119
|
+
the report itself, or says to file none, overrides this.
|
|
118
120
|
|
|
119
121
|
```text
|
|
120
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
122
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard friction --phase stop --category <slug> --message "<sentences>"
|
|
121
123
|
```
|
|
122
124
|
|
|
123
125
|
`--message` takes one or two sentences: the step you stopped at and what stopped it.
|
|
@@ -127,13 +129,12 @@ sdk-gap, environment, port-collision, credential, validation-loop, and other. Le
|
|
|
127
129
|
report that carries any of those, prints the reason, and exits zero. A refused report is
|
|
128
130
|
not a failed step. Reword it and send it again, or stop without a report.
|
|
129
131
|
|
|
130
|
-
Reporting a stop is not a route change. It does not resume the run
|
|
131
|
-
|
|
132
|
-
next: send the report, then stop.
|
|
132
|
+
Reporting a stop is not a route change. It does not resume the run or replace what the
|
|
133
|
+
rule that stopped you says next: send the report, then stop.
|
|
133
134
|
|
|
134
135
|
## Check sign-in
|
|
135
136
|
|
|
136
|
-
Run `npx --prefer-offline --yes copilotkit@4.
|
|
137
|
+
Run `npx --prefer-offline --yes copilotkit@4.18.0 login --json` before any project work. This command
|
|
137
138
|
checks the current session. It starts sign-in only as needed. Treat this as a long-lived
|
|
138
139
|
streaming process. Do not wait for the command to exit before you read its standard output.
|
|
139
140
|
|
|
@@ -161,27 +162,27 @@ Read each JSON Lines record as the running command writes it:
|
|
|
161
162
|
- Windows PowerShell: `Start-Process "<authentication_url>"`
|
|
162
163
|
Pass the exact URL as one quoted argument, unchanged.
|
|
163
164
|
4. If the matching opener is unavailable or exits with an error, show the clickable URL to
|
|
164
|
-
the developer and ask them to finish sign-in there.
|
|
165
|
-
works from any device. Do not retry the opener.
|
|
165
|
+
the developer and ask them to finish sign-in there. Do not retry the opener.
|
|
166
166
|
5. Keep monitoring the original login process after the open attempt. Do not start a
|
|
167
167
|
second login command. Do not treat the opener command finishing as sign-in finishing.
|
|
168
168
|
6. Continue onboarding only after that same process emits `type: completed`.
|
|
169
169
|
7. On `type: failed` with `reason: expired`, ask once whether to retry. If yes, start one
|
|
170
|
-
new `login --json`.
|
|
171
|
-
8. If that process emits `type: failed`, report the error and stop onboarding.
|
|
170
|
+
new `login --json`. Use `--force` only when the developer asks.
|
|
171
|
+
8. If that process emits `type: failed`, report the error and stop onboarding. On
|
|
172
|
+
`reason: repeated_expiry`, rerun `login` with `--force` only if the developer asks.
|
|
172
173
|
|
|
173
174
|
If your harness ends the login process or your turn before the process emits
|
|
174
175
|
`type: completed` or `type: failed`, that is a pause, not a failed sign-in. If the process
|
|
175
176
|
still runs, end your turn and wait for the developer to say they signed in, then read the
|
|
176
|
-
same process. If the process ended
|
|
177
|
-
`authentication_url` as above. Step 5 forbids a second login only while the first one runs.
|
|
177
|
+
same process. If the process ended without emitting `type: failed`, run `login --json`
|
|
178
|
+
again and handle a new `authentication_url` as above. Step 5 forbids a second login only while the first one runs.
|
|
178
179
|
|
|
179
180
|
Do not use `whoami` for this check. Do not put account tokens or credentials in the
|
|
180
181
|
conversation.
|
|
181
182
|
|
|
182
183
|
When sign-in is settled, run
|
|
183
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
184
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read research/gather`.
|
|
184
185
|
|
|
185
186
|
If sign-in stops onboarding, run
|
|
186
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
187
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read stopped/run-failed`. It says nothing about
|
|
187
188
|
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.
|
|
103
|
+
fifth item is proved by `npx --prefer-offline --yes copilotkit@4.18.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.
|
|
119
|
+
Then run `npx --prefer-offline --yes copilotkit@4.18.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.
|
|
122
|
+
`npx --prefer-offline --yes copilotkit@4.18.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
|
|
5
|
-
|
|
6
|
-
|
|
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: a refused classification value, a project selection
|
|
19
|
-
that reports a false field, a failed credential check, a model credential nobody can
|
|
20
|
-
place. Each one ends a run that reached project selection and never got a plan. Name the
|
|
21
|
-
exact file, value, or check that stopped you: a report that names only the step cannot be
|
|
22
|
-
acted on. Send one 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
|
-
|
|
27
|
-
|
|
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 run that stopped cannot separate one papercut's cost from the cost
|
|
34
|
-
of the whole run, so the estimate is optional on a stop report and only there.
|
|
35
|
-
Send no secrets, source code, logs, or command output. The command refuses a report that
|
|
36
|
-
carries any of those, prints the reason, and exits zero. A refused report is not a failed
|
|
37
|
-
step. Send the report, then stop the way the rule that stopped you says to. Reporting is
|
|
38
|
-
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.
|
|
39
11
|
|
|
40
12
|
## Record the audit cell
|
|
41
13
|
|
|
42
|
-
|
|
43
|
-
starts. Choose one starting state: empty, agent-only, frontend-only, both,
|
|
44
|
-
both-copilotkit-unproved, both-oss.
|
|
14
|
+
Choose the starting state from the repository findings:
|
|
45
15
|
|
|
46
16
|
- `empty`: no agent and no frontend.
|
|
47
17
|
- `agent-only`: an agent and no frontend.
|
|
48
18
|
- `frontend-only`: a frontend and no agent.
|
|
49
19
|
- `both`: an agent and frontend with no CopilotKit integration.
|
|
50
|
-
- `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
|
|
51
21
|
round trip did not prove.
|
|
52
22
|
- `both-oss`: an agent and frontend with the proved OSS CopilotKit baseline.
|
|
53
23
|
|
|
54
|
-
|
|
55
|
-
decides which one is true. A run served `proof/oss-baseline` records one of them. The
|
|
56
|
-
first four say that an agent, a frontend, or the CopilotKit integration is absent, and
|
|
57
|
-
the command refuses one of them from a run that was served that node.
|
|
58
|
-
|
|
59
|
-
Run this command with the exact selected slugs:
|
|
24
|
+
A run served `proof/oss-baseline` records one of the last two.
|
|
60
25
|
|
|
61
26
|
```text
|
|
62
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
27
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard classify --starting-state <starting-state> --agent-framework <agent-framework> --frontend <frontend>
|
|
63
28
|
```
|
|
64
29
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## Select the Intelligence project
|
|
69
|
-
|
|
70
|
-
Use the target app or runtime directory from the repository findings. If a nested app owns
|
|
71
|
-
the runtime `.env` file, do not default to the repository root.
|
|
72
|
-
Set the environment path to `<target>/.env`.
|
|
30
|
+
If a value is refused, fix it from the choices the earlier prompts gave, and run the
|
|
31
|
+
command again.
|
|
73
32
|
|
|
74
|
-
|
|
75
|
-
key and the 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.
|
|
33
|
+
## Settle the project
|
|
80
34
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
-
|
|
40
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard credentials --json
|
|
88
41
|
```
|
|
89
42
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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. Nothing before project selection ends the run. It is the step that provisions
|
|
129
|
-
this project's key, so a run that stops earlier leaves the developer with no key and no
|
|
130
|
-
way to finish.
|
|
131
|
-
|
|
132
|
-
### Create a project for this directory
|
|
133
|
-
|
|
134
|
-
No project is bound to this directory, so creating a project for this directory is the
|
|
135
|
-
default. Take the name from the directory that holds the expected project-record path.
|
|
136
|
-
|
|
137
|
-
The CLI refuses a name that says nothing: a layer word from `project`, `app`, `apps`,
|
|
138
|
-
`src`, `web`, `frontend`, `backend`, `server`, `packages`, `repo`, a scratch name such as
|
|
139
|
-
`run-a`, `test-2`, or `tmp`, and anything under three characters. When the directory name
|
|
140
|
-
is one of those, use the nearest enclosing directory whose name is not. Ask when no
|
|
141
|
-
enclosing directory passes either: the parent of a scratch directory is usually another
|
|
142
|
-
one, and a second derived guess collides with the first.
|
|
143
|
-
|
|
144
|
-
Ask one question: confirm that name, give another, or ask to use a project they already
|
|
145
|
-
have. Name that third answer, so a developer who has one is not asked to guess
|
|
146
|
-
that it is available. Do not list the organization's projects as part of the question: a
|
|
147
|
-
menu of projects is what bound one onboarding to another one's project, and a developer who
|
|
148
|
-
wants theirs will say so. If they ask for an existing project, take the branch below.
|
|
149
|
-
|
|
150
|
-
Do not combine this question with a frontend, framework, model, credential, or
|
|
151
|
-
plan-approval question. If no developer answers, create with the derived name. Never select
|
|
152
|
-
a project from a listing without an answer that names it. A project another run created
|
|
153
|
-
minutes ago reads exactly like this directory's own, and every check after the selection
|
|
154
|
-
passes against the wrong one.
|
|
155
|
-
|
|
156
|
-
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`.
|
|
157
47
|
|
|
158
|
-
|
|
159
|
-
npx --prefer-offline --yes copilotkit@4.16.0 project select --create <name> \
|
|
160
|
-
--runtime-url http://localhost:<port>/api/copilotkit --json
|
|
161
|
-
```
|
|
48
|
+
Read `status`:
|
|
162
49
|
|
|
163
|
-
|
|
164
|
-
|
|
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.
|
|
165
54
|
|
|
166
|
-
|
|
167
|
-
the refusal names the colliding slug. Do not select the colliding project. Ask whether that
|
|
168
|
-
project is this app's. If no developer answers, run the command again with the next free
|
|
169
|
-
`-2`, `-3` suffix on the name.
|
|
55
|
+
### Ask the question
|
|
170
56
|
|
|
171
|
-
|
|
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.
|
|
172
63
|
|
|
173
|
-
|
|
174
|
-
|
|
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.
|
|
175
66
|
|
|
176
|
-
|
|
177
|
-
npx --prefer-offline --yes copilotkit@4.16.0 project list --json
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
Narrow them:
|
|
67
|
+
`--runtime-url` is the URL port research settled, mount path included:
|
|
181
68
|
|
|
182
69
|
```text
|
|
183
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
70
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard credentials --create <name> \
|
|
71
|
+
--runtime-url http://localhost:<port>/api/copilotkit --json
|
|
72
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard credentials --project <slug-or-id> \
|
|
73
|
+
--runtime-url http://localhost:<port>/api/copilotkit --json
|
|
184
74
|
```
|
|
185
75
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
this directory's.
|
|
191
|
-
|
|
192
|
-
Then record the project they name, from the target directory, with the same
|
|
193
|
-
`--runtime-url`:
|
|
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:
|
|
194
80
|
|
|
195
81
|
```text
|
|
196
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
197
|
-
|
|
82
|
+
npx --prefer-offline --yes copilotkit@4.18.0 project list --json
|
|
83
|
+
npx --prefer-offline --yes copilotkit@4.18.0 project list --search <query> --json
|
|
198
84
|
```
|
|
199
85
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
Read the JSON result. It reports `selected_project_slug`, `config_path`,
|
|
204
|
-
`api_key_provisioned`, `project_file_written`, `environment_file_written`, and
|
|
205
|
-
`environment_file` at the top level. The result does not contain a secret. Report
|
|
206
|
-
`selected_project_slug` as the project slug that the server selected or created.
|
|
207
|
-
Require `api_key_provisioned`, `project_file_written`, and `environment_file_written`
|
|
208
|
-
to be true.
|
|
209
|
-
|
|
210
|
-
A run that wrote the project record without a key exits 75 and reports `"type": "partial"`
|
|
211
|
-
with a `retry_command`. That is the recoverable half: the record is kept, and the failure
|
|
212
|
-
is usually transient. Run the `retry_command` once. If the retry also reports
|
|
213
|
-
`api_key_provisioned` false, report the error and stop onboarding.
|
|
214
|
-
A scaffold with no key looks finished and is not.
|
|
215
|
-
|
|
216
|
-
After project selection, set the project-record path to the absolute `config_path` from the
|
|
217
|
-
JSON result. If it differs from the expected project-record path, report both paths and stop
|
|
218
|
-
onboarding.
|
|
219
|
-
|
|
220
|
-
Never print the payload or any secret value.
|
|
221
|
-
|
|
222
|
-
After project reuse or a warning-free selection result, send the environment
|
|
223
|
-
research subagent a focused follow-up check. Give it the exact target app directory and both
|
|
224
|
-
credential paths. Require it to 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.
|
|
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.
|
|
231
89
|
|
|
232
|
-
|
|
233
|
-
selection success message alone does not prove key readiness. The CLI cannot prove key scope
|
|
234
|
-
before an authenticated Intelligence call succeeds.
|
|
90
|
+
## Carry the result into the plan
|
|
235
91
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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.
|
|
239
97
|
|
|
240
|
-
|
|
241
|
-
`npx --prefer-offline --yes copilotkit@4.16.0 onboard read credentials/settle-credentials`.
|
|
98
|
+
Then run `npx --prefer-offline --yes copilotkit@4.18.0 onboard read credentials/settle-credentials`.
|
|
@@ -20,7 +20,7 @@ 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.
|
|
23
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read frontend/plan`.
|
|
24
24
|
|
|
25
25
|
Use a gentle wizard. Ask one short question at a time. Do not combine separate choices in
|
|
26
26
|
one question. Put the recommendation first, give its evidence in one sentence, and keep
|
|
@@ -69,31 +69,32 @@ Python, Microsoft Agent Framework .NET, and Mastra. Explain which default matche
|
|
|
69
69
|
developer's stated purpose. Show the other listed frameworks as options. Do not describe a
|
|
70
70
|
documented default as a repository-based recommendation.
|
|
71
71
|
|
|
72
|
-
Do not offer a framework that is not listed above. Do not port an existing agent to
|
|
73
|
-
|
|
72
|
+
Do not offer a framework that is not listed above. Do not port an existing agent to another
|
|
73
|
+
framework. Route names are this graph's own bookkeeping. Say what the run is doing in the
|
|
74
|
+
developer's words instead.
|
|
74
75
|
|
|
75
76
|
Use exactly one matching internal route:
|
|
76
77
|
|
|
77
|
-
1. AG2: `npx --prefer-offline --yes copilotkit@4.
|
|
78
|
-
2. Agno: `npx --prefer-offline --yes copilotkit@4.
|
|
79
|
-
3. Built-in CopilotKit agent: `npx --prefer-offline --yes copilotkit@4.
|
|
80
|
-
4. Claude Agent SDK Python: `npx --prefer-offline --yes copilotkit@4.
|
|
81
|
-
5. Claude Agent SDK TypeScript: `npx --prefer-offline --yes copilotkit@4.
|
|
82
|
-
6. CrewAI Flows: `npx --prefer-offline --yes copilotkit@4.
|
|
83
|
-
7. Deep Agents: `npx --prefer-offline --yes copilotkit@4.
|
|
84
|
-
8. LangGraph Python: `npx --prefer-offline --yes copilotkit@4.
|
|
85
|
-
9. LangGraph FastAPI: `npx --prefer-offline --yes copilotkit@4.
|
|
86
|
-
10. LangGraph TypeScript: `npx --prefer-offline --yes copilotkit@4.
|
|
87
|
-
11. LlamaIndex: `npx --prefer-offline --yes copilotkit@4.
|
|
88
|
-
12. ADK: `npx --prefer-offline --yes copilotkit@4.
|
|
89
|
-
13. Microsoft Agent Framework Python: `npx --prefer-offline --yes copilotkit@4.
|
|
90
|
-
14. Microsoft Agent Framework .NET: `npx --prefer-offline --yes copilotkit@4.
|
|
91
|
-
15. Mastra: `npx --prefer-offline --yes copilotkit@4.
|
|
92
|
-
16. MS Agent Harness .NET: `npx --prefer-offline --yes copilotkit@4.
|
|
93
|
-
17. Pydantic AI: `npx --prefer-offline --yes copilotkit@4.
|
|
94
|
-
18. Strands Agents Python: `npx --prefer-offline --yes copilotkit@4.
|
|
95
|
-
19. Strands Agents TypeScript: `npx --prefer-offline --yes copilotkit@4.
|
|
78
|
+
1. AG2: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/ag2`
|
|
79
|
+
2. Agno: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/agno`
|
|
80
|
+
3. Built-in CopilotKit agent: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/built-in`
|
|
81
|
+
4. Claude Agent SDK Python: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/claude-sdk-python`
|
|
82
|
+
5. Claude Agent SDK TypeScript: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/claude-sdk-typescript`
|
|
83
|
+
6. CrewAI Flows: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/crewai-flows`
|
|
84
|
+
7. Deep Agents: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/deep-agents`
|
|
85
|
+
8. LangGraph Python: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/langgraph-python`
|
|
86
|
+
9. LangGraph FastAPI: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/langgraph-fastapi`
|
|
87
|
+
10. LangGraph TypeScript: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/langgraph-typescript`
|
|
88
|
+
11. LlamaIndex: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/llamaindex`
|
|
89
|
+
12. ADK: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/google-adk`
|
|
90
|
+
13. Microsoft Agent Framework Python: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/ms-agent-python`
|
|
91
|
+
14. Microsoft Agent Framework .NET: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/ms-agent-dotnet`
|
|
92
|
+
15. Mastra: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/mastra`
|
|
93
|
+
16. MS Agent Harness .NET: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/ms-agent-harness-dotnet`
|
|
94
|
+
17. Pydantic AI: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/pydantic-ai`
|
|
95
|
+
18. Strands Agents Python: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/strands-python`
|
|
96
|
+
19. Strands Agents TypeScript: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read framework/strands-typescript`
|
|
96
97
|
|
|
97
98
|
If the project has an agent in another framework, or no listed framework fits, keep the
|
|
98
99
|
developer's current agent and run
|
|
99
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
100
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|