copilotkit 4.9.60 → 4.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/cli-build-info.json +8 -8
- package/index.js +336 -172
- package/onboarding/index.json +106 -18
- package/onboarding/prompts/authenticate/start.md +41 -202
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +15 -129
- package/onboarding/prompts/credentials/plan.md +20 -20
- package/onboarding/prompts/credentials/settle-credentials.md +153 -0
- package/onboarding/prompts/credentials/write-plan.md +93 -0
- package/onboarding/prompts/fallback/best-effort.md +12 -9
- package/onboarding/prompts/feature/a2ui/implement.md +35 -6
- package/onboarding/prompts/feature/a2ui/proof.md +30 -6
- package/onboarding/prompts/feature/a2ui/start.md +29 -6
- package/onboarding/prompts/feature/channels/implement.md +70 -0
- package/onboarding/prompts/feature/channels/proof.md +60 -0
- package/onboarding/prompts/feature/channels/start.md +87 -0
- package/onboarding/prompts/feature/chat-suggestions/implement.md +36 -6
- package/onboarding/prompts/feature/chat-suggestions/proof.md +30 -5
- package/onboarding/prompts/feature/chat-suggestions/start.md +29 -6
- package/onboarding/prompts/feature/complete.md +11 -0
- package/onboarding/prompts/feature/learning/implement.md +41 -12
- package/onboarding/prompts/feature/learning/proof.md +32 -6
- package/onboarding/prompts/feature/learning/start.md +28 -5
- package/onboarding/prompts/feature/open-generative-ui/implement.md +37 -6
- package/onboarding/prompts/feature/open-generative-ui/proof.md +30 -5
- package/onboarding/prompts/feature/open-generative-ui/start.md +29 -6
- package/onboarding/prompts/feature/realtime-sync/implement.md +36 -7
- package/onboarding/prompts/feature/realtime-sync/proof.md +29 -5
- package/onboarding/prompts/feature/realtime-sync/start.md +28 -5
- package/onboarding/prompts/feature/rich-threads/implement.md +37 -8
- package/onboarding/prompts/feature/rich-threads/proof.md +31 -5
- package/onboarding/prompts/feature/rich-threads/start.md +28 -5
- package/onboarding/prompts/feature/stop.md +17 -8
- package/onboarding/prompts/feature/voice/implement.md +35 -6
- package/onboarding/prompts/feature/voice/proof.md +30 -5
- package/onboarding/prompts/feature/voice/start.md +29 -6
- 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 +6 -6
- 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 +75 -15
- package/onboarding/prompts/proof/complete.md +21 -8
- package/onboarding/prompts/proof/oss-baseline.md +6 -5
- package/onboarding/prompts/proof/round-trip.md +27 -14
- package/onboarding/prompts/research/gather.md +121 -0
- package/onboarding/prompts/research/route.md +81 -0
- package/onboarding/prompts/starter/clone.md +18 -9
- package/onboarding/prompts/stopped/run-failed.md +44 -0
- package/onboarding/prompts/subagent/create-plan.md +32 -1
- package/onboarding/prompts/subagent/implement-and-validate.md +9 -1
- package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
- package/onboarding/prompts/subagent/prove-round-trip.md +52 -8
- package/onboarding/prompts/unsupported/no-validated-path.md +9 -6
- package/package.json +1 -1
- package/release/release-tool.js +39 -3
|
@@ -73,6 +73,12 @@ started process's output. The project's configuration wins over the table.
|
|
|
73
73
|
Where this project's runtime runs as a process of its own, the frontend documentation
|
|
74
74
|
puts it on port 8200. Use the runtime URL from step 1 rather than that number.
|
|
75
75
|
|
|
76
|
+
Read the project's scripts before you start anything. A scaffolded starter serves both the
|
|
77
|
+
agent and the frontend from one `dev` script, which runs them under
|
|
78
|
+
`concurrently --kill-others`. One command starts both, and stopping either one stops the
|
|
79
|
+
other. A second start against a project already running that script collides with a server
|
|
80
|
+
that is up.
|
|
81
|
+
|
|
76
82
|
Start each server in the background with the project's own script. Then wait for it to
|
|
77
83
|
answer rather than for a fixed number of seconds:
|
|
78
84
|
|
|
@@ -89,8 +95,14 @@ Read the loop's own last line rather than assuming it ended because the server a
|
|
|
89
95
|
A server that never answered has written the reason to its own output, and reading that
|
|
90
96
|
output is faster than starting it again.
|
|
91
97
|
|
|
98
|
+
That coupling also turns an ordinary restart into a false failure. Where you stop a server
|
|
99
|
+
to pick up an installed dependency, start both again and wait for both to answer before you
|
|
100
|
+
read the round trip. A check run against a frontend whose agent was stopped with it reports
|
|
101
|
+
a wiring fault this run does not have.
|
|
102
|
+
|
|
92
103
|
Leave the agent and frontend servers running after proof. Record each process ID and a
|
|
93
|
-
safe command that stops that process. Record
|
|
104
|
+
safe command that stops that process. Record whether that command stops both. Record the
|
|
105
|
+
commands that start both servers again.
|
|
94
106
|
|
|
95
107
|
Record the frontend URL the server you started reports, and treat it as provisional. Step 4
|
|
96
108
|
replaces it with the URL the CLI resolves. Do not compose one of your own from a port you
|
|
@@ -123,7 +135,7 @@ IPv6 only, so an IPv4 literal fails against the correct port.
|
|
|
123
135
|
## Step 4 -- Check the wiring
|
|
124
136
|
|
|
125
137
|
With both running, check the wiring in one command before you open a browser:
|
|
126
|
-
`npx --yes copilotkit@4.
|
|
138
|
+
`npx --yes copilotkit@4.10.1 verify --json`. It reads the port from this project, so a
|
|
127
139
|
non-default port needs no flag. The payload reports `runtimeUrl` and `runtimeUrlSource`. A
|
|
128
140
|
`runtimeUrlSource` of `default` means nothing in the project named a port, so pass
|
|
129
141
|
`--runtime-url` with the URL from step 1 in that case. Read the individual checks rather than
|
|
@@ -138,7 +150,7 @@ used the Intelligence credential. `api_key_authenticates` proves only that the k
|
|
|
138
150
|
will not read. `verify` searches upward for the credential and a framework's env loader
|
|
139
151
|
does not, so a key at the repository root is invisible to an app in a subdirectory. The
|
|
140
152
|
check names the file to write instead. Write the key there, or run
|
|
141
|
-
`npx --yes copilotkit@4.
|
|
153
|
+
`npx --yes copilotkit@4.10.1 project select` from the app directory. Do not link,
|
|
142
154
|
copy, or symlink the file to work around it, and do not treat the credential as missing:
|
|
143
155
|
the check above already reported that it exists.
|
|
144
156
|
|
|
@@ -156,7 +168,7 @@ named no port the CLI can read: keep step 2's URL, and rewrite its host as `loca
|
|
|
156
168
|
before you use it.
|
|
157
169
|
|
|
158
170
|
Then run the command once more with the URL you are about to open:
|
|
159
|
-
`npx --yes copilotkit@4.
|
|
171
|
+
`npx --yes copilotkit@4.10.1 verify --frontend-url <that url> --json`. The
|
|
160
172
|
`frontend_assets_served` check asks that server for its page and for one of the page's own
|
|
161
173
|
assets, on that exact host. A `fail` there means the dev server refuses its own static
|
|
162
174
|
assets on the host you were about to use, and the check names the URL to use instead. This
|
|
@@ -164,7 +176,7 @@ is the cheapest step that can save the most expensive one, so run it before the
|
|
|
164
176
|
|
|
165
177
|
## Step 5 -- Prove that the agent runs
|
|
166
178
|
|
|
167
|
-
Run `npx --yes copilotkit@4.
|
|
179
|
+
Run `npx --yes copilotkit@4.10.1 verify --round-trip --json`. It sends one request through
|
|
168
180
|
the runtime and reads the answer back from the thread, so it separates an agent that is
|
|
169
181
|
configured from an agent that works. Use `--agent <id>` when the runtime declares more
|
|
170
182
|
than one. If it reports `user-not-identified`, this project's `identifyUser` reads a
|
|
@@ -173,6 +185,38 @@ it again, because an auth-gated app refusing an unauthenticated caller is that a
|
|
|
173
185
|
working. Do not continue until this passes, and never report a round trip proven without
|
|
174
186
|
it.
|
|
175
187
|
|
|
188
|
+
Where this run settled a Learning Container, add the flag to the call above rather than
|
|
189
|
+
running a second round trip:
|
|
190
|
+
|
|
191
|
+
```text
|
|
192
|
+
npx --yes copilotkit@4.10.1 verify --round-trip --expect-learning-container <container id> --json
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The check reads the thread that this run created, so a second round trip proves a second
|
|
196
|
+
thread and leaves the first unexamined. Add `--agent <id>` here too when the runtime
|
|
197
|
+
declares more than one.
|
|
198
|
+
|
|
199
|
+
It reads the thread back from the platform, so it answers for every runtime mount,
|
|
200
|
+
including a single-route one. Read the `extraChecks` entry whose `id` is
|
|
201
|
+
`learning_container_assigned`, and route on that entry's own `status` rather than on the
|
|
202
|
+
exit status: the command exits non-zero for any check that is not `pass`, and
|
|
203
|
+
`undetermined` is what a runtime the CLI cannot read reports.
|
|
204
|
+
|
|
205
|
+
- `pass` proves the assignment. The thread came back carrying the container this run
|
|
206
|
+
settled.
|
|
207
|
+
- `fail` is a defect. Either the thread carries no container, which means the selector
|
|
208
|
+
returned nothing, or it carries a different one. A thread cannot move between containers
|
|
209
|
+
after its first assignment, so start a new thread rather than repairing that one.
|
|
210
|
+
- `undetermined` proves nothing either way. Record it and continue. An auth-gated
|
|
211
|
+
`identifyUser` produces it on an app that works, and so does a runtime the CLI cannot
|
|
212
|
+
read.
|
|
213
|
+
|
|
214
|
+
`features.self_learning` and `/info` are not evidence. The first is a plan entitlement and
|
|
215
|
+
is already true before any wiring. The second reports Learning from the presence of a
|
|
216
|
+
callback rather than from an assigned thread. Never report either one as proof.
|
|
217
|
+
|
|
218
|
+
Where this run skipped the Learning step, leave the flag off.
|
|
219
|
+
|
|
176
220
|
### Step 5a -- Prove that the page's data reaches the model
|
|
177
221
|
|
|
178
222
|
`verify --round-trip` sends `context: []` and asks a question that needs no context. It
|
|
@@ -235,13 +279,13 @@ holds. Streamed text alone is not this step's outcome, whatever it says.
|
|
|
235
279
|
This is the step that covers realtime delivery, the frontend provider being wired to this
|
|
236
280
|
runtime, and the component actually rendering, and no command-line check reaches any of
|
|
237
281
|
them. It is not optional polish: a run that skips it has proven the agent and not the
|
|
238
|
-
journey, and
|
|
282
|
+
journey, and such a run ends as blocked rather than complete.
|
|
239
283
|
|
|
240
284
|
For a recorded `both-oss` starting state, this step has no component to render. Send the
|
|
241
285
|
same request the baseline recorded, require the same kind of user-visible result the
|
|
242
286
|
baseline produced, and require that the thread for that request is listed in the drawer.
|
|
243
287
|
Where this journey's frontend framework ships no threads drawer -- React Native --, prove
|
|
244
|
-
that thread with `npx --yes copilotkit@4.
|
|
288
|
+
that thread with `npx --yes copilotkit@4.10.1 verify --round-trip`, which reads the
|
|
245
289
|
answer back off the thread and needs no browser. Record which of the two you proved.
|
|
246
290
|
|
|
247
291
|
Use the surface control the main coding agent recorded for your environment. It either had
|
|
@@ -269,7 +313,7 @@ request never exercises. Drive it with the browser control step 6 named.
|
|
|
269
313
|
the page to finish loading. Do not retype the host, and do not substitute a URL a tool
|
|
270
314
|
offers you by default. Where the page loads but its styling is missing or the chat
|
|
271
315
|
control is dead, run
|
|
272
|
-
`npx --yes copilotkit@4.
|
|
316
|
+
`npx --yes copilotkit@4.10.1 verify --frontend-url <the url you opened> --json`
|
|
273
317
|
before you diagnose anything else. A dev server can serve its page and refuse every
|
|
274
318
|
static chunk behind it, and on screen that is indistinguishable from a broken
|
|
275
319
|
integration. The `frontend_assets_served` check tells the two apart.
|
|
@@ -30,19 +30,22 @@ 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.10.1 onboard read fallback/best-effort`.
|
|
34
34
|
|
|
35
|
-
Send one short report. Run the
|
|
35
|
+
Send one short report. Run the friction command without another developer question. The
|
|
36
36
|
CLI telemetry gate decides whether the report is sent.
|
|
37
37
|
|
|
38
38
|
```text
|
|
39
|
-
npx --yes copilotkit@4.
|
|
39
|
+
npx --yes copilotkit@4.10.1 onboard friction --phase stop --category <slug>
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
Write
|
|
42
|
+
Write one or two sentences to standard input: the step you stopped at and what stopped it.
|
|
43
|
+
Pick the category that fits from docs-missing, docs-wrong, docs-sequential, cli-gap,
|
|
44
|
+
sdk-gap, environment, port-collision, credential, validation-loop, and other. Leave
|
|
45
|
+
--cost-seconds off. A run that stopped cannot separate one papercut's cost from the cost
|
|
46
|
+
of the whole run, so the estimate is optional on a stop report and only there.
|
|
43
47
|
Send no secrets, source code, logs, or command output. The command refuses a report
|
|
44
48
|
that carries any of those, prints the reason, and exits zero. A refused report is not
|
|
45
49
|
a failed step. Reword it and send it again, or stop without a report. The command
|
|
46
|
-
prints what it sent. This is the channel for a stop.
|
|
47
|
-
finished, never from here. If the CLI says the report was not sent,
|
|
50
|
+
prints what it sent. This is the channel for a stop. If the CLI says the report was not sent,
|
|
48
51
|
state what it said and stop without another question.
|
package/package.json
CHANGED
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 ? "7e6964fc11092b685bbea62bc331d5d177b738c1" : "main";
|
|
14702
14702
|
}
|
|
14703
14703
|
|
|
14704
14704
|
// apps/cli/src/services/agentcore-config.ts
|
|
@@ -15270,13 +15270,49 @@ import * as fs3 from "node:fs";
|
|
|
15270
15270
|
import * as path3 from "node:path";
|
|
15271
15271
|
import * as os from "node:os";
|
|
15272
15272
|
import { execFileSync } from "node:child_process";
|
|
15273
|
+
var PROJECT_DIRECTORY_NAMES = /* @__PURE__ */ new Set([
|
|
15274
|
+
"agent",
|
|
15275
|
+
"api",
|
|
15276
|
+
"app",
|
|
15277
|
+
"components",
|
|
15278
|
+
"lib",
|
|
15279
|
+
"packages",
|
|
15280
|
+
"pages",
|
|
15281
|
+
"server",
|
|
15282
|
+
"src",
|
|
15283
|
+
"web"
|
|
15284
|
+
]);
|
|
15285
|
+
var PROJECT_MANIFEST_NAMES = /* @__PURE__ */ new Set([
|
|
15286
|
+
"Cargo.toml",
|
|
15287
|
+
"Gemfile",
|
|
15288
|
+
"build.gradle",
|
|
15289
|
+
"composer.json",
|
|
15290
|
+
"go.mod",
|
|
15291
|
+
"package.json",
|
|
15292
|
+
"pom.xml",
|
|
15293
|
+
"pyproject.toml",
|
|
15294
|
+
"requirements.txt"
|
|
15295
|
+
]);
|
|
15296
|
+
var ENV_TEMPLATE_SUFFIXES = [".example", ".sample", ".template"];
|
|
15297
|
+
function isCredentialEnvFile(entry) {
|
|
15298
|
+
if (!entry.startsWith(".env"))
|
|
15299
|
+
return false;
|
|
15300
|
+
if (ENV_TEMPLATE_SUFFIXES.some((suffix) => entry.endsWith(suffix)))
|
|
15301
|
+
return false;
|
|
15302
|
+
return entry === ".env" || entry.startsWith(".env.");
|
|
15303
|
+
}
|
|
15304
|
+
function entryHoldsProject(entry) {
|
|
15305
|
+
if (isCredentialEnvFile(entry))
|
|
15306
|
+
return true;
|
|
15307
|
+
return PROJECT_DIRECTORY_NAMES.has(entry) || PROJECT_MANIFEST_NAMES.has(entry);
|
|
15308
|
+
}
|
|
15273
15309
|
function isProjectDirOccupied(projectDir) {
|
|
15274
|
-
return fs3.existsSync(projectDir) && fs3.readdirSync(projectDir).
|
|
15310
|
+
return fs3.existsSync(projectDir) && fs3.readdirSync(projectDir).some(entryHoldsProject);
|
|
15275
15311
|
}
|
|
15276
15312
|
function assertProjectDirAvailable(projectDir) {
|
|
15277
15313
|
if (isProjectDirOccupied(projectDir)) {
|
|
15278
15314
|
throw tagError(
|
|
15279
|
-
new Error(`${projectDir} already
|
|
15315
|
+
new Error(`${projectDir} already holds a project`),
|
|
15280
15316
|
TELEMETRY_ERROR_CODES.PREREQUISITE_MISSING
|
|
15281
15317
|
);
|
|
15282
15318
|
}
|