copilotkit 4.9.4 → 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 +1752 -672
  4. package/onboarding/index.json +15 -1
  5. package/onboarding/prompts/authenticate/start.md +129 -65
  6. package/onboarding/prompts/conversion/plan.md +103 -0
  7. package/onboarding/prompts/credentials/finalize-plan.md +97 -122
  8. package/onboarding/prompts/credentials/plan.md +26 -21
  9. package/onboarding/prompts/fallback/best-effort.md +99 -19
  10. package/onboarding/prompts/framework/ag2.md +7 -7
  11. package/onboarding/prompts/framework/agno.md +11 -8
  12. package/onboarding/prompts/framework/built-in.md +2 -2
  13. package/onboarding/prompts/framework/claude-sdk-python.md +7 -7
  14. package/onboarding/prompts/framework/claude-sdk-typescript.md +9 -9
  15. package/onboarding/prompts/framework/crewai-flows.md +27 -11
  16. package/onboarding/prompts/framework/deep-agents.md +8 -7
  17. package/onboarding/prompts/framework/google-adk.md +3 -3
  18. package/onboarding/prompts/framework/langgraph-fastapi.md +3 -3
  19. package/onboarding/prompts/framework/langgraph-python.md +3 -3
  20. package/onboarding/prompts/framework/langgraph-typescript.md +3 -3
  21. package/onboarding/prompts/framework/llamaindex.md +6 -6
  22. package/onboarding/prompts/framework/mastra.md +3 -3
  23. package/onboarding/prompts/framework/ms-agent-dotnet.md +3 -3
  24. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +7 -9
  25. package/onboarding/prompts/framework/ms-agent-python.md +3 -3
  26. package/onboarding/prompts/framework/pydantic-ai.md +26 -15
  27. package/onboarding/prompts/framework/strands-python.md +7 -6
  28. package/onboarding/prompts/framework/strands-typescript.md +9 -7
  29. package/onboarding/prompts/frontend/angular.md +16 -3
  30. package/onboarding/prompts/frontend/nextjs.md +3 -3
  31. package/onboarding/prompts/frontend/plan.md +6 -6
  32. package/onboarding/prompts/frontend/react-native.md +7 -2
  33. package/onboarding/prompts/frontend/react-spa.md +2 -2
  34. package/onboarding/prompts/frontend/vue.md +7 -2
  35. package/onboarding/prompts/implementation/build-and-validate.md +45 -79
  36. package/onboarding/prompts/proof/complete.md +8 -6
  37. package/onboarding/prompts/proof/oss-baseline.md +15 -50
  38. package/onboarding/prompts/proof/round-trip.md +83 -263
  39. package/onboarding/prompts/starter/clone.md +4 -4
  40. package/onboarding/prompts/subagent/create-plan.md +45 -0
  41. package/onboarding/prompts/subagent/implement-and-validate.md +70 -44
  42. package/onboarding/prompts/subagent/inspect-repository.md +25 -3
  43. package/onboarding/prompts/subagent/prove-oss-baseline.md +2 -1
  44. package/onboarding/prompts/subagent/prove-round-trip.md +143 -34
  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
@@ -1,97 +1,63 @@
1
1
  # Implement and validate the plan
2
2
 
3
- Do not implement the plan yourself. Spawn one implementation subagent.
3
+ Do not implement the plan yourself. Use the step order in the approved plan.
4
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. Give it the documentation policy recorded during framework selection.
8
- Wait for the subagent to finish.
5
+ ## Protected-path audit
9
6
 
10
- If all implementation and validation steps pass, run
11
- `npx --yes copilotkit@4.9.4 onboard read proof/round-trip`.
7
+ Run the audit from the target app directory:
12
8
 
13
- If a validation command fails, decide which kind of failure it is before you route.
9
+ ```text
10
+ npx --yes copilotkit@4.9.17 onboard audit
11
+ ```
14
12
 
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.
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`.
18
16
 
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.4 onboard read unsupported/no-validated-path`.
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.
24
20
 
25
- ## Implementation subagent brief
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.
26
24
 
27
- Everything below the rule is the subagent's prompt. Give it verbatim.
25
+ A non-pass audit never continues the run. Do not send an audit result to a repair worker.
28
26
 
29
- ---
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.
30
36
 
31
- # Implement and validate the approved plan
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.
32
39
 
33
- Use only the approved plan and the selected documentation URLs. Follow the documentation
34
- policy the main coding agent gives you before you change the project.
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.
35
43
 
36
- Add only the props, options, and imports that appear in the fetched documentation. A
37
- remembered API from an earlier CopilotKit version will fail type checking against this
38
- release, so do not decorate a documented example with anything it does not show.
44
+ After the selected implementation path passes, run
45
+ `npx --yes copilotkit@4.9.17 onboard read proof/round-trip`.
39
46
 
40
- The documentation supplies the wiring. The project supplies the application. That rule
41
- governs props, options, and imports, and it stops there. A documentation example names a
42
- domain of its own to make itself readable. Build what the plan names, in the project's
43
- own domain, from the wiring the page shows. Do not carry the page's example domain into
44
- the project: not its agent name, not its tools, not its data.
47
+ ## Repair rules
45
48
 
46
- Preserve each agent or frontend that already exists. Add only the missing parts and the
47
- CopilotKit connection. Do not read, show, store, or return secret values. Do not read a
48
- file outside the project directory: not for a credential, and not for an API question the
49
- fetched documentation answers. A missing credential is the main coding agent's to ask
50
- for.
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
51
 
52
- For a recorded `both-oss` baseline, preserve the existing agent, frontend, CopilotKit
53
- integration, user-visible request, and runtime behavior. Do not replace the existing
54
- persistence. Change only the approved project selection, the approved CopilotKit
55
- dependency upgrade, and the Intelligence runtime wiring.
56
- Run the recorded baseline checks again after the Intelligence wiring and report any
57
- regression.
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.
58
56
 
59
- Apply the planned CopilotKit dependency upgrade before you wire Intelligence, as its own
60
- step, and record each version it changed. Then re-run the recorded baseline checks. A
61
- regression at this point can only be the upgrade, which is why it is checked here rather
62
- than after the wiring.
57
+ ## Route-out rules
63
58
 
64
- If the baseline regresses, restore the manifest and lockfile to their recorded state,
65
- leave Intelligence unwired, and report the regression with the failing check. A
66
- half-upgraded project with no working chat is worse than the one this run was given, and
67
- finishing the wiring on top of a broken baseline hides which change broke it.
68
-
69
- Report each `@copilotkit/*` version before and after the upgrade. Where the plan named no
70
- dependency change, say that the installed versions already met the floor.
71
-
72
- When the documentation creates the frontend with the framework's own scaffolder,
73
- run that scaffolder rather than hand-authoring what it emits.
74
- Do not re-declare a compiler option it set. Every real project of that framework
75
- inherits those defaults, so a hand-written replacement measures a configuration no
76
- developer has. Where the plan needs configuration the scaffolder did not write,
77
- extend the scaffolder's file and set only what you add.
78
-
79
- Where the plan names data the project already holds, share that data with the agent
80
- through the context API the selected documentation names for this frontend. Then write the agent's instructions to
81
- refuse to answer about entities the shared context does not carry, and to name what is
82
- missing instead. An agent with no context and no refusal invents plausible entities, and
83
- no part of the run errors.
84
-
85
- Run the validation commands from the approved plan. Record the changed files, command
86
- results, and each error. Do not claim that the real user journey works in this phase.
87
-
88
- Report the runtime constructor you wrote. Name whether it passes `intelligence` or
89
- `runner`. A runtime built with `runner` is the SSE runtime and never reads the credential,
90
- whatever the browser shows.
91
-
92
- Gather what you need in as few commands as possible. Combine independent reads into one
93
- command rather than running them one at a time. Split a command only when its result decides
94
- what you run next.
95
-
96
- Return the implementation result and validation evidence to the main coding agent. Stop
97
- after you return the result.
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.4 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.4 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.4 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.4 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.4 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`.
@@ -107,7 +109,7 @@ If the round trip proved and something after it still blocked this run, add `--b
107
109
  to the same command:
108
110
 
109
111
  ```text
110
- npx --yes copilotkit@4.9.4 onboard complete --visual-check performed --blocked-by <cause>
112
+ npx --yes copilotkit@4.9.17 onboard complete --visual-check performed --blocked-by <cause>
111
113
  ```
112
114
 
113
115
  The cause is one of `hosted-dashboard` for a managed dashboard that did not load or refused
@@ -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.4 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.4 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.4 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`.