copilotkit 4.9.1 → 4.9.4

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 (45) hide show
  1. package/cli-build-info.json +8 -8
  2. package/index.js +151 -21
  3. package/onboarding/index.json +11 -0
  4. package/onboarding/prompts/authenticate/start.md +83 -32
  5. package/onboarding/prompts/credentials/finalize-plan.md +51 -33
  6. package/onboarding/prompts/credentials/plan.md +37 -25
  7. package/onboarding/prompts/fallback/best-effort.md +22 -11
  8. package/onboarding/prompts/framework/ag2.md +4 -15
  9. package/onboarding/prompts/framework/agno.md +4 -15
  10. package/onboarding/prompts/framework/built-in.md +4 -14
  11. package/onboarding/prompts/framework/claude-sdk-python.md +4 -14
  12. package/onboarding/prompts/framework/claude-sdk-typescript.md +4 -14
  13. package/onboarding/prompts/framework/crewai-flows.md +11 -23
  14. package/onboarding/prompts/framework/deep-agents.md +4 -15
  15. package/onboarding/prompts/framework/google-adk.md +3 -15
  16. package/onboarding/prompts/framework/langgraph-fastapi.md +3 -15
  17. package/onboarding/prompts/framework/langgraph-python.md +3 -15
  18. package/onboarding/prompts/framework/langgraph-typescript.md +3 -15
  19. package/onboarding/prompts/framework/llamaindex.md +4 -15
  20. package/onboarding/prompts/framework/mastra.md +3 -15
  21. package/onboarding/prompts/framework/ms-agent-dotnet.md +18 -49
  22. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +20 -30
  23. package/onboarding/prompts/framework/ms-agent-python.md +3 -15
  24. package/onboarding/prompts/framework/pydantic-ai.md +4 -14
  25. package/onboarding/prompts/framework/strands-python.md +4 -14
  26. package/onboarding/prompts/framework/strands-typescript.md +4 -14
  27. package/onboarding/prompts/frontend/angular.md +13 -18
  28. package/onboarding/prompts/frontend/nextjs.md +20 -15
  29. package/onboarding/prompts/frontend/plan.md +9 -14
  30. package/onboarding/prompts/frontend/react-native.md +7 -15
  31. package/onboarding/prompts/frontend/react-spa.md +5 -15
  32. package/onboarding/prompts/frontend/vue.md +8 -15
  33. package/onboarding/prompts/implementation/build-and-validate.md +22 -13
  34. package/onboarding/prompts/proof/complete.md +32 -5
  35. package/onboarding/prompts/proof/oss-baseline.md +3 -3
  36. package/onboarding/prompts/proof/round-trip.md +197 -72
  37. package/onboarding/prompts/starter/clone.md +67 -0
  38. package/onboarding/prompts/subagent/create-plan.md +26 -15
  39. package/onboarding/prompts/subagent/implement-and-validate.md +19 -10
  40. package/onboarding/prompts/subagent/inspect-repository.md +19 -7
  41. package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
  42. package/onboarding/prompts/subagent/prove-round-trip.md +176 -68
  43. package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
  44. package/package.json +1 -1
  45. package/release/release-tool.js +15 -1
@@ -1,27 +1,108 @@
1
1
  # Prove the complete round trip
2
2
 
3
- Use the proof steps and documentation URLs from the approved plan. Fetch every selected
4
- URL in one step before you start, rather than one after another.
5
- Do not use remembered CopilotKit instructions.
3
+ Use the proof steps and documentation URLs from the approved plan. Follow the documentation
4
+ policy the main coding agent gives you before you start.
6
5
 
7
- A fetch tool that refuses a URL, or fails to reach it, reports a limit of the tool and
8
- not a fact about the page. Retrieve the same URL a second way before you judge it. Run
9
- `curl -fsSL <url>`, or read the same page without the `.md` suffix. Report a
10
- documentation gap only after a second method also fails.
6
+ Run the steps below in the order they appear. They are the proof. Do not design a
7
+ different sequence of your own, and do not drop a step because an earlier one looked
8
+ convincing. Step 6 has a web form and a React Native form: run the one that matches this
9
+ journey's frontend, and run only that one.
11
10
 
12
- Read the port the developer's agent already serves from this project's own
13
- configuration. Do not assume a default, and do not start a second copy of an agent this
14
- project is already running. Before you bind any new server, check that the port is free
15
- and pick another one if it is not. Record every port you used.
11
+ Record the result of every step as you go. A step with nothing recorded did not happen.
12
+ Write each captured file to `.copilotkit/proof/` inside the project and name the path in
13
+ the record. That directory holds regenerable evidence rather than application code. Where
14
+ a browser or device tool writes to a location of its own, keep that location and record
15
+ it instead.
16
16
 
17
- Start the agent and the selected frontend.
17
+ Gather what you need in as few commands as possible. Combine independent reads into one
18
+ command rather than running them one at a time. Split a command only when its result decides
19
+ what you run next.
20
+
21
+ ## Step 1 -- Read what the proof needs
22
+
23
+ Read all of this from the approved plan in one pass, before you start anything:
24
+
25
+ - the exact request to send through the frontend, in the words the plan gave it,
26
+ - the user-visible result that request has to produce,
27
+ - the expected agent id,
28
+ - where the project's own data lives, and which entities the answer has to name,
29
+ - the start command for the agent and for the frontend, from the plan where it named
30
+ one and from the project's own scripts otherwise,
31
+ - the runtime URL.
32
+
33
+ Where the plan named no request, write one that produces the outcome the plan named, and
34
+ record the request you wrote. Every later step uses these words unchanged, so that the
35
+ browser, the device, and the grounding check all speak about one request.
36
+
37
+ ## Step 2 -- Start the agent and the frontend
38
+
39
+ Read the port the developer's agent already serves from this project's own configuration.
40
+ Do not assume a default, and do not start a second copy of an agent this project is
41
+ already running. Before you bind any new server, check that the port is free and pick
42
+ another one if it is not. Record every port you used.
43
+
44
+ The table names what each frontend's own scaffolder writes, for recognizing a port in a
45
+ started process's output. The project's configuration wins over the table.
46
+
47
+ | Frontend | Dev server the scaffolder writes |
48
+ | ------------ | -------------------------------- |
49
+ | Next.js | `next dev`, port 3000 |
50
+ | React SPA | Vite, port 5173 |
51
+ | Vue 3 | Vite, port 5173 |
52
+ | Angular | `ng serve`, port 4200 |
53
+ | React Native | Metro, port 8081 |
54
+
55
+ Where this project's runtime runs as a process of its own, the frontend documentation
56
+ puts it on port 8200. Use the runtime URL from step 1 rather than that number.
57
+
58
+ Start each server in the background with the project's own script. Then wait for it to
59
+ answer rather than for a fixed number of seconds:
60
+
61
+ ```bash
62
+ ready=
63
+ for _ in $(seq 90); do
64
+ curl -fs -o /dev/null "<url>" && ready=1 && break
65
+ sleep 1
66
+ done
67
+ [ "$ready" = 1 ] && echo "up" || echo "no answer from <url> after 90 seconds"
68
+ ```
69
+
70
+ Read the loop's own last line rather than assuming it ended because the server answered.
71
+ A server that never answered has written the reason to its own output, and reading that
72
+ output is faster than starting it again.
18
73
 
19
74
  Leave the agent and frontend servers running after proof. Record each process ID and a
20
75
  safe command that stops that process. Record the frontend URL and the commands that start
21
76
  both servers again.
22
77
 
78
+ ## Step 3 -- Identify the process that answered
79
+
80
+ Before you trust the agent, confirm that the process answering is the one in this
81
+ repository. `verify` reports which agents the runtime declares and has nothing to compare
82
+ them against, and `--round-trip` proves an agent answers under the declared id without
83
+ proving which deployment did, so this comparison is yours. A health endpoint that returns
84
+ success proves only that something listens on
85
+ that port. An agent from earlier work often still holds it, and a stale process answers
86
+ as though it were the new one. Ask the running agent which graph or agent id it serves
87
+ and compare that with the id declared in this project.
88
+
89
+ If they do not match, find out whose process it is before you signal anything.
90
+ `lsof -ti :<port> -sTCP:LISTEN` gives the process id, and `lsof -a -p <pid> -d cwd` gives
91
+ the directory it runs in. Stop it only when that directory is inside this project, and
92
+ stop its children before the parent so nothing survives by reparenting. A holder outside
93
+ this project belongs to other work: leave it running, report it, and bind to another port.
94
+ Never stop a process because its command line matches a name. One `pkill` pattern reaches
95
+ every project on the machine and takes down work that has nothing to do with this run.
96
+ Never continue against a process you cannot identify, and never report a round trip proven
97
+ by one.
98
+
99
+ Address a local agent by host name rather than by an IP literal. Some local agents bind
100
+ IPv6 only, so an IPv4 literal fails against the correct port.
101
+
102
+ ## Step 4 -- Check the wiring
103
+
23
104
  With both running, check the wiring in one command before you open a browser:
24
- `npx --yes copilotkit@4.9.1 verify --json`. Add `--runtime-url` when the runtime is not at
105
+ `npx --yes copilotkit@4.9.4 verify --json`. Add `--runtime-url` when the runtime is not at
25
106
  `http://localhost:3000/api/copilotkit`. Read the individual checks rather than the summary
26
107
  alone: a check reported `undetermined` did not run, and that is not a pass. Fix anything
27
108
  that is not a pass before the browser, because a browser failure stacked on broken wiring
@@ -37,11 +118,12 @@ thread routes, which means saved Threads cannot load in a browser. The usual cau
37
118
  handler mounted `mode: "single-route"`: remove that option so the handler serves its full
38
119
  route set, and mount it at a catch-all route. If instead that check is `undetermined`
39
120
  because the runtime reports no thread-endpoint state, the runtime predates the field.
40
- Record that and move on — there is nothing to repair.
121
+ Record that and move on -- there is nothing to repair.
122
+
123
+ ## Step 5 -- Prove that the agent runs
41
124
 
42
- Then prove that the agent actually runs, which is the gate for this node:
43
- `npx --yes copilotkit@4.9.1 verify --round-trip --json`. It sends one request through the
44
- runtime and reads the answer back from the thread, so it separates an agent that is
125
+ Run `npx --yes copilotkit@4.9.4 verify --round-trip --json`. It sends one request through
126
+ the runtime and reads the answer back from the thread, so it separates an agent that is
45
127
  configured from an agent that works. Use `--agent <id>` when the runtime declares more
46
128
  than one. If it reports `user-not-identified`, this project's `identifyUser` reads a
47
129
  session the CLI does not carry: pass what it reads with `--header "Name: value"` and run
@@ -49,64 +131,80 @@ it again, because an auth-gated app refusing an unauthenticated caller is that a
49
131
  working. Do not continue until this passes, and never report a round trip proven without
50
132
  it.
51
133
 
52
- Then send one real request through the frontend. Make sure that the request passes through
53
- CopilotKit and reaches the selected agent.
134
+ ## Step 6 -- Drive the surface
54
135
 
55
- For a recorded `both-oss` starting state: Compare the final round trip with the recorded
56
- OSS baseline. The same frontend request must still reach the same agent and produce the
57
- same kind of user-visible result. The runtime must now report `licenseStatus`, and the
58
- authenticated Intelligence checks must pass. Record both before and after evidence.
136
+ Now send one real request through the running frontend, on this journey's own surface.
137
+ Make sure that the request passes through CopilotKit and reaches the selected agent, and
138
+ that the frontend receives working generative UI from the agent. This is the step that
139
+ covers realtime delivery, the frontend provider being wired to this runtime, and a
140
+ generative UI component actually rendering, and no command-line check reaches any of them.
141
+ It is not optional polish: a run that skips it has proven the agent and not the journey,
142
+ and the graph ends such a run as blocked rather than complete.
59
143
 
60
- Before you trust the agent, confirm that the process answering is the one in this
61
- repository. `verify` reports which agents the runtime declares and has nothing to compare
62
- them against, and `--round-trip` proves an agent answers under the declared id without
63
- proving which deployment did, so this comparison is yours. A health endpoint that returns success proves only that something listens on
64
- that port. An agent from earlier work often still holds it, and a stale process answers
65
- as though it were the new one. Ask the running agent which graph or agent id it serves
66
- and compare that with the id declared in this project.
144
+ Use the surface control the main coding agent recorded for your environment. It either had
145
+ one already or registered one before this step, so that finding is the answer and there is
146
+ nothing here for you to go looking for. Do not add a browser driver or a device tool to this
147
+ project: a devDependency and a browser download land in the diff and tax a repository that
148
+ never asked for one, which is a different thing from the server registered against the
149
+ coding agent. If nothing in your environment can drive the surface this journey needs, skip
150
+ this step rather than installing one, and report the skip outcome named below.
67
151
 
68
- If they do not match, find out whose process it is before you signal anything.
69
- `lsof -ti :<port> -sTCP:LISTEN` gives the process id, and `lsof -a -p <pid> -d cwd` gives
70
- the directory it runs in. Stop it only when that directory is inside this project, and
71
- stop its children before the parent so nothing survives by reparenting. A holder outside
72
- this project belongs to other work: leave it running, report it, and bind to another port.
73
- Never stop a process because its command line matches a name. One `pkill` pattern reaches
74
- every project on the machine and takes down work that has nothing to do with this run.
75
- Never continue against a process you cannot identify, and never report a round trip proven
76
- by one.
77
-
78
- Address a local agent by host name rather than by an IP literal. Some local agents bind
79
- IPv6 only, so an IPv4 literal fails against the correct port.
80
-
81
- Drive the real UI on this journey's own surface, and make sure that the frontend receives
82
- working generative UI from the agent. This is the step that covers realtime delivery, the
83
- frontend provider being wired to this runtime, and a generative UI component actually
84
- rendering, and no command-line check reaches any of them. It is not optional polish: a run
85
- that skips it has proven the agent and not the journey, and the graph ends such a run as
86
- blocked rather than complete.
152
+ Never report a result you did not see, on either surface.
87
153
 
88
- For a web frontend, that surface is a browser, and it also covers browser-origin CORS and
89
- CSP, which a CLI request never exercises. Use a browser MCP server already configured for
90
- the coding agent you are running as, the same way the CopilotKit documentation MCP server
91
- below is configured. Do not add a browser driver to this project: a devDependency and a
92
- browser download land in the diff and tax a repository that never asked for one. If nothing
93
- in your environment can drive a browser, skip this step rather than installing one.
154
+ ### Step 6a -- Web frontends: React SPA, Next.js, Angular, Vue 3
155
+
156
+ The surface is a browser, and it also covers browser-origin CORS and CSP, which a CLI
157
+ request never exercises. Drive it with the browser control step 6 named.
158
+
159
+ 1. Open the frontend URL from step 2 and wait for the page to finish loading.
160
+ 2. Take one page snapshot. Record whether the CopilotKit surface is on the page. A page
161
+ that renders without it is a wiring failure rather than a proof to retry.
162
+ 3. Read the browser console before you type anything, and record every error already
163
+ there. An error at this point belongs to page load rather than to the request.
164
+ 4. Enter the step 1 request into the CopilotKit input, in the words step 1 recorded, and
165
+ submit it.
166
+ 5. Wait for the assistant turn to finish rather than for a fixed number of seconds. The
167
+ turn is finished when the streamed text stops growing and the generative UI component
168
+ has rendered.
169
+ 6. Take one screenshot of the finished turn and record where you wrote it.
170
+ 7. Read the browser console a second time, and record every error that step 3 did not
171
+ already list. Those belong to the request.
172
+ 8. Read the network requests. Record every request the page made to the runtime endpoint
173
+ and the status each returned. An answer on the page with no successful request to this
174
+ runtime behind it came from something else, and that is a failed proof rather than a
175
+ passing one.
176
+ 9. Record one line for the finished turn: the time, the page URL, the element you read
177
+ the answer from, and what that element showed.
94
178
 
95
179
  Report exactly one of `performed`, `skipped-no-browser-tool`, or `failed` for a web
96
180
  frontend.
97
181
 
98
- For React Native, that surface is a device or emulator, and a browser cannot stand in for
99
- it. Run the app on a booted emulator, drive the same request, and capture the terminal
100
- state with `adb exec-out screencap -p`. Read `adb logcat` as well: a redbox is a runtime
101
- failure the terminal output never shows. If no device or emulator is available, skip this
102
- step rather than substituting a browser.
182
+ ### Step 6b -- React Native
183
+
184
+ The surface is a device or emulator, and a browser cannot stand in for it.
185
+
186
+ 1. List the booted devices in one command: `adb devices -l`. With no booted device this
187
+ step is `skipped-no-device`. Do not substitute a browser.
188
+ 2. Build and install the app on the booted device with the project's own script, which
189
+ an Expo or React Native CLI project names in `package.json`.
190
+ 3. Clear the log buffer before the request: `adb logcat -c`.
191
+ 4. Open the CopilotKit surface in the running app and enter the step 1 request, in the
192
+ words step 1 recorded.
193
+ 5. Wait for the assistant turn to finish rather than for a fixed number of seconds.
194
+ 6. Capture the terminal state with
195
+ `adb exec-out screencap -p > .copilotkit/proof/surface.png`, and record that path.
196
+ 7. Read the log for the request with `adb logcat -d -t 500`. A redbox is a runtime failure
197
+ the terminal state never shows.
198
+ 8. Record one line for the finished turn: the time, the platform, the device id, the
199
+ screen you were on, and what that screen showed.
200
+
201
+ An Android emulator reaches a runtime on the host machine at `10.0.2.2` rather than at
202
+ `localhost`. A request that fails against the runtime with nothing in the runtime's own
203
+ log is that, rather than a broken runtime.
103
204
 
104
205
  Report exactly one of `performed`, `skipped-no-device`, or `failed` for React Native.
105
206
 
106
- Never report a result you did not see, on either surface.
107
-
108
- Record the input, visible result, relevant process status, and evidence locations. Do not
109
- return secret values.
207
+ ## Step 7 -- Check the answer against the project's data
110
208
 
111
209
  Where the answer is meant to be about data the project holds, check it against that data.
112
210
  Read the entities the project holds -- the ids, names, or records the answer claims to
@@ -122,6 +220,16 @@ project's data never reaches the agent, the agent receives it and its instructio
122
220
  it, the page loads its data after the context was registered, or the run wired a different
123
221
  source than the page renders. Fix that cause, then prove again.
124
222
 
223
+ ## Step 8 -- Compare with the recorded OSS baseline
224
+
225
+ Run this step only for a recorded `both-oss` starting state. Compare the final round trip
226
+ with the recorded OSS baseline. The same frontend request must still reach the same agent
227
+ and produce the same kind of user-visible result. The runtime must now report
228
+ `licenseStatus`, and the authenticated Intelligence checks must pass. Record both before
229
+ and after evidence.
230
+
231
+ ## Step 9 -- Set up the continued-development tools
232
+
125
233
  Fetch the continued-development guide from the main coding agent with the proof
126
234
  documentation. Try the continued-development tools after the application passes proof.
127
235
  Use it to install the project-scoped CopilotKit Skills.
@@ -131,9 +239,9 @@ Do not validate whether the Skills or MCP server installed correctly. Record the
131
239
  result for each attempt. Report each tool result separately. A tool error does not change
132
240
  the proof result.
133
241
 
134
- Gather what you need in as few commands as possible. Combine independent reads into one
135
- command rather than running them one at a time. Split a command only when its result decides
136
- what you run next.
242
+ ## Step 10 -- Return the result
137
243
 
138
244
  Return the proof or the exact failed step to the main coding agent, together with the
139
- surface-check outcome and which surface it speaks for. Stop after you return the result.
245
+ input, the visible result, the relevant process status, the evidence locations, the
246
+ surface-check outcome, and which surface that outcome speaks for. Do not return secret
247
+ values. Stop after you return the result.
@@ -18,13 +18,13 @@ Mark each step that the selected pages do not prove. Do not treat the documentat
18
18
  proof that the requested integration is unsupported.
19
19
 
20
20
  After the developer approves the best-effort plan, run
21
- `npx --yes copilotkit@4.9.1 onboard read fallback/best-effort`.
21
+ `npx --yes copilotkit@4.9.4 onboard read fallback/best-effort`.
22
22
 
23
23
  Send one short report. Run the feedback command without another developer question. The
24
24
  CLI telemetry gate decides whether the report is sent.
25
25
 
26
26
  ```text
27
- npx --yes copilotkit@4.9.1 onboard feedback
27
+ npx --yes copilotkit@4.9.4 onboard feedback
28
28
  ```
29
29
 
30
30
  Write the feedback message to the command's standard input, in at most four lines.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "copilotkit",
3
- "version": "4.9.1",
3
+ "version": "4.9.4",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -76,6 +76,9 @@ var agentCore = copilotKitStarter("examples/integrations/agentcore");
76
76
  var STARTER_SOURCE_CATALOG = {
77
77
  "langgraph-py": langGraphPython,
78
78
  "langgraph-js": copilotKitStarter("examples/integrations/langgraph-js"),
79
+ "langgraph-fastapi": copilotKitStarter(
80
+ "examples/integrations/langgraph-fastapi"
81
+ ),
79
82
  "claude-sdk-typescript": copilotKitStarter(
80
83
  "examples/integrations/claude-sdk-typescript"
81
84
  ),
@@ -14695,7 +14698,7 @@ import * as path4 from "node:path";
14695
14698
 
14696
14699
  // apps/cli/src/config.ts
14697
14700
  function getTemplateRef() {
14698
- return true ? "2ad03320fe1f0834b138113fffe791781e5b226e" : "main";
14701
+ return true ? "f6f2dc4bb62b50d2f09384619f5b9e8fe7edde02" : "main";
14699
14702
  }
14700
14703
 
14701
14704
  // apps/cli/src/services/agentcore-config.ts
@@ -14897,6 +14900,7 @@ var AGENT_FRAMEWORKS = Object.keys(
14897
14900
  var FRAMEWORK_EMOJI = {
14898
14901
  "langgraph-py": "\u{1F99C}",
14899
14902
  "langgraph-js": "\u{1F99C}",
14903
+ "langgraph-fastapi": "\u{1F99C}",
14900
14904
  "claude-sdk-typescript": "\u{1F506}",
14901
14905
  "claude-sdk-python": "\u{1F506}",
14902
14906
  flows: "\u{1F465}",
@@ -14927,6 +14931,10 @@ var FRAMEWORK_CHOICES = [
14927
14931
  label: `${FRAMEWORK_EMOJI["langgraph-js"]} LangGraph (JavaScript)`,
14928
14932
  value: "langgraph-js"
14929
14933
  },
14934
+ {
14935
+ label: `${FRAMEWORK_EMOJI["langgraph-fastapi"]} LangGraph (Python, FastAPI)`,
14936
+ value: "langgraph-fastapi"
14937
+ },
14930
14938
  {
14931
14939
  label: `${FRAMEWORK_EMOJI["claude-sdk-typescript"]} Claude Agent SDK (TypeScript)`,
14932
14940
  value: "claude-sdk-typescript"
@@ -15023,6 +15031,7 @@ var GOOGLE_ENV_KEY = {
15023
15031
  function standardTemplate(framework, template, successEmoji) {
15024
15032
  const pythonUvTemplates = /* @__PURE__ */ new Set([
15025
15033
  "langgraph-py",
15034
+ "langgraph-fastapi",
15026
15035
  "claude-sdk-python",
15027
15036
  "flows",
15028
15037
  "llamaindex",
@@ -15060,6 +15069,11 @@ var FRAMEWORK_TEMPLATES = {
15060
15069
  TEMPLATE_REPOS["langgraph-js"],
15061
15070
  `\u{1FA81}\u{1F91D}${FRAMEWORK_EMOJI["langgraph-js"]}`
15062
15071
  ),
15072
+ "langgraph-fastapi": standardTemplate(
15073
+ "langgraph-fastapi",
15074
+ TEMPLATE_REPOS["langgraph-fastapi"],
15075
+ `\u{1FA81}\u{1F91D}${FRAMEWORK_EMOJI["langgraph-fastapi"]}`
15076
+ ),
15063
15077
  "claude-sdk-typescript": {
15064
15078
  ...standardTemplate(
15065
15079
  "claude-sdk-typescript",