copilotkit 4.17.0 → 4.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -5
- package/cli-build-info.json +7 -7
- package/exporters/langgraph/README.md +118 -0
- package/exporters/langgraph/export_checkpointer.py +125 -0
- package/index.js +12227 -9022
- package/onboarding/index.json +1 -1
- package/onboarding/prompts/authenticate/start.md +18 -19
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +57 -200
- package/onboarding/prompts/credentials/plan.md +24 -23
- package/onboarding/prompts/credentials/settle-credentials.md +40 -213
- package/onboarding/prompts/credentials/write-plan.md +17 -8
- package/onboarding/prompts/fallback/best-effort.md +12 -12
- package/onboarding/prompts/feature/a2ui/implement.md +7 -7
- package/onboarding/prompts/feature/a2ui/proof.md +7 -7
- package/onboarding/prompts/feature/a2ui/start.md +53 -9
- package/onboarding/prompts/feature/channels/implement.md +8 -8
- package/onboarding/prompts/feature/channels/proof.md +7 -7
- package/onboarding/prompts/feature/channels/start.md +50 -7
- package/onboarding/prompts/feature/chat-suggestions/implement.md +7 -7
- package/onboarding/prompts/feature/chat-suggestions/proof.md +7 -7
- package/onboarding/prompts/feature/chat-suggestions/start.md +50 -7
- package/onboarding/prompts/feature/complete.md +2 -2
- package/onboarding/prompts/feature/learning/implement.md +24 -19
- package/onboarding/prompts/feature/learning/proof.md +8 -8
- package/onboarding/prompts/feature/learning/start.md +43 -20
- package/onboarding/prompts/feature/open-generative-ui/implement.md +7 -7
- package/onboarding/prompts/feature/open-generative-ui/proof.md +7 -7
- package/onboarding/prompts/feature/open-generative-ui/start.md +50 -7
- package/onboarding/prompts/feature/realtime-sync/implement.md +8 -8
- package/onboarding/prompts/feature/realtime-sync/proof.md +7 -7
- package/onboarding/prompts/feature/realtime-sync/start.md +49 -6
- package/onboarding/prompts/feature/rich-threads/implement.md +9 -9
- package/onboarding/prompts/feature/rich-threads/proof.md +7 -7
- package/onboarding/prompts/feature/rich-threads/start.md +49 -6
- package/onboarding/prompts/feature/stop.md +5 -5
- package/onboarding/prompts/feature/voice/implement.md +7 -7
- package/onboarding/prompts/feature/voice/proof.md +7 -7
- package/onboarding/prompts/feature/voice/start.md +50 -7
- 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/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 +2 -2
- package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
- 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 +3 -3
- package/onboarding/prompts/frontend/nextjs.md +3 -3
- package/onboarding/prompts/frontend/plan.md +9 -8
- package/onboarding/prompts/frontend/react-native.md +2 -2
- package/onboarding/prompts/frontend/react-spa.md +2 -2
- package/onboarding/prompts/frontend/vue.md +2 -2
- package/onboarding/prompts/implementation/build-and-validate.md +19 -20
- package/onboarding/prompts/proof/complete.md +11 -11
- package/onboarding/prompts/proof/oss-baseline.md +5 -5
- package/onboarding/prompts/proof/round-trip.md +16 -15
- package/onboarding/prompts/research/gather.md +6 -6
- package/onboarding/prompts/research/merge.md +3 -3
- package/onboarding/prompts/research/preflight.md +4 -4
- package/onboarding/prompts/research/route.md +5 -5
- package/onboarding/prompts/starter/clone.md +8 -7
- package/onboarding/prompts/stopped/run-failed.md +4 -4
- package/onboarding/prompts/subagent/create-plan.md +10 -1
- package/onboarding/prompts/subagent/inspect-repository.md +9 -2
- package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
- package/onboarding/prompts/subagent/prove-round-trip.md +47 -17
- package/onboarding/prompts/unsupported/no-validated-path.md +4 -4
- package/package.json +1 -1
- package/release/release-tool.js +19 -5
|
@@ -32,7 +32,7 @@ Prove the live runtime in this order:
|
|
|
32
32
|
4. Confirm from project files that the runtime constructor passes a `runner` option rather
|
|
33
33
|
than an `intelligence` option. A package, import, project file, or key is not use proof.
|
|
34
34
|
5. Run
|
|
35
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
35
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 verify --expect-runtime oss --round-trip --agent <expected-agent-id> --json`,
|
|
36
36
|
with the runtime URL or auth header options that this project needs. Require exit zero
|
|
37
37
|
and the JSON `ok` field to be `true`.
|
|
38
38
|
6. Drive one real request through the existing frontend, CopilotKit runtime, and expected
|
|
@@ -10,6 +10,11 @@ and the credential write that Step 4 names for `api_key_loadable_by_app`.
|
|
|
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
|
|
|
13
|
+
One CLI command is the exception to both rules. The Step 2 `onboard runtime-url` command
|
|
14
|
+
can write `.copilotkit/project.json` even when that path is protected. It moves the
|
|
15
|
+
protected-path baseline with its own write, and it refuses a record that changed since the
|
|
16
|
+
baseline. Never edit that file any other way.
|
|
17
|
+
|
|
13
18
|
The existing agent's behavior is outside every step of this proof. It is four things: the
|
|
14
19
|
agent's system prompt and instructions, its tools and what those tools do, its model and
|
|
15
20
|
provider configuration, and its memory or state handling. A failing predicate is repaired
|
|
@@ -123,6 +128,22 @@ A zero exit means the server answered. Any other exit means that it did not answ
|
|
|
123
128
|
seconds. A server that never answered has written the reason to its own output, and
|
|
124
129
|
reading that output is faster than starting it again.
|
|
125
130
|
|
|
131
|
+
When the server that serves the runtime answers, record the URL it serves on. Read the port
|
|
132
|
+
from that server's own output or its listener, not from the plan. A dev server whose port
|
|
133
|
+
is taken moves to the next free one without asking. Where the runtime runs as a process of
|
|
134
|
+
its own, this is the runtime's port, not the frontend's.
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard runtime-url --url <runtime-url>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`<runtime-url>` is the Step 1 runtime URL with its port replaced by the port that server
|
|
141
|
+
bound. Keep its host and its mount path unchanged.
|
|
142
|
+
|
|
143
|
+
The command writes `runtimeUrl` into `.copilotkit/project.json` and changes nothing else. It
|
|
144
|
+
mints no key and does not touch `.env`. Step 4 reads that record, so `verify` probes the
|
|
145
|
+
server you started. Run the command again after any restart that binds another port.
|
|
146
|
+
|
|
126
147
|
That coupling also turns an ordinary restart into a false failure. Where you stop a server
|
|
127
148
|
to pick up an installed dependency, start both again and wait for both to answer before you
|
|
128
149
|
read the round trip. A check run against a frontend whose agent was stopped with it reports
|
|
@@ -163,10 +184,10 @@ IPv6 only, so an IPv4 literal fails against the correct port.
|
|
|
163
184
|
## Step 4 -- Check the wiring
|
|
164
185
|
|
|
165
186
|
With both running, check the wiring in one command before you open a browser:
|
|
166
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
187
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 verify --json`. It reads the port from this project, so a
|
|
167
188
|
non-default port needs no flag. The payload reports `runtimeUrl` and `runtimeUrlSource`. A
|
|
168
|
-
`runtimeUrlSource` of `default` means nothing in the project named a port, so
|
|
169
|
-
|
|
189
|
+
`runtimeUrlSource` of `default` means nothing in the project named a port, so the Step 2
|
|
190
|
+
record is missing. Run the Step 2 `onboard runtime-url` command, then run `verify` again. Read the individual checks rather than
|
|
170
191
|
the summary alone: a check reported `undetermined` did not run, and that is not a pass.
|
|
171
192
|
Repair a failed check only within the limits above. Otherwise, return the check and its
|
|
172
193
|
evidence before the browser.
|
|
@@ -197,7 +218,7 @@ named no port the CLI can read: keep step 2's URL, and rewrite its host as `loca
|
|
|
197
218
|
before you use it.
|
|
198
219
|
|
|
199
220
|
Then run the command once more with the URL you are about to open:
|
|
200
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
221
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 verify --frontend-url <that url> --json`. The
|
|
201
222
|
`frontend_assets_served` check asks that server for its page and for one of the page's own
|
|
202
223
|
assets, on that exact host. A `fail` there means the dev server refuses its own static
|
|
203
224
|
assets on the host you were about to use, and the check names the URL to use instead. This
|
|
@@ -205,7 +226,7 @@ is the cheapest step that can save the most expensive one, so run it before the
|
|
|
205
226
|
|
|
206
227
|
## Step 5 -- Prove that the agent runs
|
|
207
228
|
|
|
208
|
-
Run `npx --prefer-offline --yes copilotkit@4.
|
|
229
|
+
Run `npx --prefer-offline --yes copilotkit@4.18.0 verify --round-trip --json`. It sends one request through
|
|
209
230
|
the runtime and reads the answer back from the thread, so it separates an agent that is
|
|
210
231
|
configured from an agent that works. Use `--agent <id>` when the runtime declares more
|
|
211
232
|
than one. If it reports `user-not-identified`, this project's `identifyUser` reads a
|
|
@@ -218,7 +239,7 @@ Where this run settled a Learning Container, add the flag to the call above rath
|
|
|
218
239
|
running a second round trip:
|
|
219
240
|
|
|
220
241
|
```text
|
|
221
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
242
|
+
npx --prefer-offline --yes copilotkit@4.18.0 verify --round-trip --expect-learning-container <container id> --json
|
|
222
243
|
```
|
|
223
244
|
|
|
224
245
|
The check reads the thread that this run created, so a second round trip proves a second
|
|
@@ -252,7 +273,7 @@ the credential was written holds an empty key while the file beside it carries t
|
|
|
252
273
|
one. Run this from the target app directory:
|
|
253
274
|
|
|
254
275
|
```text
|
|
255
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
276
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard env-staleness
|
|
256
277
|
```
|
|
257
278
|
|
|
258
279
|
A `stale` line names the env file and how long after launch it was written. Report that,
|
|
@@ -268,7 +289,7 @@ environment on to every process it starts, so a provider base URL exported for t
|
|
|
268
289
|
reaches the dev servers. Run this from the target app directory:
|
|
269
290
|
|
|
270
291
|
```text
|
|
271
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
292
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard inspect --json
|
|
272
293
|
```
|
|
273
294
|
|
|
274
295
|
Read `providerEndpoints` for the app directory. An entry with a `null` `source` came from
|
|
@@ -290,13 +311,22 @@ entries this project's frontend publishes, from its own context call. Read the t
|
|
|
290
311
|
declarations it registers as well, and carry both the way the page carries them, so that
|
|
291
312
|
the agent sees the request the browser sends rather than a thinner one. Send the same run
|
|
292
313
|
body twice, to `<runtime>/agent/<agent id>/run`: once carrying the context entries the page
|
|
293
|
-
publishes, and once carrying
|
|
294
|
-
streamed events from each, and name both capture paths.
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
314
|
+
publishes, and once carrying the same entries with one value changed. Use the step 1
|
|
315
|
+
request both times. Record the streamed events from each, and name both capture paths.
|
|
316
|
+
|
|
317
|
+
For the changed run, pick one record the step 1 request matches. Add a marker to a text
|
|
318
|
+
field that the answer repeats, such as its title or name:
|
|
319
|
+
` [probe-<8 random hex characters>]`. Choose a new marker for each run, record it, and
|
|
320
|
+
change nothing else. Do not remove the entry or send `context: []` instead. The page always
|
|
321
|
+
sends its entries. A model with a request about records, a tool that needs them, and
|
|
322
|
+
nothing to copy invents records. That failure belongs to the probe, not to the integration.
|
|
323
|
+
|
|
324
|
+
Read each answer against the context it carried. The run carrying the page's context has to
|
|
325
|
+
name the project's own records and no others. The run carrying the changed entry has to
|
|
326
|
+
carry the marker, character for character, and name no record its context did not hold. A
|
|
327
|
+
model that the context never reaches cannot produce the marker. A model that invents a
|
|
328
|
+
different record on every call cannot produce it either, so two answers that only differ
|
|
329
|
+
prove nothing. An answer without the marker means the page's data is not reaching the model.
|
|
300
330
|
|
|
301
331
|
Return the cause and both captures on a failed comparison. Do not open a browser on a
|
|
302
332
|
failed comparison, and do not edit the project here.
|
|
@@ -346,7 +376,7 @@ For a recorded `both-oss` starting state, this step has no component to render.
|
|
|
346
376
|
same request the baseline recorded, require the same kind of user-visible result the
|
|
347
377
|
baseline produced, and require that the thread for that request is listed in the drawer.
|
|
348
378
|
Where this journey's frontend framework ships no threads drawer -- React Native --, prove
|
|
349
|
-
that thread with `npx --prefer-offline --yes copilotkit@4.
|
|
379
|
+
that thread with `npx --prefer-offline --yes copilotkit@4.18.0 verify --round-trip`, which reads the
|
|
350
380
|
answer back off the thread and needs no browser. Record which of the two you proved.
|
|
351
381
|
|
|
352
382
|
Use the surface control the main coding agent recorded for your environment. It either had
|
|
@@ -374,7 +404,7 @@ request never exercises. Drive it with the browser control step 6 named.
|
|
|
374
404
|
the page to finish loading. Do not retype the host, and do not substitute a URL a tool
|
|
375
405
|
offers you by default. Where the page loads but its styling is missing or the chat
|
|
376
406
|
control is dead, run
|
|
377
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
407
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 verify --frontend-url <the url you opened> --json`
|
|
378
408
|
before you diagnose anything else. A dev server can serve its page and refuse every
|
|
379
409
|
static chunk behind it, and on screen that is indistinguishable from a broken
|
|
380
410
|
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.18.0 onboard read fallback/best-effort`.
|
|
34
34
|
|
|
35
|
-
Send one short report.
|
|
36
|
-
|
|
35
|
+
Send one short report. The friction command follows the telemetry setting the developer
|
|
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.18.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
|
@@ -14811,7 +14811,7 @@ var FLAG_DEFINITIONS = defineFlags({
|
|
|
14811
14811
|
|
|
14812
14812
|
// apps/cli/src/config.ts
|
|
14813
14813
|
function getTemplateRef() {
|
|
14814
|
-
return true ? "
|
|
14814
|
+
return true ? "70d1f3c0a832d6274e2fe710e24102f6429f14f4" : "main";
|
|
14815
14815
|
}
|
|
14816
14816
|
|
|
14817
14817
|
// apps/cli/src/services/agentcore-config.ts
|
|
@@ -15027,7 +15027,20 @@ var TELEMETRY_ERROR_CODES = {
|
|
|
15027
15027
|
LEARNING_RESPONSE_INVALID: "LEARNING_RESPONSE_INVALID",
|
|
15028
15028
|
LEARNING_SKILLS_BUNDLE_INVALID: "LEARNING_SKILLS_BUNDLE_INVALID",
|
|
15029
15029
|
LEARNING_SKILLS_INTEGRITY_FAILED: "LEARNING_SKILLS_INTEGRITY_FAILED",
|
|
15030
|
-
LEARNING_SKILLS_OUTPUT_EXISTS: "LEARNING_SKILLS_OUTPUT_EXISTS"
|
|
15030
|
+
LEARNING_SKILLS_OUTPUT_EXISTS: "LEARNING_SKILLS_OUTPUT_EXISTS",
|
|
15031
|
+
/** A device sign-in code ran out before anybody approved it. */
|
|
15032
|
+
DEVICE_LOGIN_EXPIRED: "DEVICE_LOGIN_EXPIRED",
|
|
15033
|
+
/** The person denied a device sign-in request. */
|
|
15034
|
+
DEVICE_LOGIN_DENIED: "DEVICE_LOGIN_DENIED",
|
|
15035
|
+
/** The server does not offer device sign-in. */
|
|
15036
|
+
DEVICE_LOGIN_UNAVAILABLE: "DEVICE_LOGIN_UNAVAILABLE",
|
|
15037
|
+
/** `login --json` refused a new code after repeated unapproved expiries. */
|
|
15038
|
+
LOGIN_REPEATED_EXPIRY: "LOGIN_REPEATED_EXPIRY",
|
|
15039
|
+
/**
|
|
15040
|
+
* An import source's environment is missing a required value or holds one
|
|
15041
|
+
* the importer rejects, such as an unset `MASTRA_IMPORT_AGENT_ID` (PE-397).
|
|
15042
|
+
*/
|
|
15043
|
+
IMPORT_SOURCE_CONFIG_INVALID: "IMPORT_SOURCE_CONFIG_INVALID"
|
|
15031
15044
|
};
|
|
15032
15045
|
function tagError(err, code) {
|
|
15033
15046
|
err.code = code;
|
|
@@ -15428,9 +15441,10 @@ var projectConfigSchema = external_exports.object({
|
|
|
15428
15441
|
* container, a port that only ever appears on a command line — says so once
|
|
15429
15442
|
* instead of passing `--runtime-url` on every invocation (OSS-1090).
|
|
15430
15443
|
*
|
|
15431
|
-
* A person writes it, and so
|
|
15432
|
-
*
|
|
15433
|
-
*
|
|
15444
|
+
* A person writes it, and so do `project select --runtime-url` and
|
|
15445
|
+
* `onboard runtime-url`, which records the port a started server bound
|
|
15446
|
+
* (PE-368). An onboarding run settles a free port and then has nowhere to
|
|
15447
|
+
* put it, so `verify` falls back to its assumed default and reports on whatever holds
|
|
15434
15448
|
* that port — in one run, an unrelated checkout (PE-58). The flag is still
|
|
15435
15449
|
* a statement rather than a guess: the caller has to name the URL.
|
|
15436
15450
|
*/
|