copilotkit 4.9.2 → 4.9.17

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 (47) hide show
  1. package/README.md +13 -12
  2. package/cli-build-info.json +8 -8
  3. package/index.js +1879 -685
  4. package/onboarding/index.json +15 -0
  5. package/onboarding/prompts/authenticate/start.md +180 -71
  6. package/onboarding/prompts/conversion/plan.md +103 -0
  7. package/onboarding/prompts/credentials/finalize-plan.md +105 -135
  8. package/onboarding/prompts/credentials/plan.md +42 -25
  9. package/onboarding/prompts/fallback/best-effort.md +107 -16
  10. package/onboarding/prompts/framework/ag2.md +8 -19
  11. package/onboarding/prompts/framework/agno.md +12 -20
  12. package/onboarding/prompts/framework/built-in.md +4 -14
  13. package/onboarding/prompts/framework/claude-sdk-python.md +8 -18
  14. package/onboarding/prompts/framework/claude-sdk-typescript.md +10 -20
  15. package/onboarding/prompts/framework/crewai-flows.md +31 -27
  16. package/onboarding/prompts/framework/deep-agents.md +10 -20
  17. package/onboarding/prompts/framework/google-adk.md +4 -16
  18. package/onboarding/prompts/framework/langgraph-fastapi.md +4 -16
  19. package/onboarding/prompts/framework/langgraph-python.md +4 -16
  20. package/onboarding/prompts/framework/langgraph-typescript.md +4 -16
  21. package/onboarding/prompts/framework/llamaindex.md +8 -19
  22. package/onboarding/prompts/framework/mastra.md +4 -16
  23. package/onboarding/prompts/framework/ms-agent-dotnet.md +19 -50
  24. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +24 -36
  25. package/onboarding/prompts/framework/ms-agent-python.md +4 -16
  26. package/onboarding/prompts/framework/pydantic-ai.md +27 -26
  27. package/onboarding/prompts/framework/strands-python.md +9 -18
  28. package/onboarding/prompts/framework/strands-typescript.md +10 -18
  29. package/onboarding/prompts/frontend/angular.md +22 -19
  30. package/onboarding/prompts/frontend/nextjs.md +6 -16
  31. package/onboarding/prompts/frontend/plan.md +9 -14
  32. package/onboarding/prompts/frontend/react-native.md +11 -14
  33. package/onboarding/prompts/frontend/react-spa.md +5 -15
  34. package/onboarding/prompts/frontend/vue.md +12 -14
  35. package/onboarding/prompts/implementation/build-and-validate.md +61 -101
  36. package/onboarding/prompts/proof/complete.md +24 -5
  37. package/onboarding/prompts/proof/oss-baseline.md +15 -50
  38. package/onboarding/prompts/proof/round-trip.md +96 -271
  39. package/onboarding/prompts/starter/clone.md +4 -4
  40. package/onboarding/prompts/subagent/create-plan.md +49 -11
  41. package/onboarding/prompts/subagent/implement-and-validate.md +71 -51
  42. package/onboarding/prompts/subagent/inspect-repository.md +38 -9
  43. package/onboarding/prompts/subagent/prove-oss-baseline.md +2 -1
  44. package/onboarding/prompts/subagent/prove-round-trip.md +154 -51
  45. package/onboarding/prompts/unsupported/no-validated-path.md +10 -2
  46. package/package.json +1 -1
  47. package/release/release-tool.js +1 -1
@@ -4,21 +4,19 @@ Preserve an existing Vue 3 frontend. Use the selected page for a new frontend.
4
4
 
5
5
  ## Documentation
6
6
 
7
- - Credentials and plan: `Not applicable`
8
- - Implementation and validation: https://docs.copilotkit.ai/vue.md
9
- - Proof: https://docs.copilotkit.ai/vue.md
7
+ - https://docs.copilotkit.ai/vue.md
8
+ - https://docs.copilotkit.ai/reference/vue/components/CopilotKitProvider.md
9
+ - https://docs.copilotkit.ai/reference/vue/hooks/useAgentContext.md
10
+ - https://docs.copilotkit.ai/reference/vue/hooks/useComponent.md
10
11
 
11
- Fetch the selected documentation page. Record Vue 3 as the selected frontend and keep
12
- this URL. Do not use remembered CopilotKit instructions.
12
+ Use the component page for the provider setup. Use the hook page for frontend context.
13
13
 
14
- A fetch tool that refuses a URL, or fails to reach it, reports a limit of the tool and
15
- not a fact about the page. Retrieve the same URL a second way before you judge it. Run
16
- `curl -fsSL <url>`, or read the same page without the `.md` suffix. Treat a page as
17
- unavailable only after a second method also fails.
14
+ Render the terminal component with `useComponent` from `@copilotkit/vue/v2`, from the hook
15
+ page above. Vue has its own `useComponent`, which is not the React package. Take it from
16
+ that reference page rather than from a Vue generative-UI guide, which is not published.
18
17
 
19
- If the page supports the selection, run
20
- `npx --yes copilotkit@4.9.2 onboard read credentials/finalize-plan`.
18
+ If the pages support the selection, record Vue 3 and these URLs. Then run
19
+ `npx --yes copilotkit@4.9.17 onboard read credentials/finalize-plan`.
21
20
 
22
- If a second method also fails, or the page that loads does not support the selection,
23
- run
24
- `npx --yes copilotkit@4.9.2 onboard read unsupported/no-validated-path`.
21
+ If the documentation does not support the selection, run
22
+ `npx --yes copilotkit@4.9.17 onboard read unsupported/no-validated-path`.
@@ -1,103 +1,63 @@
1
1
  # Implement and validate the plan
2
2
 
3
- Do not implement the plan yourself. Spawn one implementation subagent.
4
-
5
- Give the subagent the full text of the implementation brief at the end of this prompt, the
6
- approved plan, selected framework, frontend, model, repository findings, and selected
7
- documentation URLs.
8
- Wait for the subagent to finish.
9
-
10
- If all implementation and validation steps pass, run
11
- `npx --yes copilotkit@4.9.2 onboard read proof/round-trip`.
12
-
13
- If a validation command fails, decide which kind of failure it is before you route.
14
-
15
- A failure in a file this run created or changed is a defect in the new work, not a limit
16
- of this release. Fix it and run the same command again. Do not continue to the next step
17
- until that command passes. Make at most three repair attempts per command.
18
-
19
- Route out only when the failure is not yours to fix: the failure is in code this run did
20
- not write, or the fix requires changing the developer's existing agent or frontend,
21
- or the same command still fails after three repair attempts, or the documentation does not
22
- support the plan. In those cases run
23
- `npx --yes copilotkit@4.9.2 onboard read unsupported/no-validated-path`.
24
-
25
- ## Implementation subagent brief
26
-
27
- Everything below the rule is the subagent's prompt. Give it verbatim.
28
-
29
- ---
30
-
31
- # Implement and validate the approved plan
32
-
33
- Use only the approved plan and the selected documentation URLs. Fetch every URL in one
34
- step, before you change the project, rather than one after another.
35
- Do not use remembered CopilotKit instructions.
36
-
37
- A fetch tool that refuses a URL, or fails to reach it, reports a limit of the tool and
38
- not a fact about the page. Retrieve the same URL a second way before you judge it. Run
39
- `curl -fsSL <url>`, or read the same page without the `.md` suffix. Report a
40
- documentation gap only after a second method also fails.
41
-
42
- Add only the props, options, and imports that appear in the fetched documentation. A
43
- remembered API from an earlier CopilotKit version will fail type checking against this
44
- release, so do not decorate a documented example with anything it does not show.
45
-
46
- The documentation supplies the wiring. The project supplies the application. That rule
47
- governs props, options, and imports, and it stops there. A documentation example names a
48
- domain of its own to make itself readable. Build what the plan names, in the project's
49
- own domain, from the wiring the page shows. Do not carry the page's example domain into
50
- the project: not its agent name, not its tools, not its data.
51
-
52
- Preserve each agent or frontend that already exists. Add only the missing parts and the
53
- CopilotKit connection. Do not read, show, store, or return secret values. Do not read a
54
- file outside the project directory: not for a credential, and not for an API question the
55
- fetched documentation answers. A missing credential is the main coding agent's to ask
56
- for.
57
-
58
- For a recorded `both-oss` baseline, preserve the existing agent, frontend, CopilotKit
59
- integration, user-visible request, and runtime behavior. Do not replace the existing
60
- persistence. Change only the approved project selection, the approved CopilotKit
61
- dependency upgrade, and the Intelligence runtime wiring.
62
- Run the recorded baseline checks again after the Intelligence wiring and report any
63
- regression.
64
-
65
- Apply the planned CopilotKit dependency upgrade before you wire Intelligence, as its own
66
- step, and record each version it changed. Then re-run the recorded baseline checks. A
67
- regression at this point can only be the upgrade, which is why it is checked here rather
68
- than after the wiring.
69
-
70
- If the baseline regresses, restore the manifest and lockfile to their recorded state,
71
- leave Intelligence unwired, and report the regression with the failing check. A
72
- half-upgraded project with no working chat is worse than the one this run was given, and
73
- finishing the wiring on top of a broken baseline hides which change broke it.
74
-
75
- Report each `@copilotkit/*` version before and after the upgrade. Where the plan named no
76
- dependency change, say that the installed versions already met the floor.
77
-
78
- When the documentation creates the frontend with the framework's own scaffolder,
79
- run that scaffolder rather than hand-authoring what it emits.
80
- Do not re-declare a compiler option it set. Every real project of that framework
81
- inherits those defaults, so a hand-written replacement measures a configuration no
82
- developer has. Where the plan needs configuration the scaffolder did not write,
83
- extend the scaffolder's file and set only what you add.
84
-
85
- Where the plan names data the project already holds, share that data with the agent
86
- through the context API the selected documentation names for this frontend. Then write the agent's instructions to
87
- refuse to answer about entities the shared context does not carry, and to name what is
88
- missing instead. An agent with no context and no refusal invents plausible entities, and
89
- no part of the run errors.
90
-
91
- Run the validation commands from the approved plan. Record the changed files, command
92
- results, and each error. Do not claim that the real user journey works in this phase.
93
-
94
- Report the runtime constructor you wrote. Name whether it passes `intelligence` or
95
- `runner`. A runtime built with `runner` is the SSE runtime and never reads the credential,
96
- whatever the browser shows.
97
-
98
- Gather what you need in as few commands as possible. Combine independent reads into one
99
- command rather than running them one at a time. Split a command only when its result decides
100
- what you run next.
101
-
102
- Return the implementation result and validation evidence to the main coding agent. Stop
103
- after you return the result.
3
+ Do not implement the plan yourself. Use the step order in the approved plan.
4
+
5
+ ## Protected-path audit
6
+
7
+ Run the audit from the target app directory:
8
+
9
+ ```text
10
+ npx --yes copilotkit@4.9.17 onboard audit
11
+ ```
12
+
13
+ It compares every protected path with the digest the CLI captured for it. Its result starts
14
+ with `Status: passed`, `Status: failed`, or `Status: blocked`. The audit passes only when
15
+ the result starts with `Status: passed`.
16
+
17
+ `Status: failed` names each protected path that changed and how. If an audit reports a
18
+ changed protected path, use the route-out rules. Never repair, reset, or revert a protected
19
+ path. Also do not retry the audit: it reads files, so a second run of it answers the same.
20
+
21
+ `Status: blocked` means the audit has no baseline to read. A blocked audit compared
22
+ nothing and proved nothing changed. It is not a preservation failure: do not report a
23
+ protected path as changed. Report the printed reason and use the route-out rules.
24
+
25
+ A non-pass audit never continues the run. Do not send an audit result to a repair worker.
26
+
27
+ Spawn one implementation subagent. Tell it to run
28
+ `npx --yes copilotkit@4.9.17 onboard read subagent/implement-and-validate` first and follow
29
+ the prompt it returns. If that read fails because the subagent cannot use the shell, stop that
30
+ subagent. Run the same command yourself, then spawn a fresh subagent with the returned prompt
31
+ and the same handoff. Give it the plan, selected framework, frontend, model, exact target app
32
+ directory, selected documentation URLs, and the
33
+ documentation policy recorded during framework selection or conversion planning. On a
34
+ conversion, also give it the frozen criterion. Give it the protected path list. Require it
35
+ to implement every step in plan order and run the full validation list. Wait for it.
36
+
37
+ One subagent implements the whole plan. Do not divide the work across concurrent subagents,
38
+ and do not spawn a second subagent to reconcile a split.
39
+
40
+ If the implementation result does not start with `Status: passed`, do not continue to proof.
41
+ Run the protected-path audit after the implementation subagent passes. If any protected path
42
+ changed, use the route-out rules. Continue to proof only when that audit passes.
43
+
44
+ After the selected implementation path passes, run
45
+ `npx --yes copilotkit@4.9.17 onboard read proof/round-trip`.
46
+
47
+ ## Repair rules
48
+
49
+ If a result starts with `Status: failed`, or a validation command fails, first
50
+ decide which kind of failure it is before you route.
51
+
52
+ A failure in a file this run created or changed is a defect in the new work. Send it to the
53
+ implementation subagent. Before you run the next command, repeat the failed command. Make at
54
+ most three repair attempts per command. After the repair passes, continue on the same
55
+ implementation path.
56
+
57
+ ## Route-out rules
58
+
59
+ Route out for `Status: blocked`. Route out only when the failure is not yours to fix: the
60
+ failure is in code this run did not write, the fix requires changing the developer's existing
61
+ agent or frontend, the same command still fails after three repair attempts, or the
62
+ documentation does not support the plan. In those cases run
63
+ `npx --yes copilotkit@4.9.17 onboard read unsupported/no-validated-path`.
@@ -40,12 +40,14 @@ The handoff must include:
40
40
  - How to use https://intelligence.copilotkit.ai to manage the Intelligence installation.
41
41
  - The process IDs and stop commands for the running agent and frontend.
42
42
  - The `@copilotkit/*` versions this conversion changed, and what they were before.
43
+ - On a conversion, the criterion this run was judged against, in the words the run was
44
+ given.
43
45
 
44
46
  Name the debugging surface this journey's frontend can reach, rather than the one the rest
45
47
  of the documentation leads with. For a web frontend it is the CopilotKit Inspector. For
46
48
  React Native there is no Inspector: it is a browser overlay built on a DOM custom element,
47
49
  and `@copilotkit/react-native` does not ship it. Give a mobile developer
48
- `npx --yes copilotkit@4.9.2 verify --round-trip`, the runtime's own log, the AG-UI
50
+ `npx --yes copilotkit@4.9.17 verify --round-trip`, the runtime's own log, the AG-UI
49
51
  Event Inspector in the CopilotKit VS Code extension, and the Intelligence thread view
50
52
  instead. Naming the Inspector to a developer who cannot open it costs them the time it
51
53
  takes to conclude their own wiring is broken.
@@ -57,7 +59,7 @@ the friction commands without another developer question. The CLI telemetry gate
57
59
  whether the report is sent.
58
60
 
59
61
  ```text
60
- npx --yes copilotkit@4.9.2 onboard friction --category <slug> --cost-seconds <seconds>
62
+ npx --yes copilotkit@4.9.17 onboard friction --category <slug> --cost-seconds <seconds>
61
63
  ```
62
64
 
63
65
  Write one or two sentences on the command's standard input. Pick one category from
@@ -74,14 +76,14 @@ Tell the developer when you send a friction report. Do not quote or summarize th
74
76
  unless the developer asks. If the CLI says that telemetry is disabled or unavailable,
75
77
  state that the report was not sent and continue without another question.
76
78
 
77
- When the evidence is gathered, run `npx --yes copilotkit@4.9.2 onboard complete`, carrying
79
+ When the evidence is gathered, run `npx --yes copilotkit@4.9.17 onboard complete`, carrying
78
80
  the surface-check outcome the proof subagent returned. Pass exactly one flag, and pass the
79
81
  one that matches this journey's surface.
80
82
 
81
83
  For a web frontend -- React SPA, Next.js, Angular, Vue:
82
84
 
83
85
  ```text
84
- npx --yes copilotkit@4.9.2 onboard complete --visual-check <outcome>
86
+ npx --yes copilotkit@4.9.17 onboard complete --visual-check <outcome>
85
87
  ```
86
88
 
87
89
  The outcome is one of `performed`, `skipped-no-browser-tool`, or `failed`.
@@ -89,7 +91,7 @@ The outcome is one of `performed`, `skipped-no-browser-tool`, or `failed`.
89
91
  For React Native:
90
92
 
91
93
  ```text
92
- npx --yes copilotkit@4.9.2 onboard complete --device-check <outcome>
94
+ npx --yes copilotkit@4.9.17 onboard complete --device-check <outcome>
93
95
  ```
94
96
 
95
97
  The outcome is one of `performed`, `skipped-no-device`, or `failed`.
@@ -102,3 +104,20 @@ Pass the outcome you were given rather than the one you wanted. Anything but `pe
102
104
  prints what the missing check leaves unverified and ends this run as blocked. That output
103
105
  is the developer's finding, so carry it into the summary rather than restating it as a
104
106
  smaller caveat.
107
+
108
+ If the round trip proved and something after it still blocked this run, add `--blocked-by`
109
+ to the same command:
110
+
111
+ ```text
112
+ npx --yes copilotkit@4.9.17 onboard complete --visual-check performed --blocked-by <cause>
113
+ ```
114
+
115
+ The cause is one of `hosted-dashboard` for a managed dashboard that did not load or refused
116
+ a sign-in, `inspector` for a debugging surface that did not open, `plan-excluded-capability`
117
+ for a capability the approved plan had already excluded for this framework, and `other` for
118
+ anything else. Pick `other` rather than leaving the flag off. The command ends the run as
119
+ blocked and prints what the blocker leaves unverified.
120
+
121
+ This is the flag for a journey that worked. It is not a way to report an unsupported path,
122
+ and a blocked run here is still owed the full handoff above: the URL, the start command,
123
+ the process IDs, and the versions this conversion changed.
@@ -1,59 +1,24 @@
1
1
  # Prove the existing OSS baseline
2
2
 
3
- Do not prove the baseline yourself. Spawn one proof subagent.
4
-
5
- Give the subagent the full text of the baseline brief at the end of this prompt, the
6
- repository findings, and the exact CLI package spec. Wait for the subagent to finish.
3
+ Do not prove the baseline yourself. Spawn one proof subagent. Tell it to run
4
+ `npx --yes copilotkit@4.9.17 onboard read subagent/prove-oss-baseline` first and follow the
5
+ prompt it returns. If that read fails because the subagent cannot use the shell, stop that
6
+ subagent. Run the same command yourself, then spawn a fresh subagent with the returned prompt
7
+ and the same handoff. Give it the repository findings and exact CLI package spec. Wait for the
8
+ subagent to finish.
7
9
 
8
10
  Do not change project files before this proof ends. Starting existing development
9
11
  processes and their ignored runtime files is allowed.
10
12
 
11
- If the subagent proves the `both-oss` predicate, keep its evidence with the plan. If it
12
- proves another supported starting state, record that state. In either case, run
13
- `npx --yes copilotkit@4.9.2 onboard read credentials/plan`.
13
+ If the subagent proves the `both-oss` predicate, keep its evidence with the plan and run
14
+ `npx --yes copilotkit@4.9.17 onboard read conversion/plan`. That project already works.
15
+ What it needs is the conversion, not a build.
16
+
17
+ If it proves another supported starting state, record that state and run
18
+ `npx --yes copilotkit@4.9.17 onboard read credentials/plan`. This prompt is served
19
+ whenever a project looks like an OSS integration, so a baseline that did not prove is an
20
+ ordinary starting state rather than a failure.
14
21
 
15
22
  If it cannot identify the running process safely, exposes a secret, or finds a baseline
16
23
  failure that cannot be classified, run
17
- `npx --yes copilotkit@4.9.2 onboard read unsupported/no-validated-path`.
18
-
19
- ## Baseline proof subagent brief
20
-
21
- Everything below the rule is the subagent's prompt. Give it verbatim.
22
-
23
- ---
24
-
25
- # Prove the existing OSS CopilotKit baseline
26
-
27
- Read and run only inside the project directory. Do not edit source, configuration,
28
- dependencies, or tracked files. Do not read, show, store, or return secret values.
29
-
30
- Find the expected agent id from the project. Start the existing agent and frontend only
31
- when they are not already running. Before using a port, identify its process and working
32
- directory. Do not stop a process outside this project.
33
-
34
- Prove the live runtime in this order:
35
-
36
- 1. GET `/info` from the project's CopilotKit runtime and require a valid response.
37
- 2. Require `/info` to declare the expected agent id.
38
- 3. Confirm that `licenseStatus` is absent. Its presence means the live runtime uses
39
- Intelligence and is not an OSS starting state.
40
- 4. Confirm from project files that the runtime constructor passes a `runner` option rather
41
- than an `intelligence` option. A package, import, project file, or key is not use proof.
42
- 5. Run
43
- `npx --yes copilotkit@4.9.2 verify --expect-runtime oss --round-trip --agent <expected-agent-id> --json`,
44
- with the runtime URL or auth header options that this project needs. Require exit zero
45
- and the JSON `ok` field to be `true`.
46
- 6. Drive one real request through the existing frontend, CopilotKit runtime, and expected
47
- agent. Require the existing user-visible result. If no browser tool is available, the
48
- round trip is not proved and the state is `unproved`.
49
-
50
- Classify the state as `both-oss` only when all six predicates are true: agent present,
51
- interface present, CopilotKit present, CopilotKit round trip proven, runtime connection
52
- `oss`, and managed Intelligence not configured. Return each predicate and its secret-safe
53
- evidence.
54
-
55
- The default in-memory OSS runner is ephemeral. SQLite, custom, or framework persistence
56
- can be durable. Report the persistence that project evidence proves, or `unproved`. Do not
57
- replace it and do not describe all OSS runs as ephemeral.
58
-
59
- Stop after returning the baseline result, process ids and ports used, and evidence paths.
24
+ `npx --yes copilotkit@4.9.17 onboard read unsupported/no-validated-path`.