copilotkit 4.16.0 → 4.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +195 -8
- package/cli-build-info.json +7 -7
- package/exporters/langgraph/README.md +118 -0
- package/exporters/langgraph/export_checkpointer.py +125 -0
- package/index.js +13890 -9434
- package/onboarding/index.json +1 -1
- package/onboarding/prompts/authenticate/start.md +24 -23
- package/onboarding/prompts/conversion/plan.md +3 -3
- package/onboarding/prompts/credentials/finalize-plan.md +56 -199
- package/onboarding/prompts/credentials/plan.md +24 -23
- package/onboarding/prompts/credentials/settle-credentials.md +40 -177
- package/onboarding/prompts/credentials/write-plan.md +47 -23
- package/onboarding/prompts/fallback/best-effort.md +25 -17
- package/onboarding/prompts/feature/a2ui/implement.md +40 -12
- package/onboarding/prompts/feature/a2ui/proof.md +29 -9
- package/onboarding/prompts/feature/a2ui/start.md +54 -12
- package/onboarding/prompts/feature/blocked-by-plan.md +4 -4
- package/onboarding/prompts/feature/channels/implement.md +41 -13
- package/onboarding/prompts/feature/channels/proof.md +30 -11
- package/onboarding/prompts/feature/channels/start.md +54 -9
- package/onboarding/prompts/feature/chat-suggestions/implement.md +40 -12
- package/onboarding/prompts/feature/chat-suggestions/proof.md +29 -9
- package/onboarding/prompts/feature/chat-suggestions/start.md +51 -10
- package/onboarding/prompts/feature/complete.md +2 -2
- package/onboarding/prompts/feature/learning/implement.md +66 -29
- package/onboarding/prompts/feature/learning/proof.md +30 -10
- package/onboarding/prompts/feature/learning/start.md +46 -20
- package/onboarding/prompts/feature/open-generative-ui/implement.md +41 -13
- package/onboarding/prompts/feature/open-generative-ui/proof.md +29 -9
- package/onboarding/prompts/feature/open-generative-ui/start.md +51 -10
- package/onboarding/prompts/feature/realtime-sync/implement.md +41 -13
- package/onboarding/prompts/feature/realtime-sync/proof.md +31 -10
- package/onboarding/prompts/feature/realtime-sync/start.md +51 -9
- package/onboarding/prompts/feature/rich-threads/implement.md +42 -14
- package/onboarding/prompts/feature/rich-threads/proof.md +31 -10
- package/onboarding/prompts/feature/rich-threads/start.md +51 -9
- package/onboarding/prompts/feature/stop.md +5 -5
- package/onboarding/prompts/feature/voice/implement.md +40 -12
- package/onboarding/prompts/feature/voice/proof.md +29 -9
- package/onboarding/prompts/feature/voice/start.md +51 -9
- package/onboarding/prompts/framework/ag2.md +2 -2
- package/onboarding/prompts/framework/agno.md +4 -4
- package/onboarding/prompts/framework/built-in.md +2 -2
- package/onboarding/prompts/framework/claude-sdk-python.md +8 -7
- package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
- package/onboarding/prompts/framework/crewai-flows.md +15 -7
- package/onboarding/prompts/framework/deep-agents.md +4 -3
- package/onboarding/prompts/framework/google-adk.md +7 -7
- package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
- package/onboarding/prompts/framework/langgraph-python.md +2 -2
- package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
- package/onboarding/prompts/framework/llamaindex.md +4 -4
- package/onboarding/prompts/framework/mastra.md +2 -2
- package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
- package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
- package/onboarding/prompts/framework/ms-agent-python.md +6 -6
- package/onboarding/prompts/framework/pydantic-ai.md +2 -2
- package/onboarding/prompts/framework/strands-python.md +4 -4
- package/onboarding/prompts/framework/strands-typescript.md +4 -4
- package/onboarding/prompts/frontend/angular.md +3 -3
- package/onboarding/prompts/frontend/nextjs.md +16 -3
- package/onboarding/prompts/frontend/plan.md +9 -8
- package/onboarding/prompts/frontend/react-native.md +2 -2
- package/onboarding/prompts/frontend/react-spa.md +2 -2
- package/onboarding/prompts/frontend/vue.md +2 -2
- package/onboarding/prompts/implementation/build-and-validate.md +68 -30
- package/onboarding/prompts/proof/complete.md +24 -17
- package/onboarding/prompts/proof/oss-baseline.md +16 -12
- package/onboarding/prompts/proof/round-trip.md +39 -27
- package/onboarding/prompts/research/gather.md +8 -7
- package/onboarding/prompts/research/merge.md +3 -3
- package/onboarding/prompts/research/preflight.md +4 -4
- package/onboarding/prompts/research/route.md +6 -6
- package/onboarding/prompts/starter/clone.md +16 -12
- package/onboarding/prompts/stopped/run-failed.md +11 -11
- package/onboarding/prompts/subagent/create-plan.md +24 -10
- package/onboarding/prompts/subagent/implement-and-validate.md +25 -11
- package/onboarding/prompts/subagent/inspect-repository.md +21 -6
- package/onboarding/prompts/subagent/prove-oss-baseline.md +5 -4
- package/onboarding/prompts/subagent/prove-round-trip.md +77 -23
- package/onboarding/prompts/unsupported/no-validated-path.md +4 -4
- package/package.json +1 -5
- package/release/release-tool.js +189 -44
|
@@ -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,22 @@ 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.18.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, every provider base URL its process will read, and the
|
|
19
|
+
module resolution its `tsconfig.json` sets, read through the `extends` chain. It reads
|
|
20
|
+
only and prints no secret value.
|
|
21
|
+
|
|
22
|
+
Report each `providerEndpoints` entry with the variable, its origin, and where it came
|
|
23
|
+
from. A `null` `source` means the process environment supplied it. A coding agent's shell
|
|
24
|
+
passes that value on to every dev server it starts, so it decides where the model calls
|
|
25
|
+
go before any project file does. Carry its `warning` as it came back.
|
|
19
26
|
|
|
20
27
|
Carry those readings into your findings as they came back. Do not work one of them out
|
|
21
28
|
again by reading files. The directory that owns `.env` is the hard case and the CLI holds
|
|
@@ -43,7 +50,7 @@ Find evidence for:
|
|
|
43
50
|
Return the initial changed and untracked paths as paths only. Do not return their
|
|
44
51
|
contents. Do not retain a before-state for them. The CLI captures the baseline that the
|
|
45
52
|
protected-path audit compares against, so nothing later in the run depends on this
|
|
46
|
-
subagent still
|
|
53
|
+
subagent still holding its state, and a path that can hold secrets is captured as a digest you
|
|
47
54
|
never read.
|
|
48
55
|
|
|
49
56
|
Take the target app or runtime directory from the CLI packet rather than working it out
|
|
@@ -53,13 +60,20 @@ reading of the files will not reproduce.
|
|
|
53
60
|
## Environment evidence packet
|
|
54
61
|
|
|
55
62
|
- names of required credential variables, beyond the Intelligence key the CLI reported
|
|
56
|
-
-
|
|
63
|
+
- the `.env` modification time, or that no `.env` exists, for a later comparison. It is a
|
|
64
|
+
timestamp, not a value from the file
|
|
57
65
|
- required toolchains and their installed versions
|
|
58
66
|
- whether each port the CLI reported as declared is free
|
|
59
67
|
- whether the runtime constructor uses a `runner` option, an `intelligence` option, or
|
|
60
68
|
neither can be proved from project files
|
|
61
69
|
- package compatibility risks, and whether any `@copilotkit/*` version the CLI reported is
|
|
62
70
|
below 1.70.0
|
|
71
|
+
- the `tsconfig.json` change each app needs, from `typescript.migration`: its file and each
|
|
72
|
+
change, as they came back. The change lets CopilotKit subpath imports such as
|
|
73
|
+
`@copilotkit/runtime/v2` type-check. A `null` migration means that no change is needed.
|
|
74
|
+
Where `typescript.status` is `unreadable` or `typescript.unresolvedExtends` is not
|
|
75
|
+
empty, read that app's `tsconfig.json` chain and report its `moduleResolution` and
|
|
76
|
+
`module` values, or report them as unproved
|
|
63
77
|
|
|
64
78
|
Key every environment finding by its app or runtime directory. Do not combine findings
|
|
65
79
|
from different directories. The CLI packet keys its own readings the same way.
|
|
@@ -85,6 +99,7 @@ access or an environment limit prevents the inspection.
|
|
|
85
99
|
Return one row for each assigned item with its status, evidence path, and a short finding.
|
|
86
100
|
Use only `proved`, `absent`, or `unproved` for the status. State each absent or unproved item.
|
|
87
101
|
Do not read, print, or return secret values. For `.env` and `.copilotkit/project.json`
|
|
88
|
-
checks, return only paths, presence checks,
|
|
102
|
+
checks, return only paths, presence checks, missing field names, and the one `.env`
|
|
103
|
+
modification time named above. Do not read a file
|
|
89
104
|
outside the project directory. Do not run or return an onboarding command other than
|
|
90
105
|
`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.18.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,10 +5,16 @@ 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
|
|
|
13
|
+
One CLI command is the exception to both rules. The Step 2 `onboard runtime-url` command
|
|
14
|
+
can write `.copilotkit/project.json` even when that path is protected. It moves the
|
|
15
|
+
protected-path baseline with its own write, and it refuses a record that changed since the
|
|
16
|
+
baseline. Never edit that file any other way.
|
|
17
|
+
|
|
12
18
|
The existing agent's behavior is outside every step of this proof. It is four things: the
|
|
13
19
|
agent's system prompt and instructions, its tools and what those tools do, its model and
|
|
14
20
|
provider configuration, and its memory or state handling. A failing predicate is repaired
|
|
@@ -24,8 +30,13 @@ different sequence of your own, and do not drop a step because an earlier one lo
|
|
|
24
30
|
convincing. Step 6 has a web form and a React Native form: run the one that matches this
|
|
25
31
|
journey's frontend, and run only that one.
|
|
26
32
|
|
|
33
|
+
A run that cloned a starter is the one exception. When the main coding agent tells you
|
|
34
|
+
that this run cloned a starter, run Steps 1 through 5 up to and including the
|
|
35
|
+
`verify --round-trip` command, then go to Step 10. Skip Steps 5a through 9, open no browser
|
|
36
|
+
or device, and report `skipped-cloned-starter` as the surface-check outcome.
|
|
37
|
+
|
|
27
38
|
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
|
|
39
|
+
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
40
|
identity, and both preconditions are stale. Step 1 is the exception, and it is carried
|
|
30
41
|
rather than derived a second time. Compare the Step 5a and Step 5b results against the
|
|
31
42
|
failed attempt's before you drive the surface. A repair that leaves the failed precondition
|
|
@@ -117,6 +128,22 @@ A zero exit means the server answered. Any other exit means that it did not answ
|
|
|
117
128
|
seconds. A server that never answered has written the reason to its own output, and
|
|
118
129
|
reading that output is faster than starting it again.
|
|
119
130
|
|
|
131
|
+
When the server that serves the runtime answers, record the URL it serves on. Read the port
|
|
132
|
+
from that server's own output or its listener, not from the plan. A dev server whose port
|
|
133
|
+
is taken moves to the next free one without asking. Where the runtime runs as a process of
|
|
134
|
+
its own, this is the runtime's port, not the frontend's.
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard runtime-url --url <runtime-url>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
`<runtime-url>` is the Step 1 runtime URL with its port replaced by the port that server
|
|
141
|
+
bound. Keep its host and its mount path unchanged.
|
|
142
|
+
|
|
143
|
+
The command writes `runtimeUrl` into `.copilotkit/project.json` and changes nothing else. It
|
|
144
|
+
mints no key and does not touch `.env`. Step 4 reads that record, so `verify` probes the
|
|
145
|
+
server you started. Run the command again after any restart that binds another port.
|
|
146
|
+
|
|
120
147
|
That coupling also turns an ordinary restart into a false failure. Where you stop a server
|
|
121
148
|
to pick up an installed dependency, start both again and wait for both to answer before you
|
|
122
149
|
read the round trip. A check run against a frontend whose agent was stopped with it reports
|
|
@@ -157,10 +184,10 @@ IPv6 only, so an IPv4 literal fails against the correct port.
|
|
|
157
184
|
## Step 4 -- Check the wiring
|
|
158
185
|
|
|
159
186
|
With both running, check the wiring in one command before you open a browser:
|
|
160
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
187
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 verify --json`. It reads the port from this project, so a
|
|
161
188
|
non-default port needs no flag. The payload reports `runtimeUrl` and `runtimeUrlSource`. A
|
|
162
|
-
`runtimeUrlSource` of `default` means nothing in the project named a port, so
|
|
163
|
-
|
|
189
|
+
`runtimeUrlSource` of `default` means nothing in the project named a port, so the Step 2
|
|
190
|
+
record is missing. Run the Step 2 `onboard runtime-url` command, then run `verify` again. Read the individual checks rather than
|
|
164
191
|
the summary alone: a check reported `undetermined` did not run, and that is not a pass.
|
|
165
192
|
Repair a failed check only within the limits above. Otherwise, return the check and its
|
|
166
193
|
evidence before the browser.
|
|
@@ -191,7 +218,7 @@ named no port the CLI can read: keep step 2's URL, and rewrite its host as `loca
|
|
|
191
218
|
before you use it.
|
|
192
219
|
|
|
193
220
|
Then run the command once more with the URL you are about to open:
|
|
194
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
221
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 verify --frontend-url <that url> --json`. The
|
|
195
222
|
`frontend_assets_served` check asks that server for its page and for one of the page's own
|
|
196
223
|
assets, on that exact host. A `fail` there means the dev server refuses its own static
|
|
197
224
|
assets on the host you were about to use, and the check names the URL to use instead. This
|
|
@@ -199,7 +226,7 @@ is the cheapest step that can save the most expensive one, so run it before the
|
|
|
199
226
|
|
|
200
227
|
## Step 5 -- Prove that the agent runs
|
|
201
228
|
|
|
202
|
-
Run `npx --prefer-offline --yes copilotkit@4.
|
|
229
|
+
Run `npx --prefer-offline --yes copilotkit@4.18.0 verify --round-trip --json`. It sends one request through
|
|
203
230
|
the runtime and reads the answer back from the thread, so it separates an agent that is
|
|
204
231
|
configured from an agent that works. Use `--agent <id>` when the runtime declares more
|
|
205
232
|
than one. If it reports `user-not-identified`, this project's `identifyUser` reads a
|
|
@@ -212,7 +239,7 @@ Where this run settled a Learning Container, add the flag to the call above rath
|
|
|
212
239
|
running a second round trip:
|
|
213
240
|
|
|
214
241
|
```text
|
|
215
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
242
|
+
npx --prefer-offline --yes copilotkit@4.18.0 verify --round-trip --expect-learning-container <container id> --json
|
|
216
243
|
```
|
|
217
244
|
|
|
218
245
|
The check reads the thread that this run created, so a second round trip proves a second
|
|
@@ -246,7 +273,7 @@ the credential was written holds an empty key while the file beside it carries t
|
|
|
246
273
|
one. Run this from the target app directory:
|
|
247
274
|
|
|
248
275
|
```text
|
|
249
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
276
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard env-staleness
|
|
250
277
|
```
|
|
251
278
|
|
|
252
279
|
A `stale` line names the env file and how long after launch it was written. Report that,
|
|
@@ -256,6 +283,21 @@ process and never its owner, and one project's dev script often serves the agent
|
|
|
256
283
|
frontend together. Editing a file to answer a 401 that a restart clears changes the project
|
|
257
284
|
for a fault it does not have.
|
|
258
285
|
|
|
286
|
+
Where the runtime answers with a 404 from the model provider, check the base URLs the
|
|
287
|
+
processes inherited before you change anything. A coding agent's shell passes its own
|
|
288
|
+
environment on to every process it starts, so a provider base URL exported for the agent
|
|
289
|
+
reaches the dev servers. Run this from the target app directory:
|
|
290
|
+
|
|
291
|
+
```text
|
|
292
|
+
npx --prefer-offline --yes copilotkit@4.18.0 onboard inspect --json
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
Read `providerEndpoints` for the app directory. An entry with a `null` `source` came from
|
|
296
|
+
the process environment rather than from a project file. A `warning` names why that value
|
|
297
|
+
fails. Report the variable, where it came from, and the warning, and say that the server
|
|
298
|
+
has to start from an environment without that value before the 404 means anything. Do not
|
|
299
|
+
edit a project file to answer it: the value lives in the shell, not in the project.
|
|
300
|
+
|
|
259
301
|
### Step 5a -- Prove that the page's data reaches the model
|
|
260
302
|
|
|
261
303
|
`verify --round-trip` sends `context: []` and asks a question that needs no context. It
|
|
@@ -269,13 +311,22 @@ entries this project's frontend publishes, from its own context call. Read the t
|
|
|
269
311
|
declarations it registers as well, and carry both the way the page carries them, so that
|
|
270
312
|
the agent sees the request the browser sends rather than a thinner one. Send the same run
|
|
271
313
|
body twice, to `<runtime>/agent/<agent id>/run`: once carrying the context entries the page
|
|
272
|
-
publishes, and once carrying
|
|
273
|
-
streamed events from each, and name both capture paths.
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
314
|
+
publishes, and once carrying the same entries with one value changed. Use the step 1
|
|
315
|
+
request both times. Record the streamed events from each, and name both capture paths.
|
|
316
|
+
|
|
317
|
+
For the changed run, pick one record the step 1 request matches. Add a marker to a text
|
|
318
|
+
field that the answer repeats, such as its title or name:
|
|
319
|
+
` [probe-<8 random hex characters>]`. Choose a new marker for each run, record it, and
|
|
320
|
+
change nothing else. Do not remove the entry or send `context: []` instead. The page always
|
|
321
|
+
sends its entries. A model with a request about records, a tool that needs them, and
|
|
322
|
+
nothing to copy invents records. That failure belongs to the probe, not to the integration.
|
|
323
|
+
|
|
324
|
+
Read each answer against the context it carried. The run carrying the page's context has to
|
|
325
|
+
name the project's own records and no others. The run carrying the changed entry has to
|
|
326
|
+
carry the marker, character for character, and name no record its context did not hold. A
|
|
327
|
+
model that the context never reaches cannot produce the marker. A model that invents a
|
|
328
|
+
different record on every call cannot produce it either, so two answers that only differ
|
|
329
|
+
prove nothing. An answer without the marker means the page's data is not reaching the model.
|
|
279
330
|
|
|
280
331
|
Return the cause and both captures on a failed comparison. Do not open a browser on a
|
|
281
332
|
failed comparison, and do not edit the project here.
|
|
@@ -318,13 +369,14 @@ holds. Streamed text alone is not this step's outcome, whatever it says.
|
|
|
318
369
|
This is the step that covers realtime delivery, the frontend provider being wired to this
|
|
319
370
|
runtime, and the component actually rendering, and no command-line check reaches any of
|
|
320
371
|
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.
|
|
372
|
+
journey, and such a run ends as blocked rather than complete. The cloned-starter skip is
|
|
373
|
+
the one exception, and it completes the run.
|
|
322
374
|
|
|
323
375
|
For a recorded `both-oss` starting state, this step has no component to render. Send the
|
|
324
376
|
same request the baseline recorded, require the same kind of user-visible result the
|
|
325
377
|
baseline produced, and require that the thread for that request is listed in the drawer.
|
|
326
378
|
Where this journey's frontend framework ships no threads drawer -- React Native --, prove
|
|
327
|
-
that thread with `npx --prefer-offline --yes copilotkit@4.
|
|
379
|
+
that thread with `npx --prefer-offline --yes copilotkit@4.18.0 verify --round-trip`, which reads the
|
|
328
380
|
answer back off the thread and needs no browser. Record which of the two you proved.
|
|
329
381
|
|
|
330
382
|
Use the surface control the main coding agent recorded for your environment. It either had
|
|
@@ -352,7 +404,7 @@ request never exercises. Drive it with the browser control step 6 named.
|
|
|
352
404
|
the page to finish loading. Do not retype the host, and do not substitute a URL a tool
|
|
353
405
|
offers you by default. Where the page loads but its styling is missing or the chat
|
|
354
406
|
control is dead, run
|
|
355
|
-
`npx --prefer-offline --yes copilotkit@4.
|
|
407
|
+
`npx --prefer-offline --yes copilotkit@4.18.0 verify --frontend-url <the url you opened> --json`
|
|
356
408
|
before you diagnose anything else. A dev server can serve its page and refuse every
|
|
357
409
|
static chunk behind it, and on screen that is indistinguishable from a broken
|
|
358
410
|
integration. The `frontend_assets_served` check tells the two apart.
|
|
@@ -377,8 +429,9 @@ request never exercises. Drive it with the browser control step 6 named.
|
|
|
377
429
|
the answer from, and what that element showed.
|
|
378
430
|
|
|
379
431
|
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.
|
|
432
|
+
`failed` for a web frontend. Report `skipped-cloned-starter` when the main coding agent told
|
|
433
|
+
you to open no browser because the run cloned a starter. The cloned-starter exception above
|
|
434
|
+
Step 1 says which steps to run.
|
|
382
435
|
|
|
383
436
|
### Step 6b -- React Native
|
|
384
437
|
|
|
@@ -495,8 +548,9 @@ whatever these two tools did.
|
|
|
495
548
|
|
|
496
549
|
Start with `Status: passed`, `Status: failed`, or `Status: blocked`.
|
|
497
550
|
Use `Status: passed` when the proof attempt completed with `performed`,
|
|
498
|
-
`skipped-no-browser-tool`, or `skipped-
|
|
499
|
-
|
|
551
|
+
`skipped-no-browser-tool`, `skipped-no-device`, or `skipped-cloned-starter`. The parent
|
|
552
|
+
records a skip through the standard completion route, which ends every skip but
|
|
553
|
+
`skipped-cloned-starter` as blocked. Use `Status: failed` for a failed proof step. Use
|
|
500
554
|
`Status: blocked` when a safety or access limit stops the attempt before a surface outcome.
|
|
501
555
|
Return the proof or the exact failed step to the main coding agent, together with the
|
|
502
556
|
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.18.0 onboard read fallback/best-effort`.
|
|
34
34
|
|
|
35
|
-
Send one short report.
|
|
36
|
-
|
|
35
|
+
Send one short report. The friction command follows the telemetry setting the developer
|
|
36
|
+
already chose, so it needs no separate question.
|
|
37
37
|
|
|
38
38
|
```text
|
|
39
|
-
npx --prefer-offline --yes copilotkit@4.
|
|
39
|
+
npx --prefer-offline --yes copilotkit@4.18.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.18.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
|
}
|