copilotkit 4.8.2 → 4.8.4
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 +218 -4
- package/cli-build-info.json +7 -7
- package/index.js +43404 -20635
- package/onboarding/index.json +179 -0
- package/onboarding/prompts/authenticate/start.md +83 -0
- package/onboarding/prompts/credentials/finalize-plan.md +185 -0
- package/onboarding/prompts/credentials/plan.md +38 -0
- package/onboarding/prompts/framework/google-adk.md +41 -0
- package/onboarding/prompts/framework/langgraph-python.md +28 -0
- package/onboarding/prompts/framework/langgraph-typescript.md +28 -0
- package/onboarding/prompts/framework/mastra.md +58 -0
- package/onboarding/prompts/framework/ms-agent-dotnet.md +66 -0
- package/onboarding/prompts/framework/ms-agent-python.md +41 -0
- package/onboarding/prompts/frontend/angular.md +27 -0
- package/onboarding/prompts/frontend/nextjs.md +23 -0
- package/onboarding/prompts/frontend/plan.md +27 -0
- package/onboarding/prompts/frontend/react-native.md +18 -0
- package/onboarding/prompts/frontend/react-spa.md +12 -0
- package/onboarding/prompts/frontend/vue.md +18 -0
- package/onboarding/prompts/implementation/build-and-validate.md +78 -0
- package/onboarding/prompts/proof/complete.md +59 -0
- package/onboarding/prompts/proof/round-trip.md +143 -0
- package/onboarding/prompts/subagent/create-plan.md +69 -0
- package/onboarding/prompts/subagent/implement-and-validate.md +48 -0
- package/onboarding/prompts/subagent/inspect-repository.md +24 -0
- package/onboarding/prompts/subagent/prove-round-trip.md +114 -0
- package/onboarding/prompts/unsupported/no-validated-path.md +22 -0
- package/package.json +4 -1
- package/release/release-tool.js +39 -5
package/README.md
CHANGED
|
@@ -36,6 +36,59 @@ its project-scoped `INTELLIGENCE_API_KEY`. Threads-enabled `init` and `create`
|
|
|
36
36
|
scaffolds run the same hosted project selection and API-key provisioning path;
|
|
37
37
|
use the built entrypoint when manually validating those steps too.
|
|
38
38
|
|
|
39
|
+
### Selecting a project without a terminal
|
|
40
|
+
|
|
41
|
+
The bare `project select` renders an interactive picker and therefore needs a
|
|
42
|
+
TTY, which a coding agent's shell is not. `--project` and `--create` name the
|
|
43
|
+
answer up front and run anywhere:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
copilotkit project list --json # see the choices
|
|
47
|
+
copilotkit project select --project <slug-or-id> # pick an existing one
|
|
48
|
+
copilotkit project select --create "My App" --json # create one and select it
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`--project` and `--create` are mutually exclusive. `--project` is resolved
|
|
52
|
+
against the organization's real projects, so a typo fails with the available
|
|
53
|
+
slugs instead of recording a selection that points at nothing.
|
|
54
|
+
|
|
55
|
+
`--json` emits one object on stdout:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"type": "completed",
|
|
60
|
+
"project": { "id": "220", "slug": "my-app", "organizationId": "org_123" },
|
|
61
|
+
"config_path": "/work/my-repo/.copilotkit/project.json",
|
|
62
|
+
"api_key_provisioned": true
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`config_path` is absolute, and it is not always under the directory you ran in.
|
|
67
|
+
The project record is repository-scoped: it goes into an existing `.copilotkit/`
|
|
68
|
+
at or above the current directory when there is one, and otherwise into the
|
|
69
|
+
repository root, so every part of a repository finds the same project. When that
|
|
70
|
+
is not the current directory, `project select` says so on stderr. Read the path
|
|
71
|
+
from this field rather than assuming `./.copilotkit/project.json`.
|
|
72
|
+
|
|
73
|
+
The API key is not hoisted with it. It is written to the `.env` beside the
|
|
74
|
+
directory you ran in, because that is the file the app process loads — so in a
|
|
75
|
+
repository with a `web/` and an `agent/` half, run `project select` in the half
|
|
76
|
+
that needs the key.
|
|
77
|
+
|
|
78
|
+
**Check `api_key_provisioned`, not just the exit code.** Key provisioning is
|
|
79
|
+
deliberately non-fatal: if it fails, the selection is still persisted, a warning
|
|
80
|
+
goes to stderr, and the command still exits 0 — leaving a scaffold with no
|
|
81
|
+
`INTELLIGENCE_API_KEY`, whose first run fails with an opaque "Failed to
|
|
82
|
+
initialize thread". That field is the only machine-readable signal of it.
|
|
83
|
+
Re-running `project select` is a valid recovery.
|
|
84
|
+
|
|
85
|
+
Failures use the `login --json` shape, `{"error": "...", "type": "failed"}`, and
|
|
86
|
+
exit 1.
|
|
87
|
+
|
|
88
|
+
With `--json` the payload is the only thing on stdout — warnings, errors, and
|
|
89
|
+
(when no selector is passed) the interactive picker all go to stderr — so
|
|
90
|
+
piping stdout into a parser is safe.
|
|
91
|
+
|
|
39
92
|
Do not run raw CLI source with commands such as
|
|
40
93
|
`pnpm exec tsx apps/cli/src/index.ts login`; source execution bypasses the
|
|
41
94
|
supported bundle, build-time defines, and packaging behavior, so it does not
|
|
@@ -60,6 +113,16 @@ commands. It stores the local CLI session used by `whoami`, `license`, and the
|
|
|
60
113
|
`init`/`create` workspace connection; it does not scaffold a project or issue a
|
|
61
114
|
license key by itself.
|
|
62
115
|
|
|
116
|
+
For a coding agent that needs an agent-readable sign-in flow, use:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
copilotkit login --json
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The command prints JSON lines for the sign-in URL, the action to take, and the
|
|
123
|
+
final result. It does not open a browser. A failed sign-in prints one final
|
|
124
|
+
failure object and exits nonzero.
|
|
125
|
+
|
|
63
126
|
The onboarding commands are:
|
|
64
127
|
|
|
65
128
|
- `copilotkit init`
|
|
@@ -134,6 +197,12 @@ available. Where the flow needs you to do something in a provider console it
|
|
|
134
197
|
stops and tells you what, why, which variables to set, and the exact command to
|
|
135
198
|
resume with. A stop is a normal outcome and exits 0.
|
|
136
199
|
|
|
200
|
+
At an interactive terminal, `channels add support --adapter teams` sets up the
|
|
201
|
+
Microsoft app automatically when it finds no existing credential input. Existing
|
|
202
|
+
Teams credentials in `.env` or the process environment keep the by-hand attach
|
|
203
|
+
path. Pass `--no-provision` to choose that path yourself. Non-interactive runs
|
|
204
|
+
stay on the by-hand path unless they pass `--provision`.
|
|
205
|
+
|
|
137
206
|
No flag accepts a credential value. Credentials are read from your project's
|
|
138
207
|
`.env`, from a named environment variable, or from a JSON document on stdin; at a
|
|
139
208
|
terminal the CLI offers a masked prompt instead.
|
|
@@ -210,8 +279,20 @@ copilotkit skills install --list
|
|
|
210
279
|
copilotkit skills onboard
|
|
211
280
|
copilotkit skills onboard --no-clipboard
|
|
212
281
|
copilotkit skills onboard --channels
|
|
282
|
+
# Run `copilotkit project select` in this directory first.
|
|
283
|
+
copilotkit skills download <learning-container-id> --output ./learned-skills
|
|
213
284
|
```
|
|
214
285
|
|
|
286
|
+
When the `learning.platform-v1` rollout flag is on, `copilotkit skills download`
|
|
287
|
+
signs in through the existing CLI session, reads the project selected in the
|
|
288
|
+
current directory, fetches that container's immutable ZIP through a
|
|
289
|
+
project-scoped app-api route, checks its SHA-256 ETag when present, and extracts
|
|
290
|
+
each skill directory into the new `--output` path.
|
|
291
|
+
It stops if the output path already exists. A malformed archive, unsafe path,
|
|
292
|
+
symbolic link, collision, or partial write leaves no output directory behind.
|
|
293
|
+
The CLI rejects downloads over 20 MiB and bundles with more than 1,000 files,
|
|
294
|
+
a file over 256 KiB, or more than 16 MiB of extracted content.
|
|
295
|
+
|
|
215
296
|
`--channels` hands over the Slack Channel setup prompt instead of the generic
|
|
216
297
|
add-CopilotKit-to-my-app prompt. It is the same prompt
|
|
217
298
|
`copilotkit channels setup` prints; only the prompt differs, and the install
|
|
@@ -309,6 +390,22 @@ The Microsoft Agent Framework .NET template uses GitHub Models. Set its C# agent
|
|
|
309
390
|
|
|
310
391
|
Do not commit generated `.env` files or personal secrets.
|
|
311
392
|
|
|
393
|
+
## Version Control
|
|
394
|
+
|
|
395
|
+
Outside a repository, `copilotkit init` runs `git init` in the new app and makes
|
|
396
|
+
an initial commit when a git identity is configured, so you have a restore point
|
|
397
|
+
before you start editing.
|
|
398
|
+
|
|
399
|
+
Inside a repository you already have, it does neither. A second `git init` would
|
|
400
|
+
make the new app a nested repository: commits made in it would go to the inner
|
|
401
|
+
repository, while the outer one saw only an untracked directory. The CLI names
|
|
402
|
+
the repository it found and leaves the new app for you to commit.
|
|
403
|
+
|
|
404
|
+
The project binding is recorded at that repository's root, so every directory in
|
|
405
|
+
it resolves to the same project, and the run says where it went. If the root
|
|
406
|
+
already binds a different project, the binding stays in the new app instead, so a
|
|
407
|
+
repository holding two Intelligence apps keeps one for each.
|
|
408
|
+
|
|
312
409
|
## Run A Generated Project
|
|
313
410
|
|
|
314
411
|
After scaffolding, the CLI prompts you to install dependencies:
|
|
@@ -349,6 +446,101 @@ For the Intelligence threads template, keep Docker Desktop running before `npm r
|
|
|
349
446
|
|
|
350
447
|
## Diagnostics
|
|
351
448
|
|
|
449
|
+
Use `copilotkit verify` to check that a project's wiring works before debugging
|
|
450
|
+
anything else:
|
|
451
|
+
|
|
452
|
+
```bash
|
|
453
|
+
copilotkit verify
|
|
454
|
+
copilotkit verify --json # machine-readable output
|
|
455
|
+
copilotkit verify --runtime-url http://localhost:8080/copilotkit
|
|
456
|
+
copilotkit verify --round-trip # also run the agent
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
It checks that a hosted project is selected, that a project API key is present
|
|
460
|
+
and authenticates against Intelligence, that the CopilotKit runtime responds,
|
|
461
|
+
that the runtime declares at least one agent, that the runtime is actually
|
|
462
|
+
using the credential, and that it serves the thread routes the license pays
|
|
463
|
+
for. It also reports the runtime version, the agent framework in use, the
|
|
464
|
+
realtime gateway wiring, the plan, and the license state.
|
|
465
|
+
|
|
466
|
+
The selected project is read from the nearest `.copilotkit/project.json` at or
|
|
467
|
+
above the current directory, stopping at the repository root, so running from
|
|
468
|
+
one half of a repository finds the project the repository is bound to. `verify`
|
|
469
|
+
names the directory it read the project from, and names where it searched when
|
|
470
|
+
it found none. The API key is read from the `.env` beside the current directory
|
|
471
|
+
only, because that is the file the app process loads.
|
|
472
|
+
|
|
473
|
+
That last check is the one a passing build cannot give you. A key in `.env`
|
|
474
|
+
proves only that one was provisioned: the runtime reads no environment variable
|
|
475
|
+
for it, so a runtime built without an Intelligence client runs in SSE mode and
|
|
476
|
+
never reads the key — while still compiling, serving, and answering in a
|
|
477
|
+
browser. `verify` reads the runtime's own reported license to tell the two
|
|
478
|
+
apart, and only a running runtime can answer that, so the check stays `UNKNOWN`
|
|
479
|
+
when the runtime is unreachable.
|
|
480
|
+
|
|
481
|
+
Every check reports `PASS`, `FAIL`, or `UNKNOWN`, and `UNKNOWN` never means the
|
|
482
|
+
check passed — an unreachable Intelligence API leaves the API key unproven
|
|
483
|
+
rather than condemning it. `verify` exits non-zero unless every check passed, so
|
|
484
|
+
a caller can branch on the command instead of parsing it. With `--json` the
|
|
485
|
+
payload is the only thing on stdout and every diagnostic goes to stderr, so
|
|
486
|
+
piping is safe.
|
|
487
|
+
|
|
488
|
+
The runtime URL defaults to `http://localhost:3000/api/copilotkit` and the
|
|
489
|
+
report always states which URL it probed, because a wrong default is the most
|
|
490
|
+
likely reason for a runtime failure. Pass `--runtime-url` when the frontend
|
|
491
|
+
serves the runtime elsewhere.
|
|
492
|
+
|
|
493
|
+
A runtime mounted `mode: "single-route"` refuses `GET /info`, so `verify` asks
|
|
494
|
+
the same question again through the POST envelope that mount does answer.
|
|
495
|
+
Reaching it that way counts as reachable, and the report says which shape
|
|
496
|
+
answered. That mount carries no thread or memory route, though, so a licensed
|
|
497
|
+
project on it fails the thread-route check with the mount named as the cause.
|
|
498
|
+
Removing `mode: "single-route"` fixes it.
|
|
499
|
+
|
|
500
|
+
### Proving the agent runs, not just that it is configured
|
|
501
|
+
|
|
502
|
+
Every check above describes the project. `--round-trip` makes it work: it sends
|
|
503
|
+
one real request through the runtime and reads the answer back from the thread.
|
|
504
|
+
|
|
505
|
+
```bash
|
|
506
|
+
copilotkit verify --round-trip
|
|
507
|
+
copilotkit verify --round-trip --agent incident_triage # several declared
|
|
508
|
+
copilotkit verify --round-trip --header "Cookie: session=…" # auth-gated app
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
It reads the answer back from `GET /threads/:id/messages` rather than from the
|
|
512
|
+
run's response, because those responses differ by mode. In Intelligence mode the
|
|
513
|
+
run returns a thread lock and a gateway URL, and the agent's events travel to the
|
|
514
|
+
browser over the realtime gateway — so a 200 there proves a run started, which is
|
|
515
|
+
precisely the outcome a runtime that dies mid-turn also produces. Reading the
|
|
516
|
+
thread is one assertion for both modes, and it proves the stronger fact: the
|
|
517
|
+
answer was recorded, not merely emitted. The thread the run reports wins over the
|
|
518
|
+
one the CLI sent, because Intelligence rewrites both ids when it takes the lock.
|
|
519
|
+
|
|
520
|
+
The assertion is that a non-empty answer came back, never what it said, so the
|
|
521
|
+
verdict does not depend on the model behind the agent. It costs a model call and
|
|
522
|
+
records a thread, which is why it is opt-in rather than part of the bare command.
|
|
523
|
+
|
|
524
|
+
`user-not-identified` is reported as `UNKNOWN` rather than `FAIL`. `identifyUser`
|
|
525
|
+
is the project's own code and usually reads a signed-in session, which a CLI
|
|
526
|
+
request does not carry, so an auth-gated app refusing it is that app working
|
|
527
|
+
correctly. Pass what it reads with `--header`, repeatable.
|
|
528
|
+
|
|
529
|
+
### What `verify` still does not prove
|
|
530
|
+
|
|
531
|
+
It does not drive a browser. Realtime delivery to a browser over the gateway,
|
|
532
|
+
browser-origin CORS and CSP, the frontend provider being wired to this runtime,
|
|
533
|
+
and a generative UI component actually rendering are all invisible to a
|
|
534
|
+
command-line check, and a round trip that passes here leaves every one of them
|
|
535
|
+
unverified.
|
|
536
|
+
|
|
537
|
+
It also cannot prove _which deployment_ answered. `--round-trip` proves that an
|
|
538
|
+
executable agent stands behind the id this project declares — which `/info`
|
|
539
|
+
alone cannot show, since it reports the names the runtime was configured with —
|
|
540
|
+
but a runtime pointed at another project's agent answers under that same id, and
|
|
541
|
+
a stale agent left running from earlier work still answers as though it were the
|
|
542
|
+
new one.
|
|
543
|
+
|
|
352
544
|
Use `copilotkit logs` when onboarding fails or support needs local CLI diagnostics:
|
|
353
545
|
|
|
354
546
|
```bash
|
|
@@ -365,12 +557,34 @@ revalidate the live Clerk organization before using local auth as needed. If a
|
|
|
365
557
|
workspace or organization check fails because the cached session is stale, the
|
|
366
558
|
CLI may clear local auth and rerun browser login before continuing.
|
|
367
559
|
|
|
560
|
+
### A command, subcommand, or flag that should exist is rejected
|
|
561
|
+
|
|
562
|
+
`npx` keys its cache on the spec string, so `copilotkit@latest` can keep serving
|
|
563
|
+
a build it installed while `latest` was an older version. Input that ships in the
|
|
564
|
+
published CLI then looks unshipped. Sandboxed environments with a prepopulated
|
|
565
|
+
npm cache, and a global `copilotkit` earlier on `PATH`, produce the same symptom.
|
|
566
|
+
|
|
567
|
+
Every rejection path — unknown command, unknown subcommand, and unknown option —
|
|
568
|
+
names the version that actually ran. Read it before concluding something was
|
|
569
|
+
never released, and compare it against the registry:
|
|
570
|
+
|
|
571
|
+
```bash
|
|
572
|
+
npm view copilotkit version # what is published
|
|
573
|
+
npx --yes copilotkit@<version> ... # pin it explicitly; bypasses the cached spec
|
|
574
|
+
rm -rf ~/.npm/_npx # if the pin is not enough
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
`copilotkit version` reports the same version alongside the build and commit.
|
|
578
|
+
Adding `@latest` does not force a re-resolve; only an exact-version spec or a
|
|
579
|
+
cache clear does.
|
|
580
|
+
|
|
368
581
|
## Telemetry
|
|
369
582
|
|
|
370
|
-
The CLI collects
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
583
|
+
The CLI collects usage data such as command names, results, and timing. While
|
|
584
|
+
you are signed in, the data is linked to your CopilotKit account. The onboarding
|
|
585
|
+
feedback command can also send up to 2,048 UTF-8 bytes of text. Collection is
|
|
586
|
+
enabled by default; the first interactive run prints a one-time notice that
|
|
587
|
+
explains the data and how to opt out.
|
|
374
588
|
|
|
375
589
|
Manage the preference at any time:
|
|
376
590
|
|
package/cli-build-info.json
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"package": {
|
|
4
4
|
"name": "copilotkit",
|
|
5
|
-
"version": "4.8.
|
|
5
|
+
"version": "4.8.4"
|
|
6
6
|
},
|
|
7
7
|
"intelligence": {
|
|
8
|
-
"commit": "
|
|
8
|
+
"commit": "6483664ecea767ad39fe52106d85b94731740150"
|
|
9
9
|
},
|
|
10
10
|
"copilotKit": {
|
|
11
|
-
"submittedInput": "
|
|
12
|
-
"commit": "
|
|
11
|
+
"submittedInput": "47c5510b4909f6728288ecf28d7b14cd14922d33",
|
|
12
|
+
"commit": "47c5510b4909f6728288ecf28d7b14cd14922d33"
|
|
13
13
|
},
|
|
14
14
|
"channel": "production",
|
|
15
15
|
"triggeringActor": "MikeRyanDev",
|
|
16
16
|
"workflow": {
|
|
17
|
-
"runId": "
|
|
18
|
-
"runUrl": "https://github.com/CopilotKit/Intelligence/actions/runs/
|
|
17
|
+
"runId": "32806721876",
|
|
18
|
+
"runUrl": "https://github.com/CopilotKit/Intelligence/actions/runs/32806721876"
|
|
19
19
|
},
|
|
20
20
|
"validationResult": "passed",
|
|
21
21
|
"ag2": {
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"revision": "main",
|
|
25
25
|
"pinned": false
|
|
26
26
|
},
|
|
27
|
-
"builtAt": "2026-08-
|
|
27
|
+
"builtAt": "2026-08-25T03:52:56Z"
|
|
28
28
|
}
|