copilotkit 4.12.0 → 4.13.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 +10 -0
- package/cli-build-info.json +8 -8
- package/index.js +1015 -123
- package/onboarding/index.json +20 -2
- package/onboarding/prompts/authenticate/start.md +38 -33
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +7 -7
- package/onboarding/prompts/credentials/plan.md +26 -20
- package/onboarding/prompts/credentials/settle-credentials.md +8 -8
- package/onboarding/prompts/credentials/write-plan.md +19 -6
- package/onboarding/prompts/fallback/best-effort.md +6 -6
- package/onboarding/prompts/feature/a2ui/implement.md +6 -6
- package/onboarding/prompts/feature/a2ui/proof.md +6 -6
- package/onboarding/prompts/feature/a2ui/start.md +7 -7
- package/onboarding/prompts/feature/channels/implement.md +67 -12
- package/onboarding/prompts/feature/channels/proof.md +13 -6
- package/onboarding/prompts/feature/channels/start.md +27 -10
- package/onboarding/prompts/feature/chat-suggestions/implement.md +6 -6
- package/onboarding/prompts/feature/chat-suggestions/proof.md +6 -6
- package/onboarding/prompts/feature/chat-suggestions/start.md +7 -7
- package/onboarding/prompts/feature/complete.md +1 -1
- package/onboarding/prompts/feature/learning/implement.md +15 -15
- package/onboarding/prompts/feature/learning/proof.md +7 -7
- package/onboarding/prompts/feature/learning/start.md +8 -8
- package/onboarding/prompts/feature/open-generative-ui/implement.md +6 -6
- package/onboarding/prompts/feature/open-generative-ui/proof.md +6 -6
- package/onboarding/prompts/feature/open-generative-ui/start.md +7 -7
- package/onboarding/prompts/feature/realtime-sync/implement.md +7 -7
- package/onboarding/prompts/feature/realtime-sync/proof.md +6 -6
- package/onboarding/prompts/feature/realtime-sync/start.md +6 -6
- package/onboarding/prompts/feature/rich-threads/implement.md +8 -8
- package/onboarding/prompts/feature/rich-threads/proof.md +6 -6
- package/onboarding/prompts/feature/rich-threads/start.md +6 -6
- package/onboarding/prompts/feature/stop.md +2 -2
- package/onboarding/prompts/feature/voice/implement.md +6 -6
- package/onboarding/prompts/feature/voice/proof.md +6 -6
- package/onboarding/prompts/feature/voice/start.md +7 -7
- package/onboarding/prompts/framework/ag2.md +2 -2
- package/onboarding/prompts/framework/agno.md +2 -2
- package/onboarding/prompts/framework/built-in.md +4 -2
- package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
- package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
- package/onboarding/prompts/framework/crewai-flows.md +2 -2
- package/onboarding/prompts/framework/deep-agents.md +5 -2
- package/onboarding/prompts/framework/google-adk.md +4 -2
- package/onboarding/prompts/framework/langgraph-fastapi.md +4 -3
- package/onboarding/prompts/framework/langgraph-python.md +6 -2
- package/onboarding/prompts/framework/langgraph-typescript.md +6 -2
- package/onboarding/prompts/framework/llamaindex.md +2 -2
- package/onboarding/prompts/framework/mastra.md +4 -2
- package/onboarding/prompts/framework/ms-agent-dotnet.md +4 -2
- package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
- package/onboarding/prompts/framework/ms-agent-python.md +4 -2
- package/onboarding/prompts/framework/pydantic-ai.md +2 -2
- package/onboarding/prompts/framework/strands-python.md +4 -2
- package/onboarding/prompts/framework/strands-typescript.md +4 -2
- package/onboarding/prompts/frontend/angular.md +3 -3
- package/onboarding/prompts/frontend/nextjs.md +3 -3
- package/onboarding/prompts/frontend/plan.md +21 -10
- 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 +33 -15
- package/onboarding/prompts/proof/complete.md +35 -16
- package/onboarding/prompts/proof/oss-baseline.md +5 -5
- package/onboarding/prompts/proof/round-trip.md +23 -12
- package/onboarding/prompts/research/gather.md +12 -102
- package/onboarding/prompts/research/merge.md +60 -0
- package/onboarding/prompts/research/preflight.md +75 -0
- package/onboarding/prompts/research/route.md +28 -4
- package/onboarding/prompts/starter/clone.md +5 -5
- package/onboarding/prompts/stopped/run-failed.md +2 -2
- package/onboarding/prompts/subagent/create-plan.md +18 -1
- package/onboarding/prompts/subagent/implement-and-validate.md +30 -0
- package/onboarding/prompts/subagent/inspect-repository.md +1 -1
- package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
- package/onboarding/prompts/subagent/prove-round-trip.md +17 -7
- package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
- package/package.json +4 -1
- package/release/release-tool.js +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Prove the existing OSS baseline
|
|
2
2
|
|
|
3
3
|
Do not prove the baseline yourself. Spawn one proof subagent. Tell it to run
|
|
4
|
-
`npx --yes copilotkit@4.
|
|
4
|
+
`npx --yes copilotkit@4.13.0 onboard read subagent/prove-oss-baseline` first and follow the
|
|
5
5
|
prompt it returns. If that read fails because the subagent cannot use the shell, stop that
|
|
6
6
|
subagent. Run the same command yourself, then spawn a fresh subagent with the returned prompt
|
|
7
7
|
and the same handoff. Give it the repository findings and exact CLI package spec.
|
|
@@ -17,7 +17,7 @@ Wait for the subagent to finish.
|
|
|
17
17
|
Record what that proof returned before you route on it:
|
|
18
18
|
|
|
19
19
|
```text
|
|
20
|
-
npx --yes copilotkit@4.
|
|
20
|
+
npx --yes copilotkit@4.13.0 onboard proof --step oss-baseline --outcome <passed|failed|skipped> [--predicate <1-6>]
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Report the gate whatever it returned. Pass `passed` when the subagent proved a predicate,
|
|
@@ -35,12 +35,12 @@ Do not change project files before this proof ends. Starting existing developmen
|
|
|
35
35
|
processes and their ignored runtime files is allowed.
|
|
36
36
|
|
|
37
37
|
If the subagent proves the `both-oss` predicate, keep its evidence with the plan and run
|
|
38
|
-
`npx --yes copilotkit@4.
|
|
38
|
+
`npx --yes copilotkit@4.13.0 onboard read conversion/plan`. That project already works.
|
|
39
39
|
What it needs is the conversion, not a build.
|
|
40
40
|
|
|
41
41
|
If the proof does not establish the baseline, record the starting state
|
|
42
42
|
`both-copilotkit-unproved` and run
|
|
43
|
-
`npx --yes copilotkit@4.
|
|
43
|
+
`npx --yes copilotkit@4.13.0 onboard read credentials/plan`. This prompt is served
|
|
44
44
|
whenever a project looks like an OSS integration, so a baseline that did not prove is an
|
|
45
45
|
ordinary starting state rather than a failure. Keep the failing predicate with the plan.
|
|
46
46
|
|
|
@@ -54,5 +54,5 @@ and the plan preserves it rather than repeating it.
|
|
|
54
54
|
|
|
55
55
|
If it cannot identify the running process safely, exposes a secret, or finds a baseline
|
|
56
56
|
failure that cannot be classified, run
|
|
57
|
-
`npx --yes copilotkit@4.
|
|
57
|
+
`npx --yes copilotkit@4.13.0 onboard read stopped/run-failed`. None of those mean the
|
|
58
58
|
project is unsupported: they mean this run did not establish what it needed to.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Prove the user journey
|
|
2
2
|
|
|
3
3
|
Do not do the proof work yourself. Spawn one proof subagent. Tell it to run
|
|
4
|
-
`npx --yes copilotkit@4.
|
|
4
|
+
`npx --yes copilotkit@4.13.0 onboard read subagent/prove-round-trip` first and follow the
|
|
5
5
|
prompt it returns. If that read fails because the subagent cannot use the shell, stop that
|
|
6
6
|
subagent. Run the same command yourself, then spawn a fresh subagent with the returned prompt
|
|
7
7
|
and the same handoff. Give it the selected framework, frontend, model, approved plan, selected
|
|
@@ -33,13 +33,13 @@ pass the time.
|
|
|
33
33
|
Report each attempt at the journey as it ends, counting from one:
|
|
34
34
|
|
|
35
35
|
```text
|
|
36
|
-
npx --yes copilotkit@4.
|
|
36
|
+
npx --yes copilotkit@4.13.0 onboard checkpoint --phase journey-attempted --attempt 1
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
Record what that proof returned before you route on it:
|
|
40
40
|
|
|
41
41
|
```text
|
|
42
|
-
npx --yes copilotkit@4.
|
|
42
|
+
npx --yes copilotkit@4.13.0 onboard proof --step round-trip --outcome <passed|failed|skipped>
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
Report the gate whatever it returned. A proof that never ran is `skipped`, not failed. The
|
|
@@ -47,7 +47,7 @@ command prints one line and sends nothing else. Where a repair cycle runs the pr
|
|
|
47
47
|
record each attempt as it ends.
|
|
48
48
|
|
|
49
49
|
For every protected-path audit in this prompt, run
|
|
50
|
-
`npx --yes copilotkit@4.
|
|
50
|
+
`npx --yes copilotkit@4.13.0 onboard audit` from the target app directory. If its result
|
|
51
51
|
starts with `Status: blocked`, report the printed reason and use the route-out rules below.
|
|
52
52
|
A blocked audit proved nothing changed and is not a preservation failure. If a
|
|
53
53
|
protected-path audit reports a changed path, decide it the way the implementation prompt
|
|
@@ -56,7 +56,7 @@ returns none, so a finding with no Files changed section to test against routes
|
|
|
56
56
|
path one of those sections names is this run's own change and routes out too. Accept a
|
|
57
57
|
path only when a section this run collected covers the step that wrote it and does not
|
|
58
58
|
name it:
|
|
59
|
-
`npx --yes copilotkit@4.
|
|
59
|
+
`npx --yes copilotkit@4.13.0 onboard protect --accept-external --path <path>`. Then run
|
|
60
60
|
the audit again and name the path in the closing summary. Never repair, reset, or revert a
|
|
61
61
|
protected path.
|
|
62
62
|
|
|
@@ -64,12 +64,12 @@ That holds for a repair cycle too. When the fix for a failing check lands on a p
|
|
|
64
64
|
path, the path is still the developer's, however right the diagnosis is and however small
|
|
65
65
|
the fix. Reading the file never settles who wrote it. Ask the developer to allow the
|
|
66
66
|
change, and record their answer with
|
|
67
|
-
`npx --yes copilotkit@4.
|
|
67
|
+
`npx --yes copilotkit@4.13.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"`,
|
|
68
68
|
or route out. Never repair it, and never send it to a repair worker.
|
|
69
69
|
|
|
70
70
|
If the proof result starts with `Status: passed`, run the protected-path audit. Continue to
|
|
71
71
|
`proof/complete` only if that audit passes. After the audit passes, run
|
|
72
|
-
`npx --yes copilotkit@4.
|
|
72
|
+
`npx --yes copilotkit@4.13.0 onboard read proof/complete`. A performed surface outcome with
|
|
73
73
|
the full round trip is core success even if a continued-development tool fails. A skipped
|
|
74
74
|
surface outcome still enters `proof/complete` so the CLI records the blocked result. Do not
|
|
75
75
|
describe a skipped surface as proved. Keep the Skills and MCP results separate from the proof
|
|
@@ -97,6 +97,17 @@ times. Use the route-out rules below for a blocked or third failed result.
|
|
|
97
97
|
Enter the code-repair branch only for a source, configuration, dependency, or tracked-file
|
|
98
98
|
defect.
|
|
99
99
|
|
|
100
|
+
The existing agent's behavior stays outside that branch. It is four things: the agent's
|
|
101
|
+
system prompt and instructions, its tools and what those tools do, its model and provider
|
|
102
|
+
configuration, and its memory or state handling. Repair a failing proof on the CopilotKit
|
|
103
|
+
side first -- the frontend rendering, the tool schema, the runtime wiring. Where the only
|
|
104
|
+
fix the repair worker can find is a change to the agent's instructions or tools, it stops
|
|
105
|
+
and returns the failing predicate with the change it proposes. Report both to the
|
|
106
|
+
developer and send that repair only after they approve it. An approved change is a
|
|
107
|
+
behavior change and the closing report names it as one. Never call a change to the agent's
|
|
108
|
+
instructions or tools a repair, and never send one to a repair worker without that
|
|
109
|
+
approval. If you cannot ask, or the developer declines, use the route-out rules below.
|
|
110
|
+
|
|
100
111
|
If the starter shortcut created the selected path, spawn one repair subagent. Give it the
|
|
101
112
|
failed step, proof evidence, generated path list, selected framework, frontend, model, exact
|
|
102
113
|
target app directory, documentation, and policy.
|
|
@@ -125,7 +136,7 @@ Restart each project-owned process changed by the repair. Report the cycle, coun
|
|
|
125
136
|
one:
|
|
126
137
|
|
|
127
138
|
```text
|
|
128
|
-
npx --yes copilotkit@4.
|
|
139
|
+
npx --yes copilotkit@4.13.0 onboard checkpoint --phase repair-attempted --attempt 1
|
|
129
140
|
```
|
|
130
141
|
|
|
131
142
|
Then spawn a fresh proof subagent
|
|
@@ -143,18 +154,18 @@ and proof cycles.
|
|
|
143
154
|
|
|
144
155
|
Route out only when the failure is not yours to fix, when the same proof still fails after
|
|
145
156
|
three attempts, or when no evidence of the round trip can be produced. In those cases run
|
|
146
|
-
`npx --yes copilotkit@4.
|
|
157
|
+
`npx --yes copilotkit@4.13.0 onboard read stopped/run-failed`. The stack is supported:
|
|
147
158
|
this run did not finish, which is a different ending and a different report. All three are
|
|
148
159
|
about the round trip itself. A round trip that proved is not one of them, whatever failed
|
|
149
160
|
after it.
|
|
150
161
|
|
|
151
162
|
If you stop here without taking that route -- a repair cycle you cannot finish, a limit in
|
|
152
163
|
your own harness, a run that has run out -- send one short report before you stop. Run the
|
|
153
|
-
friction command without another developer question
|
|
154
|
-
|
|
164
|
+
friction command without another developer question: it applies the telemetry setting the
|
|
165
|
+
developer already set.
|
|
155
166
|
|
|
156
167
|
```text
|
|
157
|
-
npx --yes copilotkit@4.
|
|
168
|
+
npx --yes copilotkit@4.13.0 onboard friction --phase stop --category <slug>
|
|
158
169
|
```
|
|
159
170
|
|
|
160
171
|
Write one or two sentences to standard input: the step you stopped at and what stopped it.
|
|
@@ -14,14 +14,12 @@ notification. Where your own harness hands you the report from the dispatch itse
|
|
|
14
14
|
you already hold the result. Either way there is nothing to poll.
|
|
15
15
|
|
|
16
16
|
After you dispatch, do the work that does not depend on the result -- dispatch the other
|
|
17
|
-
subagent, run the preflight
|
|
18
|
-
says to wait for a subagent to finish, that is what it means.
|
|
17
|
+
subagent, run the preflight the next prompt gives you -- and then stop and wait. Wherever a
|
|
18
|
+
prompt in this graph says to wait for a subagent to finish, that is what it means.
|
|
19
19
|
|
|
20
20
|
Do not sleep to pass the time. Not `sleep`, not `/bin/sleep`, not a timer under another
|
|
21
21
|
name, and not a loop that re-checks whether a result has arrived. Sleeping tells you nothing
|
|
22
|
-
that waiting for the result does not, and it spends wall clock
|
|
23
|
-
this journey is measured on. One recorded run spent most of two hours asleep between
|
|
24
|
-
dispatches that had all returned in seconds.
|
|
22
|
+
that waiting for the result does not, and it spends wall clock.
|
|
25
23
|
|
|
26
24
|
## When a subagent cannot work
|
|
27
25
|
|
|
@@ -36,7 +34,7 @@ Both research subagents failing means this harness has no working subagent at al
|
|
|
36
34
|
is worth recording once:
|
|
37
35
|
|
|
38
36
|
```text
|
|
39
|
-
npx --yes copilotkit@4.
|
|
37
|
+
npx --yes copilotkit@4.13.0 onboard checkpoint --phase delegation-unavailable
|
|
40
38
|
```
|
|
41
39
|
|
|
42
40
|
Then say once, in your own words, that this environment has no working subagents, so you
|
|
@@ -49,7 +47,7 @@ Before you ask the developer any setup question, finish every read-only investig
|
|
|
49
47
|
preflight check in this section.
|
|
50
48
|
|
|
51
49
|
Prepare two research assignments. Give each research subagent one assignment. Tell it to run
|
|
52
|
-
`npx --yes copilotkit@4.
|
|
50
|
+
`npx --yes copilotkit@4.13.0 onboard read subagent/inspect-repository` first and follow the
|
|
53
51
|
prompt it returns. If that read fails because the subagent cannot use the shell, stop that
|
|
54
52
|
subagent. Run the same command yourself, then spawn a fresh subagent with the returned prompt
|
|
55
53
|
and the same handoff. Require only its assigned packet.
|
|
@@ -60,108 +58,20 @@ Start both research subagents in parallel:
|
|
|
60
58
|
2. Spawn a second research subagent. Assign it the environment evidence packet.
|
|
61
59
|
3. Start both research subagents. Then continue.
|
|
62
60
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
Prove whether your coding-agent environment has browser or device control. Do not assume it
|
|
66
|
-
either way, and do not report what you expect to be true: a run that guesses here records a
|
|
67
|
-
capability every later step then trusts. Use a browser or device tool already
|
|
68
|
-
configured for the coding agent you are running as, the same way a later step uses the
|
|
69
|
-
CopilotKit documentation server. With a browser tool, open one inert page such as
|
|
70
|
-
`about:blank` and read its title. With a device tool and no browser, list the booted devices
|
|
71
|
-
in one command: `adb devices -l`. Record the outcome of that attempt: `available` when the
|
|
72
|
-
tool answered, `unavailable` when there was none to call or the page did not open. Use
|
|
73
|
-
the control that matches the selected surface later.
|
|
74
|
-
|
|
75
|
-
Where the browser probe answered, register nothing. The harness came equipped and the run
|
|
76
|
-
owes it no setup.
|
|
77
|
-
|
|
78
|
-
Where no browser tool answered, register one for the coding agent you are running as, then
|
|
79
|
-
run the same probe again and record what the second attempt did. Register this server:
|
|
80
|
-
|
|
81
|
-
```text
|
|
82
|
-
npx --yes @playwright/mcp@latest --browser chrome --isolated --output-dir <project>/.copilotkit/proof/browser
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Replace `<project>` with the absolute path of the target project directory. The server is
|
|
86
|
-
registered against the coding agent rather than against a directory, so a relative path here
|
|
87
|
-
resolves wherever that server happens to start.
|
|
88
|
-
|
|
89
|
-
`--browser chrome` drives the Google Chrome the developer already has, so this downloads no
|
|
90
|
-
browser. `--isolated` keeps the profile in memory, so it never touches their own Chrome
|
|
91
|
-
profile. `--output-dir` is what keeps the snapshots and screenshots out of the developer's
|
|
92
|
-
repository root: without it this server writes them to `.playwright-mcp/` beside their code,
|
|
93
|
-
which a project that never asked for a browser has no reason to carry, and which this setup's
|
|
94
|
-
own evidence rule already has a place for. Register it the way your own harness registers a
|
|
95
|
-
server, which is the mechanism a later step uses for the CopilotKit documentation server.
|
|
96
|
-
|
|
97
|
-
Tell the developer in one line what you registered, that it drives their installed Chrome,
|
|
98
|
-
and that it lives in this coding agent's configuration rather than in their repository. Do
|
|
99
|
-
not ask them to approve it, and do not ask a second question about it.
|
|
100
|
-
|
|
101
|
-
Do not add a browser or device driver to the project. A driver added there is a
|
|
102
|
-
devDependency and a browser download in the diff of a repository that never asked for one,
|
|
103
|
-
which is a different thing from a server registered against the coding agent.
|
|
104
|
-
|
|
105
|
-
Where the second probe still does not answer -- no Chrome to drive, no network, or a
|
|
106
|
-
harness that cannot register a server -- record `unavailable` and carry it. Do not keep
|
|
107
|
-
trying, and do not ask the developer about this tool limit.
|
|
108
|
-
|
|
109
|
-
Registering a server does not boot a device. Where the device probe found none, that is the
|
|
110
|
-
whole finding, and a browser is not a substitute for a device.
|
|
111
|
-
|
|
112
|
-
Wait for both research subagents to finish.
|
|
113
|
-
|
|
114
|
-
## Settle the port
|
|
115
|
-
|
|
116
|
-
The findings name the ports this project declares and the ports already held on this
|
|
117
|
-
machine. Pick one free port for the frontend now, and use that number for the rest of the
|
|
118
|
-
run: in the plan, in the implementation, and in the proof. Record it with the findings you
|
|
119
|
-
hand to every later subagent.
|
|
120
|
-
|
|
121
|
-
Do not let a later step pick again. A run that decides the port three times produces three
|
|
122
|
-
numbers, and `verify` reads none of them: with no recorded URL it assumes port 3000, and
|
|
123
|
-
whatever holds that port answers. An unrelated checkout on this machine then reports as
|
|
124
|
-
this project's proven wiring.
|
|
125
|
-
|
|
126
|
-
Project selection is where the settled port is written down, through `--runtime-url`.
|
|
127
|
-
|
|
128
|
-
Then report that the research came back:
|
|
61
|
+
Report that both subagents started:
|
|
129
62
|
|
|
130
63
|
```text
|
|
131
|
-
npx --yes copilotkit@4.
|
|
64
|
+
npx --yes copilotkit@4.13.0 onboard checkpoint --phase research-dispatched
|
|
132
65
|
```
|
|
133
66
|
|
|
134
67
|
A refused checkpoint prints its reason and leaves onboarding unaffected. It is not a
|
|
135
68
|
failed step.
|
|
136
69
|
|
|
137
|
-
|
|
138
|
-
retry only that packet with its failed items, up to three attempts. For `Status: blocked`,
|
|
139
|
-
or a third failed result, use the stop route at the end of this prompt.
|
|
70
|
+
The research is under way. Continue to the surface-control preflight while it runs:
|
|
140
71
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
not inspect the project to settle the conflict yourself. Use the stop route for a non-pass
|
|
145
|
-
verifier result.
|
|
146
|
-
|
|
147
|
-
A target project directory that holds no project has no app directory to key on, and
|
|
148
|
-
that is a merged result rather than a failed merge. Record that this run has no target app
|
|
149
|
-
directory and no environment row, then take the read below. Do not send a focused directory
|
|
150
|
-
check, and do not use the stop route: neither worker can find a directory a developer has
|
|
151
|
-
not created yet, and the route below is where such a project picks its starter.
|
|
152
|
-
|
|
153
|
-
A directory holding only a Git repository, a coding agent's own configuration, editor
|
|
154
|
-
settings or scratch notes holds no project. `onboard inspect` reports that as
|
|
155
|
-
`appDiscovery.reason` of `no-project`.
|
|
156
|
-
|
|
157
|
-
For a target project that does hold an app, match environment evidence to the target app
|
|
158
|
-
directory from the project packet. Require one target app directory and one matching
|
|
159
|
-
environment row. If either packet gives no match or more than one match, send each research
|
|
160
|
-
worker a focused directory check. Continue only when both workers return the same one target
|
|
161
|
-
app directory. Both results must start with `Status: passed`. Otherwise, use the stop route.
|
|
162
|
-
|
|
163
|
-
When both research results are merged, run
|
|
164
|
-
`npx --yes copilotkit@4.12.0 onboard read research/route`.
|
|
72
|
+
```text
|
|
73
|
+
npx --yes copilotkit@4.13.0 onboard read research/preflight
|
|
74
|
+
```
|
|
165
75
|
|
|
166
76
|
If inspection stops onboarding, run
|
|
167
|
-
`npx --yes copilotkit@4.
|
|
77
|
+
`npx --yes copilotkit@4.13.0 onboard read stopped/run-failed`.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Merge the research and settle the port
|
|
2
|
+
|
|
3
|
+
The surface is settled. This phase collects both research packets, picks the port the rest
|
|
4
|
+
of the run uses, and merges the findings into one answer.
|
|
5
|
+
|
|
6
|
+
Wait for both research subagents to finish.
|
|
7
|
+
|
|
8
|
+
## Settle the port
|
|
9
|
+
|
|
10
|
+
The findings name the ports this project declares and the ports already held on this
|
|
11
|
+
machine. Pick one free port for the frontend now, and use that number for the rest of the
|
|
12
|
+
run: in the plan, in the implementation, and in the proof. Record it with the findings you
|
|
13
|
+
hand to every later subagent.
|
|
14
|
+
|
|
15
|
+
Do not let a later step pick again. A run that decides the port three times produces three
|
|
16
|
+
numbers, and `verify` reads none of them: with no recorded URL it assumes port 3000, and
|
|
17
|
+
whatever holds that port answers.
|
|
18
|
+
|
|
19
|
+
Project selection is where the settled port is written down, through `--runtime-url`.
|
|
20
|
+
|
|
21
|
+
Then report that the research came back:
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
npx --yes copilotkit@4.13.0 onboard checkpoint --phase research-returned
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
A refused checkpoint prints its reason and leaves onboarding unaffected. It is not a
|
|
28
|
+
failed step.
|
|
29
|
+
|
|
30
|
+
Continue only if both research results start with `Status: passed`. For `Status: failed`,
|
|
31
|
+
retry only that packet with its failed items, up to three attempts. For `Status: blocked`,
|
|
32
|
+
or a third failed result, use the stop route at the end of this prompt.
|
|
33
|
+
|
|
34
|
+
Merge both evidence packets by item. On a conflict, spawn one fresh read-only verifier with
|
|
35
|
+
the item, both cited findings, and the research limits. Require its result to start with
|
|
36
|
+
`Status: passed`, `Status: failed`, or `Status: blocked`. Use only a passed cited result. Do
|
|
37
|
+
not inspect the project to settle the conflict yourself. Use the stop route for a non-pass
|
|
38
|
+
verifier result.
|
|
39
|
+
|
|
40
|
+
A target project directory that holds no project has no app directory to key on, and
|
|
41
|
+
that is a merged result rather than a failed merge. Record that this run has no target app
|
|
42
|
+
directory and no environment row, then take the read below. Do not send a focused directory
|
|
43
|
+
check, and do not use the stop route: neither worker can find a directory a developer has
|
|
44
|
+
not created yet, and the route below is where such a project picks its starter.
|
|
45
|
+
|
|
46
|
+
A directory holding only a Git repository, a coding agent's own configuration, editor
|
|
47
|
+
settings or scratch notes holds no project. `onboard inspect` reports that as
|
|
48
|
+
`appDiscovery.reason` of `no-project`.
|
|
49
|
+
|
|
50
|
+
For a target project that does hold an app, match environment evidence to the target app
|
|
51
|
+
directory from the project packet. Require one target app directory and one matching
|
|
52
|
+
environment row. If either packet gives no match or more than one match, send each research
|
|
53
|
+
worker a focused directory check. Continue only when both workers return the same one target
|
|
54
|
+
app directory. Both results must start with `Status: passed`. Otherwise, use the stop route.
|
|
55
|
+
|
|
56
|
+
When both research results are merged, run
|
|
57
|
+
`npx --yes copilotkit@4.13.0 onboard read research/route`.
|
|
58
|
+
|
|
59
|
+
If inspection stops onboarding, run
|
|
60
|
+
`npx --yes copilotkit@4.13.0 onboard read stopped/run-failed`.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Prove what this environment can drive
|
|
2
|
+
|
|
3
|
+
The research subagents are running. This phase settles what your coding agent can drive, so
|
|
4
|
+
every later step reads one recorded answer instead of guessing. Do not change application
|
|
5
|
+
code here, and do not wait for the research packets yet.
|
|
6
|
+
|
|
7
|
+
Prove whether your coding-agent environment has browser or device control. Do not assume it
|
|
8
|
+
either way, and do not report what you expect to be true. Use a browser or device tool already
|
|
9
|
+
configured for the coding agent you are running as, the same way a later step uses the
|
|
10
|
+
CopilotKit documentation server. With a browser tool, open one inert page such as
|
|
11
|
+
`about:blank` and read its title. With a device tool and no browser, list the booted devices
|
|
12
|
+
in one command: `adb devices -l`. Record the outcome of that attempt: `available` when the
|
|
13
|
+
tool answered, `unavailable` when there was none to call or the page did not open. Use
|
|
14
|
+
the control that matches the selected surface later.
|
|
15
|
+
|
|
16
|
+
Where the browser probe answered, register nothing. The harness came equipped.
|
|
17
|
+
|
|
18
|
+
Where no browser tool answered, register one for the coding agent you are running as, then
|
|
19
|
+
run the same probe again and record what the second attempt did.
|
|
20
|
+
|
|
21
|
+
Tell the developer in one line what you are about to register, that it lives in this coding
|
|
22
|
+
agent's configuration rather than in their repository, and that they can remove it again.
|
|
23
|
+
Say that before you run the command. The run does not ask again.
|
|
24
|
+
|
|
25
|
+
Register this server:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
npx --yes @playwright/mcp@latest --browser chrome --isolated --output-dir <project>/.copilotkit/proof/browser
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Replace `<project>` with the absolute path of the target project directory. The server is
|
|
32
|
+
registered against the coding agent rather than against a directory, so a relative path here
|
|
33
|
+
resolves wherever that server happens to start.
|
|
34
|
+
|
|
35
|
+
`--browser chrome` drives an installed Google Chrome. Where this machine has none, use
|
|
36
|
+
`--browser chromium` instead and expect Playwright to download a browser build. Tell the
|
|
37
|
+
developer before that download starts. If the server then reports no build, run
|
|
38
|
+
`npx playwright install chromium`, and if it still cannot find one, run
|
|
39
|
+
`npx @playwright/mcp install-browser chrome-for-testing`. `--isolated` keeps the profile in
|
|
40
|
+
memory, so it never touches their own Chrome profile. `--output-dir` keeps the snapshots and
|
|
41
|
+
screenshots out of the developer's repository root: without it this server writes them to
|
|
42
|
+
`.playwright-mcp/` beside their code, which a project that never asked for a browser has no
|
|
43
|
+
reason to carry. Register it the way your own harness registers a server, which is the
|
|
44
|
+
mechanism a later step uses for the CopilotKit documentation server.
|
|
45
|
+
|
|
46
|
+
Some coding agents, Claude Code among them, load a newly registered MCP server only at the
|
|
47
|
+
next session start. Tell the developer in one line to expect one restart, then restart and
|
|
48
|
+
re-bind with `npx --yes copilotkit@4.13.0 onboard start --run <onboarding_run_id>`. That
|
|
49
|
+
restart is a step here, not an error.
|
|
50
|
+
|
|
51
|
+
Do not add a browser or device driver to the project. A driver added there is a
|
|
52
|
+
devDependency and a browser download in the diff of a repository that never asked for one,
|
|
53
|
+
which is a different thing from a server registered against the coding agent.
|
|
54
|
+
|
|
55
|
+
Where the second probe still does not answer -- no browser to drive, no network, or a
|
|
56
|
+
harness that cannot register a server -- record `unavailable` and carry it. Do not keep
|
|
57
|
+
trying. Say so in one line. Nothing here is for the developer to decide.
|
|
58
|
+
|
|
59
|
+
Registering a server does not boot a device. Where the device probe found none, that is the
|
|
60
|
+
whole finding.
|
|
61
|
+
|
|
62
|
+
Report that the probe settled, whichever way it came out:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
npx --yes copilotkit@4.13.0 onboard checkpoint --phase surface-probed
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Then merge the research:
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
npx --yes copilotkit@4.13.0 onboard read research/merge
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
If inspection stops onboarding, run
|
|
75
|
+
`npx --yes copilotkit@4.13.0 onboard read stopped/run-failed`.
|
|
@@ -9,7 +9,7 @@ sends the run down one path.
|
|
|
9
9
|
Before you route on, run this from the target app directory:
|
|
10
10
|
|
|
11
11
|
```text
|
|
12
|
-
npx --yes copilotkit@4.
|
|
12
|
+
npx --yes copilotkit@4.13.0 onboard protect
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
It reads the working tree itself, records every changed or untracked path with a digest,
|
|
@@ -28,6 +28,30 @@ graph exists to create is never stopped by them.
|
|
|
28
28
|
If the result starts with `Status: blocked`, report the printed reason and use the stop
|
|
29
29
|
route at the end of this prompt.
|
|
30
30
|
|
|
31
|
+
## Route a named Channel before the findings
|
|
32
|
+
|
|
33
|
+
The prompt the developer copied names the docs page it came from. A Slack or Teams docs
|
|
34
|
+
page names the surface this run is for. So does a developer who has already said Slack or
|
|
35
|
+
Microsoft Teams. Either one settles the frontend.
|
|
36
|
+
|
|
37
|
+
Record that docs page and give it to every later node and subagent. The copied prompt is
|
|
38
|
+
the only carrier of the surface the developer wants, and no flag states it.
|
|
39
|
+
|
|
40
|
+
On either, run this before you read the three findings below, and without asking the
|
|
41
|
+
purpose question:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
npx --yes copilotkit@4.13.0 onboard read feature/channels/start
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Name the provider to that node so it does not ask again. A Slack page names Slack. A Teams
|
|
48
|
+
page names Teams.
|
|
49
|
+
|
|
50
|
+
Take this route whatever the three findings prove. An agent, a frontend and a CopilotKit
|
|
51
|
+
integration are a valid start for a Channel, not a reason to convert the application: the
|
|
52
|
+
run keeps that code as it is and wires a managed Channel onto it. Do not send a Channel
|
|
53
|
+
request to the conversion route.
|
|
54
|
+
|
|
31
55
|
## What the merged findings must contain
|
|
32
56
|
|
|
33
57
|
If a repository file exists, each finding must cite it. For an empty project, the subagents
|
|
@@ -72,7 +96,7 @@ settle these three from your own reading of the project. Each one comes from the
|
|
|
72
96
|
packets or it is not proved.
|
|
73
97
|
|
|
74
98
|
If all three are proved, prove the live starting state before any project file changes. Run
|
|
75
|
-
`npx --yes copilotkit@4.
|
|
99
|
+
`npx --yes copilotkit@4.13.0 onboard read proof/oss-baseline`.
|
|
76
100
|
|
|
77
101
|
Route there before you ask the developer anything else. The questions after this prompt
|
|
78
102
|
select a framework and a frontend that the findings already name, so a developer who
|
|
@@ -85,7 +109,7 @@ developer nor the repository findings prove what the project is for, ask one gui
|
|
|
85
109
|
question about the user outcome. This asks what the developer wants to build before you
|
|
86
110
|
select a framework. Give two or three short examples and offer a minimal starter. Record
|
|
87
111
|
the answer and give it to each later subagent. Then run
|
|
88
|
-
`npx --yes copilotkit@4.
|
|
112
|
+
`npx --yes copilotkit@4.13.0 onboard read credentials/plan`.
|
|
89
113
|
|
|
90
114
|
Do not ask that question on the route above. A project carrying all three states its
|
|
91
115
|
purpose in the application it already serves.
|
|
@@ -97,5 +121,5 @@ A purpose question here names a domain before that choice.
|
|
|
97
121
|
Take the same read named above without asking.
|
|
98
122
|
|
|
99
123
|
If authentication or inspection stops onboarding, run
|
|
100
|
-
`npx --yes copilotkit@4.
|
|
124
|
+
`npx --yes copilotkit@4.13.0 onboard read stopped/run-failed`. Neither says anything
|
|
101
125
|
about whether this project's stack is supported, which is not yet known at this point.
|
|
@@ -46,7 +46,7 @@ the derived name.
|
|
|
46
46
|
Only if the developer asks for an existing project, or asks to see the projects they have,
|
|
47
47
|
read the choices:
|
|
48
48
|
|
|
49
|
-
`npx --yes copilotkit@4.
|
|
49
|
+
`npx --yes copilotkit@4.13.0 project list --json`
|
|
50
50
|
|
|
51
51
|
Then ask which one to use. Do not order the projects by creation time. If the developer
|
|
52
52
|
already gave this answer, do not ask again. Do not read a secret value. Do not show or
|
|
@@ -56,7 +56,7 @@ Run the command from the parent directory. Do not inspect another entry in the p
|
|
|
56
56
|
directory. Replace each placeholder with the recorded value. Do not run a placeholder as
|
|
57
57
|
a shell argument.
|
|
58
58
|
|
|
59
|
-
`npx --yes copilotkit@4.
|
|
59
|
+
`npx --yes copilotkit@4.13.0 init --name <project-name> --framework <framework-id> --channel none --no-banner --create <name> --install`
|
|
60
60
|
|
|
61
61
|
Pass the confirmed name to both `--name` and `--create`: the app directory and its
|
|
62
62
|
Intelligence project take the same name here. If the developer names an existing project,
|
|
@@ -72,7 +72,7 @@ account. The command does not need terminal input.
|
|
|
72
72
|
Report the clone before you inspect anything:
|
|
73
73
|
|
|
74
74
|
```text
|
|
75
|
-
npx --yes copilotkit@4.
|
|
75
|
+
npx --yes copilotkit@4.13.0 onboard checkpoint --phase starter-cloned
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
This is its own step, not an aside. A run that clones and then goes quiet is
|
|
@@ -82,10 +82,10 @@ separates them.
|
|
|
82
82
|
Do not rebuild the starter by hand. Then inspect only the generated
|
|
83
83
|
paths inside the target directory. Record the files, install result, project connection,
|
|
84
84
|
and validation commands. Then run
|
|
85
|
-
`npx --yes copilotkit@4.
|
|
85
|
+
`npx --yes copilotkit@4.13.0 onboard read proof/round-trip`.
|
|
86
86
|
|
|
87
87
|
If the command fails, report its exact error and do not claim that the starter is ready.
|
|
88
88
|
Then run
|
|
89
|
-
`npx --yes copilotkit@4.
|
|
89
|
+
`npx --yes copilotkit@4.13.0 onboard read stopped/run-failed`. The starter is one this
|
|
90
90
|
graph ships and the stack was chosen from its own supported list, so a command that
|
|
91
91
|
returned an error is a run that broke, not a setup this release does not support.
|
|
@@ -35,7 +35,7 @@ put to them, stop here and send the report below.
|
|
|
35
35
|
If they approve it, make that one fix and nothing else. Then come back into this run:
|
|
36
36
|
|
|
37
37
|
```text
|
|
38
|
-
npx --yes copilotkit@4.
|
|
38
|
+
npx --yes copilotkit@4.13.0 onboard resume
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
Write the developer's approval to standard input, in one or two sentences: the fix they
|
|
@@ -58,7 +58,7 @@ Send one short report. Run the friction command without another developer questi
|
|
|
58
58
|
ask the developer about telemetry: the command applies the setting they already have.
|
|
59
59
|
|
|
60
60
|
```text
|
|
61
|
-
npx --yes copilotkit@4.
|
|
61
|
+
npx --yes copilotkit@4.13.0 onboard friction --phase stop --category <slug>
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
Write one or two sentences to standard input: the step you stopped at and what stopped
|
|
@@ -15,6 +15,23 @@ URLs you were given, not from another checkout on this machine.
|
|
|
15
15
|
List the required credential variable names. Do not read or return credential values.
|
|
16
16
|
Preserve each agent or frontend that already exists.
|
|
17
17
|
|
|
18
|
+
## What the existing agent's behavior is
|
|
19
|
+
|
|
20
|
+
The existing agent's behavior is four things: its system prompt and instructions, its
|
|
21
|
+
tools and what those tools do, its model and provider configuration, and its memory or
|
|
22
|
+
state handling.
|
|
23
|
+
|
|
24
|
+
Wiring is not behavior. The CopilotKit SDK dependency, the middleware the agent is wrapped
|
|
25
|
+
in, the runtime mount, the AG-UI connection, and a frontend that renders what the agent
|
|
26
|
+
already returns are wiring. Plan them as ordinary steps.
|
|
27
|
+
|
|
28
|
+
Every item on the behavior list is a change the developer has to approve. Where a step
|
|
29
|
+
needs one, plan it as its own item, name the file and the exact change, and state that it
|
|
30
|
+
changes how the agent answers everywhere, not only in CopilotKit. A system prompt the
|
|
31
|
+
developer wrote is the agent's behavior rather than a setting this run tunes until a
|
|
32
|
+
component renders. Where the plan cannot be written without such a change and you cannot
|
|
33
|
+
state it that way, return `Status: blocked`.
|
|
34
|
+
|
|
18
35
|
Plan the runtime to consume the Intelligence credential. The runtime takes an
|
|
19
36
|
`intelligence` option holding a client built from the project key. A runtime given a
|
|
20
37
|
`runner` option instead is the OSS runtime. It never reads the Intelligence key, and the
|
|
@@ -153,7 +170,7 @@ here is work the developer did not ask for.
|
|
|
153
170
|
Plan the threads drawer itself: add it from the selected drawer page, where this frontend
|
|
154
171
|
does not already render one. Where this journey's frontend framework ships no threads
|
|
155
172
|
drawer -- React Native --, plan that the thread is proved by
|
|
156
|
-
`npx --yes copilotkit@4.
|
|
173
|
+
`npx --yes copilotkit@4.13.0 verify --round-trip`, which needs no browser. Do not plan a
|
|
157
174
|
step that opens the managed Intelligence dashboard.
|
|
158
175
|
|
|
159
176
|
## Order the plan into steps
|
|
@@ -13,6 +13,13 @@ Change only the files and directories the approved plan names as changeable. If
|
|
|
13
13
|
requires a file the plan does not name, stop and return the blocker. Do not run a
|
|
14
14
|
repository-wide formatter.
|
|
15
15
|
|
|
16
|
+
All implementation work happens in the run root's own working tree: the target app
|
|
17
|
+
directory the main coding agent named. Never work in a separate worktree, a branch
|
|
18
|
+
checkout, or a copy of the project. If any of your changes are already somewhere else,
|
|
19
|
+
bring them into the run root before you report, and name them under Files changed. The
|
|
20
|
+
completion step verifies that the changed files exist in this project, so work left in
|
|
21
|
+
another tree ends the run with nothing in the developer's hands.
|
|
22
|
+
|
|
16
23
|
Before validation, read the protected path list. Inspect the current changed and untracked
|
|
17
24
|
paths. Keep protected paths out of the run path set. Compare every changed path with the
|
|
18
25
|
paths the plan named. Here, a changed path means one in the run path set. If a changed path
|
|
@@ -26,6 +33,12 @@ Add only the props, options, and imports that appear in the fetched documentatio
|
|
|
26
33
|
remembered API from an earlier CopilotKit version will fail type checking against this
|
|
27
34
|
release. Do not add details that the fetched documentation omits.
|
|
28
35
|
|
|
36
|
+
A symbol the installed package marks `@deprecated` in its type definitions is not a valid
|
|
37
|
+
choice, whatever documentation found elsewhere shows. Read the installed type definitions
|
|
38
|
+
for the symbol you are about to write. Where the selected documentation page itself shows
|
|
39
|
+
a deprecated symbol, name that page under Blockers as `docs-wrong` friction and use the
|
|
40
|
+
current symbol the package's own type definitions or changelog names.
|
|
41
|
+
|
|
29
42
|
The documentation supplies the wiring. The project supplies the application. Use that
|
|
30
43
|
wiring in the project's domain. Do not copy an example's agent name, tools, or data.
|
|
31
44
|
|
|
@@ -34,6 +47,23 @@ connection. Do not read, show, store, or return secrets. Do not read a file outs
|
|
|
34
47
|
project directory: not for a credential, and not for an API question the fetched
|
|
35
48
|
documentation answers. Ask the main coding agent for a missing credential.
|
|
36
49
|
|
|
50
|
+
## What the existing agent's behavior is
|
|
51
|
+
|
|
52
|
+
The existing agent's behavior is four things: its system prompt and instructions, its
|
|
53
|
+
tools and what those tools do, its model and provider configuration, and its memory or
|
|
54
|
+
state handling. Write none of them unless the approved plan named that exact change as its
|
|
55
|
+
own item.
|
|
56
|
+
|
|
57
|
+
Wiring is not behavior. Add the CopilotKit SDK dependency, wrap the agent in the
|
|
58
|
+
middleware, mount the runtime, connect AG-UI, and render what the agent already returns.
|
|
59
|
+
Those are the parts this run adds.
|
|
60
|
+
|
|
61
|
+
A change on the behavior list changes how the agent answers everywhere, not only in
|
|
62
|
+
CopilotKit, so the developer approves it before it is written. Where a step cannot be
|
|
63
|
+
built without one the plan did not name, return `Status: blocked` and name the file, the
|
|
64
|
+
change, and the check that asked for it. Do not edit the agent's prompt to make a
|
|
65
|
+
component render.
|
|
66
|
+
|
|
37
67
|
An existing `README.md` is the developer's, not this run's. Leave it exactly as you found
|
|
38
68
|
it: not the title, not a section, not a line. Where this run has documentation to write,
|
|
39
69
|
write it to a new file and name that file when you report the result. On an empty project
|
|
@@ -7,7 +7,7 @@ Work only on the packet you were assigned. Inspect the repository without changi
|
|
|
7
7
|
Run this first, from the target project directory:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
npx --yes copilotkit@4.
|
|
10
|
+
npx --yes copilotkit@4.13.0 onboard inspect --json
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
It answers the deterministic half of both packets exactly, from the same code
|