copilotkit 4.21.0 → 4.22.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 +29 -6
- package/cli-build-info.json +8 -8
- package/index.js +4558 -3358
- package/onboarding/index.json +10 -1
- package/onboarding/prompts/authenticate/start.md +11 -17
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +7 -7
- package/onboarding/prompts/credentials/plan.md +36 -25
- package/onboarding/prompts/credentials/settle-credentials.md +3 -3
- package/onboarding/prompts/credentials/write-plan.md +10 -18
- package/onboarding/prompts/fallback/best-effort.md +8 -8
- package/onboarding/prompts/feature/a2ui/implement.md +6 -6
- package/onboarding/prompts/feature/a2ui/proof.md +5 -5
- package/onboarding/prompts/feature/a2ui/start.md +9 -9
- package/onboarding/prompts/feature/channels/implement.md +7 -7
- package/onboarding/prompts/feature/channels/proof.md +5 -5
- package/onboarding/prompts/feature/channels/start.md +9 -9
- package/onboarding/prompts/feature/chat-suggestions/implement.md +6 -6
- package/onboarding/prompts/feature/chat-suggestions/proof.md +5 -5
- package/onboarding/prompts/feature/chat-suggestions/start.md +9 -9
- package/onboarding/prompts/feature/complete.md +2 -2
- package/onboarding/prompts/feature/learning/implement.md +13 -13
- package/onboarding/prompts/feature/learning/proof.md +6 -6
- package/onboarding/prompts/feature/learning/start.md +9 -9
- package/onboarding/prompts/feature/open-generative-ui/implement.md +6 -6
- package/onboarding/prompts/feature/open-generative-ui/proof.md +5 -5
- package/onboarding/prompts/feature/open-generative-ui/start.md +9 -9
- package/onboarding/prompts/feature/realtime-sync/implement.md +7 -7
- package/onboarding/prompts/feature/realtime-sync/proof.md +5 -5
- package/onboarding/prompts/feature/realtime-sync/start.md +8 -8
- package/onboarding/prompts/feature/rich-threads/implement.md +8 -8
- package/onboarding/prompts/feature/rich-threads/proof.md +5 -5
- package/onboarding/prompts/feature/rich-threads/start.md +8 -8
- package/onboarding/prompts/feature/stop.md +3 -3
- package/onboarding/prompts/feature/voice/implement.md +6 -6
- package/onboarding/prompts/feature/voice/proof.md +5 -5
- package/onboarding/prompts/feature/voice/start.md +9 -9
- 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 +98 -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 +12 -12
- package/onboarding/prompts/proof/complete.md +3 -3
- package/onboarding/prompts/proof/oss-baseline.md +5 -5
- package/onboarding/prompts/proof/round-trip.md +10 -10
- package/onboarding/prompts/research/gather.md +5 -5
- package/onboarding/prompts/research/merge.md +2 -2
- package/onboarding/prompts/research/preflight.md +2 -2
- package/onboarding/prompts/research/route.md +9 -9
- package/onboarding/prompts/starter/clone.md +15 -14
- package/onboarding/prompts/stopped/run-failed.md +2 -2
- package/onboarding/prompts/subagent/create-plan.md +26 -40
- package/onboarding/prompts/subagent/implement-and-validate.md +26 -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 +86 -244
- package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
- package/package.json +1 -1
- package/release/release-tool.js +1 -1
|
@@ -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,89 @@ 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
|
-
```
|
|
140
|
-
|
|
141
|
-
`<runtime-url>` is the Step 1 runtime URL with its port replaced by the port that server
|
|
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:
|
|
257
|
-
|
|
258
|
-
```text
|
|
259
|
-
npx --prefer-offline --yes copilotkit@4.21.0 verify --round-trip --expect-learning-container <container id> --json
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
The check reads the thread that this run created, so a second round trip proves a second
|
|
263
|
-
thread and leaves the first unexamined. Add `--agent <id>` here too when the runtime
|
|
264
|
-
declares more than one.
|
|
265
|
-
|
|
266
|
-
It reads the thread back from the platform, so it answers for every runtime mount,
|
|
267
|
-
including a single-route one. Read the `extraChecks` entry whose `id` is
|
|
268
|
-
`learning_container_assigned`, and route on that entry's own `status` rather than on the
|
|
269
|
-
exit status: the command exits non-zero for any check that is not `pass`, and
|
|
270
|
-
`undetermined` is what a runtime the CLI cannot read reports.
|
|
271
|
-
|
|
272
|
-
- `pass` proves the assignment. The thread came back carrying the container this run
|
|
273
|
-
settled.
|
|
274
|
-
- `fail` is a defect. Either the thread carries no container, which means the selector
|
|
275
|
-
returned nothing, or it carries a different one. A thread cannot move between containers
|
|
276
|
-
after its first assignment, so start a new thread rather than repairing that one.
|
|
277
|
-
- `undetermined` proves nothing either way. Record it and continue. An auth-gated
|
|
278
|
-
`identifyUser` produces it on an app that works, and so does a runtime the CLI cannot
|
|
279
|
-
read.
|
|
280
|
-
|
|
281
|
-
`features.self_learning` and `/info` are not evidence. The first is a plan entitlement and
|
|
282
|
-
is already true before any wiring. The second reports Learning from the presence of a
|
|
283
|
-
callback rather than from an assigned thread. Never report either one as proof.
|
|
284
|
-
|
|
285
|
-
Where this run skipped the Learning step, leave the flag off.
|
|
286
|
-
|
|
287
|
-
Where the runtime answers with a 401 from the model provider, check the processes before
|
|
288
|
-
you change anything. A process reads its env file once, at launch, so one started before
|
|
289
|
-
the credential was written holds an empty key while the file beside it carries the real
|
|
290
|
-
one. Run this from the target app directory:
|
|
291
|
-
|
|
292
|
-
```text
|
|
293
|
-
npx --prefer-offline --yes copilotkit@4.21.0 onboard env-staleness
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
A `stale` line names the env file and how long after launch it was written. Report that,
|
|
297
|
-
with the process and the file it named, and say the process has to be started again before
|
|
298
|
-
the 401 means anything. Do not restart it yourself and do not stop it: the reading names a
|
|
299
|
-
process and never its owner, and one project's dev script often serves the agent and the
|
|
300
|
-
frontend together. Editing a file to answer a 401 that a restart clears changes the project
|
|
301
|
-
for a fault it does not have.
|
|
76
|
+
## Steps 2 to 5 -- Run the proof checks
|
|
302
77
|
|
|
303
|
-
|
|
304
|
-
processes inherited before you change anything. A coding agent's shell passes its own
|
|
305
|
-
environment on to every process it starts, so a provider base URL exported for the agent
|
|
306
|
-
reaches the dev servers. Run this from the target app directory:
|
|
78
|
+
Run this from the target app directory:
|
|
307
79
|
|
|
308
80
|
```text
|
|
309
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
81
|
+
npx --prefer-offline --yes copilotkit@4.22.0 onboard proof-check --json
|
|
310
82
|
```
|
|
311
83
|
|
|
312
|
-
|
|
313
|
-
the
|
|
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. Read the
|
|
111
|
+
server log it names. A dev server whose port is taken moves to the next free one without
|
|
112
|
+
asking, and a starter's project records no URL until its server binds a port. Read the
|
|
113
|
+
port from the log, not from the plan, and record it:
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
npx --prefer-offline --yes copilotkit@4.22.0 onboard runtime-url --url <runtime-url>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`<runtime-url>` is the project's runtime URL, or the plan's, with its port replaced by the
|
|
120
|
+
port the server bound. Keep its host and its mount path unchanged. The command can write
|
|
121
|
+
`.copilotkit/project.json` even when that path is protected. It moves the protected-path
|
|
122
|
+
baseline with its own write. It mints no key and does not touch `.env`. Then run the
|
|
123
|
+
checks again.
|
|
124
|
+
- `runtime-process-in-project`: another project's process holds the runtime port. Leave it
|
|
125
|
+
running, and report it.
|
|
126
|
+
- `verify:api_key_loadable_by_app`: the key is in a file the app does not read. Run the
|
|
127
|
+
command the check names, from the app directory. Do not copy or link the key file.
|
|
128
|
+
- `verify:intelligence_thread_routes`: usually a missing `identifyUser` where the runtime is
|
|
129
|
+
constructed. Return it for implementation. Never remove a `mode: "single-route"` mount
|
|
130
|
+
to satisfy it.
|
|
131
|
+
- `round-trip:agent_answers` naming `user-not-identified`: this project's `identifyUser` reads a
|
|
132
|
+
session the CLI does not carry. Run again with `--header "Name: value"` for what it reads.
|
|
133
|
+
- `round-trip:page_context_reaches_agent` at `fail`: the agent answered the plain request
|
|
134
|
+
and recorded nothing for the request that carried context. Return it with its evidence as
|
|
135
|
+
a failed proof step. At `undetermined` and marked `advisory`, the agent answered without
|
|
136
|
+
the value, and the checks still pass: an agent scoped to its own task declines to repeat
|
|
137
|
+
an arbitrary value, so prove the path in Step 5a. At `undetermined` without `advisory`,
|
|
138
|
+
the context run did not complete, and the checks fail on it. Run them again once. If it
|
|
139
|
+
still does not complete, prove the path in Step 5a, and report the check with its detail.
|
|
140
|
+
- `round-trip:learning_container_assigned` at `fail`: the thread carries no container or
|
|
141
|
+
another one. A thread cannot move, so start a new thread rather than repairing that one.
|
|
142
|
+
`features.self_learning` and `/info` are not evidence of an assignment.
|
|
143
|
+
- `env-files-current`: the process it names started before its env file was written, and
|
|
144
|
+
has to start again before a 401 means anything. Report it. Do not restart or stop it.
|
|
145
|
+
- `provider-endpoints`: a provider base URL came from the shell, and the round trip reports
|
|
146
|
+
a 404 from the model provider. Report it. The server has to start from an environment
|
|
147
|
+
without it. Do not edit a project file.
|
|
148
|
+
- Any other `verify:` check: repair it only within the limits above, or return it with its
|
|
149
|
+
evidence before the browser.
|
|
150
|
+
|
|
151
|
+
Never report a round trip proved unless `round-trip:agent_answers` passed.
|
|
152
|
+
|
|
153
|
+
The checks leave every process they did not start running. If a repair needs a process
|
|
154
|
+
stopped, stop a process only when its directory is inside this project, and stop its children
|
|
155
|
+
before the parent. Never stop a process because its command line matches a name: one
|
|
156
|
+
`pkill` pattern reaches every project on the machine. If a local request in Steps 5a and
|
|
157
|
+
5b fails after 0 ms while the port listens, the sandbox blocked it. Request escalation
|
|
158
|
+
with a prefix rule for `curl`, run it again, and do not record a failed predicate.
|
|
317
159
|
|
|
318
160
|
### Step 5a -- Prove that the page's data reaches the model
|
|
319
161
|
|
|
@@ -396,7 +238,7 @@ For a recorded `both-oss` starting state, this step has no component to render.
|
|
|
396
238
|
same request the baseline recorded, require the same kind of user-visible result the
|
|
397
239
|
baseline produced, and require that the thread for that request is listed in the drawer.
|
|
398
240
|
Where this journey's frontend framework ships no threads drawer -- React Native --, prove
|
|
399
|
-
that thread with `npx --prefer-offline --yes copilotkit@4.
|
|
241
|
+
that thread with `npx --prefer-offline --yes copilotkit@4.22.0 verify --round-trip`, which reads the
|
|
400
242
|
answer back off the thread and needs no browser. Record which of the two you proved.
|
|
401
243
|
|
|
402
244
|
Use the surface control the main coding agent recorded for your environment. That finding
|
|
@@ -424,17 +266,17 @@ limit can be ten minutes. You cannot interrupt a call while it runs, so the limi
|
|
|
424
266
|
what you do after one. If a browser call took longer than 60 seconds to return, the browser
|
|
425
267
|
control is unresponsive. Do not call the browser again in this attempt. A second call to a
|
|
426
268
|
hung tool waits as long as the first one did. Run
|
|
427
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
269
|
+
`npx --prefer-offline --yes copilotkit@4.22.0 verify --frontend-url <the frontendUrl the proof checks resolved> --json` once,
|
|
428
270
|
and record the `frontend_assets_served` result. Report the outcome `failed` with the cause
|
|
429
271
|
`browser-control-unresponsive`. The application is not at fault on this evidence: every
|
|
430
272
|
step before the browser proved the runtime without one, and no repair to the project can
|
|
431
273
|
reach the tool.
|
|
432
274
|
|
|
433
|
-
1. Open the
|
|
275
|
+
1. Open the `frontendUrl` the proof checks resolved, exactly as they reported it, and wait for
|
|
434
276
|
the page to finish loading. Do not retype the host, and do not substitute a URL a tool
|
|
435
277
|
offers you by default. Where the page loads but its styling is missing or the chat
|
|
436
278
|
control is dead, run
|
|
437
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
279
|
+
`npx --prefer-offline --yes copilotkit@4.22.0 verify --frontend-url <the url you opened> --json`
|
|
438
280
|
before you diagnose anything else. A dev server can serve its page and refuse every
|
|
439
281
|
static chunk behind it, and on screen that is indistinguishable from a broken
|
|
440
282
|
integration. The `frontend_assets_served` check tells the two apart.
|
|
@@ -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.22.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.22.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
package/release/release-tool.js
CHANGED
|
@@ -14823,7 +14823,7 @@ var FLAG_DEFINITIONS = defineFlags({
|
|
|
14823
14823
|
|
|
14824
14824
|
// apps/cli/src/config.ts
|
|
14825
14825
|
function getTemplateRef() {
|
|
14826
|
-
return true ? "
|
|
14826
|
+
return true ? "4b51d880eab2617e3196285ddcf0e4ff7b34a237" : "main";
|
|
14827
14827
|
}
|
|
14828
14828
|
|
|
14829
14829
|
// apps/cli/src/services/agentcore-config.ts
|