copilotkit 4.11.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/LICENSE +11 -0
- package/README.md +155 -12
- package/cli-build-info.json +8 -8
- package/index.js +5969 -4751
- package/onboarding/index.json +27 -2
- package/onboarding/prompts/authenticate/start.md +45 -38
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +14 -13
- package/onboarding/prompts/credentials/plan.md +26 -20
- package/onboarding/prompts/credentials/settle-credentials.md +55 -23
- 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 +7 -7
- package/onboarding/prompts/feature/a2ui/proof.md +6 -6
- package/onboarding/prompts/feature/a2ui/start.md +10 -8
- package/onboarding/prompts/feature/blocked-by-plan.md +32 -0
- package/onboarding/prompts/feature/channels/implement.md +68 -13
- package/onboarding/prompts/feature/channels/proof.md +13 -6
- package/onboarding/prompts/feature/channels/start.md +30 -11
- package/onboarding/prompts/feature/chat-suggestions/implement.md +7 -7
- package/onboarding/prompts/feature/chat-suggestions/proof.md +6 -6
- package/onboarding/prompts/feature/chat-suggestions/start.md +10 -8
- package/onboarding/prompts/feature/complete.md +1 -1
- package/onboarding/prompts/feature/learning/implement.md +73 -14
- package/onboarding/prompts/feature/learning/proof.md +10 -9
- package/onboarding/prompts/feature/learning/start.md +61 -7
- package/onboarding/prompts/feature/open-generative-ui/implement.md +7 -7
- package/onboarding/prompts/feature/open-generative-ui/proof.md +6 -6
- package/onboarding/prompts/feature/open-generative-ui/start.md +10 -8
- package/onboarding/prompts/feature/realtime-sync/implement.md +8 -8
- package/onboarding/prompts/feature/realtime-sync/proof.md +6 -6
- package/onboarding/prompts/feature/realtime-sync/start.md +9 -7
- package/onboarding/prompts/feature/rich-threads/implement.md +9 -9
- package/onboarding/prompts/feature/rich-threads/proof.md +6 -6
- package/onboarding/prompts/feature/rich-threads/start.md +9 -7
- package/onboarding/prompts/feature/stop.md +2 -2
- package/onboarding/prompts/feature/voice/implement.md +7 -7
- package/onboarding/prompts/feature/voice/proof.md +6 -6
- package/onboarding/prompts/feature/voice/start.md +10 -8
- 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 +5 -5
- package/onboarding/prompts/frontend/nextjs.md +4 -4
- 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 +39 -16
- package/onboarding/prompts/proof/complete.md +35 -15
- package/onboarding/prompts/proof/oss-baseline.md +5 -5
- package/onboarding/prompts/proof/round-trip.md +23 -12
- package/onboarding/prompts/research/gather.md +33 -91
- package/onboarding/prompts/research/merge.md +60 -0
- package/onboarding/prompts/research/preflight.md +75 -0
- package/onboarding/prompts/research/route.md +49 -4
- package/onboarding/prompts/starter/clone.md +5 -5
- package/onboarding/prompts/stopped/run-failed.md +30 -1
- package/onboarding/prompts/subagent/create-plan.md +24 -1
- package/onboarding/prompts/subagent/implement-and-validate.md +32 -1
- package/onboarding/prompts/subagent/inspect-repository.md +43 -16
- package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
- package/onboarding/prompts/subagent/prove-round-trip.md +37 -10
- package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
- package/package.json +7 -3
- package/release/release-tool.js +1 -1
|
@@ -2,16 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
Work only on the packet you were assigned. Inspect the repository without changing it.
|
|
4
4
|
|
|
5
|
+
## Start with what the CLI already knows
|
|
6
|
+
|
|
7
|
+
Run this first, from the target project directory:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
npx --yes copilotkit@4.13.0 onboard inspect --json
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
It answers the deterministic half of both packets exactly, from the same code
|
|
14
|
+
`copilotkit verify` uses: the project record by presence, and, for each app or runtime
|
|
15
|
+
directory on its own, the env files, which variable carries the Intelligence key and which
|
|
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, and the exact installed version of every
|
|
18
|
+
`@copilotkit/*` dependency. It reads only and prints no secret value.
|
|
19
|
+
|
|
20
|
+
Carry those readings into your findings as they came back. Do not work one of them out
|
|
21
|
+
again by reading files. The directory that owns `.env` is the hard case and the CLI holds
|
|
22
|
+
the fixes for it, so a second answer derived here is a guess competing with a proof.
|
|
23
|
+
|
|
24
|
+
An empty `apps` array is an answer, not a failed probe. App discovery keys on a declared
|
|
25
|
+
`@copilotkit/*` dependency, so a project that has not installed CopilotKit reports no apps
|
|
26
|
+
however much else its tree holds. `appDiscovery` says why it is empty: `no-project` for a
|
|
27
|
+
target directory that holds no project yet, and `no-declared-dependency` for a project
|
|
28
|
+
where no directory declares one. Report that reason as the finding. Do not report that
|
|
29
|
+
the inspection found nothing.
|
|
30
|
+
|
|
5
31
|
## Project evidence packet
|
|
6
32
|
|
|
7
33
|
Find evidence for:
|
|
8
34
|
|
|
9
35
|
- what the project is for, in the project's own words
|
|
10
|
-
- the target app or runtime directory that owns `.env` and the CopilotKit setup
|
|
11
36
|
- whether the target project directory contains any entries
|
|
12
|
-
- any existing agent framework and frontend
|
|
13
|
-
|
|
14
|
-
|
|
37
|
+
- any existing agent framework and frontend, confirming or contradicting the
|
|
38
|
+
`detection` block the CLI proposed
|
|
39
|
+
- current CopilotKit integration and configuration
|
|
15
40
|
- authentication boundaries
|
|
16
41
|
- initial changed and untracked paths, without file contents
|
|
17
42
|
|
|
@@ -21,25 +46,27 @@ protected-path audit compares against, so nothing later in the run depends on th
|
|
|
21
46
|
subagent still existing, and a path that can hold secrets is captured as a digest you
|
|
22
47
|
never read.
|
|
23
48
|
|
|
49
|
+
Take the target app or runtime directory from the CLI packet rather than working it out
|
|
50
|
+
here. `copilotkit verify` resolves it, and two fixes live in that resolution which a
|
|
51
|
+
reading of the files will not reproduce.
|
|
52
|
+
|
|
24
53
|
## Environment evidence packet
|
|
25
54
|
|
|
26
|
-
- names of required credential variables
|
|
27
|
-
`CPK_INTELLIGENCE_API_KEY`
|
|
55
|
+
- names of required credential variables, beyond the Intelligence key the CLI reported
|
|
28
56
|
- retain the `.env` modification time for a later comparison without returning it
|
|
29
|
-
- package manager and lockfile
|
|
30
57
|
- required toolchains and their installed versions
|
|
31
|
-
-
|
|
58
|
+
- whether each port the CLI reported as declared is free
|
|
32
59
|
- whether the runtime constructor uses a `runner` option, an `intelligence` option, or
|
|
33
60
|
neither can be proved from project files
|
|
34
|
-
-
|
|
61
|
+
- package compatibility risks, and whether any `@copilotkit/*` version the CLI reported is
|
|
62
|
+
below 1.70.0
|
|
35
63
|
|
|
36
64
|
Key every environment finding by its app or runtime directory. Do not combine findings
|
|
37
|
-
from different directories.
|
|
65
|
+
from different directories. The CLI packet keys its own readings the same way.
|
|
38
66
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
range does not answer it.
|
|
67
|
+
The CLI reports the exact installed version of every `@copilotkit/*` dependency, read from
|
|
68
|
+
the installed tree rather than from a manifest range. The conversion decides its upgrade
|
|
69
|
+
from exactly that, and a caret range does not answer it.
|
|
43
70
|
|
|
44
71
|
A project states what it is for in its `README.md`, in its package description, or in
|
|
45
72
|
the prompt of an agent it already has. Quote that statement rather than rewriting it. An
|
|
@@ -59,5 +86,5 @@ Return one row for each assigned item with its status, evidence path, and a shor
|
|
|
59
86
|
Use only `proved`, `absent`, or `unproved` for the status. State each absent or unproved item.
|
|
60
87
|
Do not read, print, or return secret values. For `.env` and `.copilotkit/project.json`
|
|
61
88
|
checks, return only paths, presence checks, and missing field names. Do not read a file
|
|
62
|
-
outside the project directory. Do not run or return
|
|
63
|
-
returning the findings to the main coding agent.
|
|
89
|
+
outside the project directory. Do not run or return an onboarding command other than
|
|
90
|
+
`onboard inspect`. Stop after returning the findings to the main coding agent.
|
|
@@ -19,7 +19,7 @@ Prove the live runtime in this order:
|
|
|
19
19
|
4. Confirm from project files that the runtime constructor passes a `runner` option rather
|
|
20
20
|
than an `intelligence` option. A package, import, project file, or key is not use proof.
|
|
21
21
|
5. Run
|
|
22
|
-
`npx --yes copilotkit@4.
|
|
22
|
+
`npx --yes copilotkit@4.13.0 verify --expect-runtime oss --round-trip --agent <expected-agent-id> --json`,
|
|
23
23
|
with the runtime URL or auth header options that this project needs. Require exit zero
|
|
24
24
|
and the JSON `ok` field to be `true`.
|
|
25
25
|
6. Drive one real request through the existing frontend, CopilotKit runtime, and expected
|
|
@@ -9,6 +9,16 @@ You can make only operational repairs to project-owned processes, ports, and req
|
|
|
9
9
|
Do not write a path that overlaps a protected path. If a required proof or tool path
|
|
10
10
|
overlaps one, return `Status: blocked` before writing it.
|
|
11
11
|
|
|
12
|
+
The existing agent's behavior is outside every step of this proof. It is four things: the
|
|
13
|
+
agent's system prompt and instructions, its tools and what those tools do, its model and
|
|
14
|
+
provider configuration, and its memory or state handling. A failing predicate is repaired
|
|
15
|
+
on the CopilotKit side -- the frontend rendering, the tool schema, the runtime wiring.
|
|
16
|
+
Where the only fix you can find is a change to the agent's instructions or tools, stop and
|
|
17
|
+
return the failing predicate with the change you propose, for the developer to approve.
|
|
18
|
+
Such a change is a behavior change rather than a repair: it changes how the agent answers
|
|
19
|
+
everywhere, not only in CopilotKit. Never rewrite the agent's prompt to make a component
|
|
20
|
+
render, and never report a round trip proved by a prompt this run rewrote.
|
|
21
|
+
|
|
12
22
|
Run the steps below in the order they appear. They are the proof. Do not design a
|
|
13
23
|
different sequence of your own, and do not drop a step because an earlier one looked
|
|
14
24
|
convincing. Step 6 has a web form and a React Native form: run the one that matches this
|
|
@@ -135,7 +145,7 @@ IPv6 only, so an IPv4 literal fails against the correct port.
|
|
|
135
145
|
## Step 4 -- Check the wiring
|
|
136
146
|
|
|
137
147
|
With both running, check the wiring in one command before you open a browser:
|
|
138
|
-
`npx --yes copilotkit@4.
|
|
148
|
+
`npx --yes copilotkit@4.13.0 verify --json`. It reads the port from this project, so a
|
|
139
149
|
non-default port needs no flag. The payload reports `runtimeUrl` and `runtimeUrlSource`. A
|
|
140
150
|
`runtimeUrlSource` of `default` means nothing in the project named a port, so pass
|
|
141
151
|
`--runtime-url` with the URL from step 1 in that case. Read the individual checks rather than
|
|
@@ -149,10 +159,11 @@ used the Intelligence credential. `api_key_authenticates` proves only that the k
|
|
|
149
159
|
`api_key_loadable_by_app` fails when the key is in a file the application's own process
|
|
150
160
|
will not read. `verify` searches upward for the credential and a framework's env loader
|
|
151
161
|
does not, so a key at the repository root is invisible to an app in a subdirectory. The
|
|
152
|
-
check names the file to write instead
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
the
|
|
162
|
+
check names the file to write instead, and it names the exact command to re-run with this
|
|
163
|
+
project already chosen. Write the key there, or run the command the check names, from the
|
|
164
|
+
app directory. Do not run a bare `project select`: with no project named it needs a
|
|
165
|
+
terminal you do not have. Do not link, copy, or symlink the file to work around it, and do
|
|
166
|
+
not treat the credential as missing: the check above already reported that it exists.
|
|
156
167
|
|
|
157
168
|
`intelligence_thread_routes` fails when a licensed runtime serves no thread routes. A missing
|
|
158
169
|
`identifyUser` is the usual cause: it gates the whole web surface. Return the check for
|
|
@@ -168,7 +179,7 @@ named no port the CLI can read: keep step 2's URL, and rewrite its host as `loca
|
|
|
168
179
|
before you use it.
|
|
169
180
|
|
|
170
181
|
Then run the command once more with the URL you are about to open:
|
|
171
|
-
`npx --yes copilotkit@4.
|
|
182
|
+
`npx --yes copilotkit@4.13.0 verify --frontend-url <that url> --json`. The
|
|
172
183
|
`frontend_assets_served` check asks that server for its page and for one of the page's own
|
|
173
184
|
assets, on that exact host. A `fail` there means the dev server refuses its own static
|
|
174
185
|
assets on the host you were about to use, and the check names the URL to use instead. This
|
|
@@ -176,7 +187,7 @@ is the cheapest step that can save the most expensive one, so run it before the
|
|
|
176
187
|
|
|
177
188
|
## Step 5 -- Prove that the agent runs
|
|
178
189
|
|
|
179
|
-
Run `npx --yes copilotkit@4.
|
|
190
|
+
Run `npx --yes copilotkit@4.13.0 verify --round-trip --json`. It sends one request through
|
|
180
191
|
the runtime and reads the answer back from the thread, so it separates an agent that is
|
|
181
192
|
configured from an agent that works. Use `--agent <id>` when the runtime declares more
|
|
182
193
|
than one. If it reports `user-not-identified`, this project's `identifyUser` reads a
|
|
@@ -189,7 +200,7 @@ Where this run settled a Learning Container, add the flag to the call above rath
|
|
|
189
200
|
running a second round trip:
|
|
190
201
|
|
|
191
202
|
```text
|
|
192
|
-
npx --yes copilotkit@4.
|
|
203
|
+
npx --yes copilotkit@4.13.0 verify --round-trip --expect-learning-container <container id> --json
|
|
193
204
|
```
|
|
194
205
|
|
|
195
206
|
The check reads the thread that this run created, so a second round trip proves a second
|
|
@@ -217,6 +228,22 @@ callback rather than from an assigned thread. Never report either one as proof.
|
|
|
217
228
|
|
|
218
229
|
Where this run skipped the Learning step, leave the flag off.
|
|
219
230
|
|
|
231
|
+
Where the runtime answers with a 401 from the model provider, check the processes before
|
|
232
|
+
you change anything. A process reads its env file once, at launch, so one started before
|
|
233
|
+
the credential was written holds an empty key while the file beside it carries the real
|
|
234
|
+
one. Run this from the target app directory:
|
|
235
|
+
|
|
236
|
+
```text
|
|
237
|
+
npx --yes copilotkit@4.13.0 onboard env-staleness
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
A `stale` line names the env file and how long after launch it was written. Report that,
|
|
241
|
+
with the process and the file it named, and say the process has to be started again before
|
|
242
|
+
the 401 means anything. Do not restart it yourself and do not stop it: the reading names a
|
|
243
|
+
process and never its owner, and one project's dev script often serves the agent and the
|
|
244
|
+
frontend together. Editing a file to answer a 401 that a restart clears changes the project
|
|
245
|
+
for a fault it does not have.
|
|
246
|
+
|
|
220
247
|
### Step 5a -- Prove that the page's data reaches the model
|
|
221
248
|
|
|
222
249
|
`verify --round-trip` sends `context: []` and asks a question that needs no context. It
|
|
@@ -285,7 +312,7 @@ For a recorded `both-oss` starting state, this step has no component to render.
|
|
|
285
312
|
same request the baseline recorded, require the same kind of user-visible result the
|
|
286
313
|
baseline produced, and require that the thread for that request is listed in the drawer.
|
|
287
314
|
Where this journey's frontend framework ships no threads drawer -- React Native --, prove
|
|
288
|
-
that thread with `npx --yes copilotkit@4.
|
|
315
|
+
that thread with `npx --yes copilotkit@4.13.0 verify --round-trip`, which reads the
|
|
289
316
|
answer back off the thread and needs no browser. Record which of the two you proved.
|
|
290
317
|
|
|
291
318
|
Use the surface control the main coding agent recorded for your environment. It either had
|
|
@@ -313,7 +340,7 @@ request never exercises. Drive it with the browser control step 6 named.
|
|
|
313
340
|
the page to finish loading. Do not retype the host, and do not substitute a URL a tool
|
|
314
341
|
offers you by default. Where the page loads but its styling is missing or the chat
|
|
315
342
|
control is dead, run
|
|
316
|
-
`npx --yes copilotkit@4.
|
|
343
|
+
`npx --yes copilotkit@4.13.0 verify --frontend-url <the url you opened> --json`
|
|
317
344
|
before you diagnose anything else. A dev server can serve its page and refuse every
|
|
318
345
|
static chunk behind it, and on screen that is indistinguishable from a broken
|
|
319
346
|
integration. The `frontend_assets_served` check tells the two apart.
|
|
@@ -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 --yes copilotkit@4.
|
|
33
|
+
`npx --yes copilotkit@4.13.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 --yes copilotkit@4.
|
|
39
|
+
npx --yes copilotkit@4.13.0 onboard friction --phase stop --category <slug>
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Write one or two sentences to standard input: the step you stopped at and what stopped it.
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "copilotkit",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.13.0",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=20.9.0"
|
|
7
|
+
},
|
|
5
8
|
"repository": {
|
|
6
9
|
"type": "git",
|
|
7
10
|
"url": "git+https://github.com/CopilotKit/Intelligence.git",
|
|
@@ -10,7 +13,8 @@
|
|
|
10
13
|
"bin": {
|
|
11
14
|
"copilotkit": "./index.js"
|
|
12
15
|
},
|
|
13
|
-
"
|
|
16
|
+
"optionalDependencies": {
|
|
14
17
|
"@microsoft/teams.cli": "3.0.3"
|
|
15
|
-
}
|
|
18
|
+
},
|
|
19
|
+
"license": "SEE LICENSE IN LICENSE"
|
|
16
20
|
}
|
package/release/release-tool.js
CHANGED
|
@@ -14698,7 +14698,7 @@ import * as path4 from "node:path";
|
|
|
14698
14698
|
|
|
14699
14699
|
// apps/cli/src/config.ts
|
|
14700
14700
|
function getTemplateRef() {
|
|
14701
|
-
return true ? "
|
|
14701
|
+
return true ? "1e13b4945b44c6afa2e398a0c9935415d4aa7577" : "main";
|
|
14702
14702
|
}
|
|
14703
14703
|
|
|
14704
14704
|
// apps/cli/src/services/agentcore-config.ts
|