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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/types.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,wBAAwB,EACxB,2BAA2B,EAC3B,qBAAqB,EACrB,6BAA6B,EAC7B,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC1B,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,2BAA2B,EAC3B,kCAAkC,EAClC,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,YAAY,EACZ,qBAAqB,EACrB,mCAAmC,EACnC,wBAAwB,EACxB,sBAAsB,EACtB,+BAA+B,EAC/B,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;CACd,CAAC"}
|
|
@@ -2,9 +2,9 @@ import { cmdRecipeInfoParsed } from "../recipes.js";
|
|
|
2
2
|
export const recipesInfoSpec = {
|
|
3
3
|
id: ["recipes", "info"],
|
|
4
4
|
group: "Recipes",
|
|
5
|
-
summary: "Show
|
|
5
|
+
summary: "Show cached recipe metadata.",
|
|
6
6
|
args: [{ name: "id", required: true, valueHint: "<id>" }],
|
|
7
|
-
examples: [{ cmd: "agentplane recipes info viewer", why: "Show recipe metadata." }],
|
|
7
|
+
examples: [{ cmd: "agentplane recipes info viewer", why: "Show cached recipe metadata." }],
|
|
8
8
|
parse: (raw) => ({ id: String(raw.args.id ?? "") }),
|
|
9
9
|
};
|
|
10
10
|
export const runRecipesInfo = (ctx, p) => cmdRecipeInfoParsed({ cwd: ctx.cwd, rootOverride: ctx.rootOverride, id: p.id });
|
|
@@ -2,7 +2,7 @@ import { usageError } from "../../cli/spec/errors.js";
|
|
|
2
2
|
export const recipesInstallSpec = {
|
|
3
3
|
id: ["recipes", "install"],
|
|
4
4
|
group: "Recipes",
|
|
5
|
-
summary: "Install a recipe from remote index, local archive, or URL.",
|
|
5
|
+
summary: "Install a recipe into the global cache from remote index, local archive, or URL.",
|
|
6
6
|
synopsis: [
|
|
7
7
|
"agentplane recipes install <id|path|url> [--index <path|url>] [--refresh] [--yes] [--on-conflict <fail|rename|overwrite>]",
|
|
8
8
|
"agentplane recipes install --name <id> [--index <path|url>] [--refresh] [--yes] [--on-conflict <fail|rename|overwrite>]",
|
|
@@ -22,19 +22,19 @@ export const recipesInstallSpec = {
|
|
|
22
22
|
kind: "string",
|
|
23
23
|
name: "name",
|
|
24
24
|
valueHint: "<id>",
|
|
25
|
-
description: "
|
|
25
|
+
description: "Cache from remote index by recipe id.",
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
kind: "string",
|
|
29
29
|
name: "path",
|
|
30
30
|
valueHint: "<path>",
|
|
31
|
-
description: "
|
|
31
|
+
description: "Cache from local recipe archive path.",
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
kind: "string",
|
|
35
35
|
name: "url",
|
|
36
36
|
valueHint: "<url>",
|
|
37
|
-
description: "
|
|
37
|
+
description: "Cache from recipe archive URL.",
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
kind: "string",
|
|
@@ -3,19 +3,19 @@ import { cmdRecipeListParsed } from "../recipes.js";
|
|
|
3
3
|
export const recipesListSpec = {
|
|
4
4
|
id: ["recipes", "list"],
|
|
5
5
|
group: "Recipes",
|
|
6
|
-
summary: "List
|
|
6
|
+
summary: "List cached recipes.",
|
|
7
7
|
options: [
|
|
8
8
|
{ kind: "boolean", name: "full", default: false, description: "Print full JSON payload." },
|
|
9
9
|
{
|
|
10
10
|
kind: "string",
|
|
11
11
|
name: "tag",
|
|
12
12
|
valueHint: "<tag>",
|
|
13
|
-
description: "Filter
|
|
13
|
+
description: "Filter cached recipes by tag.",
|
|
14
14
|
},
|
|
15
15
|
],
|
|
16
16
|
examples: [
|
|
17
|
-
{ cmd: "agentplane recipes list", why: "List
|
|
18
|
-
{ cmd: "agentplane recipes list --tag cli", why: "List
|
|
17
|
+
{ cmd: "agentplane recipes list", why: "List cached recipes." },
|
|
18
|
+
{ cmd: "agentplane recipes list --tag cli", why: "List cached recipes with a tag." },
|
|
19
19
|
{ cmd: "agentplane recipes list --full", why: "Print full JSON payload." },
|
|
20
20
|
],
|
|
21
21
|
parse: (raw) => ({
|
|
@@ -2,9 +2,9 @@ import { cmdRecipeRemoveParsed } from "../recipes.js";
|
|
|
2
2
|
export const recipesRemoveSpec = {
|
|
3
3
|
id: ["recipes", "remove"],
|
|
4
4
|
group: "Recipes",
|
|
5
|
-
summary: "Remove
|
|
5
|
+
summary: "Remove a vendored recipe from the current project.",
|
|
6
6
|
args: [{ name: "id", required: true, valueHint: "<id>" }],
|
|
7
|
-
examples: [{ cmd: "agentplane recipes remove viewer", why: "Remove a recipe by id." }],
|
|
7
|
+
examples: [{ cmd: "agentplane recipes remove viewer", why: "Remove a vendored recipe by id." }],
|
|
8
8
|
parse: (raw) => ({ id: String(raw.args.id ?? "") }),
|
|
9
9
|
};
|
|
10
10
|
export const runRecipesRemove = (ctx, p) => cmdRecipeRemoveParsed({ cwd: ctx.cwd, rootOverride: ctx.rootOverride, id: p.id });
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
export type RecipesUpdateParsed = {
|
|
3
|
+
id: string;
|
|
4
|
+
force: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const recipesUpdateSpec: CommandSpec<RecipesUpdateParsed>;
|
|
7
|
+
export declare const runRecipesUpdate: CommandHandler<RecipesUpdateParsed>;
|
|
8
|
+
//# sourceMappingURL=update.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.command.d.ts","sourceRoot":"","sources":["../../../src/commands/recipes/update.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAI1E,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CA2B9D,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,mBAAmB,CAM7D,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { cmdRecipeUpdateParsed } from "../recipes.js";
|
|
2
|
+
export const recipesUpdateSpec = {
|
|
3
|
+
id: ["recipes", "update"],
|
|
4
|
+
group: "Recipes",
|
|
5
|
+
summary: "Refresh a vendored recipe from the cached source.",
|
|
6
|
+
args: [{ name: "id", required: true, valueHint: "<id>" }],
|
|
7
|
+
options: [
|
|
8
|
+
{
|
|
9
|
+
kind: "boolean",
|
|
10
|
+
name: "force",
|
|
11
|
+
default: false,
|
|
12
|
+
description: "Overwrite local project edits in the vendored recipe.",
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
examples: [
|
|
16
|
+
{
|
|
17
|
+
cmd: "agentplane recipes update tdd",
|
|
18
|
+
why: "Sync a clean vendored recipe to the current cached source.",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
cmd: "agentplane recipes update tdd --force",
|
|
22
|
+
why: "Overwrite local vendored edits with the cached source.",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
parse: (raw) => ({
|
|
26
|
+
id: String(raw.args.id ?? "").trim(),
|
|
27
|
+
force: raw.opts.force === true,
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
export const runRecipesUpdate = (ctx, parsed) => cmdRecipeUpdateParsed({
|
|
31
|
+
cwd: ctx.cwd,
|
|
32
|
+
rootOverride: ctx.rootOverride,
|
|
33
|
+
id: parsed.id,
|
|
34
|
+
force: parsed.force,
|
|
35
|
+
});
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export { RECIPES_DIR_NAME, RECIPES_SCENARIOS_DIR_NAME, RECIPES_SCENARIOS_INDEX_NAME, RECIPE_RUNS_DIR_NAME, } from "./recipes/impl/constants.js";
|
|
2
|
-
export type { RecipeCachePruneFlags, RecipeConflictMode, RecipeInstallSource, RecipeListFlags, RecipeListRemoteFlags, RecipeResolverCompatibility, RecipeResolverCompatibilityFailure, RecipeResolverContext, ResolveRecipeScenarioSelectionFlags, ResolvedRecipeRunProfile, ResolvedRecipeScenario, ResolvedRecipeScenarioSelection, ScenarioDefinition, } from "./recipes/impl/types.js";
|
|
2
|
+
export type { CompiledRecipeAssetEntry, CompiledRecipeAssetRegistry, CompiledOverlayBundle, RecipeCachePruneFlags, RecipeConflictMode, RecipeInstallSource, RecipeKind, RecipeListFlags, RecipeListRemoteFlags, RecipeResolverCompatibility, RecipeResolverCompatibilityFailure, RecipeResolverContext, ProjectOverlayManifestV2, ResolveRecipeScenarioSelectionFlags, ResolvedRecipeRunProfile, ResolvedRecipeScenario, ResolvedRecipeScenarioSelection, ScenarioDefinition, } from "./recipes/impl/types.js";
|
|
3
3
|
export { readRecipeManifest } from "./recipes/impl/manifest.js";
|
|
4
4
|
export { readInstalledRecipesFile } from "./recipes/impl/installed-recipes.js";
|
|
5
|
-
export { readProjectInstalledRecipes
|
|
6
|
-
export {
|
|
5
|
+
export { readProjectInstalledRecipes } from "./recipes/impl/project-installed-recipes.js";
|
|
6
|
+
export { readProjectRecipesRegistry, removeProjectRecipeRegistryEntry, upsertProjectRecipeRegistryEntry, writeProjectRecipesRegistry, } from "./recipes/impl/project-registry.js";
|
|
7
|
+
export { hashRecipeTree, inspectProjectRecipe } from "./recipes/impl/project-recipe-state.js";
|
|
8
|
+
export { compileProjectOverlayArtifacts, readActiveRecipeIds, readProjectOverlayBundle, readProjectRecipeAssetRegistry, refreshProjectOverlayArtifacts, setRecipeActive, } from "./recipes/impl/overlay-project.js";
|
|
9
|
+
export { resolveProjectRecipesPackagesDir, resolveInstalledRecipeDir, resolveInstalledRecipesPath, resolveProjectInstalledRecipeDir, resolveProjectOverlayBundlePath, resolveProjectRecipeAssetsPath, resolveProjectRecipesLockPath, resolveProjectRecipesDir, resolveProjectRecipesCacheDir, resolveProjectRecipesRegistryPath, resolveProjectVendoredRecipeDir, } from "./recipes/impl/paths.js";
|
|
7
10
|
export { collectRecipeScenarioDetails, normalizeScenarioToolStep, readScenarioDefinition, readScenarioIndex, } from "./recipes/impl/scenario.js";
|
|
8
11
|
export { buildRecipeResolverContext, listResolvedRecipeScenarios, normalizeResolvedRecipeRunProfile, resolveRecipeCompatibility, resolveRecipeScenarioSelection, } from "./recipes/impl/resolver.js";
|
|
9
|
-
export { cmdRecipeCachePruneParsed, cmdRecipeExplainParsed, cmdRecipeInfoParsed, cmdRecipeInstall, cmdRecipeListParsed, cmdRecipeListRemoteParsed, cmdRecipeRemoveParsed, } from "./recipes/impl/commands.js";
|
|
12
|
+
export { cmdRecipeAddParsed, cmdRecipeActiveParsed, cmdRecipeCachePruneParsed, cmdRecipeDisableParsed, cmdRecipeEnableParsed, cmdRecipeExplainActiveParsed, cmdRecipeExplainParsed, cmdRecipeInfoParsed, cmdRecipeInstall, cmdRecipeListParsed, cmdRecipeListRemoteParsed, cmdRecipeDetachParsed, cmdRecipeRemoveParsed, cmdRecipeUpdateParsed, } from "./recipes/impl/commands.js";
|
|
10
13
|
//# sourceMappingURL=recipes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../../src/commands/recipes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,0BAA0B,EAC1B,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAErC,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,2BAA2B,EAC3B,kCAAkC,EAClC,qBAAqB,EACrB,mCAAmC,EACnC,wBAAwB,EACxB,sBAAsB,EACtB,+BAA+B,EAC/B,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,
|
|
1
|
+
{"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../../src/commands/recipes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,0BAA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AAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,EAC5B,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,4BAA4B,CAAC"}
|
package/dist/commands/recipes.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export { RECIPES_DIR_NAME, RECIPES_SCENARIOS_DIR_NAME, RECIPES_SCENARIOS_INDEX_NAME, RECIPE_RUNS_DIR_NAME, } from "./recipes/impl/constants.js";
|
|
2
2
|
export { readRecipeManifest } from "./recipes/impl/manifest.js";
|
|
3
3
|
export { readInstalledRecipesFile } from "./recipes/impl/installed-recipes.js";
|
|
4
|
-
export { readProjectInstalledRecipes
|
|
5
|
-
export {
|
|
4
|
+
export { readProjectInstalledRecipes } from "./recipes/impl/project-installed-recipes.js";
|
|
5
|
+
export { readProjectRecipesRegistry, removeProjectRecipeRegistryEntry, upsertProjectRecipeRegistryEntry, writeProjectRecipesRegistry, } from "./recipes/impl/project-registry.js";
|
|
6
|
+
export { hashRecipeTree, inspectProjectRecipe } from "./recipes/impl/project-recipe-state.js";
|
|
7
|
+
export { compileProjectOverlayArtifacts, readActiveRecipeIds, readProjectOverlayBundle, readProjectRecipeAssetRegistry, refreshProjectOverlayArtifacts, setRecipeActive, } from "./recipes/impl/overlay-project.js";
|
|
8
|
+
export { resolveProjectRecipesPackagesDir, resolveInstalledRecipeDir, resolveInstalledRecipesPath, resolveProjectInstalledRecipeDir, resolveProjectOverlayBundlePath, resolveProjectRecipeAssetsPath, resolveProjectRecipesLockPath, resolveProjectRecipesDir, resolveProjectRecipesCacheDir, resolveProjectRecipesRegistryPath, resolveProjectVendoredRecipeDir, } from "./recipes/impl/paths.js";
|
|
6
9
|
export { collectRecipeScenarioDetails, normalizeScenarioToolStep, readScenarioDefinition, readScenarioIndex, } from "./recipes/impl/scenario.js";
|
|
7
10
|
export { buildRecipeResolverContext, listResolvedRecipeScenarios, normalizeResolvedRecipeRunProfile, resolveRecipeCompatibility, resolveRecipeScenarioSelection, } from "./recipes/impl/resolver.js";
|
|
8
|
-
export { cmdRecipeCachePruneParsed, cmdRecipeExplainParsed, cmdRecipeInfoParsed, cmdRecipeInstall, cmdRecipeListParsed, cmdRecipeListRemoteParsed, cmdRecipeRemoveParsed, } from "./recipes/impl/commands.js";
|
|
11
|
+
export { cmdRecipeAddParsed, cmdRecipeActiveParsed, cmdRecipeCachePruneParsed, cmdRecipeDisableParsed, cmdRecipeEnableParsed, cmdRecipeExplainActiveParsed, cmdRecipeExplainParsed, cmdRecipeInfoParsed, cmdRecipeInstall, cmdRecipeListParsed, cmdRecipeListRemoteParsed, cmdRecipeDetachParsed, cmdRecipeRemoveParsed, cmdRecipeUpdateParsed, } from "./recipes/impl/commands.js";
|
|
@@ -8,12 +8,12 @@ export declare function signIndexPayload(indexText: string): {
|
|
|
8
8
|
};
|
|
9
9
|
export declare function writeSignedIndex(indexPath: string, payload: unknown): Promise<void>;
|
|
10
10
|
export declare function resolveProjectRecipeDir(projectDir: string, recipeId: string): string;
|
|
11
|
+
export declare function resolveProjectRecipesRegistryPath(projectDir: string): string;
|
|
11
12
|
export declare function writeInstalledRecipes(projectDir: string, recipes: unknown[]): Promise<void>;
|
|
12
13
|
export declare function writeInstalledRecipesRegistry(recipes: unknown[]): Promise<void>;
|
|
13
14
|
export declare function skillEntry(overrides?: Partial<Record<string, unknown>>): {
|
|
14
15
|
id: string;
|
|
15
16
|
summary: string;
|
|
16
|
-
kind: string;
|
|
17
17
|
file: string;
|
|
18
18
|
};
|
|
19
19
|
export declare function toolEntry(overrides?: Partial<Record<string, unknown>>): {
|
|
@@ -67,7 +67,6 @@ export declare function baseRecipeManifest(overrides?: Partial<Record<string, un
|
|
|
67
67
|
skills: {
|
|
68
68
|
id: string;
|
|
69
69
|
summary: string;
|
|
70
|
-
kind: string;
|
|
71
70
|
file: string;
|
|
72
71
|
}[];
|
|
73
72
|
agents: {
|
|
@@ -128,7 +127,6 @@ export declare function baseRecipeEntry(overrides?: Partial<Record<string, unkno
|
|
|
128
127
|
skills: {
|
|
129
128
|
id: string;
|
|
130
129
|
summary: string;
|
|
131
|
-
kind: string;
|
|
132
130
|
file: string;
|
|
133
131
|
}[];
|
|
134
132
|
agents: {
|
|
@@ -169,6 +167,8 @@ export declare function installRecipe(opts: {
|
|
|
169
167
|
projectDir: string;
|
|
170
168
|
archivePath?: string;
|
|
171
169
|
tags?: string[];
|
|
170
|
+
vendor?: boolean;
|
|
171
|
+
mode?: "copy" | "link";
|
|
172
172
|
}): Promise<void>;
|
|
173
173
|
export declare function installRecipeFixture(opts: {
|
|
174
174
|
projectDir: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recipes.test-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/recipes.test-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"recipes.test-helpers.d.ts","sourceRoot":"","sources":["../../src/commands/recipes.test-helpers.ts"],"names":[],"mappings":"AAiDA,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,kBAAkB,GACnB,MAAM,gCAAgC,CAAC;AAExC,wBAAgB,4BAA4B,IAAI,IAAI,CA4BnD;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAG/C;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG;IACnD,cAAc,EAAE,CAAC,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAIA;AAED,wBAAsB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAKzF;AAED,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CA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"}
|
|
@@ -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
|
|
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 =
|
|
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
|
-
|
|
102
|
-
|
|
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
|
-
|
|
109
|
-
}
|
|
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
|
|
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)
|
|
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
|
-
|
|
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.
|
|
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") {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { CommandHandler, CommandSpec } from "../../cli/spec/spec.js";
|
|
2
2
|
import type { ReleaseApplyParsed } from "./apply.types.js";
|
|
3
3
|
export declare const releaseApplySpec: CommandSpec<ReleaseApplyParsed>;
|
|
4
|
+
export declare const releaseCandidateSpec: CommandSpec<ReleaseApplyParsed>;
|
|
4
5
|
export declare const runReleaseApply: CommandHandler<ReleaseApplyParsed>;
|
|
5
|
-
export
|
|
6
|
+
export declare const runReleaseCandidate: CommandHandler<ReleaseApplyParsed>;
|
|
7
|
+
export { pushReleaseCandidateBranch, pushReleaseRefs } from "./apply.reporting.js";
|
|
6
8
|
//# sourceMappingURL=apply.command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.command.d.ts","sourceRoot":"","sources":["../../../src/commands/release/apply.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apply.command.d.ts","sourceRoot":"","sources":["../../../src/commands/release/apply.command.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAoC1E,OAAO,KAAK,EACV,kBAAkB,EAInB,MAAM,kBAAkB,CAAC;AA8c1B,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,kBAAkB,CA0E5D,CAAC;AAgCF,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,kBAAkB,CAuChE,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,kBAAkB,CAwF9D,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,cAAc,CAAC,kBAAkB,CAwFlE,CAAC;AAEF,OAAO,EAAE,0BAA0B,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|