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.
- package/README.md +195 -8
- package/cli-build-info.json +7 -7
- package/exporters/langgraph/README.md +118 -0
- package/exporters/langgraph/export_checkpointer.py +125 -0
- package/index.js +13890 -9434
- package/onboarding/index.json +1 -1
- package/onboarding/prompts/authenticate/start.md +24 -23
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +56 -199
- package/onboarding/prompts/credentials/plan.md +24 -23
- package/onboarding/prompts/credentials/settle-credentials.md +40 -177
- package/onboarding/prompts/credentials/write-plan.md +47 -23
- package/onboarding/prompts/fallback/best-effort.md +25 -17
- package/onboarding/prompts/feature/a2ui/implement.md +40 -12
- package/onboarding/prompts/feature/a2ui/proof.md +29 -9
- package/onboarding/prompts/feature/a2ui/start.md +54 -12
- package/onboarding/prompts/feature/blocked-by-plan.md +4 -4
- package/onboarding/prompts/feature/channels/implement.md +41 -13
- package/onboarding/prompts/feature/channels/proof.md +30 -11
- package/onboarding/prompts/feature/channels/start.md +54 -9
- package/onboarding/prompts/feature/chat-suggestions/implement.md +40 -12
- package/onboarding/prompts/feature/chat-suggestions/proof.md +29 -9
- package/onboarding/prompts/feature/chat-suggestions/start.md +51 -10
- package/onboarding/prompts/feature/complete.md +2 -2
- package/onboarding/prompts/feature/learning/implement.md +66 -29
- package/onboarding/prompts/feature/learning/proof.md +30 -10
- package/onboarding/prompts/feature/learning/start.md +46 -20
- package/onboarding/prompts/feature/open-generative-ui/implement.md +41 -13
- package/onboarding/prompts/feature/open-generative-ui/proof.md +29 -9
- package/onboarding/prompts/feature/open-generative-ui/start.md +51 -10
- package/onboarding/prompts/feature/realtime-sync/implement.md +41 -13
- package/onboarding/prompts/feature/realtime-sync/proof.md +31 -10
- package/onboarding/prompts/feature/realtime-sync/start.md +51 -9
- package/onboarding/prompts/feature/rich-threads/implement.md +42 -14
- package/onboarding/prompts/feature/rich-threads/proof.md +31 -10
- package/onboarding/prompts/feature/rich-threads/start.md +51 -9
- package/onboarding/prompts/feature/stop.md +5 -5
- package/onboarding/prompts/feature/voice/implement.md +40 -12
- package/onboarding/prompts/feature/voice/proof.md +29 -9
- package/onboarding/prompts/feature/voice/start.md +51 -9
- package/onboarding/prompts/framework/ag2.md +2 -2
- package/onboarding/prompts/framework/agno.md +4 -4
- package/onboarding/prompts/framework/built-in.md +2 -2
- package/onboarding/prompts/framework/claude-sdk-python.md +8 -7
- package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
- package/onboarding/prompts/framework/crewai-flows.md +15 -7
- package/onboarding/prompts/framework/deep-agents.md +4 -3
- package/onboarding/prompts/framework/google-adk.md +7 -7
- package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
- package/onboarding/prompts/framework/langgraph-python.md +2 -2
- package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
- package/onboarding/prompts/framework/llamaindex.md +4 -4
- package/onboarding/prompts/framework/mastra.md +2 -2
- package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
- package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
- package/onboarding/prompts/framework/ms-agent-python.md +6 -6
- package/onboarding/prompts/framework/pydantic-ai.md +2 -2
- package/onboarding/prompts/framework/strands-python.md +4 -4
- package/onboarding/prompts/framework/strands-typescript.md +4 -4
- package/onboarding/prompts/frontend/angular.md +3 -3
- package/onboarding/prompts/frontend/nextjs.md +16 -3
- package/onboarding/prompts/frontend/plan.md +9 -8
- package/onboarding/prompts/frontend/react-native.md +2 -2
- package/onboarding/prompts/frontend/react-spa.md +2 -2
- package/onboarding/prompts/frontend/vue.md +2 -2
- package/onboarding/prompts/implementation/build-and-validate.md +68 -30
- package/onboarding/prompts/proof/complete.md +24 -17
- package/onboarding/prompts/proof/oss-baseline.md +16 -12
- package/onboarding/prompts/proof/round-trip.md +39 -27
- package/onboarding/prompts/research/gather.md +8 -7
- package/onboarding/prompts/research/merge.md +3 -3
- package/onboarding/prompts/research/preflight.md +4 -4
- package/onboarding/prompts/research/route.md +6 -6
- package/onboarding/prompts/starter/clone.md +16 -12
- package/onboarding/prompts/stopped/run-failed.md +11 -11
- package/onboarding/prompts/subagent/create-plan.md +24 -10
- package/onboarding/prompts/subagent/implement-and-validate.md +25 -11
- package/onboarding/prompts/subagent/inspect-repository.md +21 -6
- package/onboarding/prompts/subagent/prove-oss-baseline.md +5 -4
- package/onboarding/prompts/subagent/prove-round-trip.md +77 -23
- package/onboarding/prompts/unsupported/no-validated-path.md +4 -4
- package/package.json +1 -5
- package/release/release-tool.js +189 -44
|
@@ -3,10 +3,53 @@
|
|
|
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
|
+
## 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.
|
|
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
|
|
@@ -15,15 +58,13 @@ approved authorization before implementation.
|
|
|
15
58
|
|
|
16
59
|
Before edits, identify the current CopilotKit provider, chat component, message lifecycle,
|
|
17
60
|
agent id, package version, and test/dev commands. Prove the existing OSS round trip with
|
|
18
|
-
`/info`, `npx --prefer-offline --yes copilotkit@4.
|
|
19
|
-
and one real frontend request when browser control is available.
|
|
20
|
-
existing CopilotKit chat, leave files unchanged and direct the developer to generic
|
|
21
|
-
onboarding first.
|
|
61
|
+
`/info`, `npx --prefer-offline --yes copilotkit@4.18.0 verify --expect-runtime oss --round-trip --agent <agent-id> --json`,
|
|
62
|
+
and one real frontend request when browser control is available.
|
|
22
63
|
|
|
23
64
|
Wait for the inspection subagent to finish. Then report that the inspection came back:
|
|
24
65
|
|
|
25
66
|
```text
|
|
26
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
67
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase research-returned
|
|
27
68
|
```
|
|
28
69
|
|
|
29
70
|
A refused checkpoint prints its reason and leaves onboarding unaffected. It is not a
|
|
@@ -33,7 +74,7 @@ If the inspection did not prove the baseline this intent extends, stop here with
|
|
|
33
74
|
changing files:
|
|
34
75
|
|
|
35
76
|
```text
|
|
36
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
77
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
|
|
37
78
|
```
|
|
38
79
|
|
|
39
80
|
Do not run login, provision Intelligence, request a credential, replace the agent, or alter
|
|
@@ -55,7 +96,7 @@ one.
|
|
|
55
96
|
After approval, record each approved path before implementation:
|
|
56
97
|
|
|
57
98
|
```text
|
|
58
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
99
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --path <path> --reason "<the plan's sentence>"
|
|
59
100
|
```
|
|
60
101
|
|
|
61
102
|
If an approved path changed after capture and no implementation step has run, add
|
|
@@ -65,7 +106,7 @@ authorize a path the approved plan did not list.
|
|
|
65
106
|
Then report the plan this run is about to implement:
|
|
66
107
|
|
|
67
108
|
```text
|
|
68
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
109
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase plan-written
|
|
69
110
|
```
|
|
70
111
|
|
|
71
|
-
Then run `npx --prefer-offline --yes copilotkit@4.
|
|
112
|
+
Then run `npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/chat-suggestions/implement`.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Use the outcome the proof step observed. Run:
|
|
4
4
|
|
|
5
5
|
```text
|
|
6
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
6
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard complete --visual-check <performed|skipped-no-browser-tool|channels-proof-passed|failed>
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Use `channels-proof-passed` for a Slack or Teams run that recorded a passed round-trip proof
|
|
@@ -20,7 +20,7 @@ Before `onboard complete`, send the friction this run mentioned to the developer
|
|
|
20
20
|
report each, at most four, costliest first:
|
|
21
21
|
|
|
22
22
|
```text
|
|
23
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
23
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard friction --category <slug> --cost-seconds <seconds> --message "<sentences>"
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Put one or two sentences in `--message`, with no secrets, source, or logs. Pick the
|
|
@@ -7,16 +7,17 @@ require the secret-safe project/key provisioning summary before wiring the runti
|
|
|
7
7
|
|
|
8
8
|
## If you stop in this phase
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
resolve, a container id that never resolves, an audit that
|
|
12
|
-
that cannot pass
|
|
10
|
+
Five rules below end this run without completing it: an entitlement the platform will not
|
|
11
|
+
resolve, a container id that never resolves, an audit that still fails or is blocked or
|
|
12
|
+
cannot be cleared, validation that cannot pass, and an intent that needs a prerequisite the
|
|
13
|
+
app does not have. Each one stops onboarding for a developer who has already approved a
|
|
13
14
|
plan. Name the exact command, id, and error code that stopped you: a report that names only
|
|
14
|
-
the step cannot be acted on. Send one short report before you stop.
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
the step cannot be acted on. Send one short report before you stop. The friction command
|
|
16
|
+
follows the telemetry setting the developer already chose, so it needs no separate
|
|
17
|
+
question.
|
|
17
18
|
|
|
18
19
|
```text
|
|
19
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
20
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard friction --phase stop --category <slug> --message "<sentences>"
|
|
20
21
|
```
|
|
21
22
|
|
|
22
23
|
`--message` takes one or two sentences: the step you stopped at and what stopped it.
|
|
@@ -29,10 +30,17 @@ those, prints the reason, and exits zero. A refused report is not a failed step.
|
|
|
29
30
|
report, then stop.
|
|
30
31
|
|
|
31
32
|
A refusal by the platform is the one exception. It reaches `feature/blocked-by-plan`, which
|
|
32
|
-
reports the ending by itself and says to file nothing further.
|
|
33
|
+
reports the ending by itself and says to file nothing further. A stop that routes to
|
|
34
|
+
`feature/stop` also sends no report here: that prompt first asks the developer about one
|
|
35
|
+
scoped fix, and sends the report itself when no fix is approved.
|
|
33
36
|
|
|
34
37
|
After the project is selected, settle the container from the terminal.
|
|
35
38
|
|
|
39
|
+
The `learning containers` commands and `project select` need a CLI sign-in. A project API
|
|
40
|
+
key in `.env` does not replace it, even when the app already authenticates with that key:
|
|
41
|
+
the key serves the app's runtime only. So `AUTH_FAILED` from these commands means sign in
|
|
42
|
+
with `login --json`, not look for another credential.
|
|
43
|
+
|
|
36
44
|
Whichever of the two reads below runs first also answers the entitlement question, because
|
|
37
45
|
a read carries the same availability gate as the create. Read `status` and `error.code`
|
|
38
46
|
from its payload. Route on the code rather than on the exit status.
|
|
@@ -41,7 +49,7 @@ settled refusal rather than a missing baseline, so stop here, before any file ch
|
|
|
41
49
|
take its own ending:
|
|
42
50
|
|
|
43
51
|
```text
|
|
44
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
52
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/blocked-by-plan
|
|
45
53
|
```
|
|
46
54
|
|
|
47
55
|
`LEARNING_AVAILABILITY_UNAVAILABLE` means the platform did not resolve the answer. It is
|
|
@@ -55,7 +63,7 @@ then, so the read below is where its refusal surfaces.
|
|
|
55
63
|
When the plan or the repository already names an id, ask about that one id and nothing else:
|
|
56
64
|
|
|
57
65
|
```text
|
|
58
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
66
|
+
npx --prefer-offline --yes copilotkit@4.18.0 learning containers get <id> --json
|
|
59
67
|
```
|
|
60
68
|
|
|
61
69
|
One call answers it, and no list is needed.
|
|
@@ -63,7 +71,7 @@ One call answers it, and no list is needed.
|
|
|
63
71
|
When no id is in hand, survey what the project holds:
|
|
64
72
|
|
|
65
73
|
```text
|
|
66
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
74
|
+
npx --prefer-offline --yes copilotkit@4.18.0 learning containers list --json
|
|
67
75
|
```
|
|
68
76
|
|
|
69
77
|
One call returns at most 500 containers. When `nextCursor` in the result is not null, read
|
|
@@ -74,7 +82,7 @@ second container for work the first one already covers.
|
|
|
74
82
|
Report what the read found before asking anyone anything:
|
|
75
83
|
|
|
76
84
|
```text
|
|
77
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
85
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase container-surveyed
|
|
78
86
|
```
|
|
79
87
|
|
|
80
88
|
Everything after this waits on a person, so a run that stops past this point stopped on a
|
|
@@ -95,7 +103,7 @@ user, so the callback can return a different id per tier or per customer.
|
|
|
95
103
|
Ask the CLI for the id rather than spelling one yourself:
|
|
96
104
|
|
|
97
105
|
```text
|
|
98
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
106
|
+
npx --prefer-offline --yes copilotkit@4.18.0 learning containers default-id --json
|
|
99
107
|
```
|
|
100
108
|
|
|
101
109
|
It derives the project-scoped id from the selected project's slug, reads the local project
|
|
@@ -109,7 +117,7 @@ run that spells the id differently gives one project two containers, each below
|
|
|
109
117
|
above on its own. One command is what keeps the two spellings identical.
|
|
110
118
|
|
|
111
119
|
```text
|
|
112
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
120
|
+
npx --prefer-offline --yes copilotkit@4.18.0 learning containers create --id <id> --name <name> --json
|
|
113
121
|
```
|
|
114
122
|
|
|
115
123
|
An id already in use answers `LEARNING_CONTAINER_ALREADY_EXISTS`. That is a container to
|
|
@@ -124,7 +132,7 @@ or a guessed id.
|
|
|
124
132
|
Then report that the container is settled, before any edit:
|
|
125
133
|
|
|
126
134
|
```text
|
|
127
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
135
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase container-settled
|
|
128
136
|
```
|
|
129
137
|
|
|
130
138
|
Everything above happens between two prompts, so a run that stopped on a developer who could
|
|
@@ -145,13 +153,44 @@ non-zero on an app that is working. Pass what `identifyUser` reads with a repeat
|
|
|
145
153
|
It is not a defect to repair.
|
|
146
154
|
|
|
147
155
|
Run focused tests and
|
|
148
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
156
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 verify --expect-runtime intelligence --round-trip --agent <agent-id> --json`.
|
|
149
157
|
Repair changed-file failures and record secret-safe evidence.
|
|
150
158
|
|
|
159
|
+
Before you spawn the implementation subagent, take the authorized list from the CLI:
|
|
160
|
+
|
|
161
|
+
```text
|
|
162
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard audit
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
From its result, copy the paths under `Authorized to modify:`. A passed or failed audit with
|
|
166
|
+
no such block means that nothing is authorized. Read only that block now, and decide the
|
|
167
|
+
findings of a failed audit after implementation, with the audit rules below. If this audit
|
|
168
|
+
starts with `Status: blocked`, the CLI cannot supply the list. Report the printed reason and
|
|
169
|
+
take the feature stop route below.
|
|
170
|
+
|
|
171
|
+
Give the implementation subagent the protected path list and the authorized list. Tell it
|
|
172
|
+
this rule: it can change a path on the authorized list. When the work needs any other
|
|
173
|
+
protected path, it must not edit it. It returns a result that starts with `Status: blocked`
|
|
174
|
+
and names the file under Blockers.
|
|
175
|
+
|
|
176
|
+
That result is a question for the developer. The file has not changed yet, so consent can
|
|
177
|
+
still go on the record. Name the file and why the work needs it, then end your turn and wait
|
|
178
|
+
for the developer's answer. If they allow it, record their answer before any edit:
|
|
179
|
+
|
|
180
|
+
```text
|
|
181
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Continue only when the result starts with `Status: passed`. Run the audit again, take the
|
|
185
|
+
new list from its `Authorized to modify:` block, and spawn a fresh implementation subagent
|
|
186
|
+
with the same handoff and that list. A subagent that already returned cannot pick up consent
|
|
187
|
+
recorded after it was spawned. If you cannot ask, or the developer declines, take the
|
|
188
|
+
feature stop route below.
|
|
189
|
+
|
|
151
190
|
After validation and each repair, run:
|
|
152
191
|
|
|
153
192
|
```text
|
|
154
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
193
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard audit
|
|
155
194
|
```
|
|
156
195
|
|
|
157
196
|
Continue only when it starts with `Status: passed`. A path under `Authorized to modify:` is
|
|
@@ -162,33 +201,31 @@ with the implementation subagent's `Files changed` section. If that section does
|
|
|
162
201
|
the path, accept the developer's external change:
|
|
163
202
|
|
|
164
203
|
```text
|
|
165
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
204
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --accept-external --path <path>
|
|
166
205
|
```
|
|
167
206
|
|
|
168
207
|
For an env file where the developer placed a requested credential, use
|
|
169
208
|
`onboard protect --accept-credential --path <path>` instead. If the subagent names the path,
|
|
170
|
-
or its report does not settle who changed it,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
```text
|
|
174
|
-
npx --prefer-offline --yes copilotkit@4.16.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
|
|
175
|
-
```
|
|
209
|
+
or its report does not settle who changed it, the change is this run's own, made without
|
|
210
|
+
consent. Do not ask the developer to allow it: the CLI refuses consent for a path that
|
|
211
|
+
already changed. Route out, and name the path and the change the audit reports.
|
|
176
212
|
|
|
177
|
-
Run the audit again after each accepted
|
|
178
|
-
with `Status: blocked`, route out and stop
|
|
213
|
+
Run the audit again after each accepted change. If it still fails, or starts
|
|
214
|
+
with `Status: blocked`, route out and stop. Route out the same way when
|
|
215
|
+
`--accept-credential` refuses because it names a lost variable:
|
|
179
216
|
|
|
180
217
|
```text
|
|
181
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
218
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
|
|
182
219
|
```
|
|
183
220
|
|
|
184
221
|
When implementation validation passes, report it:
|
|
185
222
|
|
|
186
223
|
```text
|
|
187
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
224
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase build-validated
|
|
188
225
|
```
|
|
189
226
|
|
|
190
227
|
If validation cannot pass, or this intent needs a prerequisite the app does not have, use
|
|
191
228
|
the feature stop route above without further changes.
|
|
192
229
|
|
|
193
230
|
Otherwise run
|
|
194
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
231
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/learning/proof`.
|
|
@@ -7,7 +7,7 @@ Container. Confirm the thread remains associated with the expected user.
|
|
|
7
7
|
One command decides it:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
10
|
+
npx --prefer-offline --yes copilotkit@4.18.0 verify --expect-runtime intelligence --round-trip --agent <agent-id> --expect-learning-container <id> --json
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
It reads the thread back from the platform, so it answers for any runtime mount, and it
|
|
@@ -29,27 +29,47 @@ counts. Existing threads can join this container if they never belonged to anoth
|
|
|
29
29
|
Their surviving earlier history then becomes eligible for collection and counts toward the
|
|
30
30
|
same threshold. Existing threads do not join automatically just because a container exists.
|
|
31
31
|
|
|
32
|
+
Give the proof subagent the protected path list and the authorized list. Take that list from
|
|
33
|
+
the latest audit, and copy the paths under `Authorized to modify:`. Tell it this rule: a fix
|
|
34
|
+
can change a path on the authorized list. When a fix needs any other protected path, it must
|
|
35
|
+
not edit it. It returns a result that starts with `Status: blocked` and names the file under
|
|
36
|
+
Blockers.
|
|
37
|
+
|
|
38
|
+
That result is a question for the developer. The file has not changed yet, so consent can
|
|
39
|
+
still go on the record. Name the file and why the fix needs it, then end your turn and wait
|
|
40
|
+
for the developer's answer. If they allow it, record their answer before any edit:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Continue only when the result starts with `Status: passed`. Run the audit again, take the
|
|
47
|
+
new list from its `Authorized to modify:` block, and spawn a fresh proof subagent with the
|
|
48
|
+
same handoff and that list. A subagent that already returned cannot pick up consent recorded
|
|
49
|
+
after it was spawned. If you cannot ask, or the developer declines, take the feature stop
|
|
50
|
+
route below.
|
|
51
|
+
|
|
32
52
|
Report each attempt at the proof as it ends, counting from one:
|
|
33
53
|
|
|
34
54
|
```text
|
|
35
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
55
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase journey-attempted --attempt 1
|
|
36
56
|
```
|
|
37
57
|
|
|
38
58
|
Report each repair cycle the same way, counting from one:
|
|
39
59
|
|
|
40
60
|
```text
|
|
41
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
61
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase repair-attempted --attempt 1
|
|
42
62
|
```
|
|
43
63
|
|
|
44
64
|
After the final attempt, report the gate exactly once:
|
|
45
65
|
|
|
46
66
|
```text
|
|
47
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
67
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
|
|
48
68
|
```
|
|
49
69
|
|
|
50
70
|
Use `passed` only for a proved Container assignment, `failed` for an attempted proof that
|
|
51
71
|
failed, and `skipped` when the proof could not run. Then run
|
|
52
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
72
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard audit`. Continue only when it starts with
|
|
53
73
|
`Status: passed`.
|
|
54
74
|
|
|
55
75
|
If the audit fails, never repair, reset, or revert a protected path. Compare each named path
|
|
@@ -57,16 +77,16 @@ with the proof subagent's `Files changed` section. If that section does not name
|
|
|
57
77
|
run `onboard protect --accept-external --path <path>`, or
|
|
58
78
|
`onboard protect --accept-credential --path <path>` for an env file where the developer
|
|
59
79
|
placed a requested credential. If the subagent names the path, or its report does not settle
|
|
60
|
-
who changed it,
|
|
61
|
-
|
|
62
|
-
Run the audit again after each accepted
|
|
80
|
+
who changed it, the change is this run's own, made without consent. Do not ask the developer
|
|
81
|
+
to allow it: the CLI refuses consent for a path that already changed. Route out, and name
|
|
82
|
+
the path and the change the audit reports. Run the audit again after each accepted change.
|
|
63
83
|
|
|
64
84
|
If the audit still fails, or starts with `Status: blocked`, route out and stop:
|
|
65
85
|
|
|
66
86
|
```text
|
|
67
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
87
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
|
|
68
88
|
```
|
|
69
89
|
|
|
70
90
|
When the audit passes, run
|
|
71
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
91
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/complete` with the actual surface
|
|
72
92
|
outcome.
|
|
@@ -4,23 +4,51 @@ 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
|
-
##
|
|
7
|
+
## Waits, stops, and subagents
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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:
|
|
12
27
|
|
|
13
28
|
```text
|
|
14
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
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>"
|
|
15
40
|
```
|
|
16
41
|
|
|
17
42
|
`--message` takes one or two sentences: the step you stopped at and what stopped it.
|
|
18
43
|
Pick the category that fits from docs-missing, docs-wrong, docs-sequential, cli-gap,
|
|
19
44
|
sdk-gap, environment, port-collision, credential, validation-loop, and other. Leave
|
|
20
|
-
--cost-seconds off.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
+
|
|
50
|
+
A refusal by the platform also sends no report here. It reaches `feature/blocked-by-plan`, which
|
|
51
|
+
reports the ending by itself and says to file nothing further.
|
|
24
52
|
|
|
25
53
|
Ask the platform whether this organization may use Learning before doing any work. The
|
|
26
54
|
read carries the same availability gate as the create, so it answers the entitlement
|
|
@@ -38,7 +66,7 @@ status:
|
|
|
38
66
|
before the capture, the inspection, and any edit:
|
|
39
67
|
|
|
40
68
|
```text
|
|
41
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
69
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/blocked-by-plan
|
|
42
70
|
```
|
|
43
71
|
|
|
44
72
|
- `LEARNING_AVAILABILITY_UNAVAILABLE` means the platform did not resolve the answer. It is
|
|
@@ -59,7 +87,7 @@ again: it has no answer, so it carries the question forward rather than ending o
|
|
|
59
87
|
Before any subagent or project process runs, capture the developer's existing work:
|
|
60
88
|
|
|
61
89
|
```text
|
|
62
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
90
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect
|
|
63
91
|
```
|
|
64
92
|
|
|
65
93
|
Keep the exact protected path list it prints and give that list to every subagent. No
|
|
@@ -68,14 +96,12 @@ approved authorization before implementation.
|
|
|
68
96
|
|
|
69
97
|
Before edits, inspect the runtime, agent id, provider/chat, server-side user identity,
|
|
70
98
|
existing Intelligence configuration (presence only), existing thread routes, and the normal
|
|
71
|
-
test/dev commands. Prove the current round trip and inspect `/info`.
|
|
72
|
-
already have a CopilotKit app, leave it unchanged and direct the developer to generic
|
|
73
|
-
onboarding.
|
|
99
|
+
test/dev commands. Prove the current round trip and inspect `/info`.
|
|
74
100
|
|
|
75
101
|
Wait for the inspection subagent to finish. Then report that the inspection came back:
|
|
76
102
|
|
|
77
103
|
```text
|
|
78
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
104
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase research-returned
|
|
79
105
|
```
|
|
80
106
|
|
|
81
107
|
A refused checkpoint prints its reason and leaves onboarding unaffected. It is not a
|
|
@@ -85,13 +111,13 @@ If the inspection did not prove the baseline this intent extends, stop here with
|
|
|
85
111
|
changing files:
|
|
86
112
|
|
|
87
113
|
```text
|
|
88
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
114
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
|
|
89
115
|
```
|
|
90
116
|
|
|
91
117
|
Fetch the current official guides before planning:
|
|
92
118
|
https://docs.copilotkit.ai/learning.md
|
|
93
119
|
https://docs.copilotkit.ai/backend/copilot-runtime.md
|
|
94
|
-
https://docs.copilotkit.ai/intelligence/
|
|
120
|
+
https://docs.copilotkit.ai/intelligence/quickstart.md
|
|
95
121
|
https://docs.copilotkit.ai/threads.md
|
|
96
122
|
Use a second retrieval method if needed.
|
|
97
123
|
|
|
@@ -117,7 +143,7 @@ one.
|
|
|
117
143
|
After approval, record each approved path before implementation:
|
|
118
144
|
|
|
119
145
|
```text
|
|
120
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
146
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --path <path> --reason "<the plan's sentence>"
|
|
121
147
|
```
|
|
122
148
|
|
|
123
149
|
If an approved path changed after capture and no implementation step has run, add
|
|
@@ -127,7 +153,7 @@ authorize a path the approved plan did not list.
|
|
|
127
153
|
Then report the plan this run is about to implement:
|
|
128
154
|
|
|
129
155
|
```text
|
|
130
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
156
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase plan-written
|
|
131
157
|
```
|
|
132
158
|
|
|
133
|
-
Then run `npx --prefer-offline --yes copilotkit@4.
|
|
159
|
+
Then run `npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/learning/implement`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Implement Open Generative UI with the existing chat surface
|
|
2
2
|
|
|
3
3
|
Delegate implementation to one subagent with the approved plan and the fetched official
|
|
4
|
-
guide.
|
|
4
|
+
guide. Enable only the documented `openGenerativeUI` runtime option and any documented
|
|
5
5
|
provider wiring the current package versions require. Preserve the existing agent, runtime
|
|
6
6
|
route, persistence, chat surface, and model setup.
|
|
7
7
|
|
|
@@ -13,10 +13,41 @@ Run the project's focused validation commands. Start the app and confirm `/info`
|
|
|
13
13
|
`openGenerativeUIEnabled`, while treating that only as capability evidence. Record changed paths and
|
|
14
14
|
validation results without secrets.
|
|
15
15
|
|
|
16
|
+
Before you spawn the implementation subagent, take the authorized list from the CLI:
|
|
17
|
+
|
|
18
|
+
```text
|
|
19
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard audit
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
From its result, copy the paths under `Authorized to modify:`. A passed or failed audit with
|
|
23
|
+
no such block means that nothing is authorized. Read only that block now, and decide the
|
|
24
|
+
findings of a failed audit after implementation, with the audit rules below. If this audit
|
|
25
|
+
starts with `Status: blocked`, the CLI cannot supply the list. Report the printed reason and
|
|
26
|
+
take the feature stop route below.
|
|
27
|
+
|
|
28
|
+
Give the implementation subagent the protected path list and the authorized list. Tell it
|
|
29
|
+
this rule: it can change a path on the authorized list. When the work needs any other
|
|
30
|
+
protected path, it must not edit it. It returns a result that starts with `Status: blocked`
|
|
31
|
+
and names the file under Blockers.
|
|
32
|
+
|
|
33
|
+
That result is a question for the developer. The file has not changed yet, so consent can
|
|
34
|
+
still go on the record. Name the file and why the work needs it, then end your turn and wait
|
|
35
|
+
for the developer's answer. If they allow it, record their answer before any edit:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Continue only when the result starts with `Status: passed`. Run the audit again, take the
|
|
42
|
+
new list from its `Authorized to modify:` block, and spawn a fresh implementation subagent
|
|
43
|
+
with the same handoff and that list. A subagent that already returned cannot pick up consent
|
|
44
|
+
recorded after it was spawned. If you cannot ask, or the developer declines, take the
|
|
45
|
+
feature stop route below.
|
|
46
|
+
|
|
16
47
|
After validation and each repair, run:
|
|
17
48
|
|
|
18
49
|
```text
|
|
19
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
50
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard audit
|
|
20
51
|
```
|
|
21
52
|
|
|
22
53
|
Continue only when it starts with `Status: passed`. A path under `Authorized to modify:` is
|
|
@@ -27,33 +58,30 @@ with the implementation subagent's `Files changed` section. If that section does
|
|
|
27
58
|
the path, accept the developer's external change:
|
|
28
59
|
|
|
29
60
|
```text
|
|
30
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
61
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --accept-external --path <path>
|
|
31
62
|
```
|
|
32
63
|
|
|
33
64
|
For an env file where the developer placed a requested credential, use
|
|
34
65
|
`onboard protect --accept-credential --path <path>` instead. If the subagent names the path,
|
|
35
|
-
or its report does not settle who changed it,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
```text
|
|
39
|
-
npx --prefer-offline --yes copilotkit@4.16.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
|
|
40
|
-
```
|
|
66
|
+
or its report does not settle who changed it, the change is this run's own, made without
|
|
67
|
+
consent. Do not ask the developer to allow it: the CLI refuses consent for a path that
|
|
68
|
+
already changed. Route out, and name the path and the change the audit reports.
|
|
41
69
|
|
|
42
|
-
Run the audit again after each accepted
|
|
70
|
+
Run the audit again after each accepted change. If it still fails, or starts
|
|
43
71
|
with `Status: blocked`, route out and stop:
|
|
44
72
|
|
|
45
73
|
```text
|
|
46
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
74
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/stop
|
|
47
75
|
```
|
|
48
76
|
|
|
49
77
|
When implementation validation passes, report it:
|
|
50
78
|
|
|
51
79
|
```text
|
|
52
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
80
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase build-validated
|
|
53
81
|
```
|
|
54
82
|
|
|
55
83
|
If validation cannot pass, or this intent needs a prerequisite the app does not have, use
|
|
56
84
|
the feature stop route above without further changes.
|
|
57
85
|
|
|
58
86
|
Otherwise run
|
|
59
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
87
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/open-generative-ui/proof`.
|