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
|
@@ -47,7 +47,7 @@ Record the selected framework, vendor, model, required credential variable names
|
|
|
47
47
|
these URLs.
|
|
48
48
|
|
|
49
49
|
If the pages support the selection, run
|
|
50
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
50
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read frontend/plan`.
|
|
51
51
|
|
|
52
52
|
If the documentation does not support the selection, run
|
|
53
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
53
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -36,7 +36,7 @@ Record the selected framework, provider, model, required credential variable nam
|
|
|
36
36
|
these URLs.
|
|
37
37
|
|
|
38
38
|
If the pages support the selection, run
|
|
39
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
39
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read frontend/plan`.
|
|
40
40
|
|
|
41
41
|
If the documentation does not support the selection, run
|
|
42
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
42
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -44,7 +44,7 @@ Record the selected framework, provider, model, required credential variable nam
|
|
|
44
44
|
URLs, and the quickstart gap.
|
|
45
45
|
|
|
46
46
|
If the pages support the selection, run
|
|
47
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
47
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read frontend/plan`.
|
|
48
48
|
|
|
49
49
|
If the documentation does not support the selection, run
|
|
50
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
50
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -4,10 +4,10 @@ Preserve an existing Microsoft Agent Framework model setup. Start with OpenAI fo
|
|
|
4
4
|
agent. Offer another vendor only after an exact CopilotKit Markdown page names it. The
|
|
5
5
|
page must name its credential variables and setup steps.
|
|
6
6
|
|
|
7
|
-
Name the model credential `OPENAI_API_KEY`, in `agent/.env
|
|
8
|
-
Azure OpenAI, through `AZURE_OPENAI_ENDPOINT` and
|
|
9
|
-
|
|
10
|
-
looks finished and reads no key.
|
|
7
|
+
Name the model credential `OPENAI_API_KEY`, in `agent/.env`, for a new agent. This
|
|
8
|
+
framework also accepts Azure OpenAI, through `AZURE_OPENAI_ENDPOINT` and
|
|
9
|
+
`AZURE_OPENAI_CHAT_DEPLOYMENT_NAME`. Keep Azure OpenAI only when the project already uses
|
|
10
|
+
it. A scaffold that writes one spelling and reads the other looks finished and reads no key.
|
|
11
11
|
|
|
12
12
|
This framework reads no `.env` on its own. Whatever loads the file is application code,
|
|
13
13
|
so a scaffold that writes `agent/.env` and never loads it starts with no credential.
|
|
@@ -30,7 +30,7 @@ Record the selected framework, vendor, model, required credential variable names
|
|
|
30
30
|
these URLs.
|
|
31
31
|
|
|
32
32
|
If the pages support the selection, run
|
|
33
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
33
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read frontend/plan`.
|
|
34
34
|
|
|
35
35
|
If the documentation does not support the selection, run
|
|
36
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
36
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -43,7 +43,7 @@ Record the selected framework, vendor, model, required credential variable names
|
|
|
43
43
|
URLs, and the two-step context route.
|
|
44
44
|
|
|
45
45
|
If the pages support the selection, run
|
|
46
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
46
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read frontend/plan`.
|
|
47
47
|
|
|
48
48
|
If the documentation does not support the selection, run
|
|
49
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
49
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -20,8 +20,8 @@ A2UI tool makes its own OpenAI call, so it bills a second model call this plan d
|
|
|
20
20
|
account for.
|
|
21
21
|
|
|
22
22
|
No Strands agent-app-context Markdown page is available. Do not invent an
|
|
23
|
-
agent-app-context setup. If the requested work
|
|
24
|
-
|
|
23
|
+
agent-app-context setup. If the requested work passes project data to the agent, run the unsupported
|
|
24
|
+
route below. Otherwise, record the gap and continue.
|
|
25
25
|
|
|
26
26
|
Connect the Copilot Runtime with `HttpAgent` from `@ag-ui/client`.
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ Record the selected framework, vendor, model, required credential variable names
|
|
|
29
29
|
URLs, and the context documentation gap.
|
|
30
30
|
|
|
31
31
|
If the pages support the selection, run
|
|
32
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
32
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read frontend/plan`.
|
|
33
33
|
|
|
34
34
|
If the documentation does not support the selection, run
|
|
35
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
35
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -18,8 +18,8 @@ these pages. Install `@modelcontextprotocol/sdk` as a runtime dependency.
|
|
|
18
18
|
`@strands-agents/sdk` loads it even when the application does not use MCP.
|
|
19
19
|
|
|
20
20
|
No Strands TypeScript agent-app-context Markdown page is available. Do not translate
|
|
21
|
-
another language's backend example or invent that setup. If the requested work
|
|
22
|
-
run the unsupported route below.
|
|
21
|
+
another language's backend example or invent that setup. If the requested work passes project data
|
|
22
|
+
to the agent, run the unsupported route below. Otherwise, record the gap and continue.
|
|
23
23
|
|
|
24
24
|
A2UI is not on this path. If the developer asks for it, say first that its page has no
|
|
25
25
|
Strands TypeScript backend example, so a TypeScript project has nothing to follow.
|
|
@@ -30,7 +30,7 @@ Record the selected framework, vendor, model, required credential variable names
|
|
|
30
30
|
URLs, and the context documentation gap.
|
|
31
31
|
|
|
32
32
|
If the pages support the selection, run
|
|
33
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
33
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read frontend/plan`.
|
|
34
34
|
|
|
35
35
|
If the documentation does not support the selection, run
|
|
36
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
36
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -5,7 +5,7 @@ Preserve an existing Angular frontend. Use the selected page for a new frontend.
|
|
|
5
5
|
Use the starter shortcut only if all these facts are true: the target directory holds no
|
|
6
6
|
project, its name is a valid `init` project name, and the selected framework is ADK.
|
|
7
7
|
If all three facts are true, record Angular as the selected frontend. Then run
|
|
8
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
8
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read starter/clone` before you fetch documentation.
|
|
9
9
|
|
|
10
10
|
## Documentation
|
|
11
11
|
|
|
@@ -63,7 +63,7 @@ you create or build an Angular project. If the installed version is lower, selec
|
|
|
63
63
|
supported version first and use it for every later command in this project.
|
|
64
64
|
|
|
65
65
|
If the pages support the selection, record Angular and these URLs. Then run
|
|
66
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
66
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read credentials/finalize-plan`.
|
|
67
67
|
|
|
68
68
|
If the documentation does not support the selection, or the two version lines do not fit
|
|
69
|
-
together, run `npx --prefer-offline --yes copilotkit@4.
|
|
69
|
+
together, run `npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -15,7 +15,7 @@ These TypeScript options have starters: Claude Agent SDK TypeScript, LangGraph T
|
|
|
15
15
|
Mastra, and Strands Agents TypeScript. The .NET option is Microsoft Agent Framework .NET.
|
|
16
16
|
|
|
17
17
|
If all shortcut conditions are true, record Next.js as the selected frontend. Then run
|
|
18
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
18
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read starter/clone` before you fetch documentation.
|
|
19
19
|
|
|
20
20
|
## Documentation
|
|
21
21
|
|
|
@@ -26,8 +26,21 @@ agent framework documentation instead. This page configures the CopilotKit built
|
|
|
26
26
|
agent as the default agent, which is correct only for a project that has no agent.
|
|
27
27
|
Do not replace the developer's existing agent with the built-in agent.
|
|
28
28
|
|
|
29
|
+
## Files that `next dev` writes
|
|
30
|
+
|
|
31
|
+
If a coding agent starts `next dev` on Next.js 16.3 or later, Next.js writes `AGENTS.md`
|
|
32
|
+
and `CLAUDE.md` in the app directory. If one of the files exists, Next.js adds its own
|
|
33
|
+
block to that file. These files are Next.js output. They are not your work and not the
|
|
34
|
+
developer's work.
|
|
35
|
+
|
|
36
|
+
- For a new frontend that you create, pass `--no-agents-md` to `create-next-app`. If
|
|
37
|
+
the installed Next.js is 16.3 or later, also set `agentRules: false` in
|
|
38
|
+
`next.config.ts`.
|
|
39
|
+
- For an existing frontend, do not change `next.config.ts` for this.
|
|
40
|
+
- Do not claim, revert, or delete these files. Name them in the report as Next.js output.
|
|
41
|
+
|
|
29
42
|
If the page supports the selection, record Next.js and this URL. Then run
|
|
30
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
43
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read credentials/finalize-plan`.
|
|
31
44
|
|
|
32
45
|
If the documentation does not support the selection, run
|
|
33
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
46
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -28,7 +28,8 @@ needs a frontend, show the valid choices and one recommendation based on reposit
|
|
|
28
28
|
evidence, then ask the developer to choose.
|
|
29
29
|
|
|
30
30
|
The valid choices are React SPA, Next.js, Angular, Vue 3, React Native, Slack, and
|
|
31
|
-
Microsoft Teams. They are valid in every starting state.
|
|
31
|
+
Microsoft Teams. They are valid in every starting state. Route names are this graph's own
|
|
32
|
+
bookkeeping. Say what the run is doing in the developer's words instead.
|
|
32
33
|
|
|
33
34
|
Recommend the frontend the project already uses. Where there is no existing frontend,
|
|
34
35
|
include Slack and Microsoft Teams in the frontend question. They are chat UIs, not
|
|
@@ -36,15 +37,15 @@ CopilotKit web apps. Then recommend the one the developer names, and say what ea
|
|
|
36
37
|
|
|
37
38
|
Use exactly one matching internal route:
|
|
38
39
|
|
|
39
|
-
1. React SPA: `npx --prefer-offline --yes copilotkit@4.
|
|
40
|
-
2. Next.js: `npx --prefer-offline --yes copilotkit@4.
|
|
41
|
-
3. Angular: `npx --prefer-offline --yes copilotkit@4.
|
|
42
|
-
4. Vue 3: `npx --prefer-offline --yes copilotkit@4.
|
|
43
|
-
5. React Native: `npx --prefer-offline --yes copilotkit@4.
|
|
44
|
-
6. Slack or Microsoft Teams: `npx --prefer-offline --yes copilotkit@4.
|
|
40
|
+
1. React SPA: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read frontend/react-spa`
|
|
41
|
+
2. Next.js: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read frontend/nextjs`
|
|
42
|
+
3. Angular: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read frontend/angular`
|
|
43
|
+
4. Vue 3: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read frontend/vue`
|
|
44
|
+
5. React Native: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read frontend/react-native`
|
|
45
|
+
6. Slack or Microsoft Teams: `npx --prefer-offline --yes copilotkit@4.18.0 onboard read feature/channels/start`
|
|
45
46
|
|
|
46
47
|
If they chose Slack or Microsoft Teams, tell that node which one they chose so it
|
|
47
48
|
does not ask again.
|
|
48
49
|
|
|
49
50
|
If no listed frontend fits, run
|
|
50
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
51
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -18,7 +18,7 @@ documents `useRenderTool`, which is React Native's own hook for drawing a tool t
|
|
|
18
18
|
already has. That is a different job and needs a tool in the agent.
|
|
19
19
|
|
|
20
20
|
If the pages support the selection, record React Native and these URLs. Then run
|
|
21
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
21
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read credentials/finalize-plan`.
|
|
22
22
|
|
|
23
23
|
If the documentation does not support the selection, run
|
|
24
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
24
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -14,7 +14,7 @@ not move the agent into it.
|
|
|
14
14
|
- https://docs.copilotkit.ai/react-spa.md
|
|
15
15
|
|
|
16
16
|
If the page supports the selection, record React SPA and this URL. Then run
|
|
17
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
17
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read credentials/finalize-plan`.
|
|
18
18
|
|
|
19
19
|
If the documentation does not support the selection, run
|
|
20
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
20
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -19,7 +19,7 @@ page above. Vue has its own `useComponent`, which is not the React package. Take
|
|
|
19
19
|
that reference page rather than from a Vue generative-UI guide, which is not published.
|
|
20
20
|
|
|
21
21
|
If the pages support the selection, record Vue 3 and these URLs. Then run
|
|
22
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
22
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read credentials/finalize-plan`.
|
|
23
23
|
|
|
24
24
|
If the documentation does not support the selection, run
|
|
25
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
25
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -4,15 +4,15 @@ Do not implement the plan yourself. Use the step order in the approved plan.
|
|
|
4
4
|
|
|
5
5
|
## If you stop in this phase
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
than the container already existing
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
Two rules below stop onboarding: a Learning Container create that fails for a reason other
|
|
8
|
+
than the container already existing, and a `--accept-credential` refusal that names a lost
|
|
9
|
+
variable. Each one ends a run the developer has already approved a plan for. Name the exact
|
|
10
|
+
command, id, and error code that stopped you: a report that names only the step cannot be
|
|
11
|
+
acted on. Send one short report before you stop. The friction command follows the telemetry
|
|
12
|
+
setting the developer already chose, so it needs no separate question.
|
|
13
13
|
|
|
14
14
|
```text
|
|
15
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
15
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard friction --phase stop --category <slug> --message "<sentences>"
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
`--message` takes one or two sentences: the step you stopped at and what stopped it.
|
|
@@ -36,6 +36,19 @@ plan said, what you did instead, and why. Carry that record into the closing sum
|
|
|
36
36
|
which has an item for it. Do not stop for a departure that is the right call, and do not
|
|
37
37
|
leave it unrecorded either.
|
|
38
38
|
|
|
39
|
+
The implementation subagent marks its own departures in its Files changed section: a file
|
|
40
|
+
that has the same role as a planned file at a different path, and the documentation file
|
|
41
|
+
it writes. Carry each one into that record.
|
|
42
|
+
|
|
43
|
+
Any other file the plan does not name comes back as a result that starts with
|
|
44
|
+
`Status: blocked` and names the file under Blockers. That result is a question for the
|
|
45
|
+
developer, not a run that broke. Where that file is a protected path, the protected-path
|
|
46
|
+
rules in the audit section below apply instead. Otherwise, pause: name the file and why the
|
|
47
|
+
work needs it, then end your turn and wait for the developer's answer. If they allow it,
|
|
48
|
+
spawn a fresh implementation subagent with the same handoff. Add that file to the handoff
|
|
49
|
+
as a path the developer approved, and record it as a departure. If you cannot ask, or the
|
|
50
|
+
developer declines, the failure ending in the route-out rules below applies.
|
|
51
|
+
|
|
39
52
|
The existing agent's behavior is never a departure to record and carry on from. It is four
|
|
40
53
|
things: its system prompt and instructions, its tools and what those tools do, its model
|
|
41
54
|
and provider configuration, and its memory or state handling. Repair a failing check on
|
|
@@ -54,13 +67,24 @@ Approving the plan is the developer agreeing to every path it listed under
|
|
|
54
67
|
app directory:
|
|
55
68
|
|
|
56
69
|
```text
|
|
57
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
70
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --path <path> --reason "<the plan's sentence>"
|
|
58
71
|
```
|
|
59
72
|
|
|
60
73
|
Consent has to be on the record before the file moves, so a call made after the change is
|
|
61
74
|
refused. Continue only if every result starts with `Status: passed`. If the plan listed
|
|
62
75
|
nothing there, skip this section.
|
|
63
76
|
|
|
77
|
+
The implementation subagent cannot change a protected path unless it has the authorized
|
|
78
|
+
list. Take that list from the CLI rather than from the plan: run `onboard audit` after the
|
|
79
|
+
last authorization, and copy the paths under `Authorized to modify:`. An audit that passes
|
|
80
|
+
or fails prints that block whenever an authorization exists, so a passed or failed audit
|
|
81
|
+
with no such block means nothing is authorized. A blocked audit prints no block at all:
|
|
82
|
+
if this audit starts with `Status: blocked`, the CLI cannot supply the list, so report the
|
|
83
|
+
printed reason and use the route-out rules below. A failed audit here is the one exception
|
|
84
|
+
to the rule that an audit that has not passed never continues the run: read only its
|
|
85
|
+
`Authorized to modify:` block now, and decide its findings with the audit rules below,
|
|
86
|
+
after implementation.
|
|
87
|
+
|
|
64
88
|
What you record here covers changing the file. It does not cover removing it. Never delete,
|
|
65
89
|
move, or rename a protected path, whatever the plan says: the audit fails a path that is
|
|
66
90
|
gone even when consent was recorded for it, and no command clears that. If a step cannot
|
|
@@ -71,7 +95,7 @@ No implementation step has run yet, so the change is theirs rather than this run
|
|
|
71
95
|
consent over it by adding one flag:
|
|
72
96
|
|
|
73
97
|
```text
|
|
74
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
98
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --path <path> --reason "<the plan's sentence>" --with-prior-change
|
|
75
99
|
```
|
|
76
100
|
|
|
77
101
|
The flag records their change as drift beside the consent, so the closing report names both
|
|
@@ -81,16 +105,17 @@ the route-out rules apply.
|
|
|
81
105
|
|
|
82
106
|
This section is the only place the plan's own authorizations are recorded. Once this run
|
|
83
107
|
reports its plan, the CLI refuses `--authorize` for every path the plan did not name. The
|
|
84
|
-
developer approved a plan, not a permission to reach further, so there is no consent
|
|
85
|
-
record for a path that comes up later. If you find such a path mid-run,
|
|
86
|
-
|
|
108
|
+
developer approved a plan, not a permission to reach further, so there is no plan consent
|
|
109
|
+
to record for a path that comes up later. If you find such a path mid-run, ask the
|
|
110
|
+
developer and record their answer with `--authorize --unplanned`, as the protected-path
|
|
111
|
+
audit below describes, rather than use this section.
|
|
87
112
|
|
|
88
113
|
## Protected-path audit
|
|
89
114
|
|
|
90
115
|
Run the audit from the target app directory:
|
|
91
116
|
|
|
92
117
|
```text
|
|
93
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
118
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard audit
|
|
94
119
|
```
|
|
95
120
|
|
|
96
121
|
It compares every protected path with the digest the CLI captured for it. Its result starts
|
|
@@ -125,14 +150,14 @@ A path that no Files changed section names changed outside the run, and it is th
|
|
|
125
150
|
developer's own file. Accept it by name:
|
|
126
151
|
|
|
127
152
|
```text
|
|
128
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
153
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --accept-external --path <path>
|
|
129
154
|
```
|
|
130
155
|
|
|
131
156
|
A changed env file is its own case. This run asked the developer to place a credential
|
|
132
157
|
there, so it takes the credential route rather than this one:
|
|
133
158
|
|
|
134
159
|
```text
|
|
135
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
160
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --accept-credential --path <path>
|
|
136
161
|
```
|
|
137
162
|
|
|
138
163
|
That route proves no recorded credential was lost, instead of taking the run's word that it
|
|
@@ -151,19 +176,25 @@ neither does a one-line fix. Never repair, reset, or revert it. Ask the develope
|
|
|
151
176
|
the change, and record the answer they give:
|
|
152
177
|
|
|
153
178
|
```text
|
|
154
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
179
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard protect --authorize --unplanned --path <path> --reason "<what the developer said>"
|
|
155
180
|
```
|
|
156
181
|
|
|
157
182
|
Use it only for an answer a developer actually gave. It records the consent as taken
|
|
158
183
|
outside the approved plan, and every later audit and the closing report say so, which is
|
|
159
184
|
what tells the developer they were asked mid-run. If you cannot ask, route out.
|
|
160
185
|
|
|
186
|
+
Then run the audit again, take the authorized list from its `Authorized to modify:` block,
|
|
187
|
+
and spawn a fresh implementation subagent with the same handoff and that list. If that
|
|
188
|
+
audit starts with `Status: blocked`, use the route-out rules instead. A subagent
|
|
189
|
+
that already returned cannot pick up consent recorded after it was spawned.
|
|
190
|
+
|
|
161
191
|
`Status: blocked` means the audit has no baseline to read. A blocked audit compared
|
|
162
192
|
nothing and proved nothing changed. It is not a preservation failure: do not report a
|
|
163
193
|
protected path as changed. Report the printed reason and use the route-out rules.
|
|
164
194
|
|
|
165
|
-
An audit that has not passed never continues the run by itself.
|
|
166
|
-
|
|
195
|
+
An audit that has not passed never continues the run by itself. The failed audit before
|
|
196
|
+
implementation that supplies the authorized list is the one exception. Continue only after
|
|
197
|
+
an acceptance clears it, or route out. Do not send an audit result to a repair worker.
|
|
167
198
|
|
|
168
199
|
## Create the approved Learning Container
|
|
169
200
|
|
|
@@ -172,7 +203,7 @@ create it now, from the target app directory. The developer approved the id befo
|
|
|
172
203
|
made, so this is the first point at which it can be created:
|
|
173
204
|
|
|
174
205
|
```text
|
|
175
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
206
|
+
npx --prefer-offline --yes copilotkit@4.18.0 learning containers create --id <id> --name <name> --json
|
|
176
207
|
```
|
|
177
208
|
|
|
178
209
|
Pass the id the plan names. Take the name from the selected project's own display name, so
|
|
@@ -188,26 +219,29 @@ hold.
|
|
|
188
219
|
Then report that the container is settled, before any edit:
|
|
189
220
|
|
|
190
221
|
```text
|
|
191
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
222
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase container-settled
|
|
192
223
|
```
|
|
193
224
|
|
|
194
225
|
Where the plan names a container the platform already held, report the same checkpoint and
|
|
195
226
|
create nothing. Where the plan names no container, skip this section.
|
|
196
227
|
|
|
228
|
+
## Implement the plan
|
|
229
|
+
|
|
197
230
|
Report the plan this run is about to implement:
|
|
198
231
|
|
|
199
232
|
```text
|
|
200
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
233
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase plan-written
|
|
201
234
|
```
|
|
202
235
|
|
|
203
236
|
Spawn one implementation subagent. Tell it to run
|
|
204
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
237
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read subagent/implement-and-validate` first and follow
|
|
205
238
|
the prompt it returns. If that read fails because the subagent cannot use the shell, stop that
|
|
206
239
|
subagent. Run the same command yourself, then spawn a fresh subagent with the returned prompt
|
|
207
240
|
and the same handoff. Give it the plan, selected framework, frontend, model, exact target app
|
|
208
241
|
directory, selected documentation URLs, and the
|
|
209
242
|
documentation policy recorded during framework selection or conversion planning. On a
|
|
210
|
-
conversion, also give it the frozen criterion. Give it the protected path list
|
|
243
|
+
conversion, also give it the frozen criterion. Give it the protected path list and the
|
|
244
|
+
authorized list. Require it
|
|
211
245
|
to implement every step in plan order and run the full validation list. Wait for it.
|
|
212
246
|
|
|
213
247
|
One subagent implements the whole plan. Do not divide the work across concurrent subagents,
|
|
@@ -229,11 +263,11 @@ returned. Continue to proof only when that audit passes.
|
|
|
229
263
|
After the selected implementation path passes, report it:
|
|
230
264
|
|
|
231
265
|
```text
|
|
232
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
266
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard checkpoint --phase build-validated
|
|
233
267
|
```
|
|
234
268
|
|
|
235
269
|
Then run
|
|
236
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
270
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read proof/round-trip`.
|
|
237
271
|
|
|
238
272
|
## Repair rules
|
|
239
273
|
|
|
@@ -250,14 +284,18 @@ implementation path.
|
|
|
250
284
|
Route out only when the failure is not yours to fix. Two endings are open from here, and
|
|
251
285
|
what failed decides which one this run takes.
|
|
252
286
|
|
|
287
|
+
A fix that requires changing the developer's existing agent or frontend always takes the
|
|
288
|
+
unsupported ending below, whatever else it matches.
|
|
289
|
+
|
|
253
290
|
A run that broke takes the failure ending: the failure is in code this run did not write,
|
|
254
|
-
the same command still fails after three repair attempts,
|
|
255
|
-
`Status: blocked
|
|
256
|
-
not
|
|
291
|
+
the same command still fails after three repair attempts, a result starts with
|
|
292
|
+
`Status: blocked` for a reason other than a file the plan does not name, or the developer
|
|
293
|
+
declined a file the plan does not name, or the run cannot ask them about it. A defect in a
|
|
294
|
+
package this run installed is not a stack CopilotKit does not serve, a command this run cannot get to pass is not one either, and a blocked audit
|
|
257
295
|
proved nothing about the stack. In those cases run
|
|
258
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
296
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read stopped/run-failed`.
|
|
259
297
|
|
|
260
298
|
A plan with no path to follow takes the unsupported ending: the fix requires changing the
|
|
261
299
|
developer's existing agent or frontend, or the documentation does not support the plan. In
|
|
262
300
|
those cases run
|
|
263
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
301
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 onboard read unsupported/no-validated-path`.
|
|
@@ -12,7 +12,8 @@ the agent, not the surface, and the developer needs to know which they have.
|
|
|
12
12
|
|
|
13
13
|
**Whether this run is complete is decided by the command at the end of this prompt, not
|
|
14
14
|
here.** Run it before you write the summary, and let its output decide which summary you
|
|
15
|
-
write. A run whose surface was never driven is blocked, not complete
|
|
15
|
+
write. A run whose surface was never driven is blocked, not complete, unless it cloned a
|
|
16
|
+
starter and records `skipped-cloned-starter`. For a blocked run, say so in the first
|
|
16
17
|
line, name the evidence the command lists as missing, and do not describe the run as
|
|
17
18
|
finished, working, or ready. Everything else below applies to either outcome.
|
|
18
19
|
|
|
@@ -84,7 +85,7 @@ Name the debugging surface this journey's frontend can reach, rather than the on
|
|
|
84
85
|
of the documentation leads with. For a web frontend it is the CopilotKit Inspector. For
|
|
85
86
|
React Native there is no Inspector: it is a browser overlay built on a DOM custom element,
|
|
86
87
|
and `@copilotkit/react-native` does not ship it. Give a mobile developer
|
|
87
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
88
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 verify --round-trip`, the runtime's own log, the AG-UI
|
|
88
89
|
Event Inspector in the CopilotKit VS Code extension, and the CopilotKit Intelligence
|
|
89
90
|
thread view
|
|
90
91
|
instead. Naming the Inspector to a developer who cannot open it costs them the time it
|
|
@@ -107,14 +108,19 @@ Where the Learning step was skipped because this organization cannot use Learnin
|
|
|
107
108
|
one line and name what was not created. A skip nobody names reads as a container that
|
|
108
109
|
exists, and the developer then waits for insights from a container this run never made.
|
|
109
110
|
|
|
110
|
-
State that the servers remain running after proof
|
|
111
|
+
State that the servers remain running after proof, unless the command at the end of this
|
|
112
|
+
prompt prints `environment_kind: container` or `environment_kind: sandbox`. That run is on
|
|
113
|
+
an isolated host, such as a Docker container or a cloud agent session, which is not a
|
|
114
|
+
Learning Container. The servers end when that host ends, and a `localhost` URL opens on the
|
|
115
|
+
developer's machine only through a forwarded port. Write the items that output lists in
|
|
116
|
+
place of this sentence.
|
|
111
117
|
|
|
112
|
-
Report each thing that slowed this run down. Send at most four reports, worst first.
|
|
113
|
-
|
|
114
|
-
|
|
118
|
+
Report each thing that slowed this run down. Send at most four reports, worst first. The
|
|
119
|
+
friction commands follow the telemetry setting the developer already chose, so they need no
|
|
120
|
+
separate question.
|
|
115
121
|
|
|
116
122
|
```text
|
|
117
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
123
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard friction --category <slug> --cost-seconds <seconds> --message "<sentences>"
|
|
118
124
|
```
|
|
119
125
|
|
|
120
126
|
Put one or two sentences in `--message`. Pick one category from
|
|
@@ -126,7 +132,7 @@ Pass --docs-path only for a docs-missing or docs-wrong report, naming the page t
|
|
|
126
132
|
is about:
|
|
127
133
|
|
|
128
134
|
```text
|
|
129
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
135
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard friction --category docs-wrong --cost-seconds 300 --docs-path /docs/threads/drawer --message "<sentences>"
|
|
130
136
|
```
|
|
131
137
|
|
|
132
138
|
Give the page's site-relative path or its full URL, with no spaces, query string, or
|
|
@@ -143,14 +149,14 @@ Tell the developer when you send a friction report. Do not quote or summarize th
|
|
|
143
149
|
unless the developer asks. If the CLI says the report was not sent,
|
|
144
150
|
state what it said and continue without another question.
|
|
145
151
|
|
|
146
|
-
When the evidence is gathered, run `npx --prefer-offline --yes copilotkit@4.
|
|
147
|
-
the surface-check outcome the proof subagent returned. Pass exactly one
|
|
148
|
-
one that matches this journey's surface.
|
|
152
|
+
When the evidence is gathered, run `npx --prefer-offline --yes copilotkit@4.18.0 onboard complete`, carrying
|
|
153
|
+
the surface-check outcome the proof subagent returned. Pass exactly one of `--visual-check`
|
|
154
|
+
or `--device-check`, and pass the one that matches this journey's surface.
|
|
149
155
|
|
|
150
156
|
For a web frontend -- React SPA, Next.js, Angular, Vue:
|
|
151
157
|
|
|
152
158
|
```text
|
|
153
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
159
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard complete --visual-check <outcome>
|
|
154
160
|
```
|
|
155
161
|
|
|
156
162
|
The outcome is one of `performed`, `skipped-no-browser-tool`, `skipped-cloned-starter`, or
|
|
@@ -160,7 +166,7 @@ open no browser. It is the one skip that does not block.
|
|
|
160
166
|
For React Native:
|
|
161
167
|
|
|
162
168
|
```text
|
|
163
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
169
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard complete --device-check <outcome>
|
|
164
170
|
```
|
|
165
171
|
|
|
166
172
|
The outcome is one of `performed`, `skipped-no-device`, `skipped-cloned-starter`, or
|
|
@@ -173,7 +179,7 @@ browser-origin CORS, so the flag you pass is how this run states which surface i
|
|
|
173
179
|
For a web frontend, also pass the URL the browser opened:
|
|
174
180
|
|
|
175
181
|
```text
|
|
176
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
182
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard complete --visual-check <outcome> \
|
|
177
183
|
--frontend-url <the url you opened>
|
|
178
184
|
```
|
|
179
185
|
|
|
@@ -183,8 +189,9 @@ name -- and never the host itself. A run that opened the loopback IP literal los
|
|
|
183
189
|
static chunk to a refusal, and the field is how that stops being invisible. Leave the flag
|
|
184
190
|
off for React Native, which opens no URL.
|
|
185
191
|
|
|
186
|
-
Pass the outcome you were given rather than the one you wanted. Anything but `performed`
|
|
187
|
-
prints what the missing check leaves unverified and ends this run
|
|
192
|
+
Pass the outcome you were given rather than the one you wanted. Anything but `performed` or
|
|
193
|
+
`skipped-cloned-starter` prints what the missing check leaves unverified and ends this run
|
|
194
|
+
as blocked. That output
|
|
188
195
|
is the developer's finding, so carry it into the summary rather than restating it as a
|
|
189
196
|
smaller caveat.
|
|
190
197
|
|
|
@@ -192,7 +199,7 @@ If the round trip proved and something after it still blocked this run, add `--b
|
|
|
192
199
|
to the same command:
|
|
193
200
|
|
|
194
201
|
```text
|
|
195
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
202
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard complete --visual-check performed --blocked-by <cause>
|
|
196
203
|
```
|
|
197
204
|
|
|
198
205
|
The cause is one of `inspector` for a debugging surface that did not open,
|