task-o-matic 0.0.3 → 0.0.6
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 +96 -40
- package/dist/cli/bin.js +0 -0
- package/dist/commands/tasks/create.d.ts +3 -0
- package/dist/commands/tasks/create.d.ts.map +1 -0
- package/dist/commands/tasks/create.js +58 -0
- package/dist/commands/tasks/delete.d.ts +3 -0
- package/dist/commands/tasks/delete.d.ts.map +1 -0
- package/dist/commands/tasks/delete.js +40 -0
- package/dist/commands/tasks/document.d.ts +5 -0
- package/dist/commands/tasks/document.d.ts.map +1 -0
- package/dist/commands/tasks/document.js +118 -0
- package/dist/commands/tasks/enhance.d.ts +3 -0
- package/dist/commands/tasks/enhance.d.ts.map +1 -0
- package/dist/commands/tasks/enhance.js +86 -0
- package/dist/commands/tasks/execute.d.ts +3 -0
- package/dist/commands/tasks/execute.d.ts.map +1 -0
- package/dist/commands/tasks/execute.js +33 -0
- package/dist/commands/tasks/index.d.ts +16 -0
- package/dist/commands/tasks/index.d.ts.map +1 -0
- package/dist/commands/tasks/index.js +31 -0
- package/dist/commands/tasks/list.d.ts +3 -0
- package/dist/commands/tasks/list.d.ts.map +1 -0
- package/dist/commands/tasks/list.js +27 -0
- package/dist/commands/tasks/next.d.ts +3 -0
- package/dist/commands/tasks/next.d.ts.map +1 -0
- package/dist/commands/tasks/next.js +44 -0
- package/dist/commands/tasks/plan.d.ts +7 -0
- package/dist/commands/tasks/plan.d.ts.map +1 -0
- package/dist/commands/tasks/plan.js +131 -0
- package/dist/commands/tasks/show.d.ts +3 -0
- package/dist/commands/tasks/show.d.ts.map +1 -0
- package/dist/commands/tasks/show.js +23 -0
- package/dist/commands/tasks/split.d.ts +3 -0
- package/dist/commands/tasks/split.d.ts.map +1 -0
- package/dist/commands/tasks/split.js +95 -0
- package/dist/commands/tasks/status.d.ts +3 -0
- package/dist/commands/tasks/status.d.ts.map +1 -0
- package/dist/commands/tasks/status.js +26 -0
- package/dist/commands/tasks/subtasks.d.ts +3 -0
- package/dist/commands/tasks/subtasks.d.ts.map +1 -0
- package/dist/commands/tasks/subtasks.js +35 -0
- package/dist/commands/tasks/tags.d.ts +4 -0
- package/dist/commands/tasks/tags.d.ts.map +1 -0
- package/dist/commands/tasks/tags.js +37 -0
- package/dist/commands/tasks/tree.d.ts +3 -0
- package/dist/commands/tasks/tree.d.ts.map +1 -0
- package/dist/commands/tasks/tree.js +20 -0
- package/dist/commands/tasks/update.d.ts +3 -0
- package/dist/commands/tasks/update.d.ts.map +1 -0
- package/dist/commands/tasks/update.js +35 -0
- package/dist/commands/tasks.d.ts.map +1 -1
- package/dist/commands/tasks.js +23 -686
- package/dist/commands/workflow.d.ts +4 -0
- package/dist/commands/workflow.d.ts.map +1 -0
- package/dist/commands/workflow.js +503 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/lib/ai-service/ai-operations.d.ts.map +1 -1
- package/dist/lib/ai-service/ai-operations.js +54 -22
- package/dist/lib/ai-service/research-tools.d.ts.map +1 -1
- package/dist/lib/ai-service/research-tools.js +2 -2
- package/dist/lib/better-t-stack-cli.d.ts +1 -0
- package/dist/lib/better-t-stack-cli.d.ts.map +1 -1
- package/dist/lib/better-t-stack-cli.js +8 -2
- package/dist/lib/context-builder.d.ts +2 -1
- package/dist/lib/context-builder.d.ts.map +1 -1
- package/dist/lib/context-builder.js +3 -8
- package/dist/lib/hooks/logger.d.ts +2 -0
- package/dist/lib/hooks/logger.d.ts.map +1 -0
- package/dist/lib/hooks/logger.js +27 -0
- package/dist/lib/hooks.d.ts +64 -0
- package/dist/lib/hooks.d.ts.map +1 -0
- package/dist/lib/hooks.js +60 -0
- package/dist/lib/index.d.ts +18 -17
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +3 -3
- package/dist/lib/prompt-builder.d.ts.map +1 -1
- package/dist/lib/prompt-builder.js +16 -8
- package/dist/lib/{storage.d.ts → storage/file-system.d.ts} +4 -3
- package/dist/lib/storage/file-system.d.ts.map +1 -0
- package/dist/lib/{storage.js → storage/file-system.js} +141 -152
- package/dist/lib/storage/types.d.ts +43 -0
- package/dist/lib/storage/types.d.ts.map +1 -0
- package/dist/lib/storage/types.js +2 -0
- package/dist/lib/task-execution.d.ts.map +1 -1
- package/dist/lib/task-execution.js +22 -3
- package/dist/mcp/server.js +0 -0
- package/dist/prompts/workflow-assistance.d.ts +32 -0
- package/dist/prompts/workflow-assistance.d.ts.map +1 -0
- package/dist/prompts/workflow-assistance.js +130 -0
- package/dist/services/tasks.d.ts +4 -6
- package/dist/services/tasks.d.ts.map +1 -1
- package/dist/services/tasks.js +115 -96
- package/dist/services/workflow-ai-assistant.d.ts +74 -0
- package/dist/services/workflow-ai-assistant.d.ts.map +1 -0
- package/dist/services/workflow-ai-assistant.js +223 -0
- package/dist/test/hooks.test.d.ts +2 -0
- package/dist/test/hooks.test.d.ts.map +1 -0
- package/dist/test/hooks.test.js +58 -0
- package/dist/test/storage.test.js +16 -16
- package/dist/types/options.d.ts +35 -0
- package/dist/types/options.d.ts.map +1 -1
- package/dist/utils/ai-service-factory.d.ts +5 -5
- package/dist/utils/ai-service-factory.d.ts.map +1 -1
- package/dist/utils/ai-service-factory.js +4 -3
- package/dist/utils/workflow-prompts.d.ts +17 -0
- package/dist/utils/workflow-prompts.d.ts.map +1 -0
- package/dist/utils/workflow-prompts.js +88 -0
- package/package.json +4 -4
- package/dist/lib/storage.d.ts.map +0 -1
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.workflowAIAssistant = exports.WorkflowAIAssistant = void 0;
|
|
4
|
+
const ai_service_factory_1 = require("../utils/ai-service-factory");
|
|
5
|
+
const ai_config_builder_1 = require("../utils/ai-config-builder");
|
|
6
|
+
/**
|
|
7
|
+
* WorkflowAIAssistant - AI-powered decision making for workflow steps
|
|
8
|
+
* Helps users make configuration choices using natural language
|
|
9
|
+
*/
|
|
10
|
+
class WorkflowAIAssistant {
|
|
11
|
+
/**
|
|
12
|
+
* Assist with initialization and bootstrap configuration
|
|
13
|
+
*/
|
|
14
|
+
async assistInitConfig(input) {
|
|
15
|
+
const aiConfig = (0, ai_config_builder_1.buildAIConfig)(input.aiOptions);
|
|
16
|
+
const prompt = `You are helping a developer configure their project initialization and tech stack.
|
|
17
|
+
|
|
18
|
+
Available Options:
|
|
19
|
+
- AI Providers: openrouter, anthropic, openai, custom
|
|
20
|
+
- Frontend Frameworks: next, tanstack-router, react-router, vite-react, remix
|
|
21
|
+
- Backend Frameworks: hono, express, elysia, fastify
|
|
22
|
+
- Databases: sqlite, postgres, mysql, mongodb, turso, neon
|
|
23
|
+
- Authentication: better-auth (recommended), clerk, auth0, custom
|
|
24
|
+
|
|
25
|
+
User's Description:
|
|
26
|
+
"${input.userDescription}"
|
|
27
|
+
|
|
28
|
+
Based on the user's description, recommend a complete configuration. Consider:
|
|
29
|
+
1. Project complexity and scale
|
|
30
|
+
2. Developer experience level (infer from description)
|
|
31
|
+
3. Modern best practices for 2025
|
|
32
|
+
4. Compatibility between chosen technologies
|
|
33
|
+
|
|
34
|
+
Respond in JSON format:
|
|
35
|
+
{
|
|
36
|
+
"projectName": "suggested-project-name",
|
|
37
|
+
"aiProvider": "recommended-provider",
|
|
38
|
+
"aiModel": "recommended-model",
|
|
39
|
+
"frontend": "recommended-frontend",
|
|
40
|
+
"backend": "recommended-backend",
|
|
41
|
+
"database": "recommended-database",
|
|
42
|
+
"auth": true/false,
|
|
43
|
+
"reasoning": "Brief explanation of your choices"
|
|
44
|
+
}`;
|
|
45
|
+
const result = await (0, ai_service_factory_1.getAIOperations)().streamText(prompt, aiConfig, undefined, // system prompt
|
|
46
|
+
undefined, // user message (prompt is used)
|
|
47
|
+
input.streamingOptions);
|
|
48
|
+
// Parse AI response
|
|
49
|
+
try {
|
|
50
|
+
const jsonMatch = result.match(/\{[\s\S]*\}/);
|
|
51
|
+
if (!jsonMatch) {
|
|
52
|
+
throw new Error("No JSON found in AI response");
|
|
53
|
+
}
|
|
54
|
+
return JSON.parse(jsonMatch[0]);
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
// Fallback to sensible defaults
|
|
58
|
+
return {
|
|
59
|
+
projectName: "my-project",
|
|
60
|
+
aiProvider: "openrouter",
|
|
61
|
+
aiModel: "anthropic/claude-3.5-sonnet",
|
|
62
|
+
frontend: "next",
|
|
63
|
+
backend: "hono",
|
|
64
|
+
database: "sqlite",
|
|
65
|
+
auth: true,
|
|
66
|
+
reasoning: "Using modern, well-supported defaults",
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Generate a PRD from user's product description
|
|
72
|
+
*/
|
|
73
|
+
async assistPRDCreation(input) {
|
|
74
|
+
const aiConfig = (0, ai_config_builder_1.buildAIConfig)(input.aiOptions);
|
|
75
|
+
const prompt = `You are a product manager helping to create a Product Requirements Document (PRD).
|
|
76
|
+
|
|
77
|
+
User's Product Description:
|
|
78
|
+
"${input.userDescription}"
|
|
79
|
+
|
|
80
|
+
Create a comprehensive PRD with the following sections:
|
|
81
|
+
|
|
82
|
+
# Product Requirements Document
|
|
83
|
+
|
|
84
|
+
## Overview
|
|
85
|
+
[Brief overview of the product]
|
|
86
|
+
|
|
87
|
+
## Objectives
|
|
88
|
+
[Key objectives and goals]
|
|
89
|
+
|
|
90
|
+
## Target Audience
|
|
91
|
+
[Who will use this product]
|
|
92
|
+
|
|
93
|
+
## Features
|
|
94
|
+
|
|
95
|
+
### Core Features
|
|
96
|
+
[Essential features for MVP]
|
|
97
|
+
|
|
98
|
+
### Future Features
|
|
99
|
+
[Nice-to-have features for later]
|
|
100
|
+
|
|
101
|
+
## Technical Requirements
|
|
102
|
+
[Technical constraints and requirements]
|
|
103
|
+
|
|
104
|
+
## Success Metrics
|
|
105
|
+
[How to measure success]
|
|
106
|
+
|
|
107
|
+
## Timeline
|
|
108
|
+
[Rough timeline and milestones]
|
|
109
|
+
|
|
110
|
+
Generate a detailed, actionable PRD based on the user's description.`;
|
|
111
|
+
const result = await (0, ai_service_factory_1.getAIOperations)().streamText(prompt, aiConfig, undefined, // system prompt
|
|
112
|
+
undefined, // user message (prompt is used)
|
|
113
|
+
input.streamingOptions);
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Suggest improvements to an existing PRD
|
|
118
|
+
*/
|
|
119
|
+
async assistPRDRefinement(input) {
|
|
120
|
+
const aiConfig = (0, ai_config_builder_1.buildAIConfig)(input.aiOptions);
|
|
121
|
+
const prompt = `You are a product manager reviewing and improving a PRD.
|
|
122
|
+
|
|
123
|
+
Current PRD:
|
|
124
|
+
${input.currentPRD}
|
|
125
|
+
|
|
126
|
+
User's Feedback:
|
|
127
|
+
"${input.userFeedback}"
|
|
128
|
+
|
|
129
|
+
Improve the PRD based on the feedback. Consider:
|
|
130
|
+
1. Clarity and specificity
|
|
131
|
+
2. Completeness of requirements
|
|
132
|
+
3. Feasibility and scope
|
|
133
|
+
4. Technical details
|
|
134
|
+
5. Success criteria
|
|
135
|
+
|
|
136
|
+
Return the improved PRD in the same format, incorporating the user's feedback.`;
|
|
137
|
+
const result = await (0, ai_service_factory_1.getAIOperations)().streamText(prompt, aiConfig, undefined, // system prompt
|
|
138
|
+
undefined, // user message (prompt is used)
|
|
139
|
+
input.streamingOptions);
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Help prioritize and organize tasks
|
|
144
|
+
*/
|
|
145
|
+
async assistTaskPrioritization(input) {
|
|
146
|
+
const aiConfig = (0, ai_config_builder_1.buildAIConfig)(input.aiOptions);
|
|
147
|
+
const tasksDescription = input.tasks
|
|
148
|
+
.map((t, i) => `${i + 1}. [${t.id}] ${t.title}${t.description ? `: ${t.description}` : ""}`)
|
|
149
|
+
.join("\n");
|
|
150
|
+
const prompt = `You are a project manager helping to prioritize tasks.
|
|
151
|
+
|
|
152
|
+
Tasks:
|
|
153
|
+
${tasksDescription}
|
|
154
|
+
|
|
155
|
+
User's Guidance:
|
|
156
|
+
"${input.userGuidance}"
|
|
157
|
+
|
|
158
|
+
Prioritize these tasks (1 = highest priority) based on:
|
|
159
|
+
1. Dependencies (what needs to be done first)
|
|
160
|
+
2. User's guidance
|
|
161
|
+
3. MVP vs. nice-to-have
|
|
162
|
+
4. Risk and complexity
|
|
163
|
+
|
|
164
|
+
Respond in JSON format:
|
|
165
|
+
{
|
|
166
|
+
"prioritizedTasks": [
|
|
167
|
+
{"id": "task-id", "priority": 1, "reasoning": "why this priority"},
|
|
168
|
+
...
|
|
169
|
+
],
|
|
170
|
+
"recommendations": "Overall recommendations for task execution"
|
|
171
|
+
}`;
|
|
172
|
+
const result = await (0, ai_service_factory_1.getAIOperations)().streamText(prompt, aiConfig, undefined, // system prompt
|
|
173
|
+
undefined, // user message (prompt is used)
|
|
174
|
+
input.streamingOptions);
|
|
175
|
+
// Parse AI response
|
|
176
|
+
try {
|
|
177
|
+
const jsonMatch = result.match(/\{[\s\S]*\}/);
|
|
178
|
+
if (!jsonMatch) {
|
|
179
|
+
throw new Error("No JSON found in AI response");
|
|
180
|
+
}
|
|
181
|
+
return JSON.parse(jsonMatch[0]);
|
|
182
|
+
}
|
|
183
|
+
catch (error) {
|
|
184
|
+
// Fallback: return tasks in original order
|
|
185
|
+
return {
|
|
186
|
+
prioritizedTasks: input.tasks.map((t, i) => ({
|
|
187
|
+
id: t.id,
|
|
188
|
+
priority: i + 1,
|
|
189
|
+
reasoning: "Default ordering",
|
|
190
|
+
})),
|
|
191
|
+
recommendations: "Review and adjust priorities as needed",
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Generate custom instructions for task splitting
|
|
197
|
+
*/
|
|
198
|
+
async assistTaskSplitting(input) {
|
|
199
|
+
const aiConfig = (0, ai_config_builder_1.buildAIConfig)(input.aiOptions);
|
|
200
|
+
const prompt = `You are a technical lead helping to break down a complex task.
|
|
201
|
+
|
|
202
|
+
Task: ${input.taskTitle}
|
|
203
|
+
${input.taskContent ? `Description: ${input.taskContent}` : ""}
|
|
204
|
+
|
|
205
|
+
User's Guidance:
|
|
206
|
+
"${input.userGuidance}"
|
|
207
|
+
|
|
208
|
+
Generate specific instructions for how to split this task into subtasks. Consider:
|
|
209
|
+
1. Logical breakdown points
|
|
210
|
+
2. Size constraints (e.g., 2-4 hour chunks)
|
|
211
|
+
3. Dependencies between subtasks
|
|
212
|
+
4. Testing and validation steps
|
|
213
|
+
|
|
214
|
+
Provide clear, actionable instructions for the AI that will perform the split.`;
|
|
215
|
+
const result = await (0, ai_service_factory_1.getAIOperations)().streamText(prompt, aiConfig, undefined, // system prompt
|
|
216
|
+
undefined, // user message (prompt is used)
|
|
217
|
+
input.streamingOptions);
|
|
218
|
+
return result;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
exports.WorkflowAIAssistant = WorkflowAIAssistant;
|
|
222
|
+
// Export singleton instance
|
|
223
|
+
exports.workflowAIAssistant = new WorkflowAIAssistant();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.test.d.ts","sourceRoot":"","sources":["../../src/test/hooks.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const node_assert_1 = __importDefault(require("node:assert"));
|
|
7
|
+
const hooks_1 = require("../lib/hooks");
|
|
8
|
+
describe("HookRegistry", () => {
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
hooks_1.hooks.clear();
|
|
11
|
+
});
|
|
12
|
+
it("should register and call a listener", async () => {
|
|
13
|
+
let called = false;
|
|
14
|
+
const task = { id: "1", title: "Test Task" };
|
|
15
|
+
hooks_1.hooks.on("task:created", (payload) => {
|
|
16
|
+
node_assert_1.default.strictEqual(payload.task, task);
|
|
17
|
+
called = true;
|
|
18
|
+
});
|
|
19
|
+
await hooks_1.hooks.emit("task:created", { task });
|
|
20
|
+
node_assert_1.default.strictEqual(called, true);
|
|
21
|
+
});
|
|
22
|
+
it("should handle multiple listeners", async () => {
|
|
23
|
+
let count = 0;
|
|
24
|
+
const task = { id: "1", title: "Test Task" };
|
|
25
|
+
hooks_1.hooks.on("task:created", () => {
|
|
26
|
+
count++;
|
|
27
|
+
});
|
|
28
|
+
hooks_1.hooks.on("task:created", () => {
|
|
29
|
+
count++;
|
|
30
|
+
});
|
|
31
|
+
await hooks_1.hooks.emit("task:created", { task });
|
|
32
|
+
node_assert_1.default.strictEqual(count, 2);
|
|
33
|
+
});
|
|
34
|
+
it("should remove a listener", async () => {
|
|
35
|
+
let count = 0;
|
|
36
|
+
const handler = () => {
|
|
37
|
+
count++;
|
|
38
|
+
};
|
|
39
|
+
const task = { id: "1", title: "Test Task" };
|
|
40
|
+
hooks_1.hooks.on("task:created", handler);
|
|
41
|
+
hooks_1.hooks.off("task:created", handler);
|
|
42
|
+
await hooks_1.hooks.emit("task:created", { task });
|
|
43
|
+
node_assert_1.default.strictEqual(count, 0);
|
|
44
|
+
});
|
|
45
|
+
it("should not fail if a listener throws", async () => {
|
|
46
|
+
const task = { id: "1", title: "Test Task" };
|
|
47
|
+
hooks_1.hooks.on("task:created", () => {
|
|
48
|
+
throw new Error("Oops");
|
|
49
|
+
});
|
|
50
|
+
let secondCalled = false;
|
|
51
|
+
hooks_1.hooks.on("task:created", () => {
|
|
52
|
+
secondCalled = true;
|
|
53
|
+
});
|
|
54
|
+
// Should not throw
|
|
55
|
+
await hooks_1.hooks.emit("task:created", { task });
|
|
56
|
+
node_assert_1.default.strictEqual(secondCalled, true);
|
|
57
|
+
});
|
|
58
|
+
});
|
|
@@ -33,12 +33,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const
|
|
36
|
+
const file_system_1 = require("../lib/storage/file-system");
|
|
37
37
|
const assert = __importStar(require("assert"));
|
|
38
|
-
describe("
|
|
38
|
+
describe("FileSystemStorage", () => {
|
|
39
39
|
let storage;
|
|
40
40
|
beforeEach(async () => {
|
|
41
|
-
storage = new
|
|
41
|
+
storage = new file_system_1.FileSystemStorage();
|
|
42
42
|
// Clean up any existing data for fresh test
|
|
43
43
|
try {
|
|
44
44
|
const tasks = await storage.getTopLevelTasks();
|
|
@@ -55,7 +55,7 @@ describe("LocalStorage", () => {
|
|
|
55
55
|
const taskRequest = {
|
|
56
56
|
title: "Test Task",
|
|
57
57
|
description: "A test task description",
|
|
58
|
-
estimatedEffort: "small"
|
|
58
|
+
estimatedEffort: "small",
|
|
59
59
|
};
|
|
60
60
|
const task = await storage.createTask(taskRequest);
|
|
61
61
|
assert.strictEqual(task.title, "Test Task");
|
|
@@ -68,7 +68,7 @@ describe("LocalStorage", () => {
|
|
|
68
68
|
});
|
|
69
69
|
it("should retrieve a task by ID", async () => {
|
|
70
70
|
const taskRequest = {
|
|
71
|
-
title: "Test Task for Retrieval"
|
|
71
|
+
title: "Test Task for Retrieval",
|
|
72
72
|
};
|
|
73
73
|
const createdTask = await storage.createTask(taskRequest);
|
|
74
74
|
const retrievedTask = await storage.getTask(createdTask.id);
|
|
@@ -82,14 +82,14 @@ describe("LocalStorage", () => {
|
|
|
82
82
|
});
|
|
83
83
|
it("should update a task", async () => {
|
|
84
84
|
const taskRequest = {
|
|
85
|
-
title: "Original Title"
|
|
85
|
+
title: "Original Title",
|
|
86
86
|
};
|
|
87
87
|
const createdTask = await storage.createTask(taskRequest);
|
|
88
88
|
// Add a small delay to ensure different timestamps
|
|
89
|
-
await new Promise(resolve => setTimeout(resolve, 1));
|
|
89
|
+
await new Promise((resolve) => setTimeout(resolve, 1));
|
|
90
90
|
const updatedTask = await storage.updateTask(createdTask.id, {
|
|
91
91
|
title: "Updated Title",
|
|
92
|
-
status: "in-progress"
|
|
92
|
+
status: "in-progress",
|
|
93
93
|
});
|
|
94
94
|
assert.ok(updatedTask);
|
|
95
95
|
assert.strictEqual(updatedTask.title, "Updated Title");
|
|
@@ -98,7 +98,7 @@ describe("LocalStorage", () => {
|
|
|
98
98
|
});
|
|
99
99
|
it("should delete a task", async () => {
|
|
100
100
|
const taskRequest = {
|
|
101
|
-
title: "Task to Delete"
|
|
101
|
+
title: "Task to Delete",
|
|
102
102
|
};
|
|
103
103
|
const createdTask = await storage.createTask(taskRequest);
|
|
104
104
|
const deleteResult = await storage.deleteTask(createdTask.id);
|
|
@@ -108,16 +108,16 @@ describe("LocalStorage", () => {
|
|
|
108
108
|
});
|
|
109
109
|
it("should handle task dependencies", async () => {
|
|
110
110
|
const task1Request = {
|
|
111
|
-
title: "First Task"
|
|
111
|
+
title: "First Task",
|
|
112
112
|
};
|
|
113
113
|
const task2Request = {
|
|
114
114
|
title: "Second Task",
|
|
115
|
-
dependencies: []
|
|
115
|
+
dependencies: [],
|
|
116
116
|
};
|
|
117
117
|
const task1 = await storage.createTask(task1Request);
|
|
118
118
|
const task2 = await storage.createTask({
|
|
119
119
|
...task2Request,
|
|
120
|
-
dependencies: [task1.id]
|
|
120
|
+
dependencies: [task1.id],
|
|
121
121
|
});
|
|
122
122
|
assert.strictEqual(task2.dependencies?.length, 1);
|
|
123
123
|
assert.strictEqual(task2.dependencies[0], task1.id);
|
|
@@ -148,7 +148,7 @@ describe("LocalStorage", () => {
|
|
|
148
148
|
try {
|
|
149
149
|
await storage.createTask({
|
|
150
150
|
title: "Test Task",
|
|
151
|
-
estimatedEffort: "invalid"
|
|
151
|
+
estimatedEffort: "invalid",
|
|
152
152
|
});
|
|
153
153
|
assert.fail("Should have thrown an error");
|
|
154
154
|
}
|
|
@@ -175,7 +175,7 @@ describe("LocalStorage", () => {
|
|
|
175
175
|
describe("Content Management", () => {
|
|
176
176
|
it("should save and retrieve task content", async () => {
|
|
177
177
|
const taskRequest = {
|
|
178
|
-
title: "Task with Content"
|
|
178
|
+
title: "Task with Content",
|
|
179
179
|
};
|
|
180
180
|
const task = await storage.createTask(taskRequest);
|
|
181
181
|
const content = "# Task Content\nThis is the task content.";
|
|
@@ -187,7 +187,7 @@ describe("LocalStorage", () => {
|
|
|
187
187
|
it("should return null for non-existent content", async () => {
|
|
188
188
|
// First create a task to ensure storage is initialized
|
|
189
189
|
const taskRequest = {
|
|
190
|
-
title: "Dummy Task for Initialization"
|
|
190
|
+
title: "Dummy Task for Initialization",
|
|
191
191
|
};
|
|
192
192
|
await storage.createTask(taskRequest);
|
|
193
193
|
const content = await storage.getTaskContent("non-existent-task");
|
|
@@ -195,7 +195,7 @@ describe("LocalStorage", () => {
|
|
|
195
195
|
});
|
|
196
196
|
it("should delete task content", async () => {
|
|
197
197
|
const taskRequest = {
|
|
198
|
-
title: "Task with Content to Delete"
|
|
198
|
+
title: "Task with Content to Delete",
|
|
199
199
|
};
|
|
200
200
|
const task = await storage.createTask(taskRequest);
|
|
201
201
|
await storage.saveTaskContent(task.id, "Some content");
|
package/dist/types/options.d.ts
CHANGED
|
@@ -91,4 +91,39 @@ export interface ReworkPrdOptions extends StreamingAIOptions {
|
|
|
91
91
|
prompt?: string;
|
|
92
92
|
message?: string;
|
|
93
93
|
}
|
|
94
|
+
export type WorkflowStep = "initialize" | "define-prd" | "refine-prd" | "generate-tasks" | "split-tasks" | "complete";
|
|
95
|
+
export interface WorkflowState {
|
|
96
|
+
projectName?: string;
|
|
97
|
+
projectDir?: string;
|
|
98
|
+
initialized: boolean;
|
|
99
|
+
prdFile?: string;
|
|
100
|
+
prdContent?: string;
|
|
101
|
+
tasks?: Array<{
|
|
102
|
+
id: string;
|
|
103
|
+
title: string;
|
|
104
|
+
description?: string;
|
|
105
|
+
}>;
|
|
106
|
+
currentStep: WorkflowStep;
|
|
107
|
+
aiConfig?: {
|
|
108
|
+
provider: string;
|
|
109
|
+
model: string;
|
|
110
|
+
key?: string;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export interface AIAssistedChoice<T = any> {
|
|
114
|
+
userInput: string;
|
|
115
|
+
availableOptions: T[];
|
|
116
|
+
context: string;
|
|
117
|
+
recommendation?: T;
|
|
118
|
+
}
|
|
119
|
+
export interface InitConfigChoice {
|
|
120
|
+
projectName: string;
|
|
121
|
+
aiProvider: string;
|
|
122
|
+
aiModel: string;
|
|
123
|
+
frontend?: string;
|
|
124
|
+
backend?: string;
|
|
125
|
+
database?: string;
|
|
126
|
+
auth?: boolean;
|
|
127
|
+
reasoning?: string;
|
|
128
|
+
}
|
|
94
129
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/types/options.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAGD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAGD,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAA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U,CAAC;AAEf,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE,WAAW,EAAE,YAAY,CAAC;IAC1B,QAAQ,CAAC,EAAE;QACT,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,GAAG;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,CAAC,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,CAAC,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ContextBuilder } from
|
|
3
|
-
import { AIOperations } from
|
|
4
|
-
import { ModelProvider } from
|
|
1
|
+
import { TaskRepository } from "../lib/storage/types";
|
|
2
|
+
import { ContextBuilder } from "../lib/context-builder";
|
|
3
|
+
import { AIOperations } from "../lib/ai-service/ai-operations";
|
|
4
|
+
import { ModelProvider } from "../lib/ai-service/model-provider";
|
|
5
5
|
export declare function getAIOperations(): AIOperations;
|
|
6
6
|
export declare function getModelProvider(): ModelProvider;
|
|
7
|
-
export declare function getStorage():
|
|
7
|
+
export declare function getStorage(): TaskRepository;
|
|
8
8
|
export declare function getContextBuilder(): ContextBuilder;
|
|
9
9
|
export declare function resetServiceInstances(): void;
|
|
10
10
|
//# sourceMappingURL=ai-service-factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-service-factory.d.ts","sourceRoot":"","sources":["../../src/utils/ai-service-factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ai-service-factory.d.ts","sourceRoot":"","sources":["../../src/utils/ai-service-factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAOjE,wBAAgB,eAAe,IAAI,YAAY,CAK9C;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CAKhD;AAED,wBAAgB,UAAU,IAAI,cAAc,CAa3C;AAED,wBAAgB,iBAAiB,IAAI,cAAc,CAMlD;AAED,wBAAgB,qBAAqB,IAAI,IAAI,CAK5C"}
|
|
@@ -5,7 +5,7 @@ exports.getModelProvider = getModelProvider;
|
|
|
5
5
|
exports.getStorage = getStorage;
|
|
6
6
|
exports.getContextBuilder = getContextBuilder;
|
|
7
7
|
exports.resetServiceInstances = resetServiceInstances;
|
|
8
|
-
const
|
|
8
|
+
const file_system_1 = require("../lib/storage/file-system");
|
|
9
9
|
const context_builder_1 = require("../lib/context-builder");
|
|
10
10
|
const fs_1 = require("fs");
|
|
11
11
|
const config_1 = require("../lib/config");
|
|
@@ -34,13 +34,14 @@ function getStorage() {
|
|
|
34
34
|
if (!(0, fs_1.existsSync)(taskOMaticDir)) {
|
|
35
35
|
throw new Error(`Not a task-o-matic project. Run 'task-o-matic init init' first.`);
|
|
36
36
|
}
|
|
37
|
-
storage = new
|
|
37
|
+
storage = new file_system_1.FileSystemStorage();
|
|
38
38
|
}
|
|
39
39
|
return storage;
|
|
40
40
|
}
|
|
41
41
|
function getContextBuilder() {
|
|
42
42
|
if (!contextBuilder) {
|
|
43
|
-
|
|
43
|
+
const storage = getStorage();
|
|
44
|
+
contextBuilder = new context_builder_1.ContextBuilder(storage);
|
|
44
45
|
}
|
|
45
46
|
return contextBuilder;
|
|
46
47
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reusable inquirer prompt configurations for workflow
|
|
3
|
+
*/
|
|
4
|
+
export declare function confirmPrompt(message: string, defaultValue?: boolean): Promise<boolean>;
|
|
5
|
+
export declare function selectPrompt<T = string>(message: string, choices: Array<{
|
|
6
|
+
name: string;
|
|
7
|
+
value: T;
|
|
8
|
+
} | T>): Promise<T>;
|
|
9
|
+
export declare function multiSelectPrompt<T = string>(message: string, choices: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
value: T;
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
} | T>): Promise<T[]>;
|
|
14
|
+
export declare function textInputPrompt(message: string, defaultValue?: string, validate?: (input: string) => boolean | string): Promise<string>;
|
|
15
|
+
export declare function editorPrompt(message: string, defaultValue?: string): Promise<string>;
|
|
16
|
+
export declare function passwordPrompt(message: string): Promise<string>;
|
|
17
|
+
//# sourceMappingURL=workflow-prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-prompts.d.ts","sourceRoot":"","sources":["../../src/utils/workflow-prompts.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,YAAY,UAAO,GAClB,OAAO,CAAC,OAAO,CAAC,CAWlB;AAED,wBAAgB,YAAY,CAAC,CAAC,GAAG,MAAM,EACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GAAG,CAAC,CAAC,GAC7C,OAAO,CAAC,CAAC,CAAC,CAWZ;AAED,wBAAgB,iBAAiB,CAAC,CAAC,GAAG,MAAM,EAC1C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,CAAC,CAAC,GAChE,OAAO,CAAC,CAAC,EAAE,CAAC,CAWd;AAED,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,EACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM,GAC7C,OAAO,CAAC,MAAM,CAAC,CAYjB;AAED,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CAWjB;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAW/D"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.confirmPrompt = confirmPrompt;
|
|
7
|
+
exports.selectPrompt = selectPrompt;
|
|
8
|
+
exports.multiSelectPrompt = multiSelectPrompt;
|
|
9
|
+
exports.textInputPrompt = textInputPrompt;
|
|
10
|
+
exports.editorPrompt = editorPrompt;
|
|
11
|
+
exports.passwordPrompt = passwordPrompt;
|
|
12
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
13
|
+
/**
|
|
14
|
+
* Reusable inquirer prompt configurations for workflow
|
|
15
|
+
*/
|
|
16
|
+
function confirmPrompt(message, defaultValue = true) {
|
|
17
|
+
return inquirer_1.default
|
|
18
|
+
.prompt([
|
|
19
|
+
{
|
|
20
|
+
type: "confirm",
|
|
21
|
+
name: "confirmed",
|
|
22
|
+
message,
|
|
23
|
+
default: defaultValue,
|
|
24
|
+
},
|
|
25
|
+
])
|
|
26
|
+
.then((answers) => answers.confirmed);
|
|
27
|
+
}
|
|
28
|
+
function selectPrompt(message, choices) {
|
|
29
|
+
return inquirer_1.default
|
|
30
|
+
.prompt([
|
|
31
|
+
{
|
|
32
|
+
type: "list",
|
|
33
|
+
name: "selected",
|
|
34
|
+
message,
|
|
35
|
+
choices,
|
|
36
|
+
},
|
|
37
|
+
])
|
|
38
|
+
.then((answers) => answers.selected);
|
|
39
|
+
}
|
|
40
|
+
function multiSelectPrompt(message, choices) {
|
|
41
|
+
return inquirer_1.default
|
|
42
|
+
.prompt([
|
|
43
|
+
{
|
|
44
|
+
type: "checkbox",
|
|
45
|
+
name: "selected",
|
|
46
|
+
message,
|
|
47
|
+
choices,
|
|
48
|
+
},
|
|
49
|
+
])
|
|
50
|
+
.then((answers) => answers.selected);
|
|
51
|
+
}
|
|
52
|
+
function textInputPrompt(message, defaultValue, validate) {
|
|
53
|
+
return inquirer_1.default
|
|
54
|
+
.prompt([
|
|
55
|
+
{
|
|
56
|
+
type: "input",
|
|
57
|
+
name: "text",
|
|
58
|
+
message,
|
|
59
|
+
default: defaultValue,
|
|
60
|
+
validate,
|
|
61
|
+
},
|
|
62
|
+
])
|
|
63
|
+
.then((answers) => answers.text);
|
|
64
|
+
}
|
|
65
|
+
function editorPrompt(message, defaultValue) {
|
|
66
|
+
return inquirer_1.default
|
|
67
|
+
.prompt([
|
|
68
|
+
{
|
|
69
|
+
type: "editor",
|
|
70
|
+
name: "content",
|
|
71
|
+
message,
|
|
72
|
+
default: defaultValue,
|
|
73
|
+
},
|
|
74
|
+
])
|
|
75
|
+
.then((answers) => answers.content);
|
|
76
|
+
}
|
|
77
|
+
function passwordPrompt(message) {
|
|
78
|
+
return inquirer_1.default
|
|
79
|
+
.prompt([
|
|
80
|
+
{
|
|
81
|
+
type: "password",
|
|
82
|
+
name: "password",
|
|
83
|
+
message,
|
|
84
|
+
mask: "*",
|
|
85
|
+
},
|
|
86
|
+
])
|
|
87
|
+
.then((answers) => answers.password);
|
|
88
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "task-o-matic",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "AI-powered task management CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"task-management",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"start": "node dist/cli/bin.js",
|
|
51
51
|
"check-types": "tsc --noEmit --skipLibCheck",
|
|
52
52
|
"test": "mocha -r tsx/cjs src/test/**/*.test.ts",
|
|
53
|
-
"prepare": "npm run build",
|
|
54
|
-
"prepublishOnly": "bun run build && bun test"
|
|
53
|
+
"prepare": "npm run build && chmod +x dist/cli/bin.js",
|
|
54
|
+
"prepublishOnly": "bun run build && chmod +x dist/cli/bin.js && bun test"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@ai-sdk/anthropic": "^2.0.44",
|
|
@@ -79,4 +79,4 @@
|
|
|
79
79
|
"tsx": "^4.19.2",
|
|
80
80
|
"typescript": "^5"
|
|
81
81
|
}
|
|
82
|
-
}
|
|
82
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/lib/storage.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,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