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
@@ -6,16 +6,74 @@ function source(entry) {
6
6
  };
7
7
  }
8
8
  function scenarioCapabilityId(recipeId, scenarioId) {
9
- return `recipe.${recipeId}.scenario.${scenarioId}`;
9
+ return `recipe:${recipeId}/scenario:${scenarioId}`;
10
10
  }
11
11
  function agentCapabilityId(recipeId, agentId) {
12
- return `recipe.${recipeId}.agent.${agentId}`;
12
+ return `recipe:${recipeId}/agent:${agentId}`;
13
13
  }
14
14
  function skillCapabilityId(recipeId, skillId) {
15
- return `recipe.${recipeId}.skill.${skillId}`;
15
+ return `recipe:${recipeId}/skill:${skillId}`;
16
16
  }
17
17
  function toolCapabilityId(recipeId, toolId) {
18
- return `recipe.${recipeId}.tool.${toolId}`;
18
+ return `recipe:${recipeId}/tool:${toolId}`;
19
+ }
20
+ function toFallbackAssets(entry) {
21
+ const assets = [];
22
+ for (const scenario of entry.manifest.scenarios ?? []) {
23
+ assets.push({
24
+ id: scenarioCapabilityId(entry.id, scenario.id),
25
+ kind: "scenario",
26
+ recipe_id: entry.id,
27
+ recipe_version: entry.version,
28
+ recipe_name: entry.manifest.name,
29
+ asset_id: scenario.id,
30
+ source: scenario.file,
31
+ summary: scenario.summary,
32
+ definition: scenario,
33
+ });
34
+ }
35
+ for (const agent of entry.manifest.agents ?? []) {
36
+ assets.push({
37
+ id: agentCapabilityId(entry.id, agent.id),
38
+ kind: "agent",
39
+ recipe_id: entry.id,
40
+ recipe_version: entry.version,
41
+ recipe_name: entry.manifest.name,
42
+ asset_id: agent.id,
43
+ source: agent.file,
44
+ summary: agent.summary,
45
+ definition: agent,
46
+ content: "",
47
+ });
48
+ }
49
+ for (const skill of entry.manifest.skills ?? []) {
50
+ assets.push({
51
+ id: skillCapabilityId(entry.id, skill.id),
52
+ kind: "skill",
53
+ recipe_id: entry.id,
54
+ recipe_version: entry.version,
55
+ recipe_name: entry.manifest.name,
56
+ asset_id: skill.id,
57
+ source: skill.file,
58
+ summary: skill.summary,
59
+ definition: skill,
60
+ content: "",
61
+ });
62
+ }
63
+ for (const tool of entry.manifest.tools ?? []) {
64
+ assets.push({
65
+ id: toolCapabilityId(entry.id, tool.id),
66
+ kind: "tool",
67
+ recipe_id: entry.id,
68
+ recipe_version: entry.version,
69
+ recipe_name: entry.manifest.name,
70
+ asset_id: tool.id,
71
+ source: tool.entrypoint,
72
+ summary: tool.summary,
73
+ definition: tool,
74
+ });
75
+ }
76
+ return assets;
19
77
  }
20
78
  function selectedAvailability(opts) {
21
79
  if (opts.selected) {
@@ -31,14 +89,15 @@ function selectedAvailability(opts) {
31
89
  };
32
90
  }
33
91
  export function resolveRecipeCapabilityRegistry(opts) {
92
+ const assets = opts.assets ?? toFallbackAssets(opts.entry);
34
93
  const gate = opts.selection
35
94
  ? scenarioCapabilityId(opts.entry.id, opts.selection.scenario_id)
36
95
  : null;
37
96
  const entries = [];
38
- for (const scenario of opts.entry.manifest.scenarios) {
39
- const selected = opts.selection ? scenario.id === opts.selection.scenario_id : true;
97
+ for (const scenario of assets.filter((asset) => asset.kind === "scenario")) {
98
+ const selected = opts.selection ? scenario.asset_id === opts.selection.scenario_id : true;
40
99
  entries.push({
41
- id: scenarioCapabilityId(opts.entry.id, scenario.id),
100
+ id: scenario.id,
42
101
  kind: "scenario",
43
102
  source: source(opts.entry),
44
103
  summary: scenario.summary,
@@ -50,16 +109,18 @@ export function resolveRecipeCapabilityRegistry(opts) {
50
109
  metadata: {
51
110
  recipe_id: opts.entry.id,
52
111
  recipe_version: opts.entry.version,
53
- scenario_id: scenario.id,
54
- scenario_name: scenario.name,
55
- file: scenario.file,
112
+ scenario_id: scenario.asset_id,
113
+ scenario_name: scenario.definition.name,
114
+ file: scenario.definition.file,
56
115
  },
57
116
  });
58
117
  }
59
- for (const agent of opts.entry.manifest.agents ?? []) {
60
- const selected = opts.selection ? opts.selection.agents_involved.includes(agent.id) : true;
118
+ for (const agent of assets.filter((asset) => asset.kind === "agent")) {
119
+ const selected = opts.selection
120
+ ? opts.selection.agents_involved.includes(agent.asset_id)
121
+ : true;
61
122
  entries.push({
62
- id: agentCapabilityId(opts.entry.id, agent.id),
123
+ id: agent.id,
63
124
  kind: "agent",
64
125
  source: source(opts.entry),
65
126
  summary: agent.summary,
@@ -71,16 +132,16 @@ export function resolveRecipeCapabilityRegistry(opts) {
71
132
  metadata: {
72
133
  recipe_id: opts.entry.id,
73
134
  recipe_version: opts.entry.version,
74
- agent_id: agent.id,
75
- role: agent.role,
76
- file: agent.file,
135
+ agent_id: agent.asset_id,
136
+ role: agent.definition.role,
137
+ file: agent.definition.file,
77
138
  },
78
139
  });
79
140
  }
80
- for (const skill of opts.entry.manifest.skills ?? []) {
81
- const selected = opts.selection ? opts.selection.skills_used.includes(skill.id) : true;
141
+ for (const skill of assets.filter((asset) => asset.kind === "skill")) {
142
+ const selected = opts.selection ? opts.selection.skills_used.includes(skill.asset_id) : true;
82
143
  entries.push({
83
- id: skillCapabilityId(opts.entry.id, skill.id),
144
+ id: skill.id,
84
145
  kind: "skill",
85
146
  source: source(opts.entry),
86
147
  summary: skill.summary,
@@ -92,16 +153,15 @@ export function resolveRecipeCapabilityRegistry(opts) {
92
153
  metadata: {
93
154
  recipe_id: opts.entry.id,
94
155
  recipe_version: opts.entry.version,
95
- skill_id: skill.id,
96
- kind: skill.kind,
97
- file: skill.file,
156
+ skill_id: skill.asset_id,
157
+ file: skill.definition.file,
98
158
  },
99
159
  });
100
160
  }
101
- for (const tool of opts.entry.manifest.tools ?? []) {
102
- const selected = opts.selection ? opts.selection.tools_used.includes(tool.id) : true;
161
+ for (const tool of assets.filter((asset) => asset.kind === "tool")) {
162
+ const selected = opts.selection ? opts.selection.tools_used.includes(tool.asset_id) : true;
103
163
  entries.push({
104
- id: toolCapabilityId(opts.entry.id, tool.id),
164
+ id: tool.id,
105
165
  kind: "tool",
106
166
  source: source(opts.entry),
107
167
  summary: tool.summary,
@@ -113,9 +173,9 @@ export function resolveRecipeCapabilityRegistry(opts) {
113
173
  metadata: {
114
174
  recipe_id: opts.entry.id,
115
175
  recipe_version: opts.entry.version,
116
- tool_id: tool.id,
117
- runtime: tool.runtime,
118
- entrypoint: tool.entrypoint,
176
+ tool_id: tool.asset_id,
177
+ runtime: tool.definition.runtime,
178
+ entrypoint: tool.definition.entrypoint,
119
179
  },
120
180
  });
121
181
  }
@@ -1,4 +1,4 @@
1
- export type ErrorCode = "E_USAGE" | "E_VALIDATION" | "E_IO" | "E_GIT" | "E_BACKEND" | "E_NETWORK" | "E_RUNTIME" | "E_INTERNAL";
1
+ export type ErrorCode = "E_USAGE" | "E_VALIDATION" | "E_IO" | "E_GIT" | "E_HANDOFF" | "E_BACKEND" | "E_NETWORK" | "E_RUNTIME" | "E_INTERNAL";
2
2
  export declare class CliError extends Error {
3
3
  readonly exitCode: number;
4
4
  readonly code: ErrorCode;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,cAAc,GACd,MAAM,GACN,OAAO,GACP,WAAW,GACX,WAAW,GACX,WAAW,GACX,YAAY,CAAC;AAEjB,qBAAa,QAAS,S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GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,sBAAsB,CAAC;IAClC,gBAAgB,EAAE;QAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,CAAC;IACF,UAAU,EAAE,mBAAmB,CAAC;IAChC,IAAI,EAAE,mBAAmB,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC,CAAC;AA6HF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAQ7D;AAED,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,+BAAoC,GAC5C,iBAAiB,CAoCnB"}
@@ -73,10 +73,13 @@ function resolveAgentplanePackageInfo(options) {
73
73
  }
74
74
  return resolvePackageInfo(path.join(inferredRoot, "package.json"));
75
75
  }
76
- function resolveCorePackageInfo(options) {
76
+ function resolveCorePackageInfo(options, frameworkCoreRoot) {
77
77
  if (options.corePackageJsonPath) {
78
78
  return resolvePackageInfo(path.resolve(options.corePackageJsonPath));
79
79
  }
80
+ if (frameworkCoreRoot) {
81
+ return resolvePackageInfo(path.join(frameworkCoreRoot, "package.json"));
82
+ }
80
83
  try {
81
84
  const req = createRequire(options.entryModuleUrl ?? import.meta.url);
82
85
  const entryPath = req.resolve("@agentplaneorg/core");
@@ -127,7 +130,6 @@ export function resolveRuntimeSourceInfo(options = {}) {
127
130
  const cwd = path.resolve(options.cwd ?? process.cwd());
128
131
  const env = options.env ?? process.env;
129
132
  const agentplane = resolveAgentplanePackageInfo(options);
130
- const core = resolveCorePackageInfo(options);
131
133
  const fallbackBin = agentplane.packageRoot === null
132
134
  ? null
133
135
  : path.join(agentplane.packageRoot, "bin", "agentplane.js");
@@ -139,6 +141,9 @@ export function resolveRuntimeSourceInfo(options = {}) {
139
141
  cwd,
140
142
  thisBin: activeBinaryPath ?? fallbackBin ?? cwd,
141
143
  });
144
+ const frameworkCoreRoot = resolveFrameworkCoreRoot(framework.checkout?.repoRoot ?? null);
145
+ const preferredFrameworkCoreRoot = framework.inFrameworkCheckout && framework.isRepoLocalRuntime ? frameworkCoreRoot : null;
146
+ const core = resolveCorePackageInfo(options, preferredFrameworkCoreRoot);
142
147
  return {
143
148
  cwd,
144
149
  activeBinaryPath,
@@ -148,7 +153,7 @@ export function resolveRuntimeSourceInfo(options = {}) {
148
153
  frameworkSources: {
149
154
  repoRoot: framework.checkout?.repoRoot ?? null,
150
155
  agentplaneRoot: framework.checkout?.packageRoot ?? agentplane.packageRoot,
151
- coreRoot: resolveFrameworkCoreRoot(framework.checkout?.repoRoot ?? null),
156
+ coreRoot: frameworkCoreRoot,
152
157
  },
153
158
  agentplane,
154
159
  core,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentplane",
3
- "version": "0.3.12",
3
+ "version": "0.3.13",
4
4
  "description": "Agent Plane CLI for task workflows, recipes, and project automation.",
5
5
  "keywords": [
6
6
  "agentplane",
@@ -55,7 +55,8 @@
55
55
  "prepublishOnly": "node ../../scripts/enforce-github-publish.mjs && npm run prepack"
56
56
  },
57
57
  "dependencies": {
58
- "@agentplaneorg/core": "0.3.12",
58
+ "@agentplaneorg/core": "0.3.13",
59
+ "@agentplaneorg/recipes": "0.3.12",
59
60
  "yauzl": "^2.10.0"
60
61
  },
61
62
  "devDependencies": {
@@ -1,10 +0,0 @@
1
- export type BundledRecipeInfo = {
2
- id: string;
3
- summary: string;
4
- version: string;
5
- };
6
- export declare function listBundledRecipes(): BundledRecipeInfo[];
7
- export declare function renderBundledRecipesHint(): string;
8
- export declare function validateBundledRecipesSelection(recipes: string[]): void;
9
- export declare function getBundledRecipeSourcePath(recipeId: string): string | null;
10
- //# sourceMappingURL=recipes-bundled.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"recipes-bundled.d.ts","sourceRoot":"","sources":["../../src/cli/recipes-bundled.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,iBAAiB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjF,wBAAgB,kBAAkB,IAAI,iBAAiB,EAAE,CAMxD;AAED,wBAAgB,wBAAwB,IAAI,MAAM,CAMjD;AAED,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAevE;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE1E"}
@@ -1,36 +0,0 @@
1
- import { BUNDLED_RECIPES_CATALOG, resolveBundledRecipeSourcePath, } from "../recipes/bundled-recipes.js";
2
- import { CliError } from "../shared/errors.js";
3
- export function listBundledRecipes() {
4
- return BUNDLED_RECIPES_CATALOG.recipes.map((recipe) => ({
5
- id: recipe.id,
6
- summary: recipe.summary,
7
- version: recipe.versions.at(-1)?.version ?? "unknown",
8
- }));
9
- }
10
- export function renderBundledRecipesHint() {
11
- const entries = listBundledRecipes();
12
- if (entries.length === 0) {
13
- return "Bundled recipes: none";
14
- }
15
- return `Bundled recipes: ${entries.map((entry) => entry.id).join(", ")}`;
16
- }
17
- export function validateBundledRecipesSelection(recipes) {
18
- if (recipes.length === 0)
19
- return;
20
- const available = listBundledRecipes().map((entry) => entry.id);
21
- if (available.length === 0) {
22
- process.stdout.write(`${renderBundledRecipesHint()}\n`);
23
- return;
24
- }
25
- const missing = recipes.filter((recipe) => !available.includes(recipe));
26
- if (missing.length > 0) {
27
- throw new CliError({
28
- exitCode: 2,
29
- code: "E_USAGE",
30
- message: `Unknown recipe id(s): ${missing.join(", ")}. ${renderBundledRecipesHint()}`,
31
- });
32
- }
33
- }
34
- export function getBundledRecipeSourcePath(recipeId) {
35
- return resolveBundledRecipeSourcePath(recipeId);
36
- }