copilotkit 4.14.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.
Files changed (79) hide show
  1. package/README.md +91 -13
  2. package/cli-build-info.json +7 -7
  3. package/index.js +53190 -33002
  4. package/onboarding/index.json +1 -1
  5. package/onboarding/prompts/authenticate/start.md +17 -8
  6. package/onboarding/prompts/conversion/plan.md +3 -3
  7. package/onboarding/prompts/credentials/finalize-plan.md +8 -8
  8. package/onboarding/prompts/credentials/plan.md +21 -21
  9. package/onboarding/prompts/credentials/settle-credentials.md +10 -10
  10. package/onboarding/prompts/credentials/write-plan.md +6 -6
  11. package/onboarding/prompts/fallback/best-effort.md +7 -7
  12. package/onboarding/prompts/feature/a2ui/implement.md +6 -6
  13. package/onboarding/prompts/feature/a2ui/proof.md +6 -6
  14. package/onboarding/prompts/feature/a2ui/start.md +7 -7
  15. package/onboarding/prompts/feature/channels/implement.md +7 -7
  16. package/onboarding/prompts/feature/channels/proof.md +6 -6
  17. package/onboarding/prompts/feature/channels/start.md +7 -7
  18. package/onboarding/prompts/feature/chat-suggestions/implement.md +6 -6
  19. package/onboarding/prompts/feature/chat-suggestions/proof.md +6 -6
  20. package/onboarding/prompts/feature/chat-suggestions/start.md +7 -7
  21. package/onboarding/prompts/feature/complete.md +3 -3
  22. package/onboarding/prompts/feature/learning/implement.md +16 -16
  23. package/onboarding/prompts/feature/learning/proof.md +7 -7
  24. package/onboarding/prompts/feature/learning/start.md +9 -9
  25. package/onboarding/prompts/feature/open-generative-ui/implement.md +6 -6
  26. package/onboarding/prompts/feature/open-generative-ui/proof.md +6 -6
  27. package/onboarding/prompts/feature/open-generative-ui/start.md +7 -7
  28. package/onboarding/prompts/feature/realtime-sync/implement.md +7 -7
  29. package/onboarding/prompts/feature/realtime-sync/proof.md +6 -6
  30. package/onboarding/prompts/feature/realtime-sync/start.md +6 -6
  31. package/onboarding/prompts/feature/rich-threads/implement.md +8 -8
  32. package/onboarding/prompts/feature/rich-threads/proof.md +6 -6
  33. package/onboarding/prompts/feature/rich-threads/start.md +6 -6
  34. package/onboarding/prompts/feature/stop.md +5 -5
  35. package/onboarding/prompts/feature/voice/implement.md +6 -6
  36. package/onboarding/prompts/feature/voice/proof.md +6 -6
  37. package/onboarding/prompts/feature/voice/start.md +7 -7
  38. package/onboarding/prompts/framework/ag2.md +2 -2
  39. package/onboarding/prompts/framework/agno.md +2 -2
  40. package/onboarding/prompts/framework/built-in.md +2 -2
  41. package/onboarding/prompts/framework/claude-sdk-python.md +2 -2
  42. package/onboarding/prompts/framework/claude-sdk-typescript.md +2 -2
  43. package/onboarding/prompts/framework/crewai-flows.md +2 -2
  44. package/onboarding/prompts/framework/deep-agents.md +2 -2
  45. package/onboarding/prompts/framework/google-adk.md +2 -2
  46. package/onboarding/prompts/framework/langgraph-fastapi.md +2 -2
  47. package/onboarding/prompts/framework/langgraph-python.md +2 -2
  48. package/onboarding/prompts/framework/langgraph-typescript.md +2 -2
  49. package/onboarding/prompts/framework/llamaindex.md +2 -2
  50. package/onboarding/prompts/framework/mastra.md +2 -2
  51. package/onboarding/prompts/framework/ms-agent-dotnet.md +2 -2
  52. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +2 -2
  53. package/onboarding/prompts/framework/ms-agent-python.md +2 -2
  54. package/onboarding/prompts/framework/pydantic-ai.md +2 -2
  55. package/onboarding/prompts/framework/strands-python.md +2 -2
  56. package/onboarding/prompts/framework/strands-typescript.md +2 -2
  57. package/onboarding/prompts/frontend/angular.md +3 -3
  58. package/onboarding/prompts/frontend/nextjs.md +3 -3
  59. package/onboarding/prompts/frontend/plan.md +7 -7
  60. package/onboarding/prompts/frontend/react-native.md +2 -2
  61. package/onboarding/prompts/frontend/react-spa.md +2 -2
  62. package/onboarding/prompts/frontend/vue.md +2 -2
  63. package/onboarding/prompts/implementation/build-and-validate.md +16 -16
  64. package/onboarding/prompts/proof/complete.md +9 -9
  65. package/onboarding/prompts/proof/oss-baseline.md +5 -5
  66. package/onboarding/prompts/proof/round-trip.md +11 -11
  67. package/onboarding/prompts/research/gather.md +6 -6
  68. package/onboarding/prompts/research/merge.md +3 -3
  69. package/onboarding/prompts/research/preflight.md +4 -4
  70. package/onboarding/prompts/research/route.md +5 -5
  71. package/onboarding/prompts/starter/clone.md +22 -15
  72. package/onboarding/prompts/stopped/run-failed.md +10 -4
  73. package/onboarding/prompts/subagent/create-plan.md +1 -1
  74. package/onboarding/prompts/subagent/inspect-repository.md +1 -1
  75. package/onboarding/prompts/subagent/prove-oss-baseline.md +14 -1
  76. package/onboarding/prompts/subagent/prove-round-trip.md +28 -16
  77. package/onboarding/prompts/unsupported/no-validated-path.md +3 -3
  78. package/package.json +1 -1
  79. package/release/release-tool.js +52 -7
@@ -52,7 +52,7 @@ the derived name.
52
52
  Only if the developer asks for an existing project, or asks to see the projects they have,
53
53
  read the choices:
54
54
 
55
- `npx --yes copilotkit@4.14.0 project list --json`
55
+ `npx --prefer-offline --yes copilotkit@4.16.0 project list --json`
56
56
 
57
57
  Then ask which one to use. Do not order the projects by creation time. If the developer
58
58
  already gave this answer, do not ask again. Do not read a secret value. Do not show or
@@ -79,7 +79,7 @@ Run the command from the parent directory. Do not inspect another entry in the p
79
79
  directory. Replace each placeholder with the recorded value. Do not run a placeholder as
80
80
  a shell argument.
81
81
 
82
- `npx --yes copilotkit@4.14.0 init --name <directory-name> --framework <framework-id> --channel none --no-banner --no-key-prompt --create <name> --install`
82
+ `npx --prefer-offline --yes copilotkit@4.16.0 init --name <directory-name> --framework <framework-id> --channel none --no-banner --no-key-prompt --create <name> --install`
83
83
 
84
84
  `--name` is always the target directory name derived above, because `init` creates the
85
85
  app at `<parent>/<name>`. Any other value puts the app in a new folder beside the target,
@@ -91,6 +91,13 @@ the dependency install, use
91
91
  answer as a flag. `--no-key-prompt` stops `init` from asking for a model key. The `init`
92
92
  output still names each missing key as `Set <VARIABLE> in .env`.
93
93
 
94
+ If the developer named a key file, add `--model-key-file <key-file>` with the path they gave.
95
+ `init` copies only the variable the starter needs into the starter's own env file,
96
+ including `agent/.env` for the Microsoft Agent Framework Python starter. It prints the
97
+ variable name and never the value. Do not read or copy the key file yourself. If `init`
98
+ reports that it cannot read the model key file, it stopped before it cloned anything. Ask
99
+ the developer for the right path, or run the command again without the flag.
100
+
94
101
  The command clones the starter into the empty target directory. It also connects the
95
102
  starter to the developer's Intelligence project. The earlier login phase supplies the
96
103
  account. The command does not need terminal input.
@@ -98,7 +105,7 @@ account. The command does not need terminal input.
98
105
  Report the clone before you inspect anything:
99
106
 
100
107
  ```text
101
- npx --yes copilotkit@4.14.0 onboard checkpoint --phase starter-cloned
108
+ npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase starter-cloned
102
109
  ```
103
110
 
104
111
  This is its own step, not an aside. A run that clones and then goes quiet is
@@ -111,6 +118,10 @@ and validation commands.
111
118
 
112
119
  ## Settle the model credential
113
120
 
121
+ The `init` output names each key it copied from a key file as
122
+ `Copied <VARIABLE> from the model key file into <file>`. A copied key is in place, so do
123
+ not check it. If the key file did not hold a variable, the output warns by name.
124
+
114
125
  The `init` output names each missing credential as `Set <VARIABLE> in .env`. For each
115
126
  one, check the starter's own `.env` without reading the value:
116
127
 
@@ -121,19 +132,15 @@ grep -c '^<VARIABLE>=.' <target>/.env
121
132
  `1` means the variable holds a value. `0` means it is empty or absent. The command prints
122
133
  a count and never the value.
123
134
 
124
- If the developer named a key file, copy that one variable from it into `<target>/.env`,
125
- in place of the empty line. Do not print either file, and do not print the value. Then
126
- run the check again.
127
-
128
- If a variable is still empty, ask the developer to add it to `<target>/.env` themselves.
135
+ If a variable is empty, ask the developer to add it to `<target>/.env` themselves.
129
136
 
130
137
  The two Microsoft Agent Framework starters keep their key outside `<target>/.env`, so
131
138
  `init` prints no `Set` line for them. Settle the key from the Model key column instead:
132
139
 
133
- - For the Python starter, run the same check for `OPENAI_API_KEY` against
134
- `<target>/agent/.env`. A missing file counts as `0`. If the developer named a key file,
135
- copy the variable into `<target>/agent/.env` the same way. If it is still empty, ask the
136
- developer to add it there themselves.
140
+ - For the Python starter, a key file passed to `init` fills `<target>/agent/.env`, and the
141
+ output says so. Otherwise, run the same check for `OPENAI_API_KEY` against
142
+ `<target>/agent/.env`. A missing file counts as `0`. If it is empty, ask the developer to
143
+ add it there themselves.
137
144
  - For the .NET starter, the key lives in `dotnet user-secrets`, and no check can read it
138
145
  without printing the value. Ask the developer to run
139
146
  `cd <target>/agent && dotnet user-secrets set OPENAI_API_KEY "<key>"` themselves, even
@@ -142,7 +149,7 @@ The two Microsoft Agent Framework starters keep their key outside `<target>/.env
142
149
  Then report the pause and end your turn:
143
150
 
144
151
  ```text
145
- npx --yes copilotkit@4.14.0 onboard checkpoint --phase awaiting-developer
152
+ npx --prefer-offline --yes copilotkit@4.16.0 onboard checkpoint --phase awaiting-developer
146
153
  ```
147
154
 
148
155
  This is a pause, not a stop. Do not send a stop report, and do not take a stop route.
@@ -153,10 +160,10 @@ call.
153
160
 
154
161
  If no credential is missing, report no pause and continue.
155
162
 
156
- Then run `npx --yes copilotkit@4.14.0 onboard read proof/round-trip`.
163
+ Then run `npx --prefer-offline --yes copilotkit@4.16.0 onboard read proof/round-trip`.
157
164
 
158
165
  If the command fails, report its exact error and do not claim that the starter is ready.
159
166
  Then run
160
- `npx --yes copilotkit@4.14.0 onboard read stopped/run-failed`. The starter is one this
167
+ `npx --prefer-offline --yes copilotkit@4.16.0 onboard read stopped/run-failed`. The starter is one this
161
168
  graph ships and the stack was chosen from its own supported list, so a command that
162
169
  returned an error is a run that broke, not a setup this release does not support.
@@ -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,10 +41,10 @@ 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 --yes copilotkit@4.14.0 onboard resume
44
+ npx --prefer-offline --yes copilotkit@4.16.0 onboard resume --message "<approval>"
39
45
  ```
40
46
 
41
- Write the developer's approval to standard input, in one or two sentences: the fix they
47
+ Put the developer's approval in `--message`, in one or two sentences: the fix they
42
48
  approved and what it touches. Send no secrets, source code, logs, or command output. The
43
49
  command refuses an approval that carries any of those, prints the reason, exits zero, and
44
50
  serves nothing. Reword it and send it again.
@@ -58,10 +64,10 @@ 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 --yes copilotkit@4.14.0 onboard friction --phase stop --category <slug>
67
+ npx --prefer-offline --yes copilotkit@4.16.0 onboard friction --phase stop --category <slug> --message "<sentences>"
62
68
  ```
63
69
 
64
- Write one or two sentences to standard input: the step you stopped at and what stopped
70
+ `--message` takes one or two sentences: the step you stopped at and what stopped
65
71
  it. Pick the category that fits from docs-missing, docs-wrong, docs-sequential, cli-gap,
66
72
  sdk-gap, environment, port-collision, credential, validation-loop, and other. Leave
67
73
  --cost-seconds off. A run that stopped cannot separate one papercut's cost from the cost
@@ -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 --yes copilotkit@4.14.0 verify --round-trip`, which needs no browser. Do not plan a
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 --yes copilotkit@4.14.0 onboard inspect --json
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,19 @@ 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
+
16
+ If your harness runs commands in a sandbox, a sandboxed command cannot listen on a port or
17
+ connect to localhost. Before the first server start, request escalation with a prefix rule
18
+ for the project's own dev script. Before the first request to a local server, request
19
+ escalation with a prefix rule for `curl`. If a local request still fails after 0 ms
20
+ (`Failed to connect ... after 0 ms`) while the port shows a listener, the sandbox blocked
21
+ it. Run it again with escalation, and do not record a failed predicate or step.
22
+
10
23
  Prove the live runtime in this order:
11
24
 
12
25
  1. GET `/info` from the project's CopilotKit runtime and require a valid response.
@@ -19,7 +32,7 @@ Prove the live runtime in this order:
19
32
  4. Confirm from project files that the runtime constructor passes a `runner` option rather
20
33
  than an `intelligence` option. A package, import, project file, or key is not use proof.
21
34
  5. Run
22
- `npx --yes copilotkit@4.14.0 verify --expect-runtime oss --round-trip --agent <expected-agent-id> --json`,
35
+ `npx --prefer-offline --yes copilotkit@4.16.0 verify --expect-runtime oss --round-trip --agent <expected-agent-id> --json`,
23
36
  with the runtime URL or auth header options that this project needs. Require exit zero
24
37
  and the JSON `ok` field to be `true`.
25
38
  6. Drive one real request through the existing frontend, CopilotKit runtime, and expected
@@ -89,21 +89,33 @@ 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
+
102
+ If your harness runs commands in a sandbox, a sandboxed command cannot listen on a port or
103
+ connect to localhost. Before the first server start, request escalation with a prefix rule
104
+ for the project's own dev script. Before the first request to a local server, request
105
+ escalation with a prefix rule for `curl`. If a local request still fails after 0 ms
106
+ (`Failed to connect ... after 0 ms`) while the port shows a listener, the sandbox blocked
107
+ it. Run it again with escalation, and do not record a failed predicate or step.
108
+
92
109
  Start each server in the background with the project's own script. Then wait for it to
93
110
  answer rather than for a fixed number of seconds:
94
111
 
95
112
  ```bash
96
- ready=
97
- for _ in $(seq 90); do
98
- curl -fs -o /dev/null "<url>" && ready=1 && break
99
- sleep 1
100
- done
101
- [ "$ready" = 1 ] && echo "up" || echo "no answer from <url> after 90 seconds"
113
+ curl -fs -o /dev/null --retry 90 --retry-delay 1 --retry-max-time 90 --retry-all-errors "<url>"
102
114
  ```
103
115
 
104
- Read the loop's own last line rather than assuming it ended because the server answered.
105
- A server that never answered has written the reason to its own output, and reading that
106
- output is faster than starting it again.
116
+ A zero exit means the server answered. Any other exit means that it did not answer in 90
117
+ seconds. A server that never answered has written the reason to its own output, and
118
+ reading that output is faster than starting it again.
107
119
 
108
120
  That coupling also turns an ordinary restart into a false failure. Where you stop a server
109
121
  to pick up an installed dependency, start both again and wait for both to answer before you
@@ -145,7 +157,7 @@ IPv6 only, so an IPv4 literal fails against the correct port.
145
157
  ## Step 4 -- Check the wiring
146
158
 
147
159
  With both running, check the wiring in one command before you open a browser:
148
- `npx --yes copilotkit@4.14.0 verify --json`. It reads the port from this project, so a
160
+ `npx --prefer-offline --yes copilotkit@4.16.0 verify --json`. It reads the port from this project, so a
149
161
  non-default port needs no flag. The payload reports `runtimeUrl` and `runtimeUrlSource`. A
150
162
  `runtimeUrlSource` of `default` means nothing in the project named a port, so pass
151
163
  `--runtime-url` with the URL from step 1 in that case. Read the individual checks rather than
@@ -179,7 +191,7 @@ named no port the CLI can read: keep step 2's URL, and rewrite its host as `loca
179
191
  before you use it.
180
192
 
181
193
  Then run the command once more with the URL you are about to open:
182
- `npx --yes copilotkit@4.14.0 verify --frontend-url <that url> --json`. The
194
+ `npx --prefer-offline --yes copilotkit@4.16.0 verify --frontend-url <that url> --json`. The
183
195
  `frontend_assets_served` check asks that server for its page and for one of the page's own
184
196
  assets, on that exact host. A `fail` there means the dev server refuses its own static
185
197
  assets on the host you were about to use, and the check names the URL to use instead. This
@@ -187,7 +199,7 @@ is the cheapest step that can save the most expensive one, so run it before the
187
199
 
188
200
  ## Step 5 -- Prove that the agent runs
189
201
 
190
- Run `npx --yes copilotkit@4.14.0 verify --round-trip --json`. It sends one request through
202
+ Run `npx --prefer-offline --yes copilotkit@4.16.0 verify --round-trip --json`. It sends one request through
191
203
  the runtime and reads the answer back from the thread, so it separates an agent that is
192
204
  configured from an agent that works. Use `--agent <id>` when the runtime declares more
193
205
  than one. If it reports `user-not-identified`, this project's `identifyUser` reads a
@@ -200,7 +212,7 @@ Where this run settled a Learning Container, add the flag to the call above rath
200
212
  running a second round trip:
201
213
 
202
214
  ```text
203
- npx --yes copilotkit@4.14.0 verify --round-trip --expect-learning-container <container id> --json
215
+ npx --prefer-offline --yes copilotkit@4.16.0 verify --round-trip --expect-learning-container <container id> --json
204
216
  ```
205
217
 
206
218
  The check reads the thread that this run created, so a second round trip proves a second
@@ -234,7 +246,7 @@ the credential was written holds an empty key while the file beside it carries t
234
246
  one. Run this from the target app directory:
235
247
 
236
248
  ```text
237
- npx --yes copilotkit@4.14.0 onboard env-staleness
249
+ npx --prefer-offline --yes copilotkit@4.16.0 onboard env-staleness
238
250
  ```
239
251
 
240
252
  A `stale` line names the env file and how long after launch it was written. Report that,
@@ -312,7 +324,7 @@ For a recorded `both-oss` starting state, this step has no component to render.
312
324
  same request the baseline recorded, require the same kind of user-visible result the
313
325
  baseline produced, and require that the thread for that request is listed in the drawer.
314
326
  Where this journey's frontend framework ships no threads drawer -- React Native --, prove
315
- that thread with `npx --yes copilotkit@4.14.0 verify --round-trip`, which reads the
327
+ that thread with `npx --prefer-offline --yes copilotkit@4.16.0 verify --round-trip`, which reads the
316
328
  answer back off the thread and needs no browser. Record which of the two you proved.
317
329
 
318
330
  Use the surface control the main coding agent recorded for your environment. It either had
@@ -340,7 +352,7 @@ request never exercises. Drive it with the browser control step 6 named.
340
352
  the page to finish loading. Do not retype the host, and do not substitute a URL a tool
341
353
  offers you by default. Where the page loads but its styling is missing or the chat
342
354
  control is dead, run
343
- `npx --yes copilotkit@4.14.0 verify --frontend-url <the url you opened> --json`
355
+ `npx --prefer-offline --yes copilotkit@4.16.0 verify --frontend-url <the url you opened> --json`
344
356
  before you diagnose anything else. A dev server can serve its page and refuse every
345
357
  static chunk behind it, and on screen that is indistinguishable from a broken
346
358
  integration. The `frontend_assets_served` check tells the two apart.
@@ -30,16 +30,16 @@ 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.14.0 onboard read fallback/best-effort`.
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 --yes copilotkit@4.14.0 onboard friction --phase stop --category <slug>
39
+ npx --prefer-offline --yes copilotkit@4.16.0 onboard friction --phase stop --category <slug> --message "<sentences>"
40
40
  ```
41
41
 
42
- Write one or two sentences to standard input: the step you stopped at and what stopped it.
42
+ `--message` takes one or two sentences: the step you stopped at and what stopped it.
43
43
  Pick the category that fits from docs-missing, docs-wrong, docs-sequential, cli-gap,
44
44
  sdk-gap, environment, port-collision, credential, validation-loop, and other. Leave
45
45
  --cost-seconds off. A run that stopped cannot separate one papercut's cost from the cost
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "copilotkit",
3
- "version": "4.14.0",
3
+ "version": "4.16.0",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20.9.0"
@@ -14811,7 +14811,7 @@ var FLAG_DEFINITIONS = defineFlags({
14811
14811
 
14812
14812
  // apps/cli/src/config.ts
14813
14813
  function getTemplateRef() {
14814
- return true ? "2c42a41a7e749c4473705769d1ae985d89718465" : "main";
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
- const visit = (relative, depth) => {
15516
- for (const entry of readEntries(path4.join(dir, relative))) {
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 names = readEntries(path4.join(dir, child)).map((e) => e.name);
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.sort();
15575
+ visit("", top, 1);
15576
+ return { found, exhausted };
15532
15577
  }
15533
15578
  function readProjectDirContents(projectDir, homeDir = os.homedir()) {
15534
15579
  if (!fs4.existsSync(projectDir))