copilotkit 4.26.0 → 4.28.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 +418 -40
- package/cli-build-info.json +7 -7
- package/index.js +15343 -9085
- package/onboarding/index.json +3 -2
- package/onboarding/prompts/authenticate/start.md +48 -56
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +42 -29
- package/onboarding/prompts/credentials/plan.md +50 -34
- package/onboarding/prompts/credentials/settle-credentials.md +38 -14
- package/onboarding/prompts/credentials/write-plan.md +122 -47
- package/onboarding/prompts/deployment/choose-local.md +17 -20
- package/onboarding/prompts/deployment/local-evaluation.md +45 -21
- package/onboarding/prompts/fallback/best-effort.md +14 -16
- package/onboarding/prompts/feature/a2ui/implement.md +4 -4
- package/onboarding/prompts/feature/a2ui/plan.md +3 -3
- package/onboarding/prompts/feature/a2ui/proof.md +5 -5
- package/onboarding/prompts/feature/a2ui/start.md +10 -8
- package/onboarding/prompts/feature/channels/implement.md +11 -8
- package/onboarding/prompts/feature/channels/plan.md +15 -7
- package/onboarding/prompts/feature/channels/proof.md +8 -7
- package/onboarding/prompts/feature/channels/start.md +11 -10
- package/onboarding/prompts/feature/chat-suggestions/implement.md +4 -4
- package/onboarding/prompts/feature/chat-suggestions/plan.md +3 -3
- package/onboarding/prompts/feature/chat-suggestions/proof.md +5 -5
- package/onboarding/prompts/feature/chat-suggestions/start.md +10 -8
- package/onboarding/prompts/feature/complete.md +2 -2
- package/onboarding/prompts/feature/learning/implement.md +14 -12
- package/onboarding/prompts/feature/learning/plan.md +4 -4
- package/onboarding/prompts/feature/learning/proof.md +24 -14
- package/onboarding/prompts/feature/learning/start.md +8 -8
- package/onboarding/prompts/feature/open-generative-ui/implement.md +4 -4
- package/onboarding/prompts/feature/open-generative-ui/plan.md +3 -3
- package/onboarding/prompts/feature/open-generative-ui/proof.md +5 -5
- package/onboarding/prompts/feature/open-generative-ui/start.md +10 -8
- package/onboarding/prompts/feature/realtime-sync/implement.md +7 -5
- package/onboarding/prompts/feature/realtime-sync/plan.md +3 -3
- package/onboarding/prompts/feature/realtime-sync/proof.md +5 -5
- package/onboarding/prompts/feature/realtime-sync/start.md +7 -7
- package/onboarding/prompts/feature/rich-threads/implement.md +8 -6
- package/onboarding/prompts/feature/rich-threads/plan.md +3 -3
- package/onboarding/prompts/feature/rich-threads/proof.md +5 -5
- package/onboarding/prompts/feature/rich-threads/start.md +7 -7
- package/onboarding/prompts/feature/stop.md +4 -4
- package/onboarding/prompts/feature/voice/implement.md +4 -4
- package/onboarding/prompts/feature/voice/plan.md +4 -4
- package/onboarding/prompts/feature/voice/proof.md +5 -5
- package/onboarding/prompts/feature/voice/start.md +10 -8
- package/onboarding/prompts/framework/ag2.md +20 -5
- package/onboarding/prompts/framework/agno.md +25 -9
- package/onboarding/prompts/framework/built-in.md +21 -6
- package/onboarding/prompts/framework/claude-sdk-python.md +11 -5
- package/onboarding/prompts/framework/claude-sdk-typescript.md +13 -6
- package/onboarding/prompts/framework/crewai-flows.md +24 -10
- package/onboarding/prompts/framework/custom-ag-ui.md +62 -28
- package/onboarding/prompts/framework/deep-agents.md +26 -9
- package/onboarding/prompts/framework/google-adk.md +18 -5
- package/onboarding/prompts/framework/langgraph-fastapi.md +20 -5
- package/onboarding/prompts/framework/langgraph-python.md +20 -5
- package/onboarding/prompts/framework/langgraph-typescript.md +27 -7
- package/onboarding/prompts/framework/llamaindex.md +24 -8
- package/onboarding/prompts/framework/mastra.md +21 -8
- package/onboarding/prompts/framework/ms-agent-dotnet.md +24 -6
- package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +24 -5
- package/onboarding/prompts/framework/ms-agent-python.md +21 -5
- package/onboarding/prompts/framework/pydantic-ai.md +20 -5
- package/onboarding/prompts/framework/strands-python.md +27 -12
- package/onboarding/prompts/framework/strands-typescript.md +27 -12
- package/onboarding/prompts/frontend/angular.md +4 -4
- package/onboarding/prompts/frontend/nextjs.md +4 -4
- package/onboarding/prompts/frontend/plan.md +21 -13
- package/onboarding/prompts/frontend/react-native.md +3 -3
- package/onboarding/prompts/frontend/react-spa.md +3 -3
- package/onboarding/prompts/frontend/vue.md +3 -3
- package/onboarding/prompts/implementation/build-and-validate.md +27 -20
- package/onboarding/prompts/proof/complete.md +9 -7
- package/onboarding/prompts/proof/oss-baseline.md +9 -6
- package/onboarding/prompts/proof/round-trip.md +18 -20
- package/onboarding/prompts/research/gather.md +38 -10
- package/onboarding/prompts/research/merge.md +3 -3
- package/onboarding/prompts/research/preflight.md +2 -2
- package/onboarding/prompts/research/route.md +10 -4
- package/onboarding/prompts/setup/questions.md +54 -202
- package/onboarding/prompts/starter/clone.md +141 -57
- package/onboarding/prompts/stopped/run-failed.md +5 -3
- package/onboarding/prompts/subagent/create-plan.md +73 -22
- package/onboarding/prompts/subagent/implement-and-validate.md +27 -34
- package/onboarding/prompts/subagent/inspect-repository.md +3 -2
- package/onboarding/prompts/subagent/prove-oss-baseline.md +10 -5
- package/onboarding/prompts/subagent/prove-round-trip.md +46 -54
- package/onboarding/prompts/unsupported/no-validated-path.md +5 -4
- package/package.json +1 -1
- package/release/release-tool.js +19 -2
|
@@ -1,15 +1,17 @@
|
|
|
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.
|
|
4
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard read subagent/prove-round-trip` first and follow the
|
|
5
5
|
prompt it returns. Tell it to return at once, and say so, if that read is refused or fails,
|
|
6
6
|
and not to wait for an approval. If it returns that way, stop that subagent. Run the same
|
|
7
7
|
command yourself, then spawn a fresh subagent with the returned prompt and the same handoff.
|
|
8
8
|
Give it the selected framework, frontend, model, approved plan, selected documentation URLs,
|
|
9
9
|
and validation evidence. Give it the documentation policy recorded during framework
|
|
10
10
|
selection or conversion planning. On a conversion, also give it the frozen criterion. Give
|
|
11
|
-
it the paths that had uncommitted changes when the run started.
|
|
12
|
-
|
|
11
|
+
it the paths that had uncommitted changes when the run started.
|
|
12
|
+
|
|
13
|
+
When you start a subagent in the background, tell the developer in one sentence what it
|
|
14
|
+
does. Then send nothing more until it returns. This holds for a repair subagent too.
|
|
13
15
|
|
|
14
16
|
Give it the frontend files that publish the page context and register the tools, by path,
|
|
15
17
|
from the Files changed sections the implementation returned. The subagent sends what those
|
|
@@ -32,16 +34,13 @@ device control, and have it report `skipped-cloned-starter` rather than a missin
|
|
|
32
34
|
capability: nothing was unavailable, the run declined to spend it. That outcome completes
|
|
33
35
|
the run.
|
|
34
36
|
|
|
35
|
-
Give the subagent this guide for continued-development tools:
|
|
36
|
-
https://docs.copilotkit.ai/build-with-agents.md
|
|
37
|
-
|
|
38
37
|
Wait for the subagent to finish. Its result arrives as a notification. Do not sleep to
|
|
39
38
|
pass the time.
|
|
40
39
|
|
|
41
40
|
Record what that proof returned before you route on it:
|
|
42
41
|
|
|
43
42
|
```text
|
|
44
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
43
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
|
|
45
44
|
```
|
|
46
45
|
|
|
47
46
|
Report the gate whatever it returned. A proof that never ran is `skipped`, not failed. A
|
|
@@ -53,7 +52,7 @@ the next one starts. Until then, `onboard proof-check` counts the next failure a
|
|
|
53
52
|
If the CLI prints `## Stop: this run deleted or moved the developer's work` instead of a
|
|
54
53
|
step, show the developer the list it printed, and run what they choose:
|
|
55
54
|
the `onboard restore` command the tripwire stop prints, which names each deleted file, or
|
|
56
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
55
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard tripwire --continue`. Then read the step again. If
|
|
57
56
|
you cannot ask, use the route-out rules below.
|
|
58
57
|
|
|
59
58
|
Never repair, reset, or revert a file the developer changed outside this run. That holds for
|
|
@@ -66,16 +65,15 @@ This prompt pauses for the developer in several places. Before you end your turn
|
|
|
66
65
|
for the developer, report the pause:
|
|
67
66
|
|
|
68
67
|
```text
|
|
69
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
68
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard checkpoint --phase awaiting-developer
|
|
70
69
|
```
|
|
71
70
|
|
|
72
71
|
If the proof result starts with `Status: passed`, run
|
|
73
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
74
|
-
the full round trip is core success even if a continued-development tool fails. A skipped
|
|
72
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard read proof/complete`. A skipped
|
|
75
73
|
surface outcome still enters `proof/complete`. The CLI records `skipped-cloned-starter` and
|
|
76
74
|
`skipped-no-browser-tool` after a passed round trip as complete, and `skipped-no-device` as
|
|
77
75
|
blocked. Do not describe a
|
|
78
|
-
skipped surface as proved.
|
|
76
|
+
skipped surface as proved.
|
|
79
77
|
|
|
80
78
|
A passed result can carry the surface-check outcome `failed` with the cause
|
|
81
79
|
`browser-control-unresponsive`. It means that the browser tool stopped answering, not that
|
|
@@ -97,7 +95,7 @@ credentials step found the model key missing, or the vendor refused it, and the
|
|
|
97
95
|
started nothing. Do not send it to a repair worker. Run the `onboard credentials` command
|
|
98
96
|
that its detail names, and act on its answer as `credentials/settle-credentials` says. Ask
|
|
99
97
|
the developer its question, report the pause with
|
|
100
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
98
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard checkpoint --phase awaiting-model-credential`, and
|
|
101
99
|
end your turn. When the key settles, run the proof subagent again. If you have not recorded
|
|
102
100
|
this attempt yet, record it first, with the outcome it ended with. This attempt does not
|
|
103
101
|
count toward the three.
|
|
@@ -124,7 +122,7 @@ fault, so this is not a route-out. Ask the developer to send one message in the
|
|
|
124
122
|
thread, and to give you that thread's id. Give them the app URL and the request words from
|
|
125
123
|
the result. Tell them where the id is: in the browser's network tools, the request the page
|
|
126
124
|
sends to the runtime URL carries `threadId` in its body. Report the pause with
|
|
127
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
125
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard checkpoint --phase awaiting-developer` and end your
|
|
128
126
|
turn. When the developer gives the id, start a new proof subagent with
|
|
129
127
|
the full original proof handoff, the pinned Step 1 record, and the thread id. Tell it to run
|
|
130
128
|
the proof checks with `--thread <id>`. This attempt does not count toward the three. Use the
|
|
@@ -167,19 +165,19 @@ that returns blocked because the repair needs a file the plan does not name. Han
|
|
|
167
165
|
way `implementation/build-and-validate` does: pause and ask the developer, add the file to
|
|
168
166
|
the handoff if they allow it, and use the route-out rules below if they decline. Then spawn a
|
|
169
167
|
fresh repair worker with this repair handoff, not the whole-plan implementation handoff: the
|
|
170
|
-
plan, the proof evidence, the paths that had uncommitted changes when the run started,
|
|
171
|
-
files the developer allowed
|
|
168
|
+
plan, the proof evidence, the paths that had uncommitted changes when the run started, and
|
|
169
|
+
the files the developer allowed.
|
|
172
170
|
|
|
173
171
|
Before you end your turn to wait for the developer, report the pause:
|
|
174
172
|
|
|
175
173
|
```text
|
|
176
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
174
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard checkpoint --phase awaiting-developer
|
|
177
175
|
```
|
|
178
176
|
|
|
179
177
|
Restart each project-owned process changed by the repair. Then spawn a fresh proof subagent
|
|
180
178
|
with the full original proof handoff, failed proof evidence, and new validation evidence.
|
|
181
179
|
This handoff includes the plan, documentation, policy, current process IDs, ports,
|
|
182
|
-
surface-control state,
|
|
180
|
+
surface-control state, and the failed attempt's pinned Step 1
|
|
183
181
|
record. Carry that record so the second attempt sends the request the first one failed on.
|
|
184
182
|
A fresh subagent given the plan alone writes its own request where the plan named none, and
|
|
185
183
|
its grounding check then speaks about a question the failed attempt never asked.
|
|
@@ -191,7 +189,7 @@ takes the developer path above instead.
|
|
|
191
189
|
|
|
192
190
|
Route out only when the failure is not yours to fix, when the same proof still fails after
|
|
193
191
|
three attempts, or when no evidence of the round trip can be produced. In those cases run
|
|
194
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
192
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard read stopped/run-failed`. The stack is supported:
|
|
195
193
|
this run did not finish, which is a different ending and a different report. All three are
|
|
196
194
|
about the round trip itself. A round trip that proved is not one of them, whatever failed
|
|
197
195
|
after it.
|
|
@@ -202,7 +200,7 @@ friction command follows the telemetry setting the developer already chose, so i
|
|
|
202
200
|
separate question.
|
|
203
201
|
|
|
204
202
|
```text
|
|
205
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
203
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard friction --phase stop --category <slug> --message "<sentences>"
|
|
206
204
|
```
|
|
207
205
|
|
|
208
206
|
`--message` takes one or two sentences: the step you stopped at and what stopped it.
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
The developer can still be signing in. Keep reading the login process as
|
|
4
4
|
`authenticate/start` says while this phase runs. This phase inspects the project and proves
|
|
5
5
|
what this environment can drive. Do not change application code here, and do not ask the
|
|
6
|
-
developer a setup question yet: every read-only
|
|
6
|
+
developer a setup question yet, except the setup message below: every other read-only
|
|
7
|
+
investigation finishes first.
|
|
7
8
|
|
|
8
9
|
## Rules for the whole run
|
|
9
10
|
|
|
@@ -14,10 +15,10 @@ own bookkeeping. Say what the run is doing in the developer's words instead.
|
|
|
14
15
|
|
|
15
16
|
Every later command must run from the directory this run is bound to. Elsewhere, the
|
|
16
17
|
command cannot find its run and refuses. Do not report that refusal as a stop. Run
|
|
17
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
18
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard start --run <onboarding_run_id>` where you are
|
|
18
19
|
standing, then run the refused command again.
|
|
19
20
|
|
|
20
|
-
If you no longer hold the id, run `npx --prefer-offline --yes copilotkit@4.
|
|
21
|
+
If you no longer hold the id, run `npx --prefer-offline --yes copilotkit@4.28.0 onboard start` in the
|
|
21
22
|
directory this run started in, with no `--run` and no `--intent`. It reprints the id
|
|
22
23
|
and starts nothing. An id this project does not already hold starts a second
|
|
23
24
|
run, and the work already done stops counting toward the first.
|
|
@@ -82,7 +83,7 @@ When that thing arrives, continue. A pause waits for one of two things:
|
|
|
82
83
|
Before you end your turn to wait for the developer, report the pause:
|
|
83
84
|
|
|
84
85
|
```text
|
|
85
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
86
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard checkpoint --phase awaiting-developer
|
|
86
87
|
```
|
|
87
88
|
|
|
88
89
|
When the answer or the result arrives, continue from the step that paused. Do not read an
|
|
@@ -102,7 +103,7 @@ Both research subagents failing means this harness has no working subagent at al
|
|
|
102
103
|
is worth recording once:
|
|
103
104
|
|
|
104
105
|
```text
|
|
105
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
106
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard checkpoint --phase delegation-unavailable
|
|
106
107
|
```
|
|
107
108
|
|
|
108
109
|
Then say once, in your own words, that this environment has no working subagents. Say that
|
|
@@ -112,14 +113,14 @@ For the rest of this run, do not spawn a subagent where a prompt tells you to. R
|
|
|
112
113
|
`subagent/` brief yourself and follow it.
|
|
113
114
|
|
|
114
115
|
Before you ask the developer any setup question, finish every read-only investigation and
|
|
115
|
-
preflight check in this section.
|
|
116
|
+
preflight check in this section. The setup message below is the one exception.
|
|
116
117
|
|
|
117
118
|
Prepare two research assignments. Before you spawn either subagent, run these two
|
|
118
119
|
read-only commands yourself, from the target project directory:
|
|
119
120
|
|
|
120
121
|
```text
|
|
121
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
122
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
122
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard read subagent/inspect-repository
|
|
123
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard inspect --json
|
|
123
124
|
```
|
|
124
125
|
|
|
125
126
|
Give each research subagent the prompt that the first command returns, the whole JSON that
|
|
@@ -137,11 +138,38 @@ Start both research subagents in parallel:
|
|
|
137
138
|
2. Spawn a second research subagent. Assign it the environment evidence packet.
|
|
138
139
|
3. Start both research subagents. Then continue.
|
|
139
140
|
|
|
141
|
+
## Show the setup message while the research runs
|
|
142
|
+
|
|
143
|
+
For some folders the setup message needs nothing that the research finds. Then the
|
|
144
|
+
developer reads it while the research runs. That is the case when the developer's request
|
|
145
|
+
names no Channel (as `research/route` lists), and the `onboard inspect` JSON shows one of:
|
|
146
|
+
|
|
147
|
+
- `appDiscovery.reason` is `no-project`: the folder holds no project.
|
|
148
|
+
- A frontend and no agent: `detection.frontend` has a `match`, and
|
|
149
|
+
`detection.agentFramework` has an empty `matched` and an empty `unmatched`.
|
|
150
|
+
|
|
151
|
+
Once `login --json` has emitted `type: completed`, read the setup questions now:
|
|
152
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard read setup/questions`. Record the frontend from
|
|
153
|
+
`detection` first.
|
|
154
|
+
Show the message. Before you end your turn to wait for the developer, report the pause:
|
|
155
|
+
|
|
156
|
+
```text
|
|
157
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard checkpoint --phase awaiting-developer
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Then continue below: the preflight and the merge do not wait for the reply. When the
|
|
161
|
+
developer replies, record the reply as that prompt says. If `research/route` sends you back
|
|
162
|
+
to the setup questions before the developer replied, do not show the message again: the
|
|
163
|
+
pause above still holds.
|
|
164
|
+
|
|
165
|
+
In any other folder, such as one with an agent, the research can change the message. Keep
|
|
166
|
+
the research first.
|
|
167
|
+
|
|
140
168
|
The research is under way. Continue to the surface-control preflight while it runs:
|
|
141
169
|
|
|
142
170
|
```text
|
|
143
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
171
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard read research/preflight
|
|
144
172
|
```
|
|
145
173
|
|
|
146
174
|
If inspection stops onboarding, run
|
|
147
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
175
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard read stopped/run-failed`.
|
|
@@ -51,11 +51,11 @@ waits on the developer, end your turn and wait for it: that is a pause.
|
|
|
51
51
|
Before you end your turn to wait for the developer, report the pause:
|
|
52
52
|
|
|
53
53
|
```text
|
|
54
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
54
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard checkpoint --phase awaiting-developer
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
When both research results are merged and sign-in is done, run
|
|
58
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
58
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard read research/route`.
|
|
59
59
|
|
|
60
60
|
If inspection stops onboarding, run
|
|
61
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
61
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard read stopped/run-failed`.
|
|
@@ -32,8 +32,8 @@ Where the device probe found no booted device, that is the whole finding.
|
|
|
32
32
|
Then merge the research:
|
|
33
33
|
|
|
34
34
|
```text
|
|
35
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
35
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard read research/merge
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
If inspection stops onboarding, run
|
|
39
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
39
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard read stopped/run-failed`.
|
|
@@ -21,7 +21,7 @@ On any one of them, run this before you read the three findings below, and witho
|
|
|
21
21
|
the purpose question:
|
|
22
22
|
|
|
23
23
|
```text
|
|
24
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
24
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard read feature/channels/start
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Name the provider to that node so it does not ask again. A `/slack` page names Slack. A
|
|
@@ -82,7 +82,7 @@ settle these three from your own reading of the project. Each one comes from the
|
|
|
82
82
|
packets or it is not proved.
|
|
83
83
|
|
|
84
84
|
If all three are proved, prove the live starting state before any project file changes. Run
|
|
85
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
85
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard read proof/oss-baseline`.
|
|
86
86
|
|
|
87
87
|
Route there before any other question to the developer. The questions after this prompt
|
|
88
88
|
select a framework and a frontend that the findings already name, so a developer who
|
|
@@ -91,10 +91,16 @@ application is what that node protects. Whether it works is what the proof decid
|
|
|
91
91
|
these three findings.
|
|
92
92
|
|
|
93
93
|
For every other combination of the three, run
|
|
94
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
94
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard read setup/questions`. That node asks every
|
|
95
95
|
remaining setup question in one message, including what the project is for when nothing
|
|
96
96
|
proves it.
|
|
97
97
|
|
|
98
|
+
On a blank folder the setup message can go out before the research ends. If the setup
|
|
99
|
+
message is already out and the developer has not replied, record what the findings settle
|
|
100
|
+
with `onboard setup-answers`, then end your turn and send the developer nothing. Report
|
|
101
|
+
the pause with `onboard checkpoint --phase awaiting-developer` first. Do not remind them,
|
|
102
|
+
and do not restate the setup. Their reply continues the run.
|
|
103
|
+
|
|
98
104
|
If authentication or inspection stops onboarding, run
|
|
99
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
105
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard read stopped/run-failed`. Neither says anything
|
|
100
106
|
about whether this project's stack is supported, which is not yet known at this point.
|
|
@@ -1,213 +1,65 @@
|
|
|
1
1
|
# Ask the setup questions together
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
it
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
question first. Leave out a line whose answer is settled. Do not ask about the plan
|
|
40
|
-
here.
|
|
41
|
-
|
|
42
|
-
**Line 1: what the project is for.**
|
|
43
|
-
|
|
44
|
-
If neither the developer nor the repository findings prove what the project is for, ask
|
|
45
|
-
this line. It asks what the developer wants to build before the framework is chosen.
|
|
46
|
-
Give two or three short examples.
|
|
47
|
-
|
|
48
|
-
Do not ask it when the target directory holds no project. The frontend they pick decides
|
|
49
|
-
whether a starter exists. Next.js and Angular have starters for some agent frameworks.
|
|
50
|
-
React SPA, Vue 3 and React Native have no starter, so the project is built from their
|
|
51
|
-
documentation. Slack and Microsoft Teams are choices at that step. A purpose question here
|
|
52
|
-
names a domain before that choice.
|
|
53
|
-
|
|
54
|
-
**Line 2: the agent framework.**
|
|
55
|
-
|
|
56
|
-
If the project has no agent, ask this line. Show the options and one
|
|
57
|
-
recommendation based on repository evidence. Match the language the repository already
|
|
58
|
-
uses. When the framework is unknown, give it one line that lists the recommendation and
|
|
59
|
-
valid choices.
|
|
60
|
-
|
|
61
|
-
If the project is empty, state that no repository-based recommendation exists. Give these
|
|
62
|
-
documented defaults: LangGraph TypeScript, LangGraph Python, ADK, Microsoft Agent Framework
|
|
63
|
-
Python, Microsoft Agent Framework .NET, and Mastra. Explain which default matches the
|
|
64
|
-
developer's stated purpose. Show the other listed frameworks as options. Do not describe a
|
|
65
|
-
documented default as a repository-based recommendation.
|
|
66
|
-
|
|
67
|
-
These are the agent frameworks, their default vendors, and the vendors that this run can
|
|
68
|
-
set up for a new agent. Each documented vendor has a credential variable and setup steps on
|
|
69
|
-
the framework's CopilotKit pages:
|
|
70
|
-
|
|
71
|
-
| Framework | Default vendor | Documented vendors |
|
|
72
|
-
| ---------------------------------- | --------------- | ------------------------- |
|
|
73
|
-
| AG2 | OpenAI | OpenAI |
|
|
74
|
-
| ADK | Google | Google |
|
|
75
|
-
| Agno | OpenAI | OpenAI |
|
|
76
|
-
| Built-in CopilotKit agent | OpenAI | OpenAI, Anthropic, Google |
|
|
77
|
-
| Claude Agent SDK (Python) | Anthropic | Anthropic |
|
|
78
|
-
| Claude Agent SDK (TypeScript) | Anthropic | Anthropic |
|
|
79
|
-
| CrewAI Flows | Project-defined | |
|
|
80
|
-
| Existing AG-UI agent | The agent's own | |
|
|
81
|
-
| Deep Agents | OpenAI | OpenAI |
|
|
82
|
-
| LangGraph FastAPI | OpenAI | OpenAI |
|
|
83
|
-
| LangGraph Python | OpenAI | OpenAI |
|
|
84
|
-
| LangGraph TypeScript | OpenAI | OpenAI |
|
|
85
|
-
| LlamaIndex | OpenAI | OpenAI |
|
|
86
|
-
| Mastra | OpenAI | OpenAI, Anthropic |
|
|
87
|
-
| Microsoft Agent Framework (.NET) | OpenAI | OpenAI |
|
|
88
|
-
| Microsoft Agent Framework (Python) | OpenAI | OpenAI |
|
|
89
|
-
| MS Agent Harness (.NET) | OpenAI | OpenAI |
|
|
90
|
-
| Pydantic AI | OpenAI | OpenAI |
|
|
91
|
-
| Strands Agents (Python) | OpenAI | OpenAI, Anthropic |
|
|
92
|
-
| Strands Agents (TypeScript) | OpenAI | OpenAI, Anthropic |
|
|
93
|
-
|
|
94
|
-
"Project-defined" is not a missing default. It means that framework's own route settles
|
|
95
|
-
the vendor with the developer: it keeps the one the repository already uses, and asks a
|
|
96
|
-
single question when the repository shows none.
|
|
97
|
-
|
|
98
|
-
"The agent's own" means that the route keeps the vendor the existing agent already uses.
|
|
99
|
-
Ask no vendor question for it.
|
|
100
|
-
|
|
101
|
-
Do not offer a framework that is not listed above. Do not port an existing agent to another
|
|
102
|
-
framework.
|
|
103
|
-
|
|
104
|
-
**Line 3: the model and its key.**
|
|
105
|
-
|
|
106
|
-
Settle the vendor and where its key is here: without a key from that vendor, the developer
|
|
107
|
-
cannot answer the later key question.
|
|
108
|
-
|
|
109
|
-
For a new agent, ask this line, even if the framework needed no question. Skip it for an
|
|
110
|
-
existing agent, and when the default vendor is "Project-defined" or "The agent's own":
|
|
111
|
-
those routes settle the vendor themselves. Recommend the row's default vendor and, in the
|
|
112
|
-
same sentence, ask where its key is: a file, or that they will add it later. When the row
|
|
113
|
-
documents more than one vendor, name the others. Offer no vendor the row does not name. For
|
|
114
|
-
example, for the built-in agent: "Model: OpenAI, with the key in a file outside this folder,
|
|
115
|
-
or 'later'. Anthropic and Google work too." Never ask for the key itself.
|
|
116
|
-
|
|
117
|
-
With no file named, record that they will add it later. A path the developer names is
|
|
118
|
-
theirs to give, including one outside the project. Recommend the project's env file when it
|
|
119
|
-
exists, git ignores and does not track it, and it already holds the key. Otherwise recommend
|
|
120
|
-
a file outside the project, or "later". Never recommend an env file in the project while an
|
|
121
|
-
`env-file-exposed` line is open, or when git tracks it or does not ignore it. For an empty
|
|
122
|
-
target, a new key file goes outside the target directory, because `init` refuses a target
|
|
123
|
-
that holds a `.env` file. Tell the developer only where the file goes, not that reason.
|
|
124
|
-
|
|
125
|
-
**Line 4: the frontend.**
|
|
126
|
-
|
|
127
|
-
If the project has no frontend, ask this line. The valid choices are React SPA,
|
|
128
|
-
Next.js, Angular, Vue 3, React Native, Slack, and Microsoft Teams.
|
|
129
|
-
|
|
130
|
-
Where there is no existing frontend, include Slack and Microsoft Teams in the frontend
|
|
131
|
-
question. Then recommend the one the developer
|
|
132
|
-
names, and say what each choice implies for where the CopilotKit runtime lives: Next.js
|
|
133
|
-
hosts it in a route handler, Angular in its SSR server, and Vue 3, React SPA and React
|
|
134
|
-
Native reach a runtime that runs as its own process. Slack and Microsoft Teams use a
|
|
135
|
-
long-running Channel host, not a CopilotKit web app.
|
|
136
|
-
|
|
137
|
-
**Line 5: the project.** Leave out the project line on the local route: local evaluation
|
|
138
|
-
creates its own project. For an existing app, first
|
|
139
|
-
run `npx --prefer-offline --yes copilotkit@4.26.0 onboard credentials --json` from the target app directory.
|
|
140
|
-
It only reads: it creates no project and writes no file. Read `status`:
|
|
141
|
-
|
|
142
|
-
- `ready`: the app already has a project. Leave the line out.
|
|
143
|
-
- `needs-developer` with `project-name`: offer `suggestedName`, another name, or a project
|
|
144
|
-
the developer already has. If there is no `suggestedName`, ask for a name. Do not list
|
|
145
|
-
the organization's projects.
|
|
146
|
-
- `needs-developer` with `env-file-exposed`: git tracks the env file the key goes into, or
|
|
147
|
-
does not ignore it. Add `question.ask` as its own line, word for word: never shorten it or
|
|
148
|
-
drop what it says about teammates. When
|
|
149
|
-
`question.untrack` is absent, recommend approving it: without it, the run writes no key. A
|
|
150
|
-
reply that accepts every recommendation approves it. When `question.untrack` is present,
|
|
151
|
-
git tracks the file. If `question.alternative` is present, recommend it: the key goes into
|
|
152
|
-
`question.alternative.file`, which affects no teammate, and a reply that accepts every
|
|
153
|
-
recommendation takes it. Without `question.alternative`, recommend nothing for this line.
|
|
154
|
-
Untracking removes the file for everyone who pulls the next commit, so only an answer to
|
|
155
|
-
this line approves it. A reply that accepts every recommendation never approves the
|
|
156
|
-
untrack. Never suggest a reply that approves it. Then offer a new project for this app, or
|
|
157
|
-
a project the developer already has.
|
|
158
|
-
- `stopped`: the command already filed the stop report. Tell the developer
|
|
159
|
-
`stopReason.detail` in one sentence, then stop onboarding.
|
|
160
|
-
|
|
161
|
-
For an empty target, offer a new project named after the target directory, or a project the
|
|
162
|
-
developer already has.
|
|
163
|
-
|
|
164
|
-
Before you end your turn to wait for the developer, report the pause:
|
|
3
|
+
Do not change application code in this phase. Do not read, show, store, or request a secret value.
|
|
4
|
+
Never ask for the key itself: the message asks only for the file that holds it.
|
|
5
|
+
|
|
6
|
+
## Record what the findings already answer
|
|
7
|
+
|
|
8
|
+
Do not ask the developer for a fact that the repository or their request answers. Record
|
|
9
|
+
each one with `npx --prefer-offline --yes copilotkit@4.28.0 onboard setup-answers` before you build the
|
|
10
|
+
message, so the message leaves it out:
|
|
11
|
+
|
|
12
|
+
- An agent the project already has: `--framework <name>` with its vendor and the choice
|
|
13
|
+
`existing`: `--vendor <vendor> --vendor-choice existing`, or `--vendor other
|
|
14
|
+
--vendor-choice existing` if you cannot tell the vendor. An
|
|
15
|
+
agent in no framework the CLI names takes the Custom agent route: add
|
|
16
|
+
`--custom-framework`. It keeps the agent and connects it through AG-UI.
|
|
17
|
+
- A frontend the project already has: `--frontend <name>`.
|
|
18
|
+
- What the project is for, when the request or the repository shows it: `--purpose <text>`.
|
|
19
|
+
- A choice the developer named in their request or a later reply, and a framework the
|
|
20
|
+
project's README names, even in an otherwise empty target: the matching flag. For a
|
|
21
|
+
framework, add `--framework-choice developer`. A vendor the developer named goes on the
|
|
22
|
+
command below as `--vendor`, not here.
|
|
23
|
+
- For a project with no agent, you can infer the language's usual framework. Record it
|
|
24
|
+
without `--framework-choice`, and the CLI keeps it as a default the developer can change.
|
|
25
|
+
- A key file the developer named: `--key-file <path>`. Record the project's env file only
|
|
26
|
+
when it exists, holds the key, and git ignores it and does not track it.
|
|
27
|
+
|
|
28
|
+
## Build the message
|
|
29
|
+
|
|
30
|
+
For an existing app on the managed route, the command reads the app's project itself, so its
|
|
31
|
+
env-file and project lines are in the same message as the key. That read creates no project
|
|
32
|
+
and writes no file. If the command prints `status: stopped`, do what its `next` says.
|
|
33
|
+
|
|
34
|
+
On the local route, first run `npx --prefer-offline --yes copilotkit@4.28.0 onboard local-terms --json`.
|
|
35
|
+
If it reports `signed-out` or `unavailable`, follow its `next`. Do not add its
|
|
36
|
+
`question.ask` yourself: the setup message already carries the agreement line.
|
|
37
|
+
|
|
38
|
+
From the target app directory, run:
|
|
165
39
|
|
|
166
40
|
```text
|
|
167
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
41
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard setup-message --target <empty|existing> [--language <typescript|python|dotnet>] [--vendor <vendor>]
|
|
168
42
|
```
|
|
169
43
|
|
|
170
|
-
|
|
44
|
+
- `--target empty` for a target with no project yet, `existing` for one with a project.
|
|
45
|
+
- `--language` is the project's language, for a project with no agent.
|
|
46
|
+
- `--vendor` is a model vendor the developer named, as `openai`, `anthropic`, `google`, or
|
|
47
|
+
`openai-compatible`.
|
|
171
48
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
recommendation.
|
|
177
|
-
|
|
178
|
-
If a changed line makes another answer invalid, ask again, in one message:
|
|
179
|
-
|
|
180
|
-
- A vendor that the chosen framework's row does not name: tell the developer that this run
|
|
181
|
-
cannot set up that vendor for a new agent with this framework. Offer two choices. They
|
|
182
|
-
can keep the framework with its default vendor, or choose a framework whose row names
|
|
183
|
-
their vendor.
|
|
184
|
-
- Slack or Microsoft Teams as the frontend of an empty project: the Channel starter brings
|
|
185
|
-
its own agent, so the framework and provider lines decide nothing. Drop them.
|
|
186
|
-
|
|
187
|
-
If the developer chooses a framework on the `unready` list, or the repository already has
|
|
188
|
-
an agent in one, keep that framework. Before the run changes the project, tell the
|
|
189
|
-
developer three things in one message:
|
|
190
|
-
|
|
191
|
-
1. Which toolchain to install, and its install page.
|
|
192
|
-
2. That the coding agent's shell reads PATH when it starts, so it cannot see the new
|
|
193
|
-
toolchain until the developer restarts the coding agent.
|
|
194
|
-
3. That the run resumes after the restart with
|
|
195
|
-
`npx --prefer-offline --yes copilotkit@4.26.0 onboard start --run <onboarding_run_id>`.
|
|
196
|
-
|
|
197
|
-
Before you end your turn to wait for the developer, report the pause:
|
|
49
|
+
Then do what its `next` says. With no `message`, as for `settled` or `needs-credentials`,
|
|
50
|
+
ask the developer nothing and go on as `next` says. When it prints a `message`, write it in
|
|
51
|
+
your own reply word for word. The developer does not see your tool output. Before it you can
|
|
52
|
+
put the one short line `next` names, and add nothing else. Before you end your turn to wait for the developer, report the pause:
|
|
198
53
|
|
|
199
54
|
```text
|
|
200
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
55
|
+
npx --prefer-offline --yes copilotkit@4.28.0 onboard checkpoint --phase awaiting-developer
|
|
201
56
|
```
|
|
202
57
|
|
|
203
|
-
Then end your turn and wait for the developer.
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
for the rest of the run. The project and key answers answer those questions too.
|
|
212
|
-
|
|
213
|
-
Then run `npx --prefer-offline --yes copilotkit@4.26.0 onboard read credentials/plan`.
|
|
58
|
+
Then end your turn and wait for the developer. When the developer replies, record their
|
|
59
|
+
answers with `onboard setup-answers`, and run `onboard setup-message` again with
|
|
60
|
+
`--accept-defaults`, as `next` says. When it prints `status: settled`, run
|
|
61
|
+
`npx --prefer-offline --yes copilotkit@4.28.0 onboard read credentials/plan`. If you came here from
|
|
62
|
+
`research/gather` before the research merged, do not read `credentials/plan` yet: finish the
|
|
63
|
+
research. If it returns and the developer has not replied, record what the findings settle
|
|
64
|
+
with `onboard setup-answers`, then end your turn and send the developer nothing. Report
|
|
65
|
+
the pause with `onboard checkpoint --phase awaiting-developer` first.
|