copilotkit 4.8.3 → 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.
Files changed (44) hide show
  1. package/README.md +164 -0
  2. package/cli-build-info.json +7 -7
  3. package/index.js +5569 -3567
  4. package/onboarding/index.json +1 -140
  5. package/onboarding/prompts/authenticate/start.md +45 -9
  6. package/onboarding/prompts/credentials/finalize-plan.md +143 -15
  7. package/onboarding/prompts/credentials/plan.md +24 -50
  8. package/onboarding/prompts/framework/google-adk.md +26 -7
  9. package/onboarding/prompts/framework/langgraph-python.md +9 -4
  10. package/onboarding/prompts/framework/langgraph-typescript.md +9 -4
  11. package/onboarding/prompts/framework/mastra.md +42 -5
  12. package/onboarding/prompts/framework/ms-agent-dotnet.md +51 -6
  13. package/onboarding/prompts/framework/ms-agent-python.md +26 -6
  14. package/onboarding/prompts/frontend/angular.md +13 -4
  15. package/onboarding/prompts/frontend/nextjs.md +7 -2
  16. package/onboarding/prompts/frontend/plan.md +15 -20
  17. package/onboarding/prompts/frontend/react-native.md +2 -2
  18. package/onboarding/prompts/frontend/react-spa.md +1 -1
  19. package/onboarding/prompts/frontend/vue.md +2 -2
  20. package/onboarding/prompts/implementation/build-and-validate.md +72 -7
  21. package/onboarding/prompts/proof/complete.md +54 -2
  22. package/onboarding/prompts/proof/round-trip.md +134 -7
  23. package/onboarding/prompts/subagent/create-plan.md +57 -2
  24. package/onboarding/prompts/subagent/implement-and-validate.md +38 -3
  25. package/onboarding/prompts/subagent/inspect-repository.md +13 -3
  26. package/onboarding/prompts/subagent/prove-round-trip.md +103 -9
  27. package/onboarding/prompts/unsupported/no-validated-path.md +9 -4
  28. package/package.json +1 -1
  29. package/release/release-tool.js +32 -4
  30. package/onboarding/prompts/framework/ag2.md +0 -22
  31. package/onboarding/prompts/framework/agno.md +0 -23
  32. package/onboarding/prompts/framework/built-in.md +0 -21
  33. package/onboarding/prompts/framework/claude-sdk-python.md +0 -21
  34. package/onboarding/prompts/framework/claude-sdk-typescript.md +0 -21
  35. package/onboarding/prompts/framework/crewai-flows.md +0 -22
  36. package/onboarding/prompts/framework/deep-agents.md +0 -21
  37. package/onboarding/prompts/framework/langgraph-fastapi.md +0 -23
  38. package/onboarding/prompts/framework/llamaindex.md +0 -23
  39. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +0 -22
  40. package/onboarding/prompts/framework/pydantic-ai.md +0 -23
  41. package/onboarding/prompts/framework/strands-python.md +0 -23
  42. package/onboarding/prompts/framework/strands-typescript.md +0 -23
  43. package/onboarding/prompts/frontend/slack.md +0 -20
  44. package/onboarding/prompts/frontend/teams.md +0 -20
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
@@ -337,6 +390,22 @@ The Microsoft Agent Framework .NET template uses GitHub Models. Set its C# agent
337
390
 
338
391
  Do not commit generated `.env` files or personal secrets.
339
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
+
340
409
  ## Run A Generated Project
341
410
 
342
411
  After scaffolding, the CLI prompts you to install dependencies:
@@ -377,6 +446,101 @@ For the Intelligence threads template, keep Docker Desktop running before `npm r
377
446
 
378
447
  ## Diagnostics
379
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
+
380
544
  Use `copilotkit logs` when onboarding fails or support needs local CLI diagnostics:
381
545
 
382
546
  ```bash
@@ -2,20 +2,20 @@
2
2
  "schemaVersion": 1,
3
3
  "package": {
4
4
  "name": "copilotkit",
5
- "version": "4.8.3"
5
+ "version": "4.8.4"
6
6
  },
7
7
  "intelligence": {
8
- "commit": "a000695b07fd11c83d6a82d51079f839a876be66"
8
+ "commit": "6483664ecea767ad39fe52106d85b94731740150"
9
9
  },
10
10
  "copilotKit": {
11
- "submittedInput": "e0a2f00cca326c76739217e8ca40902e609539a4",
12
- "commit": "e0a2f00cca326c76739217e8ca40902e609539a4"
11
+ "submittedInput": "47c5510b4909f6728288ecf28d7b14cd14922d33",
12
+ "commit": "47c5510b4909f6728288ecf28d7b14cd14922d33"
13
13
  },
14
14
  "channel": "production",
15
15
  "triggeringActor": "MikeRyanDev",
16
16
  "workflow": {
17
- "runId": "32159069979",
18
- "runUrl": "https://github.com/CopilotKit/Intelligence/actions/runs/32159069979"
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-18T16:14:50Z"
27
+ "builtAt": "2026-08-25T03:52:56Z"
28
28
  }