octie-cli 1.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.
Files changed (162) hide show
  1. package/README.md +523 -0
  2. package/dist/cli/commands/approve.d.ts +27 -0
  3. package/dist/cli/commands/approve.d.ts.map +1 -0
  4. package/dist/cli/commands/approve.js +119 -0
  5. package/dist/cli/commands/approve.js.map +1 -0
  6. package/dist/cli/commands/batch.d.ts +15 -0
  7. package/dist/cli/commands/batch.d.ts.map +1 -0
  8. package/dist/cli/commands/batch.js +521 -0
  9. package/dist/cli/commands/batch.js.map +1 -0
  10. package/dist/cli/commands/create.d.ts +9 -0
  11. package/dist/cli/commands/create.d.ts.map +1 -0
  12. package/dist/cli/commands/create.js +321 -0
  13. package/dist/cli/commands/create.js.map +1 -0
  14. package/dist/cli/commands/delete.d.ts +9 -0
  15. package/dist/cli/commands/delete.d.ts.map +1 -0
  16. package/dist/cli/commands/delete.js +143 -0
  17. package/dist/cli/commands/delete.js.map +1 -0
  18. package/dist/cli/commands/export.d.ts +9 -0
  19. package/dist/cli/commands/export.d.ts.map +1 -0
  20. package/dist/cli/commands/export.js +66 -0
  21. package/dist/cli/commands/export.js.map +1 -0
  22. package/dist/cli/commands/find.d.ts +16 -0
  23. package/dist/cli/commands/find.d.ts.map +1 -0
  24. package/dist/cli/commands/find.js +252 -0
  25. package/dist/cli/commands/find.js.map +1 -0
  26. package/dist/cli/commands/get.d.ts +9 -0
  27. package/dist/cli/commands/get.d.ts.map +1 -0
  28. package/dist/cli/commands/get.js +74 -0
  29. package/dist/cli/commands/get.js.map +1 -0
  30. package/dist/cli/commands/graph.d.ts +9 -0
  31. package/dist/cli/commands/graph.d.ts.map +1 -0
  32. package/dist/cli/commands/graph.js +200 -0
  33. package/dist/cli/commands/graph.js.map +1 -0
  34. package/dist/cli/commands/import.d.ts +9 -0
  35. package/dist/cli/commands/import.d.ts.map +1 -0
  36. package/dist/cli/commands/import.js +807 -0
  37. package/dist/cli/commands/import.js.map +1 -0
  38. package/dist/cli/commands/init.d.ts +9 -0
  39. package/dist/cli/commands/init.d.ts.map +1 -0
  40. package/dist/cli/commands/init.js +57 -0
  41. package/dist/cli/commands/init.js.map +1 -0
  42. package/dist/cli/commands/list.d.ts +9 -0
  43. package/dist/cli/commands/list.d.ts.map +1 -0
  44. package/dist/cli/commands/list.js +175 -0
  45. package/dist/cli/commands/list.js.map +1 -0
  46. package/dist/cli/commands/merge.d.ts +9 -0
  47. package/dist/cli/commands/merge.d.ts.map +1 -0
  48. package/dist/cli/commands/merge.js +113 -0
  49. package/dist/cli/commands/merge.js.map +1 -0
  50. package/dist/cli/commands/serve.d.ts +9 -0
  51. package/dist/cli/commands/serve.d.ts.map +1 -0
  52. package/dist/cli/commands/serve.js +94 -0
  53. package/dist/cli/commands/serve.js.map +1 -0
  54. package/dist/cli/commands/update.d.ts +9 -0
  55. package/dist/cli/commands/update.d.ts.map +1 -0
  56. package/dist/cli/commands/update.js +423 -0
  57. package/dist/cli/commands/update.js.map +1 -0
  58. package/dist/cli/commands/wire.d.ts +15 -0
  59. package/dist/cli/commands/wire.d.ts.map +1 -0
  60. package/dist/cli/commands/wire.js +164 -0
  61. package/dist/cli/commands/wire.js.map +1 -0
  62. package/dist/cli/index.d.ts +7 -0
  63. package/dist/cli/index.d.ts.map +1 -0
  64. package/dist/cli/index.js +100 -0
  65. package/dist/cli/index.js.map +1 -0
  66. package/dist/cli/output/json.d.ts +16 -0
  67. package/dist/cli/output/json.d.ts.map +1 -0
  68. package/dist/cli/output/json.js +29 -0
  69. package/dist/cli/output/json.js.map +1 -0
  70. package/dist/cli/output/markdown.d.ts +15 -0
  71. package/dist/cli/output/markdown.d.ts.map +1 -0
  72. package/dist/cli/output/markdown.js +206 -0
  73. package/dist/cli/output/markdown.js.map +1 -0
  74. package/dist/cli/output/table.d.ts +23 -0
  75. package/dist/cli/output/table.d.ts.map +1 -0
  76. package/dist/cli/output/table.js +150 -0
  77. package/dist/cli/output/table.js.map +1 -0
  78. package/dist/cli/utils/helpers.d.ts +126 -0
  79. package/dist/cli/utils/helpers.d.ts.map +1 -0
  80. package/dist/cli/utils/helpers.js +325 -0
  81. package/dist/cli/utils/helpers.js.map +1 -0
  82. package/dist/core/graph/algorithms.d.ts +11 -0
  83. package/dist/core/graph/algorithms.d.ts.map +1 -0
  84. package/dist/core/graph/algorithms.js +14 -0
  85. package/dist/core/graph/algorithms.js.map +1 -0
  86. package/dist/core/graph/cycle.d.ts +155 -0
  87. package/dist/core/graph/cycle.d.ts.map +1 -0
  88. package/dist/core/graph/cycle.js +297 -0
  89. package/dist/core/graph/cycle.js.map +1 -0
  90. package/dist/core/graph/index.d.ts +223 -0
  91. package/dist/core/graph/index.d.ts.map +1 -0
  92. package/dist/core/graph/index.js +475 -0
  93. package/dist/core/graph/index.js.map +1 -0
  94. package/dist/core/graph/operations.d.ts +240 -0
  95. package/dist/core/graph/operations.d.ts.map +1 -0
  96. package/dist/core/graph/operations.js +503 -0
  97. package/dist/core/graph/operations.js.map +1 -0
  98. package/dist/core/graph/sort.d.ts +76 -0
  99. package/dist/core/graph/sort.d.ts.map +1 -0
  100. package/dist/core/graph/sort.js +254 -0
  101. package/dist/core/graph/sort.js.map +1 -0
  102. package/dist/core/graph/traversal.d.ts +122 -0
  103. package/dist/core/graph/traversal.d.ts.map +1 -0
  104. package/dist/core/graph/traversal.js +336 -0
  105. package/dist/core/graph/traversal.js.map +1 -0
  106. package/dist/core/models/task-node.d.ts +328 -0
  107. package/dist/core/models/task-node.d.ts.map +1 -0
  108. package/dist/core/models/task-node.js +1090 -0
  109. package/dist/core/models/task-node.js.map +1 -0
  110. package/dist/core/registry/index.d.ts +102 -0
  111. package/dist/core/registry/index.d.ts.map +1 -0
  112. package/dist/core/registry/index.js +249 -0
  113. package/dist/core/registry/index.js.map +1 -0
  114. package/dist/core/registry/root-guard.d.ts +19 -0
  115. package/dist/core/registry/root-guard.d.ts.map +1 -0
  116. package/dist/core/registry/root-guard.js +28 -0
  117. package/dist/core/registry/root-guard.js.map +1 -0
  118. package/dist/core/storage/atomic-write.d.ts +181 -0
  119. package/dist/core/storage/atomic-write.d.ts.map +1 -0
  120. package/dist/core/storage/atomic-write.js +379 -0
  121. package/dist/core/storage/atomic-write.js.map +1 -0
  122. package/dist/core/storage/file-store.d.ts +148 -0
  123. package/dist/core/storage/file-store.d.ts.map +1 -0
  124. package/dist/core/storage/file-store.js +423 -0
  125. package/dist/core/storage/file-store.js.map +1 -0
  126. package/dist/core/storage/indexer.d.ts +138 -0
  127. package/dist/core/storage/indexer.d.ts.map +1 -0
  128. package/dist/core/storage/indexer.js +350 -0
  129. package/dist/core/storage/indexer.js.map +1 -0
  130. package/dist/core/utils/status-helpers.d.ts +59 -0
  131. package/dist/core/utils/status-helpers.d.ts.map +1 -0
  132. package/dist/core/utils/status-helpers.js +149 -0
  133. package/dist/core/utils/status-helpers.js.map +1 -0
  134. package/dist/index.d.ts +10 -0
  135. package/dist/index.d.ts.map +1 -0
  136. package/dist/index.js +10 -0
  137. package/dist/index.js.map +1 -0
  138. package/dist/types/index.d.ts +504 -0
  139. package/dist/types/index.d.ts.map +1 -0
  140. package/dist/types/index.js +182 -0
  141. package/dist/types/index.js.map +1 -0
  142. package/dist/web/routes/graph.d.ts +17 -0
  143. package/dist/web/routes/graph.d.ts.map +1 -0
  144. package/dist/web/routes/graph.js +277 -0
  145. package/dist/web/routes/graph.js.map +1 -0
  146. package/dist/web/routes/projects.d.ts +14 -0
  147. package/dist/web/routes/projects.d.ts.map +1 -0
  148. package/dist/web/routes/projects.js +102 -0
  149. package/dist/web/routes/projects.js.map +1 -0
  150. package/dist/web/routes/tasks.d.ts +17 -0
  151. package/dist/web/routes/tasks.d.ts.map +1 -0
  152. package/dist/web/routes/tasks.js +538 -0
  153. package/dist/web/routes/tasks.js.map +1 -0
  154. package/dist/web/server.d.ts +121 -0
  155. package/dist/web/server.d.ts.map +1 -0
  156. package/dist/web/server.js +389 -0
  157. package/dist/web/server.js.map +1 -0
  158. package/dist/web-ui/assets/index-BB0qvF1y.css +1 -0
  159. package/dist/web-ui/assets/index-Vmm72oKY.js +34 -0
  160. package/dist/web-ui/index.html +14 -0
  161. package/dist/web-ui/vite.svg +1 -0
  162. package/package.json +94 -0
@@ -0,0 +1,504 @@
1
+ /**
2
+ * Core type definitions for Octie task management system
3
+ *
4
+ * This module defines all TypeScript interfaces and types used throughout the system.
5
+ * @module types
6
+ */
7
+ /**
8
+ * Task status enumeration
9
+ * Represents the current state of a task in the workflow
10
+ *
11
+ * Status is DERIVED from task state, not set directly:
12
+ * - ready: Task available for any agent to work
13
+ * - in_progress: Work in progress (item checked or need_fix added)
14
+ * - in_review: All items complete, awaiting review
15
+ * - completed: Approved by reviewer (ONLY manual transition)
16
+ * - blocked: Automatically set when blocker relationship exists
17
+ */
18
+ export type TaskStatus = 'ready' | 'in_progress' | 'in_review' | 'completed' | 'blocked';
19
+ /**
20
+ * Task priority enumeration
21
+ * Indicates the importance and execution order priority
22
+ */
23
+ export type TaskPriority = 'top' | 'second' | 'later';
24
+ /**
25
+ * Edge type enumeration for graph relationships
26
+ * Defines the nature of connections between tasks
27
+ */
28
+ export type EdgeType = 'blocks' | 'depends_on' | 'parent_of' | 'related_to';
29
+ /**
30
+ * Success criterion for task completion validation
31
+ * Each task must have at least one quantitative success criterion
32
+ */
33
+ export interface SuccessCriterion {
34
+ /** Unique identifier for the criterion */
35
+ id: string;
36
+ /** Description of the success criterion (must be quantitative/measurable) */
37
+ text: string;
38
+ /** Whether the criterion has been completed */
39
+ completed: boolean;
40
+ /** ISO 8601 timestamp when criterion was marked complete */
41
+ completed_at?: string;
42
+ }
43
+ /**
44
+ * Deliverable expected from task completion
45
+ * Each task must have at least one specific deliverable
46
+ */
47
+ export interface Deliverable {
48
+ /** Unique identifier for the deliverable */
49
+ id: string;
50
+ /** Description of the deliverable */
51
+ text: string;
52
+ /** Whether the deliverable has been completed */
53
+ completed: boolean;
54
+ /** Optional file path linking to the actual deliverable file */
55
+ file_path?: string;
56
+ }
57
+ /**
58
+ * Fix item for blocking issues that must be resolved before review
59
+ * Has equal importance to success_criteria and deliverables
60
+ * All three must be complete before task can enter in_review status
61
+ */
62
+ export interface FixItem {
63
+ /** Unique identifier for the fix item */
64
+ id: string;
65
+ /** Description of what needs to be fixed */
66
+ text: string;
67
+ /** Whether the fix has been applied */
68
+ completed: boolean;
69
+ /** Optional file path indicating which file needs fixing */
70
+ file_path?: string;
71
+ /** ISO 8601 timestamp when item was added */
72
+ added_at: string;
73
+ /** Source of the fix item */
74
+ source?: 'review' | 'runtime' | 'regression';
75
+ }
76
+ /**
77
+ * C7 MCP library verification entry
78
+ * Records external library best practice verifications
79
+ */
80
+ export interface C7Verification {
81
+ /** Context7 library ID (e.g., "/mongodb/docs") */
82
+ library_id: string;
83
+ /** ISO 8601 timestamp of verification */
84
+ verified_at: string;
85
+ /** Optional notes about the verification */
86
+ notes?: string;
87
+ }
88
+ /**
89
+ * Graph edge representing relationships between tasks
90
+ */
91
+ export interface GraphEdge {
92
+ /** Source task ID */
93
+ from: string;
94
+ /** Target task ID */
95
+ to: string;
96
+ /** Type of edge relationship */
97
+ type: EdgeType;
98
+ }
99
+ /**
100
+ * Complete task node data
101
+ * Contains all task information excluding edges
102
+ */
103
+ export interface TaskData {
104
+ /** Unique identifier (UUID v4 format) */
105
+ id: string;
106
+ /** Short descriptive name (max 200 characters) */
107
+ title: string;
108
+ /** Detailed task explanation (markdown-supported, 50-10000 characters) */
109
+ description: string;
110
+ /** Current status of the task (derived from state, not set directly) */
111
+ status: TaskStatus;
112
+ /** Priority level for execution ordering */
113
+ priority: TaskPriority;
114
+ /** Array of quantitative completion criteria (min 1, max 10) */
115
+ success_criteria: SuccessCriterion[];
116
+ /** Array of specific expected outputs (min 1, max 5) */
117
+ deliverables: Deliverable[];
118
+ /** Blocking issues that must be resolved before review (equal importance to criteria/deliverables) */
119
+ need_fix: FixItem[];
120
+ /** Optional agent/session that owns this task (decoupled from status) */
121
+ assignee: string | null;
122
+ /** Task IDs that must complete before this task can start (creates graph edges) */
123
+ blockers: string[];
124
+ /** Explanatory text describing WHY this task depends on its blockers (twin to blockers) */
125
+ dependencies: string;
126
+ /** Child task IDs (sub-items) */
127
+ sub_items: string[];
128
+ /** File paths relevant to this task (relative to project root) */
129
+ related_files: string[];
130
+ /** Additional context or comments (markdown) */
131
+ notes: string;
132
+ /** C7 MCP library verification entries */
133
+ c7_verified: C7Verification[];
134
+ /** ISO 8601 timestamp - Auto-generated on creation, immutable */
135
+ created_at: string;
136
+ /** ISO 8601 timestamp - Auto-updated on any field change */
137
+ updated_at: string;
138
+ /** ISO 8601 timestamp or null - Auto-set when all criteria and deliverables complete */
139
+ completed_at: string | null;
140
+ }
141
+ /**
142
+ * Complete task node including edges
143
+ * Main data structure for tasks in the graph
144
+ */
145
+ export interface TaskNode extends TaskData {
146
+ /** Outgoing edges (tasks that this task enables) */
147
+ edges: string[];
148
+ }
149
+ /**
150
+ * Task graph structure
151
+ * Represents the complete task dependency graph
152
+ */
153
+ export interface TaskGraph {
154
+ /** Map of task ID to task node */
155
+ nodes: Map<string, TaskNode>;
156
+ /** Map of task ID to outgoing edges */
157
+ outgoingEdges: Map<string, Set<string>>;
158
+ /** Map of task ID to incoming edges */
159
+ incomingEdges: Map<string, Set<string>>;
160
+ /** Graph metadata */
161
+ metadata: ProjectMetadata;
162
+ }
163
+ /**
164
+ * Project metadata
165
+ * Contains information about the project itself
166
+ */
167
+ export interface ProjectMetadata {
168
+ /** Project name */
169
+ project_name: string;
170
+ /** Project version */
171
+ version: string;
172
+ /** ISO 8601 timestamp when project was created */
173
+ created_at: string;
174
+ /** ISO 8601 timestamp when project was last updated */
175
+ updated_at: string;
176
+ /** Optional project description */
177
+ description?: string;
178
+ }
179
+ /**
180
+ * Project file structure for serialization
181
+ * Format used when saving project to JSON file
182
+ */
183
+ export interface ProjectFile {
184
+ /** All tasks indexed by ID */
185
+ tasks: Record<string, TaskNode>;
186
+ /** Graph edges for serialization */
187
+ edges: GraphEdge[];
188
+ /** Project metadata */
189
+ metadata: ProjectMetadata;
190
+ /** Optional indexes for fast lookup */
191
+ indexes?: ProjectIndexes;
192
+ /** JSON schema reference */
193
+ $schema?: string;
194
+ /** File format version */
195
+ version?: string;
196
+ /** File format identifier */
197
+ format?: string;
198
+ /** Index signature for additional properties */
199
+ [key: string]: unknown;
200
+ }
201
+ /**
202
+ * Project indexes for efficient queries
203
+ * Built and maintained by the IndexManager
204
+ */
205
+ export interface ProjectIndexes {
206
+ /** Tasks grouped by status */
207
+ byStatus: Record<TaskStatus, string[]>;
208
+ /** Tasks grouped by priority */
209
+ byPriority: Record<TaskPriority, string[]>;
210
+ /** Tasks with no incoming edges (starting points) */
211
+ rootTasks: string[];
212
+ /** Tasks with no edges (isolated) */
213
+ orphanTasks: string[];
214
+ /** Full-text search index (term -> task IDs) */
215
+ searchText: Record<string, string[]>;
216
+ /** File reference index (file path -> task IDs) */
217
+ files: Record<string, string[]>;
218
+ }
219
+ /**
220
+ * Error code to HTTP status code mapping
221
+ * Used by API error handler to return appropriate status codes
222
+ */
223
+ export declare const ERROR_STATUS_MAP: Record<string, number>;
224
+ /**
225
+ * Error code to suggestion mapping
226
+ * Provides actionable recovery steps for each error type
227
+ */
228
+ export declare const ERROR_SUGGESTIONS: Record<string, string>;
229
+ /**
230
+ * Custom error base class
231
+ * All Octie-specific errors extend this class
232
+ */
233
+ export declare class OctieError extends Error {
234
+ code: string;
235
+ /** Optional suggestion for how to resolve the error */
236
+ readonly suggestion?: string;
237
+ /** HTTP status code for API responses */
238
+ readonly statusCode: number;
239
+ constructor(message: string, code: string, suggestion?: string);
240
+ }
241
+ /**
242
+ * Error thrown when a task is not found
243
+ */
244
+ export declare class TaskNotFoundError extends OctieError {
245
+ constructor(taskId: string);
246
+ }
247
+ /**
248
+ * Error thrown when a short UUID prefix matches multiple tasks
249
+ */
250
+ export declare class AmbiguousIdError extends OctieError {
251
+ constructor(prefix: string, matchingIds: string[]);
252
+ }
253
+ /**
254
+ * Error thrown when a project is not found
255
+ */
256
+ export declare class ProjectNotFoundError extends OctieError {
257
+ constructor(path?: string);
258
+ }
259
+ /**
260
+ * Error thrown when a circular dependency is detected
261
+ */
262
+ export declare class CircularDependencyError extends OctieError {
263
+ cycleNodes: string[];
264
+ constructor(cycleNodes: string[]);
265
+ }
266
+ /**
267
+ * Error thrown when file operations fail
268
+ */
269
+ export declare class FileOperationError extends OctieError {
270
+ filePath: string;
271
+ constructor(message: string, filePath: string);
272
+ }
273
+ /**
274
+ * Error thrown when validation fails
275
+ */
276
+ export declare class ValidationError extends OctieError {
277
+ field?: string | undefined;
278
+ constructor(message: string, field?: string | undefined);
279
+ }
280
+ /**
281
+ * Error thrown when atomic task validation fails
282
+ */
283
+ export declare class AtomicTaskViolationError extends ValidationError {
284
+ violations: string[];
285
+ constructor(message: string, violations: string[]);
286
+ }
287
+ /**
288
+ * Error thrown when an invalid argument is provided
289
+ */
290
+ export declare class InvalidArgumentError extends OctieError {
291
+ constructor(message: string, suggestion?: string);
292
+ }
293
+ /**
294
+ * Error thrown when a duplicate is detected
295
+ */
296
+ export declare class DuplicateTaskError extends OctieError {
297
+ constructor(identifier: string);
298
+ }
299
+ /**
300
+ * Error thrown when storage operations fail
301
+ */
302
+ export declare class StorageError extends OctieError {
303
+ constructor(message: string, suggestion?: string);
304
+ }
305
+ /**
306
+ * Immutability violation error
307
+ * Thrown when attempting to modify completed items that are immutable
308
+ *
309
+ * Per the status refactor spec:
310
+ * - success_criteria items: Cannot be unchecked or deleted once completed
311
+ * - deliverables items: Cannot be unchecked or deleted once completed
312
+ * - need_fix items: Cannot be deleted or unmarked once completed
313
+ */
314
+ export declare class ImmutabilityViolationError extends ValidationError {
315
+ /** ID of the item that cannot be modified */
316
+ readonly itemId: string;
317
+ /** Type of the item (success_criterion, deliverable, need_fix) */
318
+ readonly itemType: string;
319
+ constructor(message: string, itemId: string, itemType: string);
320
+ }
321
+ /**
322
+ * Topological sort result
323
+ * Returned by graph topological sort operations
324
+ */
325
+ export interface TopologicalSortResult {
326
+ /** Linearly ordered task IDs */
327
+ sorted: string[];
328
+ /** Whether a cycle was detected */
329
+ hasCycle: boolean;
330
+ /** Nodes involved in cycle (if detected) */
331
+ cycleNodes: string[];
332
+ }
333
+ /**
334
+ * Cycle detection result
335
+ * Returned by graph cycle detection operations
336
+ */
337
+ export interface CycleDetectionResult {
338
+ /** Whether cycles exist in the graph */
339
+ hasCycle: boolean;
340
+ /** Array of cycles (each cycle is an array of task IDs) */
341
+ cycles: string[][];
342
+ }
343
+ /**
344
+ * Task filter options
345
+ * Used for querying and filtering tasks
346
+ */
347
+ export interface TaskFilterOptions {
348
+ /** Filter by status */
349
+ status?: TaskStatus;
350
+ /** Filter by priority */
351
+ priority?: TaskPriority;
352
+ /** Filter by related file */
353
+ relatedFile?: string;
354
+ /** Full-text search query */
355
+ searchQuery?: string;
356
+ /** Include completed tasks */
357
+ includeCompleted?: boolean;
358
+ /** Limit number of results */
359
+ limit?: number;
360
+ /** Offset for pagination */
361
+ offset?: number;
362
+ }
363
+ /**
364
+ * Task creation options
365
+ * Parameters for creating a new task
366
+ */
367
+ export interface TaskCreateOptions {
368
+ /** Task title (required, 1-200 chars) */
369
+ title: string;
370
+ /** Task description (required, 50-10000 chars) */
371
+ description: string;
372
+ /** Success criteria (required, min 1, max 10) */
373
+ successCriteria: string[];
374
+ /** Deliverables (required, min 1, max 5) */
375
+ deliverables: string[];
376
+ /** Task priority (default: 'second') */
377
+ priority?: TaskPriority;
378
+ /** Blocking task IDs */
379
+ blockers?: string[];
380
+ /** Dependency task IDs */
381
+ dependencies?: string[];
382
+ /** Related file paths */
383
+ relatedFiles?: string[];
384
+ /** Additional notes */
385
+ notes?: string;
386
+ /** C7 verification entries */
387
+ c7Verified?: C7Verification[];
388
+ }
389
+ /**
390
+ * Task update options
391
+ * Parameters for updating an existing task
392
+ */
393
+ export interface TaskUpdateOptions {
394
+ /** New status */
395
+ status?: TaskStatus;
396
+ /** New priority */
397
+ priority?: TaskPriority;
398
+ /** Success criterion to mark complete */
399
+ completeCriterion?: string;
400
+ /** Deliverable to mark complete */
401
+ completeDeliverable?: string;
402
+ /** Success criterion to add */
403
+ addSuccessCriterion?: string;
404
+ /** Deliverable to add */
405
+ addDeliverable?: string;
406
+ /** Task ID to block this task */
407
+ block?: string;
408
+ /** Task ID to unblock */
409
+ unblock?: string;
410
+ /** Task ID to depend on */
411
+ addDependency?: string;
412
+ /** Notes to append */
413
+ notes?: string;
414
+ }
415
+ /**
416
+ * Merge result
417
+ * Returned by task merge operations
418
+ */
419
+ export interface MergeResult {
420
+ /** Merged task node */
421
+ task: TaskNode;
422
+ /** Tasks that were removed */
423
+ removedTasks: string[];
424
+ /** Tasks that were updated (reconnected) */
425
+ updatedTasks: string[];
426
+ }
427
+ /**
428
+ * Graph statistics
429
+ * Aggregated information about the task graph
430
+ */
431
+ export interface GraphStatistics {
432
+ /** Total number of tasks */
433
+ totalTasks: number;
434
+ /** Tasks by status */
435
+ tasksByStatus: Record<TaskStatus, number>;
436
+ /** Tasks by priority */
437
+ tasksByPriority: Record<TaskPriority, number>;
438
+ /** Number of edges */
439
+ totalEdges: number;
440
+ /** Number of root tasks */
441
+ rootTasks: number;
442
+ /** Number of orphan tasks */
443
+ orphanTasks: number;
444
+ /** Whether graph has cycles */
445
+ hasCycles: boolean;
446
+ /** Longest path length (critical path) */
447
+ criticalPathLength: number;
448
+ }
449
+ /**
450
+ * Web server configuration options
451
+ */
452
+ export interface ServerOptions {
453
+ /** Port to run server on (default: 3000) */
454
+ port?: number;
455
+ /** Host to bind to (default: 'localhost') */
456
+ host?: string;
457
+ /** Open browser automatically (default: false) */
458
+ open?: boolean;
459
+ /** Enable CORS (default: true) */
460
+ cors?: boolean;
461
+ /** Enable request logging (default: true) */
462
+ logging?: boolean;
463
+ }
464
+ /**
465
+ * API response wrapper
466
+ * Standard response format for all API endpoints
467
+ */
468
+ export interface ApiResponse<T = unknown> {
469
+ /** Indicates success of the request */
470
+ success: boolean;
471
+ /** Response data on success */
472
+ data?: T;
473
+ /** Error details on failure */
474
+ error?: {
475
+ /** Error code for programmatic handling */
476
+ code: string;
477
+ /** Human-readable error message */
478
+ message: string;
479
+ /** Additional error details */
480
+ details?: unknown;
481
+ };
482
+ /** ISO 8601 timestamp of response */
483
+ timestamp: string;
484
+ }
485
+ /**
486
+ * API error response
487
+ * Returned when an API request fails
488
+ */
489
+ export interface ApiErrorResponse {
490
+ /** Indicates failure */
491
+ success: false;
492
+ /** Error details */
493
+ error: {
494
+ /** Error code for programmatic handling */
495
+ code: string;
496
+ /** Human-readable error message */
497
+ message: string;
498
+ /** Additional error details */
499
+ details?: unknown;
500
+ };
501
+ /** ISO 8601 timestamp of response */
502
+ timestamp: string;
503
+ }
504
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,aAAa,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,CAAC;AAEzF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,YAAY,GAAG,WAAW,GAAG,YAAY,CAAC;AAE5E;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,SAAS,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,qCAAqC;IACrC,IAAI,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