@opentask/taskin-task-manager 1.0.8 → 2.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"task-manager.test.js","sourceRoot":"","sources":["../src/task-manager.test.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAG7E,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,IAAI,WAAwB,CAAC;IAC7B,IAAI,gBAA+B,CAAC;IACpC,IAAI,QAAkB,CAAC;IAEvB,UAAU,CAAC,GAAG,EAAE;QACd,EAAE,CAAC,aAAa,EAAE,CAAC;QACnB,gBAAgB,GAAG,sBAAsB,EAAE,CAAC;QAC5C,QAAQ,GAAG,cAAc,EAAE,CAAC;QAC5B,WAAW,GAAG,IAAI,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;QACzB,EAAE,CAAC,6BAA6B,EAAE,KAAK,IAAI,EAAE;YAC1C,gBAAgB,CAAC,QAAiB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;YAEhE,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YAE5D,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;YACnE,MAAM,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,oBAAoB,CACtD,MAAM,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC,CACnD,CAAC;Y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AC,OAAO,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -4,26 +4,26 @@ import type { Task, TaskType, User } from '@opentask/taskin-types';
4
4
  * @public
5
5
  */
6
6
  export interface CreateTaskOptions {
7
- /** Task title */
8
- title: string;
9
- /** Task type (feat, fix, chore, etc.) */
10
- type: TaskType;
11
- /** Optional task description */
12
- description?: string;
13
- /** Optional assignee user ID or name */
14
- assignee?: string;
7
+ /** Task title */
8
+ title: string;
9
+ /** Task type (feat, fix, chore, etc.) */
10
+ type: TaskType;
11
+ /** Optional task description */
12
+ description?: string;
13
+ /** Optional assignee user ID or name */
14
+ assignee?: string;
15
15
  }
16
16
  /**
17
17
  * Result of creating a new task
18
18
  * @public
19
19
  */
20
20
  export interface CreateTaskResult {
21
- /** The created task */
22
- task: TaskFile;
23
- /** The generated task ID */
24
- taskId: string;
25
- /** The file path where the task was created */
26
- filePath: string;
21
+ /** The created task */
22
+ task: TaskFile;
23
+ /** The generated task ID */
24
+ taskId: string;
25
+ /** The file path where the task was created */
26
+ filePath: string;
27
27
  }
28
28
  /**
29
29
  * Severity level for validation issues
@@ -35,32 +35,32 @@ export type ValidationSeverity = 'error' | 'warning' | 'info';
35
35
  * @public
36
36
  */
37
37
  export interface ValidationIssue {
38
- /** The file or task that has the issue */
39
- file: string;
40
- /** Optional line number where the issue occurs */
41
- line?: number;
42
- /** Human-readable description of the issue */
43
- message: string;
44
- /** Severity level of the issue */
45
- severity: ValidationSeverity;
46
- /** Optional suggestion for fixing the issue */
47
- suggestion?: string;
38
+ /** The file or task that has the issue */
39
+ file: string;
40
+ /** Optional line number where the issue occurs */
41
+ line?: number;
42
+ /** Human-readable description of the issue */
43
+ message: string;
44
+ /** Severity level of the issue */
45
+ severity: ValidationSeverity;
46
+ /** Optional suggestion for fixing the issue */
47
+ suggestion?: string;
48
48
  }
49
49
  /**
50
50
  * Result of a lint operation
51
51
  * @public
52
52
  */
53
53
  export interface LintResult {
54
- /** Whether the lint passed without errors */
55
- valid: boolean;
56
- /** List of validation issues found */
57
- issues: ValidationIssue[];
58
- /** Number of errors found */
59
- errorCount: number;
60
- /** Number of warnings found */
61
- warningCount: number;
62
- /** Number of info messages */
63
- infoCount: number;
54
+ /** Whether the lint passed without errors */
55
+ valid: boolean;
56
+ /** List of validation issues found */
57
+ issues: ValidationIssue[];
58
+ /** Number of errors found */
59
+ errorCount: number;
60
+ /** Number of warnings found */
61
+ warningCount: number;
62
+ /** Number of info messages */
63
+ infoCount: number;
64
64
  }
65
65
  /**
66
66
  * A task with additional file system metadata.
@@ -68,14 +68,14 @@ export interface LintResult {
68
68
  * @public
69
69
  */
70
70
  export type TaskFile = Task & {
71
- /** The raw markdown content of the task file */
72
- content: string;
73
- /** Absolute or relative path to the task file */
74
- filePath: string;
75
- /** The type of work this task represents */
76
- type: TaskType;
77
- /** Optional user assigned to this task */
78
- assignee?: User;
71
+ /** The raw markdown content of the task file */
72
+ content: string;
73
+ /** Absolute or relative path to the task file */
74
+ filePath: string;
75
+ /** The type of work this task represents */
76
+ type: TaskType;
77
+ /** Optional user assigned to this task */
78
+ assignee?: User;
79
79
  };
80
80
  /**
81
81
  * Interface for task storage providers.
@@ -84,35 +84,40 @@ export type TaskFile = Task & {
84
84
  * @public
85
85
  */
86
86
  export interface ITaskProvider {
87
- /**
88
- * Find a specific task by its ID.
89
- * @param taskId - The unique identifier of the task
90
- * @returns The task if found, undefined otherwise
91
- */
92
- findTask(taskId: string): Promise<TaskFile | undefined>;
93
- /**
94
- * Retrieve all tasks from the provider.
95
- * @returns Array of all tasks
96
- */
97
- getAllTasks(): Promise<TaskFile[]>;
98
- /**
99
- * Update an existing task.
100
- * @param task - The task with updated information
101
- */
102
- updateTask(task: TaskFile): Promise<void>;
103
- /**
104
- * Create a new task.
105
- * @param options - Options for creating the task
106
- * @returns The created task information
107
- */
108
- createTask(options: CreateTaskOptions): Promise<CreateTaskResult>;
109
- /**
110
- * Validate all tasks managed by this provider.
111
- * Each provider knows its own format and validation rules.
112
- * @param fix - If true, attempt to automatically fix validation issues
113
- * @returns The lint result with any validation issues found
114
- */
115
- lint(fix?: boolean): Promise<LintResult>;
87
+ /**
88
+ * Initialize the provider, performing any necessary setup or loading.
89
+ * This may involve reading existing tasks, setting up connections, etc.
90
+ */
91
+ initialize(): Promise<void>;
92
+ /**
93
+ * Find a specific task by its ID.
94
+ * @param taskId - The unique identifier of the task
95
+ * @returns The task if found, undefined otherwise
96
+ */
97
+ findTask(taskId: string): Promise<TaskFile | undefined>;
98
+ /**
99
+ * Retrieve all tasks from the provider.
100
+ * @returns Array of all tasks
101
+ */
102
+ getAllTasks(): Promise<TaskFile[]>;
103
+ /**
104
+ * Update an existing task.
105
+ * @param task - The task with updated information
106
+ */
107
+ updateTask(task: TaskFile): Promise<void>;
108
+ /**
109
+ * Create a new task.
110
+ * @param options - Options for creating the task
111
+ * @returns The created task information
112
+ */
113
+ createTask(options: CreateTaskOptions): Promise<CreateTaskResult>;
114
+ /**
115
+ * Validate all tasks managed by this provider.
116
+ * Each provider knows its own format and validation rules.
117
+ * @param fix - If true, attempt to automatically fix validation issues
118
+ * @returns The lint result with any validation issues found
119
+ */
120
+ lint(fix?: boolean): Promise<LintResult>;
116
121
  }
117
122
  /**
118
123
  * Interface for task management operations.
@@ -120,33 +125,41 @@ export interface ITaskProvider {
120
125
  * @public
121
126
  */
122
127
  export interface ITaskManager {
123
- /**
124
- * Mark a task as finished.
125
- * Transitions the task to 'done' status.
126
- * @param taskId - The unique identifier of the task
127
- * @returns The updated task
128
- * @throws Error if task is not found
129
- */
130
- finishTask(taskId: string): Promise<TaskFile>;
131
- /**
132
- * Start working on a task.
133
- * Transitions the task to 'in-progress' status.
134
- * @param taskId - The unique identifier of the task
135
- * @returns The updated task
136
- * @throws Error if task is not found, already in progress, or already done
137
- */
138
- startTask(taskId: string): Promise<TaskFile>;
139
- /**
140
- * Create a new task.
141
- * @param options - Options for creating the task
142
- * @returns The created task information
143
- */
144
- createTask(options: CreateTaskOptions): Promise<CreateTaskResult>;
145
- /**
146
- * Validate all tasks in the system.
147
- * Delegates to the underlying provider's lint implementation.
148
- * @param fix - If true, attempt to automatically fix validation issues
149
- * @returns The lint result with any validation issues found
150
- */
151
- lint(fix?: boolean): Promise<LintResult>;
128
+ /**
129
+ * Mark a task as finished.
130
+ * Transitions the task to 'done' status.
131
+ * @param taskId - The unique identifier of the task
132
+ * @returns The updated task
133
+ * @throws Error if task is not found
134
+ */
135
+ finishTask(taskId: string): Promise<TaskFile>;
136
+ /**
137
+ * Mark a task as ready for review.
138
+ * Transitions the task from 'in-progress' to 'in-review' status.
139
+ * @param taskId - The unique identifier of the task
140
+ * @returns The updated task
141
+ * @throws Error if task is not found or not in 'in-progress' status
142
+ */
143
+ reviewTask(taskId: string): Promise<TaskFile>;
144
+ /**
145
+ * Start working on a task.
146
+ * Transitions the task to 'in-progress' status.
147
+ * @param taskId - The unique identifier of the task
148
+ * @returns The updated task
149
+ * @throws Error if task is not found, already in progress, or already done
150
+ */
151
+ startTask(taskId: string): Promise<TaskFile>;
152
+ /**
153
+ * Create a new task.
154
+ * @param options - Options for creating the task
155
+ * @returns The created task information
156
+ */
157
+ createTask(options: CreateTaskOptions): Promise<CreateTaskResult>;
158
+ /**
159
+ * Validate all tasks in the system.
160
+ * Delegates to the underlying provider's lint implementation.
161
+ * @param fix - If true, attempt to automatically fix validation issues
162
+ * @returns The lint result with any validation issues found
163
+ */
164
+ lint(fix?: boolean): Promise<LintResult>;
152
165
  }
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=task-manager.types.js.map
2
+ //# sourceMappingURL=task-manager.types.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentask/taskin-task-manager",
3
- "version": "1.0.8",
3
+ "version": "2.0.0",
4
4
  "description": "Task lifecycle management for Taskin",
5
5
  "type": "module",
6
6
  "motivation": "To manage the lifecycle of tasks, including creation, status updates, and retrieval.",
@@ -32,12 +32,13 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@opentask/taskin-types": "^1.0.5"
35
+ "@opentask/taskin-types": "1.1.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "typescript": "^5.9.3"
39
39
  },
40
40
  "scripts": {
41
+ "install": "echo 'Installing taskin-task-manager dependencies...'",
41
42
  "build": "tsc",
42
43
  "clean": "rm -rf dist coverage .turbo",
43
44
  "dev": "tsc --watch",
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './metrics.types';
1
2
  export * from './task-manager';
2
3
  export * from './task-manager.types';
3
4
 
@@ -21,4 +21,5 @@ export const createMockTaskProvider = (): ITaskProvider => ({
21
21
  updateTask: vi.fn(),
22
22
  createTask: vi.fn(),
23
23
  lint: vi.fn(),
24
+ initialize: vi.fn(),
24
25
  });
@@ -60,6 +60,56 @@ describe('TaskManager', () => {
60
60
  });
61
61
  });
62
62
 
63
+ describe('reviewTask', () => {
64
+ it('should change status to in-review for an in-progress task', async () => {
65
+ const inProgressTask = { ...mockTask, status: 'in-progress' as const };
66
+ (mockTaskProvider.findTask as Mock).mockResolvedValue(inProgressTask);
67
+
68
+ const updatedTask = await taskManager.reviewTask('task-001');
69
+
70
+ expect(mockTaskProvider.findTask).toHaveBeenCalledWith('task-001');
71
+ expect(mockTaskProvider.updateTask).toHaveBeenCalledWith(
72
+ expect.objectContaining({ status: 'in-review' }),
73
+ );
74
+ expect(updatedTask.status).toBe('in-review');
75
+ });
76
+
77
+ it('should throw an error if task is not found', async () => {
78
+ (mockTaskProvider.findTask as Mock).mockResolvedValue(undefined);
79
+
80
+ await expect(taskManager.reviewTask('not-found')).rejects.toThrow(
81
+ "Task with ID 'not-found' not found.",
82
+ );
83
+ });
84
+
85
+ it('should throw an error if task is not in-progress', async () => {
86
+ const pendingTask = { ...mockTask, status: 'pending' as const };
87
+ (mockTaskProvider.findTask as Mock).mockResolvedValue(pendingTask);
88
+
89
+ await expect(taskManager.reviewTask('task-001')).rejects.toThrow(
90
+ "Task 'task-001' must be in 'in-progress' status to be reviewed",
91
+ );
92
+ });
93
+
94
+ it('should throw an error if task is already done', async () => {
95
+ const doneTask = { ...mockTask, status: 'done' as const };
96
+ (mockTaskProvider.findTask as Mock).mockResolvedValue(doneTask);
97
+
98
+ await expect(taskManager.reviewTask('task-001')).rejects.toThrow(
99
+ "Task 'task-001' must be in 'in-progress' status to be reviewed",
100
+ );
101
+ });
102
+
103
+ it('should throw an error if task is already in-review', async () => {
104
+ const reviewTask = { ...mockTask, status: 'in-review' as const };
105
+ (mockTaskProvider.findTask as Mock).mockResolvedValue(reviewTask);
106
+
107
+ await expect(taskManager.reviewTask('task-001')).rejects.toThrow(
108
+ "Task 'task-001' must be in 'in-progress' status to be reviewed",
109
+ );
110
+ });
111
+ });
112
+
63
113
  describe('createTask', () => {
64
114
  it('should delegate task creation to provider', async () => {
65
115
  const createOptions = { title: 'New Task', type: 'feat' as const };
@@ -44,6 +44,25 @@ export class TaskManager implements ITaskManager {
44
44
  return updatedTask;
45
45
  }
46
46
 
47
+ async reviewTask(taskId: string): Promise<TaskFile> {
48
+ const task = await this.taskProvider.findTask(taskId);
49
+
50
+ if (!task) {
51
+ throw new Error(`Task with ID '${taskId}' not found.`);
52
+ }
53
+
54
+ if (task.status !== 'in-progress') {
55
+ throw new Error(
56
+ `Task '${taskId}' must be in 'in-progress' status to be reviewed. Current status: ${task.status}`,
57
+ );
58
+ }
59
+
60
+ const updatedTask: TaskFile = { ...task, status: 'in-review' };
61
+ await this.taskProvider.updateTask(updatedTask);
62
+
63
+ return updatedTask;
64
+ }
65
+
47
66
  async createTask(options: CreateTaskOptions): Promise<CreateTaskResult> {
48
67
  return this.taskProvider.createTask(options);
49
68
  }
@@ -91,6 +91,12 @@ export type TaskFile = Task & {
91
91
  * @public
92
92
  */
93
93
  export interface ITaskProvider {
94
+ /**
95
+ * Initialize the provider, performing any necessary setup or loading.
96
+ * This may involve reading existing tasks, setting up connections, etc.
97
+ */
98
+ initialize(): Promise<void>;
99
+
94
100
  /**
95
101
  * Find a specific task by its ID.
96
102
  * @param taskId - The unique identifier of the task
@@ -141,6 +147,15 @@ export interface ITaskManager {
141
147
  */
142
148
  finishTask(taskId: string): Promise<TaskFile>;
143
149
 
150
+ /**
151
+ * Mark a task as ready for review.
152
+ * Transitions the task from 'in-progress' to 'in-review' status.
153
+ * @param taskId - The unique identifier of the task
154
+ * @returns The updated task
155
+ * @throws Error if task is not found or not in 'in-progress' status
156
+ */
157
+ reviewTask(taskId: string): Promise<TaskFile>;
158
+
144
159
  /**
145
160
  * Start working on a task.
146
161
  * Transitions the task to 'in-progress' status.