copilotkit 4.15.0 → 4.16.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 +49 -6
- package/cli-build-info.json +8 -8
- package/index.js +22447 -2987
- package/onboarding/index.json +1 -1
- package/onboarding/prompts/authenticate/start.md +8 -8
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +7 -7
- package/onboarding/prompts/credentials/plan.md +21 -21
- package/onboarding/prompts/credentials/settle-credentials.md +9 -9
- package/onboarding/prompts/credentials/write-plan.md +5 -5
- package/onboarding/prompts/fallback/best-effort.md +6 -6
- package/onboarding/prompts/feature/a2ui/implement.md +6 -6
- package/onboarding/prompts/feature/a2ui/proof.md +6 -6
- package/onboarding/prompts/feature/a2ui/start.md +7 -7
- package/onboarding/prompts/feature/channels/implement.md +7 -7
- package/onboarding/prompts/feature/channels/proof.md +6 -6
- package/onboarding/prompts/feature/channels/start.md +7 -7
- package/onboarding/prompts/feature/chat-suggestions/implement.md +6 -6
- package/onboarding/prompts/feature/chat-suggestions/proof.md +6 -6
- package/onboarding/prompts/feature/chat-suggestions/start.md +7 -7
- package/onboarding/prompts/feature/complete.md +2 -2
- package/onboarding/prompts/feature/learning/implement.md +15 -15
- package/onboarding/prompts/feature/learning/proof.md +7 -7
- package/onboarding/prompts/feature/learning/start.md +8 -8
- package/onboarding/prompts/feature/open-generative-ui/implement.md +6 -6
- package/onboarding/prompts/feature/open-generative-ui/proof.md +6 -6
- package/onboarding/prompts/feature/open-generative-ui/start.md +7 -7
- package/onboarding/prompts/feature/realtime-sync/implement.md +7 -7
- package/onboarding/prompts/feature/realtime-sync/proof.md +6 -6
- package/onboarding/prompts/feature/realtime-sync/start.md +6 -6
- package/onboarding/prompts/feature/rich-threads/implement.md +8 -8
- package/onboarding/prompts/feature/rich-threads/proof.md +6 -6
- package/onboarding/prompts/feature/rich-threads/start.md +6 -6
- package/onboarding/prompts/feature/stop.md +3 -3
- package/onboarding/prompts/feature/voice/implement.md +6 -6
- package/onboarding/prompts/feature/voice/proof.md +6 -6
- package/onboarding/prompts/feature/voice/start.md +7 -7
- package/onboarding/prompts/framework/ag2.md +2 -2
- package/onboarding/prompts/framework/agno.md +2 -2
- package/onboarding/prompts/framework/built-in.md +2 -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 +2 -2
- package/onboarding/prompts/framework/google-adk.md +2 -2
- 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 +2 -2
- 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 +2 -2
- package/onboarding/prompts/framework/pydantic-ai.md +2 -2
- package/onboarding/prompts/framework/strands-python.md +2 -2
- package/onboarding/prompts/framework/strands-typescript.md +2 -2
- package/onboarding/prompts/frontend/angular.md +3 -3
- package/onboarding/prompts/frontend/nextjs.md +3 -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 +15 -15
- package/onboarding/prompts/proof/complete.md +8 -8
- package/onboarding/prompts/proof/oss-baseline.md +5 -5
- package/onboarding/prompts/proof/round-trip.md +10 -10
- package/onboarding/prompts/research/gather.md +6 -6
- package/onboarding/prompts/research/merge.md +3 -3
- package/onboarding/prompts/research/preflight.md +4 -4
- package/onboarding/prompts/research/route.md +5 -5
- package/onboarding/prompts/starter/clone.md +22 -15
- package/onboarding/prompts/stopped/run-failed.md +8 -2
- package/onboarding/prompts/subagent/create-plan.md +1 -1
- package/onboarding/prompts/subagent/inspect-repository.md +1 -1
- package/onboarding/prompts/subagent/prove-oss-baseline.md +7 -1
- package/onboarding/prompts/subagent/prove-round-trip.md +17 -7
- package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
- package/package.json +1 -1
- package/release/release-tool.js +52 -7
|
@@ -23,6 +23,12 @@ Say what the developer has now. Name the processes still running and the files t
|
|
|
23
23
|
changed, so they can carry on by hand or start again from a known state. A run that stops
|
|
24
24
|
without saying what it left behind leaves the developer to discover it.
|
|
25
25
|
|
|
26
|
+
A step can fail on a network error: `EAI_AGAIN`, `ECONNRESET`, `ETIMEDOUT`, a timeout,
|
|
27
|
+
or a message that names a proxy. The CLI has already tried that step again. Ask the
|
|
28
|
+
developer to check their network, VPN, or proxy setting. This fix needs no file changes.
|
|
29
|
+
When the network works, propose it as the one fix below, and come back with
|
|
30
|
+
`onboard resume`.
|
|
31
|
+
|
|
26
32
|
## If one scoped fix can finish this run
|
|
27
33
|
|
|
28
34
|
Do not decide this yourself. This run refused to widen its own scope, and that refusal
|
|
@@ -35,7 +41,7 @@ put to them, stop here and send the report below.
|
|
|
35
41
|
If they approve it, make that one fix and nothing else. Then come back into this run:
|
|
36
42
|
|
|
37
43
|
```text
|
|
38
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
44
|
+
npx --prefer-offline --yes copilotkit@4.16.0 onboard resume --message "<approval>"
|
|
39
45
|
```
|
|
40
46
|
|
|
41
47
|
Put the developer's approval in `--message`, in one or two sentences: the fix they
|
|
@@ -58,7 +64,7 @@ Send one short report. Run the friction command without another developer questi
|
|
|
58
64
|
ask the developer about telemetry: the command applies the setting they already have.
|
|
59
65
|
|
|
60
66
|
```text
|
|
61
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
67
|
+
npx --prefer-offline --yes copilotkit@4.16.0 onboard friction --phase stop --category <slug> --message "<sentences>"
|
|
62
68
|
```
|
|
63
69
|
|
|
64
70
|
`--message` takes one or two sentences: the step you stopped at and what stopped
|
|
@@ -170,7 +170,7 @@ here is work the developer did not ask for.
|
|
|
170
170
|
Plan the threads drawer itself: add it from the selected drawer page, where this frontend
|
|
171
171
|
does not already render one. Where this journey's frontend framework ships no threads
|
|
172
172
|
drawer -- React Native --, plan that the thread is proved by
|
|
173
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
173
|
+
`npx --prefer-offline --yes copilotkit@4.16.0 verify --round-trip`, which needs no browser. Do not plan a
|
|
174
174
|
step that opens the managed Intelligence dashboard.
|
|
175
175
|
|
|
176
176
|
## Order the plan into steps
|
|
@@ -7,7 +7,7 @@ Work only on the packet you were assigned. Inspect the repository without changi
|
|
|
7
7
|
Run this first, from the target project directory:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
10
|
+
npx --prefer-offline --yes copilotkit@4.16.0 onboard inspect --json
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
It answers the deterministic half of both packets exactly, from the same code
|
|
@@ -7,6 +7,12 @@ Find the expected agent id from the project. Start the existing agent and fronte
|
|
|
7
7
|
when they are not already running. Before using a port, identify its process and working
|
|
8
8
|
directory. Do not stop a process outside this project.
|
|
9
9
|
|
|
10
|
+
`next dev` locks its build directory, not its port. Next 16 writes `.next/dev/lock`. A
|
|
11
|
+
second `next dev` in the same app exits with `Unable to acquire lock at ..., is another
|
|
12
|
+
instance of next dev running?`. A free port does not help. If a `next dev` process already
|
|
13
|
+
runs from this app, reuse that server. Prove against its port. If a start still fails with
|
|
14
|
+
that message, name the process that holds the lock. Give its PID and working directory.
|
|
15
|
+
|
|
10
16
|
If your harness runs commands in a sandbox, a sandboxed command cannot listen on a port or
|
|
11
17
|
connect to localhost. Before the first server start, request escalation with a prefix rule
|
|
12
18
|
for the project's own dev script. Before the first request to a local server, request
|
|
@@ -26,7 +32,7 @@ Prove the live runtime in this order:
|
|
|
26
32
|
4. Confirm from project files that the runtime constructor passes a `runner` option rather
|
|
27
33
|
than an `intelligence` option. A package, import, project file, or key is not use proof.
|
|
28
34
|
5. Run
|
|
29
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
35
|
+
`npx --prefer-offline --yes copilotkit@4.16.0 verify --expect-runtime oss --round-trip --agent <expected-agent-id> --json`,
|
|
30
36
|
with the runtime URL or auth header options that this project needs. Require exit zero
|
|
31
37
|
and the JSON `ok` field to be `true`.
|
|
32
38
|
6. Drive one real request through the existing frontend, CopilotKit runtime, and expected
|
|
@@ -89,6 +89,16 @@ agent and the frontend from one `dev` script, which runs them under
|
|
|
89
89
|
other. A second start against a project already running that script collides with a server
|
|
90
90
|
that is up.
|
|
91
91
|
|
|
92
|
+
`next dev` locks its build directory, not its port. Next 16 writes `.next/dev/lock`. A
|
|
93
|
+
second `next dev` in the same app exits with `Unable to acquire lock at ..., is another
|
|
94
|
+
instance of next dev running?`. A free port does not help.
|
|
95
|
+
|
|
96
|
+
Before you start a Next.js frontend, look for a `next dev` process that runs from this app.
|
|
97
|
+
If one runs, reuse that server. Read its port from its command line or its listener, and
|
|
98
|
+
prove against that port. If a start still fails with that message, name the process that
|
|
99
|
+
holds the lock. Give its PID and working directory. Do not stop it unless it belongs to
|
|
100
|
+
this project.
|
|
101
|
+
|
|
92
102
|
If your harness runs commands in a sandbox, a sandboxed command cannot listen on a port or
|
|
93
103
|
connect to localhost. Before the first server start, request escalation with a prefix rule
|
|
94
104
|
for the project's own dev script. Before the first request to a local server, request
|
|
@@ -147,7 +157,7 @@ IPv6 only, so an IPv4 literal fails against the correct port.
|
|
|
147
157
|
## Step 4 -- Check the wiring
|
|
148
158
|
|
|
149
159
|
With both running, check the wiring in one command before you open a browser:
|
|
150
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
160
|
+
`npx --prefer-offline --yes copilotkit@4.16.0 verify --json`. It reads the port from this project, so a
|
|
151
161
|
non-default port needs no flag. The payload reports `runtimeUrl` and `runtimeUrlSource`. A
|
|
152
162
|
`runtimeUrlSource` of `default` means nothing in the project named a port, so pass
|
|
153
163
|
`--runtime-url` with the URL from step 1 in that case. Read the individual checks rather than
|
|
@@ -181,7 +191,7 @@ named no port the CLI can read: keep step 2's URL, and rewrite its host as `loca
|
|
|
181
191
|
before you use it.
|
|
182
192
|
|
|
183
193
|
Then run the command once more with the URL you are about to open:
|
|
184
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
194
|
+
`npx --prefer-offline --yes copilotkit@4.16.0 verify --frontend-url <that url> --json`. The
|
|
185
195
|
`frontend_assets_served` check asks that server for its page and for one of the page's own
|
|
186
196
|
assets, on that exact host. A `fail` there means the dev server refuses its own static
|
|
187
197
|
assets on the host you were about to use, and the check names the URL to use instead. This
|
|
@@ -189,7 +199,7 @@ is the cheapest step that can save the most expensive one, so run it before the
|
|
|
189
199
|
|
|
190
200
|
## Step 5 -- Prove that the agent runs
|
|
191
201
|
|
|
192
|
-
Run `npx --prefer-offline --yes copilotkit@4.
|
|
202
|
+
Run `npx --prefer-offline --yes copilotkit@4.16.0 verify --round-trip --json`. It sends one request through
|
|
193
203
|
the runtime and reads the answer back from the thread, so it separates an agent that is
|
|
194
204
|
configured from an agent that works. Use `--agent <id>` when the runtime declares more
|
|
195
205
|
than one. If it reports `user-not-identified`, this project's `identifyUser` reads a
|
|
@@ -202,7 +212,7 @@ Where this run settled a Learning Container, add the flag to the call above rath
|
|
|
202
212
|
running a second round trip:
|
|
203
213
|
|
|
204
214
|
```text
|
|
205
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
215
|
+
npx --prefer-offline --yes copilotkit@4.16.0 verify --round-trip --expect-learning-container <container id> --json
|
|
206
216
|
```
|
|
207
217
|
|
|
208
218
|
The check reads the thread that this run created, so a second round trip proves a second
|
|
@@ -236,7 +246,7 @@ the credential was written holds an empty key while the file beside it carries t
|
|
|
236
246
|
one. Run this from the target app directory:
|
|
237
247
|
|
|
238
248
|
```text
|
|
239
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
249
|
+
npx --prefer-offline --yes copilotkit@4.16.0 onboard env-staleness
|
|
240
250
|
```
|
|
241
251
|
|
|
242
252
|
A `stale` line names the env file and how long after launch it was written. Report that,
|
|
@@ -314,7 +324,7 @@ For a recorded `both-oss` starting state, this step has no component to render.
|
|
|
314
324
|
same request the baseline recorded, require the same kind of user-visible result the
|
|
315
325
|
baseline produced, and require that the thread for that request is listed in the drawer.
|
|
316
326
|
Where this journey's frontend framework ships no threads drawer -- React Native --, prove
|
|
317
|
-
that thread with `npx --prefer-offline --yes copilotkit@4.
|
|
327
|
+
that thread with `npx --prefer-offline --yes copilotkit@4.16.0 verify --round-trip`, which reads the
|
|
318
328
|
answer back off the thread and needs no browser. Record which of the two you proved.
|
|
319
329
|
|
|
320
330
|
Use the surface control the main coding agent recorded for your environment. It either had
|
|
@@ -342,7 +352,7 @@ request never exercises. Drive it with the browser control step 6 named.
|
|
|
342
352
|
the page to finish loading. Do not retype the host, and do not substitute a URL a tool
|
|
343
353
|
offers you by default. Where the page loads but its styling is missing or the chat
|
|
344
354
|
control is dead, run
|
|
345
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
355
|
+
`npx --prefer-offline --yes copilotkit@4.16.0 verify --frontend-url <the url you opened> --json`
|
|
346
356
|
before you diagnose anything else. A dev server can serve its page and refuse every
|
|
347
357
|
static chunk behind it, and on screen that is indistinguishable from a broken
|
|
348
358
|
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 --prefer-offline --yes copilotkit@4.
|
|
33
|
+
`npx --prefer-offline --yes copilotkit@4.16.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.16.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
package/release/release-tool.js
CHANGED
|
@@ -14811,7 +14811,7 @@ var FLAG_DEFINITIONS = defineFlags({
|
|
|
14811
14811
|
|
|
14812
14812
|
// apps/cli/src/config.ts
|
|
14813
14813
|
function getTemplateRef() {
|
|
14814
|
-
return true ? "
|
|
14814
|
+
return true ? "a933af0b132e61d2d04be7ce0a8f55743af21ccc" : "main";
|
|
14815
14815
|
}
|
|
14816
14816
|
|
|
14817
14817
|
// apps/cli/src/services/agentcore-config.ts
|
|
@@ -15320,6 +15320,7 @@ var FRAMEWORK_TEMPLATES = {
|
|
|
15320
15320
|
// key requirement here would falsely warn on valid Azure/`agent/.env`
|
|
15321
15321
|
// setups — the guidance below points at `agent/.env` instead.
|
|
15322
15322
|
environment: [],
|
|
15323
|
+
modelKeyTargets: [{ key: "OPENAI_API_KEY", envFile: "agent/.env" }],
|
|
15323
15324
|
setupNotes: [
|
|
15324
15325
|
{ text: " Set up the agent model credentials in agent/.env:" },
|
|
15325
15326
|
{ text: " OpenAI: ", code: "OPENAI_API_KEY=sk-..." },
|
|
@@ -15511,24 +15512,68 @@ function readEntries(dir) {
|
|
|
15511
15512
|
}
|
|
15512
15513
|
}
|
|
15513
15514
|
function findProjectsBelow(dir) {
|
|
15515
|
+
return walkProjectsBelow(dir, readEntries(dir), {
|
|
15516
|
+
stopAfter: Number.POSITIVE_INFINITY,
|
|
15517
|
+
maxEntries: Number.POSITIVE_INFINITY
|
|
15518
|
+
}).found.sort();
|
|
15519
|
+
}
|
|
15520
|
+
function readEntriesUpTo(dir, limit) {
|
|
15521
|
+
if (limit === Number.POSITIVE_INFINITY) {
|
|
15522
|
+
return {
|
|
15523
|
+
entries: fs4.readdirSync(dir, { withFileTypes: true }),
|
|
15524
|
+
exhausted: false
|
|
15525
|
+
};
|
|
15526
|
+
}
|
|
15527
|
+
const handle = fs4.opendirSync(dir);
|
|
15528
|
+
const entries = [];
|
|
15529
|
+
try {
|
|
15530
|
+
for (let entry = handle.readSync(); entry !== null; entry = handle.readSync()) {
|
|
15531
|
+
if (entries.length >= limit)
|
|
15532
|
+
return { entries, exhausted: true };
|
|
15533
|
+
entries.push(entry);
|
|
15534
|
+
}
|
|
15535
|
+
return { entries, exhausted: false };
|
|
15536
|
+
} finally {
|
|
15537
|
+
handle.closeSync();
|
|
15538
|
+
}
|
|
15539
|
+
}
|
|
15540
|
+
function walkProjectsBelow(dir, top, limits) {
|
|
15514
15541
|
const found = [];
|
|
15515
|
-
|
|
15516
|
-
|
|
15542
|
+
let budget = limits.maxEntries - top.length;
|
|
15543
|
+
let exhausted = budget < 0;
|
|
15544
|
+
const readChild = (childDir) => {
|
|
15545
|
+
try {
|
|
15546
|
+
const read = readEntriesUpTo(childDir, budget);
|
|
15547
|
+
budget -= read.entries.length;
|
|
15548
|
+
if (read.exhausted)
|
|
15549
|
+
exhausted = true;
|
|
15550
|
+
return read.entries;
|
|
15551
|
+
} catch {
|
|
15552
|
+
return [];
|
|
15553
|
+
}
|
|
15554
|
+
};
|
|
15555
|
+
const visit = (relative, entries, depth) => {
|
|
15556
|
+
for (const entry of entries) {
|
|
15557
|
+
if (found.length >= limits.stopAfter || exhausted)
|
|
15558
|
+
return;
|
|
15517
15559
|
if (!entry.isDirectory())
|
|
15518
15560
|
continue;
|
|
15519
15561
|
if (entry.name.startsWith(".") || entry.name === "node_modules")
|
|
15520
15562
|
continue;
|
|
15521
15563
|
const child = path4.join(relative, entry.name);
|
|
15522
|
-
const
|
|
15564
|
+
const childEntries = readChild(path4.join(dir, child));
|
|
15565
|
+
if (exhausted)
|
|
15566
|
+
return;
|
|
15567
|
+
const names = childEntries.map((e) => e.name);
|
|
15523
15568
|
if (names.some((n) => n === ".git" || PROJECT_MANIFEST_NAMES.has(n))) {
|
|
15524
15569
|
found.push(child);
|
|
15525
15570
|
} else if (depth < PROJECTS_BELOW_DEPTH) {
|
|
15526
|
-
visit(child, depth + 1);
|
|
15571
|
+
visit(child, childEntries, depth + 1);
|
|
15527
15572
|
}
|
|
15528
15573
|
}
|
|
15529
15574
|
};
|
|
15530
|
-
visit("", 1);
|
|
15531
|
-
return found
|
|
15575
|
+
visit("", top, 1);
|
|
15576
|
+
return { found, exhausted };
|
|
15532
15577
|
}
|
|
15533
15578
|
function readProjectDirContents(projectDir, homeDir = os.homedir()) {
|
|
15534
15579
|
if (!fs4.existsSync(projectDir))
|