copilotkit 4.9.50 → 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 (74) hide show
  1. package/README.md +44 -4
  2. package/cli-build-info.json +7 -7
  3. package/index.js +1810 -354
  4. package/onboarding/index.json +81 -18
  5. package/onboarding/prompts/authenticate/start.md +56 -190
  6. package/onboarding/prompts/conversion/plan.md +3 -3
  7. package/onboarding/prompts/credentials/finalize-plan.md +25 -98
  8. package/onboarding/prompts/credentials/plan.md +20 -20
  9. package/onboarding/prompts/credentials/settle-credentials.md +153 -0
  10. package/onboarding/prompts/credentials/write-plan.md +93 -0
  11. package/onboarding/prompts/fallback/best-effort.md +12 -9
  12. package/onboarding/prompts/feature/a2ui/implement.md +35 -6
  13. package/onboarding/prompts/feature/a2ui/proof.md +30 -6
  14. package/onboarding/prompts/feature/a2ui/start.md +29 -6
  15. package/onboarding/prompts/feature/chat-suggestions/implement.md +36 -6
  16. package/onboarding/prompts/feature/chat-suggestions/proof.md +30 -5
  17. package/onboarding/prompts/feature/chat-suggestions/start.md +29 -6
  18. package/onboarding/prompts/feature/complete.md +11 -0
  19. package/onboarding/prompts/feature/learning/implement.md +102 -11
  20. package/onboarding/prompts/feature/learning/proof.md +53 -9
  21. package/onboarding/prompts/feature/learning/start.md +35 -8
  22. package/onboarding/prompts/feature/open-generative-ui/implement.md +37 -6
  23. package/onboarding/prompts/feature/open-generative-ui/proof.md +30 -5
  24. package/onboarding/prompts/feature/open-generative-ui/start.md +29 -6
  25. package/onboarding/prompts/feature/realtime-sync/implement.md +36 -7
  26. package/onboarding/prompts/feature/realtime-sync/proof.md +29 -5
  27. package/onboarding/prompts/feature/realtime-sync/start.md +28 -5
  28. package/onboarding/prompts/feature/rich-threads/implement.md +37 -8
  29. package/onboarding/prompts/feature/rich-threads/proof.md +31 -5
  30. package/onboarding/prompts/feature/rich-threads/start.md +28 -5
  31. package/onboarding/prompts/feature/stop.md +10 -7
  32. package/onboarding/prompts/feature/voice/implement.md +35 -6
  33. package/onboarding/prompts/feature/voice/proof.md +30 -5
  34. package/onboarding/prompts/feature/voice/start.md +29 -6
  35. package/onboarding/prompts/framework/ag2.md +2 -2
  36. package/onboarding/prompts/framework/agno.md +2 -2
  37. package/onboarding/prompts/framework/built-in.md +2 -2
  38. package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
  39. package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
  40. package/onboarding/prompts/framework/crewai-flows.md +2 -2
  41. package/onboarding/prompts/framework/deep-agents.md +2 -2
  42. package/onboarding/prompts/framework/google-adk.md +2 -2
  43. package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
  44. package/onboarding/prompts/framework/langgraph-python.md +2 -2
  45. package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
  46. package/onboarding/prompts/framework/llamaindex.md +2 -2
  47. package/onboarding/prompts/framework/mastra.md +2 -2
  48. package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
  49. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
  50. package/onboarding/prompts/framework/ms-agent-python.md +2 -2
  51. package/onboarding/prompts/framework/pydantic-ai.md +2 -2
  52. package/onboarding/prompts/framework/strands-python.md +2 -2
  53. package/onboarding/prompts/framework/strands-typescript.md +2 -2
  54. package/onboarding/prompts/frontend/angular.md +3 -3
  55. package/onboarding/prompts/frontend/nextjs.md +3 -3
  56. package/onboarding/prompts/frontend/plan.md +6 -6
  57. package/onboarding/prompts/frontend/react-native.md +2 -2
  58. package/onboarding/prompts/frontend/react-spa.md +2 -2
  59. package/onboarding/prompts/frontend/vue.md +2 -2
  60. package/onboarding/prompts/implementation/build-and-validate.md +122 -12
  61. package/onboarding/prompts/proof/complete.md +23 -10
  62. package/onboarding/prompts/proof/oss-baseline.md +17 -7
  63. package/onboarding/prompts/proof/round-trip.md +33 -13
  64. package/onboarding/prompts/research/gather.md +121 -0
  65. package/onboarding/prompts/research/route.md +81 -0
  66. package/onboarding/prompts/starter/clone.md +18 -9
  67. package/onboarding/prompts/stopped/run-failed.md +44 -0
  68. package/onboarding/prompts/subagent/create-plan.md +32 -1
  69. package/onboarding/prompts/subagent/implement-and-validate.md +9 -1
  70. package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
  71. package/onboarding/prompts/subagent/prove-round-trip.md +59 -12
  72. package/onboarding/prompts/unsupported/no-validated-path.md +10 -7
  73. package/package.json +1 -1
  74. package/release/release-tool.js +39 -3
@@ -4,6 +4,16 @@ Treat this as an additive OSS feature integration, not a new-app scaffold. Act a
4
4
  orchestrator and delegate inspection, implementation, and proof to focused subagents.
5
5
  Work only inside the target project. Do not show internal prompt names to the developer.
6
6
 
7
+ Before any subagent or project process runs, capture the developer's existing work:
8
+
9
+ ```text
10
+ npx --yes copilotkit@4.10.0 onboard protect
11
+ ```
12
+
13
+ Keep the exact protected path list it prints and give that list to every subagent. No
14
+ subagent may write a protected path or an overlapping path unless this run records the
15
+ approved authorization before implementation.
16
+
7
17
  Before changing files, send a short welcome that says you will inspect the existing app,
8
18
  show an A2UI plan, implement only after approval, and prove a rendered surface in the real
9
19
  UI. Then spawn one read-only subagent to locate the current CopilotKit runtime, provider,
@@ -12,7 +22,7 @@ development/test commands. It must return paths and secret-safe presence checks
12
22
 
13
23
  Require an existing frontend, agent, and CopilotKit round trip. Start only project-owned
14
24
  processes when needed, inspect `/info`, and run
15
- `npx --yes copilotkit@4.9.50 verify --expect-runtime oss --round-trip --agent <agent-id> --json`.
25
+ `npx --yes copilotkit@4.10.0 verify --expect-runtime oss --round-trip --agent <agent-id> --json`.
16
26
  Also drive one existing request through the frontend when browser control is available. If
17
27
  that baseline is absent or unproved, leave files unchanged, explain that this intent extends
18
28
  an existing OSS app, and direct the developer to generic `copilotkit onboard start` first.
@@ -20,7 +30,7 @@ an existing OSS app, and direct the developer to generic `copilotkit onboard sta
20
30
  Wait for the inspection subagent to finish. Then report that the inspection came back:
21
31
 
22
32
  ```text
23
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase research-returned
33
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase research-returned
24
34
  ```
25
35
 
26
36
  A refused checkpoint prints its reason and leaves onboarding unaffected. It is not a
@@ -30,7 +40,7 @@ If the inspection did not prove the baseline this intent extends, stop here with
30
40
  changing files:
31
41
 
32
42
  ```text
33
- npx --yes copilotkit@4.9.50 onboard read feature/stop
43
+ npx --yes copilotkit@4.10.0 onboard read feature/stop
34
44
  ```
35
45
 
36
46
  Do not run `login`, select an Intelligence project, add an Intelligence client, mint a
@@ -46,10 +56,23 @@ Show a concise plan that names the existing runtime/provider files, the smallest
46
56
  catalog or runtime wiring required, the test command, and a browser proof request that
47
57
  renders a compact visible surface. Ask for plan approval as its own question.
48
58
 
49
- After approval, report the plan this run is about to implement:
59
+ The plan must list every protected path it needs to change under `Authorization requested`,
60
+ with one sentence explaining why. Write `None` when it needs none.
61
+
62
+ After approval, record each approved path before implementation:
63
+
64
+ ```text
65
+ npx --yes copilotkit@4.10.0 onboard protect --authorize --path <path> --reason "<the plan's sentence>"
66
+ ```
67
+
68
+ If an approved path changed after capture and no implementation step has run, add
69
+ `--with-prior-change`. Continue only when every result starts with `Status: passed`. Do not
70
+ authorize a path the approved plan did not list.
71
+
72
+ Then report the plan this run is about to implement:
50
73
 
51
74
  ```text
52
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase plan-written
75
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase plan-written
53
76
  ```
54
77
 
55
- Then run `npx --yes copilotkit@4.9.50 onboard read feature/a2ui/implement`.
78
+ Then run `npx --yes copilotkit@4.10.0 onboard read feature/a2ui/implement`.
@@ -11,18 +11,48 @@ available context and retain a safe empty state. Do not add Intelligence, creden
11
11
  standalone mock UI.
12
12
 
13
13
  Run focused type/test checks and start the app. Record the changed files and validation.
14
- When implementation validation passes, report it:
14
+
15
+ After validation and each repair, run:
15
16
 
16
17
  ```text
17
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase build-validated
18
+ npx --yes copilotkit@4.10.0 onboard audit
18
19
  ```
19
20
 
20
- If validation cannot pass, or this intent needs a prerequisite the app does not have, stop
21
- without further changes:
21
+ Continue only when it starts with `Status: passed`. A path under `Authorized to change:` is
22
+ not a finding. Carry it into the final summary with its reason.
23
+
24
+ If the audit fails, never repair, reset, or revert a protected path. Compare each named path
25
+ with the implementation subagent's `Files changed` section. If that section does not name
26
+ the path, accept the developer's external change:
22
27
 
23
28
  ```text
24
- npx --yes copilotkit@4.9.50 onboard read feature/stop
29
+ npx --yes copilotkit@4.10.0 onboard protect --accept-external --path <path>
25
30
  ```
26
31
 
32
+ For an env file where the developer placed a requested credential, use
33
+ `onboard protect --accept-credential --path <path>` instead. If the subagent names the path,
34
+ or its report does not settle who changed it, ask the developer to allow the unplanned
35
+ change. Only after they agree, record their answer:
36
+
37
+ ```text
38
+ npx --yes copilotkit@4.10.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
39
+ ```
40
+
41
+ Run the audit again after each accepted or authorized change. If it still fails, or starts
42
+ with `Status: blocked`, route out and stop:
43
+
44
+ ```text
45
+ npx --yes copilotkit@4.10.0 onboard read feature/stop
46
+ ```
47
+
48
+ When implementation validation passes, report it:
49
+
50
+ ```text
51
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase build-validated
52
+ ```
53
+
54
+ If validation cannot pass, or this intent needs a prerequisite the app does not have, use
55
+ the feature stop route above without further changes.
56
+
27
57
  Otherwise run
28
- `npx --yes copilotkit@4.9.50 onboard read feature/chat-suggestions/proof`.
58
+ `npx --yes copilotkit@4.10.0 onboard read feature/chat-suggestions/proof`.
@@ -12,15 +12,40 @@ project-owned services running.
12
12
  Report each attempt at the proof as it ends, counting from one:
13
13
 
14
14
  ```text
15
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase journey-attempted --attempt 1
15
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase journey-attempted --attempt 1
16
16
  ```
17
17
 
18
18
  Report each repair cycle the same way, counting from one:
19
19
 
20
20
  ```text
21
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase repair-attempted --attempt 1
21
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase repair-attempted --attempt 1
22
22
  ```
23
23
 
24
- Run
25
- `npx --yes copilotkit@4.9.50 onboard complete --visual-check <performed|skipped-no-browser-tool|failed>`
26
- with the real browser-proof outcome.
24
+ After the final attempt, report the gate exactly once:
25
+
26
+ ```text
27
+ npx --yes copilotkit@4.10.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
28
+ ```
29
+
30
+ Use `passed` only for a proved sent suggestion, `failed` for an attempted proof that failed,
31
+ and `skipped` when the proof could not run. Then run `npx --yes copilotkit@4.10.0 onboard audit`.
32
+ Continue only when it starts with `Status: passed`.
33
+
34
+ If the audit fails, never repair, reset, or revert a protected path. Compare each named path
35
+ with the proof subagent's `Files changed` section. If that section does not name the path,
36
+ run `onboard protect --accept-external --path <path>`, or
37
+ `onboard protect --accept-credential --path <path>` for an env file where the developer
38
+ placed a requested credential. If the subagent names the path, or its report does not settle
39
+ who changed it, ask the developer to allow it. Only after they agree, run
40
+ `onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"`.
41
+ Run the audit again after each accepted or authorized change.
42
+
43
+ If the audit still fails, or starts with `Status: blocked`, route out and stop:
44
+
45
+ ```text
46
+ npx --yes copilotkit@4.10.0 onboard read feature/stop
47
+ ```
48
+
49
+ When the audit passes, run
50
+ `npx --yes copilotkit@4.10.0 onboard read feature/complete` with the real browser-proof
51
+ outcome.
@@ -3,9 +3,19 @@
3
3
  Treat this as an additive OSS chat-surface feature. Delegate repository inspection,
4
4
  implementation, and proof to separate subagents and keep all work inside the target project.
5
5
 
6
+ Before any subagent or project process runs, capture the developer's existing work:
7
+
8
+ ```text
9
+ npx --yes copilotkit@4.10.0 onboard protect
10
+ ```
11
+
12
+ Keep the exact protected path list it prints and give that list to every subagent. No
13
+ subagent may write a protected path or an overlapping path unless this run records the
14
+ approved authorization before implementation.
15
+
6
16
  Before edits, identify the current CopilotKit provider, chat component, message lifecycle,
7
17
  agent id, package version, and test/dev commands. Prove the existing OSS round trip with
8
- `/info`, `npx --yes copilotkit@4.9.50 verify --expect-runtime oss --round-trip --agent <agent-id> --json`,
18
+ `/info`, `npx --yes copilotkit@4.10.0 verify --expect-runtime oss --round-trip --agent <agent-id> --json`,
9
19
  and one real frontend request when browser control is available. If there is no proven
10
20
  existing CopilotKit chat, leave files unchanged and direct the developer to generic
11
21
  onboarding first.
@@ -13,7 +23,7 @@ onboarding first.
13
23
  Wait for the inspection subagent to finish. Then report that the inspection came back:
14
24
 
15
25
  ```text
16
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase research-returned
26
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase research-returned
17
27
  ```
18
28
 
19
29
  A refused checkpoint prints its reason and leaves onboarding unaffected. It is not a
@@ -23,7 +33,7 @@ If the inspection did not prove the baseline this intent extends, stop here with
23
33
  changing files:
24
34
 
25
35
  ```text
26
- npx --yes copilotkit@4.9.50 onboard read feature/stop
36
+ npx --yes copilotkit@4.10.0 onboard read feature/stop
27
37
  ```
28
38
 
29
39
  Do not run login, provision Intelligence, request a credential, replace the agent, or alter
@@ -37,10 +47,23 @@ first-message experience, or offer dynamic suggestions when the developer needs
37
47
  context-dependent follow-ups. Show an approved-plan-sized diff, a focused test, and a proof
38
48
  that a visible suggestion submits the intended message.
39
49
 
40
- After approval, report the plan this run is about to implement:
50
+ The plan must list every protected path it needs to change under `Authorization requested`,
51
+ with one sentence explaining why. Write `None` when it needs none.
52
+
53
+ After approval, record each approved path before implementation:
54
+
55
+ ```text
56
+ npx --yes copilotkit@4.10.0 onboard protect --authorize --path <path> --reason "<the plan's sentence>"
57
+ ```
58
+
59
+ If an approved path changed after capture and no implementation step has run, add
60
+ `--with-prior-change`. Continue only when every result starts with `Status: passed`. Do not
61
+ authorize a path the approved plan did not list.
62
+
63
+ Then report the plan this run is about to implement:
41
64
 
42
65
  ```text
43
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase plan-written
66
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase plan-written
44
67
  ```
45
68
 
46
- Then run `npx --yes copilotkit@4.9.50 onboard read feature/chat-suggestions/implement`.
69
+ Then run `npx --yes copilotkit@4.10.0 onboard read feature/chat-suggestions/implement`.
@@ -0,0 +1,11 @@
1
+ # Complete the feature run
2
+
3
+ Use the outcome the proof step observed. Run:
4
+
5
+ ```text
6
+ npx --yes copilotkit@4.10.0 onboard complete --visual-check <performed|skipped-no-browser-tool|failed>
7
+ ```
8
+
9
+ Use `performed` only when browser control drove the real user-visible surface. Use
10
+ `skipped-no-browser-tool` only when no browser tool was available. Use `failed` when the
11
+ browser proof ran but did not prove the feature.
@@ -5,10 +5,72 @@ valid existing Intelligence selection. If it is absent, use the documented strea
5
5
  `login --json` session, let the developer select or create the Intelligence project, and
6
6
  require the secret-safe project/key provisioning summary before wiring the runtime.
7
7
 
8
- After the project is selected, ask the developer to create or select a stable Learning
9
- Container in the selected project's dashboard and provide its non-secret id. This is a real
10
- human gate: stop if they cannot provide it. Do not write a placeholder, a guessed id, or a
11
- new unsupported CLI command.
8
+ After the project is selected, settle the container from the terminal.
9
+
10
+ When the plan or the repository already names an id, ask about that one id and nothing else:
11
+
12
+ ```text
13
+ npx --yes copilotkit@4.10.0 learning containers get <id> --json
14
+ ```
15
+
16
+ One call answers it, and no list is needed.
17
+
18
+ When no id is in hand, survey what the project holds:
19
+
20
+ ```text
21
+ npx --yes copilotkit@4.10.0 learning containers list --json
22
+ ```
23
+
24
+ One call returns at most 500 containers. When `nextCursor` in the result is not null, read
25
+ the next page with `--cursor <nextCursor>` and keep going until it is null. A project whose
26
+ container sits on the second page looks empty to a single call, and the run then adds a
27
+ second container for work the first one already covers.
28
+
29
+ Report what the read found before asking anyone anything:
30
+
31
+ ```text
32
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase container-surveyed
33
+ ```
34
+
35
+ Everything after this waits on a person, so a run that stops past this point stopped on a
36
+ decision rather than on a read.
37
+
38
+ Reuse an existing container when one covers the workflow this run is instrumenting, and ask
39
+ the developer which one when more than one could. Otherwise create one.
40
+
41
+ Default to one container for this project, and name it after the project. Learning needs
42
+ evidence to work with: the first automatic run wants threads from 15 distinct conversations
43
+ in one container, so splitting a new project across several leaves every one of them below
44
+ the line. One container per end user is the same trap and a harder one, because a project
45
+ holds at most 500 and each user's own container then needs 15 conversations from that one
46
+ person. Route per user only when the developer asks for it, and do it in their selector
47
+ rather than in more containers: `getLearningContainerId` receives the resolved application
48
+ user, so the callback can return a different id per tier or per customer.
49
+
50
+ Use a descriptive lowercase hyphenated id of 1-64 characters:
51
+
52
+ ```text
53
+ npx --yes copilotkit@4.10.0 learning containers create --id <id> --name <name> --json
54
+ ```
55
+
56
+ An id already in use answers `LEARNING_CONTAINER_ALREADY_EXISTS`. That is a container to
57
+ read with `get` and reuse, not a failure to repair and not a reason to pick a new id.
58
+
59
+ Confirm the id resolves before any file changes, whichever way it was settled. That check is
60
+ the cheap one to keep: a selector wired to an id the platform does not hold returns
61
+ `LEARNING_CONTAINER_NOT_FOUND` on every thread create and every run lock, so a working chat
62
+ breaks on the next message. Stop here if the id does not resolve. Do not write a placeholder
63
+ or a guessed id.
64
+
65
+ Then report that the container is settled, before any edit:
66
+
67
+ ```text
68
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase container-settled
69
+ ```
70
+
71
+ Everything above happens between two prompts, so a run that stopped on a developer who could
72
+ not choose, on a taken id, or on an id that never resolved would otherwise report the plan
73
+ and then nothing at all.
12
74
 
13
75
  Add only the documented managed runtime/thread prerequisites and the selected
14
76
  `getLearningContainerId` on the `CopilotKitIntelligence` instance. Return the same stable
@@ -24,21 +86,50 @@ non-zero on an app that is working. Pass what `identifyUser` reads with a repeat
24
86
  It is not a defect to repair.
25
87
 
26
88
  Run focused tests and
27
- `npx --yes copilotkit@4.9.50 verify --expect-runtime intelligence --round-trip --agent <agent-id> --json`.
89
+ `npx --yes copilotkit@4.10.0 verify --expect-runtime intelligence --round-trip --agent <agent-id> --json`.
28
90
  Repair changed-file failures and record secret-safe evidence.
29
91
 
30
- When implementation validation passes, report it:
92
+ After validation and each repair, run:
93
+
94
+ ```text
95
+ npx --yes copilotkit@4.10.0 onboard audit
96
+ ```
97
+
98
+ Continue only when it starts with `Status: passed`. A path under `Authorized to change:` is
99
+ not a finding. Carry it into the final summary with its reason.
100
+
101
+ If the audit fails, never repair, reset, or revert a protected path. Compare each named path
102
+ with the implementation subagent's `Files changed` section. If that section does not name
103
+ the path, accept the developer's external change:
104
+
105
+ ```text
106
+ npx --yes copilotkit@4.10.0 onboard protect --accept-external --path <path>
107
+ ```
108
+
109
+ For an env file where the developer placed a requested credential, use
110
+ `onboard protect --accept-credential --path <path>` instead. If the subagent names the path,
111
+ or its report does not settle who changed it, ask the developer to allow the unplanned
112
+ change. Only after they agree, record their answer:
31
113
 
32
114
  ```text
33
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase build-validated
115
+ npx --yes copilotkit@4.10.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
34
116
  ```
35
117
 
36
- If validation cannot pass, or this intent needs a prerequisite the app does not have, stop
37
- without further changes:
118
+ Run the audit again after each accepted or authorized change. If it still fails, or starts
119
+ with `Status: blocked`, route out and stop:
38
120
 
39
121
  ```text
40
- npx --yes copilotkit@4.9.50 onboard read feature/stop
122
+ npx --yes copilotkit@4.10.0 onboard read feature/stop
41
123
  ```
42
124
 
125
+ When implementation validation passes, report it:
126
+
127
+ ```text
128
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase build-validated
129
+ ```
130
+
131
+ If validation cannot pass, or this intent needs a prerequisite the app does not have, use
132
+ the feature stop route above without further changes.
133
+
43
134
  Otherwise run
44
- `npx --yes copilotkit@4.9.50 onboard read feature/learning/proof`.
135
+ `npx --yes copilotkit@4.10.0 onboard read feature/learning/proof`.
@@ -1,27 +1,71 @@
1
1
  # Prove a real run is assigned to the selected Learning Container
2
2
 
3
3
  Delegate proof to a fresh subagent. In the real authenticated app, create or use a thread,
4
- send a normal agent request, and confirm the resulting run is assigned to the selected
5
- Learning Container through the documented Intelligence/Inspector evidence. Confirm the
6
- thread remains associated with the expected user and that the managed round-trip check still
7
- passes.
4
+ send a normal agent request, and confirm the resulting run reached the selected Learning
5
+ Container. Confirm the thread remains associated with the expected user.
6
+
7
+ One command decides it:
8
+
9
+ ```text
10
+ npx --yes copilotkit@4.10.0 verify --expect-runtime intelligence --round-trip --agent <agent-id> --expect-learning-container <id> --json
11
+ ```
12
+
13
+ It reads the thread back from the platform, so it answers for any runtime mount, and it
14
+ passes only when that thread carries the container this run selected.
15
+
16
+ Two other signals look like proof and are not. `features.self_learning` is a plan
17
+ entitlement and is already true before any wiring. The `/info` response reports Learning
18
+ from the presence of a callback, not from a single assigned thread. Never report either one
19
+ as evidence.
8
20
 
9
21
  Do not claim that Insights or Skills are already available: those depend on completed runs
10
22
  and later learning processing. Record only the assignment visible now, the request, app URL,
11
23
  process IDs, and safe stop commands. Repair changed-file defects and repeat.
12
24
 
25
+ Tell the developer what happens next, because a correct run looks like a broken one
26
+ otherwise. Learning runs on its own: the first automatic run needs new threads from 15
27
+ distinct conversations in this container, and only the newest snapshot of each thread
28
+ counts. Threads that already ran before this change are never pulled in, because a thread
29
+ takes its container before its first agent run. So the container starts empty on purpose.
30
+
13
31
  Report each attempt at the proof as it ends, counting from one:
14
32
 
15
33
  ```text
16
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase journey-attempted --attempt 1
34
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase journey-attempted --attempt 1
17
35
  ```
18
36
 
19
37
  Report each repair cycle the same way, counting from one:
20
38
 
21
39
  ```text
22
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase repair-attempted --attempt 1
40
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase repair-attempted --attempt 1
41
+ ```
42
+
43
+ After the final attempt, report the gate exactly once:
44
+
45
+ ```text
46
+ npx --yes copilotkit@4.10.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
47
+ ```
48
+
49
+ Use `passed` only for a proved Container assignment, `failed` for an attempted proof that
50
+ failed, and `skipped` when the proof could not run. Then run
51
+ `npx --yes copilotkit@4.10.0 onboard audit`. Continue only when it starts with
52
+ `Status: passed`.
53
+
54
+ If the audit fails, never repair, reset, or revert a protected path. Compare each named path
55
+ with the proof subagent's `Files changed` section. If that section does not name the path,
56
+ run `onboard protect --accept-external --path <path>`, or
57
+ `onboard protect --accept-credential --path <path>` for an env file where the developer
58
+ placed a requested credential. If the subagent names the path, or its report does not settle
59
+ who changed it, ask the developer to allow it. Only after they agree, run
60
+ `onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"`.
61
+ Run the audit again after each accepted or authorized change.
62
+
63
+ If the audit still fails, or starts with `Status: blocked`, route out and stop:
64
+
65
+ ```text
66
+ npx --yes copilotkit@4.10.0 onboard read feature/stop
23
67
  ```
24
68
 
25
- Run
26
- `npx --yes copilotkit@4.9.50 onboard complete --visual-check <performed|skipped-no-browser-tool|failed>`
27
- with the actual surface outcome.
69
+ When the audit passes, run
70
+ `npx --yes copilotkit@4.10.0 onboard read feature/complete` with the actual surface
71
+ outcome.
@@ -4,6 +4,16 @@ Treat Learning as a managed Intelligence feature that assigns real threads to a
4
4
  Learning Container. Orchestrate with separate read-only, implementation, and proof
5
5
  subagents. Work only inside the target project and preserve its existing agent and chat.
6
6
 
7
+ Before any subagent or project process runs, capture the developer's existing work:
8
+
9
+ ```text
10
+ npx --yes copilotkit@4.10.0 onboard protect
11
+ ```
12
+
13
+ Keep the exact protected path list it prints and give that list to every subagent. No
14
+ subagent may write a protected path or an overlapping path unless this run records the
15
+ approved authorization before implementation.
16
+
7
17
  Before edits, inspect the runtime, agent id, provider/chat, server-side user identity,
8
18
  existing Intelligence configuration (presence only), existing thread routes, and the normal
9
19
  test/dev commands. Prove the current round trip and inspect `/info`. If the project does not
@@ -13,7 +23,7 @@ onboarding.
13
23
  Wait for the inspection subagent to finish. Then report that the inspection came back:
14
24
 
15
25
  ```text
16
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase research-returned
26
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase research-returned
17
27
  ```
18
28
 
19
29
  A refused checkpoint prints its reason and leaves onboarding unaffected. It is not a
@@ -23,16 +33,20 @@ If the inspection did not prove the baseline this intent extends, stop here with
23
33
  changing files:
24
34
 
25
35
  ```text
26
- npx --yes copilotkit@4.9.50 onboard read feature/stop
36
+ npx --yes copilotkit@4.10.0 onboard read feature/stop
27
37
  ```
28
38
 
29
39
  Fetch the current official guides before planning:
40
+ https://docs.copilotkit.ai/learning.md
30
41
  https://docs.copilotkit.ai/backend/copilot-runtime.md
31
42
  https://docs.copilotkit.ai/intelligence/connect-your-runtime.md
32
43
  https://docs.copilotkit.ai/threads.md
33
- Use a second retrieval method if needed. The CLI has no supported command to create or list
34
- Learning Containers. Do not invent an id, scrape a dashboard, or treat an arbitrary string
35
- as one.
44
+ Use a second retrieval method if needed.
45
+
46
+ The CLI owns the container. `copilotkit learning containers list --json` reads the ones this
47
+ project already has, and `copilotkit learning containers create --id <id> --name <name>
48
+ --json` makes one. So there is no dashboard step and no reason to guess: never invent an id,
49
+ scrape a dashboard, or treat an arbitrary string as a container.
36
50
 
37
51
  Read the "Assign Threads to Learning Containers" section of that page. The container is
38
52
  chosen by `getLearningContainerId` on the `CopilotKitIntelligence` instance, which the
@@ -43,10 +57,23 @@ Show a concise plan for managed runtime/thread prerequisites, a stable selected
43
57
  the documented `getLearningContainerId` selector, validation, and a visible assignment
44
58
  proof. Ask for approval separately.
45
59
 
46
- After approval, report the plan this run is about to implement:
60
+ The plan must list every protected path it needs to change under `Authorization requested`,
61
+ with one sentence explaining why. Write `None` when it needs none.
62
+
63
+ After approval, record each approved path before implementation:
64
+
65
+ ```text
66
+ npx --yes copilotkit@4.10.0 onboard protect --authorize --path <path> --reason "<the plan's sentence>"
67
+ ```
68
+
69
+ If an approved path changed after capture and no implementation step has run, add
70
+ `--with-prior-change`. Continue only when every result starts with `Status: passed`. Do not
71
+ authorize a path the approved plan did not list.
72
+
73
+ Then report the plan this run is about to implement:
47
74
 
48
75
  ```text
49
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase plan-written
76
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase plan-written
50
77
  ```
51
78
 
52
- Then run `npx --yes copilotkit@4.9.50 onboard read feature/learning/implement`.
79
+ Then run `npx --yes copilotkit@4.10.0 onboard read feature/learning/implement`.
@@ -11,18 +11,49 @@ intact unless the official guide and observed failure require a minimal document
11
11
 
12
12
  Run the project's focused validation commands. Start the app and confirm `/info` reports
13
13
  `openGenerativeUIEnabled`, while treating that only as capability evidence. Record changed paths and
14
- validation results without secrets. When implementation validation passes, report it:
14
+ validation results without secrets.
15
+
16
+ After validation and each repair, run:
17
+
18
+ ```text
19
+ npx --yes copilotkit@4.10.0 onboard audit
20
+ ```
21
+
22
+ Continue only when it starts with `Status: passed`. A path under `Authorized to change:` is
23
+ not a finding. Carry it into the final summary with its reason.
24
+
25
+ If the audit fails, never repair, reset, or revert a protected path. Compare each named path
26
+ with the implementation subagent's `Files changed` section. If that section does not name
27
+ the path, accept the developer's external change:
15
28
 
16
29
  ```text
17
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase build-validated
30
+ npx --yes copilotkit@4.10.0 onboard protect --accept-external --path <path>
18
31
  ```
19
32
 
20
- If validation cannot pass, or this intent needs a prerequisite the app does not have, stop
21
- without further changes:
33
+ For an env file where the developer placed a requested credential, use
34
+ `onboard protect --accept-credential --path <path>` instead. If the subagent names the path,
35
+ or its report does not settle who changed it, ask the developer to allow the unplanned
36
+ change. Only after they agree, record their answer:
22
37
 
23
38
  ```text
24
- npx --yes copilotkit@4.9.50 onboard read feature/stop
39
+ npx --yes copilotkit@4.10.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
25
40
  ```
26
41
 
42
+ Run the audit again after each accepted or authorized change. If it still fails, or starts
43
+ with `Status: blocked`, route out and stop:
44
+
45
+ ```text
46
+ npx --yes copilotkit@4.10.0 onboard read feature/stop
47
+ ```
48
+
49
+ When implementation validation passes, report it:
50
+
51
+ ```text
52
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase build-validated
53
+ ```
54
+
55
+ If validation cannot pass, or this intent needs a prerequisite the app does not have, use
56
+ the feature stop route above without further changes.
57
+
27
58
  Otherwise run
28
- `npx --yes copilotkit@4.9.50 onboard read feature/open-generative-ui/proof`.
59
+ `npx --yes copilotkit@4.10.0 onboard read feature/open-generative-ui/proof`.
@@ -13,15 +13,40 @@ the missing visual proof honestly.
13
13
  Report each attempt at the proof as it ends, counting from one:
14
14
 
15
15
  ```text
16
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase journey-attempted --attempt 1
16
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase journey-attempted --attempt 1
17
17
  ```
18
18
 
19
19
  Report each repair cycle the same way, counting from one:
20
20
 
21
21
  ```text
22
- npx --yes copilotkit@4.9.50 onboard checkpoint --phase repair-attempted --attempt 1
22
+ npx --yes copilotkit@4.10.0 onboard checkpoint --phase repair-attempted --attempt 1
23
23
  ```
24
24
 
25
- Then run
26
- `npx --yes copilotkit@4.9.50 onboard complete --visual-check <performed|skipped-no-browser-tool|failed>`
27
- with the outcome actually observed.
25
+ After the final attempt, report the gate exactly once:
26
+
27
+ ```text
28
+ npx --yes copilotkit@4.10.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
29
+ ```
30
+
31
+ Use `passed` only for a proved generated UI, `failed` for an attempted proof that failed,
32
+ and `skipped` when the proof could not run. Then run `npx --yes copilotkit@4.10.0 onboard audit`.
33
+ Continue only when it starts with `Status: passed`.
34
+
35
+ If the audit fails, never repair, reset, or revert a protected path. Compare each named path
36
+ with the proof subagent's `Files changed` section. If that section does not name the path,
37
+ run `onboard protect --accept-external --path <path>`, or
38
+ `onboard protect --accept-credential --path <path>` for an env file where the developer
39
+ placed a requested credential. If the subagent names the path, or its report does not settle
40
+ who changed it, ask the developer to allow it. Only after they agree, run
41
+ `onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"`.
42
+ Run the audit again after each accepted or authorized change.
43
+
44
+ If the audit still fails, or starts with `Status: blocked`, route out and stop:
45
+
46
+ ```text
47
+ npx --yes copilotkit@4.10.0 onboard read feature/stop
48
+ ```
49
+
50
+ When the audit passes, run
51
+ `npx --yes copilotkit@4.10.0 onboard read feature/complete` with the outcome actually
52
+ observed.