copilotkit 4.9.2 → 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.
- package/cli-build-info.json +8 -8
- package/index.js +134 -20
- package/onboarding/index.json +1 -0
- package/onboarding/prompts/authenticate/start.md +78 -33
- package/onboarding/prompts/credentials/finalize-plan.md +21 -26
- package/onboarding/prompts/credentials/plan.md +37 -25
- package/onboarding/prompts/fallback/best-effort.md +22 -11
- package/onboarding/prompts/framework/ag2.md +4 -15
- package/onboarding/prompts/framework/agno.md +4 -15
- package/onboarding/prompts/framework/built-in.md +4 -14
- package/onboarding/prompts/framework/claude-sdk-python.md +4 -14
- package/onboarding/prompts/framework/claude-sdk-typescript.md +4 -14
- package/onboarding/prompts/framework/crewai-flows.md +11 -23
- package/onboarding/prompts/framework/deep-agents.md +4 -15
- package/onboarding/prompts/framework/google-adk.md +3 -15
- package/onboarding/prompts/framework/langgraph-fastapi.md +3 -15
- package/onboarding/prompts/framework/langgraph-python.md +3 -15
- package/onboarding/prompts/framework/langgraph-typescript.md +3 -15
- package/onboarding/prompts/framework/llamaindex.md +4 -15
- package/onboarding/prompts/framework/mastra.md +3 -15
- package/onboarding/prompts/framework/ms-agent-dotnet.md +18 -49
- package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +20 -30
- package/onboarding/prompts/framework/ms-agent-python.md +3 -15
- package/onboarding/prompts/framework/pydantic-ai.md +4 -14
- package/onboarding/prompts/framework/strands-python.md +4 -14
- package/onboarding/prompts/framework/strands-typescript.md +4 -14
- package/onboarding/prompts/frontend/angular.md +9 -19
- package/onboarding/prompts/frontend/nextjs.md +6 -16
- package/onboarding/prompts/frontend/plan.md +9 -14
- package/onboarding/prompts/frontend/react-native.md +7 -15
- package/onboarding/prompts/frontend/react-spa.md +5 -15
- package/onboarding/prompts/frontend/vue.md +8 -15
- package/onboarding/prompts/implementation/build-and-validate.md +5 -11
- package/onboarding/prompts/proof/complete.md +22 -5
- package/onboarding/prompts/proof/oss-baseline.md +3 -3
- package/onboarding/prompts/proof/round-trip.md +28 -23
- package/onboarding/prompts/starter/clone.md +4 -4
- package/onboarding/prompts/subagent/create-plan.md +4 -11
- package/onboarding/prompts/subagent/implement-and-validate.md +2 -8
- package/onboarding/prompts/subagent/inspect-repository.md +14 -7
- package/onboarding/prompts/subagent/prove-oss-baseline.md +1 -1
- package/onboarding/prompts/subagent/prove-round-trip.md +12 -18
- package/onboarding/prompts/unsupported/no-validated-path.md +2 -2
- package/package.json +1 -1
- package/release/release-tool.js +1 -1
package/cli-build-info.json
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"package": {
|
|
4
4
|
"name": "copilotkit",
|
|
5
|
-
"version": "4.9.
|
|
5
|
+
"version": "4.9.4"
|
|
6
6
|
},
|
|
7
7
|
"intelligence": {
|
|
8
|
-
"commit": "
|
|
8
|
+
"commit": "db031f9bc6f6c3918774aa8e375b6938ad66bb5e"
|
|
9
9
|
},
|
|
10
10
|
"copilotKit": {
|
|
11
|
-
"submittedInput": "
|
|
12
|
-
"commit": "
|
|
11
|
+
"submittedInput": "f6f2dc4bb62b50d2f09384619f5b9e8fe7edde02",
|
|
12
|
+
"commit": "f6f2dc4bb62b50d2f09384619f5b9e8fe7edde02"
|
|
13
13
|
},
|
|
14
14
|
"channel": "production",
|
|
15
|
-
"triggeringActor": "
|
|
15
|
+
"triggeringActor": "copilotkit-qa-bot[bot]",
|
|
16
16
|
"workflow": {
|
|
17
|
-
"runId": "
|
|
18
|
-
"runUrl": "https://github.com/CopilotKit/Intelligence/actions/runs/
|
|
17
|
+
"runId": "33113403059",
|
|
18
|
+
"runUrl": "https://github.com/CopilotKit/Intelligence/actions/runs/33113403059"
|
|
19
19
|
},
|
|
20
20
|
"validationResult": "passed",
|
|
21
21
|
"ag2": {
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"revision": "main",
|
|
25
25
|
"pinned": false
|
|
26
26
|
},
|
|
27
|
-
"builtAt": "2026-08-
|
|
27
|
+
"builtAt": "2026-08-27T20:28:56Z"
|
|
28
28
|
}
|
package/index.js
CHANGED
|
@@ -96,14 +96,14 @@ function getTelemetryEndpointUrl() {
|
|
|
96
96
|
}
|
|
97
97
|
function getBuildInfo() {
|
|
98
98
|
return {
|
|
99
|
-
version: true ? "4.9.
|
|
100
|
-
buildNumber: true ? "
|
|
101
|
-
commitSha: true ? "
|
|
99
|
+
version: true ? "4.9.4" : "dev",
|
|
100
|
+
buildNumber: true ? "33113403059" : "dev",
|
|
101
|
+
commitSha: true ? "db031f9bc6f6c3918774aa8e375b6938ad66bb5e" : "dev",
|
|
102
102
|
copilotKitCommit: getTemplateRef()
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
function getTemplateRef() {
|
|
106
|
-
return true ? "
|
|
106
|
+
return true ? "f6f2dc4bb62b50d2f09384619f5b9e8fe7edde02" : "main";
|
|
107
107
|
}
|
|
108
108
|
function getC15tBackendUrl() {
|
|
109
109
|
return true ? "https://calm-hazelnut-joy-copilotkit.inth.app" : "";
|
|
@@ -380838,18 +380838,15 @@ function isOnboardingGraphIndex(value) {
|
|
|
380838
380838
|
if (typeof value !== "object" || value === null)
|
|
380839
380839
|
return false;
|
|
380840
380840
|
const candidate = value;
|
|
380841
|
-
return
|
|
380842
|
-
|
|
380841
|
+
return (
|
|
380842
|
+
// Checked first: a bundle that cannot name the graph it serves is corrupt,
|
|
380843
|
+
// and nothing else about it is worth inspecting.
|
|
380844
|
+
typeof candidate.graphTree === "string" && GRAPH_TREE_PATTERN.test(candidate.graphTree) && typeof candidate.root === "string" && Array.isArray(candidate.prompts) && candidate.prompts.every(
|
|
380845
|
+
(prompt) => typeof prompt === "object" && prompt !== null && Array.isArray(prompt.edges) && prompt.edges.every((edge) => typeof edge === "string") && typeof prompt.milestone === "string" && typeof prompt.name === "string"
|
|
380846
|
+
)
|
|
380843
380847
|
);
|
|
380844
380848
|
}
|
|
380845
|
-
async function
|
|
380846
|
-
if (!PROMPT_NAME_PATTERN.test(name)) {
|
|
380847
|
-
throw new OnboardingPromptError(
|
|
380848
|
-
"ONBOARDING_PROMPT_NOT_FOUND",
|
|
380849
|
-
`Onboarding prompt "${name}" was not found. Copy an exact prompt name from the prior Markdown.`
|
|
380850
|
-
);
|
|
380851
|
-
}
|
|
380852
|
-
let index2;
|
|
380849
|
+
async function readGraphIndex(graphDirectory) {
|
|
380853
380850
|
try {
|
|
380854
380851
|
const parsed = JSON.parse(
|
|
380855
380852
|
await readFile(join23(graphDirectory, "index.json"), "utf8")
|
|
@@ -380857,7 +380854,7 @@ async function loadOnboardingPrompt(name, graphDirectory = join23(dirname9(fileU
|
|
|
380857
380854
|
if (!isOnboardingGraphIndex(parsed)) {
|
|
380858
380855
|
throw new Error("Bundled onboarding graph index has an invalid shape");
|
|
380859
380856
|
}
|
|
380860
|
-
|
|
380857
|
+
return parsed;
|
|
380861
380858
|
} catch (error98) {
|
|
380862
380859
|
throw new OnboardingPromptError(
|
|
380863
380860
|
"ONBOARDING_PROMPT_UNREADABLE",
|
|
@@ -380865,6 +380862,18 @@ async function loadOnboardingPrompt(name, graphDirectory = join23(dirname9(fileU
|
|
|
380865
380862
|
{ cause: error98 }
|
|
380866
380863
|
);
|
|
380867
380864
|
}
|
|
380865
|
+
}
|
|
380866
|
+
async function loadOnboardingGraphTree(graphDirectory = join23(dirname9(fileURLToPath2(import.meta.url)), "onboarding")) {
|
|
380867
|
+
return (await readGraphIndex(graphDirectory)).graphTree;
|
|
380868
|
+
}
|
|
380869
|
+
async function loadOnboardingPrompt(name, graphDirectory = join23(dirname9(fileURLToPath2(import.meta.url)), "onboarding")) {
|
|
380870
|
+
if (!PROMPT_NAME_PATTERN.test(name)) {
|
|
380871
|
+
throw new OnboardingPromptError(
|
|
380872
|
+
"ONBOARDING_PROMPT_NOT_FOUND",
|
|
380873
|
+
`Onboarding prompt "${name}" was not found. Copy an exact prompt name from the prior Markdown.`
|
|
380874
|
+
);
|
|
380875
|
+
}
|
|
380876
|
+
const index2 = await readGraphIndex(graphDirectory);
|
|
380868
380877
|
const indexedPrompt = index2.prompts.find((prompt) => prompt.name === name);
|
|
380869
380878
|
if (indexedPrompt === void 0) {
|
|
380870
380879
|
throw new OnboardingPromptError(
|
|
@@ -380890,11 +380899,12 @@ async function loadOnboardingPrompt(name, graphDirectory = join23(dirname9(fileU
|
|
|
380890
380899
|
);
|
|
380891
380900
|
}
|
|
380892
380901
|
}
|
|
380893
|
-
var PROMPT_NAME_PATTERN, OnboardingPromptError;
|
|
380902
|
+
var PROMPT_NAME_PATTERN, GRAPH_TREE_PATTERN, OnboardingPromptError;
|
|
380894
380903
|
var init_onboarding_graph = __esm({
|
|
380895
380904
|
"apps/cli/src/services/onboarding-graph.ts"() {
|
|
380896
380905
|
"use strict";
|
|
380897
380906
|
PROMPT_NAME_PATTERN = /^[a-z0-9][a-z0-9._-]*(?:\/[a-z0-9][a-z0-9._-]*)*$/;
|
|
380907
|
+
GRAPH_TREE_PATTERN = /^[0-9a-f]{40}$/u;
|
|
380898
380908
|
OnboardingPromptError = class extends Error {
|
|
380899
380909
|
code;
|
|
380900
380910
|
constructor(code, message, options) {
|
|
@@ -381271,6 +381281,7 @@ async function runOnboard(argv, dependencies) {
|
|
|
381271
381281
|
cliVersion: getBuildInfo().version,
|
|
381272
381282
|
randomRunId: () => randomBytes2(9).toString("base64url"),
|
|
381273
381283
|
loadPrompt: loadOnboardingPrompt,
|
|
381284
|
+
loadGraphTree: loadOnboardingGraphTree,
|
|
381274
381285
|
recordEvent: recordTelemetryEvent,
|
|
381275
381286
|
submitFeedbackEvent: submitTelemetryEvent
|
|
381276
381287
|
};
|
|
@@ -381294,6 +381305,8 @@ async function runOnboard(argv, dependencies) {
|
|
|
381294
381305
|
parsed.values.run
|
|
381295
381306
|
);
|
|
381296
381307
|
recordStarted(deps, binding2.runId, parsed.values["coding-agent"]);
|
|
381308
|
+
printRunId(deps, binding2.runId);
|
|
381309
|
+
await printGraphTree(deps);
|
|
381297
381310
|
await printPrompt(deps, binding2.runId, "authenticate/start");
|
|
381298
381311
|
return;
|
|
381299
381312
|
}
|
|
@@ -381313,7 +381326,10 @@ async function runOnboard(argv, dependencies) {
|
|
|
381313
381326
|
return;
|
|
381314
381327
|
}
|
|
381315
381328
|
if (subcommand === "complete") {
|
|
381316
|
-
const
|
|
381329
|
+
const blocked2 = parseBlocker(argv.slice(1));
|
|
381330
|
+
if (blocked2 === void 0)
|
|
381331
|
+
throw new Error(BLOCKER_USAGE);
|
|
381332
|
+
const check4 = parseSurfaceCheck(blocked2.rest);
|
|
381317
381333
|
if (check4 === void 0)
|
|
381318
381334
|
throw new Error(SURFACE_CHECK_USAGE);
|
|
381319
381335
|
recordBestEffort(deps, {
|
|
@@ -381322,11 +381338,12 @@ async function runOnboard(argv, dependencies) {
|
|
|
381322
381338
|
command: "onboard",
|
|
381323
381339
|
onboarding_run_id: binding.runId,
|
|
381324
381340
|
cli_version: deps.cliVersion,
|
|
381325
|
-
...check4.kind === "visual" ? { visual_check: check4.outcome } : { device_check: check4.outcome }
|
|
381341
|
+
...check4.kind === "visual" ? { visual_check: check4.outcome } : { device_check: check4.outcome },
|
|
381342
|
+
...blocked2.blocker === void 0 ? {} : { blocked_by: blocked2.blocker }
|
|
381326
381343
|
}
|
|
381327
381344
|
});
|
|
381328
381345
|
deps.stdout.write(
|
|
381329
|
-
|
|
381346
|
+
completionReport({ blocker: blocked2.blocker, check: check4 })
|
|
381330
381347
|
);
|
|
381331
381348
|
return;
|
|
381332
381349
|
}
|
|
@@ -381385,6 +381402,17 @@ async function runOnboard(argv, dependencies) {
|
|
|
381385
381402
|
"Usage: copilotkit onboard <start|read|classify|complete|feedback|friction>"
|
|
381386
381403
|
);
|
|
381387
381404
|
}
|
|
381405
|
+
function parseBlocker(rest) {
|
|
381406
|
+
const flagIndex = rest.indexOf("--blocked-by");
|
|
381407
|
+
if (flagIndex === -1)
|
|
381408
|
+
return { rest };
|
|
381409
|
+
if (flagIndex !== rest.length - 2)
|
|
381410
|
+
return void 0;
|
|
381411
|
+
const cause = BLOCKER_CAUSES.find((known) => known === rest[flagIndex + 1]);
|
|
381412
|
+
if (cause === void 0)
|
|
381413
|
+
return void 0;
|
|
381414
|
+
return { blocker: cause, rest: rest.slice(0, flagIndex) };
|
|
381415
|
+
}
|
|
381388
381416
|
function parseSurfaceCheck(rest) {
|
|
381389
381417
|
if (rest.length !== 2)
|
|
381390
381418
|
return void 0;
|
|
@@ -381445,6 +381473,37 @@ function blockedWithoutSurfaceProof(check4) {
|
|
|
381445
381473
|
""
|
|
381446
381474
|
].join("\n");
|
|
381447
381475
|
}
|
|
381476
|
+
function blockedAfterProof(blocker) {
|
|
381477
|
+
const report = BLOCKER_REPORTS[blocker];
|
|
381478
|
+
return [
|
|
381479
|
+
"",
|
|
381480
|
+
"! Onboarding is NOT complete.",
|
|
381481
|
+
" The round trip was proved, and this run was then blocked by something else:",
|
|
381482
|
+
` ${report.cause}`,
|
|
381483
|
+
" Still unverified:",
|
|
381484
|
+
...report.uncovered.map((line) => ` - ${line}`),
|
|
381485
|
+
"",
|
|
381486
|
+
" This is a supported path that this run could not finish.",
|
|
381487
|
+
" It is NOT an unsupported path: do not read unsupported/no-validated-path,",
|
|
381488
|
+
" and do not tell the developer that their framework or frontend is",
|
|
381489
|
+
" unsupported. The journey proved; one thing after it did not.",
|
|
381490
|
+
"",
|
|
381491
|
+
" Report this run as blocked, and name the unverified lines above as the",
|
|
381492
|
+
" evidence it is missing. Hand over the working application anyway: the URL,",
|
|
381493
|
+
" the command that starts it again, and the process IDs.",
|
|
381494
|
+
` To close it, ${report.close}.`,
|
|
381495
|
+
""
|
|
381496
|
+
].join("\n");
|
|
381497
|
+
}
|
|
381498
|
+
function completionReport(input) {
|
|
381499
|
+
if (input.check.outcome !== "performed") {
|
|
381500
|
+
const surface = blockedWithoutSurfaceProof(input.check);
|
|
381501
|
+
if (input.blocker === void 0)
|
|
381502
|
+
return surface;
|
|
381503
|
+
return `${surface}${blockedAfterProof(input.blocker)}`;
|
|
381504
|
+
}
|
|
381505
|
+
return input.blocker === void 0 ? "CopilotKit onboarding marked complete.\n" : blockedAfterProof(input.blocker);
|
|
381506
|
+
}
|
|
381448
381507
|
async function reportFeedback(dependencies, runId) {
|
|
381449
381508
|
const input = await readFeedbackInput(dependencies.stdin);
|
|
381450
381509
|
if (!input.ok)
|
|
@@ -381555,6 +381614,16 @@ report: ${report.text}
|
|
|
381555
381614
|
`
|
|
381556
381615
|
);
|
|
381557
381616
|
}
|
|
381617
|
+
function printRunId(dependencies, runId) {
|
|
381618
|
+
dependencies.stdout.write(`onboarding_run_id: ${runId}
|
|
381619
|
+
`);
|
|
381620
|
+
}
|
|
381621
|
+
async function printGraphTree(dependencies) {
|
|
381622
|
+
dependencies.stdout.write(
|
|
381623
|
+
`onboarding_graph_tree: ${await dependencies.loadGraphTree()}
|
|
381624
|
+
`
|
|
381625
|
+
);
|
|
381626
|
+
}
|
|
381558
381627
|
function recordStarted(dependencies, runId, codingAgent) {
|
|
381559
381628
|
recordBestEffort(dependencies, {
|
|
381560
381629
|
event: "cli.onboarding.started",
|
|
@@ -381595,7 +381664,7 @@ function recordBestEffort(dependencies, event) {
|
|
|
381595
381664
|
} catch {
|
|
381596
381665
|
}
|
|
381597
381666
|
}
|
|
381598
|
-
var VISUAL_CHECK_OUTCOMES, DEVICE_CHECK_OUTCOMES, SURFACE_CHECK_USAGE;
|
|
381667
|
+
var VISUAL_CHECK_OUTCOMES, DEVICE_CHECK_OUTCOMES, BLOCKER_CAUSES, BLOCKER_USAGE, SURFACE_CHECK_USAGE, BLOCKER_REPORTS;
|
|
381599
381668
|
var init_onboard = __esm({
|
|
381600
381669
|
async "apps/cli/src/commands/onboard.ts"() {
|
|
381601
381670
|
"use strict";
|
|
@@ -381617,7 +381686,52 @@ var init_onboard = __esm({
|
|
|
381617
381686
|
"skipped-no-device",
|
|
381618
381687
|
"failed"
|
|
381619
381688
|
];
|
|
381689
|
+
BLOCKER_CAUSES = [
|
|
381690
|
+
"hosted-dashboard",
|
|
381691
|
+
"inspector",
|
|
381692
|
+
"plan-excluded-capability",
|
|
381693
|
+
"other"
|
|
381694
|
+
];
|
|
381695
|
+
BLOCKER_USAGE = `Usage: copilotkit onboard complete <surface-check> --blocked-by <${BLOCKER_CAUSES.join("|")}>
|
|
381696
|
+
Pass it alongside --visual-check or --device-check, never instead of one: which
|
|
381697
|
+
surface this run proved and what blocked it afterwards are separate facts.
|
|
381698
|
+
Use \`other\` rather than leaving the flag off. A run with no way to say it was
|
|
381699
|
+
blocked reads the unsupported terminal instead, and reports a path that works
|
|
381700
|
+
as one this release does not carry.`;
|
|
381620
381701
|
SURFACE_CHECK_USAGE = "Usage: copilotkit onboard complete --visual-check <performed|skipped-no-browser-tool|failed>\n or: copilotkit onboard complete --device-check <performed|skipped-no-device|failed>\nPass exactly one. A web journey is proven in a browser and a mobile one on a device;\nwhich flag you pass is how this run states which surface it proved.";
|
|
381702
|
+
BLOCKER_REPORTS = {
|
|
381703
|
+
"hosted-dashboard": {
|
|
381704
|
+
cause: "the managed Intelligence dashboard did not load, or refused a sign-in.",
|
|
381705
|
+
close: "sign in at https://intelligence.copilotkit.ai, confirm this project is\n listed, then run this command again without `--blocked-by`",
|
|
381706
|
+
uncovered: [
|
|
381707
|
+
"managing this installation from the dashboard, which is where its keys and projects live",
|
|
381708
|
+
"the thread view, which is how a managed run is read back after it ends"
|
|
381709
|
+
]
|
|
381710
|
+
},
|
|
381711
|
+
inspector: {
|
|
381712
|
+
cause: "the debugging surface for this frontend did not open.",
|
|
381713
|
+
close: "open the debugging surface named in the handoff, confirm it lists this\n run, then run this command again without `--blocked-by`",
|
|
381714
|
+
uncovered: [
|
|
381715
|
+
"the AG-UI event stream this frontend actually received",
|
|
381716
|
+
"a wiring fault that shows up only as an event that never arrives"
|
|
381717
|
+
]
|
|
381718
|
+
},
|
|
381719
|
+
"plan-excluded-capability": {
|
|
381720
|
+
cause: "the proof asked for a capability the approved plan had already excluded\n for this framework.",
|
|
381721
|
+
close: "settle the exclusion against the framework's own documentation before the\n next run, and give the developer the exclusion as a named limitation",
|
|
381722
|
+
uncovered: [
|
|
381723
|
+
"that capability on this framework, which the plan excluded rather than disproved",
|
|
381724
|
+
"whether the exclusion in the plan is correct, which nothing in this run tested"
|
|
381725
|
+
]
|
|
381726
|
+
},
|
|
381727
|
+
other: {
|
|
381728
|
+
cause: "a blocker outside the set this command can name.",
|
|
381729
|
+
close: "name the blocker in the summary in the developer's own terms, and say what\n it leaves unverified",
|
|
381730
|
+
uncovered: [
|
|
381731
|
+
"whatever the blocker covers, which this command cannot name for you"
|
|
381732
|
+
]
|
|
381733
|
+
}
|
|
381734
|
+
};
|
|
381621
381735
|
}
|
|
381622
381736
|
});
|
|
381623
381737
|
|
package/onboarding/index.json
CHANGED
|
@@ -14,16 +14,21 @@ question from the documentation this graph gives you. Another checkout on this m
|
|
|
14
14
|
not a source. The developer running this has none, so an answer taken from one is an
|
|
15
15
|
answer they cannot get, and it hides the documentation gap that blocks them.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Send this exact message once, as your first message in this onboarding run, before
|
|
18
|
+
anything else:
|
|
18
19
|
|
|
19
20
|
Welcome to CopilotKit. I will check sign-in, inspect your project, recommend a setup, and
|
|
20
21
|
show you a plan before I change files. After you approve the plan, I will build the
|
|
21
22
|
integration, prove the full round trip, and leave the app running with its URLs.
|
|
22
23
|
|
|
24
|
+
That message belongs to the run, not to this prompt. If you already sent it in this run, do
|
|
25
|
+
not send it again, including on a second read of this prompt. It has no value after the
|
|
26
|
+
first send, and a developer who reads it repeatedly learns to skim the region it sits in.
|
|
27
|
+
|
|
23
28
|
Do not ask for separate feedback consent. The feedback commands enforce the developer's
|
|
24
29
|
CLI telemetry setting when a later step tries to send a report.
|
|
25
30
|
|
|
26
|
-
Run `npx --yes copilotkit@4.9.
|
|
31
|
+
Run `npx --yes copilotkit@4.9.4 login --json` before any project work. This command
|
|
27
32
|
checks the current session. It starts sign-in only as needed. Treat this as a long-lived
|
|
28
33
|
streaming process. Do not wait for the command to exit before you read its standard output.
|
|
29
34
|
|
|
@@ -41,30 +46,63 @@ Do not use `whoami` for this check. It has no JSON output and some failures exit
|
|
|
41
46
|
zero. Do not put account tokens or credentials in the conversation.
|
|
42
47
|
|
|
43
48
|
Before you ask the developer any setup question, finish every read-only investigation and
|
|
44
|
-
preflight check in this section.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
preflight check in this section.
|
|
50
|
+
|
|
51
|
+
Prove whether your coding-agent environment has browser or device control. Do not assume it
|
|
52
|
+
either way, and do not report what you expect to be true: a run that guesses here records a
|
|
53
|
+
capability the rest of the graph then trusts. Use a browser or device tool already
|
|
54
|
+
configured for the coding agent you are running as, the same way a later step uses the
|
|
55
|
+
CopilotKit documentation server. With a browser tool, open one inert page such as
|
|
56
|
+
`about:blank` and read its title. With a device tool and no browser, list the booted devices
|
|
57
|
+
in one command: `adb devices -l`. Record the outcome of that attempt: `available` when the
|
|
58
|
+
tool answered, `unavailable` when there was none to call or the page did not open. Use
|
|
59
|
+
the control that matches the selected surface later.
|
|
60
|
+
|
|
61
|
+
Where the browser probe answered, register nothing. The harness came equipped and the run
|
|
62
|
+
owes it no setup.
|
|
63
|
+
|
|
64
|
+
Where no browser tool answered, register one for the coding agent you are running as, then
|
|
65
|
+
run the same probe again and record what the second attempt did. Register this server:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
npx --yes @playwright/mcp@latest --browser chrome --isolated --output-dir <project>/.copilotkit/proof/browser
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Replace `<project>` with the absolute path of the target project directory. The server is
|
|
72
|
+
registered against the coding agent rather than against a directory, so a relative path here
|
|
73
|
+
resolves wherever that server happens to start.
|
|
74
|
+
|
|
75
|
+
`--browser chrome` drives the Google Chrome the developer already has, so this downloads no
|
|
76
|
+
browser. `--isolated` keeps the profile in memory, so it never touches their own Chrome
|
|
77
|
+
profile. `--output-dir` is what keeps the snapshots and screenshots out of the developer's
|
|
78
|
+
repository root: without it this server writes them to `.playwright-mcp/` beside their code,
|
|
79
|
+
which a project that never asked for a browser has no reason to carry, and which the graph's
|
|
80
|
+
own evidence rule already has a place for. Register it the way your own harness registers a
|
|
81
|
+
server, which is the mechanism a later step uses for the CopilotKit documentation server.
|
|
82
|
+
|
|
83
|
+
Tell the developer in one line what you registered, that it drives their installed Chrome,
|
|
84
|
+
and that it lives in this coding agent's configuration rather than in their repository. Do
|
|
85
|
+
not ask them to approve it, and do not ask a second question about it.
|
|
86
|
+
|
|
87
|
+
Do not add a browser or device driver to the project. A driver added there is a
|
|
88
|
+
devDependency and a browser download in the diff of a repository that never asked for one,
|
|
89
|
+
which is a different thing from a server registered against the coding agent.
|
|
90
|
+
|
|
91
|
+
Where the second probe still does not answer -- no Chrome to drive, no network, or a
|
|
92
|
+
harness that cannot register a server -- record `unavailable` and carry it. Do not keep
|
|
93
|
+
trying, and do not ask the developer about this tool limit.
|
|
94
|
+
|
|
95
|
+
Registering a server does not boot a device. Where the device probe found none, that is the
|
|
96
|
+
whole finding, and a browser is not a substitute for a device.
|
|
48
97
|
|
|
49
98
|
Spawn one research subagent. Give it the full text of the research brief at the end of this
|
|
50
|
-
prompt and tell it to follow that brief and return only its findings.
|
|
51
|
-
|
|
52
|
-
- Find the target app or runtime directory that owns `.env` and CopilotKit setup.
|
|
53
|
-
- Check whether `.copilotkit/project.json` has `projectId`, `projectSlug`, and `clerkOrgId`.
|
|
54
|
-
- Check whether `.env` has a non-empty `INTELLIGENCE_API_KEY` entry.
|
|
55
|
-
- Record the `.env` file modification time without returning it.
|
|
56
|
-
- Report whether the target project directory contains any entries.
|
|
57
|
-
- Report whether an agent, frontend, and CopilotKit integration are present.
|
|
58
|
-
- Report whether the runtime constructor uses a `runner` option, an `intelligence`
|
|
59
|
-
option, or neither can be proved from project files.
|
|
60
|
-
|
|
61
|
-
Do not print either file or any secret value. Return only paths, presence checks, and missing
|
|
62
|
-
field names. Wait for the subagent to finish.
|
|
99
|
+
prompt and tell it to follow that brief and return only its findings. Wait for the
|
|
100
|
+
subagent to finish.
|
|
63
101
|
|
|
64
|
-
If the
|
|
65
|
-
about the user outcome. This asks what the developer wants to build
|
|
66
|
-
framework. Give two or three short examples and offer a minimal
|
|
67
|
-
and give it to each later subagent.
|
|
102
|
+
If neither the developer nor the repository findings prove what the project is for, ask
|
|
103
|
+
one guided question about the user outcome. This asks what the developer wants to build
|
|
104
|
+
before you select a framework. Give two or three short examples and offer a minimal
|
|
105
|
+
starter. Record the answer and give it to each later subagent.
|
|
68
106
|
|
|
69
107
|
If a repository file exists, each finding must cite it. For an empty project, the subagent
|
|
70
108
|
must cite its directory check and report absent parts.
|
|
@@ -76,13 +114,13 @@ that the repository answers.
|
|
|
76
114
|
Do not infer a working OSS path from packages, imports, project files, or keys. If an
|
|
77
115
|
agent, frontend, and CopilotKit integration are present, prove the live starting state
|
|
78
116
|
before any project file changes. Run
|
|
79
|
-
`npx --yes copilotkit@4.9.
|
|
117
|
+
`npx --yes copilotkit@4.9.4 onboard read proof/oss-baseline`.
|
|
80
118
|
|
|
81
119
|
For every other inspected state, run
|
|
82
|
-
`npx --yes copilotkit@4.9.
|
|
120
|
+
`npx --yes copilotkit@4.9.4 onboard read credentials/plan`.
|
|
83
121
|
|
|
84
122
|
If authentication or inspection stops onboarding, run
|
|
85
|
-
`npx --yes copilotkit@4.9.
|
|
123
|
+
`npx --yes copilotkit@4.9.4 onboard read unsupported/no-validated-path`.
|
|
86
124
|
|
|
87
125
|
## Research subagent brief
|
|
88
126
|
|
|
@@ -95,14 +133,20 @@ Everything below the rule is the subagent's prompt. Give it verbatim.
|
|
|
95
133
|
Inspect the repository without changing it. Find evidence for:
|
|
96
134
|
|
|
97
135
|
- what the project is for, in the project's own words
|
|
98
|
-
-
|
|
99
|
-
- any
|
|
100
|
-
-
|
|
136
|
+
- the target app or runtime directory that owns `.env` and the CopilotKit setup
|
|
137
|
+
- whether the target project directory contains any entries
|
|
138
|
+
- any existing agent framework and frontend
|
|
139
|
+
- current CopilotKit integration and configuration, including whether
|
|
140
|
+
`.copilotkit/project.json` has `projectId`, `projectSlug`, and `clerkOrgId`
|
|
101
141
|
- authentication boundaries
|
|
102
|
-
- names of required credential variables
|
|
142
|
+
- names of required credential variables and whether `.env` has a non-empty
|
|
143
|
+
`INTELLIGENCE_API_KEY`
|
|
144
|
+
- retain the `.env` modification time for a later comparison without returning it
|
|
103
145
|
- package manager and lockfile
|
|
104
146
|
- required toolchains and their installed versions
|
|
105
147
|
- declared ports and whether each port is available
|
|
148
|
+
- whether the runtime constructor uses a `runner` option, an `intelligence` option, or
|
|
149
|
+
neither can be proved from project files
|
|
106
150
|
- CopilotKit package versions and package compatibility risks
|
|
107
151
|
|
|
108
152
|
For the CopilotKit versions, report the exact installed version of every `@copilotkit/*`
|
|
@@ -121,6 +165,7 @@ what you run next. Keep this preflight read-only. Do not install packages, stop
|
|
|
121
165
|
or change a port. Check only the toolchains and ports that repository files require.
|
|
122
166
|
|
|
123
167
|
Return the file paths and a short finding for each item. State each absent or unproved item.
|
|
124
|
-
Do not read, print, or return secret values.
|
|
125
|
-
|
|
126
|
-
|
|
168
|
+
Do not read, print, or return secret values. For `.env` and `.copilotkit/project.json`
|
|
169
|
+
checks, return only paths, presence checks, and missing field names. Do not read a file
|
|
170
|
+
outside the project directory. Do not run or return another onboarding command. Stop after
|
|
171
|
+
returning the findings to the main coding agent.
|
|
@@ -24,7 +24,7 @@ starts. Choose one starting state: empty, agent-only, frontend-only, both, both-
|
|
|
24
24
|
Run this command with the exact selected slugs:
|
|
25
25
|
|
|
26
26
|
```text
|
|
27
|
-
npx --yes copilotkit@4.9.
|
|
27
|
+
npx --yes copilotkit@4.9.4 onboard classify --starting-state <starting-state> --agent-framework <agent-framework> --frontend <frontend>
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
Do not continue if a value is refused. Fix the value from the choices that the earlier
|
|
@@ -35,12 +35,10 @@ prompts gave, then run the command again.
|
|
|
35
35
|
Use the target app or runtime directory from the repository findings. If a nested app owns
|
|
36
36
|
the runtime `.env` file, do not default to the repository root.
|
|
37
37
|
|
|
38
|
-
If valid project fields and a non-empty `INTELLIGENCE_API_KEY` already exist,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
Reused project credentials remain unverified until an authenticated Intelligence call
|
|
43
|
-
succeeds. Record that state in the plan.
|
|
38
|
+
If valid project fields and a non-empty `INTELLIGENCE_API_KEY` already exist, use this
|
|
39
|
+
rule: Reuse that project without another question. Do not mint another key. The round-trip
|
|
40
|
+
proof later runs the authenticated Intelligence checks. Record the reused project
|
|
41
|
+
credentials as unverified in the plan until those checks pass.
|
|
44
42
|
|
|
45
43
|
If the developer needs a project or another project, do the selection yourself from the
|
|
46
44
|
target directory. Do not send the developer to another terminal.
|
|
@@ -48,7 +46,7 @@ target directory. Do not send the developer to another terminal.
|
|
|
48
46
|
Read the choices first:
|
|
49
47
|
|
|
50
48
|
```text
|
|
51
|
-
npx --yes copilotkit@4.9.
|
|
49
|
+
npx --yes copilotkit@4.9.4 project list --json
|
|
52
50
|
```
|
|
53
51
|
|
|
54
52
|
With `--json` the payload is the only thing on standard output, so it is safe to parse.
|
|
@@ -59,7 +57,7 @@ developer asks.
|
|
|
59
57
|
If the developer searches, run:
|
|
60
58
|
|
|
61
59
|
```text
|
|
62
|
-
npx --yes copilotkit@4.9.
|
|
60
|
+
npx --yes copilotkit@4.9.4 project list --search <query> --json
|
|
63
61
|
```
|
|
64
62
|
|
|
65
63
|
If the developer asks for all projects, show the result of the first list command. Ask
|
|
@@ -69,7 +67,7 @@ frontend, framework, model, credential, or plan-approval question.
|
|
|
69
67
|
Then record their answer, from the target directory:
|
|
70
68
|
|
|
71
69
|
```text
|
|
72
|
-
npx --yes copilotkit@4.9.
|
|
70
|
+
npx --yes copilotkit@4.9.4 project select --project <slug-or-id> --json
|
|
73
71
|
```
|
|
74
72
|
|
|
75
73
|
Use `--create <name> --json` instead when they want a new project. The two flags cannot be
|
|
@@ -123,15 +121,19 @@ it. The credential reaches the platform only when the runtime is constructed wit
|
|
|
123
121
|
Intelligence client, and a runtime built without one compiles, serves, answers in a
|
|
124
122
|
browser, and never touches the platform.
|
|
125
123
|
|
|
126
|
-
Add
|
|
124
|
+
Add these pages to the selected documentation URLs for the planning, implementation, and
|
|
125
|
+
proof subagents:
|
|
127
126
|
|
|
128
127
|
- https://docs.copilotkit.ai/premium/connect-your-runtime.md
|
|
128
|
+
- https://docs.copilotkit.ai/backend/runtime-endpoints.md
|
|
129
|
+
- https://docs.copilotkit.ai/premium/managed-intelligence-platform.md
|
|
129
130
|
|
|
130
|
-
Fetch
|
|
131
|
+
Fetch them together with the pages already selected rather than on their own.
|
|
131
132
|
|
|
132
133
|
Spawn one planning subagent. Give it the full text of the planning brief at the end of this
|
|
133
134
|
prompt, the repository findings, selected framework, frontend, model, credential variable
|
|
134
|
-
names,
|
|
135
|
+
names, selected documentation URLs, and documentation policy. Wait for the subagent to
|
|
136
|
+
finish.
|
|
135
137
|
|
|
136
138
|
Make sure that the plan preserves each part that already exists. The plan must name the
|
|
137
139
|
credential variables, the Intelligence runtime wiring, the application the project asks
|
|
@@ -146,10 +148,10 @@ approve rather than in the implementation that follows. Do not upgrade a depende
|
|
|
146
148
|
developer did not approve.
|
|
147
149
|
|
|
148
150
|
If the developer approves the plan, run
|
|
149
|
-
`npx --yes copilotkit@4.9.
|
|
151
|
+
`npx --yes copilotkit@4.9.4 onboard read implementation/build-and-validate`.
|
|
150
152
|
|
|
151
153
|
If no exact supported path or documentation URL exists, run
|
|
152
|
-
`npx --yes copilotkit@4.9.
|
|
154
|
+
`npx --yes copilotkit@4.9.4 onboard read unsupported/no-validated-path`.
|
|
153
155
|
|
|
154
156
|
## Planning subagent brief
|
|
155
157
|
|
|
@@ -160,20 +162,13 @@ Everything below the rule is the subagent's prompt. Give it verbatim.
|
|
|
160
162
|
# Create the onboarding plan
|
|
161
163
|
|
|
162
164
|
Use the selected framework, frontend, model, repository findings, and documentation URLs
|
|
163
|
-
from the main coding agent.
|
|
164
|
-
another. Do not use remembered CopilotKit instructions.
|
|
165
|
-
|
|
166
|
-
A fetch tool that refuses a URL, or fails to reach it, reports a limit of the tool and
|
|
167
|
-
not a fact about the page. Retrieve the same URL a second way before you judge it. Run
|
|
168
|
-
`curl -fsSL <url>`, or read the same page without the `.md` suffix. Report a
|
|
169
|
-
documentation gap only after a second method also fails.
|
|
165
|
+
from the main coding agent. Follow the documentation policy it gives you.
|
|
170
166
|
|
|
171
167
|
Name the application the project asks for, and plan that application. Each documentation
|
|
172
168
|
page teaches through one worked example, and that example carries a domain of its own.
|
|
173
|
-
The domain belongs to the page.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
domain of an example.
|
|
169
|
+
The domain belongs to the page. Use the purpose from the repository findings, or the
|
|
170
|
+
developer outcome if the repository purpose was unproved. Do not ask for it again. Where
|
|
171
|
+
the documentation example differs from that purpose, the project wins.
|
|
177
172
|
|
|
178
173
|
Read only inside the project directory. Answer an API question from the documentation
|
|
179
174
|
URLs you were given, not from another checkout on this machine.
|