copilotkit 4.13.1 → 4.14.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.
Files changed (80) hide show
  1. package/README.md +109 -6
  2. package/cli-build-info.json +7 -7
  3. package/index.js +96353 -93792
  4. package/onboarding/index.json +1 -1
  5. package/onboarding/prompts/authenticate/start.md +38 -27
  6. package/onboarding/prompts/conversion/plan.md +3 -3
  7. package/onboarding/prompts/credentials/finalize-plan.md +12 -11
  8. package/onboarding/prompts/credentials/plan.md +21 -21
  9. package/onboarding/prompts/credentials/settle-credentials.md +18 -11
  10. package/onboarding/prompts/credentials/write-plan.md +19 -12
  11. package/onboarding/prompts/fallback/best-effort.md +9 -9
  12. package/onboarding/prompts/feature/a2ui/implement.md +6 -6
  13. package/onboarding/prompts/feature/a2ui/proof.md +6 -6
  14. package/onboarding/prompts/feature/a2ui/start.md +7 -7
  15. package/onboarding/prompts/feature/channels/implement.md +33 -15
  16. package/onboarding/prompts/feature/channels/proof.md +12 -10
  17. package/onboarding/prompts/feature/channels/start.md +13 -12
  18. package/onboarding/prompts/feature/chat-suggestions/implement.md +6 -6
  19. package/onboarding/prompts/feature/chat-suggestions/proof.md +6 -6
  20. package/onboarding/prompts/feature/chat-suggestions/start.md +7 -7
  21. package/onboarding/prompts/feature/complete.md +19 -1
  22. package/onboarding/prompts/feature/learning/implement.md +16 -16
  23. package/onboarding/prompts/feature/learning/proof.md +7 -7
  24. package/onboarding/prompts/feature/learning/start.md +8 -8
  25. package/onboarding/prompts/feature/open-generative-ui/implement.md +6 -6
  26. package/onboarding/prompts/feature/open-generative-ui/proof.md +6 -6
  27. package/onboarding/prompts/feature/open-generative-ui/start.md +7 -7
  28. package/onboarding/prompts/feature/realtime-sync/implement.md +7 -7
  29. package/onboarding/prompts/feature/realtime-sync/proof.md +6 -6
  30. package/onboarding/prompts/feature/realtime-sync/start.md +6 -6
  31. package/onboarding/prompts/feature/rich-threads/implement.md +10 -10
  32. package/onboarding/prompts/feature/rich-threads/proof.md +6 -6
  33. package/onboarding/prompts/feature/rich-threads/start.md +6 -6
  34. package/onboarding/prompts/feature/stop.md +36 -2
  35. package/onboarding/prompts/feature/voice/implement.md +7 -7
  36. package/onboarding/prompts/feature/voice/proof.md +6 -6
  37. package/onboarding/prompts/feature/voice/start.md +8 -8
  38. package/onboarding/prompts/framework/ag2.md +2 -2
  39. package/onboarding/prompts/framework/agno.md +2 -2
  40. package/onboarding/prompts/framework/built-in.md +2 -2
  41. package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
  42. package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
  43. package/onboarding/prompts/framework/crewai-flows.md +2 -2
  44. package/onboarding/prompts/framework/deep-agents.md +2 -2
  45. package/onboarding/prompts/framework/google-adk.md +2 -2
  46. package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
  47. package/onboarding/prompts/framework/langgraph-python.md +2 -2
  48. package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
  49. package/onboarding/prompts/framework/llamaindex.md +2 -2
  50. package/onboarding/prompts/framework/mastra.md +2 -2
  51. package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
  52. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
  53. package/onboarding/prompts/framework/ms-agent-python.md +2 -2
  54. package/onboarding/prompts/framework/pydantic-ai.md +2 -2
  55. package/onboarding/prompts/framework/strands-python.md +2 -2
  56. package/onboarding/prompts/framework/strands-typescript.md +2 -2
  57. package/onboarding/prompts/frontend/angular.md +3 -3
  58. package/onboarding/prompts/frontend/nextjs.md +3 -3
  59. package/onboarding/prompts/frontend/plan.md +7 -7
  60. package/onboarding/prompts/frontend/react-native.md +5 -2
  61. package/onboarding/prompts/frontend/react-spa.md +5 -2
  62. package/onboarding/prompts/frontend/vue.md +5 -2
  63. package/onboarding/prompts/implementation/build-and-validate.md +24 -23
  64. package/onboarding/prompts/proof/complete.md +8 -8
  65. package/onboarding/prompts/proof/oss-baseline.md +5 -5
  66. package/onboarding/prompts/proof/round-trip.md +11 -11
  67. package/onboarding/prompts/research/gather.md +36 -7
  68. package/onboarding/prompts/research/merge.md +3 -3
  69. package/onboarding/prompts/research/preflight.md +4 -4
  70. package/onboarding/prompts/research/route.md +8 -6
  71. package/onboarding/prompts/starter/clone.md +97 -26
  72. package/onboarding/prompts/stopped/run-failed.md +2 -2
  73. package/onboarding/prompts/subagent/create-plan.md +4 -4
  74. package/onboarding/prompts/subagent/implement-and-validate.md +19 -6
  75. package/onboarding/prompts/subagent/inspect-repository.md +2 -2
  76. package/onboarding/prompts/subagent/prove-oss-baseline.md +2 -2
  77. package/onboarding/prompts/subagent/prove-round-trip.md +10 -10
  78. package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
  79. package/package.json +5 -1
  80. package/release/release-tool.js +230 -72
package/README.md CHANGED
@@ -259,6 +259,48 @@ The bundled onboarding prompt gives one short explanation before it opens the
259
259
  page: sign-in lets the coding agent create a project and API key, and the user
260
260
  can remove the key later to disconnect the workspace.
261
261
 
262
+ ### Signing in when the browser is on another machine
263
+
264
+ The flow above sends the browser back to a loopback server on the CLI's own
265
+ machine. That fails over SSH, in a VM, or in a container, because the browser
266
+ runs somewhere else. From 4.14.0, the CLI uses a device authorization grant
267
+ (RFC 8628) instead:
268
+
269
+ ```bash
270
+ copilotkit login --device # at a terminal
271
+ copilotkit login --json # for a coding agent
272
+ ```
273
+
274
+ The CLI prints a page URL that carries an eight-character code, such as
275
+ `WDJB-MJHT`, and prints the code too. Open the URL in a browser on any device
276
+ and sign in if asked. The page opens on the confirmation screen: check that it
277
+ shows the same code and where the request came from, then approve it. You can
278
+ also open the plain page and type the code. The CLI polls until you approve,
279
+ and gives up after 10 minutes.
280
+
281
+ Under `--json`, the first `authentication_url` record is the URL with the code
282
+ in it, and it also carries `user_code` and `expires_at`. A sign-in that ends without a session writes a `failed`
283
+ record with `reason: expired` or `reason: access_denied`. If the Ops service
284
+ has no device routes, `login --json` falls back to the loopback flow.
285
+
286
+ Approve a code only if your own terminal or coding agent showed it to you. If
287
+ someone sent you a code, deny the request: approving it signs their CLI in as
288
+ you.
289
+
290
+ ## Where onboarding runs
291
+
292
+ Run `onboard start` in the project folder, or in an empty folder for a new app.
293
+
294
+ - In the home folder or a system folder, `onboard start` refuses, and no run
295
+ starts.
296
+ - A folder that is not a project, but holds projects one or two levels down, is
297
+ a folder of projects. In one, `onboard start` lists the projects and tells the
298
+ coding agent to ask which one to use.
299
+ - `init` never creates an app in the home folder, a system folder or a folder of
300
+ projects. It can create an app in a new subfolder of one, such as `~/my-app`.
301
+ - A folder with its own Git repository is one project, even when its parts sit
302
+ in subfolders such as `frontend/` and `backend/`.
303
+
262
304
  ## Feature onboarding for existing apps
263
305
 
264
306
  Use the optional `--intent` flag when an existing CopilotKit app needs one
@@ -334,9 +376,14 @@ credential shape, and a run that never stopped each print a reason, serve nothin
334
376
  and exit zero. A directory with no bound run is the one non-zero exit, and it is
335
377
  the refusal every other onboarding step makes there.
336
378
 
337
- Only `stopped/run-failed` resumes. `unsupported/no-validated-path` and
338
- `feature/stop` describe a stack this release does not serve, which no fix inside
339
- the run changes.
379
+ A feature run that broke reads `feature/stop` instead, and comes back the same
380
+ way. That ending also covers a failed validation, a proof that could not be
381
+ driven, and a missing Channel prerequisite, which one approved fix can answer.
382
+
383
+ Only `stopped/run-failed` and `feature/stop` resume.
384
+ `unsupported/no-validated-path` and `fallback/best-effort` describe a stack this
385
+ release does not serve, and `feature/blocked-by-plan` is a refusal by the
386
+ platform. No fix inside the run changes any of them.
340
387
 
341
388
  The onboarding commands are:
342
389
 
@@ -386,6 +433,10 @@ copilotkit init -n my-agent -f langgraph-py \
386
433
  slugs instead of creating something you did not ask for.
387
434
  - `-y`/`--yes` installs dependencies without asking; `--no-install` answers the
388
435
  same question without installing. `--install` is a longhand for `--yes`.
436
+ - `--no-key-prompt` skips the question about a missing model key. Use it where the
437
+ shell is a pseudo-terminal but nobody types, such as a coding agent's shell:
438
+ there `init` sees a terminal and would ask anyway. The next steps still name
439
+ each missing key.
389
440
 
390
441
  A run with no terminal is refused only for what it has not answered, and every
391
442
  missing flag is named at once. Sign-in is the one answer no flag supplies:
@@ -398,6 +449,20 @@ already have a valid CLI session, the CLI reuses that workspace connection;
398
449
  otherwise it opens browser sign-in. This workspace connection is required for
399
450
  project creation and is separate from license issuance.
400
451
 
452
+ ## Import Mastra History
453
+
454
+ Run `copilotkit import --source mastra --dry-run` to preview saved Mastra
455
+ threads, then omit `--dry-run` to use the standard import confirmation and
456
+ upload flow. Both a local persisted LibSQL database and a remote Mastra server
457
+ are supported. Configure source identity and access with the
458
+ [`MASTRA_IMPORT_*` variables](../../libs/import-mastra/README.md); destination
459
+ Intelligence credentials use the usual import options.
460
+
461
+ Local access requires Node 22.13+. Use the same source namespace when switching
462
+ between local and remote access so repeat imports deduplicate. Import while the
463
+ source is idle. This reads existing history and pending data; it does not execute
464
+ models, tools or native resume operations.
465
+
401
466
  ## Managed Channels
402
467
 
403
468
  `copilotkit channels` connects a hosted Intelligence project to Slack or
@@ -755,6 +820,14 @@ line on stdout so an already-issued token is not lost, and `project select` repo
755
820
  `api_key_provisioned: false` and exits 75. Untrack the file, then re-run. Outside a
756
821
  git work tree there is nothing to protect and both write as before.
757
822
 
823
+ ## Onboarding credential baselines
824
+
825
+ `copilotkit onboard protect --path .env` defers a credential file that does not
826
+ exist yet. After the credential step creates it, run
827
+ `copilotkit onboard protect --rebaseline --path .env` to protect its new contents.
828
+ Later changes still fail the audit. The same rule applies to
829
+ `.copilotkit/project.json`. Missing source files remain protected.
830
+
758
831
  ## Version Control
759
832
 
760
833
  Outside a repository, `copilotkit init` runs `git init` in the new app and makes
@@ -1023,7 +1096,7 @@ copilotkit logs --tail
1023
1096
  copilotkit logs --tail --lines 100
1024
1097
  ```
1025
1098
 
1026
- With no flags, `copilotkit logs` prints the log file path. `--tail` prints recent structured log lines. Add `--verbose` to a CLI command when you need high-signal diagnostics mirrored to stderr during the run.
1099
+ With no flags, `copilotkit logs` prints the log file path. The log lives in `~/.copilotkit/cli.log` (or `$XDG_STATE_HOME/copilotkit/cli.log`). If a sandbox refuses writes there, the CLI logs to `$TMPDIR/copilotkit-<uid>/cli.log` instead, and if that also fails, the CLI runs with no log file. `--tail` prints recent structured log lines. Add `--verbose` to a CLI command when you need high-signal diagnostics mirrored to stderr during the run.
1027
1100
 
1028
1101
  Project creation (`init`/`create`) connects to and revalidates the live Clerk
1029
1102
  workspace before scaffolding. License commands, including `license list`,
@@ -1122,11 +1195,11 @@ again on the next interactive run.
1122
1195
  ## Preview and release builds
1123
1196
 
1124
1197
  Tester-facing prerelease builds are produced by CI via `workflow_dispatch` on
1125
- the `pkg-pr-new (cli)` workflow — never built locally (the repo root `.env`
1198
+ the `CLI / Publish preview` workflow — never built locally (the repo root `.env`
1126
1199
  targets local services, and CI is the reproducible path).
1127
1200
 
1128
1201
  ```bash
1129
- gh workflow run "pkg-pr-new (cli)" --ref <feature-branch> \
1202
+ gh workflow run publish-cli.yml --ref <feature-branch> \
1130
1203
  -f cli_env=production \
1131
1204
  -f template_ref=<copilotkit-branch-tag-or-commit>
1132
1205
  ```
@@ -1163,3 +1236,33 @@ and rollback are documented in the
1163
1236
  The CLI is commercial software. Its npm manifest uses `SEE LICENSE IN LICENSE` and includes
1164
1237
  a [commercial notice](LICENSE). This notice does not change the licenses of
1165
1238
  projects created with the CLI. See the [package license map](../../docs/licensing/package-licenses.md).
1239
+
1240
+ ### Add existing threads to Learning
1241
+
1242
+ Use `learning threads` to add prior conversations to a Container. A thread can
1243
+ join one Container permanently. Already-bound threads are ineligible.
1244
+
1245
+ ```bash
1246
+ copilotkit learning threads list support --binding all --json
1247
+ copilotkit learning threads preview support --all --agent support-agent --from 2026-09-01 --to 2026-10-01 --json
1248
+ copilotkit learning threads commit support <operation-id> --yes --json
1249
+ copilotkit learning threads status support <operation-id> --json
1250
+ ```
1251
+
1252
+ Preview returns an operation ID, a frozen selection, and recovery counts. Use
1253
+ repeated `--thread <id>` flags instead of `--all` to select specific threads.
1254
+ Filters apply to thread creation time. `--from` is inclusive and `--to` is
1255
+ exclusive; date-only values use UTC. `list` accepts `--cursor` for the next page.
1256
+ The binding filter accepts `all`, `unbound`, `this_container`, or `other_container`.
1257
+
1258
+ Read the preview before commit. `--yes` approves permanent assignment of that
1259
+ saved selection. Each operation accepts at most 10,000 threads. New matching
1260
+ threads cannot enter an existing preview, and a repeated commit cannot bind a
1261
+ second batch. Threads bound by another action after preview are skipped and
1262
+ reported. Recovery continues in the background after the CLI exits.
1263
+
1264
+ Results distinguish threads bound, runs harvested, runs unrecoverable, other
1265
+ skipped runs, and pending runs. Pending work is not a completed harvest. The
1266
+ preview reflects retained history at its timestamp; delayed events or retention
1267
+ changes can change the final result. `--json` prints a versioned result envelope
1268
+ on stdout, including errors, and failures exit nonzero.
@@ -2,20 +2,20 @@
2
2
  "schemaVersion": 1,
3
3
  "package": {
4
4
  "name": "copilotkit",
5
- "version": "4.13.1"
5
+ "version": "4.14.0"
6
6
  },
7
7
  "intelligence": {
8
- "commit": "a629bd48ce4223ba2ea4fc1fb488973f8915807e"
8
+ "commit": "0c02887906a99364b17fdbbca23ec4430741efcc"
9
9
  },
10
10
  "copilotKit": {
11
- "submittedInput": "f8047217b909a3e18404034f31f47157c4312241",
12
- "commit": "f8047217b909a3e18404034f31f47157c4312241"
11
+ "submittedInput": "2c42a41a7e",
12
+ "commit": "2c42a41a7e749c4473705769d1ae985d89718465"
13
13
  },
14
14
  "channel": "production",
15
15
  "triggeringActor": "BenTaylorDev",
16
16
  "workflow": {
17
- "runId": "35769780196",
18
- "runUrl": "https://github.com/CopilotKit/Intelligence/actions/runs/35769780196"
17
+ "runId": "35927663284",
18
+ "runUrl": "https://github.com/CopilotKit/Intelligence/actions/runs/35927663284"
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-22T18:52:16Z"
27
+ "builtAt": "2026-09-23T22:21:17Z"
28
28
  }