copilotkit 4.16.0 → 4.17.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 +69 -4
- package/cli-build-info.json +7 -7
- package/index.js +3993 -2742
- package/onboarding/index.json +1 -1
- package/onboarding/prompts/authenticate/start.md +17 -15
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +20 -20
- package/onboarding/prompts/credentials/plan.md +21 -21
- package/onboarding/prompts/credentials/settle-credentials.md +46 -10
- package/onboarding/prompts/credentials/write-plan.md +35 -20
- package/onboarding/prompts/fallback/best-effort.md +23 -15
- 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 +8 -10
- 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 +11 -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 +8 -10
- package/onboarding/prompts/feature/complete.md +2 -2
- package/onboarding/prompts/feature/learning/implement.md +58 -26
- package/onboarding/prompts/feature/learning/proof.md +30 -10
- package/onboarding/prompts/feature/learning/start.md +15 -12
- 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 +8 -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 +8 -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 +8 -9
- package/onboarding/prompts/feature/stop.md +3 -3
- 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 +8 -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 +7 -7
- 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 +67 -28
- package/onboarding/prompts/proof/complete.md +21 -14
- package/onboarding/prompts/proof/oss-baseline.md +16 -12
- package/onboarding/prompts/proof/round-trip.md +33 -22
- 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 +14 -11
- package/onboarding/prompts/stopped/run-failed.md +9 -9
- package/onboarding/prompts/subagent/create-plan.md +15 -10
- package/onboarding/prompts/subagent/implement-and-validate.md +25 -11
- package/onboarding/prompts/subagent/inspect-repository.md +14 -6
- package/onboarding/prompts/subagent/prove-oss-baseline.md +5 -4
- package/onboarding/prompts/subagent/prove-round-trip.md +38 -14
- package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
- package/package.json +1 -5
- package/release/release-tool.js +171 -40
|
@@ -45,7 +45,7 @@ mechanism a later step uses for the CopilotKit documentation server.
|
|
|
45
45
|
|
|
46
46
|
Some coding agents, Claude Code among them, load a newly registered MCP server only at the
|
|
47
47
|
next session start. Tell the developer in one line to expect one restart, then restart and
|
|
48
|
-
re-bind with `npx --prefer-offline --yes copilotkit@4.
|
|
48
|
+
re-bind with `npx --prefer-offline --yes copilotkit@4.17.0 onboard start --run <onboarding_run_id>`. That
|
|
49
49
|
restart is a step here, not an error.
|
|
50
50
|
|
|
51
51
|
Do not add a browser or device driver to the project. A driver added there is a
|
|
@@ -62,14 +62,14 @@ whole finding.
|
|
|
62
62
|
Report that the probe settled, whichever way it came out:
|
|
63
63
|
|
|
64
64
|
```text
|
|
65
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
65
|
+
npx --prefer-offline --yes copilotkit@4.17.0 onboard checkpoint --phase surface-probed
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
Then merge the research:
|
|
69
69
|
|
|
70
70
|
```text
|
|
71
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
71
|
+
npx --prefer-offline --yes copilotkit@4.17.0 onboard read research/merge
|
|
72
72
|
```
|
|
73
73
|
|
|
74
74
|
If inspection stops onboarding, run
|
|
75
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
75
|
+
`npx --prefer-offline --yes copilotkit@4.17.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 --prefer-offline --yes copilotkit@4.
|
|
12
|
+
npx --prefer-offline --yes copilotkit@4.17.0 onboard protect
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
It reads the working tree itself, records every changed or untracked path with a digest,
|
|
@@ -41,7 +41,7 @@ On either, run this before you read the three findings below, and without asking
|
|
|
41
41
|
purpose question:
|
|
42
42
|
|
|
43
43
|
```text
|
|
44
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
44
|
+
npx --prefer-offline --yes copilotkit@4.17.0 onboard read feature/channels/start
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
Name the provider to that node so it does not ask again. A Slack page names Slack. A Teams
|
|
@@ -96,7 +96,7 @@ settle these three from your own reading of the project. Each one comes from the
|
|
|
96
96
|
packets or it is not proved.
|
|
97
97
|
|
|
98
98
|
If all three are proved, prove the live starting state before any project file changes. Run
|
|
99
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
99
|
+
`npx --prefer-offline --yes copilotkit@4.17.0 onboard read proof/oss-baseline`.
|
|
100
100
|
|
|
101
101
|
Route there before you ask the developer anything else. The questions after this prompt
|
|
102
102
|
select a framework and a frontend that the findings already name, so a developer who
|
|
@@ -109,7 +109,7 @@ developer nor the repository findings prove what the project is for, ask one gui
|
|
|
109
109
|
question about the user outcome. This asks what the developer wants to build before you
|
|
110
110
|
select a framework. Give two or three short examples. Record the answer and give it to
|
|
111
111
|
each later subagent. Then run
|
|
112
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
112
|
+
`npx --prefer-offline --yes copilotkit@4.17.0 onboard read credentials/plan`.
|
|
113
113
|
|
|
114
114
|
Do not ask that question on the route above. A project carrying all three states its
|
|
115
115
|
purpose in the application it already serves.
|
|
@@ -122,6 +122,6 @@ Slack and Microsoft Teams are choices at that step.
|
|
|
122
122
|
A purpose question here names a domain before that choice.
|
|
123
123
|
Take the same read named above without asking.
|
|
124
124
|
|
|
125
|
-
If authentication or
|
|
126
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
125
|
+
If authentication, inspection, or the baseline capture stops onboarding, run
|
|
126
|
+
`npx --prefer-offline --yes copilotkit@4.17.0 onboard read stopped/run-failed`. None of them says anything
|
|
127
127
|
about whether this project's stack is supported, which is not yet known at this point.
|
|
@@ -37,11 +37,14 @@ Each Framework ID selects a starter that the CLI ships with Intelligence. Do not
|
|
|
37
37
|
different pair from a similar name. AG2 does not use this shortcut because its starter does
|
|
38
38
|
not include Intelligence.
|
|
39
39
|
|
|
40
|
-
Get the target directory name from its path. The
|
|
41
|
-
|
|
40
|
+
Get the target directory name from its path. The name can contain 1 to 100 letters,
|
|
41
|
+
numbers, spaces, dots, underscores, or hyphens, in any case. It must not be `.` or `..`,
|
|
42
|
+
start or end with a space, or end with a dot. `init` accepts the name of an existing empty
|
|
43
|
+
directory as it is, so a name such as `MyApp` is valid. Do not rename the directory. If the
|
|
42
44
|
selected pair is not in the table, or the directory name is not valid, stop the shortcut.
|
|
43
|
-
Do not run `init`.
|
|
44
|
-
|
|
45
|
+
Do not run `init`. No command ran, so this is not a failed shortcut. Go back to the
|
|
46
|
+
`## Documentation` section of the frontend prompt you read before this one, and build the
|
|
47
|
+
project from its pages.
|
|
45
48
|
|
|
46
49
|
If the developer did not name a project, create one for the app being
|
|
47
50
|
cloned. This directory is new, so no existing project is already its own: take the project
|
|
@@ -52,7 +55,7 @@ the derived name.
|
|
|
52
55
|
Only if the developer asks for an existing project, or asks to see the projects they have,
|
|
53
56
|
read the choices:
|
|
54
57
|
|
|
55
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
58
|
+
`npx --prefer-offline --yes copilotkit@4.17.0 project list --json`
|
|
56
59
|
|
|
57
60
|
Then ask which one to use. Do not order the projects by creation time. If the developer
|
|
58
61
|
already gave this answer, do not ask again. Do not read a secret value. Do not show or
|
|
@@ -77,9 +80,9 @@ way bills a project nobody chose.
|
|
|
77
80
|
|
|
78
81
|
Run the command from the parent directory. Do not inspect another entry in the parent
|
|
79
82
|
directory. Replace each placeholder with the recorded value. Do not run a placeholder as
|
|
80
|
-
a shell argument.
|
|
83
|
+
a shell argument. If the directory name holds a space, put it in double quotes.
|
|
81
84
|
|
|
82
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
85
|
+
`npx --prefer-offline --yes copilotkit@4.17.0 init --name <directory-name> --framework <framework-id> --channel none --no-banner --no-key-prompt --create <name> --install`
|
|
83
86
|
|
|
84
87
|
`--name` is always the target directory name derived above, because `init` creates the
|
|
85
88
|
app at `<parent>/<name>`. Any other value puts the app in a new folder beside the target,
|
|
@@ -105,7 +108,7 @@ account. The command does not need terminal input.
|
|
|
105
108
|
Report the clone before you inspect anything:
|
|
106
109
|
|
|
107
110
|
```text
|
|
108
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
111
|
+
npx --prefer-offline --yes copilotkit@4.17.0 onboard checkpoint --phase starter-cloned
|
|
109
112
|
```
|
|
110
113
|
|
|
111
114
|
This is its own step, not an aside. A run that clones and then goes quiet is
|
|
@@ -149,7 +152,7 @@ The two Microsoft Agent Framework starters keep their key outside `<target>/.env
|
|
|
149
152
|
Then report the pause and end your turn:
|
|
150
153
|
|
|
151
154
|
```text
|
|
152
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
155
|
+
npx --prefer-offline --yes copilotkit@4.17.0 onboard checkpoint --phase awaiting-developer
|
|
153
156
|
```
|
|
154
157
|
|
|
155
158
|
This is a pause, not a stop. Do not send a stop report, and do not take a stop route.
|
|
@@ -160,10 +163,10 @@ call.
|
|
|
160
163
|
|
|
161
164
|
If no credential is missing, report no pause and continue.
|
|
162
165
|
|
|
163
|
-
Then run `npx --prefer-offline --yes copilotkit@4.
|
|
166
|
+
Then run `npx --prefer-offline --yes copilotkit@4.17.0 onboard read proof/round-trip`.
|
|
164
167
|
|
|
165
168
|
If the command fails, report its exact error and do not claim that the starter is ready.
|
|
166
169
|
Then run
|
|
167
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
170
|
+
`npx --prefer-offline --yes copilotkit@4.17.0 onboard read stopped/run-failed`. The starter is one this
|
|
168
171
|
graph ships and the stack was chosen from its own supported list, so a command that
|
|
169
172
|
returned an error is a run that broke, not a setup this release does not support.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# Stop because the run did not finish
|
|
2
2
|
|
|
3
|
-
This is the ending for a run that broke.
|
|
4
|
-
|
|
5
|
-
to say.
|
|
3
|
+
This is the ending for a run that broke. Something in this run stopped it, and that is
|
|
4
|
+
what the report has to say. This ending makes no judgment about the stack.
|
|
6
5
|
|
|
7
|
-
Do not tell the developer their setup is unsupported.
|
|
8
|
-
|
|
6
|
+
Do not tell the developer their setup is unsupported. A run that says so sends them to
|
|
7
|
+
change a stack that was never shown to be the problem.
|
|
9
8
|
|
|
10
9
|
Keep the developer's current agent, frontend, authentication, and package choices.
|
|
11
10
|
|
|
12
11
|
Name the exact step that stopped the run, and what it returned. State whether
|
|
13
|
-
authentication,
|
|
14
|
-
|
|
12
|
+
authentication, repository inspection, the protected-path baseline capture, the OSS baseline
|
|
13
|
+
proof, project selection, project credentials, the plan, the starter clone, the journey,
|
|
14
|
+
implementation, validation, or the round trip stopped it. Give the failure in the words the step printed,
|
|
15
15
|
not a summary of them.
|
|
16
16
|
|
|
17
17
|
If a protected path stopped this run, name that path and how it changed, in the words the
|
|
@@ -41,7 +41,7 @@ put to them, stop here and send the report below.
|
|
|
41
41
|
If they approve it, make that one fix and nothing else. Then come back into this run:
|
|
42
42
|
|
|
43
43
|
```text
|
|
44
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
44
|
+
npx --prefer-offline --yes copilotkit@4.17.0 onboard resume --message "<approval>"
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
Put the developer's approval in `--message`, in one or two sentences: the fix they
|
|
@@ -64,7 +64,7 @@ Send one short report. Run the friction command without another developer questi
|
|
|
64
64
|
ask the developer about telemetry: the command applies the setting they already have.
|
|
65
65
|
|
|
66
66
|
```text
|
|
67
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
67
|
+
npx --prefer-offline --yes copilotkit@4.17.0 onboard friction --phase stop --category <slug> --message "<sentences>"
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
`--message` takes one or two sentences: the step you stopped at and what stopped
|
|
@@ -37,8 +37,9 @@ Plan the runtime to consume the Intelligence credential. The runtime takes an
|
|
|
37
37
|
`runner` option instead is the OSS runtime. It never reads the Intelligence key, and the
|
|
38
38
|
Inspector reads the project as locked. The default in-memory OSS runner is ephemeral.
|
|
39
39
|
SQLite, custom, or framework persistence can be durable. The two options cannot be
|
|
40
|
-
combined. Take the constructor from the
|
|
41
|
-
quickstart
|
|
40
|
+
combined. Take the constructor from the Intelligence quickstart
|
|
41
|
+
(https://docs.copilotkit.ai/intelligence/quickstart.md). Where a framework quickstart
|
|
42
|
+
shows a `runner` option instead, the Intelligence quickstart wins.
|
|
42
43
|
|
|
43
44
|
## Plan the Learning Container and its selector
|
|
44
45
|
|
|
@@ -106,12 +107,14 @@ The intersection includes what a `@copilotkit/*` package on its own version line
|
|
|
106
107
|
about the `1.x` line. `@copilotkit/angular` is the one that has this, and its declaration
|
|
107
108
|
is materialized at publish time rather than written in the repository, so read it from the
|
|
108
109
|
registry rather than from any checkout. Where it cannot be satisfied by the version the
|
|
109
|
-
floor requires, there is no upgrade to plan:
|
|
110
|
+
floor requires, there is no upgrade to plan: return `Status: blocked` and name
|
|
111
|
+
`unsupported/no-validated-path` as the outcome.
|
|
110
112
|
|
|
111
113
|
An exact pin is usually deliberate. Naming the move here is what makes it a step the
|
|
112
114
|
developer approved rather than a repair the run invents halfway through. Do not move a pin
|
|
113
|
-
the developer did not approve moving. Where the developer needs one held,
|
|
114
|
-
`unsupported/no-validated-path
|
|
115
|
+
the developer did not approve moving. Where the developer needs one held, return
|
|
116
|
+
`Status: blocked` and name `unsupported/no-validated-path` as the outcome. The upgrade
|
|
117
|
+
step's revert is the way back.
|
|
115
118
|
|
|
116
119
|
Name the exact version the target requires. A caret does not stand in for it below `0.1.0`:
|
|
117
120
|
`^0.0.59` admits only `0.0.59`, so a pin rewritten that way is the same pin under a
|
|
@@ -136,8 +139,9 @@ If the value of the journey depends on data the project already holds, name that
|
|
|
136
139
|
name where it lives, and name how it reaches the agent. Rendering a list in the DOM does
|
|
137
140
|
not give the agent access to it. An agent wired without the page's data answers from
|
|
138
141
|
entities it invents, and the answer looks correct. Take the frontend-context step from
|
|
139
|
-
the selected documentation. Where no selected page documents it
|
|
140
|
-
frontend,
|
|
142
|
+
the selected documentation, and never guess the API. Where no selected page documents it
|
|
143
|
+
for this framework or frontend, the data has no documented way to reach the agent: return
|
|
144
|
+
`Status: blocked` and name `unsupported/no-validated-path` as the outcome.
|
|
141
145
|
|
|
142
146
|
Where that data exists, name the entities the proof compares against: the ids, names, or
|
|
143
147
|
records the project holds and the answer has to reference. Where the outcome references
|
|
@@ -170,7 +174,7 @@ here is work the developer did not ask for.
|
|
|
170
174
|
Plan the threads drawer itself: add it from the selected drawer page, where this frontend
|
|
171
175
|
does not already render one. Where this journey's frontend framework ships no threads
|
|
172
176
|
drawer -- React Native --, plan that the thread is proved by
|
|
173
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
177
|
+
`npx --prefer-offline --yes copilotkit@4.17.0 verify --round-trip`, which needs no browser. Do not plan a
|
|
174
178
|
step that opens the managed Intelligence dashboard.
|
|
175
179
|
|
|
176
180
|
## Order the plan into steps
|
|
@@ -193,8 +197,9 @@ feature to an app the developer already built is the case this exists for: the o
|
|
|
193
197
|
in a file they wrote, and on an app whose work was never committed that file is in the
|
|
194
198
|
baseline. List every such path under `Authorization requested`, one line each, with the path
|
|
195
199
|
and one sentence saying what the step changes there and why no other file will do. Keep the
|
|
196
|
-
step in the plan.
|
|
197
|
-
cannot justify in that sentence
|
|
200
|
+
step in the plan. Where a protected path you can justify is the only obstacle, the step
|
|
201
|
+
stays. Where the plan needs a protected path you cannot justify in that sentence, return
|
|
202
|
+
`Status: blocked`.
|
|
198
203
|
|
|
199
204
|
Authorization covers changing a protected path, not removing it. Do not plan the deletion
|
|
200
205
|
of a protected path, and do not plan a step that moves or renames one, which removes it
|
|
@@ -3,15 +3,26 @@
|
|
|
3
3
|
Implement every step of the approved plan in plan order, and run the full validation list.
|
|
4
4
|
Do not repeat the full repository inspection.
|
|
5
5
|
|
|
6
|
-
Do not change a protected path
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
Do not change a protected path unless it is on the authorized list the main coding agent
|
|
7
|
+
gave you. That list comes from the CLI, which recorded the developer's consent for each
|
|
8
|
+
path on it. An authorization covers that exact path only, not an ancestor directory and not
|
|
9
|
+
a file inside it. Never delete, move, or rename a protected path, authorized or not,
|
|
10
|
+
whatever the plan says: a protected path that is gone fails the audit and no command
|
|
11
|
+
clears that. Do not change a path that overlaps a protected path. An authorized path
|
|
12
|
+
itself is the one exception. Paths overlap when they are equal or
|
|
9
13
|
either path is an ancestor directory on a path-segment boundary. `apps/a` overlaps
|
|
10
14
|
`apps/a/src`, but not `apps/ab`. `app.ts` does not overlap `app.tsx`.
|
|
11
15
|
|
|
12
|
-
Change only the files and directories the approved plan names as changeable.
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
Change only the files and directories the approved plan names as changeable. A path on
|
|
17
|
+
the authorized list counts as one the plan names, and so does a path the main coding agent
|
|
18
|
+
adds to your handoff as one the developer approved. Two kinds of file outside that list are
|
|
19
|
+
departures, not blockers. The first is a file that has the same role as a planned file at a
|
|
20
|
+
different path, for example `app/page.tsx` for a planned `src/app/page.tsx`. The second is
|
|
21
|
+
the documentation file this prompt tells you to write. Mark each departure in Files
|
|
22
|
+
changed: the path the plan named, if any, the path you changed, and why. Neither kind
|
|
23
|
+
covers a protected path. If the work requires any other file the plan does not name, return
|
|
24
|
+
`Status: blocked`, name the file and why the work needs it under Blockers, and end your
|
|
25
|
+
turn. Do not run a repository-wide formatter.
|
|
15
26
|
|
|
16
27
|
All implementation work happens in the run root's own working tree: the target app
|
|
17
28
|
directory the main coding agent named. Never work in a separate worktree, a branch
|
|
@@ -21,10 +32,12 @@ completion step verifies that the changed files exist in this project, so work l
|
|
|
21
32
|
another tree ends the run with nothing in the developer's hands.
|
|
22
33
|
|
|
23
34
|
Before validation, read the protected path list. Inspect the current changed and untracked
|
|
24
|
-
paths. Keep protected paths out of the run path set
|
|
35
|
+
paths. Keep protected paths out of the run path set, except the authorized paths, which
|
|
36
|
+
belong in it. Compare every changed path with the
|
|
25
37
|
paths the plan named. Here, a changed path means one in the run path set. If a changed path
|
|
26
|
-
is outside them, return `Status: blocked` before
|
|
27
|
-
commands one at a time. Fix validation and proof
|
|
38
|
+
is outside them and is not a departure you marked, return `Status: blocked` before
|
|
39
|
+
validation. Run the approved validation commands one at a time. Fix validation and proof
|
|
40
|
+
defects only in the paths the plan named and the departures you marked.
|
|
28
41
|
|
|
29
42
|
Use only the approved plan and the selected documentation URLs. Follow the documentation
|
|
30
43
|
policy the main coding agent gives you before you change the project.
|
|
@@ -61,7 +74,7 @@ to bypass this rule.
|
|
|
61
74
|
|
|
62
75
|
If the scaffolder cannot preserve a protected file, generate into a temporary directory
|
|
63
76
|
inside the project only when the approved plan permits it. Copy only approved paths that
|
|
64
|
-
do not overlap a protected path. Otherwise, return the conflict and end your turn before
|
|
77
|
+
do not overlap a protected path. A path on the authorized list is the one exception. Otherwise, return the conflict and end your turn before
|
|
65
78
|
running the scaffolder. Ask the main coding agent to revise credential setup when a
|
|
66
79
|
required variable is missing. Do not provision another key to repair a scaffold overwrite.
|
|
67
80
|
|
|
@@ -83,7 +96,8 @@ change, and the check that asked for it. Do not edit the agent's prompt to make
|
|
|
83
96
|
component render.
|
|
84
97
|
|
|
85
98
|
An existing `README.md` is the developer's, not this run's. Leave it exactly as you found
|
|
86
|
-
it: not the title, not a section, not a line.
|
|
99
|
+
it: not the title, not a section, not a line. The one exception is a README on the
|
|
100
|
+
authorized list. Where this run has documentation to write,
|
|
87
101
|
write it to a new file and name that file when you report the result. On an empty project
|
|
88
102
|
the README is the whole of the brief -- the only place the developer said what they
|
|
89
103
|
wanted, and the thing they read this run's result against -- so the rule binds hardest
|
|
@@ -7,15 +7,21 @@ 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 --prefer-offline --yes copilotkit@4.
|
|
10
|
+
npx --prefer-offline --yes copilotkit@4.17.0 onboard inspect --json
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
It answers the deterministic half of both packets exactly, from the same code
|
|
14
14
|
`copilotkit verify` uses: the project record by presence, and, for each app or runtime
|
|
15
15
|
directory on its own, the env files, which variable carries the Intelligence key and which
|
|
16
16
|
file it came from, whether that directory's own process can load it, the package manager
|
|
17
|
-
its lockfile proves, the port it declares,
|
|
18
|
-
`@copilotkit/*` dependency
|
|
17
|
+
its lockfile proves, the port it declares, the exact installed version of every
|
|
18
|
+
`@copilotkit/*` dependency, and every provider base URL its process will read. It reads
|
|
19
|
+
only and prints no secret value.
|
|
20
|
+
|
|
21
|
+
Report each `providerEndpoints` entry with the variable, its origin, and where it came
|
|
22
|
+
from. A `null` `source` means the process environment supplied it. A coding agent's shell
|
|
23
|
+
passes that value on to every dev server it starts, so it decides where the model calls
|
|
24
|
+
go before any project file does. Carry its `warning` as it came back.
|
|
19
25
|
|
|
20
26
|
Carry those readings into your findings as they came back. Do not work one of them out
|
|
21
27
|
again by reading files. The directory that owns `.env` is the hard case and the CLI holds
|
|
@@ -43,7 +49,7 @@ Find evidence for:
|
|
|
43
49
|
Return the initial changed and untracked paths as paths only. Do not return their
|
|
44
50
|
contents. Do not retain a before-state for them. The CLI captures the baseline that the
|
|
45
51
|
protected-path audit compares against, so nothing later in the run depends on this
|
|
46
|
-
subagent still
|
|
52
|
+
subagent still holding its state, and a path that can hold secrets is captured as a digest you
|
|
47
53
|
never read.
|
|
48
54
|
|
|
49
55
|
Take the target app or runtime directory from the CLI packet rather than working it out
|
|
@@ -53,7 +59,8 @@ reading of the files will not reproduce.
|
|
|
53
59
|
## Environment evidence packet
|
|
54
60
|
|
|
55
61
|
- names of required credential variables, beyond the Intelligence key the CLI reported
|
|
56
|
-
-
|
|
62
|
+
- the `.env` modification time, or that no `.env` exists, for a later comparison. It is a
|
|
63
|
+
timestamp, not a value from the file
|
|
57
64
|
- required toolchains and their installed versions
|
|
58
65
|
- whether each port the CLI reported as declared is free
|
|
59
66
|
- whether the runtime constructor uses a `runner` option, an `intelligence` option, or
|
|
@@ -85,6 +92,7 @@ access or an environment limit prevents the inspection.
|
|
|
85
92
|
Return one row for each assigned item with its status, evidence path, and a short finding.
|
|
86
93
|
Use only `proved`, `absent`, or `unproved` for the status. State each absent or unproved item.
|
|
87
94
|
Do not read, print, or return secret values. For `.env` and `.copilotkit/project.json`
|
|
88
|
-
checks, return only paths, presence checks,
|
|
95
|
+
checks, return only paths, presence checks, missing field names, and the one `.env`
|
|
96
|
+
modification time named above. Do not read a file
|
|
89
97
|
outside the project directory. Do not run or return an onboarding command other than
|
|
90
98
|
`onboard inspect`. End your turn after returning the findings to the main coding agent.
|
|
@@ -32,7 +32,7 @@ Prove the live runtime in this order:
|
|
|
32
32
|
4. Confirm from project files that the runtime constructor passes a `runner` option rather
|
|
33
33
|
than an `intelligence` option. A package, import, project file, or key is not use proof.
|
|
34
34
|
5. Run
|
|
35
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
35
|
+
`npx --prefer-offline --yes copilotkit@4.17.0 verify --expect-runtime oss --round-trip --agent <expected-agent-id> --json`,
|
|
36
36
|
with the runtime URL or auth header options that this project needs. Require exit zero
|
|
37
37
|
and the JSON `ok` field to be `true`.
|
|
38
38
|
6. Drive one real request through the existing frontend, CopilotKit runtime, and expected
|
|
@@ -46,9 +46,10 @@ asked for one, which is a different thing from a server registered against the c
|
|
|
46
46
|
Where the recorded control is `unavailable`, record predicate 6 as skipped, with that as the
|
|
47
47
|
reason, and prove the rest.
|
|
48
48
|
|
|
49
|
-
Classify the state as `both-oss` when predicates 1 to 5 are all true
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
Classify the state as `both-oss` when predicates 1 to 5 are all true and predicate 6 did
|
|
50
|
+
not fail. Predicate 5 proves the
|
|
51
|
+
CopilotKit round trip from a shell, so a skipped predicate 6 leaves those five to settle
|
|
52
|
+
the starting state. Predicate 6 adds the user-visible surface on top of a state already proved: record it as
|
|
52
53
|
passed, failed, or skipped, and do not withhold `both-oss` for a skip. A failed predicate 6
|
|
53
54
|
on an available surface is a baseline failure and is not a skip. Return each predicate and
|
|
54
55
|
its secret-safe evidence.
|
|
@@ -5,7 +5,8 @@ policy the main coding agent gives you before you start.
|
|
|
5
5
|
|
|
6
6
|
During Steps 1 through 8, do not edit source files, configuration files, dependencies, or
|
|
7
7
|
tracked files.
|
|
8
|
-
You can make only operational repairs to project-owned processes, ports, and request options
|
|
8
|
+
You can make only operational repairs to project-owned processes, ports, and request options,
|
|
9
|
+
and the credential write that Step 4 names for `api_key_loadable_by_app`.
|
|
9
10
|
Do not write a path that overlaps a protected path. If a required proof or tool path
|
|
10
11
|
overlaps one, return `Status: blocked` before writing it.
|
|
11
12
|
|
|
@@ -24,8 +25,13 @@ different sequence of your own, and do not drop a step because an earlier one lo
|
|
|
24
25
|
convincing. Step 6 has a web form and a React Native form: run the one that matches this
|
|
25
26
|
journey's frontend, and run only that one.
|
|
26
27
|
|
|
28
|
+
A run that cloned a starter is the one exception. When the main coding agent tells you
|
|
29
|
+
that this run cloned a starter, run Steps 1 through 5 up to and including the
|
|
30
|
+
`verify --round-trip` command, then go to Step 10. Skip Steps 5a through 9, open no browser
|
|
31
|
+
or device, and report `skipped-cloned-starter` as the surface-check outcome.
|
|
32
|
+
|
|
27
33
|
Where this is a second attempt after a repair, run every step from Step 2 through Step 7
|
|
28
|
-
again. The repair changed tracked files and restarted processes, so the wiring, the agent
|
|
34
|
+
again, or through the Step 5 `verify --round-trip` command for a cloned-starter run. The repair changed tracked files and restarted processes, so the wiring, the agent
|
|
29
35
|
identity, and both preconditions are stale. Step 1 is the exception, and it is carried
|
|
30
36
|
rather than derived a second time. Compare the Step 5a and Step 5b results against the
|
|
31
37
|
failed attempt's before you drive the surface. A repair that leaves the failed precondition
|
|
@@ -157,7 +163,7 @@ IPv6 only, so an IPv4 literal fails against the correct port.
|
|
|
157
163
|
## Step 4 -- Check the wiring
|
|
158
164
|
|
|
159
165
|
With both running, check the wiring in one command before you open a browser:
|
|
160
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
166
|
+
`npx --prefer-offline --yes copilotkit@4.17.0 verify --json`. It reads the port from this project, so a
|
|
161
167
|
non-default port needs no flag. The payload reports `runtimeUrl` and `runtimeUrlSource`. A
|
|
162
168
|
`runtimeUrlSource` of `default` means nothing in the project named a port, so pass
|
|
163
169
|
`--runtime-url` with the URL from step 1 in that case. Read the individual checks rather than
|
|
@@ -191,7 +197,7 @@ named no port the CLI can read: keep step 2's URL, and rewrite its host as `loca
|
|
|
191
197
|
before you use it.
|
|
192
198
|
|
|
193
199
|
Then run the command once more with the URL you are about to open:
|
|
194
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
200
|
+
`npx --prefer-offline --yes copilotkit@4.17.0 verify --frontend-url <that url> --json`. The
|
|
195
201
|
`frontend_assets_served` check asks that server for its page and for one of the page's own
|
|
196
202
|
assets, on that exact host. A `fail` there means the dev server refuses its own static
|
|
197
203
|
assets on the host you were about to use, and the check names the URL to use instead. This
|
|
@@ -199,7 +205,7 @@ is the cheapest step that can save the most expensive one, so run it before the
|
|
|
199
205
|
|
|
200
206
|
## Step 5 -- Prove that the agent runs
|
|
201
207
|
|
|
202
|
-
Run `npx --prefer-offline --yes copilotkit@4.
|
|
208
|
+
Run `npx --prefer-offline --yes copilotkit@4.17.0 verify --round-trip --json`. It sends one request through
|
|
203
209
|
the runtime and reads the answer back from the thread, so it separates an agent that is
|
|
204
210
|
configured from an agent that works. Use `--agent <id>` when the runtime declares more
|
|
205
211
|
than one. If it reports `user-not-identified`, this project's `identifyUser` reads a
|
|
@@ -212,7 +218,7 @@ Where this run settled a Learning Container, add the flag to the call above rath
|
|
|
212
218
|
running a second round trip:
|
|
213
219
|
|
|
214
220
|
```text
|
|
215
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
221
|
+
npx --prefer-offline --yes copilotkit@4.17.0 verify --round-trip --expect-learning-container <container id> --json
|
|
216
222
|
```
|
|
217
223
|
|
|
218
224
|
The check reads the thread that this run created, so a second round trip proves a second
|
|
@@ -246,7 +252,7 @@ the credential was written holds an empty key while the file beside it carries t
|
|
|
246
252
|
one. Run this from the target app directory:
|
|
247
253
|
|
|
248
254
|
```text
|
|
249
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
255
|
+
npx --prefer-offline --yes copilotkit@4.17.0 onboard env-staleness
|
|
250
256
|
```
|
|
251
257
|
|
|
252
258
|
A `stale` line names the env file and how long after launch it was written. Report that,
|
|
@@ -256,6 +262,21 @@ process and never its owner, and one project's dev script often serves the agent
|
|
|
256
262
|
frontend together. Editing a file to answer a 401 that a restart clears changes the project
|
|
257
263
|
for a fault it does not have.
|
|
258
264
|
|
|
265
|
+
Where the runtime answers with a 404 from the model provider, check the base URLs the
|
|
266
|
+
processes inherited before you change anything. A coding agent's shell passes its own
|
|
267
|
+
environment on to every process it starts, so a provider base URL exported for the agent
|
|
268
|
+
reaches the dev servers. Run this from the target app directory:
|
|
269
|
+
|
|
270
|
+
```text
|
|
271
|
+
npx --prefer-offline --yes copilotkit@4.17.0 onboard inspect --json
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Read `providerEndpoints` for the app directory. An entry with a `null` `source` came from
|
|
275
|
+
the process environment rather than from a project file. A `warning` names why that value
|
|
276
|
+
fails. Report the variable, where it came from, and the warning, and say that the server
|
|
277
|
+
has to start from an environment without that value before the 404 means anything. Do not
|
|
278
|
+
edit a project file to answer it: the value lives in the shell, not in the project.
|
|
279
|
+
|
|
259
280
|
### Step 5a -- Prove that the page's data reaches the model
|
|
260
281
|
|
|
261
282
|
`verify --round-trip` sends `context: []` and asks a question that needs no context. It
|
|
@@ -318,13 +339,14 @@ holds. Streamed text alone is not this step's outcome, whatever it says.
|
|
|
318
339
|
This is the step that covers realtime delivery, the frontend provider being wired to this
|
|
319
340
|
runtime, and the component actually rendering, and no command-line check reaches any of
|
|
320
341
|
them. It is not optional polish: a run that skips it has proven the agent and not the
|
|
321
|
-
journey, and such a run ends as blocked rather than complete.
|
|
342
|
+
journey, and such a run ends as blocked rather than complete. The cloned-starter skip is
|
|
343
|
+
the one exception, and it completes the run.
|
|
322
344
|
|
|
323
345
|
For a recorded `both-oss` starting state, this step has no component to render. Send the
|
|
324
346
|
same request the baseline recorded, require the same kind of user-visible result the
|
|
325
347
|
baseline produced, and require that the thread for that request is listed in the drawer.
|
|
326
348
|
Where this journey's frontend framework ships no threads drawer -- React Native --, prove
|
|
327
|
-
that thread with `npx --prefer-offline --yes copilotkit@4.
|
|
349
|
+
that thread with `npx --prefer-offline --yes copilotkit@4.17.0 verify --round-trip`, which reads the
|
|
328
350
|
answer back off the thread and needs no browser. Record which of the two you proved.
|
|
329
351
|
|
|
330
352
|
Use the surface control the main coding agent recorded for your environment. It either had
|
|
@@ -352,7 +374,7 @@ request never exercises. Drive it with the browser control step 6 named.
|
|
|
352
374
|
the page to finish loading. Do not retype the host, and do not substitute a URL a tool
|
|
353
375
|
offers you by default. Where the page loads but its styling is missing or the chat
|
|
354
376
|
control is dead, run
|
|
355
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
377
|
+
`npx --prefer-offline --yes copilotkit@4.17.0 verify --frontend-url <the url you opened> --json`
|
|
356
378
|
before you diagnose anything else. A dev server can serve its page and refuse every
|
|
357
379
|
static chunk behind it, and on screen that is indistinguishable from a broken
|
|
358
380
|
integration. The `frontend_assets_served` check tells the two apart.
|
|
@@ -377,8 +399,9 @@ request never exercises. Drive it with the browser control step 6 named.
|
|
|
377
399
|
the answer from, and what that element showed.
|
|
378
400
|
|
|
379
401
|
Report exactly one of `performed`, `skipped-no-browser-tool`, `skipped-cloned-starter`, or
|
|
380
|
-
`failed` for a web frontend. Report `skipped-cloned-starter` when
|
|
381
|
-
open no browser because the run cloned a starter.
|
|
402
|
+
`failed` for a web frontend. Report `skipped-cloned-starter` when the main coding agent told
|
|
403
|
+
you to open no browser because the run cloned a starter. The cloned-starter exception above
|
|
404
|
+
Step 1 says which steps to run.
|
|
382
405
|
|
|
383
406
|
### Step 6b -- React Native
|
|
384
407
|
|
|
@@ -495,8 +518,9 @@ whatever these two tools did.
|
|
|
495
518
|
|
|
496
519
|
Start with `Status: passed`, `Status: failed`, or `Status: blocked`.
|
|
497
520
|
Use `Status: passed` when the proof attempt completed with `performed`,
|
|
498
|
-
`skipped-no-browser-tool`, or `skipped-
|
|
499
|
-
|
|
521
|
+
`skipped-no-browser-tool`, `skipped-no-device`, or `skipped-cloned-starter`. The parent
|
|
522
|
+
records a skip through the standard completion route, which ends every skip but
|
|
523
|
+
`skipped-cloned-starter` as blocked. Use `Status: failed` for a failed proof step. Use
|
|
500
524
|
`Status: blocked` when a safety or access limit stops the attempt before a surface outcome.
|
|
501
525
|
Return the proof or the exact failed step to the main coding agent, together with the
|
|
502
526
|
input, the visible result, the relevant process status, the evidence locations, the
|
|
@@ -30,13 +30,13 @@ Before you show the best-effort plan, require this complete packet:
|
|
|
30
30
|
- Give the ordered proof rules.
|
|
31
31
|
|
|
32
32
|
After the developer approves the best-effort plan, run
|
|
33
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
33
|
+
`npx --prefer-offline --yes copilotkit@4.17.0 onboard read fallback/best-effort`.
|
|
34
34
|
|
|
35
35
|
Send one short report. Run the friction command without another developer question. Do not
|
|
36
36
|
ask the developer about telemetry: the command applies the setting they already have.
|
|
37
37
|
|
|
38
38
|
```text
|
|
39
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
39
|
+
npx --prefer-offline --yes copilotkit@4.17.0 onboard friction --phase stop --category <slug> --message "<sentences>"
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
`--message` takes one or two sentences: the step you stopped at and what stopped it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "copilotkit",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.17.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.9.0"
|
|
@@ -16,9 +16,5 @@
|
|
|
16
16
|
"optionalDependencies": {
|
|
17
17
|
"@microsoft/teams.cli": "3.0.3"
|
|
18
18
|
},
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@mastra/core": "1.48.0",
|
|
21
|
-
"@mastra/libsql": "1.14.3"
|
|
22
|
-
},
|
|
23
19
|
"license": "SEE LICENSE IN LICENSE"
|
|
24
20
|
}
|