copilotkit 4.9.60 → 4.10.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 (73) hide show
  1. package/cli-build-info.json +7 -7
  2. package/index.js +324 -162
  3. package/onboarding/index.json +81 -18
  4. package/onboarding/prompts/authenticate/start.md +41 -202
  5. package/onboarding/prompts/conversion/plan.md +3 -3
  6. package/onboarding/prompts/credentials/finalize-plan.md +15 -129
  7. package/onboarding/prompts/credentials/plan.md +20 -20
  8. package/onboarding/prompts/credentials/settle-credentials.md +153 -0
  9. package/onboarding/prompts/credentials/write-plan.md +93 -0
  10. package/onboarding/prompts/fallback/best-effort.md +12 -9
  11. package/onboarding/prompts/feature/a2ui/implement.md +35 -6
  12. package/onboarding/prompts/feature/a2ui/proof.md +30 -6
  13. package/onboarding/prompts/feature/a2ui/start.md +29 -6
  14. package/onboarding/prompts/feature/chat-suggestions/implement.md +36 -6
  15. package/onboarding/prompts/feature/chat-suggestions/proof.md +30 -5
  16. package/onboarding/prompts/feature/chat-suggestions/start.md +29 -6
  17. package/onboarding/prompts/feature/complete.md +11 -0
  18. package/onboarding/prompts/feature/learning/implement.md +41 -12
  19. package/onboarding/prompts/feature/learning/proof.md +32 -6
  20. package/onboarding/prompts/feature/learning/start.md +28 -5
  21. package/onboarding/prompts/feature/open-generative-ui/implement.md +37 -6
  22. package/onboarding/prompts/feature/open-generative-ui/proof.md +30 -5
  23. package/onboarding/prompts/feature/open-generative-ui/start.md +29 -6
  24. package/onboarding/prompts/feature/realtime-sync/implement.md +36 -7
  25. package/onboarding/prompts/feature/realtime-sync/proof.md +29 -5
  26. package/onboarding/prompts/feature/realtime-sync/start.md +28 -5
  27. package/onboarding/prompts/feature/rich-threads/implement.md +37 -8
  28. package/onboarding/prompts/feature/rich-threads/proof.md +31 -5
  29. package/onboarding/prompts/feature/rich-threads/start.md +28 -5
  30. package/onboarding/prompts/feature/stop.md +9 -6
  31. package/onboarding/prompts/feature/voice/implement.md +35 -6
  32. package/onboarding/prompts/feature/voice/proof.md +30 -5
  33. package/onboarding/prompts/feature/voice/start.md +29 -6
  34. package/onboarding/prompts/framework/ag2.md +2 -2
  35. package/onboarding/prompts/framework/agno.md +2 -2
  36. package/onboarding/prompts/framework/built-in.md +2 -2
  37. package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
  38. package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
  39. package/onboarding/prompts/framework/crewai-flows.md +2 -2
  40. package/onboarding/prompts/framework/deep-agents.md +2 -2
  41. package/onboarding/prompts/framework/google-adk.md +2 -2
  42. package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
  43. package/onboarding/prompts/framework/langgraph-python.md +2 -2
  44. package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
  45. package/onboarding/prompts/framework/llamaindex.md +2 -2
  46. package/onboarding/prompts/framework/mastra.md +2 -2
  47. package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
  48. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
  49. package/onboarding/prompts/framework/ms-agent-python.md +2 -2
  50. package/onboarding/prompts/framework/pydantic-ai.md +2 -2
  51. package/onboarding/prompts/framework/strands-python.md +2 -2
  52. package/onboarding/prompts/framework/strands-typescript.md +2 -2
  53. package/onboarding/prompts/frontend/angular.md +3 -3
  54. package/onboarding/prompts/frontend/nextjs.md +3 -3
  55. package/onboarding/prompts/frontend/plan.md +6 -6
  56. package/onboarding/prompts/frontend/react-native.md +2 -2
  57. package/onboarding/prompts/frontend/react-spa.md +2 -2
  58. package/onboarding/prompts/frontend/vue.md +2 -2
  59. package/onboarding/prompts/implementation/build-and-validate.md +75 -15
  60. package/onboarding/prompts/proof/complete.md +21 -8
  61. package/onboarding/prompts/proof/oss-baseline.md +6 -5
  62. package/onboarding/prompts/proof/round-trip.md +27 -14
  63. package/onboarding/prompts/research/gather.md +121 -0
  64. package/onboarding/prompts/research/route.md +81 -0
  65. package/onboarding/prompts/starter/clone.md +18 -9
  66. package/onboarding/prompts/stopped/run-failed.md +44 -0
  67. package/onboarding/prompts/subagent/create-plan.md +32 -1
  68. package/onboarding/prompts/subagent/implement-and-validate.md +9 -1
  69. package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
  70. package/onboarding/prompts/subagent/prove-round-trip.md +52 -8
  71. package/onboarding/prompts/unsupported/no-validated-path.md +9 -6
  72. package/package.json +1 -1
  73. package/release/release-tool.js +39 -3
@@ -0,0 +1,121 @@
1
+ # Gather the evidence this run routes on
2
+
3
+ Sign-in is settled. This phase inspects the project and proves what this environment can
4
+ drive. Do not change application code here, and do not ask the developer a setup question
5
+ yet: every read-only investigation finishes first.
6
+
7
+ ## How to wait for a subagent
8
+
9
+ This rule covers every subagent this run spawns, here and in every later prompt.
10
+
11
+ Spawning a subagent returns almost at once. That return is the dispatch succeeding, not the
12
+ work finishing: the subagent runs in the background, and its result reaches you as a
13
+ notification. Where your own harness hands you the report from the dispatch itself instead,
14
+ you already hold the result. Either way there is nothing to poll.
15
+
16
+ After you dispatch, do the work that does not depend on the result -- dispatch the other
17
+ subagent, run the preflight below -- and then stop and wait. Wherever a prompt in this graph
18
+ says to wait for a subagent to finish, that is what it means.
19
+
20
+ Do not sleep to pass the time. Not `sleep`, not `/bin/sleep`, not a timer under another
21
+ name, and not a loop that re-checks whether a result has arrived. Sleeping tells you nothing
22
+ that waiting for the result does not, and it spends wall clock, which is one of the things
23
+ this journey is measured on. One recorded run spent most of two hours asleep between
24
+ dispatches that had all returned in seconds.
25
+
26
+ Before you ask the developer any setup question, finish every read-only investigation and
27
+ preflight check in this section.
28
+
29
+ Prepare two research assignments. Give each research subagent one assignment. Tell it to run
30
+ `npx --yes copilotkit@4.10.0 onboard read subagent/inspect-repository` first and follow the
31
+ prompt it returns. If that read fails because the subagent cannot use the shell, stop that
32
+ subagent. Run the same command yourself, then spawn a fresh subagent with the returned prompt
33
+ and the same handoff. Require only its assigned packet.
34
+
35
+ Start both research subagents in parallel:
36
+
37
+ 1. Spawn one research subagent. Assign it the project evidence packet.
38
+ 2. Spawn a second research subagent. Assign it the environment evidence packet.
39
+ 3. Start both research subagents. Then continue.
40
+
41
+ Continue to the surface-control preflight.
42
+
43
+ Prove whether your coding-agent environment has browser or device control. Do not assume it
44
+ either way, and do not report what you expect to be true: a run that guesses here records a
45
+ capability every later step then trusts. Use a browser or device tool already
46
+ configured for the coding agent you are running as, the same way a later step uses the
47
+ CopilotKit documentation server. With a browser tool, open one inert page such as
48
+ `about:blank` and read its title. With a device tool and no browser, list the booted devices
49
+ in one command: `adb devices -l`. Record the outcome of that attempt: `available` when the
50
+ tool answered, `unavailable` when there was none to call or the page did not open. Use
51
+ the control that matches the selected surface later.
52
+
53
+ Where the browser probe answered, register nothing. The harness came equipped and the run
54
+ owes it no setup.
55
+
56
+ Where no browser tool answered, register one for the coding agent you are running as, then
57
+ run the same probe again and record what the second attempt did. Register this server:
58
+
59
+ ```text
60
+ npx --yes @playwright/mcp@latest --browser chrome --isolated --output-dir <project>/.copilotkit/proof/browser
61
+ ```
62
+
63
+ Replace `<project>` with the absolute path of the target project directory. The server is
64
+ registered against the coding agent rather than against a directory, so a relative path here
65
+ resolves wherever that server happens to start.
66
+
67
+ `--browser chrome` drives the Google Chrome the developer already has, so this downloads no
68
+ browser. `--isolated` keeps the profile in memory, so it never touches their own Chrome
69
+ profile. `--output-dir` is what keeps the snapshots and screenshots out of the developer's
70
+ repository root: without it this server writes them to `.playwright-mcp/` beside their code,
71
+ which a project that never asked for a browser has no reason to carry, and which this setup's
72
+ own evidence rule already has a place for. Register it the way your own harness registers a
73
+ server, which is the mechanism a later step uses for the CopilotKit documentation server.
74
+
75
+ Tell the developer in one line what you registered, that it drives their installed Chrome,
76
+ and that it lives in this coding agent's configuration rather than in their repository. Do
77
+ not ask them to approve it, and do not ask a second question about it.
78
+
79
+ Do not add a browser or device driver to the project. A driver added there is a
80
+ devDependency and a browser download in the diff of a repository that never asked for one,
81
+ which is a different thing from a server registered against the coding agent.
82
+
83
+ Where the second probe still does not answer -- no Chrome to drive, no network, or a
84
+ harness that cannot register a server -- record `unavailable` and carry it. Do not keep
85
+ trying, and do not ask the developer about this tool limit.
86
+
87
+ Registering a server does not boot a device. Where the device probe found none, that is the
88
+ whole finding, and a browser is not a substitute for a device.
89
+
90
+ Wait for both research subagents to finish.
91
+
92
+ Then report that the research came back:
93
+
94
+ ```text
95
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase research-returned
96
+ ```
97
+
98
+ A refused checkpoint prints its reason and leaves onboarding unaffected. It is not a
99
+ failed step.
100
+
101
+ Continue only if both research results start with `Status: passed`. For `Status: failed`,
102
+ retry only that packet with its failed items, up to three attempts. For `Status: blocked`,
103
+ or a third failed result, use the stop route at the end of this prompt.
104
+
105
+ Merge both evidence packets by item. On a conflict, spawn one fresh read-only verifier with
106
+ the item, both cited findings, and the research limits. Require its result to start with
107
+ `Status: passed`, `Status: failed`, or `Status: blocked`. Use only a passed cited result. Do
108
+ not inspect the project to settle the conflict yourself. Use the stop route for a non-pass
109
+ verifier result.
110
+
111
+ Match environment evidence to the target app directory from the project packet. Require one
112
+ target app directory and one matching environment row. If either packet gives no match or
113
+ more than one match, send each research worker a focused directory check. Continue only when
114
+ both workers return the same one target app directory. Both results must start with
115
+ `Status: passed`. Otherwise, use the stop route.
116
+
117
+ When both research results are merged, run
118
+ `npx --yes copilotkit@4.10.0 onboard read research/route`.
119
+
120
+ If inspection stops onboarding, run
121
+ `npx --yes copilotkit@4.10.0 onboard read stopped/run-failed`.
@@ -0,0 +1,81 @@
1
+ # Capture the baseline and route on the findings
2
+
3
+ The merged research findings are in hand. This phase captures the protected-path baseline
4
+ before anything is written, checks that the findings answer what the route needs, and
5
+ sends the run down one path.
6
+
7
+ ## Capture the protected-path baseline
8
+
9
+ Before you route on, run this from the target app directory:
10
+
11
+ ```text
12
+ npx --yes copilotkit@4.10.0 onboard protect
13
+ ```
14
+
15
+ It reads the working tree itself, records every changed or untracked path with a digest,
16
+ and prints the list. Require its result to start with `Status: passed`.
17
+
18
+ Use the printed list as the protected path list for the rest of the run. Do not assemble
19
+ that list yourself, and do not ask a subagent to hold it: every later audit reads the
20
+ captured baseline back from the CLI, so no step depends on a subagent that has since
21
+ finished.
22
+
23
+ Paths printed as `deferred` are the ones onboarding itself writes, `.env` and
24
+ `.copilotkit/project.json`. Every audit reports them and none fails on them until the step
25
+ that writes them re-captures them, so a run whose only untracked files are the two this
26
+ graph exists to create is never stopped by them.
27
+
28
+ If the result starts with `Status: blocked`, report the printed reason and use the stop
29
+ route at the end of this prompt.
30
+
31
+ ## What the merged findings must contain
32
+
33
+ If a repository file exists, each finding must cite it. For an empty project, the subagents
34
+ must cite the directory check and report absent parts.
35
+
36
+ The findings must cover what the project is for, the agent, frontend, CopilotKit setup,
37
+ authentication, credential names, and validation path. Do not ask the developer for facts
38
+ that the repository answers.
39
+
40
+ ## Route on the merged findings
41
+
42
+ Read the route off the merged findings. Three of them decide it, and you already hold all
43
+ three:
44
+
45
+ 1. an agent is present,
46
+ 2. a frontend is present,
47
+ 3. a CopilotKit integration is present.
48
+
49
+ Do not infer a working OSS path from packages, imports, project files, or keys, and do not
50
+ settle these three from your own reading of the project. Each one comes from the merged
51
+ packets or it is not proved.
52
+
53
+ If all three are proved, prove the live starting state before any project file changes. Run
54
+ `npx --yes copilotkit@4.10.0 onboard read proof/oss-baseline`.
55
+
56
+ Route there before you ask the developer anything else. The questions after this prompt
57
+ select a framework and a frontend that the findings already name, so a developer who
58
+ answers them has answered for work the next node exists to check. Their existing
59
+ application is what that node protects. Whether it works is what the proof decides, not
60
+ these three findings.
61
+
62
+ For every other combination of the three, take one more step first. If neither the
63
+ developer nor the repository findings prove what the project is for, ask one guided
64
+ question about the user outcome. This asks what the developer wants to build before you
65
+ select a framework. Give two or three short examples and offer a minimal starter. Record
66
+ the answer and give it to each later subagent. Then run
67
+ `npx --yes copilotkit@4.10.0 onboard read credentials/plan`.
68
+
69
+ Do not ask that question on the route above. A project carrying all three states its
70
+ purpose in the application it already serves.
71
+
72
+ Do not ask it when the target directory holds no project either. A greenfield run clones a starter
73
+ the CLI ships, and that starter arrives carrying a working application of its own. The
74
+ answer cannot change which starter lands, because the starter follows from the framework
75
+ and frontend the developer selects next. Asking spends a turn on a decision the run has
76
+ already made, and then names a purpose the cloned code does not serve. Take the same read
77
+ named above without asking, and let the starter state the domain.
78
+
79
+ If authentication or inspection stops onboarding, run
80
+ `npx --yes copilotkit@4.10.0 onboard read stopped/run-failed`. Neither says anything
81
+ about whether this project's stack is supported, which is not yet known at this point.
@@ -1,8 +1,11 @@
1
1
  # Clone a starter
2
2
 
3
3
  Use this shortcut only when the repository findings prove that the target project
4
- directory contains no entries. If the directory contains a file or directory, do not use
5
- this shortcut.
4
+ directory holds no project yet: no source directory such as `src/`, `app/`, `agent/` or
5
+ `web/`, no dependency manifest such as `package.json` or `pyproject.toml`, and no `.env`.
6
+ A directory that holds only a Git repository, a coding agent's own configuration, editor
7
+ settings or scratch notes still qualifies. Those are not a project, and `git init` is the
8
+ marker this CLI anchors a run on, so it cannot also be the thing that disqualifies one.
6
9
 
7
10
  Match the selected agent framework and frontend to this table:
8
11
 
@@ -43,7 +46,7 @@ the derived name.
43
46
  Only if the developer asks for an existing project, or asks to see the projects they have,
44
47
  read the choices:
45
48
 
46
- `npx --yes copilotkit@4.9.60 project list --json`
49
+ `npx --yes copilotkit@4.10.0 project list --json`
47
50
 
48
51
  Then ask which one to use. Do not order the projects by creation time. If the developer
49
52
  already gave this answer, do not ask again. Do not read a secret value. Do not show or
@@ -53,7 +56,7 @@ Run the command from the parent directory. Do not inspect another entry in the p
53
56
  directory. Replace each placeholder with the recorded value. Do not run a placeholder as
54
57
  a shell argument.
55
58
 
56
- `npx --yes copilotkit@4.9.60 init --name <project-name> --framework <framework-id> --channel none --no-banner --create <name> --install`
59
+ `npx --yes copilotkit@4.10.0 init --name <project-name> --framework <framework-id> --channel none --no-banner --create <name> --install`
57
60
 
58
61
  Pass the confirmed name to both `--name` and `--create`: the app directory and its
59
62
  Intelligence project take the same name here. If the developer names an existing project,
@@ -66,17 +69,23 @@ The command clones the starter into the empty target directory. It also connects
66
69
  starter to the developer's Intelligence project. The earlier login phase supplies the
67
70
  account. The command does not need terminal input.
68
71
 
69
- If the command succeeds, do not rebuild the starter by hand. Report the clone first:
72
+ Report the clone before you inspect anything:
70
73
 
71
74
  ```text
72
- npx --yes copilotkit@4.9.60 onboard checkpoint --phase starter-cloned
75
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase starter-cloned
73
76
  ```
74
77
 
75
- Then inspect only the generated
78
+ This is its own step, not an aside. A run that clones and then goes quiet is
79
+ indistinguishable from a run that never cloned, and the checkpoint is the only thing that
80
+ separates them.
81
+
82
+ Do not rebuild the starter by hand. Then inspect only the generated
76
83
  paths inside the target directory. Record the files, install result, project connection,
77
84
  and validation commands. Then run
78
- `npx --yes copilotkit@4.9.60 onboard read proof/round-trip`.
85
+ `npx --yes copilotkit@4.10.0 onboard read proof/round-trip`.
79
86
 
80
87
  If the command fails, report its exact error and do not claim that the starter is ready.
81
88
  Then run
82
- `npx --yes copilotkit@4.9.60 onboard read unsupported/no-validated-path`.
89
+ `npx --yes copilotkit@4.10.0 onboard read stopped/run-failed`. The starter is one this
90
+ graph ships and the stack was chosen from its own supported list, so a command that
91
+ returned an error is a run that broke, not a setup this release does not support.
@@ -0,0 +1,44 @@
1
+ # Stop because the run did not finish
2
+
3
+ This is the ending for a run that broke. The developer's agent, frontend and package
4
+ choices are supported. Something in this run stopped it, and that is what the report has
5
+ to say.
6
+
7
+ Do not tell the developer their setup is unsupported. It is not, and a run that says so
8
+ sends them to change a stack that was never the problem.
9
+
10
+ Keep the developer's current agent, frontend, authentication, and package choices.
11
+
12
+ Name the exact step that stopped the run, and what it returned. State whether
13
+ authentication, project selection, project credentials, the journey, implementation,
14
+ validation, or the round trip stopped it. Give the failure in the words the step printed,
15
+ not a summary of them.
16
+
17
+ If a protected path stopped this run, name that path and how it changed, in the words the
18
+ audit printed. A report that says only that protected files changed cannot be acted on:
19
+ nobody reading it can tell which file moved, or whether this run or the developer moved
20
+ it.
21
+
22
+ Say what the developer has now. Name the processes still running and the files this run
23
+ changed, so they can carry on by hand or start again from a known state. A run that stops
24
+ without saying what it left behind leaves the developer to discover it.
25
+
26
+ Stop onboarding without making more repository changes.
27
+
28
+ Send one short report. Run the friction command without another developer question. The
29
+ CLI telemetry gate decides whether the report is sent.
30
+
31
+ ```text
32
+ npx --yes copilotkit@4.10.0 onboard friction --phase stop --category <slug>
33
+ ```
34
+
35
+ Write one or two sentences to standard input: the step you stopped at and what stopped
36
+ it. Pick the category that fits from docs-missing, docs-wrong, docs-sequential, cli-gap,
37
+ sdk-gap, environment, port-collision, credential, validation-loop, and other. Leave
38
+ --cost-seconds off. A run that stopped cannot separate one papercut's cost from the cost
39
+ of the whole run, so the estimate is optional on a stop report and only there.
40
+ Send no secrets, source code, logs, or command output. The command refuses a report that
41
+ carries any of those, prints the reason, and exits zero. A refused report is not a failed
42
+ step. Reword it and send it again, or stop without a report. The command prints what it
43
+ sent. This is the channel for a stop. If the CLI says the report was not sent, state what
44
+ it said and stop without another question.
@@ -23,6 +23,37 @@ SQLite, custom, or framework persistence can be durable. The two options cannot
23
23
  combined. Take the constructor from the connect-your-runtime page. Where a framework
24
24
  quickstart shows a `runner` option instead, the connect-your-runtime page wins.
25
25
 
26
+ ## Plan the Learning Container and its selector
27
+
28
+ The main coding agent gives you a Learning Container id, or tells you the Learning step was
29
+ skipped for this organization.
30
+
31
+ Where it gives you an id, plan two things and name both in the plan the developer approves:
32
+ the container id itself, and a `getLearningContainerId` callback returning that id on the
33
+ `CopilotKitIntelligence` instance. Take the callback from the Learning page, and fetch it
34
+ here rather than expecting the run to have handed it over:
35
+
36
+ ```text
37
+ https://docs.copilotkit.ai/learning.md
38
+ ```
39
+
40
+ Put the callback in the same runtime edit that connects Intelligence rather than in a step
41
+ of its own: it is one option on the same constructor, so a separate step names a second
42
+ change to a file the first step already changes.
43
+
44
+ Name the container before the selector, and name the id in both. A container nothing routes
45
+ to stays empty forever, so it buys a name and no learning. A selector pointing at an id the
46
+ platform does not hold answers `LEARNING_CONTAINER_NOT_FOUND` on every thread create, which
47
+ breaks a working chat on the next message.
48
+
49
+ Per-user routing is the developer's own selector logic rather than more containers. Do not
50
+ plan one container per end user: a project holds at most 500, the first automatic Learning
51
+ run needs threads from 15 distinct conversations in one container, and a container per
52
+ person needs those 15 conversations from that one person.
53
+
54
+ Where the Learning step was skipped, plan no container and no selector, and say in the plan
55
+ that Learning is not available to this organization.
56
+
26
57
  When the starting state is `both-oss`, use its recorded live baseline evidence. Preserve
27
58
  the working agent, frontend, CopilotKit integration, and OSS behavior. Plan the project
28
59
  selection, the CopilotKit dependency upgrade below, the Intelligence runtime
@@ -122,7 +153,7 @@ here is work the developer did not ask for.
122
153
  Plan the threads drawer itself: add it from the selected drawer page, where this frontend
123
154
  does not already render one. Where this journey's frontend framework ships no threads
124
155
  drawer -- React Native --, plan that the thread is proved by
125
- `npx --yes copilotkit@4.9.60 verify --round-trip`, which needs no browser. Do not plan a
156
+ `npx --yes copilotkit@4.10.0 verify --round-trip`, which needs no browser. Do not plan a
126
157
  step that opens the managed Intelligence dashboard.
127
158
 
128
159
  ## Order the plan into steps
@@ -110,8 +110,16 @@ project does not hold, and the rendered result looks the same either way.
110
110
  Run the full validation list. Record changed files, command results, and errors. Do not
111
111
  claim that the real user journey works in this phase.
112
112
 
113
+ Where the plan names a Learning Container id, set `getLearningContainerId` on the
114
+ `CopilotKitIntelligence` instance in the same edit that constructs the runtime with
115
+ `intelligence`. Return that one id for every run. Do not add a file, a step, or a second
116
+ constructor for it, and never write an id the plan does not name: a selector pointing at an
117
+ id the platform does not hold answers `LEARNING_CONTAINER_NOT_FOUND` on every thread create.
118
+ Where the plan names no container, write no selector.
119
+
113
120
  Report the runtime constructor you wrote. Name whether it passes `intelligence` or
114
- `runner`. A runtime built with `runner` is the SSE runtime and never reads the credential,
121
+ `runner`, and whether it carries `getLearningContainerId`, with the id it returns.
122
+ A runtime built with `runner` is the SSE runtime and never reads the credential,
115
123
  whatever the browser shows.
116
124
 
117
125
  Gather what you need in as few commands as possible. Combine independent reads into one
@@ -19,7 +19,7 @@ Prove the live runtime in this order:
19
19
  4. Confirm from project files that the runtime constructor passes a `runner` option rather
20
20
  than an `intelligence` option. A package, import, project file, or key is not use proof.
21
21
  5. Run
22
- `npx --yes copilotkit@4.9.60 verify --expect-runtime oss --round-trip --agent <expected-agent-id> --json`,
22
+ `npx --yes copilotkit@4.10.0 verify --expect-runtime oss --round-trip --agent <expected-agent-id> --json`,
23
23
  with the runtime URL or auth header options that this project needs. Require exit zero
24
24
  and the JSON `ok` field to be `true`.
25
25
  6. Drive one real request through the existing frontend, CopilotKit runtime, and expected
@@ -73,6 +73,12 @@ started process's output. The project's configuration wins over the table.
73
73
  Where this project's runtime runs as a process of its own, the frontend documentation
74
74
  puts it on port 8200. Use the runtime URL from step 1 rather than that number.
75
75
 
76
+ Read the project's scripts before you start anything. A scaffolded starter serves both the
77
+ agent and the frontend from one `dev` script, which runs them under
78
+ `concurrently --kill-others`. One command starts both, and stopping either one stops the
79
+ other. A second start against a project already running that script collides with a server
80
+ that is up.
81
+
76
82
  Start each server in the background with the project's own script. Then wait for it to
77
83
  answer rather than for a fixed number of seconds:
78
84
 
@@ -89,8 +95,14 @@ Read the loop's own last line rather than assuming it ended because the server a
89
95
  A server that never answered has written the reason to its own output, and reading that
90
96
  output is faster than starting it again.
91
97
 
98
+ That coupling also turns an ordinary restart into a false failure. Where you stop a server
99
+ to pick up an installed dependency, start both again and wait for both to answer before you
100
+ read the round trip. A check run against a frontend whose agent was stopped with it reports
101
+ a wiring fault this run does not have.
102
+
92
103
  Leave the agent and frontend servers running after proof. Record each process ID and a
93
- safe command that stops that process. Record the commands that start both servers again.
104
+ safe command that stops that process. Record whether that command stops both. Record the
105
+ commands that start both servers again.
94
106
 
95
107
  Record the frontend URL the server you started reports, and treat it as provisional. Step 4
96
108
  replaces it with the URL the CLI resolves. Do not compose one of your own from a port you
@@ -123,7 +135,7 @@ IPv6 only, so an IPv4 literal fails against the correct port.
123
135
  ## Step 4 -- Check the wiring
124
136
 
125
137
  With both running, check the wiring in one command before you open a browser:
126
- `npx --yes copilotkit@4.9.60 verify --json`. It reads the port from this project, so a
138
+ `npx --yes copilotkit@4.10.0 verify --json`. It reads the port from this project, so a
127
139
  non-default port needs no flag. The payload reports `runtimeUrl` and `runtimeUrlSource`. A
128
140
  `runtimeUrlSource` of `default` means nothing in the project named a port, so pass
129
141
  `--runtime-url` with the URL from step 1 in that case. Read the individual checks rather than
@@ -138,7 +150,7 @@ used the Intelligence credential. `api_key_authenticates` proves only that the k
138
150
  will not read. `verify` searches upward for the credential and a framework's env loader
139
151
  does not, so a key at the repository root is invisible to an app in a subdirectory. The
140
152
  check names the file to write instead. Write the key there, or run
141
- `npx --yes copilotkit@4.9.60 project select` from the app directory. Do not link,
153
+ `npx --yes copilotkit@4.10.0 project select` from the app directory. Do not link,
142
154
  copy, or symlink the file to work around it, and do not treat the credential as missing:
143
155
  the check above already reported that it exists.
144
156
 
@@ -156,7 +168,7 @@ named no port the CLI can read: keep step 2's URL, and rewrite its host as `loca
156
168
  before you use it.
157
169
 
158
170
  Then run the command once more with the URL you are about to open:
159
- `npx --yes copilotkit@4.9.60 verify --frontend-url <that url> --json`. The
171
+ `npx --yes copilotkit@4.10.0 verify --frontend-url <that url> --json`. The
160
172
  `frontend_assets_served` check asks that server for its page and for one of the page's own
161
173
  assets, on that exact host. A `fail` there means the dev server refuses its own static
162
174
  assets on the host you were about to use, and the check names the URL to use instead. This
@@ -164,7 +176,7 @@ is the cheapest step that can save the most expensive one, so run it before the
164
176
 
165
177
  ## Step 5 -- Prove that the agent runs
166
178
 
167
- Run `npx --yes copilotkit@4.9.60 verify --round-trip --json`. It sends one request through
179
+ Run `npx --yes copilotkit@4.10.0 verify --round-trip --json`. It sends one request through
168
180
  the runtime and reads the answer back from the thread, so it separates an agent that is
169
181
  configured from an agent that works. Use `--agent <id>` when the runtime declares more
170
182
  than one. If it reports `user-not-identified`, this project's `identifyUser` reads a
@@ -173,6 +185,38 @@ it again, because an auth-gated app refusing an unauthenticated caller is that a
173
185
  working. Do not continue until this passes, and never report a round trip proven without
174
186
  it.
175
187
 
188
+ Where this run settled a Learning Container, add the flag to the call above rather than
189
+ running a second round trip:
190
+
191
+ ```text
192
+ npx --yes copilotkit@4.10.0 verify --round-trip --expect-learning-container <container id> --json
193
+ ```
194
+
195
+ The check reads the thread that this run created, so a second round trip proves a second
196
+ thread and leaves the first unexamined. Add `--agent <id>` here too when the runtime
197
+ declares more than one.
198
+
199
+ It reads the thread back from the platform, so it answers for every runtime mount,
200
+ including a single-route one. Read the `extraChecks` entry whose `id` is
201
+ `learning_container_assigned`, and route on that entry's own `status` rather than on the
202
+ exit status: the command exits non-zero for any check that is not `pass`, and
203
+ `undetermined` is what a runtime the CLI cannot read reports.
204
+
205
+ - `pass` proves the assignment. The thread came back carrying the container this run
206
+ settled.
207
+ - `fail` is a defect. Either the thread carries no container, which means the selector
208
+ returned nothing, or it carries a different one. A thread cannot move between containers
209
+ after its first assignment, so start a new thread rather than repairing that one.
210
+ - `undetermined` proves nothing either way. Record it and continue. An auth-gated
211
+ `identifyUser` produces it on an app that works, and so does a runtime the CLI cannot
212
+ read.
213
+
214
+ `features.self_learning` and `/info` are not evidence. The first is a plan entitlement and
215
+ is already true before any wiring. The second reports Learning from the presence of a
216
+ callback rather than from an assigned thread. Never report either one as proof.
217
+
218
+ Where this run skipped the Learning step, leave the flag off.
219
+
176
220
  ### Step 5a -- Prove that the page's data reaches the model
177
221
 
178
222
  `verify --round-trip` sends `context: []` and asks a question that needs no context. It
@@ -235,13 +279,13 @@ holds. Streamed text alone is not this step's outcome, whatever it says.
235
279
  This is the step that covers realtime delivery, the frontend provider being wired to this
236
280
  runtime, and the component actually rendering, and no command-line check reaches any of
237
281
  them. It is not optional polish: a run that skips it has proven the agent and not the
238
- journey, and the graph ends such a run as blocked rather than complete.
282
+ journey, and such a run ends as blocked rather than complete.
239
283
 
240
284
  For a recorded `both-oss` starting state, this step has no component to render. Send the
241
285
  same request the baseline recorded, require the same kind of user-visible result the
242
286
  baseline produced, and require that the thread for that request is listed in the drawer.
243
287
  Where this journey's frontend framework ships no threads drawer -- React Native --, prove
244
- that thread with `npx --yes copilotkit@4.9.60 verify --round-trip`, which reads the
288
+ that thread with `npx --yes copilotkit@4.10.0 verify --round-trip`, which reads the
245
289
  answer back off the thread and needs no browser. Record which of the two you proved.
246
290
 
247
291
  Use the surface control the main coding agent recorded for your environment. It either had
@@ -269,7 +313,7 @@ request never exercises. Drive it with the browser control step 6 named.
269
313
  the page to finish loading. Do not retype the host, and do not substitute a URL a tool
270
314
  offers you by default. Where the page loads but its styling is missing or the chat
271
315
  control is dead, run
272
- `npx --yes copilotkit@4.9.60 verify --frontend-url <the url you opened> --json`
316
+ `npx --yes copilotkit@4.10.0 verify --frontend-url <the url you opened> --json`
273
317
  before you diagnose anything else. A dev server can serve its page and refuse every
274
318
  static chunk behind it, and on screen that is indistinguishable from a broken
275
319
  integration. The `frontend_assets_served` check tells the two apart.
@@ -30,19 +30,22 @@ Before you show the best-effort plan, require this complete packet:
30
30
  - Give the ordered proof rules.
31
31
 
32
32
  After the developer approves the best-effort plan, run
33
- `npx --yes copilotkit@4.9.60 onboard read fallback/best-effort`.
33
+ `npx --yes copilotkit@4.10.0 onboard read fallback/best-effort`.
34
34
 
35
- Send one short report. Run the feedback command without another developer question. The
35
+ Send one short report. Run the friction command without another developer question. The
36
36
  CLI telemetry gate decides whether the report is sent.
37
37
 
38
38
  ```text
39
- npx --yes copilotkit@4.9.60 onboard feedback
39
+ npx --yes copilotkit@4.10.0 onboard friction --phase stop --category <slug>
40
40
  ```
41
41
 
42
- Write the feedback message to the command's standard input, in at most four lines.
42
+ Write one or two sentences to standard input: the step you stopped at and what stopped it.
43
+ Pick the category that fits from docs-missing, docs-wrong, docs-sequential, cli-gap,
44
+ sdk-gap, environment, port-collision, credential, validation-loop, and other. Leave
45
+ --cost-seconds off. A run that stopped cannot separate one papercut's cost from the cost
46
+ of the whole run, so the estimate is optional on a stop report and only there.
43
47
  Send no secrets, source code, logs, or command output. The command refuses a report
44
48
  that carries any of those, prints the reason, and exits zero. A refused report is not
45
49
  a failed step. Reword it and send it again, or stop without a report. The command
46
- prints what it sent. This is the channel for a stop. Report friction only from a run that
47
- finished, never from here. If the CLI says the report was not sent,
50
+ prints what it sent. This is the channel for a stop. If the CLI says the report was not sent,
48
51
  state what it said and stop without another question.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "copilotkit",
3
- "version": "4.9.60",
3
+ "version": "4.10.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14698,7 +14698,7 @@ import * as path4 from "node:path";
14698
14698
 
14699
14699
  // apps/cli/src/config.ts
14700
14700
  function getTemplateRef() {
14701
- return true ? "d1584b840f904674b470be5d2b16c4ccca99c4f4" : "main";
14701
+ return true ? "ce490419d046abe697438b070a99ad5d674365cc" : "main";
14702
14702
  }
14703
14703
 
14704
14704
  // apps/cli/src/services/agentcore-config.ts
@@ -15270,13 +15270,49 @@ import * as fs3 from "node:fs";
15270
15270
  import * as path3 from "node:path";
15271
15271
  import * as os from "node:os";
15272
15272
  import { execFileSync } from "node:child_process";
15273
+ var PROJECT_DIRECTORY_NAMES = /* @__PURE__ */ new Set([
15274
+ "agent",
15275
+ "api",
15276
+ "app",
15277
+ "components",
15278
+ "lib",
15279
+ "packages",
15280
+ "pages",
15281
+ "server",
15282
+ "src",
15283
+ "web"
15284
+ ]);
15285
+ var PROJECT_MANIFEST_NAMES = /* @__PURE__ */ new Set([
15286
+ "Cargo.toml",
15287
+ "Gemfile",
15288
+ "build.gradle",
15289
+ "composer.json",
15290
+ "go.mod",
15291
+ "package.json",
15292
+ "pom.xml",
15293
+ "pyproject.toml",
15294
+ "requirements.txt"
15295
+ ]);
15296
+ var ENV_TEMPLATE_SUFFIXES = [".example", ".sample", ".template"];
15297
+ function isCredentialEnvFile(entry) {
15298
+ if (!entry.startsWith(".env"))
15299
+ return false;
15300
+ if (ENV_TEMPLATE_SUFFIXES.some((suffix) => entry.endsWith(suffix)))
15301
+ return false;
15302
+ return entry === ".env" || entry.startsWith(".env.");
15303
+ }
15304
+ function entryHoldsProject(entry) {
15305
+ if (isCredentialEnvFile(entry))
15306
+ return true;
15307
+ return PROJECT_DIRECTORY_NAMES.has(entry) || PROJECT_MANIFEST_NAMES.has(entry);
15308
+ }
15273
15309
  function isProjectDirOccupied(projectDir) {
15274
- return fs3.existsSync(projectDir) && fs3.readdirSync(projectDir).length > 0;
15310
+ return fs3.existsSync(projectDir) && fs3.readdirSync(projectDir).some(entryHoldsProject);
15275
15311
  }
15276
15312
  function assertProjectDirAvailable(projectDir) {
15277
15313
  if (isProjectDirOccupied(projectDir)) {
15278
15314
  throw tagError(
15279
- new Error(`${projectDir} already exists and is not empty`),
15315
+ new Error(`${projectDir} already holds a project`),
15280
15316
  TELEMETRY_ERROR_CODES.PREREQUISITE_MISSING
15281
15317
  );
15282
15318
  }