copilotkit 4.9.37 → 4.9.50

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 (67) hide show
  1. package/README.md +185 -7
  2. package/cli-build-info.json +7 -7
  3. package/index.js +7908 -4788
  4. package/onboarding/index.json +162 -1
  5. package/onboarding/prompts/authenticate/start.md +33 -16
  6. package/onboarding/prompts/conversion/plan.md +3 -3
  7. package/onboarding/prompts/credentials/finalize-plan.md +13 -13
  8. package/onboarding/prompts/credentials/plan.md +20 -20
  9. package/onboarding/prompts/fallback/best-effort.md +6 -6
  10. package/onboarding/prompts/feature/a2ui/implement.md +32 -0
  11. package/onboarding/prompts/feature/a2ui/proof.md +34 -0
  12. package/onboarding/prompts/feature/a2ui/start.md +55 -0
  13. package/onboarding/prompts/feature/chat-suggestions/implement.md +28 -0
  14. package/onboarding/prompts/feature/chat-suggestions/proof.md +26 -0
  15. package/onboarding/prompts/feature/chat-suggestions/start.md +46 -0
  16. package/onboarding/prompts/feature/learning/implement.md +44 -0
  17. package/onboarding/prompts/feature/learning/proof.md +27 -0
  18. package/onboarding/prompts/feature/learning/start.md +52 -0
  19. package/onboarding/prompts/feature/open-generative-ui/implement.md +28 -0
  20. package/onboarding/prompts/feature/open-generative-ui/proof.md +27 -0
  21. package/onboarding/prompts/feature/open-generative-ui/start.md +47 -0
  22. package/onboarding/prompts/feature/realtime-sync/implement.md +38 -0
  23. package/onboarding/prompts/feature/realtime-sync/proof.md +28 -0
  24. package/onboarding/prompts/feature/realtime-sync/start.md +50 -0
  25. package/onboarding/prompts/feature/rich-threads/implement.md +41 -0
  26. package/onboarding/prompts/feature/rich-threads/proof.md +27 -0
  27. package/onboarding/prompts/feature/rich-threads/start.md +52 -0
  28. package/onboarding/prompts/feature/stop.md +41 -0
  29. package/onboarding/prompts/feature/voice/implement.md +28 -0
  30. package/onboarding/prompts/feature/voice/proof.md +27 -0
  31. package/onboarding/prompts/feature/voice/start.md +45 -0
  32. package/onboarding/prompts/framework/ag2.md +2 -2
  33. package/onboarding/prompts/framework/agno.md +2 -2
  34. package/onboarding/prompts/framework/built-in.md +2 -2
  35. package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
  36. package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
  37. package/onboarding/prompts/framework/crewai-flows.md +2 -2
  38. package/onboarding/prompts/framework/deep-agents.md +2 -2
  39. package/onboarding/prompts/framework/google-adk.md +2 -2
  40. package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
  41. package/onboarding/prompts/framework/langgraph-python.md +2 -2
  42. package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
  43. package/onboarding/prompts/framework/llamaindex.md +2 -2
  44. package/onboarding/prompts/framework/mastra.md +2 -2
  45. package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
  46. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
  47. package/onboarding/prompts/framework/ms-agent-python.md +2 -2
  48. package/onboarding/prompts/framework/pydantic-ai.md +2 -2
  49. package/onboarding/prompts/framework/strands-python.md +2 -2
  50. package/onboarding/prompts/framework/strands-typescript.md +2 -2
  51. package/onboarding/prompts/frontend/angular.md +3 -3
  52. package/onboarding/prompts/frontend/nextjs.md +3 -3
  53. package/onboarding/prompts/frontend/plan.md +6 -6
  54. package/onboarding/prompts/frontend/react-native.md +2 -2
  55. package/onboarding/prompts/frontend/react-spa.md +2 -2
  56. package/onboarding/prompts/frontend/vue.md +2 -2
  57. package/onboarding/prompts/implementation/build-and-validate.md +33 -13
  58. package/onboarding/prompts/proof/complete.md +20 -7
  59. package/onboarding/prompts/proof/oss-baseline.md +5 -5
  60. package/onboarding/prompts/proof/round-trip.md +9 -9
  61. package/onboarding/prompts/starter/clone.md +5 -5
  62. package/onboarding/prompts/subagent/create-plan.md +11 -3
  63. package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
  64. package/onboarding/prompts/subagent/prove-round-trip.md +29 -11
  65. package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
  66. package/package.json +1 -1
  67. package/release/release-tool.js +37 -11
package/README.md CHANGED
@@ -175,9 +175,56 @@ For a coding agent that needs an agent-readable sign-in flow, use:
175
175
  copilotkit login --json
176
176
  ```
177
177
 
178
- The command prints JSON lines for the sign-in URL, the action to take, and the
179
- final result. It does not open a browser. A failed sign-in prints one final
180
- failure object and exits nonzero.
178
+ The command prints JSON lines for the sign-in URL, an instruction for the
179
+ machine reader, and the final result. It does not open a browser. Every JSON
180
+ login URL carries the `agent_onboarding` display hint because JSON mode is the
181
+ machine-readable login contract. A machine reader should open the first
182
+ `authentication_url` once with the operating system's default browser, then
183
+ keep reading the same process until its terminal event. If the opener fails,
184
+ show the URL for manual sign-in instead of retrying it. A failed sign-in prints
185
+ one final failure object and exits nonzero.
186
+
187
+ The bundled onboarding prompt gives one short explanation before it opens the
188
+ page: sign-in lets the coding agent create a project and API key, and the user
189
+ can remove the key later to disconnect the workspace.
190
+
191
+ ## Feature onboarding for existing apps
192
+
193
+ Use the optional `--intent` flag when an existing CopilotKit app needs one
194
+ specific feature. The CLI prints a feature-specific Markdown path; the coding
195
+ agent follows its inspection, plan, implementation, and visible-proof steps.
196
+ Without `--intent`, `onboard start` keeps the generic onboarding path unchanged.
197
+
198
+ ```bash
199
+ npx --yes copilotkit@latest onboard start \
200
+ --intent add-a2ui \
201
+ --run <12-character-id> \
202
+ --coding-agent <slug>
203
+ ```
204
+
205
+ `--intent` is a closed outcome, not free-form text. The supported values are:
206
+
207
+ | Intent | Outcome |
208
+ | ------------------------ | ----------------------------------------------------------- |
209
+ | `add-rich-threads` | Managed Rich Threads with durable thread UI/API proof |
210
+ | `add-learning` | Assign real runs to a selected Learning Container |
211
+ | `add-a2ui` | Render an A2UI surface in an existing OSS app |
212
+ | `add-open-generative-ui` | Render a sandboxed generated UI in chat |
213
+ | `add-chat-suggestions` | Configure and send visible chat suggestions |
214
+ | `add-voice` | Add documented voice transcription to the existing composer |
215
+ | `add-realtime-sync` | Prove managed thread changes sync between active clients |
216
+
217
+ The intent describes the developer's requested outcome, not a claim about the
218
+ current project state. Each path inspects the app first: it preserves a proven
219
+ existing configuration, stops rather than inventing credentials or identities,
220
+ and sends an app that lacks a CopilotKit baseline to generic onboarding first.
221
+ The CLI retains the selected intent with its repository-bound run, so every
222
+ onboarding event a later step reports carries the requested outcome.
223
+
224
+ Each path checks in at the steps where a run goes quiet: when the inspection
225
+ subagent returns, when the plan is approved, when implementation validation
226
+ passes, and on each proof attempt and repair cycle. A run that cannot go on
227
+ reads `feature/stop`, reports from there, and does not run `onboard complete`.
181
228
 
182
229
  The onboarding commands are:
183
230
 
@@ -347,6 +394,92 @@ prompts, and never opens a browser. See
347
394
  [Managed Channel CLI contracts](../../docs/channels-cli-contracts.md) for the
348
395
  declared-Channels file, the envelope shape, and the credential resolution order.
349
396
 
397
+ ## Learning Containers
398
+
399
+ Run the Learning commands from a directory with a selected hosted project:
400
+
401
+ ```bash
402
+ copilotkit learning containers list
403
+ copilotkit learning containers get support-quality
404
+ copilotkit learning containers create
405
+ copilotkit learning containers update support-quality
406
+ copilotkit learning containers delete support-quality
407
+ ```
408
+
409
+ The create and update commands prompt for missing fields in a human terminal.
410
+ The delete command shows the exact container and asks for approval. The CLI
411
+ cannot delete a container with bound Threads or Learning history.
412
+
413
+ Pass flags for a script or coding agent:
414
+
415
+ ```bash
416
+ copilotkit learning containers list --json
417
+ copilotkit learning containers create --id support-quality --name "Support quality" --json
418
+ copilotkit learning containers update support-quality --prompt-context "Use approved answers." --json
419
+ copilotkit learning containers update support-quality --clear-prompt-context --json
420
+ copilotkit learning containers delete support-quality --yes --json
421
+ ```
422
+
423
+ `--json` emits one versioned JSON object on stdout and never prompts. Create
424
+ requires `--id` and `--name`. Update requires at least one change flag. Delete
425
+ requires `--yes`. Errors use the same JSON envelope and exit with a nonzero
426
+ status.
427
+
428
+ A container keeps its stable ID. The list command returns at most 500 containers.
429
+ If `nextCursor` is not null, pass it to `--cursor` to read the next page.
430
+
431
+ Writes are rate limited per organization, project, and caller: 10 creates, 30
432
+ updates, and 30 deletes each minute. Updates and deletes are counted separately,
433
+ so a cleanup loop does not spend its delete budget on the renames before it.
434
+ Each API replica counts on its own, so these are the lowest limits a script can
435
+ rely on. A call over the limit returns `RATE_LIMIT_EXCEEDED`. Wait one minute,
436
+ then retry.
437
+
438
+ ## Learning Insights and Skill review
439
+
440
+ Use the same selected project to inspect Learning output:
441
+
442
+ ```bash
443
+ copilotkit learning insights list support-quality
444
+ copilotkit learning candidates list support-quality
445
+ copilotkit learning candidates review support-quality <candidate-id>
446
+ copilotkit learning candidates approve support-quality <candidate-id>
447
+ copilotkit learning candidates reject support-quality <candidate-id>
448
+ copilotkit learning skills list support-quality
449
+ copilotkit learning skills list support-quality --full
450
+ ```
451
+
452
+ The `review` command is an alias of `candidates get`. Both commands show the
453
+ candidate reason, supporting Insights, and all proposed Skill files.
454
+
455
+ Approval and rejection show the full candidate before they ask for approval.
456
+ Approval publishes the proposed add, update, or removal. Rejection does not
457
+ change the published Skill Registry.
458
+
459
+ Agents and scripts must add `--json`. Add `--yes` to `approve` and `reject`.
460
+ Use `learning skills list --full` to include `SKILL.md` in human output. JSON
461
+ list output contains the full records, always includes `skillMd`, and sets
462
+ `resultLimit` to `500`. Insight, candidate, and Skill lists return at most 500
463
+ items and do not support a cursor.
464
+
465
+ Malformed Insight, candidate, or Skill command input returns
466
+ `LEARNING_INPUT_INVALID`. Malformed Container command input returns
467
+ `LEARNING_CONTAINER_INPUT_INVALID`. Reviewing a candidate that is already
468
+ approved or rejected returns `LEARNING_CANDIDATE_SETTLED` before any request is
469
+ sent. `LEARNING_CANDIDATE_CONFLICT` is different: the server refused because the
470
+ candidate changed during the review, so read it again and retry.
471
+
472
+ The CLI sends command telemetry such as `insights.list` and
473
+ `candidates.approve`. Human reviews also send bounded review-viewed and
474
+ review-decided events. The CLI does not send Container IDs, candidate IDs,
475
+ Insight text, or Skill content in these events.
476
+
477
+ Three properties describe a review. `review_mode` is `human` when the CLI showed
478
+ the proposal and waited for an answer, and `agent` when `--yes` skipped that
479
+ prompt. `review_action` is the command the caller ran, `approve` or `reject`.
480
+ `review_decision` is the answer a person gave at the prompt, `confirmed` or
481
+ `canceled`, and it is sent only in `human` mode.
482
+
350
483
  ## Skills And Agent-Assisted Onboarding
351
484
 
352
485
  Use `copilotkit create` to start a **new** project. Use `copilotkit skills onboard`
@@ -470,7 +603,7 @@ A real key exported in your shell environment satisfies the check too. An
470
603
  exported empty or whitespace value falls back to the `.env` value, while an
471
604
  exported placeholder-shaped value fails the gate outright.
472
605
 
473
- The Microsoft Agent Framework .NET template uses GitHub Models. Set its C# agent token with `dotnet user-secrets set GitHubToken "<your-token>"` from the generated `agent/` directory.
606
+ The Microsoft Agent Framework .NET template uses OpenAI by default. Set its API key with `dotnet user-secrets set OPENAI_API_KEY "<your-openai-api-key>"` from the generated `agent/` directory.
474
607
 
475
608
  Do not commit generated `.env` files or personal secrets.
476
609
 
@@ -550,6 +683,7 @@ anything else:
550
683
  copilotkit verify
551
684
  copilotkit verify --json # machine-readable output
552
685
  copilotkit verify --runtime-url http://localhost:8080/copilotkit
686
+ copilotkit verify --frontend-url http://127.0.0.1:3000 # that host's assets and CORS
553
687
  copilotkit verify --round-trip # also run the agent
554
688
  copilotkit verify --expect-runtime oss --round-trip --agent incident_triage
555
689
  ```
@@ -558,9 +692,15 @@ It checks that a hosted project is selected, that a project API key is present,
558
692
  that the app's own process can load that key, that the key authenticates
559
693
  against Intelligence, that the CopilotKit runtime responds, that the runtime
560
694
  declares at least one agent, that the runtime is actually using the credential,
561
- and that it serves the thread routes the license pays for. It also reports the
562
- runtime version, the agent framework in use, the realtime gateway wiring, the
563
- plan, and the license state.
695
+ and that it serves the thread routes the license pays for. It also checks that
696
+ the runtime accepts the origin a browser opens -- same-origin projects are
697
+ decided from the two URLs, and a cross-origin runtime is asked with a real
698
+ preflight when `--frontend-url` names the origin -- and that the CopilotKit
699
+ packages installed here are on the same version the runtime reports. The
700
+ version check is skipped when the runtime being probed is not on this
701
+ machine, because a deployed runtime and this checkout are two installations. It also reports the runtime
702
+ version, the agent framework in use, whether transcription is wired, the
703
+ realtime gateway wiring, the plan, and the license state.
564
704
 
565
705
  The selected project is read from the nearest `.copilotkit/project.json` at or
566
706
  above the current directory, stopping at the repository root, so running from
@@ -632,11 +772,49 @@ with the two ways to tell the command where to look — a working application on
632
772
  another port is not a wiring failure, and reporting it as one is how a developer
633
773
  ends up undoing correct work.
634
774
 
775
+ An answer at the assumed default is read the same way. The runtime check passes,
776
+ because a runtime did reply, but the line says which project answered is
777
+ unverified. So do the declared agent names and `--round-trip`. Another checkout
778
+ serving that port answers exactly the same, and the runtime version, the agent
779
+ names, and the round trip are all read off whatever replied. Pass
780
+ `--runtime-url`, or record `"runtimeUrl"`, to make the report name your project.
781
+
635
782
  The mount path is not discovered: every first-party starter serves the runtime
636
783
  at `/api/copilotkit`, and reading a framework's routing conventions to find out
637
784
  otherwise is the kind of check that drifts and starts reporting confident
638
785
  nonsense. Where yours is elsewhere, use option 1 or 2.
639
786
 
787
+ ### Which frontend URL you should open
788
+
789
+ `verify` also reports `frontendUrl`: the origin to open in a browser, resolved
790
+ from the same web dev server port as option 4 above and always written with
791
+ `localhost`. It is reported so a caller has a URL handed to it rather than one it
792
+ builds from a dev server's startup banner. `--frontend-url` overrides it, and the
793
+ field is absent — never guessed — when the project named no port.
794
+
795
+ It is a separate field from `runtimeUrl` and is not derived from it. The two are
796
+ the same origin only when one dev server serves the page and mounts the runtime
797
+ on it. A project whose runtime runs as a process of its own puts that runtime on
798
+ port 8200, where no page is served.
799
+
800
+ Pass `--frontend-url <the url you opened>` to add one more check,
801
+ `frontend_assets_served`. It asks that origin for its page and then for one of
802
+ the page's own scripts or stylesheets, read off the returned HTML, and compares
803
+ the two answers:
804
+
805
+ - Both served: `PASS`. That host is one the dev server serves assets on.
806
+ - Page served, asset refused with `401` or `403`: `FAIL`. The dev server refuses
807
+ its own static assets on that host. A page that renders without its own chunks
808
+ leaves the CopilotKit control dead, which reads as a broken integration rather
809
+ than as the host name you used. On an IP literal the check names the
810
+ `localhost` URL to open instead.
811
+ - Anything else: `UNKNOWN`, including a dev server that is not running.
812
+
813
+ Without the flag the check is absent rather than `UNKNOWN`. A frontend dev
814
+ server is not a surface `verify` requires to be running, so reporting "could not
815
+ prove it" would sink the verdict of a correctly wired project whose browser is
816
+ closed.
817
+
640
818
  A runtime mounted `mode: "single-route"` refuses `GET /info`, so `verify` asks
641
819
  the same question again through the POST envelope that mount does answer.
642
820
  Reaching it that way counts as reachable, and the report says which shape
@@ -2,20 +2,20 @@
2
2
  "schemaVersion": 1,
3
3
  "package": {
4
4
  "name": "copilotkit",
5
- "version": "4.9.37"
5
+ "version": "4.9.50"
6
6
  },
7
7
  "intelligence": {
8
- "commit": "760576e30fb6301f29f82a14f5d02d40bdf9e22a"
8
+ "commit": "1e703c3c476af7d0a52f801e34fbce2997f6a926"
9
9
  },
10
10
  "copilotKit": {
11
- "submittedInput": "aec312634129f97f90154bb416a07e8cc0c13a2a",
12
- "commit": "aec312634129f97f90154bb416a07e8cc0c13a2a"
11
+ "submittedInput": "380ad1220a7bc78104baedc469c4d086c8910494",
12
+ "commit": "380ad1220a7bc78104baedc469c4d086c8910494"
13
13
  },
14
14
  "channel": "production",
15
15
  "triggeringActor": "BenTaylorDev",
16
16
  "workflow": {
17
- "runId": "33790889389",
18
- "runUrl": "https://github.com/CopilotKit/Intelligence/actions/runs/33790889389"
17
+ "runId": "34486444519",
18
+ "runUrl": "https://github.com/CopilotKit/Intelligence/actions/runs/34486444519"
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-09-03T18:31:55Z"
27
+ "builtAt": "2026-09-10T14:04:08Z"
28
28
  }