agentplane 0.2.17 → 0.2.18

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.
Files changed (93) hide show
  1. package/assets/AGENTS.md +14 -3
  2. package/dist/backends/task-backend/redmine/env.d.ts +16 -0
  3. package/dist/backends/task-backend/redmine/env.d.ts.map +1 -0
  4. package/dist/backends/task-backend/redmine/env.js +61 -0
  5. package/dist/backends/task-backend/redmine/mapping.d.ts.map +1 -1
  6. package/dist/backends/task-backend/redmine/mapping.js +25 -3
  7. package/dist/backends/task-backend/redmine-backend.d.ts +1 -1
  8. package/dist/backends/task-backend/redmine-backend.d.ts.map +1 -1
  9. package/dist/backends/task-backend/redmine-backend.js +31 -21
  10. package/dist/backends/task-backend/shared/errors.d.ts +2 -1
  11. package/dist/backends/task-backend/shared/errors.d.ts.map +1 -1
  12. package/dist/backends/task-backend/shared/errors.js +6 -2
  13. package/dist/cli/run-cli/commands/init/ui.d.ts.map +1 -1
  14. package/dist/cli/run-cli/commands/init/ui.js +5 -3
  15. package/dist/cli/run-cli/commands/init/write-env.d.ts.map +1 -1
  16. package/dist/cli/run-cli/commands/init/write-env.js +14 -6
  17. package/dist/cli/run-cli/commands/init.d.ts +1 -1
  18. package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
  19. package/dist/cli/run-cli/commands/init.js +6 -68
  20. package/dist/cli/run-cli.d.ts.map +1 -1
  21. package/dist/cli/run-cli.js +5 -1
  22. package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
  23. package/dist/cli/run-cli.test-helpers.js +14 -2
  24. package/dist/cli/shared/ansi.d.ts +3 -0
  25. package/dist/cli/shared/ansi.d.ts.map +1 -0
  26. package/dist/cli/shared/ansi.js +19 -0
  27. package/dist/commands/block.run.d.ts.map +1 -1
  28. package/dist/commands/block.run.js +1 -0
  29. package/dist/commands/block.spec.d.ts +1 -0
  30. package/dist/commands/block.spec.d.ts.map +1 -1
  31. package/dist/commands/block.spec.js +7 -0
  32. package/dist/commands/branch/remove.command.d.ts +1 -0
  33. package/dist/commands/branch/remove.command.d.ts.map +1 -1
  34. package/dist/commands/branch/remove.command.js +8 -0
  35. package/dist/commands/branch/remove.d.ts +1 -0
  36. package/dist/commands/branch/remove.d.ts.map +1 -1
  37. package/dist/commands/branch/remove.js +9 -0
  38. package/dist/commands/doctor.run.d.ts.map +1 -1
  39. package/dist/commands/doctor.run.js +67 -0
  40. package/dist/commands/finish.run.d.ts.map +1 -1
  41. package/dist/commands/finish.run.js +1 -0
  42. package/dist/commands/finish.spec.d.ts +1 -0
  43. package/dist/commands/finish.spec.d.ts.map +1 -1
  44. package/dist/commands/finish.spec.js +7 -0
  45. package/dist/commands/guard/impl/commands.d.ts.map +1 -1
  46. package/dist/commands/guard/impl/commands.js +50 -0
  47. package/dist/commands/guard/impl/comment-commit.js +1 -1
  48. package/dist/commands/release/apply.command.d.ts.map +1 -1
  49. package/dist/commands/release/apply.command.js +39 -1
  50. package/dist/commands/shared/approval-requirements.d.ts +18 -0
  51. package/dist/commands/shared/approval-requirements.d.ts.map +1 -0
  52. package/dist/commands/shared/approval-requirements.js +77 -0
  53. package/dist/commands/shared/network-approval.d.ts.map +1 -1
  54. package/dist/commands/shared/network-approval.js +8 -23
  55. package/dist/commands/start.run.d.ts.map +1 -1
  56. package/dist/commands/start.run.js +1 -0
  57. package/dist/commands/start.spec.d.ts +1 -0
  58. package/dist/commands/start.spec.d.ts.map +1 -1
  59. package/dist/commands/start.spec.js +7 -0
  60. package/dist/commands/task/block.d.ts +1 -0
  61. package/dist/commands/task/block.d.ts.map +1 -1
  62. package/dist/commands/task/block.js +9 -0
  63. package/dist/commands/task/finish.d.ts +1 -0
  64. package/dist/commands/task/finish.d.ts.map +1 -1
  65. package/dist/commands/task/finish.js +9 -0
  66. package/dist/commands/task/migrate.command.d.ts +1 -0
  67. package/dist/commands/task/migrate.command.d.ts.map +1 -1
  68. package/dist/commands/task/migrate.command.js +8 -0
  69. package/dist/commands/task/migrate.d.ts +1 -0
  70. package/dist/commands/task/migrate.d.ts.map +1 -1
  71. package/dist/commands/task/migrate.js +9 -3
  72. package/dist/commands/task/normalize.command.d.ts +1 -0
  73. package/dist/commands/task/normalize.command.d.ts.map +1 -1
  74. package/dist/commands/task/normalize.command.js +8 -0
  75. package/dist/commands/task/normalize.d.ts +1 -0
  76. package/dist/commands/task/normalize.d.ts.map +1 -1
  77. package/dist/commands/task/normalize.js +9 -3
  78. package/dist/commands/task/scaffold.command.d.ts +1 -0
  79. package/dist/commands/task/scaffold.command.d.ts.map +1 -1
  80. package/dist/commands/task/scaffold.command.js +8 -0
  81. package/dist/commands/task/scaffold.d.ts +1 -0
  82. package/dist/commands/task/scaffold.d.ts.map +1 -1
  83. package/dist/commands/task/scaffold.js +9 -0
  84. package/dist/commands/task/set-status.command.d.ts +1 -0
  85. package/dist/commands/task/set-status.command.d.ts.map +1 -1
  86. package/dist/commands/task/set-status.command.js +8 -0
  87. package/dist/commands/task/set-status.d.ts +1 -0
  88. package/dist/commands/task/set-status.d.ts.map +1 -1
  89. package/dist/commands/task/set-status.js +7 -8
  90. package/dist/commands/task/start.d.ts +1 -0
  91. package/dist/commands/task/start.d.ts.map +1 -1
  92. package/dist/commands/task/start.js +9 -0
  93. package/package.json +2 -2
@@ -78,6 +78,12 @@ export const startSpec = {
78
78
  default: false,
79
79
  description: "Override readiness checks and status transition restrictions.",
80
80
  },
81
+ {
82
+ kind: "boolean",
83
+ name: "yes",
84
+ default: false,
85
+ description: "Auto-approve force-action approval checks when required.",
86
+ },
81
87
  { kind: "boolean", name: "quiet", default: false, description: "Suppress output." },
82
88
  ],
83
89
  examples: [
@@ -110,6 +116,7 @@ export const startSpec = {
110
116
  commitRequireClean: raw.opts["commit-require-clean"] === true,
111
117
  confirmStatusCommit: raw.opts["confirm-status-commit"] === true,
112
118
  force: raw.opts.force === true,
119
+ yes: raw.opts.yes === true,
113
120
  quiet: raw.opts.quiet === true,
114
121
  }),
115
122
  };
@@ -14,6 +14,7 @@ export declare function cmdBlock(opts: {
14
14
  commitRequireClean: boolean;
15
15
  confirmStatusCommit: boolean;
16
16
  force: boolean;
17
+ yes?: boolean;
17
18
  quiet: boolean;
18
19
  }): Promise<number>;
19
20
  //# sourceMappingURL=block.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../src/commands/task/block.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAcnC,wBAAsB,QAAQ,CAAC,IAAI,EAAE;IACnC,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,IAAI,EAAE,MAAM,CAAC;IACb,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;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAuHlB"}
1
+ {"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../src/commands/task/block.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAcnC,wBAAsB,QAAQ,CAAC,IAAI,EAAE;IACnC,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,IAAI,EAAE,MAAM,CAAC;IACb,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;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgIlB"}
@@ -3,6 +3,7 @@ import { invalidValueMessage, successMessage } from "../../cli/output.js";
3
3
  import { formatCommentBodyForCommit } from "../../shared/comment-format.js";
4
4
  import { CliError } from "../../shared/errors.js";
5
5
  import { commitFromComment } from "../guard/index.js";
6
+ import { ensureActionApproved } from "../shared/approval-requirements.js";
6
7
  import { loadCommandContext, loadTaskFromContext, } from "../shared/task-backend.js";
7
8
  import { backendIsLocalFileBackend, getTaskStore } from "../shared/task-store.js";
8
9
  import { readDirectWorkLock } from "../../shared/direct-work-lock.js";
@@ -11,6 +12,14 @@ export async function cmdBlock(opts) {
11
12
  try {
12
13
  const ctx = opts.ctx ??
13
14
  (await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
15
+ if (opts.force) {
16
+ await ensureActionApproved({
17
+ action: "force_action",
18
+ config: ctx.config,
19
+ yes: opts.yes === true,
20
+ reason: "block --force",
21
+ });
22
+ }
14
23
  if (opts.commitFromComment) {
15
24
  enforceStatusCommitPolicy({
16
25
  policy: ctx.config.status_commit_policy,
@@ -11,6 +11,7 @@ export declare function cmdFinish(opts: {
11
11
  breaking: boolean;
12
12
  commit?: string;
13
13
  force: boolean;
14
+ yes?: boolean;
14
15
  commitFromComment: boolean;
15
16
  commitEmoji?: string;
16
17
  commitAllow: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"finish.d.ts","sourceRoot":"","sources":["../../../src/commands/task/finish.ts"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAiCnC,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,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,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,wBAAwB,EAAE,OAAO,CAAC;IAClC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAyQlB"}
1
+ {"version":3,"file":"finish.d.ts","sourceRoot":"","sources":["../../../src/commands/task/finish.ts"],"names":[],"mappings":"AAUA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAiCnC,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,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,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,wBAAwB,EAAE,OAAO,CAAC;IAClC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAiRlB"}
@@ -5,6 +5,7 @@ import { CliError } from "../../shared/errors.js";
5
5
  import { readFile, rm } from "node:fs/promises";
6
6
  import path from "node:path";
7
7
  import { buildGitCommitEnv, commitFromComment } from "../guard/index.js";
8
+ import { ensureActionApproved } from "../shared/approval-requirements.js";
8
9
  import { loadCommandContext, loadTaskFromContext, } from "../shared/task-backend.js";
9
10
  import { backendIsLocalFileBackend, getTaskStore } from "../shared/task-store.js";
10
11
  import { readDirectWorkLock } from "../../shared/direct-work-lock.js";
@@ -29,6 +30,14 @@ export async function cmdFinish(opts) {
29
30
  try {
30
31
  const ctx = opts.ctx ??
31
32
  (await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
33
+ if (opts.force) {
34
+ await ensureActionApproved({
35
+ action: "force_action",
36
+ config: ctx.config,
37
+ yes: opts.yes === true,
38
+ reason: "finish --force",
39
+ });
40
+ }
32
41
  const { prefix, min_chars: minChars } = ctx.config.tasks.comments.verified;
33
42
  requireStructuredComment(opts.body, prefix, minChars);
34
43
  if (opts.commitFromComment || opts.statusCommit) {
@@ -4,6 +4,7 @@ export type TaskMigrateParsed = {
4
4
  source?: string;
5
5
  quiet: boolean;
6
6
  force: boolean;
7
+ yes: boolean;
7
8
  };
8
9
  export declare const taskMigrateSpec: CommandSpec<TaskMigrateParsed>;
9
10
  export declare function makeRunTaskMigrateHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: TaskMigrateParsed) => Promise<number>;
@@ -1 +1 @@
1
- {"version":3,"file":"migrate.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/migrate.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,iBAAiB,CAoC1D,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC1E,KAAK,UAAU,EAAE,GAAG,iBAAiB,KAAG,OAAO,CAAC,MAAM,CAAC,CAUtE"}
1
+ {"version":3,"file":"migrate.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/migrate.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,iBAAiB,CA2C1D,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC1E,KAAK,UAAU,EAAE,GAAG,iBAAiB,KAAG,OAAO,CAAC,MAAM,CAAC,CAWtE"}
@@ -22,6 +22,12 @@ export const taskMigrateSpec = {
22
22
  default: false,
23
23
  description: "Accepted for parity; currently has no additional checks in the node CLI.",
24
24
  },
25
+ {
26
+ kind: "boolean",
27
+ name: "yes",
28
+ default: false,
29
+ description: "Auto-approve force-action approval checks when required.",
30
+ },
25
31
  ],
26
32
  examples: [
27
33
  { cmd: "agentplane task migrate", why: "Import from the default export path." },
@@ -34,6 +40,7 @@ export const taskMigrateSpec = {
34
40
  source: typeof raw.opts.source === "string" ? raw.opts.source : undefined,
35
41
  quiet: raw.opts.quiet === true,
36
42
  force: raw.opts.force === true,
43
+ yes: raw.opts.yes === true,
37
44
  }),
38
45
  };
39
46
  export function makeRunTaskMigrateHandler(getCtx) {
@@ -45,6 +52,7 @@ export function makeRunTaskMigrateHandler(getCtx) {
45
52
  source: p.source,
46
53
  quiet: p.quiet,
47
54
  force: p.force,
55
+ yes: p.yes,
48
56
  });
49
57
  };
50
58
  }
@@ -6,5 +6,6 @@ export declare function cmdTaskMigrate(opts: {
6
6
  source?: string;
7
7
  quiet: boolean;
8
8
  force: boolean;
9
+ yes?: boolean;
9
10
  }): Promise<number>;
10
11
  //# sourceMappingURL=migrate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/commands/task/migrate.ts"],"names":[],"mappings":"AAMA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CA8BlB"}
1
+ {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/commands/task/migrate.ts"],"names":[],"mappings":"AAOA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,GAAG,OAAO,CAAC,MAAM,CAAC,CAmClB"}
@@ -2,14 +2,20 @@ import { readFile } from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  import { mapBackendError } from "../../cli/error-map.js";
4
4
  import { successMessage } from "../../cli/output.js";
5
+ import { ensureActionApproved } from "../shared/approval-requirements.js";
5
6
  import { loadCommandContext } from "../shared/task-backend.js";
6
7
  export async function cmdTaskMigrate(opts) {
7
- if (opts.force) {
8
- // Force is accepted for parity; no additional checks in node CLI.
9
- }
10
8
  try {
11
9
  const ctx = opts.ctx ??
12
10
  (await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
11
+ if (opts.force) {
12
+ await ensureActionApproved({
13
+ action: "force_action",
14
+ config: ctx.config,
15
+ yes: opts.yes === true,
16
+ reason: "task migrate --force",
17
+ });
18
+ }
13
19
  const backend = ctx.taskBackend;
14
20
  const resolved = ctx.resolvedProject;
15
21
  const config = ctx.config;
@@ -3,6 +3,7 @@ import type { CommandContext } from "../shared/task-backend.js";
3
3
  export type TaskNormalizeParsed = {
4
4
  quiet: boolean;
5
5
  force: boolean;
6
+ yes: boolean;
6
7
  };
7
8
  export declare const taskNormalizeSpec: CommandSpec<TaskNormalizeParsed>;
8
9
  export declare function makeRunTaskNormalizeHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: TaskNormalizeParsed) => Promise<number>;
@@ -1 +1 @@
1
- {"version":3,"file":"normalize.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/normalize.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CA0B9D,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC5E,KAAK,UAAU,EAAE,GAAG,mBAAmB,KAAG,OAAO,CAAC,MAAM,CAAC,CASxE"}
1
+ {"version":3,"file":"normalize.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/normalize.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAiC9D,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC5E,KAAK,UAAU,EAAE,GAAG,mBAAmB,KAAG,OAAO,CAAC,MAAM,CAAC,CAUxE"}
@@ -16,6 +16,12 @@ export const taskNormalizeSpec = {
16
16
  default: false,
17
17
  description: "Accepted for parity; currently has no additional checks in the node CLI.",
18
18
  },
19
+ {
20
+ kind: "boolean",
21
+ name: "yes",
22
+ default: false,
23
+ description: "Auto-approve force-action approval checks when required.",
24
+ },
19
25
  ],
20
26
  examples: [
21
27
  { cmd: "agentplane task normalize", why: "Normalize tasks and print a short summary." },
@@ -24,6 +30,7 @@ export const taskNormalizeSpec = {
24
30
  parse: (raw) => ({
25
31
  quiet: raw.opts.quiet === true,
26
32
  force: raw.opts.force === true,
33
+ yes: raw.opts.yes === true,
27
34
  }),
28
35
  };
29
36
  export function makeRunTaskNormalizeHandler(getCtx) {
@@ -34,6 +41,7 @@ export function makeRunTaskNormalizeHandler(getCtx) {
34
41
  rootOverride: ctx.rootOverride,
35
42
  quiet: p.quiet,
36
43
  force: p.force,
44
+ yes: p.yes,
37
45
  });
38
46
  };
39
47
  }
@@ -5,5 +5,6 @@ export declare function cmdTaskNormalize(opts: {
5
5
  rootOverride?: string;
6
6
  quiet: boolean;
7
7
  force: boolean;
8
+ yes?: boolean;
8
9
  }): Promise<number>;
9
10
  //# sourceMappingURL=normalize.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../src/commands/task/normalize.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAiClB"}
1
+ {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../src/commands/task/normalize.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,wBAAsB,gBAAgB,CAAC,IAAI,EAAE;IAC3C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,GAAG,OAAO,CAAC,MAAM,CAAC,CAsClB"}
@@ -1,13 +1,19 @@
1
1
  import { mapBackendError } from "../../cli/error-map.js";
2
2
  import { successMessage } from "../../cli/output.js";
3
+ import { ensureActionApproved } from "../shared/approval-requirements.js";
3
4
  import { loadCommandContext } from "../shared/task-backend.js";
4
5
  export async function cmdTaskNormalize(opts) {
5
- if (opts.force) {
6
- // Force is accepted for parity; no additional checks in node CLI.
7
- }
8
6
  try {
9
7
  const ctx = opts.ctx ??
10
8
  (await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
9
+ if (opts.force) {
10
+ await ensureActionApproved({
11
+ action: "force_action",
12
+ config: ctx.config,
13
+ yes: opts.yes === true,
14
+ reason: "task normalize --force",
15
+ });
16
+ }
11
17
  if (ctx.taskBackend.normalizeTasks) {
12
18
  const result = await ctx.taskBackend.normalizeTasks();
13
19
  if (!opts.quiet) {
@@ -5,6 +5,7 @@ export type TaskScaffoldParsed = {
5
5
  title?: string;
6
6
  overwrite: boolean;
7
7
  force: boolean;
8
+ yes: boolean;
8
9
  quiet: boolean;
9
10
  };
10
11
  export declare const taskScaffoldSpec: CommandSpec<TaskScaffoldParsed>;
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/scaffold.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,kBAAkB,CAwD5D,CAAC;AAEF,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC3E,KAAK,UAAU,EAAE,GAAG,kBAAkB,KAAG,OAAO,CAAC,MAAM,CAAC,CAYvE"}
1
+ {"version":3,"file":"scaffold.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/scaffold.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,kBAAkB,CA+D5D,CAAC;AAEF,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC3E,KAAK,UAAU,EAAE,GAAG,kBAAkB,KAAG,OAAO,CAAC,MAAM,CAAC,CAavE"}
@@ -24,6 +24,12 @@ export const taskScaffoldSpec = {
24
24
  default: false,
25
25
  description: "Allow scaffolding even if the task is missing from the backend.",
26
26
  },
27
+ {
28
+ kind: "boolean",
29
+ name: "yes",
30
+ default: false,
31
+ description: "Auto-approve force-action approval checks when required.",
32
+ },
27
33
  {
28
34
  kind: "boolean",
29
35
  name: "quiet",
@@ -53,6 +59,7 @@ export const taskScaffoldSpec = {
53
59
  title: typeof raw.opts.title === "string" ? raw.opts.title : undefined,
54
60
  overwrite: raw.opts.overwrite === true,
55
61
  force: raw.opts.force === true,
62
+ yes: raw.opts.yes === true,
56
63
  quiet: raw.opts.quiet === true,
57
64
  };
58
65
  },
@@ -67,6 +74,7 @@ export function makeRunTaskScaffoldHandler(getCtx) {
67
74
  title: p.title,
68
75
  overwrite: p.overwrite,
69
76
  force: p.force,
77
+ yes: p.yes,
70
78
  quiet: p.quiet,
71
79
  });
72
80
  };
@@ -7,6 +7,7 @@ export declare function cmdTaskScaffold(opts: {
7
7
  title?: string;
8
8
  overwrite: boolean;
9
9
  force: boolean;
10
+ yes?: boolean;
10
11
  quiet: boolean;
11
12
  }): Promise<number>;
12
13
  //# sourceMappingURL=scaffold.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../src/commands/task/scaffold.ts"],"names":[],"mappings":"AAcA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AA6BnC,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CA+GlB"}
1
+ {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../src/commands/task/scaffold.ts"],"names":[],"mappings":"AAcA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AA8BnC,wBAAsB,eAAe,CAAC,IAAI,EAAE;IAC1C,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAuHlB"}
@@ -7,6 +7,7 @@ import { CliError } from "../../shared/errors.js";
7
7
  import { loadCommandContext, taskDataToFrontmatter, } from "../shared/task-backend.js";
8
8
  import { writeTextIfChanged } from "../../shared/write-if-changed.js";
9
9
  import { nowIso } from "./shared.js";
10
+ import { ensureActionApproved } from "../shared/approval-requirements.js";
10
11
  function insertMarkdownSectionBefore(opts) {
11
12
  const normalized = opts.body.replaceAll("\r\n", "\n");
12
13
  if (normalized.includes(`## ${opts.section}`)) {
@@ -28,6 +29,14 @@ export async function cmdTaskScaffold(opts) {
28
29
  try {
29
30
  const ctx = opts.ctx ??
30
31
  (await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
32
+ if (opts.force) {
33
+ await ensureActionApproved({
34
+ action: "force_action",
35
+ config: ctx.config,
36
+ yes: opts.yes === true,
37
+ reason: "task scaffold --force",
38
+ });
39
+ }
31
40
  const backend = ctx.taskBackend;
32
41
  const resolved = ctx.resolvedProject;
33
42
  const config = ctx.config;
@@ -7,6 +7,7 @@ export type TaskSetStatusParsed = {
7
7
  body?: string;
8
8
  commit?: string;
9
9
  force: boolean;
10
+ yes: boolean;
10
11
  commitFromComment: boolean;
11
12
  commitEmoji?: string;
12
13
  commitAllow: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"set-status.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/set-status.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,mBAAmB,GAAG;IAChC,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,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CA6I9D,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC5E,KAAK,UAAU,EAAE,GAAG,mBAAmB,KAAG,OAAO,CAAC,MAAM,CAAC,CAqBxE"}
1
+ {"version":3,"file":"set-status.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/set-status.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,MAAM,mBAAmB,GAAG;IAChC,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,GAAG,EAAE,OAAO,CAAC;IACb,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,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAoJ9D,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IAC5E,KAAK,UAAU,EAAE,GAAG,mBAAmB,KAAG,OAAO,CAAC,MAAM,CAAC,CAsBxE"}
@@ -34,6 +34,12 @@ export const taskSetStatusSpec = {
34
34
  default: false,
35
35
  description: "Allow unsafe transitions (and DONE without using agentplane finish).",
36
36
  },
37
+ {
38
+ kind: "boolean",
39
+ name: "yes",
40
+ default: false,
41
+ description: "Auto-approve force-action approval checks when required.",
42
+ },
37
43
  {
38
44
  kind: "boolean",
39
45
  name: "commit-from-comment",
@@ -129,6 +135,7 @@ export const taskSetStatusSpec = {
129
135
  body: typeof raw.opts.body === "string" ? raw.opts.body : undefined,
130
136
  commit: typeof raw.opts.commit === "string" ? raw.opts.commit : undefined,
131
137
  force: raw.opts.force === true,
138
+ yes: raw.opts.yes === true,
132
139
  commitFromComment: raw.opts["commit-from-comment"] === true,
133
140
  commitEmoji: typeof raw.opts["commit-emoji"] === "string" ? raw.opts["commit-emoji"] : undefined,
134
141
  commitAllow,
@@ -152,6 +159,7 @@ export function makeRunTaskSetStatusHandler(getCtx) {
152
159
  body: p.body,
153
160
  commit: p.commit,
154
161
  force: p.force,
162
+ yes: p.yes,
155
163
  commitFromComment: p.commitFromComment,
156
164
  commitEmoji: p.commitEmoji,
157
165
  commitAllow: p.commitAllow,
@@ -9,6 +9,7 @@ export declare function cmdTaskSetStatus(opts: {
9
9
  body?: string;
10
10
  commit?: string;
11
11
  force: boolean;
12
+ yes: boolean;
12
13
  commitFromComment: boolean;
13
14
  commitEmoji?: string;
14
15
  commitAllow: string[];
@@ -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,CAiKlB"}
1
+ {"version":3,"file":"set-status.d.ts","sourceRoot":"","sources":["../../../src/commands/task/set-status.ts"],"names":[],"mappings":"AAQA,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,GAAG,EAAE,OAAO,CAAC;IACb,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,CA0JlB"}
@@ -3,6 +3,7 @@ import { successMessage, warnMessage } from "../../cli/output.js";
3
3
  import { formatCommentBodyForCommit } from "../../shared/comment-format.js";
4
4
  import { CliError } from "../../shared/errors.js";
5
5
  import { commitFromComment } from "../guard/index.js";
6
+ import { ensureActionApproved } from "../shared/approval-requirements.js";
6
7
  import { listTasksMemo, loadCommandContext, loadTaskFromContext, resolveDocUpdatedBy, } from "../shared/task-backend.js";
7
8
  import { backendIsLocalFileBackend, getTaskStore } from "../shared/task-store.js";
8
9
  import { appendTaskEvent, buildDependencyState, defaultCommitEmojiForStatus, enforceStatusCommitPolicy, isTransitionAllowed, normalizeTaskStatus, nowIso, readCommitInfo, } from "./shared.js";
@@ -26,14 +27,12 @@ export async function cmdTaskSetStatus(opts) {
26
27
  const ctx = opts.ctx ??
27
28
  (await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
28
29
  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.",
30
+ if (opts.force) {
31
+ await ensureActionApproved({
32
+ action: "force_action",
33
+ config,
34
+ yes: opts.yes,
35
+ reason: "task set-status --force",
37
36
  });
38
37
  }
39
38
  const resolved = ctx.resolvedProject;
@@ -14,6 +14,7 @@ export declare function cmdStart(opts: {
14
14
  commitRequireClean: boolean;
15
15
  confirmStatusCommit: boolean;
16
16
  force: boolean;
17
+ yes?: boolean;
17
18
  quiet: boolean;
18
19
  }): Promise<number>;
19
20
  //# sourceMappingURL=start.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/commands/task/start.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAoBnC,wBAAsB,QAAQ,CAAC,IAAI,EAAE;IACnC,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,IAAI,EAAE,MAAM,CAAC;IACb,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;IACf,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CA2LlB"}
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../../src/commands/task/start.ts"],"names":[],"mappings":"AAQA,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAoBnC,wBAAsB,QAAQ,CAAC,IAAI,EAAE;IACnC,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,IAAI,EAAE,MAAM,CAAC;IACb,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;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAoMlB"}
@@ -3,6 +3,7 @@ import { invalidValueMessage, successMessage, warnMessage } from "../../cli/outp
3
3
  import { formatCommentBodyForCommit } from "../../shared/comment-format.js";
4
4
  import { CliError } from "../../shared/errors.js";
5
5
  import { commitFromComment } from "../guard/index.js";
6
+ import { ensureActionApproved } from "../shared/approval-requirements.js";
6
7
  import { listTasksMemo, loadCommandContext, loadTaskFromContext, } from "../shared/task-backend.js";
7
8
  import { backendIsLocalFileBackend, getTaskStore } from "../shared/task-store.js";
8
9
  import { readDirectWorkLock } from "../../shared/direct-work-lock.js";
@@ -11,6 +12,14 @@ export async function cmdStart(opts) {
11
12
  try {
12
13
  const ctx = opts.ctx ??
13
14
  (await loadCommandContext({ cwd: opts.cwd, rootOverride: opts.rootOverride ?? null }));
15
+ if (opts.force) {
16
+ await ensureActionApproved({
17
+ action: "force_action",
18
+ config: ctx.config,
19
+ yes: opts.yes === true,
20
+ reason: "start --force",
21
+ });
22
+ }
14
23
  if (opts.commitFromComment) {
15
24
  enforceStatusCommitPolicy({
16
25
  policy: ctx.config.status_commit_policy,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentplane",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "description": "Agent Plane CLI for task workflows, recipes, and project automation.",
5
5
  "keywords": [
6
6
  "agentplane",
@@ -54,7 +54,7 @@
54
54
  "prepublishOnly": "npm run prepack"
55
55
  },
56
56
  "dependencies": {
57
- "@agentplaneorg/core": "0.2.6",
57
+ "@agentplaneorg/core": "0.2.17",
58
58
  "yauzl": "^2.10.0"
59
59
  },
60
60
  "devDependencies": {