copilotkit 4.21.0 → 4.23.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 +419 -23
- package/cli-build-info.json +8 -8
- package/index.js +62600 -43650
- package/onboarding/index.json +92 -9
- package/onboarding/prompts/authenticate/start.md +47 -43
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +12 -7
- package/onboarding/prompts/credentials/plan.md +36 -25
- package/onboarding/prompts/credentials/settle-credentials.md +10 -7
- package/onboarding/prompts/credentials/write-plan.md +22 -20
- package/onboarding/prompts/deployment/choose-local.md +46 -0
- package/onboarding/prompts/deployment/local-evaluation.md +71 -0
- package/onboarding/prompts/fallback/best-effort.md +8 -8
- package/onboarding/prompts/feature/a2ui/implement.md +6 -6
- package/onboarding/prompts/feature/a2ui/plan.md +72 -0
- package/onboarding/prompts/feature/a2ui/proof.md +5 -5
- package/onboarding/prompts/feature/a2ui/start.md +11 -32
- package/onboarding/prompts/feature/channels/implement.md +23 -16
- package/onboarding/prompts/feature/channels/plan.md +85 -0
- package/onboarding/prompts/feature/channels/proof.md +5 -5
- package/onboarding/prompts/feature/channels/start.md +14 -41
- package/onboarding/prompts/feature/chat-suggestions/implement.md +6 -6
- package/onboarding/prompts/feature/chat-suggestions/plan.md +71 -0
- package/onboarding/prompts/feature/chat-suggestions/proof.md +5 -5
- package/onboarding/prompts/feature/chat-suggestions/start.md +11 -30
- package/onboarding/prompts/feature/complete.md +2 -2
- package/onboarding/prompts/feature/learning/implement.md +13 -13
- package/onboarding/prompts/feature/learning/plan.md +82 -0
- package/onboarding/prompts/feature/learning/proof.md +6 -6
- package/onboarding/prompts/feature/learning/start.md +11 -40
- package/onboarding/prompts/feature/open-generative-ui/implement.md +6 -6
- package/onboarding/prompts/feature/open-generative-ui/plan.md +70 -0
- package/onboarding/prompts/feature/open-generative-ui/proof.md +5 -5
- package/onboarding/prompts/feature/open-generative-ui/start.md +11 -30
- package/onboarding/prompts/feature/realtime-sync/implement.md +7 -7
- package/onboarding/prompts/feature/realtime-sync/plan.md +75 -0
- package/onboarding/prompts/feature/realtime-sync/proof.md +5 -5
- package/onboarding/prompts/feature/realtime-sync/start.md +10 -33
- package/onboarding/prompts/feature/rich-threads/implement.md +8 -8
- package/onboarding/prompts/feature/rich-threads/plan.md +77 -0
- package/onboarding/prompts/feature/rich-threads/proof.md +5 -5
- package/onboarding/prompts/feature/rich-threads/start.md +10 -35
- package/onboarding/prompts/feature/stop.md +3 -3
- package/onboarding/prompts/feature/voice/implement.md +6 -6
- package/onboarding/prompts/feature/voice/plan.md +74 -0
- package/onboarding/prompts/feature/voice/proof.md +5 -5
- package/onboarding/prompts/feature/voice/start.md +11 -29
- package/onboarding/prompts/framework/ag2.md +2 -2
- package/onboarding/prompts/framework/agno.md +2 -2
- package/onboarding/prompts/framework/built-in.md +2 -2
- package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
- package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
- package/onboarding/prompts/framework/crewai-flows.md +2 -2
- package/onboarding/prompts/framework/custom-ag-ui.md +101 -0
- package/onboarding/prompts/framework/deep-agents.md +2 -2
- package/onboarding/prompts/framework/google-adk.md +2 -2
- 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 +2 -2
- package/onboarding/prompts/framework/mastra.md +2 -2
- package/onboarding/prompts/framework/ms-agent-dotnet.md +3 -3
- package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +3 -3
- package/onboarding/prompts/framework/ms-agent-python.md +2 -2
- package/onboarding/prompts/framework/pydantic-ai.md +2 -2
- package/onboarding/prompts/framework/strands-python.md +2 -2
- package/onboarding/prompts/framework/strands-typescript.md +2 -2
- package/onboarding/prompts/frontend/angular.md +10 -21
- package/onboarding/prompts/frontend/nextjs.md +3 -3
- package/onboarding/prompts/frontend/plan.md +7 -7
- 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 +14 -13
- package/onboarding/prompts/proof/complete.md +3 -3
- package/onboarding/prompts/proof/oss-baseline.md +5 -5
- package/onboarding/prompts/proof/round-trip.md +18 -13
- package/onboarding/prompts/research/gather.md +9 -8
- package/onboarding/prompts/research/merge.md +6 -3
- package/onboarding/prompts/research/preflight.md +2 -2
- package/onboarding/prompts/research/route.md +26 -18
- package/onboarding/prompts/starter/clone.md +15 -14
- package/onboarding/prompts/stopped/run-failed.md +2 -2
- package/onboarding/prompts/subagent/create-plan.md +33 -40
- package/onboarding/prompts/subagent/implement-and-validate.md +58 -38
- package/onboarding/prompts/subagent/inspect-repository.md +4 -1
- package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
- package/onboarding/prompts/subagent/prove-round-trip.md +117 -257
- package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
- package/package.json +4 -1
- package/release/release-tool.js +167 -18
- package/services/local-auth-worker.js +21465 -0
|
@@ -6,7 +6,7 @@ policy the main coding agent gives you before you start.
|
|
|
6
6
|
During Steps 1 through 8, do not edit source files, configuration files, dependencies, or
|
|
7
7
|
tracked files.
|
|
8
8
|
You can make only operational repairs to project-owned processes, ports, and request options,
|
|
9
|
-
and the credential
|
|
9
|
+
and the credential command that `verify:api_key_loadable_by_app` names.
|
|
10
10
|
Do not write a path that overlaps a protected path. If a required proof or tool path
|
|
11
11
|
overlaps one, return `Status: blocked` before writing it.
|
|
12
12
|
|
|
@@ -32,12 +32,11 @@ convincing. Step 6 has a web form and a React Native form: run the one that matc
|
|
|
32
32
|
journey's frontend, and run only that one.
|
|
33
33
|
|
|
34
34
|
A run that cloned a starter is the one exception. When the main coding agent tells you
|
|
35
|
-
that this run cloned a starter, run
|
|
36
|
-
`verify --round-trip` command, then go to Step 10. Skip Steps 5a through 9, open no browser
|
|
35
|
+
that this run cloned a starter, run Step 1 and the proof checks, then go to Step 10. Skip Steps 5a through 9, open no browser
|
|
37
36
|
or device, and report `skipped-cloned-starter` as the surface-check outcome.
|
|
38
37
|
|
|
39
|
-
Where this is a second attempt after a repair, run every step from
|
|
40
|
-
again, or
|
|
38
|
+
Where this is a second attempt after a repair, run every step from the proof checks through
|
|
39
|
+
Step 7 again, or only the proof checks for a cloned-starter run. The repair changed tracked files and restarted processes, so the wiring, the agent
|
|
41
40
|
identity, and both preconditions are stale. Step 1 is the exception, and it is carried
|
|
42
41
|
rather than derived a second time. Compare the Step 5a and Step 5b results against the
|
|
43
42
|
failed attempt's before you drive the surface. A repair that leaves the failed precondition
|
|
@@ -74,246 +73,90 @@ step. Use its request words, expected agent id, entity list, and runtime URL unc
|
|
|
74
73
|
do not write a new request. A second attempt that asks a different question proves nothing
|
|
75
74
|
about the failure it was spawned to clear.
|
|
76
75
|
|
|
77
|
-
##
|
|
78
|
-
|
|
79
|
-
Read the port the developer's agent already serves from this project's own configuration.
|
|
80
|
-
Do not assume a default, and do not start a second copy of an agent this project is
|
|
81
|
-
already running. Before you bind any new server, check that the port is free and pick
|
|
82
|
-
another one if it is not. Record every port you used.
|
|
83
|
-
|
|
84
|
-
The table names what each frontend's own scaffolder writes, for recognizing a port in a
|
|
85
|
-
started process's output. The project's configuration wins over the table.
|
|
86
|
-
|
|
87
|
-
| Frontend | Dev server the scaffolder writes |
|
|
88
|
-
| ------------ | -------------------------------- |
|
|
89
|
-
| Next.js | `next dev`, port 3000 |
|
|
90
|
-
| React SPA | Vite, port 5173 |
|
|
91
|
-
| Vue 3 | Vite, port 5173 |
|
|
92
|
-
| Angular | `ng serve`, port 4200 |
|
|
93
|
-
| React Native | Metro, port 8081 |
|
|
94
|
-
|
|
95
|
-
Where this project's runtime runs as a process of its own, the frontend documentation
|
|
96
|
-
puts it on port 8200. Use the runtime URL from step 1 rather than that number.
|
|
97
|
-
|
|
98
|
-
Read the project's scripts before you start anything. A scaffolded starter serves both the
|
|
99
|
-
agent and the frontend from one `dev` script, which runs them under
|
|
100
|
-
`concurrently --kill-others`. One command starts both, and stopping either one stops the
|
|
101
|
-
other. A second start against a project already running that script collides with a server
|
|
102
|
-
that is up.
|
|
103
|
-
|
|
104
|
-
`next dev` locks its build directory, not its port. Next 16 writes `.next/dev/lock`. A
|
|
105
|
-
second `next dev` in the same app exits with `Unable to acquire lock at ..., is another
|
|
106
|
-
instance of next dev running?`. A free port does not help.
|
|
107
|
-
|
|
108
|
-
Before you start a Next.js frontend, look for a `next dev` process that runs from this app.
|
|
109
|
-
If one runs, reuse that server. Read its port from its command line or its listener, and
|
|
110
|
-
prove against that port. If a start still fails with that message, name the process that
|
|
111
|
-
holds the lock. Give its PID and working directory. Do not stop it unless it belongs to
|
|
112
|
-
this project.
|
|
113
|
-
|
|
114
|
-
If your harness runs commands in a sandbox, a sandboxed command cannot listen on a port or
|
|
115
|
-
connect to localhost. Before the first server start, request escalation with a prefix rule
|
|
116
|
-
for the project's own dev script. Before the first request to a local server, request
|
|
117
|
-
escalation with a prefix rule for `curl`. If a local request still fails after 0 ms
|
|
118
|
-
(`Failed to connect ... after 0 ms`) while the port shows a listener, the sandbox blocked
|
|
119
|
-
it. Run it again with escalation, and do not record a failed predicate or step.
|
|
120
|
-
|
|
121
|
-
Start each server in the background with the project's own script. Then wait for it to
|
|
122
|
-
answer rather than for a fixed number of seconds:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
curl -fs -o /dev/null --retry 90 --retry-delay 1 --retry-max-time 90 --retry-all-errors "<url>"
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
A zero exit means the server answered. Any other exit means that it did not answer in 90
|
|
129
|
-
seconds. A server that never answered has written the reason to its own output, and
|
|
130
|
-
reading that output is faster than starting it again.
|
|
131
|
-
|
|
132
|
-
When the server that serves the runtime answers, record the URL it serves on. Read the port
|
|
133
|
-
from that server's own output or its listener, not from the plan. A dev server whose port
|
|
134
|
-
is taken moves to the next free one without asking. Where the runtime runs as a process of
|
|
135
|
-
its own, this is the runtime's port, not the frontend's.
|
|
136
|
-
|
|
137
|
-
```text
|
|
138
|
-
npx --prefer-offline --yes copilotkit@4.21.0 onboard runtime-url --url <runtime-url>
|
|
139
|
-
```
|
|
76
|
+
## Steps 2 to 5 -- Run the proof checks
|
|
140
77
|
|
|
141
|
-
|
|
142
|
-
bound. Keep its host and its mount path unchanged.
|
|
143
|
-
|
|
144
|
-
The command writes `runtimeUrl` into `.copilotkit/project.json` and changes nothing else. It
|
|
145
|
-
mints no key and does not touch `.env`. Step 4 reads that record, so `verify` probes the
|
|
146
|
-
server you started. Run the command again after any restart that binds another port.
|
|
147
|
-
|
|
148
|
-
That coupling also turns an ordinary restart into a false failure. Where you stop a server
|
|
149
|
-
to pick up an installed dependency, start both again and wait for both to answer before you
|
|
150
|
-
read the round trip. A check run against a frontend whose agent was stopped with it reports
|
|
151
|
-
a wiring fault this run does not have.
|
|
152
|
-
|
|
153
|
-
Leave the agent and frontend servers running after proof. Record each process ID and a
|
|
154
|
-
safe command that stops that process. Record whether that command stops both. Record the
|
|
155
|
-
commands that start both servers again.
|
|
156
|
-
|
|
157
|
-
Record the frontend URL the server you started reports, and treat it as provisional. Step 4
|
|
158
|
-
replaces it with the URL the CLI resolves. Do not compose one of your own from a port you
|
|
159
|
-
read here.
|
|
160
|
-
|
|
161
|
-
## Step 3 -- Identify the process that answered
|
|
162
|
-
|
|
163
|
-
Before you trust the agent, confirm that the process answering is the one in this
|
|
164
|
-
repository. `verify` reports which agents the runtime declares and has nothing to compare
|
|
165
|
-
them against, and `--round-trip` proves an agent answers under the declared id without
|
|
166
|
-
proving which deployment did, so this comparison is yours. A health endpoint that returns
|
|
167
|
-
success proves only that something listens on
|
|
168
|
-
that port. An agent from earlier work often still holds it, and a stale process answers
|
|
169
|
-
as though it were the new one. Ask the running agent which graph or agent id it serves
|
|
170
|
-
and compare that with the id declared in this project.
|
|
171
|
-
|
|
172
|
-
If they do not match, find out whose process it is before you signal anything.
|
|
173
|
-
`lsof -ti :<port> -sTCP:LISTEN` gives the process id, and `lsof -a -p <pid> -d cwd` gives
|
|
174
|
-
the directory it runs in. Stop it only when that directory is inside this project, and
|
|
175
|
-
stop its children before the parent so nothing survives by reparenting. A holder outside
|
|
176
|
-
this project belongs to other work: leave it running, report it, and bind to another port.
|
|
177
|
-
Never stop a process because its command line matches a name. One `pkill` pattern reaches
|
|
178
|
-
every project on the machine and takes down work that has nothing to do with this run.
|
|
179
|
-
Never continue against a process you cannot identify, and never report a round trip proven
|
|
180
|
-
by one.
|
|
181
|
-
|
|
182
|
-
Address a local agent by host name rather than by an IP literal. Some local agents bind
|
|
183
|
-
IPv6 only, so an IPv4 literal fails against the correct port.
|
|
184
|
-
|
|
185
|
-
## Step 4 -- Check the wiring
|
|
186
|
-
|
|
187
|
-
With both running, check the wiring in one command before you open a browser:
|
|
188
|
-
`npx --prefer-offline --yes copilotkit@4.21.0 verify --json`. It reads the port from this project, so a
|
|
189
|
-
non-default port needs no flag. The payload reports `runtimeUrl` and `runtimeUrlSource`. A
|
|
190
|
-
`runtimeUrlSource` of `default` means nothing in the project named a port, so the Step 2
|
|
191
|
-
record is missing. Run the Step 2 `onboard runtime-url` command, then run `verify` again. Read the individual checks rather than
|
|
192
|
-
the summary alone: a check reported `undetermined` did not run, and that is not a pass.
|
|
193
|
-
Repair a failed check only within the limits above. Otherwise, return the check and its
|
|
194
|
-
evidence before the browser.
|
|
195
|
-
|
|
196
|
-
Treat `intelligence_consumed` as the check that matters most here. It proves that the runtime
|
|
197
|
-
used the Intelligence credential. `api_key_authenticates` proves only that the key is valid.
|
|
198
|
-
|
|
199
|
-
`api_key_loadable_by_app` fails when the key is in a file the application's own process
|
|
200
|
-
will not read. `verify` searches upward for the credential and a framework's env loader
|
|
201
|
-
does not, so a key at the repository root is invisible to an app in a subdirectory. The
|
|
202
|
-
check names the file to write instead, and it names the exact command to re-run with this
|
|
203
|
-
project already chosen. Write the key there, or run the command the check names, from the
|
|
204
|
-
app directory. Do not run a bare `project select`: with no project named it needs a
|
|
205
|
-
terminal you do not have. Do not link, copy, or symlink the file to work around it, and do
|
|
206
|
-
not treat the credential as missing: the check above already reported that it exists.
|
|
207
|
-
|
|
208
|
-
`intelligence_thread_routes` fails when a licensed runtime serves no thread routes. A missing
|
|
209
|
-
`identifyUser` is the usual cause: it gates the whole web surface. Return the check for
|
|
210
|
-
implementation to pass `identifyUser` where the runtime is constructed. Do not edit it.
|
|
211
|
-
A handler mounted `mode: "single-route"` is not a cause and must never be removed to satisfy
|
|
212
|
-
this check: that mount serves the thread routes inside its envelope. If the check is
|
|
213
|
-
`undetermined`, the runtime cannot report the state, and the check names the upgrade. Record
|
|
214
|
-
that and continue.
|
|
215
|
-
|
|
216
|
-
`single_route_core_supports_intelligence` and `frontend_runtime_url_resolvable` read the
|
|
217
|
-
installed `@copilotkit/core` and the frontend's `runtimeUrl`. Each names the upgrade or the
|
|
218
|
-
URL that fixes it. Return the check for implementation. Do not edit it.
|
|
219
|
-
|
|
220
|
-
Take the frontend URL from the payload's `frontendUrl`. It replaces whatever step 2
|
|
221
|
-
recorded, and every later step uses it unchanged. Where the field is absent, the project
|
|
222
|
-
named no port the CLI can read: keep step 2's URL, and rewrite its host as `localhost`
|
|
223
|
-
before you use it.
|
|
224
|
-
|
|
225
|
-
Then run the command once more with the URL you are about to open:
|
|
226
|
-
`npx --prefer-offline --yes copilotkit@4.21.0 verify --frontend-url <that url> --json`. The
|
|
227
|
-
`frontend_assets_served` check asks that server for its page and for one of the page's own
|
|
228
|
-
assets, on that exact host. A `fail` there means the dev server refuses its own static
|
|
229
|
-
assets on the host you were about to use, and the check names the URL to use instead. This
|
|
230
|
-
is the cheapest step that can save the most expensive one, so run it before the browser.
|
|
231
|
-
|
|
232
|
-
## Step 5 -- Prove that the agent runs
|
|
233
|
-
|
|
234
|
-
Run `npx --prefer-offline --yes copilotkit@4.21.0 verify --round-trip --json`. It sends one request through
|
|
235
|
-
the runtime and reads the answer back from the thread, so it separates an agent that is
|
|
236
|
-
configured from an agent that works. Use `--agent <id>` when the runtime declares more
|
|
237
|
-
than one. If it reports `user-not-identified`, this project's `identifyUser` reads a
|
|
238
|
-
session the CLI does not carry: pass what it reads with `--header "Name: value"` and run
|
|
239
|
-
it again, because an auth-gated app refusing an unauthenticated caller is that app
|
|
240
|
-
working. Do not continue until the `roundTrip` entry passes, and never report a round trip
|
|
241
|
-
proven without it.
|
|
242
|
-
|
|
243
|
-
The command exits non-zero for any check that is not `pass`, including each `extraChecks`
|
|
244
|
-
entry, so route on each entry's own `status` rather than on the exit status. Where the
|
|
245
|
-
frontend's files call a context hook, one entry has the `id` `page_context_reaches_agent`:
|
|
246
|
-
|
|
247
|
-
- `pass` proves that the agent's model sees context the page sends.
|
|
248
|
-
- `fail` is a defect: the agent answered the plain request and recorded nothing for the
|
|
249
|
-
request that carried context. Return it with its evidence as a failed proof step.
|
|
250
|
-
- `undetermined` means the context round trip did not complete, or the agent answered
|
|
251
|
-
without the value. An agent scoped to its own task declines to repeat an arbitrary value
|
|
252
|
-
even when the context reaches its model, so this is not a defect. Record it, and prove
|
|
253
|
-
the path in Step 5a.
|
|
254
|
-
|
|
255
|
-
Where this run settled a Learning Container, add the flag to the call above rather than
|
|
256
|
-
running a second round trip:
|
|
78
|
+
Run this from the target app directory:
|
|
257
79
|
|
|
258
80
|
```text
|
|
259
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
81
|
+
npx --prefer-offline --yes copilotkit@4.23.0 onboard proof-check --json
|
|
260
82
|
```
|
|
261
83
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
84
|
+
It starts each app's `dev` script unless a server from that app already listens, and
|
|
85
|
+
waits for the runtime to answer. It checks that the process on the runtime port runs inside
|
|
86
|
+
this project, runs the wiring checks, the frontend asset check, and the round trip, and
|
|
87
|
+
reads stale env files and inherited provider base URLs. Add `--agent <id>` when the runtime
|
|
88
|
+
declares more than one agent.
|
|
89
|
+
|
|
90
|
+
It starts only the apps that depend on CopilotKit. If the agent runs somewhere else, for
|
|
91
|
+
example a Python agent or a root script that starts both halves, pass the start command
|
|
92
|
+
from your Step 1 record with `--server <directory>=<command>`. A relative `<directory>` is
|
|
93
|
+
read from the directory you run the command in, so a sibling agent folder is `../agent`. It
|
|
94
|
+
does not start an app inside that directory a second time. If your harness runs commands in a sandbox, request
|
|
95
|
+
escalation for this command first: it starts servers and connects to localhost.
|
|
96
|
+
|
|
97
|
+
When `status` is `passed`, record `servers`, with their process IDs and stop commands, for
|
|
98
|
+
the handoff, and take the URL to open from `frontendUrl`. If `frontendUrl` is absent, the
|
|
99
|
+
project named no port the CLI can read: take the URL from the frontend server's log, and
|
|
100
|
+
use `localhost` as its host.
|
|
101
|
+
|
|
102
|
+
A pass on `runtime-process-in-project` proves only that the process runs inside this
|
|
103
|
+
project. Ask the running agent which graph or agent ID it serves, and compare that with the
|
|
104
|
+
expected agent ID from Step 1. If they differ, an older build still answers on the port.
|
|
105
|
+
Report it, and stop it only under the rule below. The servers keep running after
|
|
106
|
+
the proof. Then go to Step 5a.
|
|
107
|
+
|
|
108
|
+
Otherwise sort `firstFailure`, and run the command again after each repair:
|
|
109
|
+
|
|
110
|
+
- `runtime-answers`: nothing answered, or the project records no runtime URL. When the
|
|
111
|
+
record holds no URL, the command records one itself if exactly one port in the project
|
|
112
|
+
answers as a runtime. So this failure means it found none, or more than one. Read the
|
|
113
|
+
server log it names. A dev server whose port is taken moves to the next free one without
|
|
114
|
+
asking. Read the port from the log, not from the plan, and record it:
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
npx --prefer-offline --yes copilotkit@4.23.0 onboard runtime-url --url <runtime-url>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
`<runtime-url>` is the project's runtime URL, or the plan's, with its port replaced by the
|
|
121
|
+
port the server bound. Keep its host and its mount path unchanged. The command can write
|
|
122
|
+
`.copilotkit/project.json` even when that path is protected. It moves the protected-path
|
|
123
|
+
baseline with its own write. It mints no key and does not touch `.env`. Then run the
|
|
124
|
+
checks again.
|
|
125
|
+
- `runtime-process-in-project`: another project's process holds the runtime port. Leave it
|
|
126
|
+
running, and report it.
|
|
127
|
+
- `verify:api_key_loadable_by_app`: the key is in a file the app does not read. Run the
|
|
128
|
+
command the check names, from the app directory. Do not copy or link the key file.
|
|
129
|
+
- `verify:intelligence_thread_routes`: usually a missing `identifyUser` where the runtime is
|
|
130
|
+
constructed. Return it for implementation. Never remove a `mode: "single-route"` mount
|
|
131
|
+
to satisfy it.
|
|
132
|
+
- `round-trip:agent_answers` naming `user-not-identified`: this project's `identifyUser` reads a
|
|
133
|
+
session the CLI does not carry. Run again with `--header "Name: value"` for what it reads.
|
|
134
|
+
- `round-trip:page_context_reaches_agent` at `fail`: the agent answered the plain request
|
|
135
|
+
and recorded nothing for the request that carried context. Return it with its evidence as
|
|
136
|
+
a failed proof step. At `undetermined` and marked `advisory`, the agent answered without
|
|
137
|
+
the value, and the checks still pass: an agent scoped to its own task declines to repeat
|
|
138
|
+
an arbitrary value, so prove the path in Step 5a. At `undetermined` without `advisory`,
|
|
139
|
+
the context run did not complete, and the checks fail on it. Run them again once. If it
|
|
140
|
+
still does not complete, prove the path in Step 5a, and report the check with its detail.
|
|
141
|
+
- `round-trip:learning_container_assigned` at `fail`: the thread carries no container or
|
|
142
|
+
another one. A thread cannot move, so start a new thread rather than repairing that one.
|
|
143
|
+
`features.self_learning` and `/info` are not evidence of an assignment.
|
|
144
|
+
- `env-files-current`: the process it names started before its env file was written, and
|
|
145
|
+
has to start again before a 401 means anything. Report it. Do not restart or stop it.
|
|
146
|
+
- `provider-endpoints`: a provider base URL came from the shell, and the round trip reports
|
|
147
|
+
a 404 from the model provider. Report it. The server has to start from an environment
|
|
148
|
+
without it. Do not edit a project file.
|
|
149
|
+
- Any other `verify:` check: repair it only within the limits above, or return it with its
|
|
150
|
+
evidence before the browser.
|
|
151
|
+
|
|
152
|
+
Never report a round trip proved unless `round-trip:agent_answers` passed.
|
|
153
|
+
|
|
154
|
+
The checks leave every process they did not start running. If a repair needs a process
|
|
155
|
+
stopped, stop a process only when its directory is inside this project, and stop its children
|
|
156
|
+
before the parent. Never stop a process because its command line matches a name: one
|
|
157
|
+
`pkill` pattern reaches every project on the machine. If a local request in Steps 5a and
|
|
158
|
+
5b fails after 0 ms while the port listens, the sandbox blocked it. Request escalation
|
|
159
|
+
with a prefix rule for `curl`, run it again, and do not record a failed predicate.
|
|
317
160
|
|
|
318
161
|
### Step 5a -- Prove that the page's data reaches the model
|
|
319
162
|
|
|
@@ -329,14 +172,19 @@ record it invented, and the first thing to notice is a card in a screenshot.
|
|
|
329
172
|
Where this journey shares page data with the agent, prove that path here. Read the context
|
|
330
173
|
entries this project's frontend publishes, from its own context call. Read the tool
|
|
331
174
|
declarations it registers as well, and carry both the way the page carries them, so that
|
|
332
|
-
the agent sees the request the browser sends rather than a thinner one.
|
|
175
|
+
the agent sees the request the browser sends rather than a thinner one. Read them from the
|
|
176
|
+
files the main coding agent named in the handoff, and search the project only for a file it
|
|
177
|
+
did not name. Do not search the dependencies for the shape of an entry: the page's own call
|
|
178
|
+
shows it. Send the same run
|
|
333
179
|
body twice, to `<runtime>/agent/<agent id>/run`: once carrying the context entries the page
|
|
334
180
|
publishes, and once carrying the same entries with one value changed. Use the step 1
|
|
335
181
|
request both times. Record the streamed events from each, and name both capture paths.
|
|
336
182
|
|
|
337
183
|
For the changed run, pick one record the step 1 request matches. Add a marker to a text
|
|
338
|
-
field that the answer repeats, such as its title
|
|
339
|
-
` [probe-<8 random hex characters>]`.
|
|
184
|
+
field that the answer repeats and that the step 1 request does not quote, such as its title
|
|
185
|
+
or name: ` [probe-<8 random hex characters>]`. A model can copy text the request carries
|
|
186
|
+
from the request rather than from the context, so a marker there proves nothing. Where the
|
|
187
|
+
request quotes every text field of that record, add the marker to its id. Choose a new marker for each run, record it, and
|
|
340
188
|
change nothing else. Do not remove the entry or send `context: []` instead. The page always
|
|
341
189
|
sends its entries. A model with a request about records, a tool that needs them, and
|
|
342
190
|
nothing to copy invents records. That failure belongs to the probe, not to the integration.
|
|
@@ -366,9 +214,14 @@ frontend does not know falls to a surface nothing draws. Neither writes anything
|
|
|
366
214
|
browser console, so the browser step reports a finished turn, a blank card, and no error
|
|
367
215
|
to read.
|
|
368
216
|
|
|
369
|
-
Read the registrations this project's frontend declares, by name.
|
|
370
|
-
|
|
371
|
-
|
|
217
|
+
Read the registrations this project's frontend declares, by name. Step 5a already sent the
|
|
218
|
+
step 1 request with those declarations, so read the tool calls out of the events Step 5a
|
|
219
|
+
captured for the run carrying the page's unchanged context. Do not send that request again.
|
|
220
|
+
Where Step 5a sent no run, because this journey shares no page data, send the step 1 request
|
|
221
|
+
to `<runtime>/agent/<agent id>/run`, carrying those declarations, and read the tool calls out
|
|
222
|
+
of that run's own events. Where the Step 5a run carried none of those declarations, send
|
|
223
|
+
that run once more with them, and read that run instead. Never report a wiring gap from a run
|
|
224
|
+
that carried no declarations: the agent has no component to call in it. The agent has to call one of the names the frontend registered. An
|
|
372
225
|
agent that calls nothing, or calls a name no registration matches, is a wiring gap for
|
|
373
226
|
implementation to close rather than a proof repair. Return the name and the frontend file
|
|
374
227
|
you read, before the browser.
|
|
@@ -396,7 +249,7 @@ For a recorded `both-oss` starting state, this step has no component to render.
|
|
|
396
249
|
same request the baseline recorded, require the same kind of user-visible result the
|
|
397
250
|
baseline produced, and require that the thread for that request is listed in the drawer.
|
|
398
251
|
Where this journey's frontend framework ships no threads drawer -- React Native --, prove
|
|
399
|
-
that thread with `npx --prefer-offline --yes copilotkit@4.
|
|
252
|
+
that thread with `npx --prefer-offline --yes copilotkit@4.23.0 verify --round-trip`, which reads the
|
|
400
253
|
answer back off the thread and needs no browser. Record which of the two you proved.
|
|
401
254
|
|
|
402
255
|
Use the surface control the main coding agent recorded for your environment. That finding
|
|
@@ -424,17 +277,17 @@ limit can be ten minutes. You cannot interrupt a call while it runs, so the limi
|
|
|
424
277
|
what you do after one. If a browser call took longer than 60 seconds to return, the browser
|
|
425
278
|
control is unresponsive. Do not call the browser again in this attempt. A second call to a
|
|
426
279
|
hung tool waits as long as the first one did. Run
|
|
427
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
280
|
+
`npx --prefer-offline --yes copilotkit@4.23.0 verify --frontend-url <the frontendUrl the proof checks resolved> --json` once,
|
|
428
281
|
and record the `frontend_assets_served` result. Report the outcome `failed` with the cause
|
|
429
282
|
`browser-control-unresponsive`. The application is not at fault on this evidence: every
|
|
430
283
|
step before the browser proved the runtime without one, and no repair to the project can
|
|
431
284
|
reach the tool.
|
|
432
285
|
|
|
433
|
-
1. Open the
|
|
286
|
+
1. Open the `frontendUrl` the proof checks resolved, exactly as they reported it, and wait for
|
|
434
287
|
the page to finish loading. Do not retype the host, and do not substitute a URL a tool
|
|
435
288
|
offers you by default. Where the page loads but its styling is missing or the chat
|
|
436
289
|
control is dead, run
|
|
437
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
290
|
+
`npx --prefer-offline --yes copilotkit@4.23.0 verify --frontend-url <the url you opened> --json`
|
|
438
291
|
before you diagnose anything else. A dev server can serve its page and refuse every
|
|
439
292
|
static chunk behind it, and on screen that is indistinguishable from a broken
|
|
440
293
|
integration. The `frontend_assets_served` check tells the two apart.
|
|
@@ -546,18 +399,25 @@ Step 9 can write only the tool files named by its guide or by this step.
|
|
|
546
399
|
Fetch the continued-development guide from the main coding agent with the proof
|
|
547
400
|
documentation. Try the continued-development tools after the application passes proof.
|
|
548
401
|
|
|
402
|
+
The implementation subagent installs the Skills when the developer approved them. Check that
|
|
403
|
+
it did. Look for the `.agents/skills` directory and the `.claude/skills` links in this
|
|
404
|
+
project, and read the Skills result the implementation reported. Do not install them again.
|
|
405
|
+
|
|
406
|
+
Where the developer declined them, do not install them, and do not call that a change from
|
|
407
|
+
the plan. Report the command for them to run later instead:
|
|
408
|
+
`npx skills add CopilotKit/CopilotKit/skills -y`.
|
|
409
|
+
|
|
410
|
+
Where the developer approved them and they are missing, install them as a recovery step.
|
|
549
411
|
Tell the developer what the skills install writes into this project before you run it: a
|
|
550
412
|
`.agents/skills` directory holding one folder per CopilotKit skill, linked into
|
|
551
413
|
`.claude/skills`. Both sit in the working tree, so the install shows up in `git status`
|
|
552
414
|
and can land in a commit. You cannot know whether this project keeps those directories in
|
|
553
|
-
version control, so name them before you write them rather than after.
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
for them to run later instead: `npx skills add CopilotKit/CopilotKit/skills -y`.
|
|
415
|
+
version control, so name them before you write them rather than after. Then run
|
|
416
|
+
`npx skills add CopilotKit/CopilotKit/skills -y` to install the
|
|
417
|
+
project-scoped CopilotKit Skills. Record that the proof ran the install because the
|
|
418
|
+
implementation did not.
|
|
558
419
|
|
|
559
|
-
|
|
560
|
-
Skills read the CopilotKit documentation without one.
|
|
420
|
+
Do not register an MCP server: the Skills read the CopilotKit documentation without one.
|
|
561
421
|
|
|
562
422
|
Check whether the install succeeded and record what you found. Record the command result.
|
|
563
423
|
Report the Skills result separately from the proof result. A tool error does not change the
|
|
@@ -30,13 +30,13 @@ Before you show the best-effort plan, require this complete packet:
|
|
|
30
30
|
- Give the ordered proof rules.
|
|
31
31
|
|
|
32
32
|
After the developer approves the best-effort plan, run
|
|
33
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
33
|
+
`npx --prefer-offline --yes copilotkit@4.23.0 onboard read fallback/best-effort`.
|
|
34
34
|
|
|
35
35
|
Send one short report. The friction command follows the telemetry setting the developer
|
|
36
36
|
already chose, so it needs no separate question.
|
|
37
37
|
|
|
38
38
|
```text
|
|
39
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
39
|
+
npx --prefer-offline --yes copilotkit@4.23.0 onboard friction --phase stop --category <slug> --message "<sentences>"
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
`--message` takes one or two sentences: the step you stopped at and what stopped it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "copilotkit",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.23.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.9.0"
|
|
@@ -16,5 +16,8 @@
|
|
|
16
16
|
"optionalDependencies": {
|
|
17
17
|
"@microsoft/teams.cli": "3.0.3"
|
|
18
18
|
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"oidc-provider": "9.12.2"
|
|
21
|
+
},
|
|
19
22
|
"license": "SEE LICENSE IN LICENSE"
|
|
20
23
|
}
|