copilotkit 4.20.0 → 4.22.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 (81) hide show
  1. package/README.md +57 -6
  2. package/cli-build-info.json +7 -7
  3. package/index.js +6269 -4407
  4. package/onboarding/index.json +10 -1
  5. package/onboarding/prompts/authenticate/start.md +11 -17
  6. package/onboarding/prompts/conversion/plan.md +3 -3
  7. package/onboarding/prompts/credentials/finalize-plan.md +7 -7
  8. package/onboarding/prompts/credentials/plan.md +36 -25
  9. package/onboarding/prompts/credentials/settle-credentials.md +3 -3
  10. package/onboarding/prompts/credentials/write-plan.md +10 -18
  11. package/onboarding/prompts/fallback/best-effort.md +8 -8
  12. package/onboarding/prompts/feature/a2ui/implement.md +6 -6
  13. package/onboarding/prompts/feature/a2ui/proof.md +5 -5
  14. package/onboarding/prompts/feature/a2ui/start.md +9 -9
  15. package/onboarding/prompts/feature/channels/implement.md +7 -7
  16. package/onboarding/prompts/feature/channels/proof.md +5 -5
  17. package/onboarding/prompts/feature/channels/start.md +9 -9
  18. package/onboarding/prompts/feature/chat-suggestions/implement.md +6 -6
  19. package/onboarding/prompts/feature/chat-suggestions/proof.md +5 -5
  20. package/onboarding/prompts/feature/chat-suggestions/start.md +9 -9
  21. package/onboarding/prompts/feature/complete.md +2 -2
  22. package/onboarding/prompts/feature/learning/implement.md +13 -13
  23. package/onboarding/prompts/feature/learning/proof.md +6 -6
  24. package/onboarding/prompts/feature/learning/start.md +9 -9
  25. package/onboarding/prompts/feature/open-generative-ui/implement.md +6 -6
  26. package/onboarding/prompts/feature/open-generative-ui/proof.md +5 -5
  27. package/onboarding/prompts/feature/open-generative-ui/start.md +9 -9
  28. package/onboarding/prompts/feature/realtime-sync/implement.md +7 -7
  29. package/onboarding/prompts/feature/realtime-sync/proof.md +5 -5
  30. package/onboarding/prompts/feature/realtime-sync/start.md +8 -8
  31. package/onboarding/prompts/feature/rich-threads/implement.md +8 -8
  32. package/onboarding/prompts/feature/rich-threads/proof.md +5 -5
  33. package/onboarding/prompts/feature/rich-threads/start.md +8 -8
  34. package/onboarding/prompts/feature/stop.md +3 -3
  35. package/onboarding/prompts/feature/voice/implement.md +6 -6
  36. package/onboarding/prompts/feature/voice/proof.md +5 -5
  37. package/onboarding/prompts/feature/voice/start.md +9 -9
  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/custom-ag-ui.md +98 -0
  45. package/onboarding/prompts/framework/deep-agents.md +2 -2
  46. package/onboarding/prompts/framework/google-adk.md +2 -2
  47. package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
  48. package/onboarding/prompts/framework/langgraph-python.md +2 -2
  49. package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
  50. package/onboarding/prompts/framework/llamaindex.md +2 -2
  51. package/onboarding/prompts/framework/mastra.md +2 -2
  52. package/onboarding/prompts/framework/ms-agent-dotnet.md +3 -3
  53. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +3 -3
  54. package/onboarding/prompts/framework/ms-agent-python.md +2 -2
  55. package/onboarding/prompts/framework/pydantic-ai.md +2 -2
  56. package/onboarding/prompts/framework/strands-python.md +2 -2
  57. package/onboarding/prompts/framework/strands-typescript.md +2 -2
  58. package/onboarding/prompts/frontend/angular.md +10 -21
  59. package/onboarding/prompts/frontend/nextjs.md +3 -3
  60. package/onboarding/prompts/frontend/plan.md +7 -7
  61. package/onboarding/prompts/frontend/react-native.md +2 -2
  62. package/onboarding/prompts/frontend/react-spa.md +2 -2
  63. package/onboarding/prompts/frontend/vue.md +2 -2
  64. package/onboarding/prompts/implementation/build-and-validate.md +12 -12
  65. package/onboarding/prompts/proof/complete.md +3 -3
  66. package/onboarding/prompts/proof/oss-baseline.md +5 -5
  67. package/onboarding/prompts/proof/round-trip.md +10 -10
  68. package/onboarding/prompts/research/gather.md +5 -5
  69. package/onboarding/prompts/research/merge.md +2 -2
  70. package/onboarding/prompts/research/preflight.md +2 -2
  71. package/onboarding/prompts/research/route.md +9 -9
  72. package/onboarding/prompts/starter/clone.md +15 -14
  73. package/onboarding/prompts/stopped/run-failed.md +2 -2
  74. package/onboarding/prompts/subagent/create-plan.md +26 -40
  75. package/onboarding/prompts/subagent/implement-and-validate.md +26 -38
  76. package/onboarding/prompts/subagent/inspect-repository.md +4 -1
  77. package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
  78. package/onboarding/prompts/subagent/prove-round-trip.md +86 -244
  79. package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
  80. package/package.json +1 -1
  81. package/release/release-tool.js +9 -5
package/README.md CHANGED
@@ -46,6 +46,14 @@ accepts the connection and then sends nothing therefore ends in a message that
46
46
  names the command and the wait, rather than in a CLI that never returns. A stall
47
47
  is not retried, because retrying it would spend the same wait a second time.
48
48
 
49
+ npm 12 refuses a project install when `npm_config_allow_scripts` is set in the
50
+ environment, and exits with `EALLOWSCRIPTS`. The CLI does not retry that refusal.
51
+ It names the variable and prints one command that runs the install without it,
52
+ such as `env -u npm_config_allow_scripts npm install`. The CLI does not remove the
53
+ variable by itself: with no `allow-scripts` setting, npm 12 runs no install
54
+ scripts, so removing it would change which scripts run. To keep the list, move
55
+ it to the `allowScripts` field in `package.json`.
56
+
49
57
  ## Type-safe agent IDs
50
58
 
51
59
  `copilotkit typegen` reads a running CopilotKit runtime's `/info` route and
@@ -472,6 +480,10 @@ copilotkit init -n my-agent -f langgraph-py \
472
480
  same way `copilotkit project select` does: a typo fails with the available
473
481
  slugs instead of creating something you did not ask for. A refused value fails
474
482
  before `init` writes any file, so you can retry into the same directory.
483
+ - `--dir <path>` builds the app in that directory instead of
484
+ `<current directory>/<name>`, so the directory the shell is in does not
485
+ matter. The app takes the directory's name, and `--dir .` builds in the
486
+ current directory. `--dir` and `--name` cannot be combined.
475
487
  - `-y`/`--yes` installs dependencies without asking; `--no-install` answers the
476
488
  same question without installing. `--install` is a longhand for `--yes`.
477
489
  - `--no-key-prompt` skips the question about a missing model key. Use it where the
@@ -1049,13 +1061,16 @@ own directory — so a key at the repository root is invisible to an app in a
1049
1061
  subdirectory. `verify` reports the two facts separately: **A project API key is
1050
1062
  present** says the credential exists somewhere in this repository, and **The app
1051
1063
  can load the project API key** says the directory the app runs in supplies it.
1052
- The second is `UNKNOWN` rather than `FAIL` wherever it cannot decide: no package
1064
+ The second is `WARN` rather than `FAIL` wherever it cannot decide: no package
1053
1065
  declaring a `@copilotkit/*` dependency was found, more than one was, or a script
1054
1066
  in the app — or in any package above it, up to the project root — names an env
1055
- file itself with `dotenv`, `env-cmd`, or `--env-file`. It is also `UNKNOWN` when
1056
- a runtime answered and reported an Intelligence entitlement, because a runtime
1067
+ file itself with `dotenv`, `env-cmd`, or `--env-file`. A correctly wired app
1068
+ returns these too, so they do not fail the command. It is `UNKNOWN` when a
1069
+ runtime answered and reported an Intelligence entitlement, because a runtime
1057
1070
  cannot report one without having loaded a key: the report then names the
1058
1071
  disagreement instead of claiming the app cannot load a key the runtime is using.
1072
+ That one still fails the command, because a runtime URL that points at another
1073
+ app produces it too.
1059
1074
 
1060
1075
  That last check is the one a passing build cannot give you. A key in `.env`
1061
1076
  proves only that one was provisioned: the runtime reads no environment variable
@@ -1068,9 +1083,17 @@ when the runtime is unreachable.
1068
1083
  Every check reports `PASS`, `FAIL`, or `UNKNOWN`, and `UNKNOWN` never means the
1069
1084
  check passed — an unreachable Intelligence API leaves the API key unproven
1070
1085
  rather than condemning it. `verify` exits non-zero unless every check passed, so
1071
- a caller can branch on the command instead of parsing it. With `--json` the
1072
- payload is the only thing on stdout and every diagnostic goes to stderr, so
1073
- piping is safe.
1086
+ a caller can branch on the command instead of parsing it.
1087
+
1088
+ The exception is labeled `WARN`: an `undetermined` result that a correctly
1089
+ wired app returns too. The report shows it as `WARN`, `--json` names it in
1090
+ `warnings` and keeps `ok` true, and the command exits zero. Two checks can warn.
1091
+ `api_key_loadable_by_app` warns in the cases above. `page_context_reaches_agent`
1092
+ warns when the agent answers without the context value, because a correctly
1093
+ wired agent that keeps to its own task answers that way too.
1094
+
1095
+ With `--json` the payload is the only thing on stdout and every diagnostic goes
1096
+ to stderr, so piping is safe.
1074
1097
 
1075
1098
  Use `--expect-runtime oss` to prove an open-source runtime instead. In this
1076
1099
  mode, hosted project, key, and thread-route checks do not apply. The command
@@ -1545,3 +1568,31 @@ copilotkit import --source langgraph --langgraph-snapshot native.jsonl \
1545
1568
  The destination frontend must register that catalog. This option works with all import sources and applies to every selected conversation; import applications with different defaults separately. Explicit native `catalogId` values and native A2UI operation payloads take precedence. Native tool arguments/results are preserved; the setting only controls reconstructed UI. Without the option, existing replay behavior is unchanged. Invalid empty/whitespace identifiers fail before upload. No catalog is inferred from message prose.
1546
1569
 
1547
1570
  API callers can set `replayConfig: { defaultCatalogId: "copilotkit://app-dashboard-catalog" }` on each normalized conversation. An unchanged source identity is still deduplicated: changing this option does not update an existing import. Use the existing `--replace` workflow to regenerate its imported history, after accounting for any destination changes.
1571
+
1572
+ ## Claude Managed Agents starter
1573
+
1574
+ ```bash
1575
+ copilotkit init --template claude-managed-agents
1576
+ ```
1577
+
1578
+ The command clones the Claude Managed Agents starter from CopilotKit, creates a Learning Container and runtime key in the selected Intelligence project, installs dependencies, and provisions the Anthropic agent and environment with Ant. The frontend contains the SDK thread drawer and CopilotChat with the Beautiful Chat styles. The Inspector uses the SDK defaults and is available during local development. The generated README covers daily development and links to the component docs. A separate `REFERENCE.md` covers configuration and deployment. New threads bind to the Learning Container; the starter fetches published Skill files through the Intelligence SDK, uploads them to Anthropic, and pins their native versions for each new session. Existing sessions retain their skills.
1579
+
1580
+ Requires Node.js 20.19+, Git, npm, Ant, Intelligence Learning access, and a Claude Console workspace with Managed Agents access and credits. Ant owns and refreshes its OAuth credentials; the CLI never copies them into the app. The project runtime key, container ID, and local app-user ID go into gitignored `.env.local` with private file permissions.
1581
+
1582
+ Interactive setup asks for the app directory, opens Intelligence login when needed, and uses the existing project picker to select or create a project. If Ant is missing, setup offers to install it with Homebrew or Go when either is available. Otherwise it prints both installation methods and the [Ant installation guide](https://github.com/anthropics/anthropic-cli#installation). Installation must finish with Ant available on `PATH`. Setup opens Ant login when needed and asks before starting the dev server. Between prompts, setup stops reading terminal input so Ant and npm can receive input and Ctrl-C.
1583
+
1584
+ Pass `--name my-app` to name the directory, `--project <slug>` to select a project, or `--create "Project name"` to create one. Use `--profile work` for an Ant profile, `--no-dev` to skip the dev-server offer, and `--skip-install` (or `--no-install`) to install app dependencies yourself. The destination must be a new child directory. `copilotkit with-claude [directory]` opens the same setup flow.
1585
+
1586
+ For automation, sign in to both services first, then run:
1587
+
1588
+ ```bash
1589
+ copilotkit init --template claude-managed-agents --name my-app --project your-project-slug --yes
1590
+ ```
1591
+
1592
+ With `--yes` or no terminal, setup never opens prompts, installs Ant, or starts the dev server. It requires existing logins and Ant on `PATH`. Without project flags it uses the current directory's selected Intelligence project; without a name it uses `my-claude-app`.
1593
+
1594
+ A failed install leaves the configured app in place: run `npm install`, then `npm run agent:apply`, then `npm run dev` there. Failed Ant provisioning can be retried with `npm run agent:apply`. Neither failure prints Ready. A Learning or key error stops setup and reports the remaining step; remote resources are not deleted automatically.
1595
+
1596
+ The starter listens on localhost and uses one local developer identity. Before deployment, add verified user authentication, request limits, and durable Managed Agents session mappings. Intelligence thread storage does not replace that adapter mapping.
1597
+
1598
+ Release ordering: merge the CopilotKit starter before releasing this command. The shared starter catalog includes `examples/integrations/claude-managed-agents`, so the release source gate rejects a template revision that omits it. The command uses the build-pinned CopilotKit revision, like the existing starters.
@@ -2,20 +2,20 @@
2
2
  "schemaVersion": 1,
3
3
  "package": {
4
4
  "name": "copilotkit",
5
- "version": "4.20.0"
5
+ "version": "4.22.0"
6
6
  },
7
7
  "intelligence": {
8
- "commit": "2dd0ade2a238b05e4b84b6317a929b679a6f21fe"
8
+ "commit": "eb758b6e228f004116a17404e40de14754423fc8"
9
9
  },
10
10
  "copilotKit": {
11
- "submittedInput": "24c969848df0",
12
- "commit": "24c969848df0b217144a93a58dcc3564bffa26ee"
11
+ "submittedInput": "4b51d880eab2",
12
+ "commit": "4b51d880eab2617e3196285ddcf0e4ff7b34a237"
13
13
  },
14
14
  "channel": "production",
15
15
  "triggeringActor": "BenTaylorDev",
16
16
  "workflow": {
17
- "runId": "36644626933",
18
- "runUrl": "https://github.com/CopilotKit/Intelligence/actions/runs/36644626933"
17
+ "runId": "36810989756",
18
+ "runUrl": "https://github.com/CopilotKit/Intelligence/actions/runs/36810989756"
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-29T23:21:50Z"
27
+ "builtAt": "2026-10-01T03:34:23Z"
28
28
  }