agentplane 0.3.11 → 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.
- package/assets/AGENTS.md +2 -2
- package/assets/RUNNER.md +1 -1
- package/assets/agents/CODER.json +4 -0
- package/assets/agents/CREATOR.json +1 -0
- package/assets/agents/DOCS.json +2 -1
- package/assets/agents/INTEGRATOR.json +2 -1
- package/assets/agents/ORCHESTRATOR.json +3 -1
- package/assets/agents/PLANNER.json +3 -1
- package/assets/agents/REVIEWER.json +1 -0
- package/assets/agents/TESTER.json +2 -2
- package/assets/agents/UPDATER.json +1 -0
- package/assets/agents/UPGRADER.json +1 -1
- package/assets/codex-plugin/assets/header.png +0 -0
- package/assets/codex-plugin/assets/icon.svg +1 -0
- package/assets/codex-plugin/assets/logo.svg +1 -0
- package/assets/codex-plugin/skills/agentplane/SKILL.md +35 -0
- package/assets/policy/governance.md +4 -2
- package/assets/policy/incidents.md +3 -19
- package/assets/policy/workflow.release.md +5 -2
- package/bin/agentplane.js +58 -3
- package/bin/stale-dist-policy.js +6 -1
- package/dist/.build-manifest.json +271 -161
- package/dist/cli/exit-codes.d.ts.map +1 -1
- package/dist/cli/exit-codes.js +1 -0
- package/dist/cli/reason-codes.d.ts +1 -1
- package/dist/cli/reason-codes.d.ts.map +1 -1
- package/dist/cli/reason-codes.js +12 -0
- package/dist/cli/run-cli/command-catalog/core.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/core.js +22 -1
- package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/project.js +21 -3
- package/dist/cli/run-cli/command-catalog.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/codex.d.ts +14 -0
- package/dist/cli/run-cli/commands/codex.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/codex.js +100 -0
- package/dist/cli/run-cli/commands/core.d.ts +1 -0
- package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core.js +1 -0
- package/dist/cli/run-cli/commands/init/recipes.d.ts +9 -1
- package/dist/cli/run-cli/commands/init/recipes.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/recipes.js +32 -22
- package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init.js +26 -21
- package/dist/cli/run-cli/error-guidance.js +20 -0
- package/dist/cli/run-cli.test-helpers.d.ts +1 -0
- package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
- package/dist/cli/run-cli.test-helpers.js +36 -19
- package/dist/commands/branch/cleanup-merged.d.ts +1 -0
- package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
- package/dist/commands/branch/cleanup-merged.js +18 -9
- package/dist/commands/branch/work-start.d.ts.map +1 -1
- package/dist/commands/branch/work-start.js +82 -5
- package/dist/commands/codex/plugin-install.d.ts +26 -0
- package/dist/commands/codex/plugin-install.d.ts.map +1 -0
- package/dist/commands/codex/plugin-install.js +209 -0
- package/dist/commands/doctor/branch-pr.js +2 -2
- package/dist/commands/guard/impl/commands.d.ts +1 -0
- package/dist/commands/guard/impl/commands.d.ts.map +1 -1
- package/dist/commands/guard/impl/commands.js +78 -8
- package/dist/commands/hooks/index.d.ts +1 -1
- package/dist/commands/hooks/index.d.ts.map +1 -1
- package/dist/commands/hooks/index.js +48 -12
- package/dist/commands/pr/check.d.ts.map +1 -1
- package/dist/commands/pr/check.js +3 -0
- package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
- package/dist/commands/pr/integrate/cmd.js +103 -2
- package/dist/commands/pr/integrate/internal/cleanup.d.ts +1 -11
- package/dist/commands/pr/integrate/internal/cleanup.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/cleanup.js +1 -46
- package/dist/commands/pr/integrate/internal/finalize.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/finalize.js +3 -0
- package/dist/commands/pr/integrate/internal/github-protection.d.ts +5 -0
- package/dist/commands/pr/integrate/internal/github-protection.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/github-protection.js +13 -0
- package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.d.ts +15 -0
- package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.d.ts.map +1 -0
- package/dist/commands/pr/integrate/internal/pre-integrate-bootstrap.js +35 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts +1 -0
- package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/prepare.js +46 -7
- package/dist/commands/pr/internal/auto-commit.d.ts +7 -0
- package/dist/commands/pr/internal/auto-commit.d.ts.map +1 -0
- package/dist/commands/pr/internal/auto-commit.js +69 -0
- package/dist/commands/pr/internal/freshness.d.ts +1 -0
- package/dist/commands/pr/internal/freshness.d.ts.map +1 -1
- package/dist/commands/pr/internal/freshness.js +2 -0
- package/dist/commands/pr/internal/sync.d.ts.map +1 -1
- package/dist/commands/pr/internal/sync.js +98 -27
- package/dist/commands/pr/open.d.ts.map +1 -1
- package/dist/commands/pr/open.js +52 -3
- package/dist/commands/pr/update.d.ts.map +1 -1
- package/dist/commands/pr/update.js +13 -2
- package/dist/commands/recipes/active.command.d.ts +7 -0
- package/dist/commands/recipes/active.command.d.ts.map +1 -0
- package/dist/commands/recipes/active.command.js +12 -0
- package/dist/commands/recipes/add.command.d.ts +8 -0
- package/dist/commands/recipes/add.command.d.ts.map +1 -0
- package/dist/commands/recipes/add.command.js +33 -0
- package/dist/commands/recipes/detach.command.d.ts +7 -0
- package/dist/commands/recipes/detach.command.d.ts.map +1 -0
- package/dist/commands/recipes/detach.command.js +19 -0
- package/dist/commands/recipes/disable.command.d.ts +7 -0
- package/dist/commands/recipes/disable.command.d.ts.map +1 -0
- package/dist/commands/recipes/disable.command.js +10 -0
- package/dist/commands/recipes/enable.command.d.ts +7 -0
- package/dist/commands/recipes/enable.command.d.ts.map +1 -0
- package/dist/commands/recipes/enable.command.js +10 -0
- package/dist/commands/recipes/explain-active.command.d.ts +5 -0
- package/dist/commands/recipes/explain-active.command.d.ts.map +1 -0
- package/dist/commands/recipes/explain-active.command.js +11 -0
- package/dist/commands/recipes/explain.command.d.ts.map +1 -1
- package/dist/commands/recipes/explain.command.js +4 -2
- package/dist/commands/recipes/impl/apply.d.ts.map +1 -1
- package/dist/commands/recipes/impl/apply.js +33 -14
- package/dist/commands/recipes/impl/commands/active.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/active.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/active.js +46 -0
- package/dist/commands/recipes/impl/commands/add.d.ts +7 -0
- package/dist/commands/recipes/impl/commands/add.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/add.js +100 -0
- package/dist/commands/recipes/impl/commands/detach.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/detach.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/detach.js +85 -0
- package/dist/commands/recipes/impl/commands/disable.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/disable.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/disable.js +21 -0
- package/dist/commands/recipes/impl/commands/enable.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/enable.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/enable.js +39 -0
- package/dist/commands/recipes/impl/commands/explain-active.d.ts +5 -0
- package/dist/commands/recipes/impl/commands/explain-active.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/explain-active.js +20 -0
- package/dist/commands/recipes/impl/commands/explain.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/explain.js +40 -3
- package/dist/commands/recipes/impl/commands/info.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/info.js +21 -8
- package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/install.js +32 -29
- package/dist/commands/recipes/impl/commands/list.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/list.js +11 -11
- package/dist/commands/recipes/impl/commands/remove.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/remove.js +5 -0
- package/dist/commands/recipes/impl/commands/update.d.ts +7 -0
- package/dist/commands/recipes/impl/commands/update.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/update.js +93 -0
- package/dist/commands/recipes/impl/commands.d.ts +7 -0
- package/dist/commands/recipes/impl/commands.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands.js +7 -0
- package/dist/commands/recipes/impl/constants.d.ts +1 -14
- package/dist/commands/recipes/impl/constants.d.ts.map +1 -1
- package/dist/commands/recipes/impl/constants.js +1 -18
- package/dist/commands/recipes/impl/manifest.d.ts +2 -2
- package/dist/commands/recipes/impl/manifest.d.ts.map +1 -1
- package/dist/commands/recipes/impl/manifest.js +4 -226
- package/dist/commands/recipes/impl/overlay-project.d.ts +32 -0
- package/dist/commands/recipes/impl/overlay-project.d.ts.map +1 -0
- package/dist/commands/recipes/impl/overlay-project.js +282 -0
- package/dist/commands/recipes/impl/paths.d.ts +20 -2
- package/dist/commands/recipes/impl/paths.d.ts.map +1 -1
- package/dist/commands/recipes/impl/paths.js +23 -5
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts +2 -4
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.js +30 -74
- package/dist/commands/recipes/impl/project-recipe-state.d.ts +18 -0
- package/dist/commands/recipes/impl/project-recipe-state.d.ts.map +1 -0
- package/dist/commands/recipes/impl/project-recipe-state.js +94 -0
- package/dist/commands/recipes/impl/project-registry.d.ts +20 -0
- package/dist/commands/recipes/impl/project-registry.d.ts.map +1 -0
- package/dist/commands/recipes/impl/project-registry.js +104 -0
- package/dist/commands/recipes/impl/resolver.d.ts.map +1 -1
- package/dist/commands/recipes/impl/resolver.js +5 -3
- package/dist/commands/recipes/impl/types.d.ts +1 -240
- package/dist/commands/recipes/impl/types.d.ts.map +1 -1
- package/dist/commands/recipes/info.command.js +2 -2
- package/dist/commands/recipes/install.spec.js +4 -4
- package/dist/commands/recipes/list.command.js +4 -4
- package/dist/commands/recipes/remove.command.js +2 -2
- package/dist/commands/recipes/update.command.d.ts +8 -0
- package/dist/commands/recipes/update.command.d.ts.map +1 -0
- package/dist/commands/recipes/update.command.js +35 -0
- package/dist/commands/recipes.d.ts +7 -4
- package/dist/commands/recipes.d.ts.map +1 -1
- package/dist/commands/recipes.js +6 -3
- package/dist/commands/recipes.test-helpers.d.ts +3 -3
- package/dist/commands/recipes.test-helpers.d.ts.map +1 -1
- package/dist/commands/recipes.test-helpers.js +105 -15
- package/dist/commands/release/apply.command.d.ts +3 -1
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +354 -18
- package/dist/commands/release/apply.mutation.d.ts.map +1 -1
- package/dist/commands/release/apply.mutation.js +1 -0
- package/dist/commands/release/apply.reporting.d.ts +1 -0
- package/dist/commands/release/apply.reporting.d.ts.map +1 -1
- package/dist/commands/release/apply.reporting.js +12 -8
- package/dist/commands/release/apply.types.d.ts +13 -0
- package/dist/commands/release/apply.types.d.ts.map +1 -1
- package/dist/commands/release/plan.command.d.ts.map +1 -1
- package/dist/commands/release/plan.command.js +48 -0
- package/dist/commands/scenario/execute.command.js +4 -4
- package/dist/commands/scenario/impl/commands.js +4 -4
- package/dist/commands/scenario/info.command.js +4 -4
- package/dist/commands/scenario/list.command.js +3 -3
- package/dist/commands/scenario/run.command.js +5 -5
- package/dist/commands/scenario/scenario.command.js +7 -7
- package/dist/commands/shared/merged-branch-cleanup.d.ts +12 -0
- package/dist/commands/shared/merged-branch-cleanup.d.ts.map +1 -0
- package/dist/commands/shared/merged-branch-cleanup.js +46 -0
- package/dist/commands/shared/post-commit-pr-artifacts.d.ts.map +1 -1
- package/dist/commands/shared/post-commit-pr-artifacts.js +35 -0
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +37 -5
- package/dist/commands/shared/task-handoff.d.ts +2 -1
- package/dist/commands/shared/task-handoff.d.ts.map +1 -1
- package/dist/commands/shared/task-handoff.js +15 -0
- package/dist/commands/shared/task-local-freshness.d.ts +2 -0
- package/dist/commands/shared/task-local-freshness.d.ts.map +1 -1
- package/dist/commands/shared/task-local-freshness.js +7 -1
- package/dist/commands/task/finish-shared.d.ts +1 -0
- package/dist/commands/task/finish-shared.d.ts.map +1 -1
- package/dist/commands/task/finish-shared.js +1 -0
- package/dist/commands/task/handoff-show.command.d.ts.map +1 -1
- package/dist/commands/task/handoff-show.command.js +24 -0
- package/dist/commands/task/hosted-close-pr.command.d.ts.map +1 -1
- package/dist/commands/task/hosted-close-pr.command.js +35 -0
- package/dist/commands/task/hosted-close.command.d.ts.map +1 -1
- package/dist/commands/task/hosted-close.command.js +185 -18
- package/dist/commands/task/hosted-merge-sync.d.ts +4 -1
- package/dist/commands/task/hosted-merge-sync.d.ts.map +1 -1
- package/dist/commands/task/hosted-merge-sync.js +52 -10
- package/dist/commands/task/start-ready.d.ts.map +1 -1
- package/dist/commands/task/start-ready.js +0 -86
- package/dist/runner/context/base-prompts.d.ts +2 -1
- package/dist/runner/context/base-prompts.d.ts.map +1 -1
- package/dist/runner/context/base-prompts.js +109 -13
- package/dist/runner/context/recipe-context.d.ts.map +1 -1
- package/dist/runner/context/recipe-context.js +40 -8
- package/dist/runner/types.d.ts +4 -0
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/usecases/task-run.d.ts.map +1 -1
- package/dist/runner/usecases/task-run.js +2 -1
- package/dist/runtime/behavior/resolve.d.ts +2 -1
- package/dist/runtime/behavior/resolve.d.ts.map +1 -1
- package/dist/runtime/behavior/resolve.js +25 -5
- package/dist/runtime/behavior/types.d.ts +1 -0
- package/dist/runtime/behavior/types.d.ts.map +1 -1
- package/dist/runtime/capabilities/recipe.d.ts +2 -1
- package/dist/runtime/capabilities/recipe.d.ts.map +1 -1
- package/dist/runtime/capabilities/recipe.js +88 -28
- package/dist/shared/errors.d.ts +1 -1
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/runtime-source.d.ts.map +1 -1
- package/dist/shared/runtime-source.js +8 -3
- package/package.json +3 -2
- package/dist/cli/recipes-bundled.d.ts +0 -10
- package/dist/cli/recipes-bundled.d.ts.map +0 -1
- 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
|
|
9
|
+
return `recipe:${recipeId}/scenario:${scenarioId}`;
|
|
10
10
|
}
|
|
11
11
|
function agentCapabilityId(recipeId, agentId) {
|
|
12
|
-
return `recipe
|
|
12
|
+
return `recipe:${recipeId}/agent:${agentId}`;
|
|
13
13
|
}
|
|
14
14
|
function skillCapabilityId(recipeId, skillId) {
|
|
15
|
-
return `recipe
|
|
15
|
+
return `recipe:${recipeId}/skill:${skillId}`;
|
|
16
16
|
}
|
|
17
17
|
function toolCapabilityId(recipeId, toolId) {
|
|
18
|
-
return `recipe
|
|
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
|
|
39
|
-
const selected = opts.selection ? scenario.
|
|
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:
|
|
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.
|
|
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
|
|
60
|
-
const selected = opts.selection
|
|
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:
|
|
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.
|
|
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
|
|
81
|
-
const selected = opts.selection ? opts.selection.skills_used.includes(skill.
|
|
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:
|
|
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.
|
|
96
|
-
|
|
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
|
|
102
|
-
const selected = opts.selection ? opts.selection.tools_used.includes(tool.
|
|
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:
|
|
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.
|
|
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
|
}
|
package/dist/shared/errors.d.ts
CHANGED
|
@@ -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,SAAQ,KAAK;IACjC,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,IAAI,EAAE,SAAS,CAAC;IAChC,SAAgB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAEtC,IAAI,EAAE;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,SAAS,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC;CAMF;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;I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AC5C,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:
|
|
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.
|
|
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.
|
|
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
|
-
}
|