agentplane 0.2.26 → 0.3.1
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/README.md +3 -1
- package/assets/AGENTS.md +123 -526
- package/assets/agents/UPGRADER.json +10 -9
- package/assets/framework.manifest.json +112 -7
- package/assets/policy/check-routing.mjs +180 -0
- package/assets/policy/dod.code.md +25 -0
- package/assets/policy/dod.core.md +32 -0
- package/assets/policy/dod.docs.md +32 -0
- package/assets/policy/examples/migration-note.md +6 -0
- package/assets/policy/examples/pr-note.md +16 -0
- package/assets/policy/examples/unit-test-pattern.md +19 -0
- package/assets/policy/governance.md +37 -0
- package/assets/policy/incidents.md +36 -0
- package/assets/policy/security.must.md +7 -0
- package/assets/policy/workflow.branch_pr.md +34 -0
- package/assets/policy/workflow.direct.md +46 -0
- package/assets/policy/workflow.md +9 -0
- package/assets/policy/workflow.release.md +31 -0
- package/assets/policy/workflow.upgrade.md +20 -0
- package/bin/agentplane.js +41 -88
- package/bin/dist-guard.js +124 -0
- package/dist/.build-manifest.json +5 -5
- package/dist/agents/agents-template.d.ts +7 -0
- package/dist/agents/agents-template.d.ts.map +1 -1
- package/dist/agents/agents-template.js +41 -2
- package/dist/cli/command-guide.d.ts.map +1 -1
- package/dist/cli/command-guide.js +18 -9
- package/dist/cli/command-snippets.d.ts +1 -1
- package/dist/cli/command-snippets.js +1 -1
- package/dist/cli/run-cli/commands/core.js +2 -2
- package/dist/cli/run-cli/commands/ide.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/ide.js +8 -3
- package/dist/cli/run-cli/commands/init/ui.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/ui.js +1 -2
- package/dist/cli/run-cli/commands/init/write-agents.d.ts +2 -0
- package/dist/cli/run-cli/commands/init/write-agents.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/write-agents.js +24 -5
- package/dist/cli/run-cli/commands/init/write-workflow.d.ts +5 -0
- package/dist/cli/run-cli/commands/init/write-workflow.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/write-workflow.js +6 -0
- package/dist/cli/run-cli/commands/init.d.ts +2 -0
- package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init.js +47 -19
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +125 -7
- package/dist/commands/doctor.run.d.ts.map +1 -1
- package/dist/commands/doctor.run.js +11 -6
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +9 -4
- package/dist/commands/release/plan.command.d.ts.map +1 -1
- package/dist/commands/release/plan.command.js +9 -3
- package/dist/commands/task/add.d.ts.map +1 -1
- package/dist/commands/task/add.js +32 -0
- package/dist/commands/task/doc.command.d.ts.map +1 -1
- package/dist/commands/task/doc.command.js +1 -0
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +9 -1
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +41 -4
- package/dist/commands/task/plan.d.ts.map +1 -1
- package/dist/commands/task/plan.js +7 -1
- package/dist/commands/task/shared.d.ts +7 -0
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +37 -0
- package/dist/commands/task/start-ready.js +1 -1
- package/dist/commands/upgrade.command.d.ts.map +1 -1
- package/dist/commands/upgrade.command.js +2 -2
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +263 -294
- package/dist/commands/workflow-build.command.d.ts.map +1 -1
- package/dist/commands/workflow-build.command.js +7 -0
- package/dist/commands/workflow-playbook.command.d.ts.map +1 -1
- package/dist/commands/workflow-playbook.command.js +0 -1
- package/dist/shared/policy-gateway.d.ts +15 -0
- package/dist/shared/policy-gateway.d.ts.map +1 -0
- package/dist/shared/policy-gateway.js +49 -0
- package/dist/shared/protected-paths.d.ts.map +1 -1
- package/dist/shared/protected-paths.js +1 -0
- package/dist/shared/runtime-artifacts.d.ts +2 -2
- package/dist/shared/runtime-artifacts.d.ts.map +1 -1
- package/dist/shared/runtime-artifacts.js +4 -0
- package/dist/workflow-runtime/build.d.ts +1 -1
- package/dist/workflow-runtime/build.d.ts.map +1 -1
- package/dist/workflow-runtime/build.js +14 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-build.command.d.ts","sourceRoot":"","sources":["../../src/commands/workflow-build.command.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAWvE,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAgC9D,CAAC;AAWF,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"workflow-build.command.d.ts","sourceRoot":"","sources":["../../src/commands/workflow-build.command.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAWvE,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAgC9D,CAAC;AAWF,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,mBAAmB,CA2EhE,CAAC"}
|
|
@@ -49,12 +49,19 @@ export const runWorkflowBuild = async (ctx, flags) => {
|
|
|
49
49
|
const resolved = await resolveProject({ cwd: ctx.cwd, rootOverride: ctx.rootOverride ?? null });
|
|
50
50
|
const configLoaded = await loadConfig(resolved.agentplaneDir);
|
|
51
51
|
const workflowPaths = resolveWorkflowPaths(resolved.gitRoot);
|
|
52
|
+
const configApprovals = configLoaded.config.agents?.approvals;
|
|
52
53
|
const runtimeContext = {
|
|
53
54
|
workflow: {
|
|
54
55
|
mode: configLoaded.config.workflow_mode,
|
|
55
56
|
version: 1,
|
|
57
|
+
approvals: {
|
|
58
|
+
require_plan: configApprovals?.require_plan ?? true,
|
|
59
|
+
require_verify: configApprovals?.require_verify ?? true,
|
|
60
|
+
require_network: configApprovals?.require_network ?? true,
|
|
61
|
+
},
|
|
56
62
|
},
|
|
57
63
|
runtime: {
|
|
64
|
+
repo_name: path.basename(resolved.gitRoot),
|
|
58
65
|
repo_root: resolved.gitRoot,
|
|
59
66
|
timestamp: new Date().toISOString(),
|
|
60
67
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-playbook.command.d.ts","sourceRoot":"","sources":["../../src/commands/workflow-playbook.command.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAoC5E,KAAK,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-playbook.command.d.ts","sourceRoot":"","sources":["../../src/commands/workflow-playbook.command.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAoC5E,KAAK,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AA0JpD,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,sBAAsB,CAMjE,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,sBAAsB,CAMhE,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,sBAAsB,CAMhE,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,sBAAsB,CAEnE,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,sBAAsB,CAElE,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,sBAAsB,CAElE,CAAC"}
|
|
@@ -68,7 +68,6 @@ async function runWorkflowPlaybookCommand(opts) {
|
|
|
68
68
|
env: {
|
|
69
69
|
...process.env,
|
|
70
70
|
AGENTPLANE_NO_UPDATE_CHECK: process.env.AGENTPLANE_NO_UPDATE_CHECK ?? "1",
|
|
71
|
-
AGENTPLANE_DEV_ALLOW_STALE_DIST: process.env.AGENTPLANE_DEV_ALLOW_STALE_DIST ?? "1",
|
|
72
71
|
},
|
|
73
72
|
encoding: "utf8",
|
|
74
73
|
maxBuffer: 10 * 1024 * 1024,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type PolicyGatewayFlavor = "codex" | "claude";
|
|
2
|
+
export type PolicyGatewayFileName = "AGENTS.md" | "CLAUDE.md";
|
|
3
|
+
export declare const POLICY_GATEWAY_FILE_BY_FLAVOR: Record<PolicyGatewayFlavor, PolicyGatewayFileName>;
|
|
4
|
+
export type PolicyGatewayResolution = {
|
|
5
|
+
flavor: PolicyGatewayFlavor;
|
|
6
|
+
fileName: PolicyGatewayFileName;
|
|
7
|
+
absPath: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function policyGatewayFileName(flavor: PolicyGatewayFlavor): PolicyGatewayFileName;
|
|
10
|
+
export declare function renderPolicyGatewayTemplateText(text: string, fileName: PolicyGatewayFileName): string;
|
|
11
|
+
export declare function resolvePolicyGatewayForRepo(opts: {
|
|
12
|
+
gitRoot: string;
|
|
13
|
+
fallbackFlavor?: PolicyGatewayFlavor;
|
|
14
|
+
}): Promise<PolicyGatewayResolution>;
|
|
15
|
+
//# sourceMappingURL=policy-gateway.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy-gateway.d.ts","sourceRoot":"","sources":["../../src/shared/policy-gateway.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,QAAQ,CAAC;AACrD,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,WAAW,CAAC;AAE9D,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,CAG5F,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAWF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,mBAAmB,GAAG,qBAAqB,CAExF;AAED,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,qBAAqB,GAC9B,MAAM,CAUR;AAED,wBAAsB,2BAA2B,CAAC,IAAI,EAAE;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,mBAAmB,CAAC;CACtC,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAoBnC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { access } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
export const POLICY_GATEWAY_FILE_BY_FLAVOR = {
|
|
4
|
+
codex: "AGENTS.md",
|
|
5
|
+
claude: "CLAUDE.md",
|
|
6
|
+
};
|
|
7
|
+
async function exists(absPath) {
|
|
8
|
+
try {
|
|
9
|
+
await access(absPath);
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export function policyGatewayFileName(flavor) {
|
|
17
|
+
return POLICY_GATEWAY_FILE_BY_FLAVOR[flavor];
|
|
18
|
+
}
|
|
19
|
+
export function renderPolicyGatewayTemplateText(text, fileName) {
|
|
20
|
+
const collapsed = text
|
|
21
|
+
.replaceAll("{{POLICY_GATEWAY_FILE}}", fileName)
|
|
22
|
+
.replaceAll("AGENTS.md or CLAUDE.md", fileName)
|
|
23
|
+
.replaceAll("AGENTS.md and CLAUDE.md", fileName)
|
|
24
|
+
.replaceAll("AGENTS.md|CLAUDE.md", fileName);
|
|
25
|
+
if (fileName === "AGENTS.md")
|
|
26
|
+
return collapsed;
|
|
27
|
+
return collapsed
|
|
28
|
+
.replaceAll("AGENTS.md", "CLAUDE.md")
|
|
29
|
+
.replaceAll("AGENTS_POLICY", "CLAUDE_POLICY");
|
|
30
|
+
}
|
|
31
|
+
export async function resolvePolicyGatewayForRepo(opts) {
|
|
32
|
+
const codexPath = path.join(opts.gitRoot, POLICY_GATEWAY_FILE_BY_FLAVOR.codex);
|
|
33
|
+
const claudePath = path.join(opts.gitRoot, POLICY_GATEWAY_FILE_BY_FLAVOR.claude);
|
|
34
|
+
const hasCodex = await exists(codexPath);
|
|
35
|
+
const hasClaude = await exists(claudePath);
|
|
36
|
+
if (hasCodex) {
|
|
37
|
+
return { flavor: "codex", fileName: "AGENTS.md", absPath: codexPath };
|
|
38
|
+
}
|
|
39
|
+
if (hasClaude) {
|
|
40
|
+
return { flavor: "claude", fileName: "CLAUDE.md", absPath: claudePath };
|
|
41
|
+
}
|
|
42
|
+
const fallback = opts.fallbackFlavor ?? "codex";
|
|
43
|
+
const fileName = policyGatewayFileName(fallback);
|
|
44
|
+
return {
|
|
45
|
+
flavor: fallback,
|
|
46
|
+
fileName,
|
|
47
|
+
absPath: path.join(opts.gitRoot, fileName),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protected-paths.d.ts","sourceRoot":"","sources":["../../src/shared/protected-paths.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,CAAC;AAE/E,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAQF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,iBAAiB,GAAG,qBAAqB,CAkBvF;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,iBAAiB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"protected-paths.d.ts","sourceRoot":"","sources":["../../src/shared/protected-paths.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,CAAC;AAE/E,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAQF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,iBAAiB,GAAG,qBAAqB,CAkBvF;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,iBAAiB,GAAG,IAAI,CA8B3B"}
|
|
@@ -32,6 +32,7 @@ export function protectedPathKindForFile(opts) {
|
|
|
32
32
|
return "tasks";
|
|
33
33
|
// "Rules of the game": authoring/agent policies and registry.
|
|
34
34
|
if (p === "AGENTS.md" ||
|
|
35
|
+
p === "CLAUDE.md" ||
|
|
35
36
|
p === "packages/agentplane/assets/AGENTS.md" ||
|
|
36
37
|
pathIsUnder(p, ".agentplane/agents")) {
|
|
37
38
|
return "policy";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const RUNTIME_GITIGNORE_LINES: readonly ["# agentplane: ignore runtime/transient workspace artifacts", ".env", ".agentplane/worktrees", ".agentplane/cache", ".agentplane/recipes-cache", ".agentplane/.upgrade", ".agentplane/.release", ".agentplane/upgrade", ".agentplane/tasks.json", "AGENTS.md.bak-*", ".agentplane/agents/*.bak-*"];
|
|
2
|
-
export declare const AGENT_PROMPT_GITIGNORE_LINES: readonly ["# agentplane: ignore local agent prompts/templates", "AGENTS.md", ".agentplane/agents/"];
|
|
1
|
+
export declare const RUNTIME_GITIGNORE_LINES: readonly ["# agentplane: ignore runtime/transient workspace artifacts", ".env", ".agentplane/worktrees", ".agentplane/cache", ".agentplane/recipes-cache", ".agentplane/.upgrade", ".agentplane/.release", ".agentplane/upgrade", ".agentplane/tasks.json", "AGENTS.md.bak-*", "CLAUDE.md.bak-*", ".agentplane/agents/*.bak-*", ".agentplane/policy/**/*.bak-*"];
|
|
2
|
+
export declare const AGENT_PROMPT_GITIGNORE_LINES: readonly ["# agentplane: ignore local agent prompts/templates", "AGENTS.md", "CLAUDE.md", ".agentplane/agents/", ".agentplane/policy/"];
|
|
3
3
|
//# sourceMappingURL=runtime-artifacts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-artifacts.d.ts","sourceRoot":"","sources":["../../src/shared/runtime-artifacts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"runtime-artifacts.d.ts","sourceRoot":"","sources":["../../src/shared/runtime-artifacts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,kWAc1B,CAAC;AAEX,eAAO,MAAM,4BAA4B,yIAM/B,CAAC"}
|
|
@@ -9,10 +9,14 @@ export const RUNTIME_GITIGNORE_LINES = [
|
|
|
9
9
|
".agentplane/upgrade",
|
|
10
10
|
".agentplane/tasks.json",
|
|
11
11
|
"AGENTS.md.bak-*",
|
|
12
|
+
"CLAUDE.md.bak-*",
|
|
12
13
|
".agentplane/agents/*.bak-*",
|
|
14
|
+
".agentplane/policy/**/*.bak-*",
|
|
13
15
|
];
|
|
14
16
|
export const AGENT_PROMPT_GITIGNORE_LINES = [
|
|
15
17
|
"# agentplane: ignore local agent prompts/templates",
|
|
16
18
|
"AGENTS.md",
|
|
19
|
+
"CLAUDE.md",
|
|
17
20
|
".agentplane/agents/",
|
|
21
|
+
".agentplane/policy/",
|
|
18
22
|
];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { WorkflowBuildInput, WorkflowBuildOutput } from "./types.js";
|
|
2
2
|
export declare function buildWorkflowFromTemplates(input: WorkflowBuildInput): WorkflowBuildOutput;
|
|
3
|
-
export declare const DEFAULT_WORKFLOW_TEMPLATE = "---\nversion: 1\nmode: direct\nowners:\n orchestrator: ORCHESTRATOR\napprovals:\n require_plan: true\n require_verify: true\n require_network: true\nretry_policy:\n normal_exit_continuation: true\n abnormal_backoff: exponential\n max_attempts: 5\ntimeouts:\n stall_seconds: 900\nin_scope_paths:\n - packages/**\n---\n\n## Prompt Template\nRepository
|
|
3
|
+
export declare const DEFAULT_WORKFLOW_TEMPLATE = "---\nversion: 1\nmode: direct\nowners:\n orchestrator: ORCHESTRATOR\napprovals:\n require_plan: true\n require_verify: true\n require_network: true\nretry_policy:\n normal_exit_continuation: true\n abnormal_backoff: exponential\n max_attempts: 5\ntimeouts:\n stall_seconds: 900\nin_scope_paths:\n - packages/**\n---\n\n## Prompt Template\nRepository: {{ runtime.repo_name }}\nWorkflow mode: {{ workflow.mode }}\n\n## Checks\n- preflight\n- verify\n- finish\n\n## Fallback\nlast_known_good: .agentplane/workflows/last-known-good.md\n";
|
|
4
4
|
//# sourceMappingURL=build.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/workflow-runtime/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAsB,MAAM,YAAY,CAAC;AAqC9F,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,kBAAkB,GAAG,mBAAmB,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/workflow-runtime/build.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAsB,MAAM,YAAY,CAAC;AAqC9F,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,kBAAkB,GAAG,mBAAmB,CA4EzF;AAED,eAAO,MAAM,yBAAyB,kiBA8BrC,CAAC"}
|
|
@@ -40,10 +40,22 @@ export function buildWorkflowFromTemplates(input) {
|
|
|
40
40
|
const mergedFrontMatter = mergeRecord(base.document.frontMatterRaw, override?.document.frontMatterRaw ?? {});
|
|
41
41
|
const runtimeWorkflow = input.runtimeContext.workflow;
|
|
42
42
|
if (runtimeWorkflow && typeof runtimeWorkflow === "object" && !Array.isArray(runtimeWorkflow)) {
|
|
43
|
-
const
|
|
43
|
+
const runtimeWorkflowRecord = runtimeWorkflow;
|
|
44
|
+
const runtimeMode = runtimeWorkflowRecord.mode;
|
|
44
45
|
if (runtimeMode === "direct" || runtimeMode === "branch_pr") {
|
|
45
46
|
mergedFrontMatter.mode = runtimeMode;
|
|
46
47
|
}
|
|
48
|
+
const runtimeApprovals = runtimeWorkflowRecord.approvals;
|
|
49
|
+
if (runtimeApprovals &&
|
|
50
|
+
typeof runtimeApprovals === "object" &&
|
|
51
|
+
!Array.isArray(runtimeApprovals)) {
|
|
52
|
+
const approvalsRecord = runtimeApprovals;
|
|
53
|
+
mergedFrontMatter.approvals = {
|
|
54
|
+
require_plan: approvalsRecord.require_plan === true,
|
|
55
|
+
require_verify: approvalsRecord.require_verify === true,
|
|
56
|
+
require_network: approvalsRecord.require_network === true,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
47
59
|
}
|
|
48
60
|
const mergedSections = mergeSections(base.document.sections, override?.document.sections ?? {});
|
|
49
61
|
const promptTemplate = mergedSections["Prompt Template"] ?? "";
|
|
@@ -101,7 +113,7 @@ in_scope_paths:
|
|
|
101
113
|
---
|
|
102
114
|
|
|
103
115
|
## Prompt Template
|
|
104
|
-
Repository
|
|
116
|
+
Repository: {{ runtime.repo_name }}
|
|
105
117
|
Workflow mode: {{ workflow.mode }}
|
|
106
118
|
|
|
107
119
|
## Checks
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentplane",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Agent Plane CLI for task workflows, recipes, and project automation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentplane",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"prepublishOnly": "node ../../scripts/enforce-github-publish.mjs && npm run prepack"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@agentplaneorg/core": "0.
|
|
58
|
+
"@agentplaneorg/core": "0.3.1",
|
|
59
59
|
"yauzl": "^2.10.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|