copilotkit 4.28.0 → 4.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +6 -3
  2. package/cli-build-info.json +5 -5
  3. package/index.js +555 -196
  4. package/onboarding/index.json +2 -2
  5. package/onboarding/prompts/authenticate/start.md +32 -20
  6. package/onboarding/prompts/conversion/plan.md +3 -3
  7. package/onboarding/prompts/credentials/finalize-plan.md +15 -15
  8. package/onboarding/prompts/credentials/plan.md +24 -24
  9. package/onboarding/prompts/credentials/settle-credentials.md +7 -7
  10. package/onboarding/prompts/credentials/write-plan.md +34 -26
  11. package/onboarding/prompts/deployment/choose-local.md +9 -9
  12. package/onboarding/prompts/deployment/local-evaluation.md +12 -12
  13. package/onboarding/prompts/fallback/best-effort.md +6 -6
  14. package/onboarding/prompts/feature/a2ui/implement.md +4 -4
  15. package/onboarding/prompts/feature/a2ui/plan.md +3 -3
  16. package/onboarding/prompts/feature/a2ui/proof.md +5 -5
  17. package/onboarding/prompts/feature/a2ui/start.md +17 -8
  18. package/onboarding/prompts/feature/channels/implement.md +7 -7
  19. package/onboarding/prompts/feature/channels/plan.md +5 -5
  20. package/onboarding/prompts/feature/channels/proof.md +5 -5
  21. package/onboarding/prompts/feature/channels/start.md +18 -9
  22. package/onboarding/prompts/feature/chat-suggestions/implement.md +4 -4
  23. package/onboarding/prompts/feature/chat-suggestions/plan.md +3 -3
  24. package/onboarding/prompts/feature/chat-suggestions/proof.md +5 -5
  25. package/onboarding/prompts/feature/chat-suggestions/start.md +17 -8
  26. package/onboarding/prompts/feature/complete.md +2 -2
  27. package/onboarding/prompts/feature/learning/implement.md +12 -12
  28. package/onboarding/prompts/feature/learning/plan.md +4 -4
  29. package/onboarding/prompts/feature/learning/proof.md +13 -13
  30. package/onboarding/prompts/feature/learning/start.md +17 -8
  31. package/onboarding/prompts/feature/open-generative-ui/implement.md +4 -4
  32. package/onboarding/prompts/feature/open-generative-ui/plan.md +3 -3
  33. package/onboarding/prompts/feature/open-generative-ui/proof.md +5 -5
  34. package/onboarding/prompts/feature/open-generative-ui/start.md +17 -8
  35. package/onboarding/prompts/feature/realtime-sync/implement.md +5 -5
  36. package/onboarding/prompts/feature/realtime-sync/plan.md +3 -3
  37. package/onboarding/prompts/feature/realtime-sync/proof.md +5 -5
  38. package/onboarding/prompts/feature/realtime-sync/start.md +16 -7
  39. package/onboarding/prompts/feature/rich-threads/implement.md +6 -6
  40. package/onboarding/prompts/feature/rich-threads/plan.md +3 -3
  41. package/onboarding/prompts/feature/rich-threads/proof.md +5 -5
  42. package/onboarding/prompts/feature/rich-threads/start.md +16 -7
  43. package/onboarding/prompts/feature/stop.md +4 -4
  44. package/onboarding/prompts/feature/voice/implement.md +4 -4
  45. package/onboarding/prompts/feature/voice/plan.md +4 -4
  46. package/onboarding/prompts/feature/voice/proof.md +5 -5
  47. package/onboarding/prompts/feature/voice/start.md +17 -8
  48. package/onboarding/prompts/framework/ag2.md +3 -3
  49. package/onboarding/prompts/framework/agno.md +3 -3
  50. package/onboarding/prompts/framework/built-in.md +3 -3
  51. package/onboarding/prompts/framework/claude-sdk-python.md +3 -3
  52. package/onboarding/prompts/framework/claude-sdk-typescript.md +3 -3
  53. package/onboarding/prompts/framework/crewai-flows.md +5 -5
  54. package/onboarding/prompts/framework/custom-ag-ui.md +4 -4
  55. package/onboarding/prompts/framework/deep-agents.md +3 -3
  56. package/onboarding/prompts/framework/google-adk.md +3 -3
  57. package/onboarding/prompts/framework/langgraph-fastapi.md +3 -3
  58. package/onboarding/prompts/framework/langgraph-python.md +3 -3
  59. package/onboarding/prompts/framework/langgraph-typescript.md +3 -3
  60. package/onboarding/prompts/framework/llamaindex.md +3 -3
  61. package/onboarding/prompts/framework/mastra.md +3 -3
  62. package/onboarding/prompts/framework/ms-agent-dotnet.md +5 -5
  63. package/onboarding/prompts/framework/ms-agent-harness-dotnet.md +5 -5
  64. package/onboarding/prompts/framework/ms-agent-python.md +3 -3
  65. package/onboarding/prompts/framework/pydantic-ai.md +3 -3
  66. package/onboarding/prompts/framework/strands-python.md +3 -3
  67. package/onboarding/prompts/framework/strands-typescript.md +3 -3
  68. package/onboarding/prompts/frontend/angular.md +4 -4
  69. package/onboarding/prompts/frontend/nextjs.md +4 -4
  70. package/onboarding/prompts/frontend/plan.md +10 -10
  71. package/onboarding/prompts/frontend/react-native.md +3 -3
  72. package/onboarding/prompts/frontend/react-spa.md +3 -3
  73. package/onboarding/prompts/frontend/vue.md +3 -3
  74. package/onboarding/prompts/implementation/build-and-validate.md +26 -10
  75. package/onboarding/prompts/proof/complete.md +3 -3
  76. package/onboarding/prompts/proof/oss-baseline.md +21 -5
  77. package/onboarding/prompts/proof/round-trip.md +33 -11
  78. package/onboarding/prompts/research/gather.md +58 -41
  79. package/onboarding/prompts/research/merge.md +3 -3
  80. package/onboarding/prompts/research/preflight.md +2 -2
  81. package/onboarding/prompts/research/route.md +5 -5
  82. package/onboarding/prompts/setup/questions.md +6 -6
  83. package/onboarding/prompts/starter/clone.md +28 -28
  84. package/onboarding/prompts/stopped/run-failed.md +3 -3
  85. package/onboarding/prompts/subagent/create-plan.md +27 -2
  86. package/onboarding/prompts/subagent/implement-and-validate.md +31 -3
  87. package/onboarding/prompts/subagent/inspect-repository.md +17 -4
  88. package/onboarding/prompts/subagent/prove-oss-baseline.md +24 -1
  89. package/onboarding/prompts/subagent/prove-round-trip.md +29 -6
  90. package/onboarding/prompts/unsupported/no-validated-path.md +3 -3
  91. package/package.json +1 -1
package/index.js CHANGED
@@ -45404,6 +45404,7 @@ var init_telemetry_catalog = __esm({
45404
45404
  "Left at a question \xB7 Setup",
45405
45405
  "Left at a question \xB7 Model key",
45406
45406
  "Left at a question \xB7 Plan approval",
45407
+ "Left at a question \xB7 Sign-in",
45407
45408
  "Left at a question \xB7 Other"
45408
45409
  ];
45409
45410
  ONBOARDING_PROVEN_NOT_CLOSED = "Proof passed, not closed";
@@ -46314,7 +46315,14 @@ function canonicalCodingAgent(slug) {
46314
46315
  }
46315
46316
  return "other";
46316
46317
  }
46317
- var CODING_AGENTS, CODING_AGENT_ALIASES, LISTED_AGENTS, CODING_AGENT_VERSION_SUFFIX;
46318
+ function codingAgentName(slug) {
46319
+ const normalized = slug?.trim().toLowerCase() ?? "";
46320
+ if (normalized === "")
46321
+ return void 0;
46322
+ const agent = canonicalCodingAgent(normalized);
46323
+ return agent === "other" ? void 0 : CODING_AGENT_NAMES[agent];
46324
+ }
46325
+ var CODING_AGENTS, CODING_AGENT_NAMES, CODING_AGENT_ALIASES, LISTED_AGENTS, CODING_AGENT_VERSION_SUFFIX;
46318
46326
  var init_coding_agents = __esm({
46319
46327
  "libs/ops-contracts/src/coding-agents.ts"() {
46320
46328
  "use strict";
@@ -46356,6 +46364,43 @@ var init_coding_agents = __esm({
46356
46364
  "muse",
46357
46365
  "openclaw"
46358
46366
  ];
46367
+ CODING_AGENT_NAMES = {
46368
+ "claude-code": "Claude Code",
46369
+ "claude-cowork": "Claude Cowork",
46370
+ codex: "Codex",
46371
+ cursor: "Cursor",
46372
+ opencode: "OpenCode",
46373
+ "github-copilot": "GitHub Copilot",
46374
+ "gemini-cli": "Gemini CLI",
46375
+ antigravity: "Antigravity",
46376
+ augment: "Augment",
46377
+ devin: "Devin",
46378
+ replit: "Replit",
46379
+ v0: "v0",
46380
+ windsurf: "Windsurf",
46381
+ cline: "Cline",
46382
+ "roo-code": "Roo Code",
46383
+ "kilo-code": "Kilo Code",
46384
+ kiro: "Kiro",
46385
+ aider: "Aider",
46386
+ amp: "Amp",
46387
+ codebuff: "Codebuff",
46388
+ goose: "Goose",
46389
+ crush: "Crush",
46390
+ "factory-droid": "Factory Droid",
46391
+ "qwen-code": "Qwen Code",
46392
+ "kimi-cli": "Kimi CLI",
46393
+ trae: "Trae",
46394
+ warp: "Warp",
46395
+ zed: "Zed",
46396
+ junie: "Junie",
46397
+ grok: "Grok",
46398
+ mimo: "MiMo",
46399
+ doubao: "Doubao",
46400
+ hermes: "Hermes",
46401
+ muse: "Muse",
46402
+ openclaw: "OpenClaw"
46403
+ };
46359
46404
  CODING_AGENT_ALIASES = {
46360
46405
  claude: "claude-code",
46361
46406
  claudecode: "claude-code",
@@ -46475,6 +46520,7 @@ __export(src_exports, {
46475
46520
  CLI_VERIFY_SOURCES: () => CLI_VERIFY_SOURCES,
46476
46521
  CODING_AGENTS: () => CODING_AGENTS,
46477
46522
  CODING_AGENT_ALIASES: () => CODING_AGENT_ALIASES,
46523
+ CODING_AGENT_NAMES: () => CODING_AGENT_NAMES,
46478
46524
  CODING_AGENT_VERSION_SUFFIX: () => CODING_AGENT_VERSION_SUFFIX,
46479
46525
  COHORT_RETENTION_THRESHOLDS: () => COHORT_RETENTION_THRESHOLDS,
46480
46526
  CliLocalEvaluationLicenseRequestSchema: () => CliLocalEvaluationLicenseRequestSchema,
@@ -46566,6 +46612,7 @@ __export(src_exports, {
46566
46612
  cliTelemetryIdentityRequestSchema: () => cliTelemetryIdentityRequestSchema,
46567
46613
  cliTelemetryIdentityResponseSchema: () => cliTelemetryIdentityResponseSchema,
46568
46614
  cliTelemetryProjectIdSchema: () => cliTelemetryProjectIdSchema,
46615
+ codingAgentName: () => codingAgentName,
46569
46616
  createAdminEnterpriseSubscriptionRequestSchema: () => createAdminEnterpriseSubscriptionRequestSchema,
46570
46617
  createCheckoutSessionRequestSchema: () => createCheckoutSessionRequestSchema,
46571
46618
  createCheckoutSessionResponseSchema: () => createCheckoutSessionResponseSchema,
@@ -51236,6 +51283,7 @@ __export(onboarding_state_exports, {
51236
51283
  boundCodingAgent: () => boundCodingAgent,
51237
51284
  clearCommandFailure: () => clearCommandFailure,
51238
51285
  clearProofFailure: () => clearProofFailure,
51286
+ closeOpenQuestion: () => closeOpenQuestion,
51239
51287
  codingAgentMismatchProperty: () => codingAgentMismatchProperty,
51240
51288
  codingAgentProperty: () => codingAgentProperty,
51241
51289
  isOnboardingRunId: () => isOnboardingRunId,
@@ -51257,6 +51305,7 @@ __export(onboarding_state_exports, {
51257
51305
  readOnboardingRunId: () => readOnboardingRunId,
51258
51306
  readOnboardingRunStartedAt: () => readOnboardingRunStartedAt,
51259
51307
  readOnboardingStartIntent: () => readOnboardingStartIntent,
51308
+ readOpenQuestion: () => readOpenQuestion,
51260
51309
  readProofFailure: () => readProofFailure,
51261
51310
  readProofFailureRepeats: () => readProofFailureRepeats,
51262
51311
  readProofOutcome: () => readProofOutcome,
@@ -51268,6 +51317,7 @@ __export(onboarding_state_exports, {
51268
51317
  recordCommandFailure: () => recordCommandFailure,
51269
51318
  recordForeignRoundTripPass: () => recordForeignRoundTripPass,
51270
51319
  recordLearningContainerCheck: () => recordLearningContainerCheck,
51320
+ recordOpenQuestion: () => recordOpenQuestion,
51271
51321
  recordProofFailure: () => recordProofFailure,
51272
51322
  recordProofOutcome: () => recordProofOutcome,
51273
51323
  recordRoundTripFailure: () => recordRoundTripFailure,
@@ -52015,6 +52065,36 @@ function readProofFailure(dependencies, runId) {
52015
52065
  return void 0;
52016
52066
  return { id: stored.id, status: stored.status };
52017
52067
  }
52068
+ function recordOpenQuestion(dependencies, runId, about) {
52069
+ writeState(
52070
+ dependencies.store,
52071
+ stateRef("question", resolveAnchoredRoot(dependencies, { runId })),
52072
+ { runId, about }
52073
+ );
52074
+ }
52075
+ function readOpenQuestion(dependencies, runId) {
52076
+ const stored = readState(
52077
+ dependencies.store,
52078
+ stateRef("question", resolveAnchoredRoot(dependencies, { runId }))
52079
+ );
52080
+ if (typeof stored !== "object" || stored === null)
52081
+ return void 0;
52082
+ if (stored.runId !== runId)
52083
+ return void 0;
52084
+ if (typeof stored.about !== "string" || !QUESTION_PATTERN.test(stored.about)) {
52085
+ return void 0;
52086
+ }
52087
+ return stored.about;
52088
+ }
52089
+ function closeOpenQuestion(dependencies, runId) {
52090
+ if (readOpenQuestion(dependencies, runId) === void 0)
52091
+ return;
52092
+ writeState(
52093
+ dependencies.store,
52094
+ stateRef("question", resolveAnchoredRoot(dependencies, { runId })),
52095
+ { runId }
52096
+ );
52097
+ }
52018
52098
  function recordRunActivity(dependencies, runId, activity) {
52019
52099
  writeState(
52020
52100
  dependencies.store,
@@ -52039,7 +52119,7 @@ function readRunActivity(dependencies, runId) {
52039
52119
  }
52040
52120
  return { endedAt: stored.endedAt, command: stored.command };
52041
52121
  }
52042
- var CODING_AGENT_PATTERN, MODEL_PATTERN, MODEL_FAMILY_PATTERN, CODING_AGENT_PRODUCTS, LISTED_MODEL_FAMILIES, ONBOARDING_INTENT_PATTERN, ONBOARDING_PROJECT_ID_PATTERN, MOVED_NAMESPACES, ERROR_CODE_PATTERN, KEPT_FAILURE_KINDS, KEPT_PROVIDER_ERRORS, KEPT_DETAIL_LIMIT, PROOF_FAILURE_IDS, ACTIVITY_COMMAND_PATTERN;
52122
+ var CODING_AGENT_PATTERN, MODEL_PATTERN, MODEL_FAMILY_PATTERN, CODING_AGENT_PRODUCTS, LISTED_MODEL_FAMILIES, ONBOARDING_INTENT_PATTERN, ONBOARDING_PROJECT_ID_PATTERN, MOVED_NAMESPACES, ERROR_CODE_PATTERN, KEPT_FAILURE_KINDS, KEPT_PROVIDER_ERRORS, KEPT_DETAIL_LIMIT, PROOF_FAILURE_IDS, ACTIVITY_COMMAND_PATTERN, QUESTION_PATTERN;
52043
52123
  var init_onboarding_state = __esm({
52044
52124
  "apps/cli/src/services/onboarding-state.ts"() {
52045
52125
  "use strict";
@@ -52084,6 +52164,7 @@ var init_onboarding_state = __esm({
52084
52164
  "round-trip",
52085
52165
  "proof-failure",
52086
52166
  "activity",
52167
+ "question",
52087
52168
  "learning-check"
52088
52169
  ];
52089
52170
  ERROR_CODE_PATTERN = /^[a-z][a-z_]{0,39}$/;
@@ -52096,6 +52177,7 @@ var init_onboarding_state = __esm({
52096
52177
  ...ROUND_TRIP_CHECK_IDS.map((id2) => `round-trip:${id2}`)
52097
52178
  ]);
52098
52179
  ACTIVITY_COMMAND_PATTERN = /^[a-z][a-z0-9-]{0,39}( [a-z][a-z0-9-]{0,39})?$/;
52180
+ QUESTION_PATTERN = /^[a-z][a-z0-9-]{0,39}$/;
52099
52181
  }
52100
52182
  });
52101
52183
 
@@ -52709,9 +52791,9 @@ function getTelemetryEndpointUrl() {
52709
52791
  }
52710
52792
  function getBuildInfo() {
52711
52793
  return {
52712
- version: true ? "4.28.0" : "dev",
52713
- buildNumber: true ? "38464768008" : "dev",
52714
- commitSha: true ? "a033e00c2995392ce8ace961b4aba1acdf4705f5" : "dev",
52794
+ version: true ? "4.29.0" : "dev",
52795
+ buildNumber: true ? "38603793405" : "dev",
52796
+ commitSha: true ? "c2941f81dd4028b36bcc8d09cead7a5cf9381519" : "dev",
52715
52797
  copilotKitCommit: getTemplateRef()
52716
52798
  };
52717
52799
  }
@@ -72850,6 +72932,261 @@ var init_unknown_input = __esm({
72850
72932
  }
72851
72933
  });
72852
72934
 
72935
+ // apps/cli/src/services/onboarding-checkpoint.ts
72936
+ function reviewCheckpoint(input) {
72937
+ const reviewed = reviewPhaseAndAttempt(input);
72938
+ if (!reviewed.ok || input.reason === void 0)
72939
+ return reviewed;
72940
+ const planStop = reviewed.checkpoint.phase === PLAN_STOP_PHASE;
72941
+ const planStopReason = planStop ? reviewPlanStopReason(input.reason) : void 0;
72942
+ if (planStopReason !== void 0) {
72943
+ return { ...reviewed, checkpoint: { ...reviewed.checkpoint, planStopReason } };
72944
+ }
72945
+ return {
72946
+ ...reviewed,
72947
+ checkpoint: planStop ? { ...reviewed.checkpoint, planStopReason: "other" } : reviewed.checkpoint,
72948
+ reasonRefusal: {
72949
+ code: "CHECKPOINT_REASON_INVALID",
72950
+ message: `--reason goes with --phase ${PLAN_STOP_PHASE} only, and takes one or more of these, comma-separated: ${PLAN_STOP_REASONS.join(", ")}. The checkpoint was kept${planStop ? " with the reason `other`" : " without the reason"}.`
72951
+ }
72952
+ };
72953
+ }
72954
+ function reviewPlanStopReason(reason) {
72955
+ const named = reason.split(",").map((one) => one.trim());
72956
+ if (named.some((one) => !PLAN_STOP_REASONS.some((known) => known === one)))
72957
+ return void 0;
72958
+ return PLAN_STOP_REASONS.filter((known) => named.includes(known)).join(",");
72959
+ }
72960
+ function reviewPhaseAndAttempt(input) {
72961
+ const allowed = `--phase must be one of: ${REPORTABLE_CHECKPOINT_PHASES.join(", ")}.`;
72962
+ const observed = [...OBSERVED_ONLY_PHASES].find(([known]) => known === input.phase);
72963
+ if (observed !== void 0) {
72964
+ return {
72965
+ ok: false,
72966
+ refusal: {
72967
+ code: "CHECKPOINT_PHASE_INVALID",
72968
+ message: `${observed[0]} ${observed[1]}, not by a checkpoint. ${allowed}`
72969
+ }
72970
+ };
72971
+ }
72972
+ const phase = REPORTABLE_CHECKPOINT_PHASES.find((known) => known === input.phase);
72973
+ if (phase === void 0) {
72974
+ return {
72975
+ ok: false,
72976
+ refusal: { code: "CHECKPOINT_PHASE_INVALID", message: allowed }
72977
+ };
72978
+ }
72979
+ const subagent = reviewSubagentReturn(phase, input.brief, input.result);
72980
+ if (!subagent.ok)
72981
+ return subagent;
72982
+ const question = reviewAbout(phase, input.about);
72983
+ const kept = question.refusal === void 0 ? {} : { aboutRefusal: question.refusal };
72984
+ const named = {
72985
+ ...question.about === void 0 ? {} : { about: question.about },
72986
+ ...subagent.named
72987
+ };
72988
+ if (input.attempt === void 0) {
72989
+ return { ok: true, checkpoint: { phase, ...named }, ...kept };
72990
+ }
72991
+ const attempt = /^[1-9][0-9]*$/.test(input.attempt) ? Number(input.attempt) : Number.NaN;
72992
+ if (!Number.isInteger(attempt) || attempt > MAX_CHECKPOINT_ATTEMPT) {
72993
+ return {
72994
+ ok: false,
72995
+ refusal: {
72996
+ code: "CHECKPOINT_ATTEMPT_INVALID",
72997
+ message: `--attempt must be a whole number from 1 to ${MAX_CHECKPOINT_ATTEMPT}.`
72998
+ }
72999
+ };
73000
+ }
73001
+ return { ok: true, checkpoint: { attempt, phase, ...named }, ...kept };
73002
+ }
73003
+ function reviewAbout(phase, about) {
73004
+ if (about === void 0)
73005
+ return {};
73006
+ const wait = phase === QUESTION_PHASE;
73007
+ const known = wait ? CHECKPOINT_ABOUT_TOPICS.find((topic) => topic === about) : void 0;
73008
+ if (known !== void 0)
73009
+ return { about: known };
73010
+ return {
73011
+ ...wait ? { about: "other" } : {},
73012
+ refusal: {
73013
+ code: "CHECKPOINT_ABOUT_INVALID",
73014
+ message: wait ? `--about must be one of: ${CHECKPOINT_ABOUT_TOPICS.join(", ")}. The checkpoint was kept with the question \`other\`.` : `--about names the question a run waits on, so only --phase ${QUESTION_PHASE} takes it. The checkpoint was kept without the question.`
73015
+ }
73016
+ };
73017
+ }
73018
+ function reviewSubagentReturn(phase, brief, result2) {
73019
+ if (phase !== RETURN_PHASE) {
73020
+ if (brief === void 0 && result2 === void 0)
73021
+ return { ok: true, named: {} };
73022
+ const flag = brief === void 0 ? "result" : "brief";
73023
+ return {
73024
+ ok: false,
73025
+ refusal: {
73026
+ code: flag === "brief" ? "CHECKPOINT_BRIEF_INVALID" : "CHECKPOINT_RESULT_INVALID",
73027
+ message: `--${flag} names a subagent's return, so only --phase ${RETURN_PHASE} takes it.`
73028
+ }
73029
+ };
73030
+ }
73031
+ const knownBrief = SUBAGENT_BRIEFS.find((known) => known === brief);
73032
+ if (knownBrief === void 0) {
73033
+ return {
73034
+ ok: false,
73035
+ refusal: {
73036
+ code: "CHECKPOINT_BRIEF_INVALID",
73037
+ message: `--brief must be one of: ${SUBAGENT_BRIEFS.join(", ")}.`
73038
+ }
73039
+ };
73040
+ }
73041
+ const knownResult = SUBAGENT_RESULTS.find((known) => known === result2);
73042
+ if (knownResult === void 0) {
73043
+ return {
73044
+ ok: false,
73045
+ refusal: {
73046
+ code: "CHECKPOINT_RESULT_INVALID",
73047
+ message: `--result must be one of: ${SUBAGENT_RESULTS.join(", ")}.`
73048
+ }
73049
+ };
73050
+ }
73051
+ return { ok: true, named: { brief: knownBrief, result: knownResult } };
73052
+ }
73053
+ var CHECKPOINT_PHASES, OBSERVED_ONLY_PHASES, REPORTABLE_CHECKPOINT_PHASES, SUBAGENT_BRIEFS, SUBAGENT_RESULTS, RETURN_PHASE, CHECKPOINT_ABOUT_TOPICS, QUESTION_PHASE, MAX_CHECKPOINT_ATTEMPT, PLAN_STOP_REASONS, PLAN_STOP_PHASE;
73054
+ var init_onboarding_checkpoint = __esm({
73055
+ "apps/cli/src/services/onboarding-checkpoint.ts"() {
73056
+ "use strict";
73057
+ init_define_CLI_LOCAL_EVALUATION_SUPPORT();
73058
+ CHECKPOINT_PHASES = [
73059
+ // The first node's two moments (PE-538). Most runs that stop at
73060
+ // `authenticate/start` sent nothing after it, so a stop there could not say
73061
+ // whether the agent stopped reading, sign-in never finished, or the developer
73062
+ // signed in and the agent stopped. Only the model sees either moment: the
73063
+ // welcome is its own message, and a successful `login` says the developer
73064
+ // signed in, not that the agent read the result and went on. Research can
73065
+ // start while sign-in still waits, so `sign-in-settled` may follow it.
73066
+ "welcome-sent",
73067
+ "sign-in-settled",
73068
+ "research-dispatched",
73069
+ "surface-probed",
73070
+ "research-returned",
73071
+ "starter-cloned",
73072
+ "plan-written",
73073
+ "container-surveyed",
73074
+ "container-settled",
73075
+ "build-validated",
73076
+ "journey-attempted",
73077
+ "repair-attempted",
73078
+ // The first time the app answers a chat through its runtime, as `verify
73079
+ // --round-trip` or `onboard proof-check` saw it (PE-548). A passed proof is
73080
+ // the full proof; this is the working app, which a run can reach and then
73081
+ // fail a later check or skip the proof. Only those commands record it.
73082
+ "first-answer",
73083
+ // Out of step order too: a run spawns subagents in several steps, and each
73084
+ // brief read and each return is reported (PE-553). Only the research
73085
+ // dispatch was recorded before, so a plan, implementation or proof subagent
73086
+ // that never came back read the same as a run that stopped waiting on one.
73087
+ // The CLI records the dispatch when a `subagent/*` brief is read. The return
73088
+ // names its brief and result, so `--brief` and `--result` go with it.
73089
+ "subagent-dispatched",
73090
+ "subagent-returned",
73091
+ // Out of step order, like the mode below: a run can wait at any step. A
73092
+ // coding agent that needs something only the developer can supply asks, then
73093
+ // ends its turn. Without this phase the only report it had was a stop, so a
73094
+ // run that was waiting read the same as one that had ended.
73095
+ "awaiting-developer",
73096
+ // The wait a run most often never returns from, so it is named apart from
73097
+ // every other question. Codex built-in runs ended at `settle-credentials`
73098
+ // on an `awaiting-developer` that said nothing about what they waited for
73099
+ // (PE-409).
73100
+ "awaiting-model-credential",
73101
+ // The wait between showing the plan and the developer's answer. The next
73102
+ // read, `implementation/build-and-validate`, comes only after the approval,
73103
+ // so without this phase the planning subagent's time and the developer's
73104
+ // reading time were one number on `subagent/create-plan` (PE-462).
73105
+ "awaiting-plan-approval",
73106
+ // Last rather than in step order, because this one is a mode and not a step.
73107
+ // It is reported once, at the first delegation, and what it changes is how
73108
+ // every later step runs rather than how far the run has got.
73109
+ "delegation-unavailable"
73110
+ ];
73111
+ OBSERVED_ONLY_PHASES = /* @__PURE__ */ new Map([
73112
+ [
73113
+ "first-answer",
73114
+ "is recorded when `verify --round-trip` or `onboard proof-check` sees the app answer"
73115
+ ],
73116
+ ["subagent-dispatched", "is recorded when `onboard read subagent/<brief>` serves a brief"]
73117
+ ]);
73118
+ REPORTABLE_CHECKPOINT_PHASES = CHECKPOINT_PHASES.filter((phase) => !OBSERVED_ONLY_PHASES.has(phase));
73119
+ SUBAGENT_BRIEFS = [
73120
+ "inspect-repository",
73121
+ "create-plan",
73122
+ "implement-and-validate",
73123
+ "prove-oss-baseline",
73124
+ "prove-round-trip"
73125
+ ];
73126
+ SUBAGENT_RESULTS = ["ok", "refused", "failed"];
73127
+ RETURN_PHASE = "subagent-returned";
73128
+ CHECKPOINT_ABOUT_TOPICS = [
73129
+ // The harness refused or held a command until the developer approves it.
73130
+ "harness-permission",
73131
+ // The browser sign-in the developer has not finished.
73132
+ "sign-in",
73133
+ // The one setup message that asks every open choice at once.
73134
+ "setup-answers",
73135
+ // The framework, model provider, frontend, or how an existing agent runs.
73136
+ "stack-choice",
73137
+ // Confirm or name a new project.
73138
+ "project-name",
73139
+ // Which existing project the developer meant.
73140
+ "which-project",
73141
+ // Git tracks, or does not ignore, the env file the key would go in.
73142
+ "env-file-tracked",
73143
+ // Approve the local stack's install and its connection writes.
73144
+ "local-connection",
73145
+ // Accept the local evaluation agreement, which only the developer can do,
73146
+ // in their own terminal.
73147
+ "local-terms",
73148
+ // The folder is not one a project can go in: home, a system folder, or a
73149
+ // folder of projects.
73150
+ "existing-folder",
73151
+ // Something only the developer can install or change on the machine.
73152
+ "environment-fix",
73153
+ // Allow an edit to a file with uncommitted changes the plan does not name.
73154
+ "uncommitted-file",
73155
+ // Approve a change to the existing agent: its instructions, tools, or
73156
+ // dependencies.
73157
+ "agent-change",
73158
+ // After a stop or a tripwire: restore the changed files, or go on.
73159
+ "restore-files",
73160
+ // The app refused the verifier's run, so the developer sends one message and
73161
+ // gives its thread id.
73162
+ "thread-id",
73163
+ // Approve the one scoped fix that would finish a failed run.
73164
+ "scoped-fix",
73165
+ // Which existing Channel or Learning Container this project serves.
73166
+ "feature-binding",
73167
+ // None of the above. Kept last, and kept rare.
73168
+ "other"
73169
+ ];
73170
+ QUESTION_PHASE = "awaiting-developer";
73171
+ MAX_CHECKPOINT_ATTEMPT = 9;
73172
+ PLAN_STOP_REASONS = [
73173
+ "dependency_upgrade",
73174
+ "dependency_removal",
73175
+ "file_removal",
73176
+ "uncommitted_file",
73177
+ "gitignore",
73178
+ "env_file",
73179
+ "existing_agent_change",
73180
+ "file_count",
73181
+ "outside_project",
73182
+ "copilotkit_version",
73183
+ "backup_partial",
73184
+ "other"
73185
+ ];
73186
+ PLAN_STOP_PHASE = "awaiting-plan-approval";
73187
+ }
73188
+ });
73189
+
72853
73190
  // node_modules/.pnpm/@c15t+schema@2.1.0_typescript@5.9.3/node_modules/@c15t/schema/dist/194.js
72854
73191
  function createCompactUiProfile() {
72855
73192
  return {
@@ -131248,6 +131585,22 @@ function currentRunIdleProperties(startedAt) {
131248
131585
  return {};
131249
131586
  }
131250
131587
  }
131588
+ function takeAnsweredQuestionProperties() {
131589
+ try {
131590
+ const dependencies = { cwd: process.cwd(), store: onboardingStateStore };
131591
+ const runId = readOnboardingRunId(dependencies);
131592
+ if (runId === void 0)
131593
+ return {};
131594
+ const stored = readOpenQuestion(dependencies, runId);
131595
+ if (stored === void 0)
131596
+ return {};
131597
+ closeOpenQuestion(dependencies, runId);
131598
+ const about = CHECKPOINT_ABOUT_TOPICS.find((known) => known === stored);
131599
+ return about === void 0 ? {} : { answered_about: about };
131600
+ } catch {
131601
+ return {};
131602
+ }
131603
+ }
131251
131604
  async function withTelemetry(base2, fn) {
131252
131605
  const buildInfo = getBuildInfo();
131253
131606
  const provider = getConsentProvider();
@@ -131283,6 +131636,7 @@ async function withTelemetry(base2, fn) {
131283
131636
  ...currentCliStateProperties(base2.command),
131284
131637
  ...currentOnboardingRunProperties(),
131285
131638
  ...currentRunIdleProperties(startedAt),
131639
+ ...takeAnsweredQuestionProperties(),
131286
131640
  outcome: "started"
131287
131641
  }
131288
131642
  });
@@ -131397,6 +131751,7 @@ var init_telemetry2 = __esm({
131397
131751
  async "apps/cli/src/services/telemetry/index.ts"() {
131398
131752
  "use strict";
131399
131753
  init_define_CLI_LOCAL_EVALUATION_SUPPORT();
131754
+ init_onboarding_checkpoint();
131400
131755
  init_config();
131401
131756
  init_config_service();
131402
131757
  init_onboarding_state();
@@ -138525,6 +138880,9 @@ function recordOnboardingCheckpoint(recorder, phase, options = {}) {
138525
138880
  ...phase === "starter-cloned" ? { starterClonedAt: Date.now() } : {}
138526
138881
  });
138527
138882
  }
138883
+ if (options.about !== void 0) {
138884
+ recordOpenQuestion(recorder, runId, options.about);
138885
+ }
138528
138886
  } catch {
138529
138887
  }
138530
138888
  const intent = readOnboardingIntent(recorder);
@@ -138538,6 +138896,9 @@ function recordOnboardingCheckpoint(recorder, phase, options = {}) {
138538
138896
  cli_version: recorder.cliVersion,
138539
138897
  checkpoint_phase: phase,
138540
138898
  ...options.properties ?? {},
138899
+ ...options.about === void 0 ? {} : { checkpoint_about: options.about },
138900
+ ...options.brief === void 0 ? {} : { subagent_brief: options.brief },
138901
+ ...options.result === void 0 ? {} : { subagent_result: options.result },
138541
138902
  // Spread so a step that does not loop leaves the key off rather than
138542
138903
  // reporting a first attempt at something.
138543
138904
  ...options.attempt === void 0 ? {} : { checkpoint_attempt: options.attempt }
@@ -138637,7 +138998,9 @@ var init_onboarding_checkpoint_record = __esm({
138637
138998
  "build-validated",
138638
138999
  "journey-attempted",
138639
139000
  "repair-attempted",
138640
- "first-answer"
139001
+ "first-answer",
139002
+ // Every `subagent/*` brief read (PE-553).
139003
+ "subagent-dispatched"
138641
139004
  ]);
138642
139005
  }
138643
139006
  });
@@ -423692,10 +424055,27 @@ function setupWelcome() {
423692
424055
  }
423693
424056
  function signInMessage(input) {
423694
424057
  const why = "First, sign in to CopilotKit Intelligence, or create an account. It is free: the Developer plan costs nothing, and this setup needs no paid subscription. Signing in gives this project its own CopilotKit Intelligence project and API key, which let your users reopen past conversations. You can remove the key later to disconnect this workspace.";
423695
- const page = input.browserOpened ? "I opened the sign-in page in your browser." : `Open this page to sign in:
423696
- ${input.url}`;
423697
- const code = input.userCode === void 0 ? [] : [`Check that the page shows this code: **${input.userCode}**`];
423698
- return [why, page, ...code].join("\n\n");
424058
+ const page = !input.browserOpened ? `Open this page to sign in:
424059
+ ${input.url}` : input.linkWhenOpened === true ? `I opened the sign-in page in your browser. If it did not open, open this page:
424060
+ ${input.url}` : "I opened the sign-in page in your browser.";
424061
+ return [why, page, ...codeCheck(input.userCode)].join("\n\n");
424062
+ }
424063
+ function codeCheck(userCode) {
424064
+ return userCode === void 0 ? [] : [`Check that the page shows this code: **${userCode}**`];
424065
+ }
424066
+ function renewedSignInMessage(input) {
424067
+ return [
424068
+ ...input.browserOpened ? [
424069
+ "The sign-in code expired before anyone approved it, so I opened a new sign-in page in your browser.",
424070
+ `If it did not open, open this page:
424071
+ ${input.url}`
424072
+ ] : [
424073
+ "The sign-in code expired before anyone approved it, so here is a new one.",
424074
+ `Open this page to sign in:
424075
+ ${input.url}`
424076
+ ],
424077
+ ...codeCheck(input.userCode)
424078
+ ].join("\n\n");
423699
424079
  }
423700
424080
  var WELCOME_INTRO, SELF_HOST_LINE, WELCOME_PROMISE;
423701
424081
  var init_onboarding_welcome = __esm({
@@ -423859,8 +424239,7 @@ async function runLoginJson(dependencies = {
423859
424239
  let renewals = 0;
423860
424240
  function openPage(url4, after, actionLine) {
423861
424241
  openings.push(
423862
- // In onboarding the developer opens it, from the message that says why.
423863
- (options.onboarding === true ? Promise.resolve(false) : dependencies.openBrowser(url4).catch(() => false)).then((opened) => {
424242
+ dependencies.openBrowser(url4).catch(() => false).then((opened) => {
423864
424243
  after(opened);
423865
424244
  writeJsonLine(dependencies.stdout, actionLine(opened));
423866
424245
  }).catch(() => void 0)
@@ -423881,12 +424260,13 @@ async function runLoginJson(dependencies = {
423881
424260
  authenticationLine["resumed"] === true
423882
424261
  ),
423883
424262
  (opened) => ({
423884
- action: options.onboarding === true ? ONBOARDING_SIGN_IN_ACTION : opened ? OPENED_DEVICE_ACTION : DEVICE_ACTION,
424263
+ action: options.onboarding === true ? opened ? ONBOARDING_OPENED_SIGN_IN_ACTION : ONBOARDING_SIGN_IN_ACTION : opened ? OPENED_DEVICE_ACTION : DEVICE_ACTION,
423885
424264
  browser_opened: opened,
423886
424265
  // The developer does not see this record. The agent writes `message`
423887
424266
  // in its own reply: why to sign in, before the link.
423888
424267
  message: signInMessage({
423889
424268
  browserOpened: opened,
424269
+ ...options.onboarding === true ? { linkWhenOpened: true } : {},
423890
424270
  url: String(authenticationLine["url"] ?? ""),
423891
424271
  ...typeof authenticationLine["user_code"] === "string" ? { userCode: authenticationLine["user_code"] } : {}
423892
424272
  }),
@@ -423915,11 +424295,11 @@ async function runLoginJson(dependencies = {
423915
424295
  handoff === void 0 ? 0 : Date.now() - handoff.handedOffAt
423916
424296
  ),
423917
424297
  (opened) => ({
423918
- action: options.onboarding === true ? ONBOARDING_RENEWED_ACTION : opened ? OPENED_RENEWED_DEVICE_ACTION : RENEWED_DEVICE_ACTION,
424298
+ action: options.onboarding === true ? opened ? ONBOARDING_OPENED_RENEWED_ACTION : ONBOARDING_RENEWED_ACTION : opened ? OPENED_RENEWED_DEVICE_ACTION : RENEWED_DEVICE_ACTION,
423919
424299
  browser_opened: opened,
423920
424300
  ...options.onboarding === true ? {
423921
- message: signInMessage({
423922
- browserOpened: false,
424301
+ message: renewedSignInMessage({
424302
+ browserOpened: opened,
423923
424303
  url: String(authenticationLine["url"] ?? ""),
423924
424304
  ...typeof authenticationLine["user_code"] === "string" ? { userCode: authenticationLine["user_code"] } : {}
423925
424305
  })
@@ -424121,7 +424501,7 @@ async function runLoginDevice(dependencies = {
424121
424501
  }
424122
424502
  stdout.write("Logged in successfully!\n");
424123
424503
  }
424124
- var import_jsx_runtime18, LOGIN_STALL_REPORT_MS, ONBOARDING_SIGN_IN_ACTION, ONBOARDING_RENEWED_ACTION, REPEATED_EXPIRY_LIMIT, MAX_CODE_RENEWALS, REPEATED_EXPIRY_WAIT_MS, REPEATED_EXPIRY_POLL_MS, RETRY_ASK_DEVELOPER, REPEATED_EXPIRY_MESSAGE, RepeatedExpiryError, RenewalFailedError, DEVICE_ACTION, OPENED_DEVICE_ACTION, RENEWED_DEVICE_ACTION, OPENED_RENEWED_DEVICE_ACTION;
424504
+ var import_jsx_runtime18, LOGIN_STALL_REPORT_MS, ONBOARDING_SIGN_IN_ACTION, ONBOARDING_OPENED_SIGN_IN_ACTION, ONBOARDING_RENEWED_ACTION, ONBOARDING_OPENED_RENEWED_ACTION, REPEATED_EXPIRY_LIMIT, MAX_CODE_RENEWALS, REPEATED_EXPIRY_WAIT_MS, REPEATED_EXPIRY_POLL_MS, RETRY_ASK_DEVELOPER, REPEATED_EXPIRY_MESSAGE, RepeatedExpiryError, RenewalFailedError, DEVICE_ACTION, OPENED_DEVICE_ACTION, RENEWED_DEVICE_ACTION, OPENED_RENEWED_DEVICE_ACTION;
424125
424505
  var init_login = __esm({
424126
424506
  async "apps/cli/src/commands/login.tsx"() {
424127
424507
  "use strict";
@@ -424141,7 +424521,9 @@ var init_login = __esm({
424141
424521
  import_jsx_runtime18 = __toESM(require_jsx_runtime(), 1);
424142
424522
  LOGIN_STALL_REPORT_MS = 12e4;
424143
424523
  ONBOARDING_SIGN_IN_ACTION = "The developer does not see your tool output. Write `message` in your own reply, word for word: it says why to sign in, then gives the link and the code. Do not open authentication_url yourself; the developer opens it from your message. Report the pause with `onboard checkpoint --phase awaiting-developer`, then end your turn. Keep this process running, and read it again when the developer says they signed in.";
424524
+ ONBOARDING_OPENED_SIGN_IN_ACTION = "The CLI opened authentication_url in the default browser. Do not open it again. The developer does not see your tool output. Write `message` in your own reply, word for word: it says why to sign in, that the page opened, then gives the link and the code. Report the pause with `onboard checkpoint --phase awaiting-developer`, then end your turn. Keep this process running, and read it again when the developer says they signed in.";
424144
424525
  ONBOARDING_RENEWED_ACTION = "The last code expired before anyone approved it, so the CLI issued a new one. The developer does not see your tool output. Write `message` in your own reply, word for word, and do not open authentication_url yourself. Report the pause with `onboard checkpoint --phase awaiting-developer`, then end your turn. Keep this process running.";
424526
+ ONBOARDING_OPENED_RENEWED_ACTION = "The last code expired before anyone approved it, so the CLI issued a new one and opened its page in the default browser. Do not open it again. The developer does not see your tool output. Write `message` in your own reply, word for word. Report the pause with `onboard checkpoint --phase awaiting-developer`, then end your turn. Keep this process running.";
424145
424527
  REPEATED_EXPIRY_LIMIT = 2;
424146
424528
  MAX_CODE_RENEWALS = 2;
424147
424529
  REPEATED_EXPIRY_WAIT_MS = 6e4;
@@ -428984,7 +429366,7 @@ var init_package = __esm({
428984
429366
  "apps/cli/package.json"() {
428985
429367
  package_default = {
428986
429368
  name: "copilotkit",
428987
- version: "4.28.0",
429369
+ version: "4.29.0",
428988
429370
  type: "module",
428989
429371
  engines: {
428990
429372
  node: ">=20.9.0"
@@ -436716,163 +437098,45 @@ var init_onboarding_friction = __esm({
436716
437098
  }
436717
437099
  });
436718
437100
 
436719
- // apps/cli/src/services/onboarding-checkpoint.ts
436720
- function reviewCheckpoint(input) {
436721
- const reviewed = reviewPhaseAndAttempt(input);
436722
- if (!reviewed.ok || input.reason === void 0)
436723
- return reviewed;
436724
- const planStop = reviewed.checkpoint.phase === PLAN_STOP_PHASE;
436725
- const planStopReason = planStop ? reviewPlanStopReason(input.reason) : void 0;
436726
- if (planStopReason !== void 0) {
436727
- return { ok: true, checkpoint: { ...reviewed.checkpoint, planStopReason } };
436728
- }
436729
- return {
436730
- ok: true,
436731
- checkpoint: planStop ? { ...reviewed.checkpoint, planStopReason: "other" } : reviewed.checkpoint,
436732
- reasonRefusal: {
436733
- code: "CHECKPOINT_REASON_INVALID",
436734
- message: `--reason goes with --phase ${PLAN_STOP_PHASE} only, and takes one or more of these, comma-separated: ${PLAN_STOP_REASONS.join(", ")}. The checkpoint was kept${planStop ? " with the reason `other`" : " without the reason"}.`
436735
- }
436736
- };
436737
- }
436738
- function reviewPlanStopReason(reason) {
436739
- const named = reason.split(",").map((one) => one.trim());
436740
- if (named.some((one) => !PLAN_STOP_REASONS.some((known) => known === one)))
437101
+ // apps/cli/src/services/onboarding-harness-blocks.ts
437102
+ function readMarker(line) {
437103
+ const match2 = /^<!-- (\/?)([a-z-]+) -->$/u.exec(line.trim());
437104
+ if (match2 === null)
436741
437105
  return void 0;
436742
- return PLAN_STOP_REASONS.filter((known) => named.includes(known)).join(",");
436743
- }
436744
- function reviewPhaseAndAttempt(input) {
436745
- const allowed = `--phase must be one of: ${REPORTABLE_CHECKPOINT_PHASES.join(", ")}.`;
436746
- const observed = [...OBSERVED_ONLY_PHASES].find((known) => known === input.phase);
436747
- if (observed !== void 0) {
436748
- return {
436749
- ok: false,
436750
- refusal: {
436751
- code: "CHECKPOINT_PHASE_INVALID",
436752
- message: `${observed} is recorded when \`verify --round-trip\` or \`onboard proof-check\` sees the app answer, not by a checkpoint. ${allowed}`
436753
- }
436754
- };
436755
- }
436756
- const phase = REPORTABLE_CHECKPOINT_PHASES.find((known) => known === input.phase);
436757
- if (phase === void 0) {
436758
- return {
436759
- ok: false,
436760
- refusal: { code: "CHECKPOINT_PHASE_INVALID", message: allowed }
436761
- };
436762
- }
436763
- if (input.attempt === void 0)
436764
- return { ok: true, checkpoint: { phase } };
436765
- const attempt = /^[1-9][0-9]*$/.test(input.attempt) ? Number(input.attempt) : Number.NaN;
436766
- if (!Number.isInteger(attempt) || attempt > MAX_CHECKPOINT_ATTEMPT) {
436767
- return {
436768
- ok: false,
436769
- refusal: {
436770
- code: "CHECKPOINT_ATTEMPT_INVALID",
436771
- message: `--attempt must be a whole number from 1 to ${MAX_CHECKPOINT_ATTEMPT}.`
436772
- }
436773
- };
436774
- }
436775
- return { ok: true, checkpoint: { attempt, phase } };
437106
+ const kind = match2[2] ?? "";
437107
+ if (!(kind in HARNESS_PASSAGE_AGENTS))
437108
+ return void 0;
437109
+ return { kind, closes: match2[1] === "/" };
436776
437110
  }
436777
- var CHECKPOINT_PHASES, OBSERVED_ONLY_PHASES, REPORTABLE_CHECKPOINT_PHASES, MAX_CHECKPOINT_ATTEMPT, PLAN_STOP_REASONS, PLAN_STOP_PHASE;
436778
- var init_onboarding_checkpoint = __esm({
436779
- "apps/cli/src/services/onboarding-checkpoint.ts"() {
436780
- "use strict";
436781
- init_define_CLI_LOCAL_EVALUATION_SUPPORT();
436782
- CHECKPOINT_PHASES = [
436783
- // The first node's two moments (PE-538). Most runs that stop at
436784
- // `authenticate/start` sent nothing after it, so a stop there could not say
436785
- // whether the agent stopped reading, sign-in never finished, or the developer
436786
- // signed in and the agent stopped. Only the model sees either moment: the
436787
- // welcome is its own message, and a successful `login` says the developer
436788
- // signed in, not that the agent read the result and went on. Research can
436789
- // start while sign-in still waits, so `sign-in-settled` may follow it.
436790
- "welcome-sent",
436791
- "sign-in-settled",
436792
- "research-dispatched",
436793
- "surface-probed",
436794
- "research-returned",
436795
- "starter-cloned",
436796
- "plan-written",
436797
- "container-surveyed",
436798
- "container-settled",
436799
- "build-validated",
436800
- "journey-attempted",
436801
- "repair-attempted",
436802
- // The first time the app answers a chat through its runtime, as `verify
436803
- // --round-trip` or `onboard proof-check` saw it (PE-548). A passed proof is
436804
- // the full proof; this is the working app, which a run can reach and then
436805
- // fail a later check or skip the proof. Only those commands record it.
436806
- "first-answer",
436807
- // Out of step order, like the mode below: a run can wait at any step. A
436808
- // coding agent that needs something only the developer can supply asks, then
436809
- // ends its turn. Without this phase the only report it had was a stop, so a
436810
- // run that was waiting read the same as one that had ended.
436811
- "awaiting-developer",
436812
- // The wait a run most often never returns from, so it is named apart from
436813
- // every other question. Codex built-in runs ended at `settle-credentials`
436814
- // on an `awaiting-developer` that said nothing about what they waited for
436815
- // (PE-409).
436816
- "awaiting-model-credential",
436817
- // The wait between showing the plan and the developer's answer. The next
436818
- // read, `implementation/build-and-validate`, comes only after the approval,
436819
- // so without this phase the planning subagent's time and the developer's
436820
- // reading time were one number on `subagent/create-plan` (PE-462).
436821
- "awaiting-plan-approval",
436822
- // Last rather than in step order, because this one is a mode and not a step.
436823
- // It is reported once, at the first delegation, and what it changes is how
436824
- // every later step runs rather than how far the run has got.
436825
- "delegation-unavailable"
436826
- ];
436827
- OBSERVED_ONLY_PHASES = /* @__PURE__ */ new Set([
436828
- "first-answer"
436829
- ]);
436830
- REPORTABLE_CHECKPOINT_PHASES = CHECKPOINT_PHASES.filter((phase) => !OBSERVED_ONLY_PHASES.has(phase));
436831
- MAX_CHECKPOINT_ATTEMPT = 9;
436832
- PLAN_STOP_REASONS = [
436833
- "dependency_upgrade",
436834
- "dependency_removal",
436835
- "file_removal",
436836
- "uncommitted_file",
436837
- "gitignore",
436838
- "env_file",
436839
- "existing_agent_change",
436840
- "file_count",
436841
- "outside_project",
436842
- "copilotkit_version",
436843
- "backup_partial",
436844
- "other"
436845
- ];
436846
- PLAN_STOP_PHASE = "awaiting-plan-approval";
436847
- }
436848
- });
436849
-
436850
- // apps/cli/src/services/onboarding-harness-blocks.ts
436851
- function hasSandboxedHarnessBlock(markdown) {
436852
- return markdown.split("\n").some((line) => line.trim() === SANDBOXED_HARNESS_OPEN);
437111
+ function hasHarnessBlock(markdown) {
437112
+ return markdown.split("\n").some((line) => {
437113
+ const marker = readMarker(line);
437114
+ return marker !== void 0 && !marker.closes;
437115
+ });
436853
437116
  }
436854
- function applySandboxedHarnessBlocks(markdown, agent) {
436855
- const keep = SANDBOXED_HARNESS_AGENTS.has(agent);
437117
+ function applyHarnessBlocks(markdown, agent) {
436856
437118
  const lines = markdown.split("\n");
436857
437119
  const served = [];
436858
- let inside = false;
437120
+ let open7;
437121
+ let keep = false;
436859
437122
  let dropNextBlank = false;
436860
437123
  for (const line of lines) {
436861
- const marker = line.trim();
436862
- if (marker === SANDBOXED_HARNESS_OPEN) {
436863
- if (inside)
436864
- throw new Error("A sandboxed-harness passage opens twice.");
436865
- inside = true;
437124
+ const marker = readMarker(line);
437125
+ if (marker !== void 0 && !marker.closes) {
437126
+ if (open7 !== void 0)
437127
+ throw new Error("A harness passage opens twice.");
437128
+ open7 = marker.kind;
437129
+ keep = HARNESS_PASSAGE_AGENTS[marker.kind]?.has(agent) ?? false;
436866
437130
  continue;
436867
437131
  }
436868
- if (marker === SANDBOXED_HARNESS_CLOSE) {
436869
- if (!inside)
436870
- throw new Error("A sandboxed-harness passage closes unopened.");
436871
- inside = false;
437132
+ if (marker !== void 0) {
437133
+ if (open7 !== marker.kind)
437134
+ throw new Error("A harness passage closes unopened.");
437135
+ open7 = void 0;
436872
437136
  dropNextBlank = !keep && (served.length === 0 || served.at(-1) === "");
436873
437137
  continue;
436874
437138
  }
436875
- if (inside && !keep)
437139
+ if (open7 !== void 0 && !keep)
436876
437140
  continue;
436877
437141
  if (dropNextBlank && line === "") {
436878
437142
  dropNextBlank = false;
@@ -436881,18 +437145,19 @@ function applySandboxedHarnessBlocks(markdown, agent) {
436881
437145
  dropNextBlank = false;
436882
437146
  served.push(line);
436883
437147
  }
436884
- if (inside)
436885
- throw new Error("A sandboxed-harness passage never closes.");
437148
+ if (open7 !== void 0)
437149
+ throw new Error("A harness passage never closes.");
436886
437150
  return served.join("\n");
436887
437151
  }
436888
- var SANDBOXED_HARNESS_OPEN, SANDBOXED_HARNESS_CLOSE, SANDBOXED_HARNESS_AGENTS;
437152
+ var HARNESS_PASSAGE_AGENTS;
436889
437153
  var init_onboarding_harness_blocks = __esm({
436890
437154
  "apps/cli/src/services/onboarding-harness-blocks.ts"() {
436891
437155
  "use strict";
436892
437156
  init_define_CLI_LOCAL_EVALUATION_SUPPORT();
436893
- SANDBOXED_HARNESS_OPEN = "<!-- sandboxed-harness -->";
436894
- SANDBOXED_HARNESS_CLOSE = "<!-- /sandboxed-harness -->";
436895
- SANDBOXED_HARNESS_AGENTS = /* @__PURE__ */ new Set(["codex"]);
437157
+ HARNESS_PASSAGE_AGENTS = {
437158
+ "sandboxed-harness": /* @__PURE__ */ new Set(["codex"]),
437159
+ "antigravity-harness": /* @__PURE__ */ new Set(["antigravity"])
437160
+ };
436896
437161
  }
436897
437162
  });
436898
437163
 
@@ -443448,7 +443713,9 @@ async function runOnboard(argv, dependencies, lifecycle = NO_LIFECYCLE) {
443448
443713
  const pausedAt = binding.reentered ? pausedStop(deps) : void 0;
443449
443714
  if (pausedAt !== void 0) {
443450
443715
  printRunId(deps, binding.runId);
443451
- deps.stdout.write(pausedRunStartNotice(pausedAt));
443716
+ deps.stdout.write(
443717
+ pausedRunStartNotice(pausedAt, await loadCliCommand(deps.loadPackageSpec))
443718
+ );
443452
443719
  return;
443453
443720
  }
443454
443721
  const startPrompt = binding.intent === parsed.values.intent ? requestedStartPrompt : await loadPromptForOutput(
@@ -443496,6 +443763,18 @@ async function runOnboard(argv, dependencies, lifecycle = NO_LIFECYCLE) {
443496
443763
  backupRecorder(deps, binding.runId)
443497
443764
  );
443498
443765
  }
443766
+ const underWayAt = binding.reentered ? stepUnderWay(deps, startPrompt.name) : void 0;
443767
+ if (underWayAt !== void 0) {
443768
+ printRunId(deps, binding.runId);
443769
+ deps.stdout.write(
443770
+ underWayStartNotice(
443771
+ underWayAt,
443772
+ await loadCliCommand(deps.loadPackageSpec)
443773
+ )
443774
+ );
443775
+ recordStartReentry(deps, binding.runId, underWayAt);
443776
+ return;
443777
+ }
443499
443778
  printRunId(deps, binding.runId);
443500
443779
  await printGraphTree(deps);
443501
443780
  if (folderNotice !== void 0)
@@ -445061,6 +445340,9 @@ ${PROOF_CHECK_USAGE}`
445061
445340
  )
445062
445341
  }
445063
445342
  );
445343
+ if (result2.checks.some((check4) => check4.id === "runtime-answers" && check4.status === "pass")) {
445344
+ recordBuildOnBuildRoute(dependencies, runId);
445345
+ }
445064
445346
  const failure = describeProofFailure(result2.firstFailure);
445065
445347
  keepProofFailureBestEffort(
445066
445348
  dependencies,
@@ -445448,17 +445730,29 @@ function checkpointsForRead(node, routeBefore) {
445448
445730
  if (node === "subagent/implement-and-validate" || FEATURE_IMPLEMENT_NODE.test(node)) {
445449
445731
  phases.push("plan-written");
445450
445732
  }
445451
- if (node === "proof/round-trip" && routeBefore.includes("implementation/build-and-validate") || FEATURE_PROOF_NODE.test(node) && routeBefore.some((served) => FEATURE_IMPLEMENT_NODE.test(served))) {
445733
+ if (FEATURE_PROOF_NODE.test(node) && routeBefore.some((served) => FEATURE_IMPLEMENT_NODE.test(served))) {
445452
445734
  phases.push("build-validated");
445453
445735
  }
445454
445736
  return phases;
445455
445737
  }
445738
+ function subagentBriefOf(node) {
445739
+ return SUBAGENT_BRIEFS.find((brief) => node === `subagent/${brief}`);
445740
+ }
445456
445741
  function recordReadCheckpoints(dependencies, runId, node, routeBefore) {
445457
445742
  for (const phase of checkpointsForRead(node, routeBefore)) {
445458
445743
  recordCheckpointPhase(dependencies, runId, phase);
445459
445744
  }
445745
+ const brief = subagentBriefOf(node);
445746
+ if (brief !== void 0) {
445747
+ recordCheckpointPhase(dependencies, runId, "subagent-dispatched", void 0, { brief });
445748
+ }
445749
+ }
445750
+ function recordBuildOnBuildRoute(dependencies, runId) {
445751
+ if (readRouteBestEffort(dependencies).includes(BUILD_NODE)) {
445752
+ recordCheckpointPhase(dependencies, runId, "build-validated");
445753
+ }
445460
445754
  }
445461
- function recordCheckpointPhase(dependencies, runId, phase, attempt, planStopReason) {
445755
+ function recordCheckpointPhase(dependencies, runId, phase, attempt, named = {}) {
445462
445756
  if (phase === "awaiting-developer" && readSetupMessageShown({ cwd: dependencies.cwd, store: dependencies.store })) {
445463
445757
  recordOnboardingCheckpoint(checkpointRecorder(dependencies), "welcome-sent");
445464
445758
  }
@@ -445466,7 +445760,10 @@ function recordCheckpointPhase(dependencies, runId, phase, attempt, planStopReas
445466
445760
  ...attempt === void 0 ? {} : { attempt },
445467
445761
  ...phase === "research-returned" ? { properties: observedStateProperties(dependencies) } : {},
445468
445762
  // Why the plan stopped (PE-778).
445469
- ...planStopReason === void 0 ? {} : { properties: { plan_stop_reason: planStopReason } }
445763
+ ...named.planStopReason === void 0 ? {} : { properties: { plan_stop_reason: named.planStopReason } },
445764
+ ...named.about === void 0 ? {} : { about: named.about },
445765
+ ...named.brief === void 0 ? {} : { brief: named.brief },
445766
+ ...named.result === void 0 ? {} : { result: named.result }
445470
445767
  });
445471
445768
  }
445472
445769
  async function fileCredentialsStopReport(dependencies, runId, stopReason) {
@@ -445574,7 +445871,10 @@ function reportCheckpoint(dependencies, runId, args) {
445574
445871
  parsed = parseOnboardArgs(dependencies.cwd, "checkpoint", args, {
445575
445872
  phase: { type: "string" },
445576
445873
  attempt: { type: "string" },
445577
- reason: { type: "string" }
445874
+ reason: { type: "string" },
445875
+ about: { type: "string" },
445876
+ brief: { type: "string" },
445877
+ result: { type: "string" }
445578
445878
  });
445579
445879
  } catch {
445580
445880
  return printCheckpointRefusal(dependencies, runId, {
@@ -445583,27 +445883,28 @@ function reportCheckpoint(dependencies, runId, args) {
445583
445883
  });
445584
445884
  }
445585
445885
  const reviewed = reviewCheckpoint({
445886
+ about: parsed.values.about,
445586
445887
  attempt: parsed.values.attempt,
445888
+ brief: parsed.values.brief,
445587
445889
  phase: parsed.values.phase,
445588
- reason: parsed.values.reason
445890
+ reason: parsed.values.reason,
445891
+ result: parsed.values.result
445589
445892
  });
445590
445893
  if (!reviewed.ok) {
445591
445894
  return printCheckpointRefusal(dependencies, runId, reviewed.refusal);
445592
445895
  }
445593
- recordCheckpointPhase(
445594
- dependencies,
445595
- runId,
445596
- reviewed.checkpoint.phase,
445597
- reviewed.checkpoint.attempt,
445598
- reviewed.checkpoint.planStopReason
445599
- );
445896
+ const { checkpoint: checkpoint2 } = reviewed;
445897
+ recordCheckpointPhase(dependencies, runId, checkpoint2.phase, checkpoint2.attempt, checkpoint2);
445898
+ if (checkpoint2.phase === "subagent-returned" && checkpoint2.brief === "implement-and-validate" && checkpoint2.result === "ok") {
445899
+ recordBuildOnBuildRoute(dependencies, runId);
445900
+ }
445600
445901
  dependencies.stdout.write("Checkpoint included in telemetry when enabled.\n");
445601
- if (reviewed.reasonRefusal !== void 0) {
445602
- recordReportRefused(dependencies, runId, "checkpoint", reviewed.reasonRefusal.code);
445603
- dependencies.stdout.write(
445604
- `${reviewed.reasonRefusal.code}: ${reviewed.reasonRefusal.message}
445605
- `
445606
- );
445902
+ for (const refusal of [reviewed.aboutRefusal, reviewed.reasonRefusal]) {
445903
+ if (refusal === void 0)
445904
+ continue;
445905
+ recordReportRefused(dependencies, runId, "checkpoint", refusal.code);
445906
+ dependencies.stdout.write(`${refusal.code}: ${refusal.message}
445907
+ `);
445607
445908
  }
445608
445909
  }
445609
445910
  function printCheckpointRefusal(dependencies, runId, refusal) {
@@ -446795,26 +447096,69 @@ async function loadPromptForOutput(dependencies, load2) {
446795
447096
  throw error98;
446796
447097
  }
446797
447098
  }
446798
- function pausedRunStartNotice(stop) {
447099
+ function pausedRunStartNotice(stop, cli) {
446799
447100
  return [
446800
447101
  `This run is paused at \`${stop}\`, so \`onboard start\` served nothing.`,
446801
- `Run \`copilotkit onboard read ${stop}\` to read the stop instructions again.`,
447102
+ `Run \`${cli} onboard read ${stop}\` to read the stop instructions again.`,
446802
447103
  "After the developer approves the fix, run",
446803
- '`copilotkit onboard resume --message "<the fix the developer approved>"`.',
447104
+ `\`${cli} onboard resume --message "<the fix the developer approved>"\`.`,
447105
+ ...startOverLines(cli),
447106
+ ""
447107
+ ].join("\n");
447108
+ }
447109
+ function startOverLines(cli) {
447110
+ return [
446804
447111
  "To drop this run and start over instead, ask the developer first, then run",
446805
- "`copilotkit onboard start --run <new-12-character-id>`.",
447112
+ `\`${cli} onboard start --run <new-12-character-id>\`.`
447113
+ ];
447114
+ }
447115
+ function underWayStartNotice(step, cli) {
447116
+ return [
447117
+ `This run is already at \`${step}\`, so \`onboard start\` served nothing.`,
447118
+ "The welcome is already sent. Do not send it again.",
447119
+ `Go on from that step. To read it again, run \`${cli} onboard read ${step}\`.`,
447120
+ `\`${cli} onboard route\` prints every step this run has served.`,
447121
+ "If this session did not read the earlier steps, their run-wide rules still hold:",
447122
+ "- Act only as the orchestrator. Give every project task to a subagent. Do a task yourself only when its subagent returns nothing usable.",
447123
+ "- Run each CLI call exactly as written, as its own command, from the directory this run is bound to.",
447124
+ "- Read only inside the target project.",
447125
+ "- To wait for a subagent or the developer, end your turn. Do not sleep.",
447126
+ `- Before a turn ends while the run is open, run \`${cli} onboard checkpoint --phase awaiting-developer --about <question>\`.`,
447127
+ `- Before you stop the run, run \`${cli} onboard friction --phase stop --category <slug> --message "<the step and what stopped it>"\`.`,
447128
+ `- \`${cli} onboard --help\` lists the values \`--about\` and \`--category\` take.`,
447129
+ ...startOverLines(cli),
446806
447130
  ""
446807
447131
  ].join("\n");
446808
447132
  }
447133
+ function recordStartReentry(deps, runId, step) {
447134
+ const route = readRouteBestEffort(deps);
447135
+ recordBestEffort(deps, {
447136
+ event: "cli.onboarding.prompt_served",
447137
+ properties: {
447138
+ command: "onboard",
447139
+ ...onboardingIntentProperties(deps),
447140
+ onboarding_run_id: runId,
447141
+ cli_version: deps.cliVersion,
447142
+ prompt_name: step,
447143
+ step_index: route.length,
447144
+ prompt_repeat: route.filter((node) => node === step).length + 1,
447145
+ reentry: "start"
447146
+ }
447147
+ });
447148
+ }
447149
+ function stepUnderWay(deps, startNode) {
447150
+ const step = readRouteBestEffort(deps).filter((node) => node !== startNode && !node.startsWith("subagent/")).at(-1);
447151
+ return step === void 0 || RUN_ENDINGS.has(step) ? void 0 : step;
447152
+ }
446809
447153
  function pausedStop(deps) {
446810
447154
  const last = readOnboardingRoute({ cwd: deps.cwd, store: deps.store }).at(-1);
446811
447155
  return last !== void 0 && RESUMABLE_TERMINALS.includes(last) ? last : void 0;
446812
447156
  }
446813
447157
  function servedMarkdown(dependencies, markdown) {
446814
- if (!hasSandboxedHarnessBlock(markdown))
447158
+ if (!hasHarnessBlock(markdown))
446815
447159
  return markdown;
446816
447160
  try {
446817
- return applySandboxedHarnessBlocks(
447161
+ return applyHarnessBlocks(
446818
447162
  markdown,
446819
447163
  detectRunningCodingAgent(dependencies).agent
446820
447164
  );
@@ -447145,7 +447489,7 @@ function recordBestEffort(dependencies, event) {
447145
447489
  } catch {
447146
447490
  }
447147
447491
  }
447148
- var import_onboarding_intents, ONBOARD_SUBCOMMANDS, ONBOARD_FLAG_OWNERS, NO_LIFECYCLE, OnboardExtraArgumentError, READ_USAGE, READ_RUN_NOT_BOUND, IDENTIFY_RUN_NOT_BOUND, STEP_RUN_NOT_BOUND, DECLINED_SURFACE_CHECK, CHANNELS_SURFACE_CHECK, NO_BROWSER_CHECK, BROWSER_ONLY_CHECKS, CHANNELS_LEG_PREFIX, LEARNING_LEG_PREFIX, LEARNING_INTENT, VISUAL_CHECK_OUTCOMES, DEVICE_CHECK_OUTCOMES, BLOCKER_CAUSES, BLOCKER_USAGE, SURFACE_CHECK_USAGE, FRONTEND_URL_USAGE, PROOF_STEPS, PROOF_OUTCOMES, BASELINE_PREDICATE_COUNT, PROOF_USAGE, IDENTIFY_USAGE, LOCAL_STACK_PRESENT, DEPLOYMENT_USAGE, LOCAL_TERMS_USAGE, LOCAL_TERMS_SETUP_LINE, SETUP_ANSWERS_USAGE, SETUP_APPROVALS, SETUP_LEARNING_CHOICES, CREDENTIAL_PARAMETER, HEX_ACCOUNT_ID, CLOUDFLARE_ACCOUNT_HOSTS, FRAMEWORK_NAME_MAX, SETUP_FRAMEWORK_REFUSAL, SETUP_BASE_URL_REFUSAL, SETUP_ENV_FILE_ANSWERS, SETUP_FRAMEWORK_CHOICES, SETUP_MESSAGE_USAGE, SETUP_LANGUAGES, SETUP_MESSAGE_VENDORS, FALLBACK_PROJECT_NAME, verifyFromDirectory, PROOF_CHECK_USAGE, PROOF_CHECK_REPEAT_LIMIT, UPGRADE_PLAN_USAGE, RUNTIME_URL_USAGE, ENV_LOCAL_REFUSAL, CREDENTIALS_USAGE, CREDENTIALS_STOP_TEXT, selectProjectFromDirectory, MODEL_KEY_SEVERITY, FEATURE_IMPLEMENT_NODE, FEATURE_PROOF_NODE, HELD_BACK_OUTCOME, EXISTING_AGENT_STATES, MODEL_KEY_GUIDANCE, MAX_UNPLACED_DEPENDENCIES, BLOCKER_REPORTS, ISOLATED_HOSTS, LISTED_SKIPPED_PATHS, INTENT_FEATURE_FOLDERS, RUN_ENDINGS, SIGN_IN_PROMPT, SIGN_IN_GATED_PROMPT, PROJECT_SELECTION_PROMPTS, CHILD_PROJECT_SCAN_ENTRIES;
447492
+ var import_onboarding_intents, ONBOARD_SUBCOMMANDS, ONBOARD_FLAG_OWNERS, NO_LIFECYCLE, OnboardExtraArgumentError, READ_USAGE, READ_RUN_NOT_BOUND, IDENTIFY_RUN_NOT_BOUND, STEP_RUN_NOT_BOUND, DECLINED_SURFACE_CHECK, CHANNELS_SURFACE_CHECK, NO_BROWSER_CHECK, BROWSER_ONLY_CHECKS, CHANNELS_LEG_PREFIX, LEARNING_LEG_PREFIX, LEARNING_INTENT, VISUAL_CHECK_OUTCOMES, DEVICE_CHECK_OUTCOMES, BLOCKER_CAUSES, BLOCKER_USAGE, SURFACE_CHECK_USAGE, FRONTEND_URL_USAGE, PROOF_STEPS, PROOF_OUTCOMES, BASELINE_PREDICATE_COUNT, PROOF_USAGE, IDENTIFY_USAGE, LOCAL_STACK_PRESENT, DEPLOYMENT_USAGE, LOCAL_TERMS_USAGE, LOCAL_TERMS_SETUP_LINE, SETUP_ANSWERS_USAGE, SETUP_APPROVALS, SETUP_LEARNING_CHOICES, CREDENTIAL_PARAMETER, HEX_ACCOUNT_ID, CLOUDFLARE_ACCOUNT_HOSTS, FRAMEWORK_NAME_MAX, SETUP_FRAMEWORK_REFUSAL, SETUP_BASE_URL_REFUSAL, SETUP_ENV_FILE_ANSWERS, SETUP_FRAMEWORK_CHOICES, SETUP_MESSAGE_USAGE, SETUP_LANGUAGES, SETUP_MESSAGE_VENDORS, FALLBACK_PROJECT_NAME, verifyFromDirectory, PROOF_CHECK_USAGE, PROOF_CHECK_REPEAT_LIMIT, UPGRADE_PLAN_USAGE, RUNTIME_URL_USAGE, ENV_LOCAL_REFUSAL, CREDENTIALS_USAGE, CREDENTIALS_STOP_TEXT, selectProjectFromDirectory, MODEL_KEY_SEVERITY, FEATURE_IMPLEMENT_NODE, FEATURE_PROOF_NODE, BUILD_NODE, HELD_BACK_OUTCOME, EXISTING_AGENT_STATES, MODEL_KEY_GUIDANCE, MAX_UNPLACED_DEPENDENCIES, BLOCKER_REPORTS, ISOLATED_HOSTS, LISTED_SKIPPED_PATHS, INTENT_FEATURE_FOLDERS, RUN_ENDINGS, SIGN_IN_PROMPT, SIGN_IN_GATED_PROMPT, PROJECT_SELECTION_PROMPTS, CHILD_PROJECT_SCAN_ENTRIES;
447149
447493
  var init_onboard = __esm({
447150
447494
  async "apps/cli/src/commands/onboard.ts"() {
447151
447495
  "use strict";
@@ -447235,12 +447579,14 @@ var init_onboard = __esm({
447235
447579
  "resume"
447236
447580
  ];
447237
447581
  ONBOARD_FLAG_OWNERS = {
447582
+ about: ["checkpoint"],
447238
447583
  agent: ["proof-check"],
447239
447584
  "agent-framework": ["classify"],
447240
447585
  attempt: ["checkpoint"],
447241
447586
  "base-url": ["setup-answers"],
447242
447587
  continue: ["tripwire"],
447243
447588
  "blocked-by": ["complete"],
447589
+ brief: ["checkpoint"],
447244
447590
  category: ["friction"],
447245
447591
  check: ["upgrade-plan"],
447246
447592
  choice: ["deployment"],
@@ -447288,6 +447634,7 @@ var init_onboard = __esm({
447288
447634
  predicate: ["proof"],
447289
447635
  project: ["start", "setup-answers", "credentials"],
447290
447636
  purpose: ["setup-answers"],
447637
+ result: ["checkpoint"],
447291
447638
  revert: ["upgrade-plan"],
447292
447639
  run: ["start", "restore"],
447293
447640
  "runtime-url": ["credentials"],
@@ -447424,6 +447771,7 @@ round trip has no numbered predicates at all.`;
447424
447771
  ];
447425
447772
  FEATURE_IMPLEMENT_NODE = /^feature\/[^/]+\/implement$/u;
447426
447773
  FEATURE_PROOF_NODE = /^feature\/[^/]+\/proof$/u;
447774
+ BUILD_NODE = "implementation/build-and-validate";
447427
447775
  HELD_BACK_OUTCOME = {
447428
447776
  "setup-answers": "Nothing was recorded.",
447429
447777
  credentials: "Nothing was checked or copied.",
@@ -451000,6 +451348,7 @@ Options:
451000
451348
  copilotkit onboard classify --starting-state <state> --agent-framework <framework> --frontend <frontend> [--model-vendor <vendor> --model-vendor-choice <choice>]
451001
451349
  copilotkit onboard tripwire --continue
451002
451350
  copilotkit onboard checkpoint --phase <slug> [--attempt <n>] [--reason <reasons>]
451351
+ [--about <question>] [--brief <name> --result <ok|refused|failed>]
451003
451352
  copilotkit onboard proof --step <oss-baseline|round-trip> --outcome <passed|failed|skipped>
451004
451353
  [--predicate <1-6>]
451005
451354
  copilotkit onboard complete
@@ -451126,9 +451475,19 @@ otherwise say nothing between one prompt and the next. --phase takes one of:
451126
451475
  welcome-sent, sign-in-settled,
451127
451476
  research-dispatched, surface-probed, research-returned, starter-cloned,
451128
451477
  plan-written, container-surveyed, container-settled, build-validated,
451129
- journey-attempted, repair-attempted, awaiting-developer,
451478
+ journey-attempted, repair-attempted, subagent-returned, awaiting-developer,
451130
451479
  awaiting-model-credential, awaiting-plan-approval, delegation-unavailable.
451131
451480
  Pass --attempt <1-9> where the step loops, so a repair cycle can be counted.
451481
+ Pass --about <question> with awaiting-developer to name what the run waits on:
451482
+ harness-permission, sign-in, setup-answers, stack-choice, project-name,
451483
+ which-project, env-file-tracked, local-connection, local-terms,
451484
+ existing-folder, environment-fix, uncommitted-file, agent-change,
451485
+ restore-files, thread-id, scoped-fix, feature-binding, other.
451486
+ subagent-returned records a subagent coming back, and takes both --brief
451487
+ <name> and --result <ok|refused|failed>. --brief names the subagent brief:
451488
+ inspect-repository, create-plan, implement-and-validate, prove-oss-baseline,
451489
+ prove-round-trip. Reading a subagent brief records its dispatch, so there is
451490
+ no phase to report for that.
451132
451491
  A refused checkpoint exits zero and prints the closed set. It is called from
451133
451492
  the middle of the longest step of a run, and a non-zero exit there reads as a
451134
451493
  broken build rather than a rejected ping.