agentplane 0.3.12 → 0.3.13

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 (180) hide show
  1. package/assets/RUNNER.md +1 -1
  2. package/assets/agents/ORCHESTRATOR.json +1 -1
  3. package/assets/codex-plugin/assets/header.png +0 -0
  4. package/assets/codex-plugin/assets/icon.svg +1 -0
  5. package/assets/codex-plugin/assets/logo.svg +1 -0
  6. package/assets/codex-plugin/skills/agentplane/SKILL.md +35 -0
  7. package/assets/policy/governance.md +4 -2
  8. package/assets/policy/incidents.md +3 -20
  9. package/assets/policy/workflow.release.md +5 -2
  10. package/dist/.build-manifest.json +203 -113
  11. package/dist/cli/exit-codes.d.ts.map +1 -1
  12. package/dist/cli/exit-codes.js +1 -0
  13. package/dist/cli/reason-codes.d.ts +1 -1
  14. package/dist/cli/reason-codes.d.ts.map +1 -1
  15. package/dist/cli/reason-codes.js +12 -0
  16. package/dist/cli/run-cli/command-catalog/core.d.ts +1 -1
  17. package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
  18. package/dist/cli/run-cli/command-catalog/core.js +16 -0
  19. package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
  20. package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -1
  21. package/dist/cli/run-cli/command-catalog/project.js +21 -3
  22. package/dist/cli/run-cli/command-catalog.d.ts +1 -1
  23. package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
  24. package/dist/cli/run-cli/commands/codex.d.ts +14 -0
  25. package/dist/cli/run-cli/commands/codex.d.ts.map +1 -0
  26. package/dist/cli/run-cli/commands/codex.js +100 -0
  27. package/dist/cli/run-cli/commands/core.d.ts +1 -0
  28. package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
  29. package/dist/cli/run-cli/commands/core.js +1 -0
  30. package/dist/cli/run-cli/commands/init/recipes.d.ts +9 -1
  31. package/dist/cli/run-cli/commands/init/recipes.d.ts.map +1 -1
  32. package/dist/cli/run-cli/commands/init/recipes.js +32 -22
  33. package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
  34. package/dist/cli/run-cli/commands/init.js +26 -21
  35. package/dist/cli/run-cli/error-guidance.js +20 -0
  36. package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
  37. package/dist/cli/run-cli.test-helpers.js +22 -19
  38. package/dist/commands/codex/plugin-install.d.ts +26 -0
  39. package/dist/commands/codex/plugin-install.d.ts.map +1 -0
  40. package/dist/commands/codex/plugin-install.js +209 -0
  41. package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
  42. package/dist/commands/pr/integrate/cmd.js +81 -5
  43. package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
  44. package/dist/commands/pr/integrate/internal/prepare.js +38 -7
  45. package/dist/commands/pr/internal/auto-commit.d.ts.map +1 -1
  46. package/dist/commands/pr/internal/auto-commit.js +11 -6
  47. package/dist/commands/pr/internal/sync.d.ts.map +1 -1
  48. package/dist/commands/pr/internal/sync.js +5 -1
  49. package/dist/commands/pr/open.d.ts.map +1 -1
  50. package/dist/commands/pr/open.js +46 -8
  51. package/dist/commands/recipes/active.command.d.ts +7 -0
  52. package/dist/commands/recipes/active.command.d.ts.map +1 -0
  53. package/dist/commands/recipes/active.command.js +12 -0
  54. package/dist/commands/recipes/add.command.d.ts +8 -0
  55. package/dist/commands/recipes/add.command.d.ts.map +1 -0
  56. package/dist/commands/recipes/add.command.js +33 -0
  57. package/dist/commands/recipes/detach.command.d.ts +7 -0
  58. package/dist/commands/recipes/detach.command.d.ts.map +1 -0
  59. package/dist/commands/recipes/detach.command.js +19 -0
  60. package/dist/commands/recipes/disable.command.d.ts +7 -0
  61. package/dist/commands/recipes/disable.command.d.ts.map +1 -0
  62. package/dist/commands/recipes/disable.command.js +10 -0
  63. package/dist/commands/recipes/enable.command.d.ts +7 -0
  64. package/dist/commands/recipes/enable.command.d.ts.map +1 -0
  65. package/dist/commands/recipes/enable.command.js +10 -0
  66. package/dist/commands/recipes/explain-active.command.d.ts +5 -0
  67. package/dist/commands/recipes/explain-active.command.d.ts.map +1 -0
  68. package/dist/commands/recipes/explain-active.command.js +11 -0
  69. package/dist/commands/recipes/explain.command.d.ts.map +1 -1
  70. package/dist/commands/recipes/explain.command.js +4 -2
  71. package/dist/commands/recipes/impl/apply.d.ts.map +1 -1
  72. package/dist/commands/recipes/impl/apply.js +33 -14
  73. package/dist/commands/recipes/impl/commands/active.d.ts +6 -0
  74. package/dist/commands/recipes/impl/commands/active.d.ts.map +1 -0
  75. package/dist/commands/recipes/impl/commands/active.js +46 -0
  76. package/dist/commands/recipes/impl/commands/add.d.ts +7 -0
  77. package/dist/commands/recipes/impl/commands/add.d.ts.map +1 -0
  78. package/dist/commands/recipes/impl/commands/add.js +100 -0
  79. package/dist/commands/recipes/impl/commands/detach.d.ts +6 -0
  80. package/dist/commands/recipes/impl/commands/detach.d.ts.map +1 -0
  81. package/dist/commands/recipes/impl/commands/detach.js +85 -0
  82. package/dist/commands/recipes/impl/commands/disable.d.ts +6 -0
  83. package/dist/commands/recipes/impl/commands/disable.d.ts.map +1 -0
  84. package/dist/commands/recipes/impl/commands/disable.js +21 -0
  85. package/dist/commands/recipes/impl/commands/enable.d.ts +6 -0
  86. package/dist/commands/recipes/impl/commands/enable.d.ts.map +1 -0
  87. package/dist/commands/recipes/impl/commands/enable.js +39 -0
  88. package/dist/commands/recipes/impl/commands/explain-active.d.ts +5 -0
  89. package/dist/commands/recipes/impl/commands/explain-active.d.ts.map +1 -0
  90. package/dist/commands/recipes/impl/commands/explain-active.js +20 -0
  91. package/dist/commands/recipes/impl/commands/explain.d.ts.map +1 -1
  92. package/dist/commands/recipes/impl/commands/explain.js +40 -3
  93. package/dist/commands/recipes/impl/commands/info.d.ts.map +1 -1
  94. package/dist/commands/recipes/impl/commands/info.js +21 -8
  95. package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
  96. package/dist/commands/recipes/impl/commands/install.js +32 -29
  97. package/dist/commands/recipes/impl/commands/list.d.ts.map +1 -1
  98. package/dist/commands/recipes/impl/commands/list.js +11 -11
  99. package/dist/commands/recipes/impl/commands/remove.d.ts.map +1 -1
  100. package/dist/commands/recipes/impl/commands/remove.js +5 -0
  101. package/dist/commands/recipes/impl/commands/update.d.ts +7 -0
  102. package/dist/commands/recipes/impl/commands/update.d.ts.map +1 -0
  103. package/dist/commands/recipes/impl/commands/update.js +93 -0
  104. package/dist/commands/recipes/impl/commands.d.ts +7 -0
  105. package/dist/commands/recipes/impl/commands.d.ts.map +1 -1
  106. package/dist/commands/recipes/impl/commands.js +7 -0
  107. package/dist/commands/recipes/impl/constants.d.ts +1 -14
  108. package/dist/commands/recipes/impl/constants.d.ts.map +1 -1
  109. package/dist/commands/recipes/impl/constants.js +1 -18
  110. package/dist/commands/recipes/impl/manifest.d.ts +2 -2
  111. package/dist/commands/recipes/impl/manifest.d.ts.map +1 -1
  112. package/dist/commands/recipes/impl/manifest.js +4 -226
  113. package/dist/commands/recipes/impl/overlay-project.d.ts +32 -0
  114. package/dist/commands/recipes/impl/overlay-project.d.ts.map +1 -0
  115. package/dist/commands/recipes/impl/overlay-project.js +282 -0
  116. package/dist/commands/recipes/impl/paths.d.ts +20 -2
  117. package/dist/commands/recipes/impl/paths.d.ts.map +1 -1
  118. package/dist/commands/recipes/impl/paths.js +23 -5
  119. package/dist/commands/recipes/impl/project-installed-recipes.d.ts +2 -4
  120. package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -1
  121. package/dist/commands/recipes/impl/project-installed-recipes.js +30 -74
  122. package/dist/commands/recipes/impl/project-recipe-state.d.ts +18 -0
  123. package/dist/commands/recipes/impl/project-recipe-state.d.ts.map +1 -0
  124. package/dist/commands/recipes/impl/project-recipe-state.js +94 -0
  125. package/dist/commands/recipes/impl/project-registry.d.ts +20 -0
  126. package/dist/commands/recipes/impl/project-registry.d.ts.map +1 -0
  127. package/dist/commands/recipes/impl/project-registry.js +104 -0
  128. package/dist/commands/recipes/impl/resolver.d.ts.map +1 -1
  129. package/dist/commands/recipes/impl/resolver.js +5 -3
  130. package/dist/commands/recipes/impl/types.d.ts +1 -240
  131. package/dist/commands/recipes/impl/types.d.ts.map +1 -1
  132. package/dist/commands/recipes/info.command.js +2 -2
  133. package/dist/commands/recipes/install.spec.js +4 -4
  134. package/dist/commands/recipes/list.command.js +4 -4
  135. package/dist/commands/recipes/remove.command.js +2 -2
  136. package/dist/commands/recipes/update.command.d.ts +8 -0
  137. package/dist/commands/recipes/update.command.d.ts.map +1 -0
  138. package/dist/commands/recipes/update.command.js +35 -0
  139. package/dist/commands/recipes.d.ts +7 -4
  140. package/dist/commands/recipes.d.ts.map +1 -1
  141. package/dist/commands/recipes.js +6 -3
  142. package/dist/commands/recipes.test-helpers.d.ts +3 -3
  143. package/dist/commands/recipes.test-helpers.d.ts.map +1 -1
  144. package/dist/commands/recipes.test-helpers.js +105 -15
  145. package/dist/commands/scenario/execute.command.js +4 -4
  146. package/dist/commands/scenario/impl/commands.js +4 -4
  147. package/dist/commands/scenario/info.command.js +4 -4
  148. package/dist/commands/scenario/list.command.js +3 -3
  149. package/dist/commands/scenario/run.command.js +5 -5
  150. package/dist/commands/scenario/scenario.command.js +7 -7
  151. package/dist/commands/shared/task-handoff.d.ts +2 -1
  152. package/dist/commands/shared/task-handoff.d.ts.map +1 -1
  153. package/dist/commands/shared/task-handoff.js +15 -0
  154. package/dist/commands/task/handoff-show.command.d.ts.map +1 -1
  155. package/dist/commands/task/handoff-show.command.js +24 -0
  156. package/dist/runner/context/base-prompts.d.ts +2 -1
  157. package/dist/runner/context/base-prompts.d.ts.map +1 -1
  158. package/dist/runner/context/base-prompts.js +109 -13
  159. package/dist/runner/context/recipe-context.d.ts.map +1 -1
  160. package/dist/runner/context/recipe-context.js +40 -8
  161. package/dist/runner/types.d.ts +4 -0
  162. package/dist/runner/types.d.ts.map +1 -1
  163. package/dist/runner/usecases/task-run.d.ts.map +1 -1
  164. package/dist/runner/usecases/task-run.js +2 -1
  165. package/dist/runtime/behavior/resolve.d.ts +2 -1
  166. package/dist/runtime/behavior/resolve.d.ts.map +1 -1
  167. package/dist/runtime/behavior/resolve.js +25 -5
  168. package/dist/runtime/behavior/types.d.ts +1 -0
  169. package/dist/runtime/behavior/types.d.ts.map +1 -1
  170. package/dist/runtime/capabilities/recipe.d.ts +2 -1
  171. package/dist/runtime/capabilities/recipe.d.ts.map +1 -1
  172. package/dist/runtime/capabilities/recipe.js +88 -28
  173. package/dist/shared/errors.d.ts +1 -1
  174. package/dist/shared/errors.d.ts.map +1 -1
  175. package/dist/shared/runtime-source.d.ts.map +1 -1
  176. package/dist/shared/runtime-source.js +8 -3
  177. package/package.json +3 -2
  178. package/dist/cli/recipes-bundled.d.ts +0 -10
  179. package/dist/cli/recipes-bundled.d.ts.map +0 -1
  180. package/dist/cli/recipes-bundled.js +0 -36
@@ -1,21 +1,24 @@
1
1
  import { generateKeyPairSync, sign } from "node:crypto";
2
- import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
2
+ import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
5
5
  import { afterEach, beforeEach, vi } from "vitest";
6
- import { cmdRecipeCachePruneParsed, cmdRecipeExplainParsed, cmdRecipeInfoParsed, cmdRecipeInstall, cmdRecipeListParsed, cmdRecipeListRemoteParsed, cmdRecipeRemoveParsed, } from "./recipes.js";
6
+ import { cmdRecipeAddParsed, cmdRecipeCachePruneParsed, cmdRecipeDetachParsed, cmdRecipeExplainParsed, cmdRecipeInfoParsed, cmdRecipeInstall, cmdRecipeListParsed, cmdRecipeListRemoteParsed, cmdRecipeRemoveParsed, cmdRecipeUpdateParsed, hashRecipeTree, } from "./recipes.js";
7
7
  import { cmdScenarioInfoParsed, cmdScenarioListParsed, cmdScenarioRunParsed } from "./scenario.js";
8
8
  import { exitCodeForError } from "../cli/exit-codes.js";
9
9
  import { parseCommandArgv } from "../cli/spec/parse.js";
10
10
  import { captureStdIO, createRecipeArchive, mkGitRepoRoot, writeDefaultConfig, } from "../cli/run-cli.test-helpers.js";
11
11
  import { CliError } from "../shared/errors.js";
12
12
  import { recipesCachePruneSpec } from "./recipes/cache-prune.command.js";
13
+ import { recipesAddSpec } from "./recipes/add.command.js";
13
14
  import { recipesExplainSpec } from "./recipes/explain.command.js";
14
15
  import { recipesInfoSpec } from "./recipes/info.command.js";
15
16
  import { recipesInstallSpec } from "./recipes/install.spec.js";
16
17
  import { recipesListRemoteSpec } from "./recipes/list-remote.command.js";
17
18
  import { recipesListSpec } from "./recipes/list.command.js";
19
+ import { recipesDetachSpec } from "./recipes/detach.command.js";
18
20
  import { recipesRemoveSpec } from "./recipes/remove.command.js";
21
+ import { recipesUpdateSpec } from "./recipes/update.command.js";
19
22
  import { scenarioInfoSpec } from "./scenario/info.command.js";
20
23
  import { scenarioListSpec } from "./scenario/list.command.js";
21
24
  import { scenarioRunSpec } from "./scenario/run.command.js";
@@ -73,16 +76,25 @@ export async function writeSignedIndex(indexPath, payload) {
73
76
  await writeFile(`${indexPath}.sig`, JSON.stringify(signature, null, 2), "utf8");
74
77
  }
75
78
  export function resolveProjectRecipeDir(projectDir, recipeId) {
76
- return path.join(projectDir, ".agentplane", "recipes", recipeId);
79
+ return path.join(projectDir, ".agentplane", "recipes", "packages", recipeId);
80
+ }
81
+ export function resolveProjectRecipesRegistryPath(projectDir) {
82
+ return path.join(projectDir, ".agentplane", "recipes", "registry.json");
77
83
  }
78
84
  function readStringFixtureValue(record, key, fallback) {
79
85
  const value = record[key];
80
86
  return typeof value === "string" ? value : fallback;
81
87
  }
82
88
  export async function writeInstalledRecipes(projectDir, recipes) {
83
- const recipesDir = path.join(projectDir, ".agentplane", "recipes");
89
+ const recipesHome = requireRecipesTempHome();
90
+ const recipesDir = path.join(recipesHome, "recipes-store");
84
91
  await rm(recipesDir, { recursive: true, force: true });
85
92
  await mkdir(recipesDir, { recursive: true });
93
+ const vendoredRecipesDir = path.join(projectDir, ".agentplane", "recipes", "packages");
94
+ await rm(vendoredRecipesDir, { recursive: true, force: true });
95
+ await mkdir(vendoredRecipesDir, { recursive: true });
96
+ const cachedEntries = [];
97
+ const registryEntries = [];
86
98
  for (const entry of recipes) {
87
99
  const record = entry;
88
100
  const manifest = record.manifest;
@@ -95,18 +107,20 @@ export async function writeInstalledRecipes(projectDir, recipes) {
95
107
  : Array.isArray(manifest.tags)
96
108
  ? manifest.tags
97
109
  : [];
98
- const recipeDir = resolveProjectRecipeDir(projectDir, recipeId);
110
+ const recipeDir = path.join(recipesDir, recipeId, recipeVersion);
99
111
  await mkdir(recipeDir, { recursive: true });
100
112
  await writeFile(path.join(recipeDir, "manifest.json"), JSON.stringify(manifest, null, 2), "utf8");
101
- await writeFile(path.join(recipeDir, ".install.json"), JSON.stringify({
102
- schema_version: 1,
113
+ const vendoredRecipeDir = resolveProjectRecipeDir(projectDir, recipeId);
114
+ await mkdir(vendoredRecipeDir, { recursive: true });
115
+ await writeFile(path.join(vendoredRecipeDir, "manifest.json"), JSON.stringify(manifest, null, 2), "utf8");
116
+ cachedEntries.push({
103
117
  id: recipeId,
104
118
  version: recipeVersion,
105
119
  source,
106
120
  installed_at: installedAt,
107
121
  tags,
108
- install_mode: "project-local",
109
- }, null, 2), "utf8");
122
+ manifest,
123
+ });
110
124
  const scenarios = Array.isArray(manifest.scenarios)
111
125
  ? manifest.scenarios.filter((scenario) => !!scenario && typeof scenario === "object")
112
126
  : [];
@@ -124,8 +138,10 @@ export async function writeInstalledRecipes(projectDir, recipes) {
124
138
  ? scenario.required_inputs.filter((entry) => typeof entry === "string")
125
139
  : [];
126
140
  const scenarioPath = path.join(recipeDir, scenarioFile);
141
+ const vendoredScenarioPath = path.join(vendoredRecipeDir, scenarioFile);
127
142
  await mkdir(path.dirname(scenarioPath), { recursive: true });
128
- await writeFile(scenarioPath, JSON.stringify({
143
+ await mkdir(path.dirname(vendoredScenarioPath), { recursive: true });
144
+ const scenarioPayload = JSON.stringify({
129
145
  schema_version: "1",
130
146
  id: scenarioId,
131
147
  summary: scenarioSummary,
@@ -138,9 +154,44 @@ export async function writeInstalledRecipes(projectDir, recipes) {
138
154
  inputs: scenarioInputs.map((name) => ({ name, type: "string" })),
139
155
  outputs: scenarioOutputs.map((name) => ({ name, type: "string" })),
140
156
  steps: [],
141
- }, null, 2), "utf8");
157
+ }, null, 2);
158
+ await writeFile(scenarioPath, scenarioPayload, "utf8");
159
+ await writeFile(vendoredScenarioPath, scenarioPayload, "utf8");
160
+ }
161
+ const tools = Array.isArray(manifest.tools)
162
+ ? manifest.tools.filter((tool) => !!tool && typeof tool === "object")
163
+ : [];
164
+ for (const tool of tools) {
165
+ const entrypoint = readStringFixtureValue(tool, "entrypoint", "").trim();
166
+ if (!entrypoint)
167
+ continue;
168
+ const toolSource = "console.log('ok');\n";
169
+ const toolPath = path.join(recipeDir, entrypoint);
170
+ const vendoredToolPath = path.join(vendoredRecipeDir, entrypoint);
171
+ await mkdir(path.dirname(toolPath), { recursive: true });
172
+ await mkdir(path.dirname(vendoredToolPath), { recursive: true });
173
+ await writeFile(toolPath, toolSource, "utf8");
174
+ await writeFile(vendoredToolPath, toolSource, "utf8");
142
175
  }
176
+ registryEntries.push({
177
+ id: recipeId,
178
+ version: recipeVersion,
179
+ path: `packages/${recipeId}`,
180
+ active: false,
181
+ materialization: "copy",
182
+ source_ref: source,
183
+ source_sha256: await hashRecipeTree(recipeDir),
184
+ vendored_sha256: await hashRecipeTree(vendoredRecipeDir),
185
+ installed_at: installedAt,
186
+ tags,
187
+ });
143
188
  }
189
+ await writeInstalledRecipesRegistry(cachedEntries);
190
+ await writeFile(resolveProjectRecipesRegistryPath(projectDir), JSON.stringify({
191
+ schema_version: 1,
192
+ updated_at: "2026-02-05T00:00:00Z",
193
+ recipes: registryEntries,
194
+ }, null, 2), "utf8");
144
195
  }
145
196
  export async function writeInstalledRecipesRegistry(recipes) {
146
197
  const recipesHome = requireRecipesTempHome();
@@ -155,8 +206,7 @@ export function skillEntry(overrides) {
155
206
  return {
156
207
  id: "RECIPE_SKILL",
157
208
  summary: "Recipe skill",
158
- kind: "agent-skill",
159
- file: "skills/recipe.json",
209
+ file: "skills/recipe.md",
160
210
  ...overrides,
161
211
  };
162
212
  }
@@ -177,7 +227,7 @@ export function agentEntry(overrides) {
177
227
  summary: "Recipe agent",
178
228
  skills: ["RECIPE_SKILL"],
179
229
  tools: ["RECIPE_TOOL"],
180
- file: "agents/recipe.json",
230
+ file: "agents/recipe.md",
181
231
  ...overrides,
182
232
  };
183
233
  }
@@ -247,6 +297,20 @@ export async function installRecipe(opts) {
247
297
  command: "install",
248
298
  args: ["--path", archivePath],
249
299
  });
300
+ if (opts.vendor ?? true) {
301
+ const recipesHome = process.env.AGENTPLANE_HOME?.trim() ?? requireRecipesTempHome();
302
+ const installed = JSON.parse(await readFile(path.join(recipesHome, "recipes.json"), "utf8"));
303
+ const latest = installed.recipes?.at(-1);
304
+ if (!latest)
305
+ throw new Error("cached recipe registry unexpectedly empty after install");
306
+ await runRecipesTest({
307
+ cwd: opts.projectDir,
308
+ command: "add",
309
+ args: opts.mode
310
+ ? [`${latest.id}@${latest.version}`, "--mode", opts.mode]
311
+ : [`${latest.id}@${latest.version}`],
312
+ });
313
+ }
250
314
  }
251
315
  finally {
252
316
  io.restore();
@@ -271,7 +335,7 @@ export async function createInstalledRecipeProject(opts = {}) {
271
335
  };
272
336
  }
273
337
  export function resolveInstalledScenarioPath(projectDir, recipeId, scenarioFile = path.join("scenarios", "recipe-scenario.json")) {
274
- return path.join(projectDir, ".agentplane", "recipes", recipeId, scenarioFile);
338
+ return path.join(projectDir, ".agentplane", "recipes", "packages", recipeId, scenarioFile);
275
339
  }
276
340
  export async function runRecipesTest(opts) {
277
341
  if (!opts.command) {
@@ -318,6 +382,15 @@ export async function runRecipesTest(opts) {
318
382
  const parsed = parseCommandArgv(recipesInstallSpec, opts.args).parsed;
319
383
  return await cmdRecipeInstall({ cwd: opts.cwd, rootOverride: opts.rootOverride, ...parsed });
320
384
  }
385
+ case "add": {
386
+ const parsed = parseCommandArgv(recipesAddSpec, opts.args).parsed;
387
+ return await cmdRecipeAddParsed({
388
+ cwd: opts.cwd,
389
+ rootOverride: opts.rootOverride,
390
+ recipeRef: parsed.recipeRef,
391
+ mode: parsed.mode,
392
+ });
393
+ }
321
394
  case "remove": {
322
395
  const parsed = parseCommandArgv(recipesRemoveSpec, opts.args).parsed;
323
396
  return await cmdRecipeRemoveParsed({
@@ -326,6 +399,23 @@ export async function runRecipesTest(opts) {
326
399
  id: parsed.id,
327
400
  });
328
401
  }
402
+ case "update": {
403
+ const parsed = parseCommandArgv(recipesUpdateSpec, opts.args).parsed;
404
+ return await cmdRecipeUpdateParsed({
405
+ cwd: opts.cwd,
406
+ rootOverride: opts.rootOverride,
407
+ id: parsed.id,
408
+ force: parsed.force,
409
+ });
410
+ }
411
+ case "detach": {
412
+ const parsed = parseCommandArgv(recipesDetachSpec, opts.args).parsed;
413
+ return await cmdRecipeDetachParsed({
414
+ cwd: opts.cwd,
415
+ rootOverride: opts.rootOverride,
416
+ id: parsed.id,
417
+ });
418
+ }
329
419
  case "cache": {
330
420
  const [sub, ...tail] = opts.args;
331
421
  if (sub !== "prune") {
@@ -10,14 +10,14 @@ import { cmdTaskStartReady } from "../task/start-ready.js";
10
10
  import { CliError } from "../../shared/errors.js";
11
11
  const output = createCliEmitter();
12
12
  export const scenarioExecuteSpec = {
13
- id: ["scenario", "execute"],
14
- group: "Scenario",
13
+ id: ["recipes", "scenario", "execute"],
14
+ group: "Recipes",
15
15
  summary: "Materialize a recipe-backed task and execute it through the shared runner flow.",
16
16
  description: "Resolves a recipe scenario, materializes a task from its explicit task_template, and executes the shared runner with recipe context bundled alongside the created task.",
17
17
  args: [{ name: "id", required: true, valueHint: "<recipe:scenario>" }],
18
18
  examples: [
19
19
  {
20
- cmd: "agentplane scenario execute viewer:demo",
20
+ cmd: "agentplane recipes scenario execute viewer:demo",
21
21
  why: "Create a task from the scenario template and execute it through the configured runner.",
22
22
  },
23
23
  ],
@@ -27,7 +27,7 @@ export const scenarioExecuteSpec = {
27
27
  if (!recipeId || !scenarioId) {
28
28
  throw usageError({
29
29
  spec: scenarioExecuteSpec,
30
- command: "scenario execute",
30
+ command: "recipes scenario execute",
31
31
  message: `Invalid scenario id: ${id} (expected: <recipe:scenario>)`,
32
32
  });
33
33
  }
@@ -187,7 +187,7 @@ export async function cmdScenarioListParsed(opts) {
187
187
  catch (err) {
188
188
  if (err instanceof CliError)
189
189
  throw err;
190
- throw mapCoreError(err, { command: "scenario list", root: opts.rootOverride ?? null });
190
+ throw mapCoreError(err, { command: "recipes scenario list", root: opts.rootOverride ?? null });
191
191
  }
192
192
  }
193
193
  export async function cmdScenarioInfoParsed(opts) {
@@ -225,7 +225,7 @@ export async function cmdScenarioInfoParsed(opts) {
225
225
  catch (err) {
226
226
  if (err instanceof CliError)
227
227
  throw err;
228
- throw mapCoreError(err, { command: "scenario info", root: opts.rootOverride ?? null });
228
+ throw mapCoreError(err, { command: "recipes scenario info", root: opts.rootOverride ?? null });
229
229
  }
230
230
  }
231
231
  export async function executeRecipeTool(opts) {
@@ -297,13 +297,13 @@ export async function cmdScenarioRunParsed(opts) {
297
297
  ...validationChecks,
298
298
  ]);
299
299
  output.line("Status: preview only; no task created and no runner executed.");
300
- output.line(`Next: use \`agentplane scenario execute ${selection.recipe_id}:${selection.scenario_id}\` ` +
300
+ output.line(`Next: use \`agentplane recipes scenario execute ${selection.recipe_id}:${selection.scenario_id}\` ` +
301
301
  "to materialize and run this scenario.");
302
302
  return 0;
303
303
  }
304
304
  catch (err) {
305
305
  if (err instanceof CliError)
306
306
  throw err;
307
- throw mapCoreError(err, { command: "scenario run", root: opts.rootOverride ?? null });
307
+ throw mapCoreError(err, { command: "recipes scenario run", root: opts.rootOverride ?? null });
308
308
  }
309
309
  }
@@ -1,13 +1,13 @@
1
1
  import { usageError } from "../../cli/spec/errors.js";
2
2
  import { cmdScenarioInfoParsed } from "../scenario.js";
3
3
  export const scenarioInfoSpec = {
4
- id: ["scenario", "info"],
5
- group: "Scenario",
4
+ id: ["recipes", "scenario", "info"],
5
+ group: "Recipes",
6
6
  summary: "Show manifest-backed scenario details and normalized run profile.",
7
7
  args: [{ name: "id", required: true, valueHint: "<recipe:scenario>" }],
8
8
  examples: [
9
9
  {
10
- cmd: "agentplane scenario info viewer:demo",
10
+ cmd: "agentplane recipes scenario info viewer:demo",
11
11
  why: "Inspect resolver-backed scenario metadata before execution.",
12
12
  },
13
13
  ],
@@ -17,7 +17,7 @@ export const scenarioInfoSpec = {
17
17
  if (!recipeId || !scenarioId) {
18
18
  throw usageError({
19
19
  spec: scenarioInfoSpec,
20
- command: "scenario info",
20
+ command: "recipes scenario info",
21
21
  message: `Invalid scenario id: ${id} (expected: <recipe:scenario>)`,
22
22
  });
23
23
  }
@@ -1,9 +1,9 @@
1
1
  import { cmdScenarioListParsed } from "../scenario.js";
2
2
  export const scenarioListSpec = {
3
- id: ["scenario", "list"],
4
- group: "Scenario",
3
+ id: ["recipes", "scenario", "list"],
4
+ group: "Recipes",
5
5
  summary: "List resolver-backed scenario descriptors from installed recipes.",
6
6
  parse: () => ({}),
7
- examples: [{ cmd: "agentplane scenario list", why: "List available recipe scenarios." }],
7
+ examples: [{ cmd: "agentplane recipes scenario list", why: "List available recipe scenarios." }],
8
8
  };
9
9
  export const runScenarioList = (ctx) => cmdScenarioListParsed({ cwd: ctx.cwd, rootOverride: ctx.rootOverride });
@@ -1,14 +1,14 @@
1
1
  import { usageError } from "../../cli/spec/errors.js";
2
2
  import { cmdScenarioRunParsed } from "../scenario.js";
3
3
  export const scenarioRunSpec = {
4
- id: ["scenario", "run"],
5
- group: "Scenario",
4
+ id: ["recipes", "scenario", "run"],
5
+ group: "Recipes",
6
6
  summary: "Preview a validated scenario plan without creating a task or running a runner.",
7
7
  args: [{ name: "id", required: true, valueHint: "<recipe:scenario>" }],
8
8
  examples: [
9
9
  {
10
- cmd: "agentplane scenario run viewer:demo",
11
- why: "Validate a scenario and inspect the preview plan before `scenario execute`.",
10
+ cmd: "agentplane recipes scenario run viewer:demo",
11
+ why: "Validate a scenario and inspect the preview plan before `recipes scenario execute`.",
12
12
  },
13
13
  ],
14
14
  parse: (raw) => {
@@ -17,7 +17,7 @@ export const scenarioRunSpec = {
17
17
  if (!recipeId || !scenarioId) {
18
18
  throw usageError({
19
19
  spec: scenarioRunSpec,
20
- command: "scenario run",
20
+ command: "recipes scenario run",
21
21
  message: `Invalid scenario id: ${id} (expected: <recipe:scenario>)`,
22
22
  });
23
23
  }
@@ -1,9 +1,9 @@
1
1
  import { loadDirectSubcommandNames, parseGroupCommand, throwGroupCommandUsage, } from "../../cli/group-command.js";
2
2
  export const scenarioSpec = {
3
- id: ["scenario"],
4
- group: "Scenario",
3
+ id: ["recipes", "scenario"],
4
+ group: "Recipes",
5
5
  summary: "Recipe scenario commands.",
6
- synopsis: ["agentplane scenario <subcommand> [options]"],
6
+ synopsis: ["agentplane recipes scenario <subcommand> [options]"],
7
7
  args: [{ name: "subcommand", required: false, variadic: true, valueHint: "<subcommand>" }],
8
8
  parse: (raw) => parseGroupCommand(raw, "subcommand"),
9
9
  };
@@ -11,9 +11,9 @@ export const runScenario = async (_ctx, p) => {
11
11
  throwGroupCommandUsage({
12
12
  spec: scenarioSpec,
13
13
  cmd: p.cmd,
14
- subcommands: await loadDirectSubcommandNames(["scenario"]),
15
- command: "scenario",
16
- missingMessage: "Missing scenario subcommand.",
17
- unknownMessage: (subcommand) => `Unknown scenario subcommand: ${subcommand}.`,
14
+ subcommands: await loadDirectSubcommandNames(["recipes", "scenario"]),
15
+ command: "recipes scenario",
16
+ missingMessage: "Missing recipes scenario subcommand.",
17
+ unknownMessage: (subcommand) => `Unknown recipes scenario subcommand: ${subcommand}.`,
18
18
  });
19
19
  };
@@ -1,4 +1,4 @@
1
- import { type TaskHandoff, type TaskHandoffRunnerNextAction, type TaskHandoffRunnerState } from "@agentplaneorg/core";
1
+ import { type TaskHandoff, type TaskHandoffRoute, type TaskHandoffRunnerNextAction, type TaskHandoffRunnerState } from "@agentplaneorg/core";
2
2
  import type { CommandContext } from "./task-backend.js";
3
3
  export type TaskHandoffArtifact = TaskHandoff;
4
4
  export type TaskHandoffRunnerHint = TaskHandoffRunnerState;
@@ -46,6 +46,7 @@ export declare function buildTaskHandoffArtifact(opts: {
46
46
  workspace_root?: string | null;
47
47
  pr_branch?: string | null;
48
48
  runner?: TaskHandoffRunnerHint | undefined;
49
+ route?: TaskHandoffRoute | undefined;
49
50
  next_actions?: string[] | undefined;
50
51
  risks?: string[] | undefined;
51
52
  open_questions?: string[] | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"task-handoff.d.ts","sourceRoot":"","sources":["../../../src/commands/shared/task-handoff.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAC;AAI7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAC9C,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,CAAC;AAE3D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAaF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,gBAAgB,CAOnB;AAED,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CASrC;AAED,wBAAsB,6BAA6B,CAAC,IAAI,EAAE;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,gBAAgB,CAAC;CACzB,GAAG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MAAM,GAAG,IAAI,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC3C,KAAK,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACvC,GAAG,mBAAmB,CAqBtB;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,GAAG;IACF,WAAW,EAAE,2BAA2B,CAAC;IACzC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CA8CA"}
@@ -14,6 +14,20 @@ function normalizeStringList(values) {
14
14
  const normalized = values.map((value) => value.trim()).filter((value) => value.length > 0);
15
15
  return normalized.length > 0 ? normalized : undefined;
16
16
  }
17
+ function normalizeRoute(route) {
18
+ if (!route)
19
+ return undefined;
20
+ return {
21
+ kind: route.kind,
22
+ status: route.status ?? undefined,
23
+ local_mutation: route.local_mutation ?? undefined,
24
+ finalize_via: route.finalize_via ?? undefined,
25
+ pr_number: typeof route.pr_number === "number" && route.pr_number > 0 ? route.pr_number : null,
26
+ pr_url: trimOrNull(route.pr_url) ?? undefined,
27
+ handoff_show_command: trimOrNull(route.handoff_show_command) ?? undefined,
28
+ base_pull_command: trimOrNull(route.base_pull_command) ?? undefined,
29
+ };
30
+ }
17
31
  export function resolveTaskHandoffPaths(opts) {
18
32
  const handoff_dir = path.join(opts.git_root, opts.workflow_dir, opts.task_id, "handoff");
19
33
  return {
@@ -96,6 +110,7 @@ export function buildTaskHandoffArtifact(opts) {
96
110
  workspace_root: trimOrNull(opts.workspace_root),
97
111
  pr_branch: trimOrNull(opts.pr_branch),
98
112
  runner: opts.runner,
113
+ route: normalizeRoute(opts.route),
99
114
  next_actions: normalizeStringList(opts.next_actions),
100
115
  risks: normalizeStringList(opts.risks),
101
116
  open_questions: normalizeStringList(opts.open_questions),
@@ -1 +1 @@
1
- {"version":3,"file":"handoff-show.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/handoff-show.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAOtE,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,qBAAqB,CAiBlE,CAAC;AAIF,eAAO,MAAM,kBAAkB,GAAU,KAAK,UAAU,EAAE,QAAQ,qBAAqB,oBAsDtF,CAAC"}
1
+ {"version":3,"file":"handoff-show.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/handoff-show.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAOtE,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,qBAAqB,CAiBlE,CAAC;AAIF,eAAO,MAAM,kBAAkB,GAAU,KAAK,UAAU,EAAE,QAAQ,qBAAqB,oBA2EtF,CAAC"}
@@ -52,6 +52,30 @@ export const runTaskHandoffShow = async (ctx, parsed) => {
52
52
  entries.push({ label: "head_sha", value: handoff.head_sha });
53
53
  if (handoff.pr_branch)
54
54
  entries.push({ label: "pr_branch", value: handoff.pr_branch });
55
+ if (handoff.route?.kind)
56
+ entries.push({ label: "route_kind", value: handoff.route.kind });
57
+ if (handoff.route?.status)
58
+ entries.push({ label: "route_status", value: handoff.route.status });
59
+ if (handoff.route?.local_mutation) {
60
+ entries.push({ label: "route_local_mutation", value: handoff.route.local_mutation });
61
+ }
62
+ if (handoff.route?.finalize_via) {
63
+ entries.push({ label: "route_finalize_via", value: handoff.route.finalize_via });
64
+ }
65
+ if (typeof handoff.route?.pr_number === "number") {
66
+ entries.push({ label: "route_pr_number", value: String(handoff.route.pr_number) });
67
+ }
68
+ if (handoff.route?.pr_url)
69
+ entries.push({ label: "route_pr_url", value: handoff.route.pr_url });
70
+ if (handoff.route?.handoff_show_command) {
71
+ entries.push({
72
+ label: "route_handoff_show_command",
73
+ value: handoff.route.handoff_show_command,
74
+ });
75
+ }
76
+ if (handoff.route?.base_pull_command) {
77
+ entries.push({ label: "route_base_pull_command", value: handoff.route.base_pull_command });
78
+ }
55
79
  if (handoff.runner?.run_id) {
56
80
  entries.push({ label: "run_id", value: handoff.runner.run_id }, { label: "runner_status", value: handoff.runner.status ?? "unknown" }, { label: "runner_next_action", value: handoff.runner.next_action ?? "none" });
57
81
  if (handoff.runner.next_command) {
@@ -2,7 +2,7 @@ import { type ResolvedBehavior } from "../../runtime/behavior/index.js";
2
2
  import { type PolicyGatewayFlavor } from "../../shared/policy-gateway.js";
3
3
  import type { ResolvedExecutionProfileRuntime } from "../../runtime/execution-profile/index.js";
4
4
  import type { ResolvedHarnessContract } from "../../runtime/harness/index.js";
5
- import type { RunnerPromptBlock, RunnerRecipeContext } from "../types.js";
5
+ import type { RunnerPromptBlock, RunnerRecipeContext, RunnerTaskContext } from "../types.js";
6
6
  type PromptSourcePayload = {
7
7
  source: string;
8
8
  title: string;
@@ -27,6 +27,7 @@ export declare function collectRunnerBasePrompts(opts: {
27
27
  owner_id: string;
28
28
  agents_dir?: string;
29
29
  fallback_policy_gateway_flavor?: PolicyGatewayFlavor;
30
+ task?: RunnerTaskContext;
30
31
  recipe?: RunnerRecipeContext;
31
32
  harness?: ResolvedHarnessContract;
32
33
  execution_profile?: ResolvedExecutionProfileRuntime;
@@ -1 +1 @@
1
- {"version":3,"file":"base-prompts.d.ts","sourceRoot":"","sources":["../../../src/runner/context/base-prompts.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAC;AAChG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAoB,mBAAmB,EAAE,MAAM,aAAa,CAAC;AA8D5F,KAAK,mBAAmB,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,oBAAoB,GAAG,gBAAgB,CAAC,mBAAmB,EAAE,yBAAyB,CAAC,CAAC;AAmD7F,wBAAsB,+BAA+B,CAAC,IAAI,EAAE;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA2ChC;AAwCD,wBAAsB,gCAAgC,CAAC,IAAI,EAAE;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,mBAAmB,CAAC;IACrC,OAAO,CAAC,EAAE,uBAA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