agentplane 0.2.13 → 0.2.14
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 +4 -0
- package/assets/AGENTS.md +17 -0
- package/dist/cli/run-cli/commands/init/ui.d.ts +3 -0
- package/dist/cli/run-cli/commands/init/ui.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/ui.js +38 -0
- package/dist/cli/run-cli/commands/init/write-config.d.ts +13 -0
- package/dist/cli/run-cli/commands/init/write-config.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/write-config.js +1 -0
- package/dist/cli/run-cli/commands/init.d.ts +3 -0
- package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init.js +109 -7
- package/dist/commands/task/set-status.d.ts.map +1 -1
- package/dist/commands/task/set-status.js +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,9 @@ agentplane init
|
|
|
24
24
|
agentplane quickstart
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
`agentplane init` is human-oriented: interactive onboarding includes workflow/backend selection,
|
|
28
|
+
execution profile selection (`conservative|balanced|aggressive`), approval toggles, and optional recipes.
|
|
29
|
+
|
|
27
30
|
Create your first task and run the workflow:
|
|
28
31
|
|
|
29
32
|
```bash
|
|
@@ -45,6 +48,7 @@ npx agentplane quickstart
|
|
|
45
48
|
- `AGENTS.md` is created if missing and defines the policy/guardrails.
|
|
46
49
|
- Built-in agent definitions are copied into `.agentplane/agents/`.
|
|
47
50
|
- Optional recipes can install additional agents when you run `agentplane recipes install ...`.
|
|
51
|
+
- `.agentplane/config.json` stores execution defaults under `execution` (profile, reasoning effort, tool budget, safety gates).
|
|
48
52
|
|
|
49
53
|
## Upgrade review reports
|
|
50
54
|
|
package/assets/AGENTS.md
CHANGED
|
@@ -107,6 +107,23 @@ Outside-repo includes (non-exhaustive):
|
|
|
107
107
|
- modifying keychains, ssh keys, credential stores
|
|
108
108
|
- any tool that mutates outside-repo state
|
|
109
109
|
|
|
110
|
+
## Execution Profile
|
|
111
|
+
|
|
112
|
+
`execution` settings in `.agentplane/config.json` define operational behavior defaults for agents:
|
|
113
|
+
|
|
114
|
+
- `profile`: `conservative` / `balanced` / `aggressive`
|
|
115
|
+
- `reasoning_effort`: `low` / `medium` / `high`
|
|
116
|
+
- `tool_budget`: `{ discovery, implementation, verification }`
|
|
117
|
+
- `stop_conditions`: conditions that force a stop/re-plan/escalation
|
|
118
|
+
- `handoff_conditions`: conditions that trigger handoff to another role
|
|
119
|
+
- `unsafe_actions_requiring_explicit_user_ok`: actions that require explicit user confirmation
|
|
120
|
+
|
|
121
|
+
Scope and precedence:
|
|
122
|
+
|
|
123
|
+
- These settings tune execution style only (autonomy, effort, budget, stop/handoff heuristics).
|
|
124
|
+
- They MUST NOT override role authority boundaries, source-of-truth order, approval gates, or hard invariants defined in this `AGENTS.md`.
|
|
125
|
+
- If `execution` config conflicts with policy, `AGENTS.md` policy wins.
|
|
126
|
+
|
|
110
127
|
## Framework Upgrade / Prompt Merge
|
|
111
128
|
|
|
112
129
|
`agentplane upgrade` is responsible for mechanical upgrades and safe merges. When an upgrade run indicates a potential semantic conflict (for example, both local and incoming changes exist relative to a baseline, or a baseline is missing but files differ), treat the result as requiring a meaning-level review.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../../../src/cli/run-cli/commands/init/ui.ts"],"names":[],"mappings":"AAsBA,wBAAgB,iBAAiB,IAAI,MAAM,CAa1C;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAG5E"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
function useColor() {
|
|
2
|
+
return process.stdout.isTTY === true && (process.env.TERM ?? "dumb") !== "dumb";
|
|
3
|
+
}
|
|
4
|
+
function color(text, code) {
|
|
5
|
+
if (!useColor())
|
|
6
|
+
return text;
|
|
7
|
+
return `\u001B[${code}m${text}\u001B[0m`;
|
|
8
|
+
}
|
|
9
|
+
function padLine(line, width) {
|
|
10
|
+
if (line.length >= width)
|
|
11
|
+
return line;
|
|
12
|
+
return `${line}${" ".repeat(width - line.length)}`;
|
|
13
|
+
}
|
|
14
|
+
function box(lines) {
|
|
15
|
+
const width = Math.max(...lines.map((line) => line.length), 0);
|
|
16
|
+
const top = `┌${"─".repeat(width + 2)}┐`;
|
|
17
|
+
const body = lines.map((line) => `│ ${padLine(line, width)} │`);
|
|
18
|
+
const bottom = `└${"─".repeat(width + 2)}┘`;
|
|
19
|
+
return [top, ...body, bottom].join("\n");
|
|
20
|
+
}
|
|
21
|
+
export function renderInitWelcome() {
|
|
22
|
+
const logo = [
|
|
23
|
+
" ___ ____ ____ _ _ _____ ",
|
|
24
|
+
" / _ | / __// __// | / / ___/ ",
|
|
25
|
+
" / __ |/ _/ / _/ / |/ / /__ ",
|
|
26
|
+
String.raw `/_/ |_|\__/ /___//_/|_/\___/ `,
|
|
27
|
+
" agent/plane ",
|
|
28
|
+
].map((line) => color(line, "36"));
|
|
29
|
+
const intro = [
|
|
30
|
+
color("Bootstrap an agent-first workflow in this repository.", "1"),
|
|
31
|
+
"This interactive setup runs once; daily work is executed by agents.",
|
|
32
|
+
];
|
|
33
|
+
return `${logo.join("\n")}\n\n${box(intro)}\n`;
|
|
34
|
+
}
|
|
35
|
+
export function renderInitSection(title, description) {
|
|
36
|
+
const header = color(`[${title}]`, "33");
|
|
37
|
+
return `${header}\n${description}\n`;
|
|
38
|
+
}
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
export type InitExecutionConfig = {
|
|
2
|
+
profile: "conservative" | "balanced" | "aggressive";
|
|
3
|
+
reasoning_effort: "low" | "medium" | "high";
|
|
4
|
+
tool_budget: {
|
|
5
|
+
discovery: number;
|
|
6
|
+
implementation: number;
|
|
7
|
+
verification: number;
|
|
8
|
+
};
|
|
9
|
+
stop_conditions: string[];
|
|
10
|
+
handoff_conditions: string[];
|
|
11
|
+
unsafe_actions_requiring_explicit_user_ok: string[];
|
|
12
|
+
};
|
|
1
13
|
export declare function ensureAgentplaneDirs(agentplaneDir: string): Promise<void>;
|
|
2
14
|
export declare function writeInitConfig(opts: {
|
|
3
15
|
agentplaneDir: string;
|
|
@@ -7,6 +19,7 @@ export declare function writeInitConfig(opts: {
|
|
|
7
19
|
requirePlanApproval: boolean;
|
|
8
20
|
requireNetworkApproval: boolean;
|
|
9
21
|
requireVerifyApproval: boolean;
|
|
22
|
+
execution: InitExecutionConfig;
|
|
10
23
|
}): Promise<void>;
|
|
11
24
|
export declare function writeBackendStubs(opts: {
|
|
12
25
|
localBackendPath: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-config.d.ts","sourceRoot":"","sources":["../../../../../src/cli/run-cli/commands/init/write-config.ts"],"names":[],"mappings":"AAOA,wBAAsB,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO/E;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAAC;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,sBAAsB,EAAE,OAAO,CAAC;IAChC,qBAAqB,EAAE,OAAO,CAAC;CAChC,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"write-config.d.ts","sourceRoot":"","sources":["../../../../../src/cli/run-cli/commands/init/write-config.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,cAAc,GAAG,UAAU,GAAG,YAAY,CAAC;IACpD,gBAAgB,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC5C,WAAW,EAAE;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,cAAc,EAAE,MAAM,CAAC;QACvB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,yCAAyC,EAAE,MAAM,EAAE,CAAC;CACrD,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO/E;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAAC;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,sBAAsB,EAAE,OAAO,CAAC;IAChC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,SAAS,EAAE,mBAAmB,CAAC;CAChC,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBhB;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC5C,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;CAC5B,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBhB"}
|
|
@@ -17,6 +17,7 @@ export async function writeInitConfig(opts) {
|
|
|
17
17
|
setByDottedKey(rawConfig, "agents.approvals.require_plan", String(opts.requirePlanApproval));
|
|
18
18
|
setByDottedKey(rawConfig, "agents.approvals.require_network", String(opts.requireNetworkApproval));
|
|
19
19
|
setByDottedKey(rawConfig, "agents.approvals.require_verify", String(opts.requireVerifyApproval));
|
|
20
|
+
setByDottedKey(rawConfig, "execution", JSON.stringify(opts.execution));
|
|
20
21
|
await saveConfig(opts.agentplaneDir, rawConfig);
|
|
21
22
|
}
|
|
22
23
|
export async function writeBackendStubs(opts) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CommandHandler, CommandSpec } from "../../spec/spec.js";
|
|
2
|
+
type ExecutionProfile = "conservative" | "balanced" | "aggressive";
|
|
2
3
|
type InitFlags = {
|
|
3
4
|
ide?: "codex" | "cursor" | "windsurf";
|
|
4
5
|
workflow?: "direct" | "branch_pr";
|
|
@@ -8,6 +9,8 @@ type InitFlags = {
|
|
|
8
9
|
requirePlanApproval?: boolean;
|
|
9
10
|
requireNetworkApproval?: boolean;
|
|
10
11
|
requireVerifyApproval?: boolean;
|
|
12
|
+
executionProfile?: ExecutionProfile;
|
|
13
|
+
strictUnsafeConfirm?: boolean;
|
|
11
14
|
recipes?: string[];
|
|
12
15
|
force?: boolean;
|
|
13
16
|
backup?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/cli/run-cli/commands/init.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/cli/run-cli/commands/init.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAqBtE,KAAK,gBAAgB,GAAG,cAAc,GAAG,UAAU,GAAG,YAAY,CAAC;AAuEnE,KAAK,SAAS,GAAG;IACf,GAAG,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC;IACtC,QAAQ,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAsBF,KAAK,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG;IAAE,GAAG,EAAE,OAAO,CAAA;CAAE,CAAC;AAE5D,eAAO,MAAM,QAAQ,EAAE,WAAW,CAAC,UAAU,CA2K5C,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,cAAc,CAAC,UAAU,CACmB,CAAC"}
|
|
@@ -13,9 +13,75 @@ import { collectInitConflicts, handleInitConflicts } from "./init/conflicts.js";
|
|
|
13
13
|
import { ensureGitRoot } from "./init/git.js";
|
|
14
14
|
import { maybeSyncIde } from "./init/ide-sync.js";
|
|
15
15
|
import { maybeInstallBundledRecipes } from "./init/recipes.js";
|
|
16
|
-
import { ensureAgentplaneDirs, writeBackendStubs, writeInitConfig } from "./init/write-config.js";
|
|
16
|
+
import { ensureAgentplaneDirs, writeBackendStubs, writeInitConfig, } from "./init/write-config.js";
|
|
17
17
|
import { ensureAgentsFiles } from "./init/write-agents.js";
|
|
18
18
|
import { ensureInitGitignore } from "./init/write-gitignore.js";
|
|
19
|
+
import { renderInitSection, renderInitWelcome } from "./init/ui.js";
|
|
20
|
+
function buildInitExecutionProfile(profile, opts) {
|
|
21
|
+
const shared = {
|
|
22
|
+
stop_conditions: [
|
|
23
|
+
"Missing required input blocks correctness.",
|
|
24
|
+
"Requested action expands scope or risk beyond approved plan.",
|
|
25
|
+
"Verification fails and remediation changes scope.",
|
|
26
|
+
],
|
|
27
|
+
handoff_conditions: [
|
|
28
|
+
"Role boundary reached (for example CODER -> TESTER/REVIEWER).",
|
|
29
|
+
"Task depends_on prerequisites are incomplete.",
|
|
30
|
+
"Specialized agent is required.",
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
const byProfile = {
|
|
34
|
+
conservative: {
|
|
35
|
+
profile: "conservative",
|
|
36
|
+
reasoning_effort: "high",
|
|
37
|
+
tool_budget: { discovery: 4, implementation: 8, verification: 8 },
|
|
38
|
+
...shared,
|
|
39
|
+
unsafe_actions_requiring_explicit_user_ok: [
|
|
40
|
+
"Destructive git history operations.",
|
|
41
|
+
"Outside-repo read/write.",
|
|
42
|
+
"Credential, keychain, or SSH material changes.",
|
|
43
|
+
"Network actions when approvals are enabled.",
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
balanced: {
|
|
47
|
+
profile: "balanced",
|
|
48
|
+
reasoning_effort: "medium",
|
|
49
|
+
tool_budget: { discovery: 6, implementation: 10, verification: 6 },
|
|
50
|
+
...shared,
|
|
51
|
+
unsafe_actions_requiring_explicit_user_ok: [
|
|
52
|
+
"Destructive git history operations.",
|
|
53
|
+
"Outside-repo read/write.",
|
|
54
|
+
"Credential, keychain, or SSH material changes.",
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
aggressive: {
|
|
58
|
+
profile: "aggressive",
|
|
59
|
+
reasoning_effort: "low",
|
|
60
|
+
tool_budget: { discovery: 10, implementation: 16, verification: 8 },
|
|
61
|
+
stop_conditions: [
|
|
62
|
+
"Requested action expands scope or risk beyond approved plan.",
|
|
63
|
+
"Verification fails and remediation changes scope.",
|
|
64
|
+
],
|
|
65
|
+
handoff_conditions: [
|
|
66
|
+
"Role boundary reached (for example CODER -> TESTER/REVIEWER).",
|
|
67
|
+
"Specialized agent is required.",
|
|
68
|
+
],
|
|
69
|
+
unsafe_actions_requiring_explicit_user_ok: [
|
|
70
|
+
"Destructive git history operations.",
|
|
71
|
+
"Outside-repo read/write.",
|
|
72
|
+
"Credential, keychain, or SSH material changes.",
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
const resolved = structuredClone(byProfile[profile]);
|
|
77
|
+
if (opts?.strictUnsafeConfirm === true) {
|
|
78
|
+
const extra = "Network actions when approvals are disabled.";
|
|
79
|
+
if (!resolved.unsafe_actions_requiring_explicit_user_ok.includes(extra)) {
|
|
80
|
+
resolved.unsafe_actions_requiring_explicit_user_ok.push(extra);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return resolved;
|
|
84
|
+
}
|
|
19
85
|
function parseBooleanValueForInit(flag, value) {
|
|
20
86
|
const normalized = value.trim().toLowerCase();
|
|
21
87
|
if (["1", "true", "yes", "y", "on"].includes(normalized))
|
|
@@ -90,6 +156,19 @@ export const initSpec = {
|
|
|
90
156
|
valueHint: "<true|false>",
|
|
91
157
|
description: "Require explicit approval before recording verification.",
|
|
92
158
|
},
|
|
159
|
+
{
|
|
160
|
+
kind: "string",
|
|
161
|
+
name: "execution-profile",
|
|
162
|
+
valueHint: "<conservative|balanced|aggressive>",
|
|
163
|
+
choices: ["conservative", "balanced", "aggressive"],
|
|
164
|
+
description: "Execution profile preset controlling autonomy, reasoning, and tool budgets.",
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
kind: "string",
|
|
168
|
+
name: "strict-unsafe-confirm",
|
|
169
|
+
valueHint: "<true|false>",
|
|
170
|
+
description: "Require strict explicit confirmations for additional unsafe actions.",
|
|
171
|
+
},
|
|
93
172
|
{
|
|
94
173
|
kind: "string",
|
|
95
174
|
name: "recipes",
|
|
@@ -165,6 +244,10 @@ export const initSpec = {
|
|
|
165
244
|
requireVerifyApproval: requireVerifyRaw === undefined
|
|
166
245
|
? undefined
|
|
167
246
|
: parseBooleanValueForInit("--require-verify-approval", requireVerifyRaw),
|
|
247
|
+
executionProfile: raw.opts["execution-profile"],
|
|
248
|
+
strictUnsafeConfirm: raw.opts["strict-unsafe-confirm"] === undefined
|
|
249
|
+
? undefined
|
|
250
|
+
: parseBooleanValueForInit("--strict-unsafe-confirm", String(raw.opts["strict-unsafe-confirm"])),
|
|
168
251
|
recipes: recipesRaw === undefined ? undefined : parseRecipesSelectionForInit(recipesRaw),
|
|
169
252
|
force: raw.opts.force === true,
|
|
170
253
|
backup: raw.opts.backup === true,
|
|
@@ -194,6 +277,8 @@ async function cmdInit(opts) {
|
|
|
194
277
|
requirePlanApproval: true,
|
|
195
278
|
requireNetworkApproval: true,
|
|
196
279
|
requireVerifyApproval: true,
|
|
280
|
+
executionProfile: "balanced",
|
|
281
|
+
strictUnsafeConfirm: false,
|
|
197
282
|
};
|
|
198
283
|
let ide = flags.ide ?? defaults.ide;
|
|
199
284
|
let workflow = flags.workflow ?? defaults.workflow;
|
|
@@ -203,6 +288,8 @@ async function cmdInit(opts) {
|
|
|
203
288
|
let requirePlanApproval = flags.requirePlanApproval ?? defaults.requirePlanApproval;
|
|
204
289
|
let requireNetworkApproval = flags.requireNetworkApproval ?? defaults.requireNetworkApproval;
|
|
205
290
|
let requireVerifyApproval = flags.requireVerifyApproval ?? defaults.requireVerifyApproval;
|
|
291
|
+
let executionProfile = flags.executionProfile ?? defaults.executionProfile;
|
|
292
|
+
let strictUnsafeConfirm = flags.strictUnsafeConfirm ?? defaults.strictUnsafeConfirm;
|
|
206
293
|
const isInteractive = process.stdin.isTTY && !flags.yes;
|
|
207
294
|
if (!process.stdin.isTTY &&
|
|
208
295
|
!flags.yes &&
|
|
@@ -218,27 +305,38 @@ async function cmdInit(opts) {
|
|
|
218
305
|
});
|
|
219
306
|
}
|
|
220
307
|
if (isInteractive) {
|
|
308
|
+
process.stdout.write(renderInitWelcome());
|
|
309
|
+
process.stdout.write(renderInitSection("Workflow", "Choose how branches/backends/approvals should be initialized for this repository."));
|
|
221
310
|
ide = flags.ide ?? defaults.ide;
|
|
222
311
|
if (!flags.workflow) {
|
|
223
|
-
const choice = await promptChoice("
|
|
312
|
+
const choice = await promptChoice("Workflow mode", ["direct", "branch_pr"], workflow);
|
|
224
313
|
workflow = choice === "branch_pr" ? "branch_pr" : "direct";
|
|
225
314
|
}
|
|
226
315
|
if (!flags.backend) {
|
|
227
|
-
const choice = await promptChoice("
|
|
316
|
+
const choice = await promptChoice("Task backend", ["local", "redmine"], backend);
|
|
228
317
|
backend = choice === "redmine" ? "redmine" : "local";
|
|
229
318
|
}
|
|
230
319
|
if (flags.hooks === undefined) {
|
|
231
|
-
hooks = await promptYesNo("Install git hooks?", hooks);
|
|
320
|
+
hooks = await promptYesNo("Install managed git hooks now?", hooks);
|
|
321
|
+
}
|
|
322
|
+
process.stdout.write(renderInitSection("Execution Profile", "Set default autonomy/effort for agents. You can change this later in config."));
|
|
323
|
+
if (!flags.executionProfile) {
|
|
324
|
+
executionProfile = (await promptChoice("Execution profile", ["conservative", "balanced", "aggressive"], executionProfile));
|
|
325
|
+
}
|
|
326
|
+
if (flags.strictUnsafeConfirm === undefined) {
|
|
327
|
+
strictUnsafeConfirm = await promptYesNo("Require strict explicit confirmation for extra unsafe actions?", strictUnsafeConfirm);
|
|
232
328
|
}
|
|
329
|
+
process.stdout.write(renderInitSection("Approvals", "Control whether plan/network/verification actions require explicit approval by default."));
|
|
233
330
|
if (flags.requirePlanApproval === undefined) {
|
|
234
|
-
requirePlanApproval = await promptYesNo("Require plan approval?", requirePlanApproval);
|
|
331
|
+
requirePlanApproval = await promptYesNo("Require plan approval before work starts?", requirePlanApproval);
|
|
235
332
|
}
|
|
236
333
|
if (flags.requireNetworkApproval === undefined) {
|
|
237
|
-
requireNetworkApproval = await promptYesNo("Require explicit approval for network
|
|
334
|
+
requireNetworkApproval = await promptYesNo("Require explicit approval for network actions?", requireNetworkApproval);
|
|
238
335
|
}
|
|
239
336
|
if (flags.requireVerifyApproval === undefined) {
|
|
240
|
-
requireVerifyApproval = await promptYesNo("Require explicit approval
|
|
337
|
+
requireVerifyApproval = await promptYesNo("Require explicit approval before recording verification?", requireVerifyApproval);
|
|
241
338
|
}
|
|
339
|
+
process.stdout.write(renderInitSection("Recipes", "Optional: install recipe packs now (comma-separated IDs) or choose none."));
|
|
242
340
|
if (!flags.recipes) {
|
|
243
341
|
process.stdout.write(`${renderBundledRecipesHint()}\n`);
|
|
244
342
|
const answer = await promptInput("Install optional recipes (comma separated, or none): ");
|
|
@@ -259,6 +357,8 @@ async function cmdInit(opts) {
|
|
|
259
357
|
requirePlanApproval = flags.requirePlanApproval ?? defaults.requirePlanApproval;
|
|
260
358
|
requireNetworkApproval = flags.requireNetworkApproval ?? defaults.requireNetworkApproval;
|
|
261
359
|
requireVerifyApproval = flags.requireVerifyApproval ?? defaults.requireVerifyApproval;
|
|
360
|
+
executionProfile = flags.executionProfile ?? defaults.executionProfile;
|
|
361
|
+
strictUnsafeConfirm = flags.strictUnsafeConfirm ?? defaults.strictUnsafeConfirm;
|
|
262
362
|
}
|
|
263
363
|
validateBundledRecipesSelection(recipes);
|
|
264
364
|
try {
|
|
@@ -295,6 +395,7 @@ async function cmdInit(opts) {
|
|
|
295
395
|
force: flags.force === true,
|
|
296
396
|
});
|
|
297
397
|
await ensureAgentplaneDirs(resolved.agentplaneDir);
|
|
398
|
+
const execution = buildInitExecutionProfile(executionProfile, { strictUnsafeConfirm });
|
|
298
399
|
await writeInitConfig({
|
|
299
400
|
agentplaneDir: resolved.agentplaneDir,
|
|
300
401
|
gitRoot: resolved.gitRoot,
|
|
@@ -303,6 +404,7 @@ async function cmdInit(opts) {
|
|
|
303
404
|
requirePlanApproval,
|
|
304
405
|
requireNetworkApproval,
|
|
305
406
|
requireVerifyApproval,
|
|
407
|
+
execution,
|
|
306
408
|
});
|
|
307
409
|
await writeBackendStubs({ localBackendPath, redmineBackendPath });
|
|
308
410
|
const { installPaths } = await ensureAgentsFiles({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-status.d.ts","sourceRoot":"","sources":["../../../src/commands/task/set-status.ts"],"names":[],"mappings":"AAOA,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAcnC,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"set-status.d.ts","sourceRoot":"","sources":["../../../src/commands/task/set-status.ts"],"names":[],"mappings":"AAOA,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAcnC,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAiKlB"}
|
|
@@ -26,6 +26,16 @@ export async function cmdTaskSetStatus(opts) {
|
|
|
26
26
|
const ctx = opts.ctx ??
|
|
27
27
|
(await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
|
|
28
28
|
const config = ctx.config;
|
|
29
|
+
const executionProfile = String(config.execution?.profile ?? "balanced").toLowerCase();
|
|
30
|
+
if (opts.force &&
|
|
31
|
+
executionProfile === "conservative" &&
|
|
32
|
+
process.env.AGENTPLANE_EXECUTION_FORCE_OK !== "1") {
|
|
33
|
+
throw new CliError({
|
|
34
|
+
exitCode: 2,
|
|
35
|
+
code: "E_USAGE",
|
|
36
|
+
message: "Conservative execution profile blocks --force by default. Set AGENTPLANE_EXECUTION_FORCE_OK=1 to override.",
|
|
37
|
+
});
|
|
38
|
+
}
|
|
29
39
|
const resolved = ctx.resolvedProject;
|
|
30
40
|
const useStore = backendIsLocalFileBackend(ctx);
|
|
31
41
|
const store = useStore ? getTaskStore(ctx) : null;
|