cmp-standards 2.6.0 → 2.7.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/dist/cli/index.js CHANGED
File without changes
@@ -33,37 +33,37 @@ export declare const PlanSchema: z.ZodObject<{
33
33
  lastCheckpointSummary: z.ZodOptional<z.ZodString>;
34
34
  }, "strip", z.ZodTypeAny, {
35
35
  system: string;
36
- id: string;
36
+ title: string;
37
37
  type: "plan";
38
38
  status: "active" | "completed" | "paused" | "abandoned" | "merged";
39
+ id: string;
39
40
  createdAt: string;
40
41
  updatedAt: string;
41
- title: string;
42
42
  taskIds: string[];
43
43
  keywords: string[];
44
44
  originalPrompt: string;
45
45
  mergedFromIds: string[];
46
46
  createdBy: string;
47
+ domain?: string | undefined;
47
48
  description?: string | undefined;
48
49
  completedAt?: string | undefined;
49
- domain?: string | undefined;
50
50
  parentPlanId?: string | undefined;
51
51
  lastCheckpointId?: string | undefined;
52
52
  lastCheckpointSummary?: string | undefined;
53
53
  }, {
54
54
  system: string;
55
- id: string;
55
+ title: string;
56
56
  type: "plan";
57
57
  status: "active" | "completed" | "paused" | "abandoned" | "merged";
58
+ id: string;
58
59
  createdAt: string;
59
60
  updatedAt: string;
60
- title: string;
61
61
  originalPrompt: string;
62
62
  createdBy: string;
63
+ domain?: string | undefined;
63
64
  description?: string | undefined;
64
- taskIds?: string[] | undefined;
65
65
  completedAt?: string | undefined;
66
- domain?: string | undefined;
66
+ taskIds?: string[] | undefined;
67
67
  keywords?: string[] | undefined;
68
68
  parentPlanId?: string | undefined;
69
69
  mergedFromIds?: string[] | undefined;
@@ -98,12 +98,12 @@ export declare const PlanCheckpointSchema: z.ZodObject<{
98
98
  sessionId: z.ZodString;
99
99
  createdAt: z.ZodString;
100
100
  }, "strip", z.ZodTypeAny, {
101
- id: string;
102
101
  type: "plan_checkpoint";
103
- createdAt: string;
104
102
  sessionId: string;
105
- summary: string;
106
103
  filesModified: string[];
104
+ id: string;
105
+ createdAt: string;
106
+ summary: string;
107
107
  agentId: string;
108
108
  planId: string;
109
109
  checkpointType: "progress" | "decision" | "blocker" | "pivot" | "handoff" | "resume" | "complete";
@@ -114,10 +114,10 @@ export declare const PlanCheckpointSchema: z.ZodObject<{
114
114
  }[];
115
115
  nextSteps: string[];
116
116
  }, {
117
- id: string;
118
117
  type: "plan_checkpoint";
119
- createdAt: string;
120
118
  sessionId: string;
119
+ id: string;
120
+ createdAt: string;
121
121
  summary: string;
122
122
  agentId: string;
123
123
  planId: string;
@@ -141,19 +141,19 @@ export declare const PlanMatchSchema: z.ZodObject<{
141
141
  checkpointCount: z.ZodNumber;
142
142
  status: z.ZodEnum<["active", "paused", "completed", "abandoned", "merged"]>;
143
143
  }, "strip", z.ZodTypeAny, {
144
- status: "active" | "completed" | "paused" | "abandoned" | "merged";
145
144
  title: string;
145
+ status: "active" | "completed" | "paused" | "abandoned" | "merged";
146
146
  planId: string;
147
147
  similarity: number;
148
- matchReason: "recent" | "domain" | "keyword" | "semantic";
148
+ matchReason: "domain" | "recent" | "keyword" | "semantic";
149
149
  lastActivity: string;
150
150
  checkpointCount: number;
151
151
  }, {
152
- status: "active" | "completed" | "paused" | "abandoned" | "merged";
153
152
  title: string;
153
+ status: "active" | "completed" | "paused" | "abandoned" | "merged";
154
154
  planId: string;
155
155
  similarity: number;
156
- matchReason: "recent" | "domain" | "keyword" | "semantic";
156
+ matchReason: "domain" | "recent" | "keyword" | "semantic";
157
157
  lastActivity: string;
158
158
  checkpointCount: number;
159
159
  }>;
@@ -17,10 +17,10 @@ export declare const ImprovementSchema: z.ZodObject<{
17
17
  implementedAt: z.ZodOptional<z.ZodString>;
18
18
  implementedInTask: z.ZodOptional<z.ZodString>;
19
19
  }, "strip", z.ZodTypeAny, {
20
+ title: string;
21
+ description: string;
20
22
  id: string;
21
23
  priority: "critical" | "high" | "medium" | "low";
22
- description: string;
23
- title: string;
24
24
  area: string;
25
25
  detectedAt: string;
26
26
  effort?: "medium" | "small" | "large" | "trivial" | undefined;
@@ -28,10 +28,10 @@ export declare const ImprovementSchema: z.ZodObject<{
28
28
  implementedAt?: string | undefined;
29
29
  implementedInTask?: string | undefined;
30
30
  }, {
31
+ title: string;
32
+ description: string;
31
33
  id: string;
32
34
  priority: "critical" | "high" | "medium" | "low";
33
- description: string;
34
- title: string;
35
35
  area: string;
36
36
  detectedAt: string;
37
37
  effort?: "medium" | "small" | "large" | "trivial" | undefined;
@@ -66,10 +66,10 @@ export declare const TaskContentSchema: z.ZodObject<{
66
66
  implementedAt: z.ZodOptional<z.ZodString>;
67
67
  implementedInTask: z.ZodOptional<z.ZodString>;
68
68
  }, "strip", z.ZodTypeAny, {
69
+ title: string;
70
+ description: string;
69
71
  id: string;
70
72
  priority: "critical" | "high" | "medium" | "low";
71
- description: string;
72
- title: string;
73
73
  area: string;
74
74
  detectedAt: string;
75
75
  effort?: "medium" | "small" | "large" | "trivial" | undefined;
@@ -77,10 +77,10 @@ export declare const TaskContentSchema: z.ZodObject<{
77
77
  implementedAt?: string | undefined;
78
78
  implementedInTask?: string | undefined;
79
79
  }, {
80
+ title: string;
81
+ description: string;
80
82
  id: string;
81
83
  priority: "critical" | "high" | "medium" | "low";
82
- description: string;
83
- title: string;
84
84
  area: string;
85
85
  detectedAt: string;
86
86
  effort?: "medium" | "small" | "large" | "trivial" | undefined;
@@ -91,15 +91,16 @@ export declare const TaskContentSchema: z.ZodObject<{
91
91
  lessons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
92
92
  }, "strip", z.ZodTypeAny, {
93
93
  title: string;
94
+ domain: string;
95
+ sessionId: string;
94
96
  files: string[];
95
97
  startedAt: string;
96
- sessionId: string;
97
- plan: string[];
98
+ userRequest: string;
98
99
  improvements: {
100
+ title: string;
101
+ description: string;
99
102
  id: string;
100
103
  priority: "critical" | "high" | "medium" | "low";
101
- description: string;
102
- title: string;
103
104
  area: string;
104
105
  detectedAt: string;
105
106
  effort?: "medium" | "small" | "large" | "trivial" | undefined;
@@ -107,34 +108,32 @@ export declare const TaskContentSchema: z.ZodObject<{
107
108
  implementedAt?: string | undefined;
108
109
  implementedInTask?: string | undefined;
109
110
  }[];
110
- domain: string;
111
- userRequest: string;
111
+ plan: string[];
112
112
  currentStep: number;
113
113
  lastActivityAt: string;
114
114
  lessons: string[];
115
115
  description?: string | undefined;
116
- result?: "blocked" | "success" | "partial" | undefined;
117
116
  completedAt?: string | undefined;
117
+ result?: "blocked" | "success" | "partial" | undefined;
118
118
  agentId?: string | undefined;
119
119
  resultNotes?: string | undefined;
120
120
  }, {
121
121
  title: string;
122
- startedAt: string;
123
- sessionId: string;
124
- plan: string[];
125
122
  domain: string;
123
+ sessionId: string;
124
+ startedAt: string;
126
125
  userRequest: string;
126
+ plan: string[];
127
127
  currentStep: number;
128
128
  lastActivityAt: string;
129
129
  description?: string | undefined;
130
- result?: "blocked" | "success" | "partial" | undefined;
131
130
  files?: string[] | undefined;
132
131
  completedAt?: string | undefined;
133
132
  improvements?: {
133
+ title: string;
134
+ description: string;
134
135
  id: string;
135
136
  priority: "critical" | "high" | "medium" | "low";
136
- description: string;
137
- title: string;
138
137
  area: string;
139
138
  detectedAt: string;
140
139
  effort?: "medium" | "small" | "large" | "trivial" | undefined;
@@ -142,6 +141,7 @@ export declare const TaskContentSchema: z.ZodObject<{
142
141
  implementedAt?: string | undefined;
143
142
  implementedInTask?: string | undefined;
144
143
  }[] | undefined;
144
+ result?: "blocked" | "success" | "partial" | undefined;
145
145
  agentId?: string | undefined;
146
146
  resultNotes?: string | undefined;
147
147
  lessons?: string[] | undefined;
@@ -178,10 +178,10 @@ export declare const TaskSchema: z.ZodObject<{
178
178
  implementedAt: z.ZodOptional<z.ZodString>;
179
179
  implementedInTask: z.ZodOptional<z.ZodString>;
180
180
  }, "strip", z.ZodTypeAny, {
181
+ title: string;
182
+ description: string;
181
183
  id: string;
182
184
  priority: "critical" | "high" | "medium" | "low";
183
- description: string;
184
- title: string;
185
185
  area: string;
186
186
  detectedAt: string;
187
187
  effort?: "medium" | "small" | "large" | "trivial" | undefined;
@@ -189,10 +189,10 @@ export declare const TaskSchema: z.ZodObject<{
189
189
  implementedAt?: string | undefined;
190
190
  implementedInTask?: string | undefined;
191
191
  }, {
192
+ title: string;
193
+ description: string;
192
194
  id: string;
193
195
  priority: "critical" | "high" | "medium" | "low";
194
- description: string;
195
- title: string;
196
196
  area: string;
197
197
  detectedAt: string;
198
198
  effort?: "medium" | "small" | "large" | "trivial" | undefined;
@@ -203,15 +203,16 @@ export declare const TaskSchema: z.ZodObject<{
203
203
  lessons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
204
204
  }, "strip", z.ZodTypeAny, {
205
205
  title: string;
206
+ domain: string;
207
+ sessionId: string;
206
208
  files: string[];
207
209
  startedAt: string;
208
- sessionId: string;
209
- plan: string[];
210
+ userRequest: string;
210
211
  improvements: {
212
+ title: string;
213
+ description: string;
211
214
  id: string;
212
215
  priority: "critical" | "high" | "medium" | "low";
213
- description: string;
214
- title: string;
215
216
  area: string;
216
217
  detectedAt: string;
217
218
  effort?: "medium" | "small" | "large" | "trivial" | undefined;
@@ -219,34 +220,32 @@ export declare const TaskSchema: z.ZodObject<{
219
220
  implementedAt?: string | undefined;
220
221
  implementedInTask?: string | undefined;
221
222
  }[];
222
- domain: string;
223
- userRequest: string;
223
+ plan: string[];
224
224
  currentStep: number;
225
225
  lastActivityAt: string;
226
226
  lessons: string[];
227
227
  description?: string | undefined;
228
- result?: "blocked" | "success" | "partial" | undefined;
229
228
  completedAt?: string | undefined;
229
+ result?: "blocked" | "success" | "partial" | undefined;
230
230
  agentId?: string | undefined;
231
231
  resultNotes?: string | undefined;
232
232
  }, {
233
233
  title: string;
234
- startedAt: string;
235
- sessionId: string;
236
- plan: string[];
237
234
  domain: string;
235
+ sessionId: string;
236
+ startedAt: string;
238
237
  userRequest: string;
238
+ plan: string[];
239
239
  currentStep: number;
240
240
  lastActivityAt: string;
241
241
  description?: string | undefined;
242
- result?: "blocked" | "success" | "partial" | undefined;
243
242
  files?: string[] | undefined;
244
243
  completedAt?: string | undefined;
245
244
  improvements?: {
245
+ title: string;
246
+ description: string;
246
247
  id: string;
247
248
  priority: "critical" | "high" | "medium" | "low";
248
- description: string;
249
- title: string;
250
249
  area: string;
251
250
  detectedAt: string;
252
251
  effort?: "medium" | "small" | "large" | "trivial" | undefined;
@@ -254,6 +253,7 @@ export declare const TaskSchema: z.ZodObject<{
254
253
  implementedAt?: string | undefined;
255
254
  implementedInTask?: string | undefined;
256
255
  }[] | undefined;
256
+ result?: "blocked" | "success" | "partial" | undefined;
257
257
  agentId?: string | undefined;
258
258
  resultNotes?: string | undefined;
259
259
  lessons?: string[] | undefined;
@@ -262,20 +262,23 @@ export declare const TaskSchema: z.ZodObject<{
262
262
  updatedAt: z.ZodString;
263
263
  }, "strip", z.ZodTypeAny, {
264
264
  system: string;
265
- id: string;
266
265
  type: "task";
267
266
  status: "in_progress" | "blocked" | "pending" | "completed";
267
+ id: string;
268
+ createdAt: string;
269
+ updatedAt: string;
268
270
  content: {
269
271
  title: string;
272
+ domain: string;
273
+ sessionId: string;
270
274
  files: string[];
271
275
  startedAt: string;
272
- sessionId: string;
273
- plan: string[];
276
+ userRequest: string;
274
277
  improvements: {
278
+ title: string;
279
+ description: string;
275
280
  id: string;
276
281
  priority: "critical" | "high" | "medium" | "low";
277
- description: string;
278
- title: string;
279
282
  area: string;
280
283
  detectedAt: string;
281
284
  effort?: "medium" | "small" | "large" | "trivial" | undefined;
@@ -283,42 +286,40 @@ export declare const TaskSchema: z.ZodObject<{
283
286
  implementedAt?: string | undefined;
284
287
  implementedInTask?: string | undefined;
285
288
  }[];
286
- domain: string;
287
- userRequest: string;
289
+ plan: string[];
288
290
  currentStep: number;
289
291
  lastActivityAt: string;
290
292
  lessons: string[];
291
293
  description?: string | undefined;
292
- result?: "blocked" | "success" | "partial" | undefined;
293
294
  completedAt?: string | undefined;
295
+ result?: "blocked" | "success" | "partial" | undefined;
294
296
  agentId?: string | undefined;
295
297
  resultNotes?: string | undefined;
296
298
  };
297
- createdAt: string;
298
- updatedAt: string;
299
299
  }, {
300
300
  system: string;
301
- id: string;
302
301
  type: "task";
303
302
  status: "in_progress" | "blocked" | "pending" | "completed";
303
+ id: string;
304
+ createdAt: string;
305
+ updatedAt: string;
304
306
  content: {
305
307
  title: string;
306
- startedAt: string;
307
- sessionId: string;
308
- plan: string[];
309
308
  domain: string;
309
+ sessionId: string;
310
+ startedAt: string;
310
311
  userRequest: string;
312
+ plan: string[];
311
313
  currentStep: number;
312
314
  lastActivityAt: string;
313
315
  description?: string | undefined;
314
- result?: "blocked" | "success" | "partial" | undefined;
315
316
  files?: string[] | undefined;
316
317
  completedAt?: string | undefined;
317
318
  improvements?: {
319
+ title: string;
320
+ description: string;
318
321
  id: string;
319
322
  priority: "critical" | "high" | "medium" | "low";
320
- description: string;
321
- title: string;
322
323
  area: string;
323
324
  detectedAt: string;
324
325
  effort?: "medium" | "small" | "large" | "trivial" | undefined;
@@ -326,12 +327,11 @@ export declare const TaskSchema: z.ZodObject<{
326
327
  implementedAt?: string | undefined;
327
328
  implementedInTask?: string | undefined;
328
329
  }[] | undefined;
330
+ result?: "blocked" | "success" | "partial" | undefined;
329
331
  agentId?: string | undefined;
330
332
  resultNotes?: string | undefined;
331
333
  lessons?: string[] | undefined;
332
334
  };
333
- createdAt: string;
334
- updatedAt: string;
335
335
  }>;
336
336
  export type Task = z.infer<typeof TaskSchema>;
337
337
  export type TaskContent = z.infer<typeof TaskContentSchema>;
@@ -353,9 +353,9 @@ export declare const ImprovementContentSchema: z.ZodObject<{
353
353
  rejectedAt: z.ZodOptional<z.ZodString>;
354
354
  rejectedReason: z.ZodOptional<z.ZodString>;
355
355
  }, "strip", z.ZodTypeAny, {
356
- priority: "critical" | "high" | "medium" | "low";
357
- description: string;
358
356
  title: string;
357
+ description: string;
358
+ priority: "critical" | "high" | "medium" | "low";
359
359
  area: string;
360
360
  detectedAt: string;
361
361
  detectedBy: string;
@@ -367,9 +367,9 @@ export declare const ImprovementContentSchema: z.ZodObject<{
367
367
  rejectedAt?: string | undefined;
368
368
  rejectedReason?: string | undefined;
369
369
  }, {
370
- priority: "critical" | "high" | "medium" | "low";
371
- description: string;
372
370
  title: string;
371
+ description: string;
372
+ priority: "critical" | "high" | "medium" | "low";
373
373
  area: string;
374
374
  detectedAt: string;
375
375
  detectedBy: string;
@@ -401,9 +401,9 @@ export declare const ImprovementRecordSchema: z.ZodObject<{
401
401
  rejectedAt: z.ZodOptional<z.ZodString>;
402
402
  rejectedReason: z.ZodOptional<z.ZodString>;
403
403
  }, "strip", z.ZodTypeAny, {
404
- priority: "critical" | "high" | "medium" | "low";
405
- description: string;
406
404
  title: string;
405
+ description: string;
406
+ priority: "critical" | "high" | "medium" | "low";
407
407
  area: string;
408
408
  detectedAt: string;
409
409
  detectedBy: string;
@@ -415,9 +415,9 @@ export declare const ImprovementRecordSchema: z.ZodObject<{
415
415
  rejectedAt?: string | undefined;
416
416
  rejectedReason?: string | undefined;
417
417
  }, {
418
- priority: "critical" | "high" | "medium" | "low";
419
- description: string;
420
418
  title: string;
419
+ description: string;
420
+ priority: "critical" | "high" | "medium" | "low";
421
421
  area: string;
422
422
  detectedAt: string;
423
423
  detectedBy: string;
@@ -433,13 +433,15 @@ export declare const ImprovementRecordSchema: z.ZodObject<{
433
433
  updatedAt: z.ZodString;
434
434
  }, "strip", z.ZodTypeAny, {
435
435
  system: string;
436
- id: string;
437
436
  type: "improvement";
438
437
  status: "in_progress" | "pending" | "implemented" | "rejected" | "deferred";
438
+ id: string;
439
+ createdAt: string;
440
+ updatedAt: string;
439
441
  content: {
440
- priority: "critical" | "high" | "medium" | "low";
441
- description: string;
442
442
  title: string;
443
+ description: string;
444
+ priority: "critical" | "high" | "medium" | "low";
443
445
  area: string;
444
446
  detectedAt: string;
445
447
  detectedBy: string;
@@ -451,17 +453,17 @@ export declare const ImprovementRecordSchema: z.ZodObject<{
451
453
  rejectedAt?: string | undefined;
452
454
  rejectedReason?: string | undefined;
453
455
  };
454
- createdAt: string;
455
- updatedAt: string;
456
456
  }, {
457
457
  system: string;
458
- id: string;
459
458
  type: "improvement";
460
459
  status: "in_progress" | "pending" | "implemented" | "rejected" | "deferred";
460
+ id: string;
461
+ createdAt: string;
462
+ updatedAt: string;
461
463
  content: {
462
- priority: "critical" | "high" | "medium" | "low";
463
- description: string;
464
464
  title: string;
465
+ description: string;
466
+ priority: "critical" | "high" | "medium" | "low";
465
467
  area: string;
466
468
  detectedAt: string;
467
469
  detectedBy: string;
@@ -473,8 +475,6 @@ export declare const ImprovementRecordSchema: z.ZodObject<{
473
475
  rejectedAt?: string | undefined;
474
476
  rejectedReason?: string | undefined;
475
477
  };
476
- createdAt: string;
477
- updatedAt: string;
478
478
  }>;
479
479
  export type ImprovementRecord = z.infer<typeof ImprovementRecordSchema>;
480
480
  export type ImprovementContent = z.infer<typeof ImprovementContentSchema>;
@@ -495,8 +495,8 @@ export declare const SessionContentSchema: z.ZodObject<{
495
495
  improvementsDetected: z.ZodDefault<z.ZodNumber>;
496
496
  }, "strip", z.ZodTypeAny, {
497
497
  system: string;
498
- startedAt: string;
499
498
  sessionId: string;
499
+ startedAt: string;
500
500
  toolCalls: number;
501
501
  lastActivityAt: string;
502
502
  tasksStarted: number;
@@ -508,11 +508,11 @@ export declare const SessionContentSchema: z.ZodObject<{
508
508
  ide?: string | undefined;
509
509
  }, {
510
510
  system: string;
511
- startedAt: string;
512
511
  sessionId: string;
512
+ startedAt: string;
513
513
  lastActivityAt: string;
514
- endedAt?: string | undefined;
515
514
  toolCalls?: number | undefined;
515
+ endedAt?: string | undefined;
516
516
  userId?: string | undefined;
517
517
  projectPath?: string | undefined;
518
518
  ide?: string | undefined;
@@ -540,8 +540,8 @@ export declare const SessionSchema: z.ZodObject<{
540
540
  improvementsDetected: z.ZodDefault<z.ZodNumber>;
541
541
  }, "strip", z.ZodTypeAny, {
542
542
  system: string;
543
- startedAt: string;
544
543
  sessionId: string;
544
+ startedAt: string;
545
545
  toolCalls: number;
546
546
  lastActivityAt: string;
547
547
  tasksStarted: number;
@@ -553,11 +553,11 @@ export declare const SessionSchema: z.ZodObject<{
553
553
  ide?: string | undefined;
554
554
  }, {
555
555
  system: string;
556
- startedAt: string;
557
556
  sessionId: string;
557
+ startedAt: string;
558
558
  lastActivityAt: string;
559
- endedAt?: string | undefined;
560
559
  toolCalls?: number | undefined;
560
+ endedAt?: string | undefined;
561
561
  userId?: string | undefined;
562
562
  projectPath?: string | undefined;
563
563
  ide?: string | undefined;
@@ -569,13 +569,15 @@ export declare const SessionSchema: z.ZodObject<{
569
569
  updatedAt: z.ZodString;
570
570
  }, "strip", z.ZodTypeAny, {
571
571
  system: string;
572
- id: string;
573
572
  type: "session";
574
573
  status: "active" | "ended";
574
+ id: string;
575
+ createdAt: string;
576
+ updatedAt: string;
575
577
  content: {
576
578
  system: string;
577
- startedAt: string;
578
579
  sessionId: string;
580
+ startedAt: string;
579
581
  toolCalls: number;
580
582
  lastActivityAt: string;
581
583
  tasksStarted: number;
@@ -586,20 +588,20 @@ export declare const SessionSchema: z.ZodObject<{
586
588
  projectPath?: string | undefined;
587
589
  ide?: string | undefined;
588
590
  };
589
- createdAt: string;
590
- updatedAt: string;
591
591
  }, {
592
592
  system: string;
593
- id: string;
594
593
  type: "session";
595
594
  status: "active" | "ended";
595
+ id: string;
596
+ createdAt: string;
597
+ updatedAt: string;
596
598
  content: {
597
599
  system: string;
598
- startedAt: string;
599
600
  sessionId: string;
601
+ startedAt: string;
600
602
  lastActivityAt: string;
601
- endedAt?: string | undefined;
602
603
  toolCalls?: number | undefined;
604
+ endedAt?: string | undefined;
603
605
  userId?: string | undefined;
604
606
  projectPath?: string | undefined;
605
607
  ide?: string | undefined;
@@ -607,8 +609,6 @@ export declare const SessionSchema: z.ZodObject<{
607
609
  tasksCompleted?: number | undefined;
608
610
  improvementsDetected?: number | undefined;
609
611
  };
610
- createdAt: string;
611
- updatedAt: string;
612
612
  }>;
613
613
  export type Session = z.infer<typeof SessionSchema>;
614
614
  export type SessionContent = z.infer<typeof SessionContentSchema>;
@@ -96,6 +96,12 @@ declare class ContextInjectorService {
96
96
  private getPendingImprovementsCount;
97
97
  private checkHealth;
98
98
  private getSkillsForDomain;
99
+ /**
100
+ * Find similar completed tasks using semantic search
101
+ *
102
+ * Uses vector embeddings to find tasks with similar descriptions,
103
+ * helping inform approach based on past successful implementations.
104
+ */
99
105
  private getSimilarCompletedTasks;
100
106
  private generateApproachSuggestion;
101
107
  private formatTimeAgo;
@@ -1 +1 @@
1
- {"version":3,"file":"context-injector.d.ts","sourceRoot":"","sources":["../../src/services/context-injector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAgB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAIrE,OAAO,KAAK,EAAE,SAAS,EAA6B,MAAM,mBAAmB,CAAA;AAM7E,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,cAAc,EAAE,aAAa,EAAE,CAAA;IAC/B,gCAAgC;IAChC,UAAU,EAAE,aAAa,EAAE,CAAA;IAC3B,uCAAuC;IACvC,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,qCAAqC;IACrC,MAAM,EAAE,eAAe,EAAE,CAAA;IACzB,mBAAmB;IACnB,WAAW,EAAE,WAAW,EAAE,CAAA;IAC1B,iCAAiC;IACjC,mBAAmB,EAAE,MAAM,CAAA;IAC3B,2BAA2B;IAC3B,MAAM,EAAE,YAAY,CAAA;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,wBAAwB;IACxB,WAAW,EAAE,aAAa,EAAE,CAAA;IAC5B,uCAAuC;IACvC,gBAAgB,EAAE,aAAa,EAAE,CAAA;IACjC,+CAA+C;IAC/C,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,8BAA8B;IAC9B,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EA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AE,MAAM,EAAE,MAAM,GAAG,MAAM;IA+ErE;;OAEG;IACH,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM;YA2CjC,iBAAiB;YAUjB,mBAAmB;YAOnB,mBAAmB;YAUnB,cAAc;YAmBd,2BAA2B;YAS3B,WAAW;IAoBzB,OAAO,CAAC,kBAAkB;IAK1B;;;;;OAKG;YACW,wBAAwB;IA6CtC,OAAO,CAAC,0BAA0B;IAUlC,OAAO,CAAC,aAAa;CAatB;AAMD,eAAO,MAAM,eAAe,wBAA+B,CAAA;AAC3D,eAAe,eAAe,CAAA"}
@@ -10,6 +10,7 @@
10
10
  */
11
11
  import { memoryRouter } from './memory-router.js';
12
12
  import { cloud } from '../db/cloud.js';
13
+ import { upstash } from '../db/upstash-client.js';
13
14
  import { loadConfig } from '../utils/config.js';
14
15
  // =============================================================================
15
16
  // Skill Registry
@@ -320,9 +321,48 @@ class ContextInjectorService {
320
321
  return DOMAIN_SKILLS.default;
321
322
  return DOMAIN_SKILLS[domain] || DOMAIN_SKILLS.default;
322
323
  }
323
- async getSimilarCompletedTasks(_description, _system) {
324
- // TODO: Implement semantic search for tasks
325
- return [];
324
+ /**
325
+ * Find similar completed tasks using semantic search
326
+ *
327
+ * Uses vector embeddings to find tasks with similar descriptions,
328
+ * helping inform approach based on past successful implementations.
329
+ */
330
+ async getSimilarCompletedTasks(description, system) {
331
+ try {
332
+ // Search for similar tasks using vector search
333
+ const results = await upstash.searchVectors(description, {
334
+ topK: 5,
335
+ filter: `system = "${system}" AND type = "task"`,
336
+ includeMetadata: true
337
+ });
338
+ // Filter to completed tasks with good similarity
339
+ const similarTasks = [];
340
+ for (const result of results) {
341
+ if (result.score < 0.6)
342
+ continue; // Minimum similarity threshold
343
+ const metadata = result.metadata;
344
+ if (!metadata)
345
+ continue;
346
+ // Check if task is completed
347
+ const status = metadata.status;
348
+ if (status !== 'completed' && status !== 'done')
349
+ continue;
350
+ similarTasks.push({
351
+ id: result.id,
352
+ title: metadata.title || 'Untitled Task',
353
+ status: status,
354
+ progress: metadata.progress || 'Completed',
355
+ lastActivity: this.formatTimeAgo(metadata.completedAt ||
356
+ metadata.updatedAt ||
357
+ new Date().toISOString())
358
+ });
359
+ }
360
+ return similarTasks.slice(0, 3); // Return top 3 similar tasks
361
+ }
362
+ catch (error) {
363
+ console.warn('[ContextInjector] Semantic task search failed:', error);
364
+ return [];
365
+ }
326
366
  }
327
367
  generateApproachSuggestion(memories) {
328
368
  if (memories.length === 0)