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
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { resolveProject } from "@agentplaneorg/core";
|
|
2
|
+
import { mapCoreError } from "../../../../cli/error-map.js";
|
|
3
|
+
import { CliError } from "../../../../shared/errors.js";
|
|
4
|
+
import { readProjectOverlayBundle } from "../overlay-project.js";
|
|
5
|
+
export async function cmdRecipeExplainActiveParsed(opts) {
|
|
6
|
+
try {
|
|
7
|
+
const project = await resolveProject({
|
|
8
|
+
cwd: opts.cwd,
|
|
9
|
+
rootOverride: opts.rootOverride ?? null,
|
|
10
|
+
});
|
|
11
|
+
const bundle = await readProjectOverlayBundle(project);
|
|
12
|
+
process.stdout.write(`${JSON.stringify(bundle ?? null, null, 2)}\n`);
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
15
|
+
catch (err) {
|
|
16
|
+
if (err instanceof CliError)
|
|
17
|
+
throw err;
|
|
18
|
+
throw mapCoreError(err, { command: "recipes explain-active", root: opts.rootOverride ?? null });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explain.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/explain.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"explain.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/explain.ts"],"names":[],"mappings":"AAeA,wBAAsB,sBAAsB,CAAC,IAAI,EAAE;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,MAAM,CAAC,CA4KlB"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import path from "node:path";
|
|
1
2
|
import { resolveProject } from "@agentplaneorg/core";
|
|
2
3
|
import { mapCoreError } from "../../../../cli/error-map.js";
|
|
3
4
|
import { exitCodeForError } from "../../../../cli/exit-codes.js";
|
|
4
5
|
import { CliError } from "../../../../shared/errors.js";
|
|
5
6
|
import { formatJsonBlock } from "../format.js";
|
|
7
|
+
import { readActiveRecipeIds } from "../overlay-project.js";
|
|
6
8
|
import { readProjectInstalledRecipes } from "../project-installed-recipes.js";
|
|
7
|
-
import {
|
|
9
|
+
import { inspectProjectRecipe } from "../project-recipe-state.js";
|
|
10
|
+
import { resolveProjectRecipesDir, resolveProjectInstalledRecipeDir } from "../paths.js";
|
|
8
11
|
import { collectRecipeScenarioDetails } from "../scenario.js";
|
|
9
12
|
export async function cmdRecipeExplainParsed(opts) {
|
|
10
13
|
try {
|
|
@@ -12,7 +15,10 @@ export async function cmdRecipeExplainParsed(opts) {
|
|
|
12
15
|
cwd: opts.cwd,
|
|
13
16
|
rootOverride: opts.rootOverride ?? null,
|
|
14
17
|
});
|
|
15
|
-
const installed = await
|
|
18
|
+
const [installed, activeIds] = await Promise.all([
|
|
19
|
+
readProjectInstalledRecipes(resolved),
|
|
20
|
+
readActiveRecipeIds(resolved),
|
|
21
|
+
]);
|
|
16
22
|
const entry = installed.recipes.find((recipe) => recipe.id === opts.id);
|
|
17
23
|
if (!entry) {
|
|
18
24
|
throw new CliError({
|
|
@@ -21,10 +27,22 @@ export async function cmdRecipeExplainParsed(opts) {
|
|
|
21
27
|
message: `Recipe not installed: ${opts.id}`,
|
|
22
28
|
});
|
|
23
29
|
}
|
|
30
|
+
const inspection = await inspectProjectRecipe({ project: resolved, recipeId: opts.id });
|
|
24
31
|
const manifest = entry.manifest;
|
|
25
|
-
const recipeDir =
|
|
32
|
+
const recipeDir = entry.project_path
|
|
33
|
+
? path.join(resolveProjectRecipesDir(resolved), entry.project_path)
|
|
34
|
+
: resolveProjectInstalledRecipeDir(resolved, entry.id);
|
|
26
35
|
const scenarioDetails = await collectRecipeScenarioDetails(recipeDir, manifest);
|
|
27
36
|
process.stdout.write(`Recipe: ${manifest.id}@${manifest.version}\n`);
|
|
37
|
+
process.stdout.write(`Kind: ${manifest.kind}\n`);
|
|
38
|
+
process.stdout.write(`Schema: ${manifest.schema_version}\n`);
|
|
39
|
+
process.stdout.write(`Active: ${activeIds.includes(entry.id) ? "yes" : "no"}\n`);
|
|
40
|
+
process.stdout.write(`Materialization: ${entry.materialization}\n`);
|
|
41
|
+
process.stdout.write(`State: ${inspection.state}\n`);
|
|
42
|
+
process.stdout.write(`Source ref: ${entry.source_ref}\n`);
|
|
43
|
+
process.stdout.write(`Cache source: ${inspection.cache_present ? "present" : "missing"}\n`);
|
|
44
|
+
process.stdout.write(`Source sha256: ${entry.source_sha256}\n`);
|
|
45
|
+
process.stdout.write(`Vendored sha256: ${inspection.current_vendored_sha256}\n`);
|
|
28
46
|
process.stdout.write(`Name: ${manifest.name}\n`);
|
|
29
47
|
process.stdout.write(`Summary: ${manifest.summary}\n`);
|
|
30
48
|
process.stdout.write(`Description: ${manifest.description}\n`);
|
|
@@ -57,6 +75,25 @@ export async function cmdRecipeExplainParsed(opts) {
|
|
|
57
75
|
process.stdout.write(` - ${tool.id} - ${tool.summary}\n`);
|
|
58
76
|
}
|
|
59
77
|
}
|
|
78
|
+
const prompts = manifest.prompts ?? [];
|
|
79
|
+
const validators = manifest.validators ?? [];
|
|
80
|
+
if (prompts.length > 0) {
|
|
81
|
+
process.stdout.write("Overlay prompts:\n");
|
|
82
|
+
for (const prompt of prompts) {
|
|
83
|
+
process.stdout.write(` - ${prompt.id} [surface=${prompt.surface}, strength=${prompt.strength ?? "default"}, file=${prompt.file}]\n`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (validators.length > 0) {
|
|
87
|
+
process.stdout.write("Overlay validators:\n");
|
|
88
|
+
for (const validator of validators) {
|
|
89
|
+
process.stdout.write(` - ${validator.id} [kind=${validator.kind}, phase=${validator.phase}]\n`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (manifest.templates && Object.keys(manifest.templates).length > 0) {
|
|
93
|
+
const payload = formatJsonBlock(manifest.templates, " ");
|
|
94
|
+
if (payload)
|
|
95
|
+
process.stdout.write(`Templates:\n${payload}\n`);
|
|
96
|
+
}
|
|
60
97
|
if (scenarioDetails.length > 0) {
|
|
61
98
|
process.stdout.write("Scenarios:\n");
|
|
62
99
|
for (const scenario of scenarioDetails) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/info.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/info.ts"],"names":[],"mappings":"AAQA,wBAAsB,mBAAmB,CAAC,IAAI,EAAE;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,MAAM,CAAC,CAmFlB"}
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { resolveProject } from "@agentplaneorg/core";
|
|
2
1
|
import { mapCoreError } from "../../../../cli/error-map.js";
|
|
3
2
|
import { exitCodeForError } from "../../../../cli/exit-codes.js";
|
|
4
3
|
import { CliError } from "../../../../shared/errors.js";
|
|
5
4
|
import { formatJsonBlock } from "../format.js";
|
|
6
|
-
import {
|
|
5
|
+
import { readInstalledRecipesFile } from "../installed-recipes.js";
|
|
6
|
+
import { resolveInstalledRecipesPath } from "../paths.js";
|
|
7
7
|
export async function cmdRecipeInfoParsed(opts) {
|
|
8
8
|
try {
|
|
9
|
-
const
|
|
10
|
-
cwd: opts.cwd,
|
|
11
|
-
rootOverride: opts.rootOverride ?? null,
|
|
12
|
-
});
|
|
13
|
-
const installed = await readProjectInstalledRecipes(resolved);
|
|
9
|
+
const installed = await readInstalledRecipesFile(resolveInstalledRecipesPath());
|
|
14
10
|
const entry = installed.recipes.find((recipe) => recipe.id === opts.id);
|
|
15
11
|
if (!entry) {
|
|
16
12
|
throw new CliError({
|
|
17
13
|
exitCode: exitCodeForError("E_IO"),
|
|
18
14
|
code: "E_IO",
|
|
19
|
-
message: `Recipe not
|
|
15
|
+
message: `Recipe not cached: ${opts.id}`,
|
|
20
16
|
});
|
|
21
17
|
}
|
|
22
18
|
const manifest = entry.manifest;
|
|
23
19
|
process.stdout.write(`Recipe: ${manifest.id}@${manifest.version}\n`);
|
|
20
|
+
process.stdout.write(`Kind: ${manifest.kind}\n`);
|
|
21
|
+
process.stdout.write(`Schema: ${manifest.schema_version}\n`);
|
|
22
|
+
process.stdout.write("Cached: yes\n");
|
|
24
23
|
process.stdout.write(`Name: ${manifest.name}\n`);
|
|
25
24
|
process.stdout.write(`Summary: ${manifest.summary}\n`);
|
|
26
25
|
process.stdout.write(`Description: ${manifest.description}\n`);
|
|
@@ -36,6 +35,8 @@ export async function cmdRecipeInfoParsed(opts) {
|
|
|
36
35
|
const agents = manifest.agents ?? [];
|
|
37
36
|
const tools = manifest.tools ?? [];
|
|
38
37
|
const scenarios = manifest.scenarios ?? [];
|
|
38
|
+
const prompts = manifest.prompts ?? [];
|
|
39
|
+
const validators = manifest.validators ?? [];
|
|
39
40
|
if (skills.length > 0) {
|
|
40
41
|
process.stdout.write("Skills:\n");
|
|
41
42
|
for (const skill of skills) {
|
|
@@ -55,6 +56,18 @@ export async function cmdRecipeInfoParsed(opts) {
|
|
|
55
56
|
process.stdout.write(` - ${tool.id} - ${tool.summary}\n`);
|
|
56
57
|
}
|
|
57
58
|
}
|
|
59
|
+
if (prompts.length > 0) {
|
|
60
|
+
process.stdout.write("Prompts:\n");
|
|
61
|
+
for (const prompt of prompts) {
|
|
62
|
+
process.stdout.write(` - ${prompt.id} [surface=${prompt.surface}, strength=${prompt.strength ?? "default"}]\n`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (validators.length > 0) {
|
|
66
|
+
process.stdout.write("Validators:\n");
|
|
67
|
+
for (const validator of validators) {
|
|
68
|
+
process.stdout.write(` - ${validator.id} [kind=${validator.kind}, phase=${validator.phase}]\n`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
58
71
|
if (scenarios.length > 0) {
|
|
59
72
|
process.stdout.write("Scenarios:\n");
|
|
60
73
|
for (const scenario of scenarios) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/install.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAM3E,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,GAAG,EAAE,OAAO,CAAC;CACd,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/install.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAM3E,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,GAAG,EAAE,OAAO,CAAC;CACd,GAAG,OAAO,CAAC,MAAM,CAAC,CAgOlB"}
|
|
@@ -14,25 +14,30 @@ import { ensureNetworkApproved } from "../../../shared/network-approval.js";
|
|
|
14
14
|
import { resolvePathFallback } from "../../../shared/path.js";
|
|
15
15
|
import { moveRecipeDir, validateRecipeAssets } from "../apply.js";
|
|
16
16
|
import { resolveRecipeRoot } from "../archive.js";
|
|
17
|
-
import { DEFAULT_RECIPES_INDEX_URL
|
|
17
|
+
import { DEFAULT_RECIPES_INDEX_URL } from "../constants.js";
|
|
18
18
|
import { loadRecipesRemoteIndex, willFetchRemoteRecipesIndex } from "../index.js";
|
|
19
|
+
import { readInstalledRecipesFile, writeInstalledRecipesFile } from "../installed-recipes.js";
|
|
19
20
|
import { readRecipeManifest } from "../manifest.js";
|
|
20
21
|
import { normalizeRecipeTags } from "../normalize.js";
|
|
21
|
-
import {
|
|
22
|
-
import { resolveProjectInstalledRecipeDir, resolveProjectRecipeInstallMetaPath, resolveProjectRecipesDir, resolveRecipesIndexCachePath, } from "../paths.js";
|
|
22
|
+
import { resolveGlobalRecipesDir, resolveInstalledRecipeDir, resolveInstalledRecipesPath, resolveRecipesIndexCachePath, } from "../paths.js";
|
|
23
23
|
function isHttpUrl(value) {
|
|
24
24
|
return value.startsWith("http://") || value.startsWith("https://");
|
|
25
25
|
}
|
|
26
26
|
export async function cmdRecipeInstall(opts) {
|
|
27
27
|
void opts.onConflict;
|
|
28
28
|
try {
|
|
29
|
-
const project = await resolveProject({
|
|
30
|
-
cwd: opts.cwd,
|
|
31
|
-
rootOverride: opts.rootOverride ?? null,
|
|
32
|
-
});
|
|
33
29
|
let config = defaultConfig();
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
try {
|
|
31
|
+
const project = await resolveProject({
|
|
32
|
+
cwd: opts.cwd,
|
|
33
|
+
rootOverride: opts.rootOverride ?? null,
|
|
34
|
+
});
|
|
35
|
+
const loaded = await loadConfig(project.agentplaneDir);
|
|
36
|
+
config = loaded.config;
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
config = defaultConfig();
|
|
40
|
+
}
|
|
36
41
|
let networkApproved = false;
|
|
37
42
|
const ensureApproved = async (reason) => {
|
|
38
43
|
if (networkApproved)
|
|
@@ -175,7 +180,10 @@ export async function cmdRecipeInstall(opts) {
|
|
|
175
180
|
const resolvedTags = manifest.tags && manifest.tags.length > 0 ? manifest.tags : normalizeRecipeTags(indexTags);
|
|
176
181
|
const manifestWithTags = resolvedTags.length > 0 ? { ...manifest, tags: resolvedTags } : manifest;
|
|
177
182
|
await validateRecipeAssets({ manifest: manifestWithTags, recipeDir: recipeRoot });
|
|
178
|
-
const installDir =
|
|
183
|
+
const installDir = resolveInstalledRecipeDir({
|
|
184
|
+
id: manifestWithTags.id,
|
|
185
|
+
version: manifestWithTags.version,
|
|
186
|
+
});
|
|
179
187
|
const installKind = await getPathKind(installDir);
|
|
180
188
|
if (installKind && installKind !== "dir") {
|
|
181
189
|
throw new CliError({
|
|
@@ -184,40 +192,35 @@ export async function cmdRecipeInstall(opts) {
|
|
|
184
192
|
message: `Recipe install path is not a directory: ${installDir}`,
|
|
185
193
|
});
|
|
186
194
|
}
|
|
187
|
-
const hadExisting = Boolean(installKind);
|
|
188
|
-
const existingRunsDir = path.join(installDir, RECIPE_RUNS_DIR_NAME);
|
|
189
|
-
const preservedRunsDir = path.join(tempRoot, RECIPE_RUNS_DIR_NAME);
|
|
190
195
|
if (installKind) {
|
|
191
|
-
if ((await getPathKind(existingRunsDir)) === "dir") {
|
|
192
|
-
await cp(existingRunsDir, preservedRunsDir, { recursive: true });
|
|
193
|
-
}
|
|
194
196
|
await rm(installDir, { recursive: true, force: true });
|
|
195
197
|
}
|
|
196
|
-
await mkdir(
|
|
198
|
+
await mkdir(resolveGlobalRecipesDir(), { recursive: true });
|
|
197
199
|
await moveRecipeDir({ from: recipeRoot, to: installDir });
|
|
198
200
|
try {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
recursive: true,
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
await writeRecipeInstallMetadata(resolveProjectRecipeInstallMetaPath(project, manifestWithTags.id), {
|
|
205
|
-
schema_version: 1,
|
|
201
|
+
const installed = await readInstalledRecipesFile(resolveInstalledRecipesPath());
|
|
202
|
+
const entry = {
|
|
206
203
|
id: manifestWithTags.id,
|
|
207
204
|
version: manifestWithTags.version,
|
|
208
205
|
source: sourceLabel,
|
|
209
206
|
installed_at: new Date().toISOString(),
|
|
210
207
|
tags: resolvedTags,
|
|
211
|
-
|
|
208
|
+
manifest: manifestWithTags,
|
|
209
|
+
};
|
|
210
|
+
await writeInstalledRecipesFile(resolveInstalledRecipesPath(), {
|
|
211
|
+
schema_version: 1,
|
|
212
|
+
updated_at: installed.updated_at,
|
|
213
|
+
recipes: [
|
|
214
|
+
...installed.recipes.filter((installedEntry) => !(installedEntry.id === entry.id && installedEntry.version === entry.version)),
|
|
215
|
+
entry,
|
|
216
|
+
],
|
|
212
217
|
});
|
|
213
218
|
}
|
|
214
219
|
catch (err) {
|
|
215
|
-
|
|
216
|
-
await rm(installDir, { recursive: true, force: true });
|
|
217
|
-
}
|
|
220
|
+
await rm(installDir, { recursive: true, force: true });
|
|
218
221
|
throw err;
|
|
219
222
|
}
|
|
220
|
-
process.stdout.write(`Installed recipe ${manifestWithTags.id}@${manifestWithTags.version}\n`);
|
|
223
|
+
process.stdout.write(`Installed recipe ${manifestWithTags.id}@${manifestWithTags.version} to global cache\n`);
|
|
221
224
|
return 0;
|
|
222
225
|
}
|
|
223
226
|
finally {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/list.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,wBAAsB,mBAAmB,CAAC,IAAI,EAAE;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,eAAe,CAAC;CACxB,GAAG,OAAO,CAAC,MAAM,CAAC,CAkDlB"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { resolveProject } from "@agentplaneorg/core";
|
|
2
1
|
import { mapCoreError } from "../../../../cli/error-map.js";
|
|
3
2
|
import { emptyStateMessage } from "../../../../cli/output.js";
|
|
4
3
|
import { CliError } from "../../../../shared/errors.js";
|
|
5
|
-
import {
|
|
4
|
+
import { readInstalledRecipesFile } from "../installed-recipes.js";
|
|
5
|
+
import { resolveInstalledRecipesPath } from "../paths.js";
|
|
6
6
|
export async function cmdRecipeListParsed(opts) {
|
|
7
7
|
const flags = opts.flags;
|
|
8
8
|
try {
|
|
9
|
-
const
|
|
10
|
-
cwd: opts.cwd,
|
|
11
|
-
rootOverride: opts.rootOverride ?? null,
|
|
12
|
-
});
|
|
13
|
-
const installed = await readProjectInstalledRecipes(resolved);
|
|
9
|
+
const installed = await readInstalledRecipesFile(resolveInstalledRecipesPath());
|
|
14
10
|
let recipes = installed.recipes;
|
|
15
11
|
if (flags.tag) {
|
|
16
12
|
const needle = flags.tag.toLowerCase();
|
|
@@ -18,18 +14,22 @@ export async function cmdRecipeListParsed(opts) {
|
|
|
18
14
|
}
|
|
19
15
|
if (recipes.length === 0) {
|
|
20
16
|
if (flags.tag) {
|
|
21
|
-
process.stdout.write(`${emptyStateMessage(`
|
|
17
|
+
process.stdout.write(`${emptyStateMessage(`cached recipes for tag ${flags.tag}`)}\n`);
|
|
22
18
|
return 0;
|
|
23
19
|
}
|
|
24
|
-
process.stdout.write(`${emptyStateMessage("
|
|
20
|
+
process.stdout.write(`${emptyStateMessage("cached recipes", "Use `agentplane recipes list-remote` or `agentplane recipes install <id>`.")}\n`);
|
|
25
21
|
return 0;
|
|
26
22
|
}
|
|
27
23
|
if (flags.full) {
|
|
28
|
-
process.stdout.write(`${JSON.stringify({
|
|
24
|
+
process.stdout.write(`${JSON.stringify({
|
|
25
|
+
schema_version: 1,
|
|
26
|
+
updated_at: installed.updated_at,
|
|
27
|
+
recipes,
|
|
28
|
+
}, null, 2)}\n`);
|
|
29
29
|
return 0;
|
|
30
30
|
}
|
|
31
31
|
for (const entry of recipes) {
|
|
32
|
-
process.stdout.write(`${entry.id}@${entry.version} - ${entry.manifest.summary || "No summary"}\n`);
|
|
32
|
+
process.stdout.write(`${entry.id}@${entry.version} [${entry.manifest.kind}] - ${entry.manifest.summary || "No summary"}\n`);
|
|
33
33
|
}
|
|
34
34
|
return 0;
|
|
35
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/remove.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/remove.ts"],"names":[],"mappings":"AAeA,wBAAsB,qBAAqB,CAAC,IAAI,EAAE;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,MAAM,CAAC,CAkClB"}
|
|
@@ -5,7 +5,9 @@ import { exitCodeForError } from "../../../../cli/exit-codes.js";
|
|
|
5
5
|
import { successMessage } from "../../../../cli/output.js";
|
|
6
6
|
import { CliError } from "../../../../shared/errors.js";
|
|
7
7
|
import { ensureActionApproved } from "../../../shared/approval-requirements.js";
|
|
8
|
+
import { refreshProjectOverlayArtifacts, setRecipeActive } from "../overlay-project.js";
|
|
8
9
|
import { readProjectInstalledRecipes } from "../project-installed-recipes.js";
|
|
10
|
+
import { removeProjectRecipeRegistryEntry } from "../project-registry.js";
|
|
9
11
|
import { resolveProjectInstalledRecipeDir } from "../paths.js";
|
|
10
12
|
export async function cmdRecipeRemoveParsed(opts) {
|
|
11
13
|
try {
|
|
@@ -31,6 +33,9 @@ export async function cmdRecipeRemoveParsed(opts) {
|
|
|
31
33
|
reason: `recipes remove ${entry.id}@${entry.version}`,
|
|
32
34
|
});
|
|
33
35
|
await rm(recipeDir, { recursive: true, force: true });
|
|
36
|
+
await setRecipeActive({ project: resolved, recipeId: entry.id, active: false });
|
|
37
|
+
await removeProjectRecipeRegistryEntry({ project: resolved, recipeId: entry.id });
|
|
38
|
+
await refreshProjectOverlayArtifacts(resolved);
|
|
34
39
|
process.stdout.write(`${successMessage("removed recipe", `${entry.id}@${entry.version}`)}\n`);
|
|
35
40
|
return 0;
|
|
36
41
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../../src/commands/recipes/impl/commands/update.ts"],"names":[],"mappings":"AAwBA,wBAAsB,qBAAqB,CAAC,IAAI,EAAE;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAuFlB"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { cp, rm, symlink } from "node:fs/promises";
|
|
2
|
+
import { loadConfig, resolveProject } from "@agentplaneorg/core";
|
|
3
|
+
import { mapCoreError } from "../../../../cli/error-map.js";
|
|
4
|
+
import { exitCodeForError } from "../../../../cli/exit-codes.js";
|
|
5
|
+
import { CliError } from "../../../../shared/errors.js";
|
|
6
|
+
import { ensureActionApproved } from "../../../shared/approval-requirements.js";
|
|
7
|
+
import { readInstalledRecipesFile } from "../installed-recipes.js";
|
|
8
|
+
import { normalizeRecipeTags } from "../normalize.js";
|
|
9
|
+
import { readActiveRecipeIds, refreshProjectOverlayArtifacts } from "../overlay-project.js";
|
|
10
|
+
import { hashRecipeTree, inspectProjectRecipe } from "../project-recipe-state.js";
|
|
11
|
+
import { upsertProjectRecipeRegistryEntry } from "../project-registry.js";
|
|
12
|
+
import { resolveInstalledRecipesPath, resolveProjectVendoredRecipeDir } from "../paths.js";
|
|
13
|
+
function buildModifiedRecipeError(id) {
|
|
14
|
+
return new CliError({
|
|
15
|
+
exitCode: exitCodeForError("E_USAGE"),
|
|
16
|
+
code: "E_USAGE",
|
|
17
|
+
message: `Recipe ${id} has local project edits. Re-run with --force to overwrite the vendored copy from cache.`,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export async function cmdRecipeUpdateParsed(opts) {
|
|
21
|
+
try {
|
|
22
|
+
const project = await resolveProject({
|
|
23
|
+
cwd: opts.cwd,
|
|
24
|
+
rootOverride: opts.rootOverride ?? null,
|
|
25
|
+
});
|
|
26
|
+
const loaded = await loadConfig(project.agentplaneDir);
|
|
27
|
+
const inspection = await inspectProjectRecipe({ project, recipeId: opts.id });
|
|
28
|
+
if (!inspection.cache_present || !inspection.current_source_sha256) {
|
|
29
|
+
throw new CliError({
|
|
30
|
+
exitCode: exitCodeForError("E_IO"),
|
|
31
|
+
code: "E_IO",
|
|
32
|
+
message: `Cached source is missing for ${inspection.entry.id}@${inspection.entry.version}. Run agentplane recipes install ${inspection.entry.id}@${inspection.entry.version}`,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
if (inspection.state === "modified" && !opts.force) {
|
|
36
|
+
throw buildModifiedRecipeError(inspection.entry.id);
|
|
37
|
+
}
|
|
38
|
+
const cache = await readInstalledRecipesFile(resolveInstalledRecipesPath());
|
|
39
|
+
const cached = cache.recipes.find((entry) => entry.id === inspection.entry.id && entry.version === inspection.entry.version);
|
|
40
|
+
if (!cached) {
|
|
41
|
+
throw new CliError({
|
|
42
|
+
exitCode: exitCodeForError("E_IO"),
|
|
43
|
+
code: "E_IO",
|
|
44
|
+
message: `Recipe not found in global cache: ${inspection.entry.id}@${inspection.entry.version}`,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const activeIds = await readActiveRecipeIds(project);
|
|
48
|
+
if (inspection.entry.materialization === "copy" &&
|
|
49
|
+
inspection.state === "clean" &&
|
|
50
|
+
inspection.current_source_sha256 === inspection.entry.source_sha256) {
|
|
51
|
+
process.stdout.write(`Recipe ${inspection.entry.id}@${inspection.entry.version} is already up to date.\n`);
|
|
52
|
+
return 0;
|
|
53
|
+
}
|
|
54
|
+
await ensureActionApproved({
|
|
55
|
+
action: "dangerous_fs",
|
|
56
|
+
config: loaded.config,
|
|
57
|
+
yes: false,
|
|
58
|
+
reason: `recipes update ${inspection.entry.id}@${inspection.entry.version}`,
|
|
59
|
+
});
|
|
60
|
+
const targetDir = resolveProjectVendoredRecipeDir(project, inspection.entry.id);
|
|
61
|
+
await rm(targetDir, { recursive: true, force: true });
|
|
62
|
+
await (inspection.entry.materialization === "link"
|
|
63
|
+
? symlink(inspection.source_dir, targetDir, "dir")
|
|
64
|
+
: cp(inspection.source_dir, targetDir, { recursive: true }));
|
|
65
|
+
const vendoredSha256 = await hashRecipeTree(targetDir);
|
|
66
|
+
await upsertProjectRecipeRegistryEntry({
|
|
67
|
+
project,
|
|
68
|
+
entry: {
|
|
69
|
+
id: inspection.entry.id,
|
|
70
|
+
version: inspection.entry.version,
|
|
71
|
+
path: inspection.entry.project_path,
|
|
72
|
+
active: activeIds.includes(inspection.entry.id),
|
|
73
|
+
materialization: inspection.entry.materialization,
|
|
74
|
+
source_ref: inspection.entry.source_ref,
|
|
75
|
+
source_sha256: inspection.current_source_sha256,
|
|
76
|
+
vendored_sha256: vendoredSha256,
|
|
77
|
+
installed_at: inspection.entry.installed_at,
|
|
78
|
+
tags: normalizeRecipeTags(cached.tags ?? cached.manifest.tags ?? []),
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
await refreshProjectOverlayArtifacts(project);
|
|
82
|
+
const verb = inspection.entry.materialization === "link"
|
|
83
|
+
? "Refreshed linked recipe"
|
|
84
|
+
: "Updated vendored recipe";
|
|
85
|
+
process.stdout.write(`${verb} ${inspection.entry.id}@${inspection.entry.version} from cache.\n`);
|
|
86
|
+
return 0;
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
if (err instanceof CliError)
|
|
90
|
+
throw err;
|
|
91
|
+
throw mapCoreError(err, { command: "recipes update", root: opts.rootOverride ?? null });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
export { cmdRecipeAddParsed } from "./commands/add.js";
|
|
2
|
+
export { cmdRecipeDetachParsed } from "./commands/detach.js";
|
|
1
3
|
export { cmdRecipeListParsed } from "./commands/list.js";
|
|
2
4
|
export { cmdRecipeListRemoteParsed } from "./commands/list-remote.js";
|
|
3
5
|
export { cmdRecipeInfoParsed } from "./commands/info.js";
|
|
4
6
|
export { cmdRecipeExplainParsed } from "./commands/explain.js";
|
|
7
|
+
export { cmdRecipeActiveParsed } from "./commands/active.js";
|
|
8
|
+
export { cmdRecipeExplainActiveParsed } from "./commands/explain-active.js";
|
|
9
|
+
export { cmdRecipeEnableParsed } from "./commands/enable.js";
|
|
10
|
+
export { cmdRecipeDisableParsed } from "./commands/disable.js";
|
|
5
11
|
export { cmdRecipeInstall } from "./commands/install.js";
|
|
6
12
|
export { cmdRecipeRemoveParsed } from "./commands/remove.js";
|
|
13
|
+
export { cmdRecipeUpdateParsed } from "./commands/update.js";
|
|
7
14
|
export { cmdRecipeCachePruneParsed } from "./commands/cache-prune.js";
|
|
8
15
|
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
export { cmdRecipeAddParsed } from "./commands/add.js";
|
|
2
|
+
export { cmdRecipeDetachParsed } from "./commands/detach.js";
|
|
1
3
|
export { cmdRecipeListParsed } from "./commands/list.js";
|
|
2
4
|
export { cmdRecipeListRemoteParsed } from "./commands/list-remote.js";
|
|
3
5
|
export { cmdRecipeInfoParsed } from "./commands/info.js";
|
|
4
6
|
export { cmdRecipeExplainParsed } from "./commands/explain.js";
|
|
7
|
+
export { cmdRecipeActiveParsed } from "./commands/active.js";
|
|
8
|
+
export { cmdRecipeExplainActiveParsed } from "./commands/explain-active.js";
|
|
9
|
+
export { cmdRecipeEnableParsed } from "./commands/enable.js";
|
|
10
|
+
export { cmdRecipeDisableParsed } from "./commands/disable.js";
|
|
5
11
|
export { cmdRecipeInstall } from "./commands/install.js";
|
|
6
12
|
export { cmdRecipeRemoveParsed } from "./commands/remove.js";
|
|
13
|
+
export { cmdRecipeUpdateParsed } from "./commands/update.js";
|
|
7
14
|
export { cmdRecipeCachePruneParsed } from "./commands/cache-prune.js";
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const RECIPES_DIR_NAME = "recipes";
|
|
3
|
-
export declare const RECIPES_SCENARIOS_DIR_NAME = "scenarios";
|
|
4
|
-
export declare const RECIPES_SCENARIOS_INDEX_NAME = "scenarios.json";
|
|
5
|
-
export declare const RECIPE_INSTALL_META_NAME = ".install.json";
|
|
6
|
-
export declare const RECIPE_RUNS_DIR_NAME = "runs";
|
|
7
|
-
export declare const AGENTPLANE_HOME_ENV = "AGENTPLANE_HOME";
|
|
8
|
-
export declare const GLOBAL_RECIPES_DIR_NAME = "recipes";
|
|
9
|
-
export declare const PROJECT_RECIPES_CACHE_DIR_NAME = "recipes-cache";
|
|
10
|
-
export declare const RECIPES_REMOTE_INDEX_NAME = "recipes-index.json";
|
|
11
|
-
export declare const RECIPES_REMOTE_INDEX_SIG_NAME = "recipes-index.json.sig";
|
|
12
|
-
export declare const DEFAULT_RECIPES_INDEX_URL = "https://raw.githubusercontent.com/basilisk-labs/agentplane-recipes/main/index.json";
|
|
13
|
-
export declare const RECIPES_INDEX_PUBLIC_KEYS_ENV = "AGENTPLANE_RECIPES_INDEX_PUBLIC_KEYS";
|
|
14
|
-
export declare const RECIPES_INDEX_PUBLIC_KEYS: Record<string, string>;
|
|
1
|
+
export { AGENTPLANE_HOME_ENV, DEFAULT_RECIPES_INDEX_URL, GLOBAL_RECIPES_DIR_NAME, INSTALLED_RECIPES_NAME, PROJECT_RECIPES_PACKAGES_DIR_NAME, PROJECT_RECIPES_REGISTRY_NAME, PROJECT_RECIPES_CACHE_DIR_NAME, RECIPES_DIR_NAME, RECIPES_INDEX_PUBLIC_KEYS, RECIPES_INDEX_PUBLIC_KEYS_ENV, RECIPES_REMOTE_INDEX_NAME, RECIPES_REMOTE_INDEX_SIG_NAME, RECIPE_RUNS_DIR_NAME, RECIPES_SCENARIOS_DIR_NAME, RECIPES_SCENARIOS_INDEX_NAME, } from "@agentplaneorg/recipes";
|
|
15
2
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/constants.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACvB,sBAAsB,EACtB,iCAAiC,EACjC,6BAA6B,EAC7B,8BAA8B,EAC9B,gBAAgB,EAChB,yBAAyB,EACzB,6BAA6B,EAC7B,yBAAyB,EACzB,6BAA6B,EAC7B,oBAAoB,EACpB,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,wBAAwB,CAAC"}
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export const RECIPES_DIR_NAME = "recipes";
|
|
3
|
-
export const RECIPES_SCENARIOS_DIR_NAME = "scenarios";
|
|
4
|
-
export const RECIPES_SCENARIOS_INDEX_NAME = "scenarios.json";
|
|
5
|
-
export const RECIPE_INSTALL_META_NAME = ".install.json";
|
|
6
|
-
export const RECIPE_RUNS_DIR_NAME = "runs";
|
|
7
|
-
export const AGENTPLANE_HOME_ENV = "AGENTPLANE_HOME";
|
|
8
|
-
export const GLOBAL_RECIPES_DIR_NAME = "recipes";
|
|
9
|
-
export const PROJECT_RECIPES_CACHE_DIR_NAME = "recipes-cache";
|
|
10
|
-
export const RECIPES_REMOTE_INDEX_NAME = "recipes-index.json";
|
|
11
|
-
export const RECIPES_REMOTE_INDEX_SIG_NAME = "recipes-index.json.sig";
|
|
12
|
-
export const DEFAULT_RECIPES_INDEX_URL = "https://raw.githubusercontent.com/basilisk-labs/agentplane-recipes/main/index.json";
|
|
13
|
-
export const RECIPES_INDEX_PUBLIC_KEYS_ENV = "AGENTPLANE_RECIPES_INDEX_PUBLIC_KEYS";
|
|
14
|
-
export const RECIPES_INDEX_PUBLIC_KEYS = {
|
|
15
|
-
"2026-02": `-----BEGIN PUBLIC KEY-----
|
|
16
|
-
MCowBQYDK2VwAyEAeRWdXKVZtz0v+bnQS3zb24jMfa0gflsRUHQkeJkji6E=
|
|
17
|
-
-----END PUBLIC KEY-----`,
|
|
18
|
-
};
|
|
1
|
+
export { AGENTPLANE_HOME_ENV, DEFAULT_RECIPES_INDEX_URL, GLOBAL_RECIPES_DIR_NAME, INSTALLED_RECIPES_NAME, PROJECT_RECIPES_PACKAGES_DIR_NAME, PROJECT_RECIPES_REGISTRY_NAME, PROJECT_RECIPES_CACHE_DIR_NAME, RECIPES_DIR_NAME, RECIPES_INDEX_PUBLIC_KEYS, RECIPES_INDEX_PUBLIC_KEYS_ENV, RECIPES_REMOTE_INDEX_NAME, RECIPES_REMOTE_INDEX_SIG_NAME, RECIPE_RUNS_DIR_NAME, RECIPES_SCENARIOS_DIR_NAME, RECIPES_SCENARIOS_INDEX_NAME, } from "@agentplaneorg/recipes";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
2
|
-
export declare function validateRecipeManifest(raw: unknown): RecipeManifest;
|
|
1
|
+
import { type RecipeManifest } from "@agentplaneorg/recipes";
|
|
3
2
|
export declare function readRecipeManifest(manifestPath: string): Promise<RecipeManifest>;
|
|
3
|
+
export declare function validateRecipeManifest(raw: unknown): RecipeManifest;
|
|
4
4
|
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/manifest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/commands/recipes/impl/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAEhC,wBAAsB,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAEtF;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,cAAc,CAEnE"}
|