copilotkit 4.27.0 → 4.29.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 +161 -26
- package/cli-build-info.json +7 -7
- package/index.js +8234 -5108
- package/onboarding/index.json +3 -2
- package/onboarding/prompts/authenticate/start.md +54 -55
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +28 -24
- package/onboarding/prompts/credentials/plan.md +31 -28
- package/onboarding/prompts/credentials/settle-credentials.md +7 -7
- package/onboarding/prompts/credentials/write-plan.md +77 -51
- package/onboarding/prompts/deployment/choose-local.md +9 -9
- package/onboarding/prompts/deployment/local-evaluation.md +12 -12
- package/onboarding/prompts/fallback/best-effort.md +9 -13
- 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 +17 -8
- package/onboarding/prompts/feature/channels/implement.md +7 -7
- package/onboarding/prompts/feature/channels/plan.md +5 -5
- package/onboarding/prompts/feature/channels/proof.md +8 -7
- package/onboarding/prompts/feature/channels/start.md +18 -9
- 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 +17 -8
- package/onboarding/prompts/feature/complete.md +2 -2
- package/onboarding/prompts/feature/learning/implement.md +12 -12
- package/onboarding/prompts/feature/learning/plan.md +4 -4
- package/onboarding/prompts/feature/learning/proof.md +13 -13
- package/onboarding/prompts/feature/learning/start.md +17 -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 +17 -8
- package/onboarding/prompts/feature/realtime-sync/implement.md +5 -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 +16 -7
- package/onboarding/prompts/feature/rich-threads/implement.md +6 -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 +16 -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 +17 -8
- package/onboarding/prompts/framework/ag2.md +3 -3
- package/onboarding/prompts/framework/agno.md +3 -3
- package/onboarding/prompts/framework/built-in.md +3 -3
- package/onboarding/prompts/framework/claude-sdk-python.md +3 -3
- package/onboarding/prompts/framework/claude-sdk-typescript.md +3 -3
- package/onboarding/prompts/framework/crewai-flows.md +6 -6
- package/onboarding/prompts/framework/custom-ag-ui.md +4 -4
- package/onboarding/prompts/framework/deep-agents.md +3 -3
- package/onboarding/prompts/framework/google-adk.md +3 -3
- package/onboarding/prompts/framework/langgraph-fastapi.md +3 -3
- package/onboarding/prompts/framework/langgraph-python.md +3 -3
- package/onboarding/prompts/framework/langgraph-typescript.md +3 -3
- package/onboarding/prompts/framework/llamaindex.md +3 -3
- package/onboarding/prompts/framework/mastra.md +3 -3
- package/onboarding/prompts/framework/ms-agent-dotnet.md +5 -5
- package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +5 -5
- package/onboarding/prompts/framework/ms-agent-python.md +3 -3
- package/onboarding/prompts/framework/pydantic-ai.md +3 -3
- package/onboarding/prompts/framework/strands-python.md +3 -3
- package/onboarding/prompts/framework/strands-typescript.md +3 -3
- package/onboarding/prompts/frontend/angular.md +4 -4
- package/onboarding/prompts/frontend/nextjs.md +4 -4
- package/onboarding/prompts/frontend/plan.md +12 -12
- 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 +32 -14
- package/onboarding/prompts/proof/complete.md +6 -7
- package/onboarding/prompts/proof/oss-baseline.md +24 -5
- package/onboarding/prompts/proof/round-trip.md +41 -21
- package/onboarding/prompts/research/gather.md +85 -40
- 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 +53 -234
- package/onboarding/prompts/starter/clone.md +43 -34
- package/onboarding/prompts/stopped/run-failed.md +3 -3
- package/onboarding/prompts/subagent/create-plan.md +57 -34
- package/onboarding/prompts/subagent/implement-and-validate.md +40 -35
- package/onboarding/prompts/subagent/inspect-repository.md +17 -4
- package/onboarding/prompts/subagent/prove-oss-baseline.md +24 -1
- package/onboarding/prompts/subagent/prove-round-trip.md +55 -49
- package/onboarding/prompts/unsupported/no-validated-path.md +3 -3
- package/package.json +1 -1
- package/release/release-tool.js +8 -1
|
@@ -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,16 +15,16 @@ 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.29.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.29.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.
|
|
24
25
|
|
|
25
26
|
Read only inside the target project directory. Every subagent you spawn inherits that
|
|
26
|
-
limit
|
|
27
|
+
limit. Answer a CopilotKit API or configuration
|
|
27
28
|
question from the documentation this graph gives you. Another checkout on this machine is
|
|
28
29
|
not a source.
|
|
29
30
|
|
|
@@ -34,7 +35,7 @@ pass.
|
|
|
34
35
|
|
|
35
36
|
Telemetry and friction reports follow the CLI telemetry setting the developer controls with
|
|
36
37
|
`copilotkit telemetry` or `DO_NOT_TRACK=1`. Each report is one or two sentences and carries
|
|
37
|
-
no secrets and no source. The
|
|
38
|
+
no secrets and no source. The commands enforce that setting. Explain it once.
|
|
38
39
|
|
|
39
40
|
The directory this run started in is the run root. Every `--path` argument is read against
|
|
40
41
|
it, so one path names one file from anywhere in the project.
|
|
@@ -47,19 +48,33 @@ to the repository root and prints its path.
|
|
|
47
48
|
|
|
48
49
|
This rule covers every subagent this run spawns, here and in every later prompt.
|
|
49
50
|
|
|
50
|
-
Spawning a subagent returns almost at once. That return is the dispatch
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
you already hold the result. Either way there is nothing to poll.
|
|
51
|
+
Spawning a subagent returns almost at once. That return is the dispatch, not the result:
|
|
52
|
+
the result reaches you as a notification, or with the dispatch in some harnesses. There is
|
|
53
|
+
nothing to poll.
|
|
54
54
|
|
|
55
|
-
After you dispatch, do the work that does not depend on the result
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
what it means. It is a pause, as "Pausing vs stopping" below describes, and not a stop.
|
|
55
|
+
After you dispatch, do the work that does not depend on the result, then end your turn
|
|
56
|
+
and wait for the result. That is what "wait for a subagent to finish" means in this graph.
|
|
57
|
+
It is a pause, as "Pausing vs stopping" below describes, and not a stop.
|
|
59
58
|
|
|
60
|
-
Do not sleep to pass the time
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
Do not sleep to pass the time: no `sleep`, no timer, and no loop that re-checks for a
|
|
60
|
+
result. It spends wall clock and tells you nothing.
|
|
61
|
+
|
|
62
|
+
## When a subagent is refused a command
|
|
63
|
+
|
|
64
|
+
This rule covers every subagent this run spawns. A subagent whose harness refuses a command
|
|
65
|
+
returns at once with the command, its directory, and the refusal. Then run that command
|
|
66
|
+
yourself, from that directory. Spawn at most one fresh subagent for each refused command,
|
|
67
|
+
with the same handoff and that result. If the fresh subagent is refused a command too,
|
|
68
|
+
spawn no other: do the brief yourself.
|
|
69
|
+
|
|
70
|
+
Record each research result, since a research subagent runs no onboarding command:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
npx --prefer-offline --yes copilotkit@4.29.0 onboard checkpoint --phase subagent-returned --brief inspect-repository --result <ok|refused|failed>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`ok` is `Status: passed`, `failed` is failed or blocked, and `refused` names a refused
|
|
77
|
+
command.
|
|
63
78
|
|
|
64
79
|
## Pausing vs stopping
|
|
65
80
|
|
|
@@ -73,7 +88,7 @@ says to file none, follow it, so the run sends one report at most. Nothing else
|
|
|
73
88
|
A pause keeps the run open. "End your turn and wait for" something means: end this turn.
|
|
74
89
|
When that thing arrives, continue. A pause waits for one of two things:
|
|
75
90
|
|
|
76
|
-
1. A subagent result
|
|
91
|
+
1. A subagent result, waited for as the section above says.
|
|
77
92
|
2. The developer. Ask the question, then end your turn and wait for the reply. The reply
|
|
78
93
|
is the answer. A developer who replies without choosing, such as "go ahead" or "you
|
|
79
94
|
pick", gives no answer, and the default that the prompt states applies. Where the
|
|
@@ -82,54 +97,57 @@ When that thing arrives, continue. A pause waits for one of two things:
|
|
|
82
97
|
Before you end your turn to wait for the developer, report the pause:
|
|
83
98
|
|
|
84
99
|
```text
|
|
85
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
100
|
+
npx --prefer-offline --yes copilotkit@4.29.0 onboard checkpoint --phase awaiting-developer --about <question>
|
|
86
101
|
```
|
|
87
102
|
|
|
103
|
+
Use the question the asking prompt names, or else the closest of: `harness-permission`,
|
|
104
|
+
`sign-in`, `setup-answers`, `stack-choice`, `project-name`, `which-project`,
|
|
105
|
+
`env-file-tracked`, `local-connection`, `local-terms`, `existing-folder`,
|
|
106
|
+
`environment-fix`, `uncommitted-file`, `agent-change`, `restore-files`, `thread-id`,
|
|
107
|
+
`scoped-fix`, `feature-binding`, `other`. Report it before every turn that ends while the
|
|
108
|
+
run is open, with `other` if you asked nothing. A run that goes quiet without it reads as
|
|
109
|
+
a run that died.
|
|
110
|
+
|
|
88
111
|
When the answer or the result arrives, continue from the step that paused. Do not read an
|
|
89
|
-
earlier prompt again, send the welcome again, or start a new run
|
|
90
|
-
|
|
112
|
+
earlier prompt again, send the welcome again, or start a new run. If you lost the step you
|
|
113
|
+
were on, run `npx --prefer-offline --yes copilotkit@4.29.0 onboard route`. Skip every `subagent/` entry: a
|
|
114
|
+
subagent read that brief. The last step left is that step. Read it again with `onboard read`. A pause is not a stop. It sends no stop report.
|
|
91
115
|
|
|
92
116
|
## When a subagent cannot work
|
|
93
117
|
|
|
94
|
-
This rule
|
|
118
|
+
This rule covers every subagent too.
|
|
95
119
|
|
|
96
|
-
A subagent that returns no usable result failed in your harness, not in this graph.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
rather than treating it as the end of the run.
|
|
120
|
+
A subagent that returns no usable result failed in your harness, not in this graph. Every
|
|
121
|
+
assignment in this run is work you can do yourself, slower. So do it yourself and carry
|
|
122
|
+
on. It is not the end of the run.
|
|
100
123
|
|
|
101
124
|
Both research subagents failing means this harness has no working subagent at all, which
|
|
102
125
|
is worth recording once:
|
|
103
126
|
|
|
104
127
|
```text
|
|
105
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
128
|
+
npx --prefer-offline --yes copilotkit@4.29.0 onboard checkpoint --phase delegation-unavailable
|
|
106
129
|
```
|
|
107
130
|
|
|
108
|
-
Then
|
|
109
|
-
|
|
131
|
+
Then tell the developer once that this environment has no working subagents, so you do
|
|
132
|
+
each step yourself and the run takes longer.
|
|
110
133
|
|
|
111
134
|
For the rest of this run, do not spawn a subagent where a prompt tells you to. Read that
|
|
112
135
|
`subagent/` brief yourself and follow it.
|
|
113
136
|
|
|
114
|
-
Before you ask the developer any setup question, finish every read-only investigation and
|
|
115
|
-
preflight check in this section.
|
|
116
|
-
|
|
117
137
|
Prepare two research assignments. Before you spawn either subagent, run these two
|
|
118
138
|
read-only commands yourself, from the target project directory:
|
|
119
139
|
|
|
120
140
|
```text
|
|
121
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
122
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
141
|
+
npx --prefer-offline --yes copilotkit@4.29.0 onboard read subagent/inspect-repository
|
|
142
|
+
npx --prefer-offline --yes copilotkit@4.29.0 onboard inspect --json
|
|
123
143
|
```
|
|
124
144
|
|
|
125
145
|
Give each research subagent the prompt that the first command returns, the whole JSON that
|
|
126
146
|
the second command returns, and one assignment. Tell it that its handoff already holds both,
|
|
127
|
-
so it runs no onboarding command
|
|
128
|
-
|
|
129
|
-
The run then waits for an approval that nobody sees. Require only its assigned packet.
|
|
147
|
+
so it runs no onboarding command: a permission layer can refuse one inside a subagent, and
|
|
148
|
+
the run then waits for an approval nobody sees. Require only its assigned packet.
|
|
130
149
|
|
|
131
|
-
Give the same JSON to every later subagent
|
|
132
|
-
focused directory check, or a conflict verifier.
|
|
150
|
+
Give the same JSON to every later subagent this research spawns, such as a retry.
|
|
133
151
|
|
|
134
152
|
Start both research subagents in parallel:
|
|
135
153
|
|
|
@@ -137,11 +155,38 @@ Start both research subagents in parallel:
|
|
|
137
155
|
2. Spawn a second research subagent. Assign it the environment evidence packet.
|
|
138
156
|
3. Start both research subagents. Then continue.
|
|
139
157
|
|
|
158
|
+
## Show the setup message while the research runs
|
|
159
|
+
|
|
160
|
+
For some folders the setup message needs nothing that the research finds. Then the
|
|
161
|
+
developer reads it while the research runs. That is the case when the developer's request
|
|
162
|
+
names no Channel (as `research/route` lists), and the `onboard inspect` JSON shows one of:
|
|
163
|
+
|
|
164
|
+
- `appDiscovery.reason` is `no-project`: the folder holds no project.
|
|
165
|
+
- A frontend and no agent: `detection.frontend` has a `match`, and
|
|
166
|
+
`detection.agentFramework` has an empty `matched` and an empty `unmatched`.
|
|
167
|
+
|
|
168
|
+
Once `login --json` has emitted `type: completed`, read the setup questions now:
|
|
169
|
+
`npx --prefer-offline --yes copilotkit@4.29.0 onboard read setup/questions`. Record the frontend from
|
|
170
|
+
`detection` first.
|
|
171
|
+
Show the message. Before you end your turn to wait for the developer, report the pause:
|
|
172
|
+
|
|
173
|
+
```text
|
|
174
|
+
npx --prefer-offline --yes copilotkit@4.29.0 onboard checkpoint --phase awaiting-developer --about setup-answers
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Then continue below: the preflight and the merge do not wait for the reply. When the
|
|
178
|
+
developer replies, record the reply as that prompt says. If `research/route` sends you back
|
|
179
|
+
to the setup questions before the developer replied, do not show the message again: the
|
|
180
|
+
pause above still holds.
|
|
181
|
+
|
|
182
|
+
In any other folder, such as one with an agent, the research can change the message. Keep
|
|
183
|
+
the research first.
|
|
184
|
+
|
|
140
185
|
The research is under way. Continue to the surface-control preflight while it runs:
|
|
141
186
|
|
|
142
187
|
```text
|
|
143
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
188
|
+
npx --prefer-offline --yes copilotkit@4.29.0 onboard read research/preflight
|
|
144
189
|
```
|
|
145
190
|
|
|
146
191
|
If inspection stops onboarding, run
|
|
147
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
192
|
+
`npx --prefer-offline --yes copilotkit@4.29.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.29.0 onboard checkpoint --phase awaiting-developer --about sign-in
|
|
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.29.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.29.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.29.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.29.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.29.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.29.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.29.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 --about setup-answers` 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.29.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,246 +1,65 @@
|
|
|
1
1
|
# Ask the setup questions together
|
|
2
2
|
|
|
3
3
|
Do not change application code in this phase. Do not read, show, store, or request a secret value.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- An
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
the
|
|
39
|
-
|
|
40
|
-
```text
|
|
41
|
-
Reply **go** to use all five, or tell me what to change.
|
|
42
|
-
|
|
43
|
-
1. Framework: **LangGraph TypeScript**
|
|
44
|
-
Other, for example: LangGraph Python · Mastra · ADK
|
|
45
|
-
2. Model: **OpenAI**
|
|
46
|
-
Other, for example: Groq · OpenRouter (any OpenAI-compatible provider)
|
|
47
|
-
3. Key: **I ask for the key file after I build the app**
|
|
48
|
-
Other: name the file now (outside this folder)
|
|
49
|
-
4. Frontend: **Next.js**
|
|
50
|
-
Other: React SPA · Vue 3 · React Native · Angular · Slack · Microsoft Teams
|
|
51
|
-
5. Project: **new project "copilotkit-assistant"**
|
|
52
|
-
Other: another name · a project you already have
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
A line that recommends nothing keeps its own wording and has no "Other:" line: the
|
|
56
|
-
`env-file-exposed` line with `question.untrack` and no `question.alternative`, the
|
|
57
|
-
uncommitted-changes line, or a held-back vendor, with the note "Read the reply" gives.
|
|
58
|
-
**go** does not answer it. Open with "Reply **go** to use the other <count>, and answer
|
|
59
|
-
line <number>." For several, "Reply **go** to use the others, and answer lines <a> and
|
|
60
|
-
<b>." With one line: "Reply **go** to use it, or tell me what to change." When every line
|
|
61
|
-
needs its own answer, write no **go** sentence: open with "Answer each line."
|
|
62
|
-
|
|
63
|
-
**The purpose line.**
|
|
64
|
-
|
|
65
|
-
Ask this line only when neither the request nor the repository shows what the project is
|
|
66
|
-
for. Recommend "a general assistant", and give two short examples. In an empty target, do
|
|
67
|
-
not ask it: record the purpose the request names, or "a general assistant".
|
|
68
|
-
|
|
69
|
-
**The framework line.**
|
|
70
|
-
|
|
71
|
-
If the project has no agent, ask this line. Recommend a framework in the repository's
|
|
72
|
-
language. In an empty target, use the example's line.
|
|
73
|
-
|
|
74
|
-
The vendors each framework takes in this release, default first:
|
|
75
|
-
|
|
76
|
-
| Framework | Vendors |
|
|
77
|
-
| ---------------------------------- | -------------------------------------------- |
|
|
78
|
-
| AG2 | OpenAI, OpenAI-compatible |
|
|
79
|
-
| ADK | Google, OpenAI, OpenAI-compatible |
|
|
80
|
-
| Agno | OpenAI, OpenAI-compatible |
|
|
81
|
-
| Built-in CopilotKit agent | OpenAI, Anthropic, Google, OpenAI-compatible |
|
|
82
|
-
| Claude Agent SDK (Python) | Anthropic only |
|
|
83
|
-
| Claude Agent SDK (TypeScript) | Anthropic only |
|
|
84
|
-
| CrewAI Flows | Project-defined |
|
|
85
|
-
| Custom agent | The agent's own |
|
|
86
|
-
| Deep Agents | OpenAI, OpenAI-compatible |
|
|
87
|
-
| LangGraph FastAPI | OpenAI, OpenAI-compatible |
|
|
88
|
-
| LangGraph Python | OpenAI, OpenAI-compatible |
|
|
89
|
-
| LangGraph TypeScript | OpenAI, OpenAI-compatible |
|
|
90
|
-
| LlamaIndex | OpenAI, OpenAI-compatible |
|
|
91
|
-
| Mastra | OpenAI, OpenAI-compatible |
|
|
92
|
-
| Microsoft Agent Framework (.NET) | OpenAI, OpenAI-compatible |
|
|
93
|
-
| Microsoft Agent Framework (Python) | OpenAI, OpenAI-compatible |
|
|
94
|
-
| MS Agent Harness (.NET) | OpenAI, OpenAI-compatible |
|
|
95
|
-
| Pydantic AI | OpenAI, OpenAI-compatible |
|
|
96
|
-
| Strands Agents (Python) | OpenAI, OpenAI-compatible |
|
|
97
|
-
| Strands Agents (TypeScript) | OpenAI, OpenAI-compatible |
|
|
98
|
-
|
|
99
|
-
"Project-defined" keeps the repository's vendor, or asks once when it shows none.
|
|
100
|
-
|
|
101
|
-
"The agent's own" keeps the existing agent's vendor, with no vendor question. A new agent
|
|
102
|
-
on the Custom agent route asks the model and key lines like any new agent, with OpenAI as
|
|
103
|
-
its default vendor.
|
|
104
|
-
|
|
105
|
-
For a new agent in a framework the table does not list, record its name and take the Custom
|
|
106
|
-
agent route.
|
|
107
|
-
|
|
108
|
-
**The model and key lines.**
|
|
109
|
-
|
|
110
|
-
For a new agent, ask the model line, even if the framework needed no question. Skip it for
|
|
111
|
-
"Project-defined" or "The agent's own". The model line names providers only: the row's
|
|
112
|
-
default vendor, then its other vendors on "Other, for example:", except on an "only" row,
|
|
113
|
-
where the model line has no "Other:" line.
|
|
114
|
-
|
|
115
|
-
Ask the key line for a new agent only. Never ask for the key itself. Recommend the key file
|
|
116
|
-
the developer named, or the project's env file under the rule below, or else "I ask for the
|
|
117
|
-
key file after I build the app", which **go** takes. Its "Other:" is the example's, or
|
|
118
|
-
"later" after a file.
|
|
119
|
-
|
|
120
|
-
An OpenAI-compatible provider uses `OPENAI_API_KEY`. When the developer names one, ask in
|
|
121
|
-
the same line for its model id, and its base URL unless the key file sets
|
|
122
|
-
`OPENAI_BASE_URL`. Neither is a secret.
|
|
123
|
-
|
|
124
|
-
When the developer has no key yet, name the ways forward on the key line: credit on the
|
|
125
|
-
vendor's account, and, when the chosen framework can use Google, a free key from Google AI
|
|
126
|
-
Studio at https://aistudio.google.com/apikey. The free tier limits requests per minute, so
|
|
127
|
-
tell them that a slow first reply is that limit and not a fault.
|
|
128
|
-
|
|
129
|
-
A path the developer names is theirs to give, even outside the project. Recommend the
|
|
130
|
-
project's env file only when it exists, holds the key, and git ignores and does not track
|
|
131
|
-
it, and no `env-file-exposed` line is open. In an empty target, a new key file goes outside
|
|
132
|
-
the target directory, because `init` refuses a target with a `.env` file. Tell the
|
|
133
|
-
developer only where it goes.
|
|
134
|
-
|
|
135
|
-
**The frontend line.**
|
|
136
|
-
|
|
137
|
-
If the project has no frontend, ask this line. Recommend the one the developer names, or
|
|
138
|
-
Next.js. "Other:" is the example's list.
|
|
139
|
-
|
|
140
|
-
**The project line.** On the local route, ask the local lines below instead. For an
|
|
141
|
-
existing app, first run `npx --prefer-offline --yes copilotkit@4.27.0 onboard credentials --json` from the target app
|
|
142
|
-
directory. It only reads: it creates no project and writes no file. Read `status`:
|
|
143
|
-
|
|
144
|
-
- `ready`: the app has a project. Leave the line out.
|
|
145
|
-
- `needs-developer` with `project-name`: recommend `suggestedName`, with the
|
|
146
|
-
example's "Other:" line. If there is no `suggestedName`, ask for a name. Do not list
|
|
147
|
-
the organization's projects.
|
|
148
|
-
- `needs-developer` with `env-file-exposed`: git tracks the env file the key goes into, or
|
|
149
|
-
does not ignore it. Add `question.ask` as its own line, word for word: never shorten it or
|
|
150
|
-
drop what it says about teammates. Without `question.untrack`, recommend approving it:
|
|
151
|
-
without it, the run writes no key, and **go** approves it. With `question.untrack`, git
|
|
152
|
-
tracks the file: recommend `question.alternative` if present, since the key then goes into
|
|
153
|
-
`question.alternative.file`, which affects no teammate, and **go** takes it. Otherwise
|
|
154
|
-
recommend nothing. Untracking removes the file for everyone who pulls the next commit. A
|
|
155
|
-
reply that accepts every recommendation never approves the untrack. Never suggest a
|
|
156
|
-
reply that approves it. Then offer a new project for this app, or a project the developer
|
|
157
|
-
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, recommend a new project named after the target directory, with the
|
|
162
|
-
same "Other:" line. When that name is generic, such as `project`, `app`,
|
|
163
|
-
`web`, `frontend`, or `src`, name it after the README title or the `package.json` `name`
|
|
164
|
-
instead.
|
|
165
|
-
|
|
166
|
-
**Local lines.** On the local route only:
|
|
167
|
-
|
|
168
|
-
- Run `npx --prefer-offline --yes copilotkit@4.27.0 onboard local-terms --json` and follow `next`.
|
|
169
|
-
- "Learning model: **configure later**", then "Other:
|
|
170
|
-
guided setup in your own terminal · a private model file you have".
|
|
171
|
-
- "Local connection: **install the local stack, then write `<app directory>/<env file>`
|
|
172
|
-
and `<app directory>/.copilotkit/project.json`**", then "Other: not now". A reply that
|
|
173
|
-
accepts every recommendation approves the connection.
|
|
174
|
-
- When the env file or `.copilotkit/project.json` has uncommitted changes, add one line that
|
|
175
|
-
names every one of them: "Uncommitted changes: `<files>` have edits that are not
|
|
176
|
-
committed, and the connection changes their settings. Allow it, or commit first?" One
|
|
177
|
-
answer covers every file on that line. A reply that accepts every
|
|
178
|
-
recommendation never approves those writes.
|
|
179
|
-
|
|
180
|
-
Before you end your turn to wait for the developer, report the pause:
|
|
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.29.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.29.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:
|
|
181
39
|
|
|
182
40
|
```text
|
|
183
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
41
|
+
npx --prefer-offline --yes copilotkit@4.29.0 onboard setup-message --target <empty|existing> [--language <typescript|python|dotnet>] [--vendor <vendor>]
|
|
184
42
|
```
|
|
185
43
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
A reply such as "go", "yes" or "go ahead" accepts every recommendation. A line the reply
|
|
191
|
-
changes takes the new answer. A line it does not mention keeps its recommendation.
|
|
192
|
-
|
|
193
|
-
If a changed line makes another answer invalid, ask again, in one message:
|
|
194
|
-
|
|
195
|
-
- A vendor that the chosen framework's own model layer cannot use, such as OpenAI for the
|
|
196
|
-
Claude Agent SDK: say so, and offer the framework with its default vendor, or another
|
|
197
|
-
framework for their vendor.
|
|
198
|
-
- Anthropic or Google for a new agent on a row without it: say that this release supports
|
|
199
|
-
the row's vendors there, that Anthropic and Google come in a later release, and offer the Built-in
|
|
200
|
-
CopilotKit agent if they need them now.
|
|
201
|
-
- Slack or Microsoft Teams as the frontend of an empty project: the Channel starter brings
|
|
202
|
-
its own agent, so the framework, model, and key lines decide nothing. Drop all three:
|
|
203
|
-
`<count>` counts only the lines shown.
|
|
204
|
-
|
|
205
|
-
If the developer chooses a framework on the `unready` list, or the repository already has
|
|
206
|
-
an agent in one, keep that framework. Before the run changes the project, tell the
|
|
207
|
-
developer in one message:
|
|
208
|
-
|
|
209
|
-
1. Which toolchain to install, and its install page.
|
|
210
|
-
2. That the coding agent sees the toolchain only after a restart, since its shell
|
|
211
|
-
reads PATH at start.
|
|
212
|
-
3. That the run resumes after the restart with
|
|
213
|
-
`npx --prefer-offline --yes copilotkit@4.27.0 onboard start --run <onboarding_run_id>`.
|
|
214
|
-
|
|
215
|
-
Before you end your turn to wait for the developer, report the pause:
|
|
216
|
-
|
|
217
|
-
```text
|
|
218
|
-
npx --prefer-offline --yes copilotkit@4.27.0 onboard checkpoint --phase awaiting-developer
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
Then end your turn and wait for the developer. That restart is a step here, not an error.
|
|
222
|
-
|
|
223
|
-
## Record the answers
|
|
224
|
-
|
|
225
|
-
Record every answer in the CLI. They answer
|
|
226
|
-
the framework, provider, and frontend questions for the rest of the run. Give them to each
|
|
227
|
-
subagent too. Pass the flags that apply:
|
|
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`.
|
|
228
48
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
(an existing agent's). For
|
|
234
|
-
`openai-compatible`, add `--model-id <id>`, and `--base-url <url>` unless the CLI
|
|
235
|
-
printed `keyFileBaseUrl`: show that one.
|
|
236
|
-
- `--create <name>` for a new project or `--project <slug>` for theirs, and
|
|
237
|
-
`--key-file <path>` or `--key-later`.
|
|
238
|
-
- On the local route: `--learning later`, `--learning guided`, or `--learning-file <path>`.
|
|
239
|
-
Then `--connection approved` or `declined`. For an uncommitted-changes line the reply
|
|
240
|
-
answered, add `--uncommitted-writes approved` or `declined`.
|
|
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:
|
|
241
53
|
|
|
242
54
|
```text
|
|
243
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
55
|
+
npx --prefer-offline --yes copilotkit@4.29.0 onboard checkpoint --phase awaiting-developer --about setup-answers
|
|
244
56
|
```
|
|
245
57
|
|
|
246
|
-
Then
|
|
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.29.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 same pause first.
|