agentplane 0.2.6 → 0.2.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/README.md +11 -0
- package/assets/AGENTS.md +35 -0
- package/assets/agents/CODER.json +0 -1
- package/assets/agents/INTEGRATOR.json +0 -1
- package/assets/agents/ORCHESTRATOR.json +1 -2
- package/assets/agents/PLANNER.json +1 -3
- package/assets/agents/TESTER.json +0 -1
- package/assets/agents/UPGRADER.json +17 -15
- package/dist/cli/archive.d.ts.map +1 -1
- package/dist/cli/archive.js +61 -36
- package/dist/cli/command-guide.d.ts.map +1 -1
- package/dist/cli/command-guide.js +5 -3
- package/dist/cli/run-cli/command-catalog.d.ts +4 -1
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog.js +44 -26
- package/dist/cli/run-cli/commands/config.d.ts +5 -4
- package/dist/cli/run-cli/commands/config.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/config.js +47 -58
- package/dist/cli/run-cli/commands/core.d.ts +2 -1
- package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core.js +187 -51
- package/dist/cli/run-cli/commands/ide.d.ts +3 -1
- package/dist/cli/run-cli/commands/ide.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/ide.js +7 -12
- package/dist/cli/run-cli/commands/init/ide-sync.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/ide-sync.js +10 -1
- package/dist/cli/run-cli/commands/init/write-agents.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/write-agents.js +4 -24
- package/dist/cli/run-cli/commands/init/write-gitignore.d.ts +5 -0
- package/dist/cli/run-cli/commands/init/write-gitignore.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/init/write-gitignore.js +48 -0
- package/dist/cli/run-cli/commands/init.d.ts +1 -0
- package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init.js +34 -8
- package/dist/cli/run-cli/commands/wrap-command.d.ts +6 -0
- package/dist/cli/run-cli/commands/wrap-command.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/wrap-command.js +17 -0
- package/dist/cli/run-cli/registry.run.d.ts +6 -2
- package/dist/cli/run-cli/registry.run.d.ts.map +1 -1
- package/dist/cli/run-cli/registry.run.js +7 -2
- package/dist/cli/run-cli.d.ts.map +1 -1
- package/dist/cli/run-cli.js +96 -75
- package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
- package/dist/cli/run-cli.test-helpers.js +99 -3
- package/dist/cli/spec/parse-utils.d.ts +11 -0
- package/dist/cli/spec/parse-utils.d.ts.map +1 -0
- package/dist/cli/spec/parse-utils.js +28 -0
- package/dist/commands/block.command.d.ts +3 -18
- package/dist/commands/block.command.d.ts.map +1 -1
- package/dist/commands/block.command.js +2 -143
- package/dist/commands/block.run.d.ts +5 -0
- package/dist/commands/block.run.d.ts.map +1 -0
- package/dist/commands/block.run.js +22 -0
- package/dist/commands/block.spec.d.ts +17 -0
- package/dist/commands/block.spec.d.ts.map +1 -0
- package/dist/commands/block.spec.js +115 -0
- package/dist/commands/doctor.command.d.ts +2 -7
- package/dist/commands/doctor.command.d.ts.map +1 -1
- package/dist/commands/doctor.command.js +2 -137
- package/dist/commands/doctor.run.d.ts +4 -0
- package/dist/commands/doctor.run.d.ts.map +1 -0
- package/dist/commands/doctor.run.js +174 -0
- package/dist/commands/doctor.spec.d.ts +7 -0
- package/dist/commands/doctor.spec.d.ts.map +1 -0
- package/dist/commands/doctor.spec.js +20 -0
- package/dist/commands/finish.command.d.ts +3 -27
- package/dist/commands/finish.command.d.ts.map +1 -1
- package/dist/commands/finish.command.js +2 -237
- package/dist/commands/finish.run.d.ts +5 -0
- package/dist/commands/finish.run.d.ts.map +1 -0
- package/dist/commands/finish.run.js +40 -0
- package/dist/commands/finish.spec.d.ts +26 -0
- package/dist/commands/finish.spec.d.ts.map +1 -0
- package/dist/commands/finish.spec.js +193 -0
- package/dist/commands/recipes/install.command.d.ts +2 -11
- package/dist/commands/recipes/install.command.d.ts.map +1 -1
- package/dist/commands/recipes/install.command.js +2 -161
- package/dist/commands/recipes/install.run.d.ts +4 -0
- package/dist/commands/recipes/install.run.d.ts.map +1 -0
- package/dist/commands/recipes/install.run.js +23 -0
- package/dist/commands/recipes/install.spec.d.ts +11 -0
- package/dist/commands/recipes/install.spec.d.ts.map +1 -0
- package/dist/commands/recipes/install.spec.js +140 -0
- package/dist/commands/release/apply.command.d.ts +11 -0
- package/dist/commands/release/apply.command.d.ts.map +1 -0
- package/dist/commands/release/apply.command.js +343 -0
- package/dist/commands/release/plan.command.d.ts +12 -0
- package/dist/commands/release/plan.command.d.ts.map +1 -0
- package/dist/commands/release/plan.command.js +206 -0
- package/dist/commands/release/release.command.d.ts +5 -0
- package/dist/commands/release/release.command.d.ts.map +1 -0
- package/dist/commands/release/release.command.js +18 -0
- package/dist/commands/shared/git-context.d.ts +3 -0
- package/dist/commands/shared/git-context.d.ts.map +1 -1
- package/dist/commands/shared/git-context.js +10 -0
- package/dist/commands/shared/task-backend.d.ts +1 -0
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/start.command.d.ts +3 -18
- package/dist/commands/start.command.d.ts.map +1 -1
- package/dist/commands/start.command.js +2 -143
- package/dist/commands/start.run.d.ts +5 -0
- package/dist/commands/start.run.d.ts.map +1 -0
- package/dist/commands/start.run.js +22 -0
- package/dist/commands/start.spec.d.ts +17 -0
- package/dist/commands/start.spec.d.ts.map +1 -0
- package/dist/commands/start.spec.js +115 -0
- package/dist/commands/task/add.command.d.ts.map +1 -1
- package/dist/commands/task/add.command.js +1 -7
- package/dist/commands/task/derive.command.d.ts.map +1 -1
- package/dist/commands/task/derive.command.js +1 -7
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +34 -2
- package/dist/commands/task/list.command.d.ts +3 -8
- package/dist/commands/task/list.command.d.ts.map +1 -1
- package/dist/commands/task/list.command.js +2 -67
- package/dist/commands/task/list.run.d.ts +5 -0
- package/dist/commands/task/list.run.d.ts.map +1 -0
- package/dist/commands/task/list.run.js +10 -0
- package/dist/commands/task/list.spec.d.ts +7 -0
- package/dist/commands/task/list.spec.d.ts.map +1 -0
- package/dist/commands/task/list.spec.js +51 -0
- package/dist/commands/task/next.command.d.ts +3 -8
- package/dist/commands/task/next.command.d.ts.map +1 -1
- package/dist/commands/task/next.command.js +2 -89
- package/dist/commands/task/next.run.d.ts +5 -0
- package/dist/commands/task/next.run.d.ts.map +1 -0
- package/dist/commands/task/next.run.js +11 -0
- package/dist/commands/task/next.spec.d.ts +7 -0
- package/dist/commands/task/next.spec.d.ts.map +1 -0
- package/dist/commands/task/next.spec.js +69 -0
- package/dist/commands/task/search.command.d.ts +3 -10
- package/dist/commands/task/search.command.d.ts.map +1 -1
- package/dist/commands/task/search.command.js +2 -101
- package/dist/commands/task/search.run.d.ts +5 -0
- package/dist/commands/task/search.run.d.ts.map +1 -0
- package/dist/commands/task/search.run.js +13 -0
- package/dist/commands/task/search.spec.d.ts +9 -0
- package/dist/commands/task/search.spec.d.ts.map +1 -0
- package/dist/commands/task/search.spec.js +79 -0
- package/dist/commands/task/set-status.command.d.ts.map +1 -1
- package/dist/commands/task/set-status.command.js +1 -7
- package/dist/commands/task/shared.d.ts.map +1 -1
- package/dist/commands/task/shared.js +15 -8
- package/dist/commands/task/show.command.d.ts +3 -7
- package/dist/commands/task/show.command.d.ts.map +1 -1
- package/dist/commands/task/show.command.js +2 -19
- package/dist/commands/task/show.run.d.ts +5 -0
- package/dist/commands/task/show.run.d.ts.map +1 -0
- package/dist/commands/task/show.run.js +11 -0
- package/dist/commands/task/show.spec.d.ts +6 -0
- package/dist/commands/task/show.spec.d.ts.map +1 -0
- package/dist/commands/task/show.spec.js +8 -0
- package/dist/commands/task/update.command.d.ts.map +1 -1
- package/dist/commands/task/update.command.js +1 -7
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +171 -32
- package/dist/commands/verify.command.d.ts +3 -15
- package/dist/commands/verify.command.d.ts.map +1 -1
- package/dist/commands/verify.command.js +2 -113
- package/dist/commands/verify.run.d.ts +5 -0
- package/dist/commands/verify.run.d.ts.map +1 -0
- package/dist/commands/verify.run.js +17 -0
- package/dist/commands/verify.spec.d.ts +14 -0
- package/dist/commands/verify.spec.d.ts.map +1 -0
- package/dist/commands/verify.spec.js +96 -0
- package/package.json +1 -1
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
taskId: string;
|
|
5
|
-
author: string;
|
|
6
|
-
body: string;
|
|
7
|
-
commitFromComment: boolean;
|
|
8
|
-
commitEmoji?: string;
|
|
9
|
-
commitAllow: string[];
|
|
10
|
-
commitAutoAllow: boolean;
|
|
11
|
-
commitAllowTasks: boolean;
|
|
12
|
-
commitRequireClean: boolean;
|
|
13
|
-
confirmStatusCommit: boolean;
|
|
14
|
-
force: boolean;
|
|
15
|
-
quiet: boolean;
|
|
16
|
-
};
|
|
17
|
-
export declare const startSpec: CommandSpec<StartParsed>;
|
|
18
|
-
export declare function makeRunStartHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: StartParsed) => Promise<number>;
|
|
1
|
+
export { startSpec } from "./start.spec.js";
|
|
2
|
+
export type { StartParsed } from "./start.spec.js";
|
|
3
|
+
export { makeRunStartHandler } from "./start.run.js";
|
|
19
4
|
//# sourceMappingURL=start.command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.command.d.ts","sourceRoot":"","sources":["../../src/commands/start.command.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"start.command.d.ts","sourceRoot":"","sources":["../../src/commands/start.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,143 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function toStringList(v) {
|
|
4
|
-
if (typeof v === "string")
|
|
5
|
-
return [v];
|
|
6
|
-
if (Array.isArray(v))
|
|
7
|
-
return v.filter((x) => typeof x === "string");
|
|
8
|
-
return [];
|
|
9
|
-
}
|
|
10
|
-
export const startSpec = {
|
|
11
|
-
id: ["start"],
|
|
12
|
-
group: "Lifecycle",
|
|
13
|
-
summary: "Transition a task to DOING and record a structured Start comment.",
|
|
14
|
-
args: [
|
|
15
|
-
{
|
|
16
|
-
name: "task-id",
|
|
17
|
-
required: true,
|
|
18
|
-
valueHint: "<task-id>",
|
|
19
|
-
description: "Existing task id.",
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
options: [
|
|
23
|
-
{
|
|
24
|
-
kind: "string",
|
|
25
|
-
name: "author",
|
|
26
|
-
valueHint: "<id>",
|
|
27
|
-
required: true,
|
|
28
|
-
description: "Comment author id (e.g. CODER).",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
kind: "string",
|
|
32
|
-
name: "body",
|
|
33
|
-
valueHint: "<text>",
|
|
34
|
-
required: true,
|
|
35
|
-
description: "Structured comment body (must match the configured Start: prefix).",
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
kind: "boolean",
|
|
39
|
-
name: "commit-from-comment",
|
|
40
|
-
default: false,
|
|
41
|
-
description: "Create a status commit using the comment body.",
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
kind: "string",
|
|
45
|
-
name: "commit-emoji",
|
|
46
|
-
valueHint: "<emoji>",
|
|
47
|
-
description: "Override the status commit emoji (used with --commit-from-comment).",
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
kind: "string",
|
|
51
|
-
name: "commit-allow",
|
|
52
|
-
valueHint: "<path-prefix>",
|
|
53
|
-
repeatable: true,
|
|
54
|
-
description: "Repeatable. Allowlist path prefixes to stage for the status commit (used with --commit-from-comment).",
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
kind: "boolean",
|
|
58
|
-
name: "commit-auto-allow",
|
|
59
|
-
default: false,
|
|
60
|
-
description: "Auto-allow inferred allowlist paths if none are provided (used with --commit-from-comment).",
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
kind: "boolean",
|
|
64
|
-
name: "commit-allow-tasks",
|
|
65
|
-
default: true,
|
|
66
|
-
hidden: true,
|
|
67
|
-
description: "Deprecated. Tasks are always allowed for status commits.",
|
|
68
|
-
deprecated: "no-op",
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
kind: "boolean",
|
|
72
|
-
name: "commit-require-clean",
|
|
73
|
-
default: false,
|
|
74
|
-
description: "Require a clean working tree for the status commit (used with --commit-from-comment).",
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
kind: "boolean",
|
|
78
|
-
name: "confirm-status-commit",
|
|
79
|
-
default: false,
|
|
80
|
-
description: "Confirm status commit creation when status_commit_policy=confirm (used with --commit-from-comment).",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
kind: "boolean",
|
|
84
|
-
name: "force",
|
|
85
|
-
default: false,
|
|
86
|
-
description: "Override readiness checks and status transition restrictions.",
|
|
87
|
-
},
|
|
88
|
-
{ kind: "boolean", name: "quiet", default: false, description: "Suppress output." },
|
|
89
|
-
],
|
|
90
|
-
examples: [
|
|
91
|
-
{
|
|
92
|
-
cmd: 'agentplane start 202602030608-F1Q8AB --author CODER --body "Start: implement spec-driven CLI"',
|
|
93
|
-
why: "Start work on a task.",
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
cmd: 'agentplane start 202602030608-F1Q8AB --author CODER --body "Start: implement spec-driven CLI" --commit-from-comment --commit-allow packages/agentplane/src',
|
|
97
|
-
why: "Start work and create a status commit from the comment.",
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
validateRaw: (raw) => {
|
|
101
|
-
const author = typeof raw.opts.author === "string" ? raw.opts.author.trim() : "";
|
|
102
|
-
const body = typeof raw.opts.body === "string" ? raw.opts.body.trim() : "";
|
|
103
|
-
if (!author)
|
|
104
|
-
throw usageError({ spec: startSpec, message: "Invalid value for --author: empty." });
|
|
105
|
-
if (!body)
|
|
106
|
-
throw usageError({ spec: startSpec, message: "Invalid value for --body: empty." });
|
|
107
|
-
},
|
|
108
|
-
parse: (raw) => ({
|
|
109
|
-
taskId: typeof raw.args["task-id"] === "string" ? raw.args["task-id"] : "",
|
|
110
|
-
author: raw.opts.author,
|
|
111
|
-
body: raw.opts.body,
|
|
112
|
-
commitFromComment: raw.opts["commit-from-comment"] === true,
|
|
113
|
-
commitEmoji: raw.opts["commit-emoji"],
|
|
114
|
-
commitAllow: toStringList(raw.opts["commit-allow"]),
|
|
115
|
-
commitAutoAllow: raw.opts["commit-auto-allow"] === true,
|
|
116
|
-
commitAllowTasks: raw.opts["commit-allow-tasks"] !== false,
|
|
117
|
-
commitRequireClean: raw.opts["commit-require-clean"] === true,
|
|
118
|
-
confirmStatusCommit: raw.opts["confirm-status-commit"] === true,
|
|
119
|
-
force: raw.opts.force === true,
|
|
120
|
-
quiet: raw.opts.quiet === true,
|
|
121
|
-
}),
|
|
122
|
-
};
|
|
123
|
-
export function makeRunStartHandler(getCtx) {
|
|
124
|
-
return async (ctx, p) => {
|
|
125
|
-
return await cmdStart({
|
|
126
|
-
ctx: await getCtx("start"),
|
|
127
|
-
cwd: ctx.cwd,
|
|
128
|
-
rootOverride: ctx.rootOverride,
|
|
129
|
-
taskId: p.taskId,
|
|
130
|
-
author: p.author,
|
|
131
|
-
body: p.body,
|
|
132
|
-
commitFromComment: p.commitFromComment,
|
|
133
|
-
commitEmoji: p.commitEmoji,
|
|
134
|
-
commitAllow: p.commitAllow,
|
|
135
|
-
commitAutoAllow: p.commitAutoAllow,
|
|
136
|
-
commitAllowTasks: p.commitAllowTasks,
|
|
137
|
-
commitRequireClean: p.commitRequireClean,
|
|
138
|
-
confirmStatusCommit: p.confirmStatusCommit,
|
|
139
|
-
force: p.force,
|
|
140
|
-
quiet: p.quiet,
|
|
141
|
-
});
|
|
142
|
-
};
|
|
143
|
-
}
|
|
1
|
+
export { startSpec } from "./start.spec.js";
|
|
2
|
+
export { makeRunStartHandler } from "./start.run.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CommandCtx } from "../cli/spec/spec.js";
|
|
2
|
+
import type { CommandContext } from "./shared/task-backend.js";
|
|
3
|
+
import type { StartParsed } from "./start.spec.js";
|
|
4
|
+
export declare function makeRunStartHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: StartParsed) => Promise<number>;
|
|
5
|
+
//# sourceMappingURL=start.run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start.run.d.ts","sourceRoot":"","sources":["../../src/commands/start.run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IACpE,KAAK,UAAU,EAAE,GAAG,WAAW,KAAG,OAAO,CAAC,MAAM,CAAC,CAmBhE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { cmdStart } from "./task/start.js";
|
|
2
|
+
export function makeRunStartHandler(getCtx) {
|
|
3
|
+
return async (ctx, p) => {
|
|
4
|
+
return await cmdStart({
|
|
5
|
+
ctx: await getCtx("start"),
|
|
6
|
+
cwd: ctx.cwd,
|
|
7
|
+
rootOverride: ctx.rootOverride,
|
|
8
|
+
taskId: p.taskId,
|
|
9
|
+
author: p.author,
|
|
10
|
+
body: p.body,
|
|
11
|
+
commitFromComment: p.commitFromComment,
|
|
12
|
+
commitEmoji: p.commitEmoji,
|
|
13
|
+
commitAllow: p.commitAllow,
|
|
14
|
+
commitAutoAllow: p.commitAutoAllow,
|
|
15
|
+
commitAllowTasks: p.commitAllowTasks,
|
|
16
|
+
commitRequireClean: p.commitRequireClean,
|
|
17
|
+
confirmStatusCommit: p.confirmStatusCommit,
|
|
18
|
+
force: p.force,
|
|
19
|
+
quiet: p.quiet,
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CommandSpec } from "../cli/spec/spec.js";
|
|
2
|
+
export type StartParsed = {
|
|
3
|
+
taskId: string;
|
|
4
|
+
author: string;
|
|
5
|
+
body: string;
|
|
6
|
+
commitFromComment: boolean;
|
|
7
|
+
commitEmoji?: string;
|
|
8
|
+
commitAllow: string[];
|
|
9
|
+
commitAutoAllow: boolean;
|
|
10
|
+
commitAllowTasks: boolean;
|
|
11
|
+
commitRequireClean: boolean;
|
|
12
|
+
confirmStatusCommit: boolean;
|
|
13
|
+
force: boolean;
|
|
14
|
+
quiet: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare const startSpec: CommandSpec<StartParsed>;
|
|
17
|
+
//# sourceMappingURL=start.spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start.spec.d.ts","sourceRoot":"","sources":["../../src/commands/start.spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAKvD,MAAM,MAAM,WAAW,GAAG;IACxB,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,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,WAAW,CAmH9C,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { usageError } from "../cli/spec/errors.js";
|
|
2
|
+
import { toStringList } from "../cli/spec/parse-utils.js";
|
|
3
|
+
export const startSpec = {
|
|
4
|
+
id: ["start"],
|
|
5
|
+
group: "Lifecycle",
|
|
6
|
+
summary: "Transition a task to DOING and record a structured Start comment.",
|
|
7
|
+
args: [
|
|
8
|
+
{
|
|
9
|
+
name: "task-id",
|
|
10
|
+
required: true,
|
|
11
|
+
valueHint: "<task-id>",
|
|
12
|
+
description: "Existing task id.",
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
kind: "string",
|
|
18
|
+
name: "author",
|
|
19
|
+
valueHint: "<id>",
|
|
20
|
+
required: true,
|
|
21
|
+
description: "Comment author id (e.g. CODER).",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
kind: "string",
|
|
25
|
+
name: "body",
|
|
26
|
+
valueHint: "<text>",
|
|
27
|
+
required: true,
|
|
28
|
+
description: "Structured comment body (must match the configured Start: prefix).",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
kind: "boolean",
|
|
32
|
+
name: "commit-from-comment",
|
|
33
|
+
default: false,
|
|
34
|
+
description: "Create a status commit using the comment body.",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
kind: "string",
|
|
38
|
+
name: "commit-emoji",
|
|
39
|
+
valueHint: "<emoji>",
|
|
40
|
+
description: "Override the status commit emoji (used with --commit-from-comment).",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
kind: "string",
|
|
44
|
+
name: "commit-allow",
|
|
45
|
+
valueHint: "<path-prefix>",
|
|
46
|
+
repeatable: true,
|
|
47
|
+
description: "Repeatable. Allowlist path prefixes to stage for the status commit (used with --commit-from-comment).",
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
kind: "boolean",
|
|
51
|
+
name: "commit-auto-allow",
|
|
52
|
+
default: false,
|
|
53
|
+
description: "Auto-allow inferred allowlist paths if none are provided (used with --commit-from-comment).",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
kind: "boolean",
|
|
57
|
+
name: "commit-allow-tasks",
|
|
58
|
+
default: true,
|
|
59
|
+
hidden: true,
|
|
60
|
+
description: "Deprecated. Tasks are always allowed for status commits.",
|
|
61
|
+
deprecated: "no-op",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
kind: "boolean",
|
|
65
|
+
name: "commit-require-clean",
|
|
66
|
+
default: false,
|
|
67
|
+
description: "Require a clean working tree for the status commit (used with --commit-from-comment).",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
kind: "boolean",
|
|
71
|
+
name: "confirm-status-commit",
|
|
72
|
+
default: false,
|
|
73
|
+
description: "Confirm status commit creation when status_commit_policy=confirm (used with --commit-from-comment).",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
kind: "boolean",
|
|
77
|
+
name: "force",
|
|
78
|
+
default: false,
|
|
79
|
+
description: "Override readiness checks and status transition restrictions.",
|
|
80
|
+
},
|
|
81
|
+
{ kind: "boolean", name: "quiet", default: false, description: "Suppress output." },
|
|
82
|
+
],
|
|
83
|
+
examples: [
|
|
84
|
+
{
|
|
85
|
+
cmd: 'agentplane start 202602030608-F1Q8AB --author CODER --body "Start: implement spec-driven CLI"',
|
|
86
|
+
why: "Start work on a task.",
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
cmd: 'agentplane start 202602030608-F1Q8AB --author CODER --body "Start: implement spec-driven CLI" --commit-from-comment --commit-allow packages/agentplane/src',
|
|
90
|
+
why: "Start work and create a status commit from the comment.",
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
validateRaw: (raw) => {
|
|
94
|
+
const author = typeof raw.opts.author === "string" ? raw.opts.author.trim() : "";
|
|
95
|
+
const body = typeof raw.opts.body === "string" ? raw.opts.body.trim() : "";
|
|
96
|
+
if (!author)
|
|
97
|
+
throw usageError({ spec: startSpec, message: "Invalid value for --author: empty." });
|
|
98
|
+
if (!body)
|
|
99
|
+
throw usageError({ spec: startSpec, message: "Invalid value for --body: empty." });
|
|
100
|
+
},
|
|
101
|
+
parse: (raw) => ({
|
|
102
|
+
taskId: typeof raw.args["task-id"] === "string" ? raw.args["task-id"] : "",
|
|
103
|
+
author: raw.opts.author,
|
|
104
|
+
body: raw.opts.body,
|
|
105
|
+
commitFromComment: raw.opts["commit-from-comment"] === true,
|
|
106
|
+
commitEmoji: raw.opts["commit-emoji"],
|
|
107
|
+
commitAllow: toStringList(raw.opts["commit-allow"]),
|
|
108
|
+
commitAutoAllow: raw.opts["commit-auto-allow"] === true,
|
|
109
|
+
commitAllowTasks: raw.opts["commit-allow-tasks"] !== false,
|
|
110
|
+
commitRequireClean: raw.opts["commit-require-clean"] === true,
|
|
111
|
+
confirmStatusCommit: raw.opts["confirm-status-commit"] === true,
|
|
112
|
+
force: raw.opts.force === true,
|
|
113
|
+
quiet: raw.opts.quiet === true,
|
|
114
|
+
}),
|
|
115
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/add.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"add.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/add.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAKhE,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAC9C,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,aAAa,CAmIlD,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IACtE,KAAK,UAAU,EAAE,GAAG,aAAa,KAAG,OAAO,CAAC,MAAM,CAAC,CAkBlE"}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
+
import { toStringList } from "../../cli/spec/parse-utils.js";
|
|
2
3
|
import { cmdTaskAdd } from "./add.js";
|
|
3
4
|
import { normalizeDependsOnInput } from "./shared.js";
|
|
4
|
-
function toStringList(v) {
|
|
5
|
-
if (typeof v === "string")
|
|
6
|
-
return [v];
|
|
7
|
-
if (Array.isArray(v))
|
|
8
|
-
return v.filter((x) => typeof x === "string");
|
|
9
|
-
return [];
|
|
10
|
-
}
|
|
11
5
|
export const taskAddSpec = {
|
|
12
6
|
id: ["task", "add"],
|
|
13
7
|
group: "Task",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derive.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/derive.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"derive.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/derive.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,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAC5C,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,gBAAgB,CAqExD,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IACzE,KAAK,UAAU,EAAE,GAAG,gBAAgB,KAAG,OAAO,CAAC,MAAM,CAAC,CAarE"}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
+
import { toStringList } from "../../cli/spec/parse-utils.js";
|
|
2
3
|
import { cmdTaskDerive } from "./derive.js";
|
|
3
|
-
function toStringList(v) {
|
|
4
|
-
if (typeof v === "string")
|
|
5
|
-
return [v];
|
|
6
|
-
if (Array.isArray(v))
|
|
7
|
-
return v.filter((x) => typeof x === "string");
|
|
8
|
-
return [];
|
|
9
|
-
}
|
|
10
4
|
export const taskDeriveSpec = {
|
|
11
5
|
id: ["task", "derive"],
|
|
12
6
|
group: "Task",
|
|
@@ -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,
|
|
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"}
|
|
@@ -4,7 +4,7 @@ import { formatCommentBodyForCommit } from "../../shared/comment-format.js";
|
|
|
4
4
|
import { CliError } from "../../shared/errors.js";
|
|
5
5
|
import { readFile, rm } from "node:fs/promises";
|
|
6
6
|
import path from "node:path";
|
|
7
|
-
import { commitFromComment } from "../guard/index.js";
|
|
7
|
+
import { buildGitCommitEnv, commitFromComment } from "../guard/index.js";
|
|
8
8
|
import { loadCommandContext, loadTaskFromContext, } from "../shared/task-backend.js";
|
|
9
9
|
import { backendIsLocalFileBackend, getTaskStore } from "../shared/task-store.js";
|
|
10
10
|
import { readDirectWorkLock } from "../../shared/direct-work-lock.js";
|
|
@@ -160,7 +160,7 @@ export async function cmdFinish(opts) {
|
|
|
160
160
|
message: invalidValueMessage("--commit-emoji", opts.commitEmoji, "✅ (finish commits must use a checkmark)"),
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
await commitFromComment({
|
|
163
|
+
const committed = await commitFromComment({
|
|
164
164
|
ctx,
|
|
165
165
|
cwd: opts.cwd,
|
|
166
166
|
rootOverride: opts.rootOverride,
|
|
@@ -179,6 +179,38 @@ export async function cmdFinish(opts) {
|
|
|
179
179
|
quiet: opts.quiet,
|
|
180
180
|
config: ctx.config,
|
|
181
181
|
});
|
|
182
|
+
// commitFromComment creates the git commit and returns the actual head hash/subject.
|
|
183
|
+
// Refresh task commit metadata to this hash and amend the same commit in local mode so
|
|
184
|
+
// "task done" metadata does not require a manual follow-up close commit.
|
|
185
|
+
const taskAfterCommit = useStore
|
|
186
|
+
? await store.get(primaryTaskId)
|
|
187
|
+
: await loadTaskFromContext({ ctx, taskId: primaryTaskId });
|
|
188
|
+
const updatedAfterCommit = {
|
|
189
|
+
...taskAfterCommit,
|
|
190
|
+
commit: { hash: committed.hash, message: committed.message },
|
|
191
|
+
doc_version: 2,
|
|
192
|
+
doc_updated_at: nowIso(),
|
|
193
|
+
doc_updated_by: opts.author,
|
|
194
|
+
};
|
|
195
|
+
await (useStore
|
|
196
|
+
? store.update(primaryTaskId, () => updatedAfterCommit)
|
|
197
|
+
: ctx.taskBackend.writeTask(updatedAfterCommit));
|
|
198
|
+
if (useStore) {
|
|
199
|
+
const workflowReadmeRelPath = path.join(ctx.config.paths.workflow_dir, primaryTaskId, "README.md");
|
|
200
|
+
await ctx.git.stage([workflowReadmeRelPath]);
|
|
201
|
+
const env = buildGitCommitEnv({
|
|
202
|
+
taskId: primaryTaskId,
|
|
203
|
+
agentId: executorAgent ?? undefined,
|
|
204
|
+
statusTo: "DONE",
|
|
205
|
+
allowTasks: true,
|
|
206
|
+
allowBase: false,
|
|
207
|
+
allowPolicy: false,
|
|
208
|
+
allowConfig: false,
|
|
209
|
+
allowHooks: false,
|
|
210
|
+
allowCI: false,
|
|
211
|
+
});
|
|
212
|
+
await ctx.git.commitAmendNoEdit({ env });
|
|
213
|
+
}
|
|
182
214
|
}
|
|
183
215
|
if (opts.statusCommit) {
|
|
184
216
|
if (typeof opts.statusCommitEmoji === "string" && opts.statusCommitEmoji.trim() !== "✅") {
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export type TaskListParsed = {
|
|
5
|
-
filters: TaskListFilters;
|
|
6
|
-
};
|
|
7
|
-
export declare const taskListSpec: CommandSpec<TaskListParsed>;
|
|
8
|
-
export declare function makeRunTaskListHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: TaskListParsed) => Promise<number>;
|
|
1
|
+
export { taskListSpec } from "./list.spec.js";
|
|
2
|
+
export type { TaskListParsed } from "./list.spec.js";
|
|
3
|
+
export { makeRunTaskListHandler } from "./list.run.js";
|
|
9
4
|
//# sourceMappingURL=list.command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/list.command.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"list.command.d.ts","sourceRoot":"","sources":["../../../src/commands/task/list.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,67 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function toStringList(v) {
|
|
4
|
-
if (typeof v === "string")
|
|
5
|
-
return [v];
|
|
6
|
-
if (Array.isArray(v))
|
|
7
|
-
return v.filter((x) => typeof x === "string");
|
|
8
|
-
return [];
|
|
9
|
-
}
|
|
10
|
-
export const taskListSpec = {
|
|
11
|
-
id: ["task", "list"],
|
|
12
|
-
group: "Task",
|
|
13
|
-
summary: "List tasks (optionally filtered by status/owner/tag).",
|
|
14
|
-
options: [
|
|
15
|
-
{
|
|
16
|
-
kind: "string",
|
|
17
|
-
name: "status",
|
|
18
|
-
valueHint: "<status>",
|
|
19
|
-
repeatable: true,
|
|
20
|
-
description: "Repeatable. Filter by status.",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
kind: "string",
|
|
24
|
-
name: "owner",
|
|
25
|
-
valueHint: "<owner>",
|
|
26
|
-
repeatable: true,
|
|
27
|
-
description: "Repeatable. Filter by owner id.",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
kind: "string",
|
|
31
|
-
name: "tag",
|
|
32
|
-
valueHint: "<tag>",
|
|
33
|
-
repeatable: true,
|
|
34
|
-
description: "Repeatable. Filter by tag.",
|
|
35
|
-
},
|
|
36
|
-
{ kind: "boolean", name: "quiet", default: false, description: "Suppress summary output." },
|
|
37
|
-
],
|
|
38
|
-
examples: [
|
|
39
|
-
{ cmd: "agentplane task list", why: "List all tasks." },
|
|
40
|
-
{ cmd: "agentplane task list --status TODO --owner CODER", why: "List filtered tasks." },
|
|
41
|
-
],
|
|
42
|
-
validateRaw: (raw) => {
|
|
43
|
-
for (const key of ["status", "owner", "tag"]) {
|
|
44
|
-
const list = toStringList(raw.opts[key]);
|
|
45
|
-
if (list.some((s) => s.trim() === "")) {
|
|
46
|
-
throw usageError({ spec: taskListSpec, message: `Invalid value for --${key}: empty.` });
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
parse: (raw) => ({
|
|
51
|
-
filters: {
|
|
52
|
-
status: toStringList(raw.opts.status),
|
|
53
|
-
owner: toStringList(raw.opts.owner),
|
|
54
|
-
tag: toStringList(raw.opts.tag),
|
|
55
|
-
quiet: raw.opts.quiet === true,
|
|
56
|
-
},
|
|
57
|
-
}),
|
|
58
|
-
};
|
|
59
|
-
export function makeRunTaskListHandler(getCtx) {
|
|
60
|
-
return async (ctx, p) => {
|
|
61
|
-
return await taskListUsecase({
|
|
62
|
-
cli: ctx,
|
|
63
|
-
command: await getCtx("task list"),
|
|
64
|
-
filters: p.filters,
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
}
|
|
1
|
+
export { taskListSpec } from "./list.spec.js";
|
|
2
|
+
export { makeRunTaskListHandler } from "./list.run.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CommandCtx } from "../../cli/spec/spec.js";
|
|
2
|
+
import type { CommandContext } from "../shared/task-backend.js";
|
|
3
|
+
import type { TaskListParsed } from "./list.spec.js";
|
|
4
|
+
export declare function makeRunTaskListHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: TaskListParsed) => Promise<number>;
|
|
5
|
+
//# sourceMappingURL=list.run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.run.d.ts","sourceRoot":"","sources":["../../../src/commands/task/list.run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,IACvE,KAAK,UAAU,EAAE,GAAG,cAAc,KAAG,OAAO,CAAC,MAAM,CAAC,CAOnE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { taskListUsecase } from "../../usecases/task/task-list-usecase.js";
|
|
2
|
+
export function makeRunTaskListHandler(getCtx) {
|
|
3
|
+
return async (ctx, p) => {
|
|
4
|
+
return await taskListUsecase({
|
|
5
|
+
cli: ctx,
|
|
6
|
+
command: await getCtx("task list"),
|
|
7
|
+
filters: p.filters,
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CommandSpec } from "../../cli/spec/spec.js";
|
|
2
|
+
import type { TaskListFilters } from "./shared.js";
|
|
3
|
+
export type TaskListParsed = {
|
|
4
|
+
filters: TaskListFilters;
|
|
5
|
+
};
|
|
6
|
+
export declare const taskListSpec: CommandSpec<TaskListParsed>;
|
|
7
|
+
//# sourceMappingURL=list.spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.spec.d.ts","sourceRoot":"","sources":["../../../src/commands/task/list.spec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,MAAM,MAAM,cAAc,GAAG;IAAE,OAAO,EAAE,eAAe,CAAA;CAAE,CAAC;AAE1D,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,cAAc,CAgDpD,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { usageError } from "../../cli/spec/errors.js";
|
|
2
|
+
import { toStringList } from "../../cli/spec/parse-utils.js";
|
|
3
|
+
export const taskListSpec = {
|
|
4
|
+
id: ["task", "list"],
|
|
5
|
+
group: "Task",
|
|
6
|
+
summary: "List tasks (optionally filtered by status/owner/tag).",
|
|
7
|
+
options: [
|
|
8
|
+
{
|
|
9
|
+
kind: "string",
|
|
10
|
+
name: "status",
|
|
11
|
+
valueHint: "<status>",
|
|
12
|
+
repeatable: true,
|
|
13
|
+
description: "Repeatable. Filter by status.",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
kind: "string",
|
|
17
|
+
name: "owner",
|
|
18
|
+
valueHint: "<owner>",
|
|
19
|
+
repeatable: true,
|
|
20
|
+
description: "Repeatable. Filter by owner id.",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
kind: "string",
|
|
24
|
+
name: "tag",
|
|
25
|
+
valueHint: "<tag>",
|
|
26
|
+
repeatable: true,
|
|
27
|
+
description: "Repeatable. Filter by tag.",
|
|
28
|
+
},
|
|
29
|
+
{ kind: "boolean", name: "quiet", default: false, description: "Suppress summary output." },
|
|
30
|
+
],
|
|
31
|
+
examples: [
|
|
32
|
+
{ cmd: "agentplane task list", why: "List all tasks." },
|
|
33
|
+
{ cmd: "agentplane task list --status TODO --owner CODER", why: "List filtered tasks." },
|
|
34
|
+
],
|
|
35
|
+
validateRaw: (raw) => {
|
|
36
|
+
for (const key of ["status", "owner", "tag"]) {
|
|
37
|
+
const list = toStringList(raw.opts[key]);
|
|
38
|
+
if (list.some((s) => s.trim() === "")) {
|
|
39
|
+
throw usageError({ spec: taskListSpec, message: `Invalid value for --${key}: empty.` });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
parse: (raw) => ({
|
|
44
|
+
filters: {
|
|
45
|
+
status: toStringList(raw.opts.status),
|
|
46
|
+
owner: toStringList(raw.opts.owner),
|
|
47
|
+
tag: toStringList(raw.opts.tag),
|
|
48
|
+
quiet: raw.opts.quiet === true,
|
|
49
|
+
},
|
|
50
|
+
}),
|
|
51
|
+
};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export type TaskNextParsed = {
|
|
5
|
-
filters: TaskListFilters;
|
|
6
|
-
};
|
|
7
|
-
export declare const taskNextSpec: CommandSpec<TaskNextParsed>;
|
|
8
|
-
export declare function makeRunTaskNextHandler(getCtx: (cmd: string) => Promise<CommandContext>): (ctx: CommandCtx, p: TaskNextParsed) => Promise<number>;
|
|
1
|
+
export { taskNextSpec } from "./next.spec.js";
|
|
2
|
+
export type { TaskNextParsed } from "./next.spec.js";
|
|
3
|
+
export { makeRunTaskNextHandler } from "./next.run.js";
|
|
9
4
|
//# sourceMappingURL=next.command.d.ts.map
|