workplanr 0.1.0
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 +1 -0
- package/dist/cli/commands/add.d.ts +6 -0
- package/dist/cli/commands/add.d.ts.map +1 -0
- package/dist/cli/commands/add.js +37 -0
- package/dist/cli/commands/add.js.map +1 -0
- package/dist/cli/commands/done.d.ts +2 -0
- package/dist/cli/commands/done.d.ts.map +1 -0
- package/dist/cli/commands/done.js +43 -0
- package/dist/cli/commands/done.js.map +1 -0
- package/dist/cli/commands/init.d.ts +5 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +57 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/list.d.ts +4 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/list.js +23 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/propose.d.ts +3 -0
- package/dist/cli/commands/propose.d.ts.map +1 -0
- package/dist/cli/commands/propose.js +80 -0
- package/dist/cli/commands/propose.js.map +1 -0
- package/dist/cli/commands/serve.d.ts +4 -0
- package/dist/cli/commands/serve.d.ts.map +1 -0
- package/dist/cli/commands/serve.js +6 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/commands/status.d.ts +2 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +24 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/tui.d.ts +2 -0
- package/dist/cli/commands/tui.d.ts.map +1 -0
- package/dist/cli/commands/tui.js +8 -0
- package/dist/cli/commands/tui.js.map +1 -0
- package/dist/cli/utils.d.ts +6 -0
- package/dist/cli/utils.d.ts.map +1 -0
- package/dist/cli/utils.js +37 -0
- package/dist/cli/utils.js.map +1 -0
- package/dist/core/dod.d.ts +15 -0
- package/dist/core/dod.d.ts.map +1 -0
- package/dist/core/dod.js +103 -0
- package/dist/core/dod.js.map +1 -0
- package/dist/core/git.d.ts +2 -0
- package/dist/core/git.d.ts.map +1 -0
- package/dist/core/git.js +13 -0
- package/dist/core/git.js.map +1 -0
- package/dist/core/plan.d.ts +9 -0
- package/dist/core/plan.d.ts.map +1 -0
- package/dist/core/plan.js +64 -0
- package/dist/core/plan.js.map +1 -0
- package/dist/core/uuid.d.ts +8 -0
- package/dist/core/uuid.d.ts.map +1 -0
- package/dist/core/uuid.js +33 -0
- package/dist/core/uuid.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +60 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/server.d.ts +4 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +28 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/complete-task.d.ts +3 -0
- package/dist/mcp/tools/complete-task.d.ts.map +1 -0
- package/dist/mcp/tools/complete-task.js +87 -0
- package/dist/mcp/tools/complete-task.js.map +1 -0
- package/dist/mcp/tools/get-next-task.d.ts +3 -0
- package/dist/mcp/tools/get-next-task.d.ts.map +1 -0
- package/dist/mcp/tools/get-next-task.js +41 -0
- package/dist/mcp/tools/get-next-task.js.map +1 -0
- package/dist/mcp/tools/get-plan.d.ts +3 -0
- package/dist/mcp/tools/get-plan.d.ts.map +1 -0
- package/dist/mcp/tools/get-plan.js +50 -0
- package/dist/mcp/tools/get-plan.js.map +1 -0
- package/dist/mcp/tools/propose-subtasks.d.ts +3 -0
- package/dist/mcp/tools/propose-subtasks.d.ts.map +1 -0
- package/dist/mcp/tools/propose-subtasks.js +80 -0
- package/dist/mcp/tools/propose-subtasks.js.map +1 -0
- package/dist/mcp/tools/update-progress.d.ts +3 -0
- package/dist/mcp/tools/update-progress.d.ts.map +1 -0
- package/dist/mcp/tools/update-progress.js +93 -0
- package/dist/mcp/tools/update-progress.js.map +1 -0
- package/dist/mcp/tools/validate-dod.d.ts +3 -0
- package/dist/mcp/tools/validate-dod.d.ts.map +1 -0
- package/dist/mcp/tools/validate-dod.js +34 -0
- package/dist/mcp/tools/validate-dod.js.map +1 -0
- package/dist/tui/App.d.ts +2 -0
- package/dist/tui/App.d.ts.map +1 -0
- package/dist/tui/App.js +31 -0
- package/dist/tui/App.js.map +1 -0
- package/dist/tui/components/ProposalPanel.d.ts +7 -0
- package/dist/tui/components/ProposalPanel.d.ts.map +1 -0
- package/dist/tui/components/ProposalPanel.js +9 -0
- package/dist/tui/components/ProposalPanel.js.map +1 -0
- package/dist/tui/components/StatusBar.d.ts +7 -0
- package/dist/tui/components/StatusBar.d.ts.map +1 -0
- package/dist/tui/components/StatusBar.js +10 -0
- package/dist/tui/components/StatusBar.js.map +1 -0
- package/dist/tui/components/TaskList.d.ts +8 -0
- package/dist/tui/components/TaskList.d.ts.map +1 -0
- package/dist/tui/components/TaskList.js +10 -0
- package/dist/tui/components/TaskList.js.map +1 -0
- package/dist/tui/components/TaskRow.d.ts +8 -0
- package/dist/tui/components/TaskRow.d.ts.map +1 -0
- package/dist/tui/components/TaskRow.js +28 -0
- package/dist/tui/components/TaskRow.js.map +1 -0
- package/dist/tui/hooks/usePlan.d.ts +3 -0
- package/dist/tui/hooks/usePlan.d.ts.map +1 -0
- package/dist/tui/hooks/usePlan.js +25 -0
- package/dist/tui/hooks/usePlan.js.map +1 -0
- package/dist/types/plan.d.ts +260 -0
- package/dist/types/plan.d.ts.map +1 -0
- package/dist/types/plan.js +76 -0
- package/dist/types/plan.js.map +1 -0
- package/package.json +59 -0
- package/schema/plan.schema.json +89 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { readPlan, writePlan, nowISO } from "../../core/plan.js";
|
|
3
|
+
export function registerUpdateProgress(server) {
|
|
4
|
+
server.tool("update_task_progress", "Agent reports progress on a task. Appends a log entry. Does not auto-complete.", {
|
|
5
|
+
task_id: z.string().describe("The task ID to update"),
|
|
6
|
+
progress: z
|
|
7
|
+
.number()
|
|
8
|
+
.int()
|
|
9
|
+
.min(0)
|
|
10
|
+
.max(100)
|
|
11
|
+
.describe("Progress percentage 0-100"),
|
|
12
|
+
status: z
|
|
13
|
+
.enum(["pending", "in_progress", "blocked", "done"])
|
|
14
|
+
.optional()
|
|
15
|
+
.describe("Optional status override"),
|
|
16
|
+
notes: z.string().optional().describe("Optional human-readable update"),
|
|
17
|
+
}, async ({ task_id, progress, status, notes }) => {
|
|
18
|
+
try {
|
|
19
|
+
if (status === "done") {
|
|
20
|
+
return {
|
|
21
|
+
content: [
|
|
22
|
+
{
|
|
23
|
+
type: "text",
|
|
24
|
+
text: JSON.stringify({
|
|
25
|
+
ok: false,
|
|
26
|
+
error: "use complete_task to finish",
|
|
27
|
+
}),
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
isError: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const plan = await readPlan();
|
|
34
|
+
const task = plan.tasks.find((t) => t.id === task_id);
|
|
35
|
+
if (!task) {
|
|
36
|
+
return {
|
|
37
|
+
content: [
|
|
38
|
+
{
|
|
39
|
+
type: "text",
|
|
40
|
+
text: JSON.stringify({
|
|
41
|
+
ok: false,
|
|
42
|
+
error: "task_not_found",
|
|
43
|
+
}),
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
isError: true,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
task.progress = progress;
|
|
50
|
+
if (status) {
|
|
51
|
+
task.status = status;
|
|
52
|
+
}
|
|
53
|
+
else if (task.status === "pending" && progress > 0) {
|
|
54
|
+
task.status = "in_progress";
|
|
55
|
+
}
|
|
56
|
+
task.updated_at = nowISO();
|
|
57
|
+
task.log.push({
|
|
58
|
+
ts: nowISO(),
|
|
59
|
+
actor: task.agent_assignee || "agent",
|
|
60
|
+
event: "progress_update",
|
|
61
|
+
payload: {
|
|
62
|
+
progress,
|
|
63
|
+
...(status ? { status } : {}),
|
|
64
|
+
...(notes ? { notes } : {}),
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
await writePlan(plan);
|
|
68
|
+
return {
|
|
69
|
+
content: [
|
|
70
|
+
{
|
|
71
|
+
type: "text",
|
|
72
|
+
text: JSON.stringify({ ok: true, task }),
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
return {
|
|
79
|
+
content: [
|
|
80
|
+
{
|
|
81
|
+
type: "text",
|
|
82
|
+
text: JSON.stringify({
|
|
83
|
+
ok: false,
|
|
84
|
+
error: error instanceof Error ? error.message : String(error),
|
|
85
|
+
}),
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
isError: true,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=update-progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-progress.js","sourceRoot":"","sources":["../../../src/mcp/tools/update-progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjE,MAAM,UAAU,sBAAsB,CAAC,MAAiB;IACtD,MAAM,CAAC,IAAI,CACT,sBAAsB,EACtB,gFAAgF,EAChF;QACE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QACrD,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;aACR,QAAQ,CAAC,2BAA2B,CAAC;QACxC,MAAM,EAAE,CAAC;aACN,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;aACnD,QAAQ,EAAE;aACV,QAAQ,CAAC,0BAA0B,CAAC;QACvC,KA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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { validateDod } from "../../core/dod.js";
|
|
3
|
+
export function registerValidateDod(server) {
|
|
4
|
+
server.tool("validate_dod", "Reads the DoD file for a task and runs any shell commands found in Required items", {
|
|
5
|
+
task_id: z.string().describe("The task ID to validate DoD for"),
|
|
6
|
+
}, async ({ task_id }) => {
|
|
7
|
+
try {
|
|
8
|
+
const result = await validateDod(task_id);
|
|
9
|
+
return {
|
|
10
|
+
content: [
|
|
11
|
+
{
|
|
12
|
+
type: "text",
|
|
13
|
+
text: JSON.stringify(result, null, 2),
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
return {
|
|
20
|
+
content: [
|
|
21
|
+
{
|
|
22
|
+
type: "text",
|
|
23
|
+
text: JSON.stringify({
|
|
24
|
+
error: "Failed to validate DoD",
|
|
25
|
+
details: error instanceof Error ? error.message : String(error),
|
|
26
|
+
}),
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=validate-dod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-dod.js","sourceRoot":"","sources":["../../../src/mcp/tools/validate-dod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU,mBAAmB,CAAC,MAAiB;IACnD,MAAM,CAAC,IAAI,CACT,cAAc,EACd,mFAAmF,EACnF;QACE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;KAChE,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACpB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,CAAC;YAC1C,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;qBACtC;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;4BACnB,KAAK,EAAE,wBAAwB;4BAC/B,OAAO,EACL,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;yBACzD,CAAC;qBACH;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/tui/App.tsx"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,GAAG,4CAqD1B"}
|
package/dist/tui/App.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Box, Text, useInput, useApp } from "ink";
|
|
4
|
+
import { usePlan } from "./hooks/usePlan.js";
|
|
5
|
+
import TaskList from "./components/TaskList.js";
|
|
6
|
+
import StatusBar from "./components/StatusBar.js";
|
|
7
|
+
import ProposalPanel from "./components/ProposalPanel.js";
|
|
8
|
+
export default function App() {
|
|
9
|
+
const plan = usePlan(1000);
|
|
10
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
11
|
+
const { exit } = useApp();
|
|
12
|
+
useInput((input, key) => {
|
|
13
|
+
if (input === "q") {
|
|
14
|
+
exit();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (!plan)
|
|
18
|
+
return;
|
|
19
|
+
if (key.upArrow) {
|
|
20
|
+
setSelectedIndex((i) => Math.max(0, i - 1));
|
|
21
|
+
}
|
|
22
|
+
if (key.downArrow) {
|
|
23
|
+
setSelectedIndex((i) => Math.min(plan.tasks.length - 1, i + 1));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
if (!plan) {
|
|
27
|
+
return (_jsx(Box, { padding: 1, children: _jsx(Text, { color: "yellow", children: "Loading plan..." }) }));
|
|
28
|
+
}
|
|
29
|
+
return (_jsxs(Box, { flexDirection: "column", padding: 1, children: [_jsxs(Box, { justifyContent: "space-between", children: [_jsx(Text, { bold: true, children: "─ Workplanr " }), _jsxs(Text, { color: "gray", children: ["branch: ", plan.meta.branch] })] }), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { bold: true, children: "Tasks" }), _jsxs(Text, { color: "gray", children: [" ", plan.tasks.length, " total"] })] }), _jsx(Text, { color: "gray", children: " ──────────────────────────────────────────────────────" }), _jsx(TaskList, { tasks: plan.tasks, selectedIndex: selectedIndex }), _jsx(ProposalPanel, { proposals: plan.proposals }), _jsx(StatusBar, { plan: plan })] }));
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=App.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../../src/tui/App.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,aAAa,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C,IAAI,CAAC,MAAM,IAAQ,IAChD,EAEN,MAAC,GAAG,IAAC,SAAS,EAAE,CAAC,aACf,KAAC,IAAI,IAAC,IAAI,4BAAa,EACvB,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,aAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,cAAc,IACrD,EACN,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,YACf,0DAA0D,GACtD,EAEP,KAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,aAAa,EAAE,aAAa,GAAI,EAE7D,KAAC,aAAa,IAAC,SAAS,EAAE,IAAI,CAAC,SAAS,GAAI,EAE5C,KAAC,SAAS,IAAC,IAAI,EAAE,IAAI,GAAI,IACrB,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Proposal } from "../../types/plan.js";
|
|
2
|
+
interface ProposalPanelProps {
|
|
3
|
+
proposals: Proposal[];
|
|
4
|
+
}
|
|
5
|
+
export default function ProposalPanel({ proposals }: ProposalPanelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=ProposalPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProposalPanel.d.ts","sourceRoot":"","sources":["../../../src/tui/components/ProposalPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,UAAU,kBAAkB;IAC1B,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,SAAS,EAAE,EAAE,kBAAkB,kDAgCtE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
export default function ProposalPanel({ proposals }) {
|
|
4
|
+
const pending = proposals.filter((p) => p.status === "pending");
|
|
5
|
+
if (pending.length === 0)
|
|
6
|
+
return null;
|
|
7
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Text, { bold: true, color: "yellow", children: ["Proposals (", pending.length, " pending)"] }), _jsx(Text, { color: "gray", children: " ──────────────────────────────────────────" }), pending.map((p) => (_jsxs(Box, { flexDirection: "column", paddingLeft: 2, children: [_jsxs(Text, { children: [p.id, ": ", p.proposed_by, " wants to split ", p.task_id, " into", " ", p.subtasks.length, " subtasks"] }), p.subtasks.map((s, i) => (_jsxs(Text, { color: "gray", children: [" ", i + 1, ". ", s.title, " [", s.estimated_complexity, "]"] }, i))), _jsxs(Text, { color: "gray", children: [" ", "Use: wp propose approve ", p.id, " | wp propose reject ", p.id] })] }, p.id)))] }));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ProposalPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProposalPanel.js","sourceRoot":"","sources":["../../../src/tui/components/ProposalPanel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAOhC,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,SAAS,EAAsB;IACrE,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC;IAEhE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEtC,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,aACtC,MAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAC,QAAQ,4BACX,OAAO,CAAC,MAAM,iBACrB,EACP,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,YACf,8CAA8C,GAC1C,EACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAClB,MAAC,GAAG,IAAY,aAAa,EAAC,QAAQ,EAAC,WAAW,EAAE,CAAC,aACnD,MAAC,IAAI,eACF,CAAC,CAAC,EAAE,QAAI,CAAC,CAAC,WAAW,sBAAkB,CAAC,CAAC,OAAO,WAAO,GAAG,EAC1D,CAAC,CAAC,QAAQ,CAAC,MAAM,iBACb,EACN,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACxB,MAAC,IAAI,IAAS,KAAK,EAAC,MAAM,aACvB,MAAM,EACN,CAAC,GAAG,CAAC,QAAI,CAAC,CAAC,KAAK,QAAI,CAAC,CAAC,oBAAoB,UAFlC,CAAC,CAGL,CACR,CAAC,EACF,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,aACf,IAAI,8BAA0B,CAAC,CAAC,EAAE,2BAAuB,CAAC,CAAC,EAAE,IACzD,KAbC,CAAC,CAAC,EAAE,CAcR,CACP,CAAC,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../../src/tui/components/StatusBar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEhD,UAAU,cAAc;IACtB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,cAAc,2CAsBzD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
export default function StatusBar({ plan }) {
|
|
4
|
+
const counts = { pending: 0, in_progress: 0, blocked: 0, done: 0 };
|
|
5
|
+
for (const task of plan.tasks) {
|
|
6
|
+
counts[task.status]++;
|
|
7
|
+
}
|
|
8
|
+
return (_jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsxs(Box, { children: [_jsx(Text, { color: "gray", children: " " }), _jsxs(Text, { color: "green", children: ["\u2713 ", counts.done] }), _jsx(Text, { children: " " }), _jsxs(Text, { color: "yellow", children: ["\u25CF ", counts.in_progress] }), _jsx(Text, { children: " " }), _jsxs(Text, { color: "red", children: ["\u2717 ", counts.blocked] }), _jsx(Text, { children: " " }), _jsxs(Text, { color: "gray", children: ["\u25CB ", counts.pending] }), _jsx(Text, { children: " " }), _jsx(Text, { color: "gray", children: "\u2191\u2193 navigate q quit r refresh" })] }) }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=StatusBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusBar.js","sourceRoot":"","sources":["../../../src/tui/components/StatusBar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAOhC,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAE,IAAI,EAAkB;IACxD,MAAM,MAAM,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACnE,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAC9B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;IACxB,CAAC;IAED,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,YACtC,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,mBAAU,EAC5B,MAAC,IAAI,IAAC,KAAK,EAAC,OAAO,wBAAI,MAAM,CAAC,IAAI,IAAQ,EAC1C,KAAC,IAAI,qBAAU,EACf,MAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,wBAAI,MAAM,CAAC,WAAW,IAAQ,EAClD,KAAC,IAAI,qBAAU,EACf,MAAC,IAAI,IAAC,KAAK,EAAC,KAAK,wBAAI,MAAM,CAAC,OAAO,IAAQ,EAC3C,KAAC,IAAI,qBAAU,EACf,MAAC,IAAI,IAAC,KAAK,EAAC,MAAM,wBAAI,MAAM,CAAC,OAAO,IAAQ,EAC5C,KAAC,IAAI,uBAAY,EACjB,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,yDAAsC,IACpD,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Task } from "../../types/plan.js";
|
|
2
|
+
interface TaskListProps {
|
|
3
|
+
tasks: Task[];
|
|
4
|
+
selectedIndex: number;
|
|
5
|
+
}
|
|
6
|
+
export default function TaskList({ tasks, selectedIndex }: TaskListProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=TaskList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskList.d.ts","sourceRoot":"","sources":["../../../src/tui/components/TaskList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAGhD,UAAU,aAAa;IACrB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,aAAa,2CAgBvE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Text } from "ink";
|
|
3
|
+
import TaskRow from "./TaskRow.js";
|
|
4
|
+
export default function TaskList({ tasks, selectedIndex }) {
|
|
5
|
+
if (tasks.length === 0) {
|
|
6
|
+
return (_jsx(Box, { paddingLeft: 2, children: _jsx(Text, { color: "gray", children: "No tasks. Run `wp add` to create one." }) }));
|
|
7
|
+
}
|
|
8
|
+
return (_jsx(Box, { flexDirection: "column", children: tasks.map((task, i) => (_jsx(TaskRow, { task: task, selected: i === selectedIndex }, task.id))) }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=TaskList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskList.js","sourceRoot":"","sources":["../../../src/tui/components/TaskList.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,OAAO,OAAO,MAAM,cAAc,CAAC;AAOnC,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,KAAK,EAAE,aAAa,EAAiB;IACtE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,CACL,KAAC,GAAG,IAAC,WAAW,EAAE,CAAC,YACjB,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,sDAA6C,GAC3D,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,YACxB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,KAAC,OAAO,IAAe,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,KAAK,aAAa,IAAlD,IAAI,CAAC,EAAE,CAA+C,CACrE,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Task } from "../../types/plan.js";
|
|
2
|
+
interface TaskRowProps {
|
|
3
|
+
task: Task;
|
|
4
|
+
selected: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default function TaskRow({ task, selected }: TaskRowProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=TaskRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskRow.d.ts","sourceRoot":"","sources":["../../../src/tui/components/TaskRow.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AA+B5D,UAAU,YAAY;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,YAAY,2CAmB/D"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Text, Box } from "ink";
|
|
3
|
+
const STATUS_ICONS = {
|
|
4
|
+
in_progress: { icon: "●", color: "yellow" },
|
|
5
|
+
pending: { icon: "○", color: "gray" },
|
|
6
|
+
done: { icon: "✓", color: "green" },
|
|
7
|
+
blocked: { icon: "✗", color: "red" },
|
|
8
|
+
};
|
|
9
|
+
function ProgressBar({ progress }) {
|
|
10
|
+
const width = 10;
|
|
11
|
+
const filled = Math.round((progress / 100) * width);
|
|
12
|
+
const empty = width - filled;
|
|
13
|
+
return (_jsxs(Text, { children: [_jsx(Text, { color: "green", children: "█".repeat(filled) }), _jsx(Text, { color: "gray", children: "░".repeat(empty) })] }));
|
|
14
|
+
}
|
|
15
|
+
function PriorityBadge({ priority }) {
|
|
16
|
+
const colors = {
|
|
17
|
+
critical: "red",
|
|
18
|
+
high: "yellow",
|
|
19
|
+
medium: "blue",
|
|
20
|
+
low: "gray",
|
|
21
|
+
};
|
|
22
|
+
return _jsx(Text, { color: colors[priority] || "white", children: priority });
|
|
23
|
+
}
|
|
24
|
+
export default function TaskRow({ task, selected }) {
|
|
25
|
+
const { icon, color } = STATUS_ICONS[task.status];
|
|
26
|
+
return (_jsxs(Box, { children: [_jsx(Text, { color: selected ? "cyan" : undefined, bold: selected, children: selected ? "› " : " " }), _jsx(Text, { children: "[" }), _jsx(Text, { color: color, children: icon }), _jsx(Text, { children: "] " }), _jsx(Text, { children: task.id.padEnd(10) }), _jsx(Text, { children: " " }), _jsx(Text, { children: task.title.padEnd(28).slice(0, 28) }), _jsx(Text, { children: " " }), _jsx(ProgressBar, { progress: task.progress }), _jsxs(Text, { children: [" ", String(task.progress).padStart(3), "% "] }), _jsx(PriorityBadge, { priority: task.priority })] }));
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=TaskRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskRow.js","sourceRoot":"","sources":["../../../src/tui/components/TaskRow.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAGhC,MAAM,YAAY,GAAwD;IACxE,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE;IAC3C,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE;IACrC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE;IACnC,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE;CACrC,CAAC;AAEF,SAAS,WAAW,CAAC,EAAE,QAAQ,EAAwB;IACrD,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;IACpD,MAAM,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAC7B,OAAO,CACL,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAC,OAAO,YAAE,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAQ,EAC/C,KAAC,IAAI,IAAC,KAAK,EAAC,MAAM,YAAE,GAAG,CAAC,MAAM,C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AAC,WAAW,EACpD,KAAC,aAAa,IAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAI,IACtC,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePlan.d.ts","sourceRoot":"","sources":["../../../src/tui/hooks/usePlan.ts"],"names":[],"mappings":"AAEA,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAG5D,wBAAgB,OAAO,CAAC,UAAU,GAAE,MAAa,GAAG,IAAI,GAAG,IAAI,CAsB9D"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useState, useEffect } from "react";
|
|
2
|
+
import fs from "node:fs/promises";
|
|
3
|
+
import { PlanSchema } from "../../types/plan.js";
|
|
4
|
+
import { getPlanPath } from "../../core/plan.js";
|
|
5
|
+
export function usePlan(intervalMs = 1000) {
|
|
6
|
+
const [plan, setPlan] = useState(null);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const planPath = getPlanPath();
|
|
9
|
+
async function load() {
|
|
10
|
+
try {
|
|
11
|
+
const raw = await fs.readFile(planPath, "utf8");
|
|
12
|
+
const data = JSON.parse(raw);
|
|
13
|
+
setPlan(PlanSchema.parse(data));
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
// File might not exist or be malformed
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
load();
|
|
20
|
+
const interval = setInterval(load, intervalMs);
|
|
21
|
+
return () => clearInterval(interval);
|
|
22
|
+
}, [intervalMs]);
|
|
23
|
+
return plan;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=usePlan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePlan.js","sourceRoot":"","sources":["../../../src/tui/hooks/usePlan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,UAAU,EAAa,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,UAAU,OAAO,CAAC,aAAqB,IAAI;IAC/C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAc,IAAI,CAAC,CAAC;IAEpD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;QAE/B,KAAK,UAAU,IAAI;YACjB,IAAI,CAAC;gBACH,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;gBAChD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBAC7B,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;YAClC,CAAC;YAAC,MAAM,CAAC;gBACP,uCAAuC;YACzC,CAAC;QACH,CAAC;QAED,IAAI,EAAE,CAAC;QACP,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC/C,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const LogEntrySchema: z.ZodObject<{
|
|
3
|
+
ts: z.ZodString;
|
|
4
|
+
actor: z.ZodString;
|
|
5
|
+
event: z.ZodString;
|
|
6
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare const TaskStatusSchema: z.ZodEnum<{
|
|
9
|
+
pending: "pending";
|
|
10
|
+
in_progress: "in_progress";
|
|
11
|
+
blocked: "blocked";
|
|
12
|
+
done: "done";
|
|
13
|
+
}>;
|
|
14
|
+
export declare const PrioritySchema: z.ZodEnum<{
|
|
15
|
+
low: "low";
|
|
16
|
+
medium: "medium";
|
|
17
|
+
high: "high";
|
|
18
|
+
critical: "critical";
|
|
19
|
+
}>;
|
|
20
|
+
export declare const ComplexitySchema: z.ZodEnum<{
|
|
21
|
+
s: "s";
|
|
22
|
+
m: "m";
|
|
23
|
+
l: "l";
|
|
24
|
+
}>;
|
|
25
|
+
export declare const SubtaskSchema: z.ZodObject<{
|
|
26
|
+
id: z.ZodString;
|
|
27
|
+
title: z.ZodString;
|
|
28
|
+
description: z.ZodOptional<z.ZodString>;
|
|
29
|
+
status: z.ZodEnum<{
|
|
30
|
+
pending: "pending";
|
|
31
|
+
in_progress: "in_progress";
|
|
32
|
+
blocked: "blocked";
|
|
33
|
+
done: "done";
|
|
34
|
+
}>;
|
|
35
|
+
priority: z.ZodEnum<{
|
|
36
|
+
low: "low";
|
|
37
|
+
medium: "medium";
|
|
38
|
+
high: "high";
|
|
39
|
+
critical: "critical";
|
|
40
|
+
}>;
|
|
41
|
+
depends_on: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
42
|
+
agent_assignee: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
43
|
+
progress: z.ZodDefault<z.ZodNumber>;
|
|
44
|
+
dod_ref: z.ZodOptional<z.ZodString>;
|
|
45
|
+
log: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
46
|
+
ts: z.ZodString;
|
|
47
|
+
actor: z.ZodString;
|
|
48
|
+
event: z.ZodString;
|
|
49
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
50
|
+
}, z.core.$strip>>>;
|
|
51
|
+
created_at: z.ZodString;
|
|
52
|
+
updated_at: z.ZodString;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export declare const TaskSchema: z.ZodObject<{
|
|
55
|
+
id: z.ZodString;
|
|
56
|
+
title: z.ZodString;
|
|
57
|
+
description: z.ZodOptional<z.ZodString>;
|
|
58
|
+
status: z.ZodEnum<{
|
|
59
|
+
pending: "pending";
|
|
60
|
+
in_progress: "in_progress";
|
|
61
|
+
blocked: "blocked";
|
|
62
|
+
done: "done";
|
|
63
|
+
}>;
|
|
64
|
+
priority: z.ZodEnum<{
|
|
65
|
+
low: "low";
|
|
66
|
+
medium: "medium";
|
|
67
|
+
high: "high";
|
|
68
|
+
critical: "critical";
|
|
69
|
+
}>;
|
|
70
|
+
depends_on: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
71
|
+
agent_assignee: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
72
|
+
progress: z.ZodDefault<z.ZodNumber>;
|
|
73
|
+
dod_ref: z.ZodOptional<z.ZodString>;
|
|
74
|
+
log: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
75
|
+
ts: z.ZodString;
|
|
76
|
+
actor: z.ZodString;
|
|
77
|
+
event: z.ZodString;
|
|
78
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
79
|
+
}, z.core.$strip>>>;
|
|
80
|
+
created_at: z.ZodString;
|
|
81
|
+
updated_at: z.ZodString;
|
|
82
|
+
subtasks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
83
|
+
id: z.ZodString;
|
|
84
|
+
title: z.ZodString;
|
|
85
|
+
description: z.ZodOptional<z.ZodString>;
|
|
86
|
+
status: z.ZodEnum<{
|
|
87
|
+
pending: "pending";
|
|
88
|
+
in_progress: "in_progress";
|
|
89
|
+
blocked: "blocked";
|
|
90
|
+
done: "done";
|
|
91
|
+
}>;
|
|
92
|
+
priority: z.ZodEnum<{
|
|
93
|
+
low: "low";
|
|
94
|
+
medium: "medium";
|
|
95
|
+
high: "high";
|
|
96
|
+
critical: "critical";
|
|
97
|
+
}>;
|
|
98
|
+
depends_on: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
99
|
+
agent_assignee: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
100
|
+
progress: z.ZodDefault<z.ZodNumber>;
|
|
101
|
+
dod_ref: z.ZodOptional<z.ZodString>;
|
|
102
|
+
log: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
103
|
+
ts: z.ZodString;
|
|
104
|
+
actor: z.ZodString;
|
|
105
|
+
event: z.ZodString;
|
|
106
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
107
|
+
}, z.core.$strip>>>;
|
|
108
|
+
created_at: z.ZodString;
|
|
109
|
+
updated_at: z.ZodString;
|
|
110
|
+
}, z.core.$strip>>>;
|
|
111
|
+
}, z.core.$strip>;
|
|
112
|
+
export declare const ProposedSubtaskSchema: z.ZodObject<{
|
|
113
|
+
title: z.ZodString;
|
|
114
|
+
description: z.ZodString;
|
|
115
|
+
estimated_complexity: z.ZodEnum<{
|
|
116
|
+
s: "s";
|
|
117
|
+
m: "m";
|
|
118
|
+
l: "l";
|
|
119
|
+
}>;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
export declare const ProposalStatusSchema: z.ZodEnum<{
|
|
122
|
+
pending: "pending";
|
|
123
|
+
approved: "approved";
|
|
124
|
+
rejected: "rejected";
|
|
125
|
+
}>;
|
|
126
|
+
export declare const ProposalSchema: z.ZodObject<{
|
|
127
|
+
id: z.ZodString;
|
|
128
|
+
task_id: z.ZodString;
|
|
129
|
+
status: z.ZodEnum<{
|
|
130
|
+
pending: "pending";
|
|
131
|
+
approved: "approved";
|
|
132
|
+
rejected: "rejected";
|
|
133
|
+
}>;
|
|
134
|
+
proposed_by: z.ZodString;
|
|
135
|
+
proposed_at: z.ZodString;
|
|
136
|
+
subtasks: z.ZodArray<z.ZodObject<{
|
|
137
|
+
title: z.ZodString;
|
|
138
|
+
description: z.ZodString;
|
|
139
|
+
estimated_complexity: z.ZodEnum<{
|
|
140
|
+
s: "s";
|
|
141
|
+
m: "m";
|
|
142
|
+
l: "l";
|
|
143
|
+
}>;
|
|
144
|
+
}, z.core.$strip>>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
export declare const ProjectSchema: z.ZodObject<{
|
|
147
|
+
id: z.ZodString;
|
|
148
|
+
name: z.ZodString;
|
|
149
|
+
goal: z.ZodString;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
export declare const MetaSchema: z.ZodObject<{
|
|
152
|
+
branch: z.ZodString;
|
|
153
|
+
created_by: z.ZodString;
|
|
154
|
+
updated_at: z.ZodString;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
export declare const PlanSchema: z.ZodObject<{
|
|
157
|
+
schema_version: z.ZodString;
|
|
158
|
+
project: z.ZodObject<{
|
|
159
|
+
id: z.ZodString;
|
|
160
|
+
name: z.ZodString;
|
|
161
|
+
goal: z.ZodString;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
164
|
+
id: z.ZodString;
|
|
165
|
+
title: z.ZodString;
|
|
166
|
+
description: z.ZodOptional<z.ZodString>;
|
|
167
|
+
status: z.ZodEnum<{
|
|
168
|
+
pending: "pending";
|
|
169
|
+
in_progress: "in_progress";
|
|
170
|
+
blocked: "blocked";
|
|
171
|
+
done: "done";
|
|
172
|
+
}>;
|
|
173
|
+
priority: z.ZodEnum<{
|
|
174
|
+
low: "low";
|
|
175
|
+
medium: "medium";
|
|
176
|
+
high: "high";
|
|
177
|
+
critical: "critical";
|
|
178
|
+
}>;
|
|
179
|
+
depends_on: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
180
|
+
agent_assignee: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
181
|
+
progress: z.ZodDefault<z.ZodNumber>;
|
|
182
|
+
dod_ref: z.ZodOptional<z.ZodString>;
|
|
183
|
+
log: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
184
|
+
ts: z.ZodString;
|
|
185
|
+
actor: z.ZodString;
|
|
186
|
+
event: z.ZodString;
|
|
187
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
188
|
+
}, z.core.$strip>>>;
|
|
189
|
+
created_at: z.ZodString;
|
|
190
|
+
updated_at: z.ZodString;
|
|
191
|
+
subtasks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
192
|
+
id: z.ZodString;
|
|
193
|
+
title: z.ZodString;
|
|
194
|
+
description: z.ZodOptional<z.ZodString>;
|
|
195
|
+
status: z.ZodEnum<{
|
|
196
|
+
pending: "pending";
|
|
197
|
+
in_progress: "in_progress";
|
|
198
|
+
blocked: "blocked";
|
|
199
|
+
done: "done";
|
|
200
|
+
}>;
|
|
201
|
+
priority: z.ZodEnum<{
|
|
202
|
+
low: "low";
|
|
203
|
+
medium: "medium";
|
|
204
|
+
high: "high";
|
|
205
|
+
critical: "critical";
|
|
206
|
+
}>;
|
|
207
|
+
depends_on: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
208
|
+
agent_assignee: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
209
|
+
progress: z.ZodDefault<z.ZodNumber>;
|
|
210
|
+
dod_ref: z.ZodOptional<z.ZodString>;
|
|
211
|
+
log: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
212
|
+
ts: z.ZodString;
|
|
213
|
+
actor: z.ZodString;
|
|
214
|
+
event: z.ZodString;
|
|
215
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
216
|
+
}, z.core.$strip>>>;
|
|
217
|
+
created_at: z.ZodString;
|
|
218
|
+
updated_at: z.ZodString;
|
|
219
|
+
}, z.core.$strip>>>;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
proposals: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
222
|
+
id: z.ZodString;
|
|
223
|
+
task_id: z.ZodString;
|
|
224
|
+
status: z.ZodEnum<{
|
|
225
|
+
pending: "pending";
|
|
226
|
+
approved: "approved";
|
|
227
|
+
rejected: "rejected";
|
|
228
|
+
}>;
|
|
229
|
+
proposed_by: z.ZodString;
|
|
230
|
+
proposed_at: z.ZodString;
|
|
231
|
+
subtasks: z.ZodArray<z.ZodObject<{
|
|
232
|
+
title: z.ZodString;
|
|
233
|
+
description: z.ZodString;
|
|
234
|
+
estimated_complexity: z.ZodEnum<{
|
|
235
|
+
s: "s";
|
|
236
|
+
m: "m";
|
|
237
|
+
l: "l";
|
|
238
|
+
}>;
|
|
239
|
+
}, z.core.$strip>>;
|
|
240
|
+
}, z.core.$strip>>>;
|
|
241
|
+
meta: z.ZodObject<{
|
|
242
|
+
branch: z.ZodString;
|
|
243
|
+
created_by: z.ZodString;
|
|
244
|
+
updated_at: z.ZodString;
|
|
245
|
+
}, z.core.$strip>;
|
|
246
|
+
}, z.core.$strip>;
|
|
247
|
+
export type LogEntry = z.infer<typeof LogEntrySchema>;
|
|
248
|
+
export type TaskStatus = z.infer<typeof TaskStatusSchema>;
|
|
249
|
+
export type Priority = z.infer<typeof PrioritySchema>;
|
|
250
|
+
export type Complexity = z.infer<typeof ComplexitySchema>;
|
|
251
|
+
export type Subtask = z.infer<typeof SubtaskSchema>;
|
|
252
|
+
export type Task = z.infer<typeof TaskSchema>;
|
|
253
|
+
export type ProposedSubtask = z.infer<typeof ProposedSubtaskSchema>;
|
|
254
|
+
export type ProposalStatus = z.infer<typeof ProposalStatusSchema>;
|
|
255
|
+
export type Proposal = z.infer<typeof ProposalSchema>;
|
|
256
|
+
export type Project = z.infer<typeof ProjectSchema>;
|
|
257
|
+
export type Meta = z.infer<typeof MetaSchema>;
|
|
258
|
+
export type Plan = z.infer<typeof PlanSchema>;
|
|
259
|
+
export declare const PRIORITY_ORDER: Record<Priority, number>;
|
|
260
|
+
//# sourceMappingURL=plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../src/types/plan.ts"],"names":[],"mappings":"AAAA,OAAO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