copilotkit 4.16.0 → 4.18.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 (83) hide show
  1. package/README.md +195 -8
  2. package/cli-build-info.json +7 -7
  3. package/exporters/langgraph/README.md +118 -0
  4. package/exporters/langgraph/export_checkpointer.py +125 -0
  5. package/index.js +13890 -9434
  6. package/onboarding/index.json +1 -1
  7. package/onboarding/prompts/authenticate/start.md +24 -23
  8. package/onboarding/prompts/conversion/plan.md +3 -3
  9. package/onboarding/prompts/credentials/finalize-plan.md +56 -199
  10. package/onboarding/prompts/credentials/plan.md +24 -23
  11. package/onboarding/prompts/credentials/settle-credentials.md +40 -177
  12. package/onboarding/prompts/credentials/write-plan.md +47 -23
  13. package/onboarding/prompts/fallback/best-effort.md +25 -17
  14. package/onboarding/prompts/feature/a2ui/implement.md +40 -12
  15. package/onboarding/prompts/feature/a2ui/proof.md +29 -9
  16. package/onboarding/prompts/feature/a2ui/start.md +54 -12
  17. package/onboarding/prompts/feature/blocked-by-plan.md +4 -4
  18. package/onboarding/prompts/feature/channels/implement.md +41 -13
  19. package/onboarding/prompts/feature/channels/proof.md +30 -11
  20. package/onboarding/prompts/feature/channels/start.md +54 -9
  21. package/onboarding/prompts/feature/chat-suggestions/implement.md +40 -12
  22. package/onboarding/prompts/feature/chat-suggestions/proof.md +29 -9
  23. package/onboarding/prompts/feature/chat-suggestions/start.md +51 -10
  24. package/onboarding/prompts/feature/complete.md +2 -2
  25. package/onboarding/prompts/feature/learning/implement.md +66 -29
  26. package/onboarding/prompts/feature/learning/proof.md +30 -10
  27. package/onboarding/prompts/feature/learning/start.md +46 -20
  28. package/onboarding/prompts/feature/open-generative-ui/implement.md +41 -13
  29. package/onboarding/prompts/feature/open-generative-ui/proof.md +29 -9
  30. package/onboarding/prompts/feature/open-generative-ui/start.md +51 -10
  31. package/onboarding/prompts/feature/realtime-sync/implement.md +41 -13
  32. package/onboarding/prompts/feature/realtime-sync/proof.md +31 -10
  33. package/onboarding/prompts/feature/realtime-sync/start.md +51 -9
  34. package/onboarding/prompts/feature/rich-threads/implement.md +42 -14
  35. package/onboarding/prompts/feature/rich-threads/proof.md +31 -10
  36. package/onboarding/prompts/feature/rich-threads/start.md +51 -9
  37. package/onboarding/prompts/feature/stop.md +5 -5
  38. package/onboarding/prompts/feature/voice/implement.md +40 -12
  39. package/onboarding/prompts/feature/voice/proof.md +29 -9
  40. package/onboarding/prompts/feature/voice/start.md +51 -9
  41. package/onboarding/prompts/framework/ag2.md +2 -2
  42. package/onboarding/prompts/framework/agno.md +4 -4
  43. package/onboarding/prompts/framework/built-in.md +2 -2
  44. package/onboarding/prompts/framework/claude-sdk-python.md +8 -7
  45. package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
  46. package/onboarding/prompts/framework/crewai-flows.md +15 -7
  47. package/onboarding/prompts/framework/deep-agents.md +4 -3
  48. package/onboarding/prompts/framework/google-adk.md +7 -7
  49. package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
  50. package/onboarding/prompts/framework/langgraph-python.md +2 -2
  51. package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
  52. package/onboarding/prompts/framework/llamaindex.md +4 -4
  53. package/onboarding/prompts/framework/mastra.md +2 -2
  54. package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
  55. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
  56. package/onboarding/prompts/framework/ms-agent-python.md +6 -6
  57. package/onboarding/prompts/framework/pydantic-ai.md +2 -2
  58. package/onboarding/prompts/framework/strands-python.md +4 -4
  59. package/onboarding/prompts/framework/strands-typescript.md +4 -4
  60. package/onboarding/prompts/frontend/angular.md +3 -3
  61. package/onboarding/prompts/frontend/nextjs.md +16 -3
  62. package/onboarding/prompts/frontend/plan.md +9 -8
  63. package/onboarding/prompts/frontend/react-native.md +2 -2
  64. package/onboarding/prompts/frontend/react-spa.md +2 -2
  65. package/onboarding/prompts/frontend/vue.md +2 -2
  66. package/onboarding/prompts/implementation/build-and-validate.md +68 -30
  67. package/onboarding/prompts/proof/complete.md +24 -17
  68. package/onboarding/prompts/proof/oss-baseline.md +16 -12
  69. package/onboarding/prompts/proof/round-trip.md +39 -27
  70. package/onboarding/prompts/research/gather.md +8 -7
  71. package/onboarding/prompts/research/merge.md +3 -3
  72. package/onboarding/prompts/research/preflight.md +4 -4
  73. package/onboarding/prompts/research/route.md +6 -6
  74. package/onboarding/prompts/starter/clone.md +16 -12
  75. package/onboarding/prompts/stopped/run-failed.md +11 -11
  76. package/onboarding/prompts/subagent/create-plan.md +24 -10
  77. package/onboarding/prompts/subagent/implement-and-validate.md +25 -11
  78. package/onboarding/prompts/subagent/inspect-repository.md +21 -6
  79. package/onboarding/prompts/subagent/prove-oss-baseline.md +5 -4
  80. package/onboarding/prompts/subagent/prove-round-trip.md +77 -23
  81. package/onboarding/prompts/unsupported/no-validated-path.md +4 -4
  82. package/package.json +1 -5
  83. package/release/release-tool.js +189 -44
@@ -10,26 +10,46 @@ project-owned services running. Repair a failure caused by changed files and pro
10
10
  do not replace the output with a hard-coded component. If browser control is absent, report
11
11
  the missing visual proof honestly.
12
12
 
13
+ Give the proof subagent the protected path list and the authorized list. Take that list from
14
+ the latest audit, and copy the paths under `Authorized to modify:`. Tell it this rule: a fix
15
+ can change a path on the authorized list. When a fix needs any other protected path, it must
16
+ not edit it. It returns a result that starts with `Status: blocked` and names the file under
17
+ Blockers.
18
+
19
+ That result is a question for the developer. The file has not changed yet, so consent can
20
+ still go on the record. Name the file and why the fix needs it, then end your turn and wait
21
+ for the developer's answer. If they allow it, record their answer before any edit:
22
+
23
+ ```text
24
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
25
+ ```
26
+
27
+ Continue only when the result starts with `Status: passed`. Run the audit again, take the
28
+ new list from its `Authorized to modify:` block, and spawn a fresh proof subagent with the
29
+ same handoff and that list. A subagent that already returned cannot pick up consent recorded
30
+ after it was spawned. If you cannot ask, or the developer declines, take the feature stop
31
+ route below.
32
+
13
33
  Report each attempt at the proof as it ends, counting from one:
14
34
 
15
35
  ```text
16
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase journey-attempted --attempt 1
36
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase journey-attempted --attempt 1
17
37
  ```
18
38
 
19
39
  Report each repair cycle the same way, counting from one:
20
40
 
21
41
  ```text
22
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase repair-attempted --attempt 1
42
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase repair-attempted --attempt 1
23
43
  ```
24
44
 
25
45
  After the final attempt, report the gate exactly once:
26
46
 
27
47
  ```text
28
- npx --prefer-offline --yes copilotkit@4.16.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
48
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
29
49
  ```
30
50
 
31
51
  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 --prefer-offline --yes copilotkit@4.16.0 onboard audit`.
52
+ and `skipped` when the proof could not run. Then run `npx --prefer-offline --yes copilotkit@4.18.0 onboard audit`.
33
53
  Continue only when it starts with `Status: passed`.
34
54
 
35
55
  If the audit fails, never repair, reset, or revert a protected path. Compare each named path
@@ -37,16 +57,16 @@ with the proof subagent's `Files changed` section. If that section does not name
37
57
  run `onboard protect --accept-external --path <path>`, or
38
58
  `onboard protect --accept-credential --path <path>` for an env file where the developer
39
59
  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.
60
+ who changed it, the change is this run's own, made without consent. Do not ask the developer
61
+ to allow it: the CLI refuses consent for a path that already changed. Route out, and name
62
+ the path and the change the audit reports. Run the audit again after each accepted change.
43
63
 
44
64
  If the audit still fails, or starts with `Status: blocked`, route out and stop:
45
65
 
46
66
  ```text
47
- npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/stop
67
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
48
68
  ```
49
69
 
50
70
  When the audit passes, run
51
- `npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/complete` with the outcome actually
71
+ `npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/complete` with the outcome actually
52
72
  observed.
@@ -3,10 +3,53 @@
3
3
  Treat this as a focused OSS enhancement. Orchestrate the work with separate read-only,
4
4
  implementation, and proof subagents, all restricted to the target project directory.
5
5
 
6
+ ## Waits, stops, and subagents
7
+
8
+ A run that starts here has not read these rules yet, so they come first. They cover this
9
+ prompt and every later one.
10
+
11
+ Spawning a subagent returns almost at once. That return is the dispatch succeeding, not the
12
+ work finishing: the result reaches you as a notification, or with the dispatch itself where
13
+ your harness works that way. Do the work that does not depend on the result, then end your
14
+ turn and wait for the result. That wait is a pause. Do not sleep or poll.
15
+
16
+ A subagent that returns no usable result failed in your harness, not in this graph. Every
17
+ assignment here is work you can do yourself, slower, so run that assignment yourself and
18
+ carry on. Keep a read-only assignment read-only. If no subagent works at all, report it
19
+ once:
20
+
21
+ ```text
22
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase delegation-unavailable
23
+ ```
24
+
25
+ Before you end your turn to wait for the developer, report the pause:
26
+
27
+ ```text
28
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase awaiting-developer
29
+ ```
30
+
31
+ A turn that ends while the run waits is a pause, not a stop, even when your harness ends it.
32
+ When the answer or the result arrives, continue from the step that paused.
33
+
34
+ If you stop this run, send one short report before you stop. The friction command follows
35
+ the telemetry setting the developer already chose, so it needs no separate question.
36
+
37
+ ```text
38
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard friction --phase stop --category <slug> --message "<sentences>"
39
+ ```
40
+
41
+ `--message` takes one or two sentences: the step you stopped at and what stopped it.
42
+ Pick the category that fits from docs-missing, docs-wrong, docs-sequential, cli-gap,
43
+ sdk-gap, environment, port-collision, credential, validation-loop, and other. Leave
44
+ --cost-seconds off. Send no secrets, source code, logs, or command output. A refused report
45
+ is not a failed step: reword it and send it again, or stop without a report. A stop that
46
+ routes to `feature/stop` sends no report here: that prompt first asks the developer about
47
+ one scoped fix, and sends the report itself when no fix is approved.
48
+
6
49
  Before any subagent or project process runs, capture the developer's existing work:
7
50
 
8
51
  ```text
9
- npx --prefer-offline --yes copilotkit@4.16.0 onboard protect
52
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard protect
10
53
  ```
11
54
 
12
55
  Keep the exact protected path list it prints and give that list to every subagent. No
@@ -16,15 +59,13 @@ approved authorization before implementation.
16
59
  Before edits, have a research subagent identify the current CopilotKit runtime route,
17
60
  provider/chat component, agent id, package versions, existing middleware, sandbox/CSP
18
61
  constraints, and normal test/dev commands. Prove the existing app first with `/info`,
19
- `npx --prefer-offline --yes copilotkit@4.16.0 verify --expect-runtime oss --round-trip --agent <agent-id> --json`,
20
- and a real frontend request when browser control is available. If the app is not an existing
21
- OSS CopilotKit app with a proven round trip, change nothing and direct the developer to the
22
- generic onboarding path first.
62
+ `npx --prefer-offline --yes copilotkit@4.18.0 verify --expect-runtime oss --round-trip --agent <agent-id> --json`,
63
+ and a real frontend request when browser control is available.
23
64
 
24
65
  Wait for the inspection subagent to finish. Then report that the inspection came back:
25
66
 
26
67
  ```text
27
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase research-returned
68
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase research-returned
28
69
  ```
29
70
 
30
71
  A refused checkpoint prints its reason and leaves onboarding unaffected. It is not a
@@ -34,7 +75,7 @@ If the inspection did not prove the baseline this intent extends, stop here with
34
75
  changing files:
35
76
 
36
77
  ```text
37
- npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/stop
78
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
38
79
  ```
39
80
 
40
81
  Do not sign in, select an Intelligence project, create credentials, change the existing
@@ -56,7 +97,7 @@ one.
56
97
  After approval, record each approved path before implementation:
57
98
 
58
99
  ```text
59
- npx --prefer-offline --yes copilotkit@4.16.0 onboard protect --authorize --path <path> --reason "<the plan's sentence>"
100
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --path <path> --reason "<the plan's sentence>"
60
101
  ```
61
102
 
62
103
  If an approved path changed after capture and no implementation step has run, add
@@ -66,7 +107,7 @@ authorize a path the approved plan did not list.
66
107
  Then report the plan this run is about to implement:
67
108
 
68
109
  ```text
69
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase plan-written
110
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase plan-written
70
111
  ```
71
112
 
72
- Then run `npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/open-generative-ui/implement`.
113
+ Then run `npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/open-generative-ui/implement`.
@@ -17,14 +17,45 @@ non-zero on an app that is working. Pass what `identifyUser` reads with a repeat
17
17
  It is not a defect to repair.
18
18
 
19
19
  Run focused tests and
20
- `npx --prefer-offline --yes copilotkit@4.16.0 verify --expect-runtime intelligence --round-trip --agent <agent-id> --json`.
20
+ `npx --prefer-offline --yes copilotkit@4.18.0 verify --expect-runtime intelligence --round-trip --agent <agent-id> --json`.
21
21
  Repair changed-file failures and record changed paths and secret-safe validation
22
22
  evidence.
23
23
 
24
+ Before you spawn the implementation subagent, take the authorized list from the CLI:
25
+
26
+ ```text
27
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard audit
28
+ ```
29
+
30
+ From its result, copy the paths under `Authorized to modify:`. A passed or failed audit with
31
+ no such block means that nothing is authorized. Read only that block now, and decide the
32
+ findings of a failed audit after implementation, with the audit rules below. If this audit
33
+ starts with `Status: blocked`, the CLI cannot supply the list. Report the printed reason and
34
+ take the feature stop route below.
35
+
36
+ Give the implementation subagent the protected path list and the authorized list. Tell it
37
+ this rule: it can change a path on the authorized list. When the work needs any other
38
+ protected path, it must not edit it. It returns a result that starts with `Status: blocked`
39
+ and names the file under Blockers.
40
+
41
+ That result is a question for the developer. The file has not changed yet, so consent can
42
+ still go on the record. Name the file and why the work needs it, then end your turn and wait
43
+ for the developer's answer. If they allow it, record their answer before any edit:
44
+
45
+ ```text
46
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
47
+ ```
48
+
49
+ Continue only when the result starts with `Status: passed`. Run the audit again, take the
50
+ new list from its `Authorized to modify:` block, and spawn a fresh implementation subagent
51
+ with the same handoff and that list. A subagent that already returned cannot pick up consent
52
+ recorded after it was spawned. If you cannot ask, or the developer declines, take the
53
+ feature stop route below.
54
+
24
55
  After validation and each repair, run:
25
56
 
26
57
  ```text
27
- npx --prefer-offline --yes copilotkit@4.16.0 onboard audit
58
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard audit
28
59
  ```
29
60
 
30
61
  Continue only when it starts with `Status: passed`. A path under `Authorized to modify:` is
@@ -35,33 +66,30 @@ with the implementation subagent's `Files changed` section. If that section does
35
66
  the path, accept the developer's external change:
36
67
 
37
68
  ```text
38
- npx --prefer-offline --yes copilotkit@4.16.0 onboard protect --accept-external --path <path>
69
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --accept-external --path <path>
39
70
  ```
40
71
 
41
72
  For an env file where the developer placed a requested credential, use
42
73
  `onboard protect --accept-credential --path <path>` instead. If the subagent names the path,
43
- or its report does not settle who changed it, ask the developer to allow the unplanned
44
- change. Only after they agree, record their answer:
45
-
46
- ```text
47
- npx --prefer-offline --yes copilotkit@4.16.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
48
- ```
74
+ or its report does not settle who changed it, the change is this run's own, made without
75
+ consent. Do not ask the developer to allow it: the CLI refuses consent for a path that
76
+ already changed. Route out, and name the path and the change the audit reports.
49
77
 
50
- Run the audit again after each accepted or authorized change. If it still fails, or starts
78
+ Run the audit again after each accepted change. If it still fails, or starts
51
79
  with `Status: blocked`, route out and stop:
52
80
 
53
81
  ```text
54
- npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/stop
82
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
55
83
  ```
56
84
 
57
85
  When implementation validation passes, report it:
58
86
 
59
87
  ```text
60
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase build-validated
88
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase build-validated
61
89
  ```
62
90
 
63
91
  If validation cannot pass, or this intent needs a prerequisite the app does not have, use
64
92
  the feature stop route above without further changes.
65
93
 
66
94
  Otherwise run
67
- `npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/realtime-sync/proof`.
95
+ `npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/realtime-sync/proof`.
@@ -4,33 +4,54 @@ Delegate proof to a fresh subagent. Open the same authenticated project/thread i
4
4
  browser contexts. From context A, create or mutate a thread and send a message. Require
5
5
  context B to receive the thread/message change without a manual reload. Then exercise a
6
6
  second mutation in the reverse direction where the product supports it. Keep the managed
7
- round-trip verification green.
7
+ round-trip verification result that implementation recorded: passed, or UNKNOWN for an
8
+ auth-gated app.
8
9
 
9
10
  Record both visible states, actions, timing, app URL, process IDs, and safe stop commands.
10
11
  A successful WebSocket connection, a server event, or a refreshed second tab is not proof.
11
12
  Repair changed-file defects and repeat. If the environment cannot drive two contexts, report
12
13
  the missing proof rather than claiming realtime works.
13
14
 
15
+ Give the proof subagent the protected path list and the authorized list. Take that list from
16
+ the latest audit, and copy the paths under `Authorized to modify:`. Tell it this rule: a fix
17
+ can change a path on the authorized list. When a fix needs any other protected path, it must
18
+ not edit it. It returns a result that starts with `Status: blocked` and names the file under
19
+ Blockers.
20
+
21
+ That result is a question for the developer. The file has not changed yet, so consent can
22
+ still go on the record. Name the file and why the fix needs it, then end your turn and wait
23
+ for the developer's answer. If they allow it, record their answer before any edit:
24
+
25
+ ```text
26
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
27
+ ```
28
+
29
+ Continue only when the result starts with `Status: passed`. Run the audit again, take the
30
+ new list from its `Authorized to modify:` block, and spawn a fresh proof subagent with the
31
+ same handoff and that list. A subagent that already returned cannot pick up consent recorded
32
+ after it was spawned. If you cannot ask, or the developer declines, take the feature stop
33
+ route below.
34
+
14
35
  Report each attempt at the proof as it ends, counting from one:
15
36
 
16
37
  ```text
17
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase journey-attempted --attempt 1
38
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase journey-attempted --attempt 1
18
39
  ```
19
40
 
20
41
  Report each repair cycle the same way, counting from one:
21
42
 
22
43
  ```text
23
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase repair-attempted --attempt 1
44
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase repair-attempted --attempt 1
24
45
  ```
25
46
 
26
47
  After the final attempt, report the gate exactly once:
27
48
 
28
49
  ```text
29
- npx --prefer-offline --yes copilotkit@4.16.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
50
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
30
51
  ```
31
52
 
32
53
  Use `passed` only for proved two-client sync, `failed` for an attempted proof that failed,
33
- and `skipped` when the proof could not run. Then run `npx --prefer-offline --yes copilotkit@4.16.0 onboard audit`.
54
+ and `skipped` when the proof could not run. Then run `npx --prefer-offline --yes copilotkit@4.18.0 onboard audit`.
34
55
  Continue only when it starts with `Status: passed`.
35
56
 
36
57
  If the audit fails, never repair, reset, or revert a protected path. Compare each named path
@@ -38,15 +59,15 @@ with the proof subagent's `Files changed` section. If that section does not name
38
59
  run `onboard protect --accept-external --path <path>`, or
39
60
  `onboard protect --accept-credential --path <path>` for an env file where the developer
40
61
  placed a requested credential. If the subagent names the path, or its report does not settle
41
- who changed it, ask the developer to allow it. Only after they agree, run
42
- `onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"`.
43
- Run the audit again after each accepted or authorized change.
62
+ who changed it, the change is this run's own, made without consent. Do not ask the developer
63
+ to allow it: the CLI refuses consent for a path that already changed. Route out, and name
64
+ the path and the change the audit reports. Run the audit again after each accepted change.
44
65
 
45
66
  If the audit still fails, or starts with `Status: blocked`, route out and stop:
46
67
 
47
68
  ```text
48
- npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/stop
69
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
49
70
  ```
50
71
 
51
72
  When the audit passes, run
52
- `npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/complete` with the actual outcome.
73
+ `npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/complete` with the actual outcome.
@@ -4,10 +4,53 @@ Treat realtime sync as the Intelligence thread-realtime plane, not as a generic
4
4
  exercise. Act as the orchestrator and delegate read-only inspection, implementation, and
5
5
  two-context proof to subagents within the target project.
6
6
 
7
+ ## Waits, stops, and subagents
8
+
9
+ A run that starts here has not read these rules yet, so they come first. They cover this
10
+ prompt and every later one.
11
+
12
+ Spawning a subagent returns almost at once. That return is the dispatch succeeding, not the
13
+ work finishing: the result reaches you as a notification, or with the dispatch itself where
14
+ your harness works that way. Do the work that does not depend on the result, then end your
15
+ turn and wait for the result. That wait is a pause. Do not sleep or poll.
16
+
17
+ A subagent that returns no usable result failed in your harness, not in this graph. Every
18
+ assignment here is work you can do yourself, slower, so run that assignment yourself and
19
+ carry on. Keep a read-only assignment read-only. If no subagent works at all, report it
20
+ once:
21
+
22
+ ```text
23
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase delegation-unavailable
24
+ ```
25
+
26
+ Before you end your turn to wait for the developer, report the pause:
27
+
28
+ ```text
29
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase awaiting-developer
30
+ ```
31
+
32
+ A turn that ends while the run waits is a pause, not a stop, even when your harness ends it.
33
+ When the answer or the result arrives, continue from the step that paused.
34
+
35
+ If you stop this run, send one short report before you stop. The friction command follows
36
+ the telemetry setting the developer already chose, so it needs no separate question.
37
+
38
+ ```text
39
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard friction --phase stop --category <slug> --message "<sentences>"
40
+ ```
41
+
42
+ `--message` takes one or two sentences: 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. Send no secrets, source code, logs, or command output. A refused report
46
+ is not a failed step: reword it and send it again, or stop without a report. A stop that
47
+ routes to `feature/stop` sends no report here: that prompt first asks the developer about
48
+ one scoped fix, and sends the report itself when no fix is approved.
49
+
7
50
  Before any subagent or project process runs, capture the developer's existing work:
8
51
 
9
52
  ```text
10
- npx --prefer-offline --yes copilotkit@4.16.0 onboard protect
53
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard protect
11
54
  ```
12
55
 
13
56
  Keep the exact protected path list it prints and give that list to every subagent. No
@@ -17,13 +60,12 @@ approved authorization before implementation.
17
60
  Before edits, inspect the current runtime, provider/chat, agent id, authenticated stable user
18
61
  identity, thread routes, existing Intelligence configuration (presence only), current websocket
19
62
  configuration, and normal test/dev commands. Prove the current frontend-to-runtime-to-agent
20
- round trip and inspect `/info`. If this is not an existing CopilotKit app, leave files
21
- unchanged and direct the developer to generic onboarding first.
63
+ round trip and inspect `/info`.
22
64
 
23
65
  Wait for the inspection subagent to finish. Then report that the inspection came back:
24
66
 
25
67
  ```text
26
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase research-returned
68
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase research-returned
27
69
  ```
28
70
 
29
71
  A refused checkpoint prints its reason and leaves onboarding unaffected. It is not a
@@ -33,11 +75,11 @@ If the inspection did not prove the baseline this intent extends, stop here with
33
75
  changing files:
34
76
 
35
77
  ```text
36
- npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/stop
78
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
37
79
  ```
38
80
 
39
81
  Fetch the current official guides before planning:
40
- https://docs.copilotkit.ai/intelligence/connect-your-runtime.md
82
+ https://docs.copilotkit.ai/intelligence/quickstart.md
41
83
  https://docs.copilotkit.ai/auth.md
42
84
  https://docs.copilotkit.ai/intelligence/threads-explained.md
43
85
  https://docs.copilotkit.ai/reference/hooks/useThreads.md
@@ -59,7 +101,7 @@ one.
59
101
  After approval, record each approved path before implementation:
60
102
 
61
103
  ```text
62
- npx --prefer-offline --yes copilotkit@4.16.0 onboard protect --authorize --path <path> --reason "<the plan's sentence>"
104
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --path <path> --reason "<the plan's sentence>"
63
105
  ```
64
106
 
65
107
  If an approved path changed after capture and no implementation step has run, add
@@ -69,7 +111,7 @@ authorize a path the approved plan did not list.
69
111
  Then report the plan this run is about to implement:
70
112
 
71
113
  ```text
72
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase plan-written
114
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase plan-written
73
115
  ```
74
116
 
75
- Then run `npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/realtime-sync/implement`.
117
+ Then run `npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/realtime-sync/implement`.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Delegate implementation to one subagent with the approved plan and fetched official guides.
4
4
  If repository evidence does not prove an existing valid Intelligence selection, run
5
- `npx --prefer-offline --yes copilotkit@4.16.0 login --json` and follow its single streaming session. Then
5
+ `npx --prefer-offline --yes copilotkit@4.18.0 login --json` and follow its single streaming session. Then
6
6
  list projects, show the developer the current/recent choices, and select or create one only
7
7
  after they choose. Require the secret-safe selection summary to confirm the project file,
8
8
  environment file, and key provisioning; never display a key. If existing configuration is
@@ -20,14 +20,45 @@ non-zero on an app that is working. Pass what `identifyUser` reads with a repeat
20
20
  It is not a defect to repair.
21
21
 
22
22
  Run focused type/test commands, then start the app and run
23
- `npx --prefer-offline --yes copilotkit@4.16.0 verify --expect-runtime intelligence --round-trip --agent <agent-id> --json`.
23
+ `npx --prefer-offline --yes copilotkit@4.18.0 verify --expect-runtime intelligence --round-trip --agent <agent-id> --json`.
24
24
  Repair changed-file failures before continuing. Record changed paths and secret-safe
25
25
  validation evidence.
26
26
 
27
+ Before you spawn the implementation subagent, take the authorized list from the CLI:
28
+
29
+ ```text
30
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard audit
31
+ ```
32
+
33
+ From its result, copy the paths under `Authorized to modify:`. A passed or failed audit with
34
+ no such block means that nothing is authorized. Read only that block now, and decide the
35
+ findings of a failed audit after implementation, with the audit rules below. If this audit
36
+ starts with `Status: blocked`, the CLI cannot supply the list. Report the printed reason and
37
+ take the feature stop route below.
38
+
39
+ Give the implementation subagent the protected path list and the authorized list. Tell it
40
+ this rule: it can change a path on the authorized list. When the work needs any other
41
+ protected path, it must not edit it. It returns a result that starts with `Status: blocked`
42
+ and names the file under Blockers.
43
+
44
+ That result is a question for the developer. The file has not changed yet, so consent can
45
+ still go on the record. Name the file and why the work needs it, then end your turn and wait
46
+ for the developer's answer. If they allow it, record their answer before any edit:
47
+
48
+ ```text
49
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
50
+ ```
51
+
52
+ Continue only when the result starts with `Status: passed`. Run the audit again, take the
53
+ new list from its `Authorized to modify:` block, and spawn a fresh implementation subagent
54
+ with the same handoff and that list. A subagent that already returned cannot pick up consent
55
+ recorded after it was spawned. If you cannot ask, or the developer declines, take the
56
+ feature stop route below.
57
+
27
58
  After validation and each repair, run:
28
59
 
29
60
  ```text
30
- npx --prefer-offline --yes copilotkit@4.16.0 onboard audit
61
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard audit
31
62
  ```
32
63
 
33
64
  Continue only when it starts with `Status: passed`. A path under `Authorized to modify:` is
@@ -38,33 +69,30 @@ with the implementation subagent's `Files changed` section. If that section does
38
69
  the path, accept the developer's external change:
39
70
 
40
71
  ```text
41
- npx --prefer-offline --yes copilotkit@4.16.0 onboard protect --accept-external --path <path>
72
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --accept-external --path <path>
42
73
  ```
43
74
 
44
75
  For an env file where the developer placed a requested credential, use
45
76
  `onboard protect --accept-credential --path <path>` instead. If the subagent names the path,
46
- or its report does not settle who changed it, ask the developer to allow the unplanned
47
- change. Only after they agree, record their answer:
48
-
49
- ```text
50
- npx --prefer-offline --yes copilotkit@4.16.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
51
- ```
77
+ or its report does not settle who changed it, the change is this run's own, made without
78
+ consent. Do not ask the developer to allow it: the CLI refuses consent for a path that
79
+ already changed. Route out, and name the path and the change the audit reports.
52
80
 
53
- Run the audit again after each accepted or authorized change. If it still fails, or starts
81
+ Run the audit again after each accepted change. If it still fails, or starts
54
82
  with `Status: blocked`, route out and stop:
55
83
 
56
84
  ```text
57
- npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/stop
85
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
58
86
  ```
59
87
 
60
88
  When implementation validation passes, report it:
61
89
 
62
90
  ```text
63
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase build-validated
91
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase build-validated
64
92
  ```
65
93
 
66
94
  If validation cannot pass, or this intent needs a prerequisite the app does not have, use
67
95
  the feature stop route above without further changes.
68
96
 
69
97
  Otherwise run
70
- `npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/rich-threads/proof`.
98
+ `npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/rich-threads/proof`.
@@ -3,34 +3,55 @@
3
3
  Delegate proof to a fresh subagent. In the real authenticated frontend, create a conversation,
4
4
  send a distinct message, confirm the response, reload or reopen the same thread, and require
5
5
  the prior history to remain visible for that same stable user. Confirm the runtime exposes
6
- the required thread routes and the Intelligence verification remains successful.
6
+ the required thread routes and the Intelligence verification keeps the result that
7
+ implementation recorded: passed, or UNKNOWN for an auth-gated app.
7
8
 
8
9
  Record the interaction, visible persisted history, app URL, process IDs, and safe stop
9
10
  commands. Do not count a thread id in a log, a successful API call, or an in-memory history
10
11
  as proof. Repair defects caused by changed files and repeat. Keep project-owned servers
11
12
  running.
12
13
 
14
+ Give the proof subagent the protected path list and the authorized list. Take that list from
15
+ the latest audit, and copy the paths under `Authorized to modify:`. Tell it this rule: a fix
16
+ can change a path on the authorized list. When a fix needs any other protected path, it must
17
+ not edit it. It returns a result that starts with `Status: blocked` and names the file under
18
+ Blockers.
19
+
20
+ That result is a question for the developer. The file has not changed yet, so consent can
21
+ still go on the record. Name the file and why the fix needs it, then end your turn and wait
22
+ for the developer's answer. If they allow it, record their answer before any edit:
23
+
24
+ ```text
25
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
26
+ ```
27
+
28
+ Continue only when the result starts with `Status: passed`. Run the audit again, take the
29
+ new list from its `Authorized to modify:` block, and spawn a fresh proof subagent with the
30
+ same handoff and that list. A subagent that already returned cannot pick up consent recorded
31
+ after it was spawned. If you cannot ask, or the developer declines, take the feature stop
32
+ route below.
33
+
13
34
  Report each attempt at the proof as it ends, counting from one:
14
35
 
15
36
  ```text
16
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase journey-attempted --attempt 1
37
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase journey-attempted --attempt 1
17
38
  ```
18
39
 
19
40
  Report each repair cycle the same way, counting from one:
20
41
 
21
42
  ```text
22
- npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase repair-attempted --attempt 1
43
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase repair-attempted --attempt 1
23
44
  ```
24
45
 
25
46
  After the final attempt, report the gate exactly once:
26
47
 
27
48
  ```text
28
- npx --prefer-offline --yes copilotkit@4.16.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
49
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
29
50
  ```
30
51
 
31
52
  Use `passed` only for proved persistence and reopen, `failed` for an attempted proof that
32
53
  failed, and `skipped` when the proof could not run. Then run
33
- `npx --prefer-offline --yes copilotkit@4.16.0 onboard audit`. Continue only when it starts with
54
+ `npx --prefer-offline --yes copilotkit@4.18.0 onboard audit`. Continue only when it starts with
34
55
  `Status: passed`.
35
56
 
36
57
  If the audit fails, never repair, reset, or revert a protected path. Compare each named path
@@ -38,16 +59,16 @@ with the proof subagent's `Files changed` section. If that section does not name
38
59
  run `onboard protect --accept-external --path <path>`, or
39
60
  `onboard protect --accept-credential --path <path>` for an env file where the developer
40
61
  placed a requested credential. If the subagent names the path, or its report does not settle
41
- who changed it, ask the developer to allow it. Only after they agree, run
42
- `onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"`.
43
- Run the audit again after each accepted or authorized change.
62
+ who changed it, the change is this run's own, made without consent. Do not ask the developer
63
+ to allow it: the CLI refuses consent for a path that already changed. Route out, and name
64
+ the path and the change the audit reports. Run the audit again after each accepted change.
44
65
 
45
66
  If the audit still fails, or starts with `Status: blocked`, route out and stop:
46
67
 
47
68
  ```text
48
- npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/stop
69
+ npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
49
70
  ```
50
71
 
51
72
  When the audit passes, run
52
- `npx --prefer-offline --yes copilotkit@4.16.0 onboard read feature/complete` with the actual browser
73
+ `npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/complete` with the actual browser
53
74
  outcome.