@phren/cli 0.0.8 → 0.0.10

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/icon.svg ADDED
@@ -0,0 +1,416 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="128" height="128">
2
+ <circle cx="64" cy="64" r="64" fill="#12122a"/>
3
+ <g fill="rgb(40,211,242)">
4
+ <rect x="85.3" y="26.7" width="5.3" height="5.3"/>
5
+ </g>
6
+ <g fill="rgb(27,210,241)">
7
+ <rect x="96.0" y="26.7" width="5.3" height="5.3"/>
8
+ </g>
9
+ <g fill="rgb(40,41,142)">
10
+ <rect x="53.3" y="32.0" width="5.3" height="5.3"/>
11
+ </g>
12
+ <g fill="rgb(41,43,144)">
13
+ <rect x="58.7" y="32.0" width="5.3" height="5.3"/>
14
+ <rect x="74.7" y="32.0" width="5.3" height="5.3"/>
15
+ </g>
16
+ <g fill="rgb(43,44,147)">
17
+ <rect x="69.3" y="32.0" width="5.3" height="5.3"/>
18
+ </g>
19
+ <g fill="rgb(38,39,142)">
20
+ <rect x="42.7" y="37.3" width="5.3" height="5.3"/>
21
+ </g>
22
+ <g fill="rgb(153,140,248)">
23
+ <rect x="48.0" y="37.3" width="5.3" height="5.3"/>
24
+ </g>
25
+ <g fill="rgb(152,146,247)">
26
+ <rect x="53.3" y="37.3" width="5.3" height="5.3"/>
27
+ </g>
28
+ <g fill="rgb(93,67,243)">
29
+ <rect x="58.7" y="37.3" width="5.3" height="5.3"/>
30
+ </g>
31
+ <g fill="rgb(157,147,250)">
32
+ <rect x="64.0" y="37.3" width="5.3" height="5.3"/>
33
+ </g>
34
+ <g fill="rgb(156,146,249)">
35
+ <rect x="69.3" y="37.3" width="5.3" height="5.3"/>
36
+ </g>
37
+ <g fill="rgb(145,147,247)">
38
+ <rect x="74.7" y="37.3" width="5.3" height="5.3"/>
39
+ </g>
40
+ <g fill="rgb(155,146,248)">
41
+ <rect x="80.0" y="37.3" width="5.3" height="5.3"/>
42
+ </g>
43
+ <g fill="rgb(41,40,141)">
44
+ <rect x="85.3" y="37.3" width="5.3" height="5.3"/>
45
+ </g>
46
+ <g fill="rgb(150,132,250)">
47
+ <rect x="42.7" y="42.7" width="5.3" height="5.3"/>
48
+ </g>
49
+ <g fill="rgb(154,143,250)">
50
+ <rect x="48.0" y="42.7" width="5.3" height="5.3"/>
51
+ </g>
52
+ <g fill="rgb(104,75,249)">
53
+ <rect x="53.3" y="42.7" width="5.3" height="5.3"/>
54
+ </g>
55
+ <g fill="rgb(156,142,251)">
56
+ <rect x="58.7" y="42.7" width="5.3" height="5.3"/>
57
+ </g>
58
+ <g fill="rgb(156,149,248)">
59
+ <rect x="64.0" y="42.7" width="5.3" height="5.3"/>
60
+ </g>
61
+ <g fill="rgb(157,150,248)">
62
+ <rect x="69.3" y="42.7" width="5.3" height="5.3"/>
63
+ </g>
64
+ <g fill="rgb(151,130,250)">
65
+ <rect x="74.7" y="42.7" width="5.3" height="5.3"/>
66
+ </g>
67
+ <g fill="rgb(149,145,247)">
68
+ <rect x="80.0" y="42.7" width="5.3" height="5.3"/>
69
+ </g>
70
+ <g fill="rgb(155,143,248)">
71
+ <rect x="85.3" y="42.7" width="5.3" height="5.3"/>
72
+ </g>
73
+ <g fill="rgb(41,41,146)">
74
+ <rect x="90.7" y="42.7" width="5.3" height="5.3"/>
75
+ </g>
76
+ <g fill="rgb(39,39,132)">
77
+ <rect x="37.3" y="48.0" width="5.3" height="5.3"/>
78
+ </g>
79
+ <g fill="rgb(151,133,250)">
80
+ <rect x="42.7" y="48.0" width="5.3" height="5.3"/>
81
+ <rect x="58.7" y="58.7" width="5.3" height="5.3"/>
82
+ </g>
83
+ <g fill="rgb(148,129,251)">
84
+ <rect x="48.0" y="48.0" width="5.3" height="5.3"/>
85
+ </g>
86
+ <g fill="rgb(156,145,248)">
87
+ <rect x="53.3" y="48.0" width="5.3" height="5.3"/>
88
+ </g>
89
+ <g fill="rgb(92,68,236)">
90
+ <rect x="58.7" y="48.0" width="5.3" height="5.3"/>
91
+ </g>
92
+ <g fill="rgb(85,70,220)">
93
+ <rect x="64.0" y="48.0" width="5.3" height="5.3"/>
94
+ </g>
95
+ <g fill="rgb(157,151,248)">
96
+ <rect x="69.3" y="48.0" width="5.3" height="5.3"/>
97
+ </g>
98
+ <g fill="rgb(86,61,235)">
99
+ <rect x="74.7" y="48.0" width="5.3" height="5.3"/>
100
+ </g>
101
+ <g fill="rgb(105,83,245)">
102
+ <rect x="80.0" y="48.0" width="5.3" height="5.3"/>
103
+ </g>
104
+ <g fill="rgb(191,189,251)">
105
+ <rect x="85.3" y="48.0" width="5.3" height="5.3"/>
106
+ </g>
107
+ <g fill="rgb(153,135,250)">
108
+ <rect x="90.7" y="48.0" width="5.3" height="5.3"/>
109
+ </g>
110
+ <g fill="rgb(71,68,183)">
111
+ <rect x="96.0" y="48.0" width="5.3" height="5.3"/>
112
+ </g>
113
+ <g fill="rgb(12,31,109)">
114
+ <rect x="32.0" y="53.3" width="5.3" height="5.3"/>
115
+ </g>
116
+ <g fill="rgb(82,67,225)">
117
+ <rect x="37.3" y="53.3" width="5.3" height="5.3"/>
118
+ </g>
119
+ <g fill="rgb(143,122,252)">
120
+ <rect x="42.7" y="53.3" width="5.3" height="5.3"/>
121
+ </g>
122
+ <g fill="rgb(94,67,244)">
123
+ <rect x="48.0" y="53.3" width="5.3" height="5.3"/>
124
+ </g>
125
+ <g fill="rgb(152,144,249)">
126
+ <rect x="53.3" y="53.3" width="5.3" height="5.3"/>
127
+ </g>
128
+ <g fill="rgb(154,143,248)">
129
+ <rect x="58.7" y="53.3" width="5.3" height="5.3"/>
130
+ </g>
131
+ <g fill="rgb(157,153,248)">
132
+ <rect x="64.0" y="53.3" width="5.3" height="5.3"/>
133
+ </g>
134
+ <g fill="rgb(84,61,230)">
135
+ <rect x="69.3" y="53.3" width="5.3" height="5.3"/>
136
+ </g>
137
+ <g fill="rgb(152,139,250)">
138
+ <rect x="74.7" y="53.3" width="5.3" height="5.3"/>
139
+ </g>
140
+ <g fill="rgb(95,71,239)">
141
+ <rect x="80.0" y="53.3" width="5.3" height="5.3"/>
142
+ </g>
143
+ <g fill="rgb(92,68,237)">
144
+ <rect x="85.3" y="53.3" width="5.3" height="5.3"/>
145
+ </g>
146
+ <g fill="rgb(151,139,250)">
147
+ <rect x="90.7" y="53.3" width="5.3" height="5.3"/>
148
+ </g>
149
+ <g fill="rgb(67,61,181)">
150
+ <rect x="96.0" y="53.3" width="5.3" height="5.3"/>
151
+ </g>
152
+ <g fill="rgb(148,132,250)">
153
+ <rect x="32.0" y="58.7" width="5.3" height="5.3"/>
154
+ </g>
155
+ <g fill="rgb(144,126,251)">
156
+ <rect x="37.3" y="58.7" width="5.3" height="5.3"/>
157
+ </g>
158
+ <g fill="rgb(156,143,251)">
159
+ <rect x="42.7" y="58.7" width="5.3" height="5.3"/>
160
+ </g>
161
+ <g fill="rgb(149,132,251)">
162
+ <rect x="48.0" y="58.7" width="5.3" height="5.3"/>
163
+ </g>
164
+ <g fill="rgb(150,132,251)">
165
+ <rect x="53.3" y="58.7" width="5.3" height="5.3"/>
166
+ </g>
167
+ <g fill="rgb(152,134,250)">
168
+ <rect x="64.0" y="58.7" width="5.3" height="5.3"/>
169
+ </g>
170
+ <g fill="rgb(152,139,247)">
171
+ <rect x="69.3" y="58.7" width="5.3" height="5.3"/>
172
+ </g>
173
+ <g fill="rgb(106,93,246)">
174
+ <rect x="74.7" y="58.7" width="5.3" height="5.3"/>
175
+ </g>
176
+ <g fill="rgb(155,141,250)">
177
+ <rect x="80.0" y="58.7" width="5.3" height="5.3"/>
178
+ </g>
179
+ <g fill="rgb(158,141,248)">
180
+ <rect x="85.3" y="58.7" width="5.3" height="5.3"/>
181
+ </g>
182
+ <g fill="rgb(116,101,251)">
183
+ <rect x="90.7" y="58.7" width="5.3" height="5.3"/>
184
+ </g>
185
+ <g fill="rgb(36,41,131)">
186
+ <rect x="96.0" y="58.7" width="5.3" height="5.3"/>
187
+ </g>
188
+ <g fill="rgb(141,122,250)">
189
+ <rect x="32.0" y="64.0" width="5.3" height="5.3"/>
190
+ </g>
191
+ <g fill="rgb(21,32,101)">
192
+ <rect x="37.3" y="64.0" width="5.3" height="5.3"/>
193
+ </g>
194
+ <g fill="rgb(146,126,251)">
195
+ <rect x="42.7" y="64.0" width="5.3" height="5.3"/>
196
+ <rect x="53.3" y="74.7" width="5.3" height="5.3"/>
197
+ </g>
198
+ <g fill="rgb(146,128,250)">
199
+ <rect x="48.0" y="64.0" width="5.3" height="5.3"/>
200
+ <rect x="58.7" y="74.7" width="5.3" height="5.3"/>
201
+ </g>
202
+ <g fill="rgb(158,149,250)">
203
+ <rect x="53.3" y="64.0" width="5.3" height="5.3"/>
204
+ </g>
205
+ <g fill="rgb(22,31,104)">
206
+ <rect x="58.7" y="64.0" width="5.3" height="5.3"/>
207
+ </g>
208
+ <g fill="rgb(152,137,250)">
209
+ <rect x="64.0" y="64.0" width="5.3" height="5.3"/>
210
+ </g>
211
+ <g fill="rgb(150,142,249)">
212
+ <rect x="69.3" y="64.0" width="5.3" height="5.3"/>
213
+ </g>
214
+ <g fill="rgb(152,138,250)">
215
+ <rect x="74.7" y="64.0" width="5.3" height="5.3"/>
216
+ </g>
217
+ <g fill="rgb(154,140,251)">
218
+ <rect x="80.0" y="64.0" width="5.3" height="5.3"/>
219
+ </g>
220
+ <g fill="rgb(116,104,252)">
221
+ <rect x="85.3" y="64.0" width="5.3" height="5.3"/>
222
+ </g>
223
+ <g fill="rgb(127,111,251)">
224
+ <rect x="90.7" y="64.0" width="5.3" height="5.3"/>
225
+ </g>
226
+ <g fill="rgb(92,85,242)">
227
+ <rect x="96.0" y="64.0" width="5.3" height="5.3"/>
228
+ </g>
229
+ <g fill="rgb(146,128,248)">
230
+ <rect x="32.0" y="69.3" width="5.3" height="5.3"/>
231
+ </g>
232
+ <g fill="rgb(154,132,250)">
233
+ <rect x="37.3" y="69.3" width="5.3" height="5.3"/>
234
+ </g>
235
+ <g fill="rgb(145,123,251)">
236
+ <rect x="42.7" y="69.3" width="5.3" height="5.3"/>
237
+ </g>
238
+ <g fill="rgb(145,125,250)">
239
+ <rect x="48.0" y="69.3" width="5.3" height="5.3"/>
240
+ <rect x="42.7" y="74.7" width="5.3" height="5.3"/>
241
+ </g>
242
+ <g fill="rgb(146,123,248)">
243
+ <rect x="53.3" y="69.3" width="5.3" height="5.3"/>
244
+ </g>
245
+ <g fill="rgb(152,132,248)">
246
+ <rect x="58.7" y="69.3" width="5.3" height="5.3"/>
247
+ </g>
248
+ <g fill="rgb(151,133,251)">
249
+ <rect x="64.0" y="69.3" width="5.3" height="5.3"/>
250
+ </g>
251
+ <g fill="rgb(135,121,250)">
252
+ <rect x="69.3" y="69.3" width="5.3" height="5.3"/>
253
+ </g>
254
+ <g fill="rgb(119,99,247)">
255
+ <rect x="74.7" y="69.3" width="5.3" height="5.3"/>
256
+ </g>
257
+ <g fill="rgb(108,93,249)">
258
+ <rect x="80.0" y="69.3" width="5.3" height="5.3"/>
259
+ </g>
260
+ <g fill="rgb(117,100,251)">
261
+ <rect x="85.3" y="69.3" width="5.3" height="5.3"/>
262
+ </g>
263
+ <g fill="rgb(125,110,250)">
264
+ <rect x="90.7" y="69.3" width="5.3" height="5.3"/>
265
+ </g>
266
+ <g fill="rgb(93,81,242)">
267
+ <rect x="96.0" y="69.3" width="5.3" height="5.3"/>
268
+ </g>
269
+ <g fill="rgb(10,28,98)">
270
+ <rect x="32.0" y="74.7" width="5.3" height="5.3"/>
271
+ </g>
272
+ <g fill="rgb(147,128,251)">
273
+ <rect x="37.3" y="74.7" width="5.3" height="5.3"/>
274
+ </g>
275
+ <g fill="rgb(48,39,174)">
276
+ <rect x="48.0" y="74.7" width="5.3" height="5.3"/>
277
+ </g>
278
+ <g fill="rgb(111,94,250)">
279
+ <rect x="64.0" y="74.7" width="5.3" height="5.3"/>
280
+ </g>
281
+ <g fill="rgb(122,109,250)">
282
+ <rect x="69.3" y="74.7" width="5.3" height="5.3"/>
283
+ </g>
284
+ <g fill="rgb(120,107,251)">
285
+ <rect x="74.7" y="74.7" width="5.3" height="5.3"/>
286
+ </g>
287
+ <g fill="rgb(121,100,250)">
288
+ <rect x="80.0" y="74.7" width="5.3" height="5.3"/>
289
+ </g>
290
+ <g fill="rgb(92,66,240)">
291
+ <rect x="85.3" y="74.7" width="5.3" height="5.3"/>
292
+ </g>
293
+ <g fill="rgb(117,92,249)">
294
+ <rect x="90.7" y="74.7" width="5.3" height="5.3"/>
295
+ </g>
296
+ <g fill="rgb(7,37,110)">
297
+ <rect x="96.0" y="74.7" width="5.3" height="5.3"/>
298
+ </g>
299
+ <g fill="rgb(77,59,222)">
300
+ <rect x="37.3" y="80.0" width="5.3" height="5.3"/>
301
+ </g>
302
+ <g fill="rgb(100,82,243)">
303
+ <rect x="42.7" y="80.0" width="5.3" height="5.3"/>
304
+ </g>
305
+ <g fill="rgb(136,120,250)">
306
+ <rect x="48.0" y="80.0" width="5.3" height="5.3"/>
307
+ </g>
308
+ <g fill="rgb(102,86,245)">
309
+ <rect x="53.3" y="80.0" width="5.3" height="5.3"/>
310
+ </g>
311
+ <g fill="rgb(103,86,245)">
312
+ <rect x="58.7" y="80.0" width="5.3" height="5.3"/>
313
+ </g>
314
+ <g fill="rgb(116,102,249)">
315
+ <rect x="64.0" y="80.0" width="5.3" height="5.3"/>
316
+ </g>
317
+ <g fill="rgb(114,103,247)">
318
+ <rect x="69.3" y="80.0" width="5.3" height="5.3"/>
319
+ </g>
320
+ <g fill="rgb(86,74,229)">
321
+ <rect x="74.7" y="80.0" width="5.3" height="5.3"/>
322
+ </g>
323
+ <g fill="rgb(106,93,244)">
324
+ <rect x="80.0" y="80.0" width="5.3" height="5.3"/>
325
+ </g>
326
+ <g fill="rgb(36,25,138)">
327
+ <rect x="85.3" y="80.0" width="5.3" height="5.3"/>
328
+ </g>
329
+ <g fill="rgb(83,73,231)">
330
+ <rect x="90.7" y="80.0" width="5.3" height="5.3"/>
331
+ </g>
332
+ <g fill="rgb(18,22,101)">
333
+ <rect x="42.7" y="85.3" width="5.3" height="5.3"/>
334
+ </g>
335
+ <g fill="rgb(19,24,101)">
336
+ <rect x="48.0" y="85.3" width="5.3" height="5.3"/>
337
+ </g>
338
+ <g fill="rgb(66,51,207)">
339
+ <rect x="53.3" y="85.3" width="5.3" height="5.3"/>
340
+ </g>
341
+ <g fill="rgb(95,83,244)">
342
+ <rect x="58.7" y="85.3" width="5.3" height="5.3"/>
343
+ </g>
344
+ <g fill="rgb(72,59,210)">
345
+ <rect x="64.0" y="85.3" width="5.3" height="5.3"/>
346
+ </g>
347
+ <g fill="rgb(115,96,250)">
348
+ <rect x="69.3" y="85.3" width="5.3" height="5.3"/>
349
+ </g>
350
+ <g fill="rgb(117,104,249)">
351
+ <rect x="74.7" y="85.3" width="5.3" height="5.3"/>
352
+ </g>
353
+ <g fill="rgb(119,104,249)">
354
+ <rect x="80.0" y="85.3" width="5.3" height="5.3"/>
355
+ </g>
356
+ <g fill="rgb(23,21,110)">
357
+ <rect x="85.3" y="85.3" width="5.3" height="5.3"/>
358
+ </g>
359
+ <g fill="rgb(69,51,218)">
360
+ <rect x="53.3" y="90.7" width="5.3" height="5.3"/>
361
+ </g>
362
+ <g fill="rgb(26,24,106)">
363
+ <rect x="58.7" y="90.7" width="5.3" height="5.3"/>
364
+ </g>
365
+ <g fill="rgb(58,46,198)">
366
+ <rect x="69.3" y="90.7" width="5.3" height="5.3"/>
367
+ </g>
368
+ <g fill="rgb(20,31,99)">
369
+ <rect x="74.7" y="90.7" width="5.3" height="5.3"/>
370
+ </g>
371
+ <g fill="rgb(26,29,111)">
372
+ <rect x="80.0" y="90.7" width="5.3" height="5.3"/>
373
+ </g>
374
+ <g fill="rgb(24,29,112)">
375
+ <rect x="48.0" y="96.0" width="5.3" height="5.3"/>
376
+ </g>
377
+ <g fill="rgb(105,91,248)">
378
+ <rect x="53.3" y="96.0" width="5.3" height="5.3"/>
379
+ </g>
380
+ <g fill="rgb(9,30,102)">
381
+ <rect x="58.7" y="96.0" width="5.3" height="5.3"/>
382
+ </g>
383
+ <g fill="rgb(12,31,104)">
384
+ <rect x="64.0" y="96.0" width="5.3" height="5.3"/>
385
+ </g>
386
+ <g fill="rgb(112,102,250)">
387
+ <rect x="69.3" y="96.0" width="5.3" height="5.3"/>
388
+ </g>
389
+ <g fill="rgb(15,41,120)">
390
+ <rect x="74.7" y="96.0" width="5.3" height="5.3"/>
391
+ </g>
392
+ <g fill="rgb(160,169,250)">
393
+ <rect x="80.0" y="96.0" width="5.3" height="5.3"/>
394
+ </g>
395
+ <g fill="rgb(156,157,248)">
396
+ <rect x="48.0" y="101.3" width="5.3" height="5.3"/>
397
+ </g>
398
+ <g fill="rgb(155,157,248)">
399
+ <rect x="53.3" y="101.3" width="5.3" height="5.3"/>
400
+ </g>
401
+ <g fill="rgb(157,158,248)">
402
+ <rect x="58.7" y="101.3" width="5.3" height="5.3"/>
403
+ </g>
404
+ <g fill="rgb(158,161,248)">
405
+ <rect x="64.0" y="101.3" width="5.3" height="5.3"/>
406
+ </g>
407
+ <g fill="rgb(158,160,248)">
408
+ <rect x="69.3" y="101.3" width="5.3" height="5.3"/>
409
+ </g>
410
+ <g fill="rgb(158,162,248)">
411
+ <rect x="74.7" y="101.3" width="5.3" height="5.3"/>
412
+ </g>
413
+ <g fill="rgb(158,163,247)">
414
+ <rect x="80.0" y="101.3" width="5.3" height="5.3"/>
415
+ </g>
416
+ </svg>
@@ -32,11 +32,11 @@ export const mcpManifest = {
32
32
  "graph.visualize": { implemented: false, reason: "MCP returns data only; visualization is client-side" },
33
33
  "graph.link_findings": { implemented: true, handler: "index.ts:link_findings" },
34
34
  // Config
35
- "config.proactivity": { implemented: false, reason: "No MCP tool for proactivity config" },
36
- "config.task_mode": { implemented: false, reason: "No MCP tool for workflow policy" },
37
- "config.retention": { implemented: false, reason: "Config tools are CLI-only" },
38
- "config.workflow": { implemented: false, reason: "Config tools are CLI-only" },
39
- "config.index": { implemented: false, reason: "Config tools are CLI-only" },
35
+ "config.proactivity": { implemented: true, handler: "index.ts:get_config, set_proactivity" },
36
+ "config.task_mode": { implemented: true, handler: "index.ts:get_config, set_task_mode" },
37
+ "config.retention": { implemented: true, handler: "index.ts:get_config, set_retention_policy" },
38
+ "config.workflow": { implemented: true, handler: "index.ts:get_config, set_workflow_policy, set_finding_sensitivity" },
39
+ "config.index": { implemented: true, handler: "index.ts:get_config, set_index_policy" },
40
40
  // Health / Sync / Session
41
41
  "health.check": { implemented: true, handler: "index.ts:health_check" },
42
42
  "health.doctor_fix": { implemented: true, handler: "index.ts:doctor_fix" },
@@ -12,9 +12,9 @@ export const vscodeManifest = {
12
12
  "task.add": { implemented: true, handler: "extension.ts:phren.addTask" },
13
13
  "task.complete": { implemented: true, handler: "extension.ts:phren.completeTask" },
14
14
  "task.remove": { implemented: true, handler: "extension.ts:phren.removeTask" },
15
- "task.update": { implemented: false, reason: "No VS Code command for task field updates" },
15
+ "task.update": { implemented: true, handler: "extension.ts:phren.updateTask, taskViewer.ts:save" },
16
16
  "task.list": { implemented: true, handler: "PhrenTreeProvider.ts:tasks section" },
17
- "task.pin": { implemented: false, reason: "No VS Code command for task pinning" },
17
+ "task.pin": { implemented: true, handler: "extension.ts:phren.pinTask" },
18
18
  "task.github_link": { implemented: false, reason: "GitHub link/promote is MCP-only" },
19
19
  // Hook management
20
20
  "hook.list": { implemented: true, handler: "extension.ts:phren.hooksStatus" },
@@ -47,7 +47,7 @@ export const vscodeManifest = {
47
47
  "skill.list": { implemented: true, handler: "PhrenTreeProvider.ts:skills section" },
48
48
  "skill.read": { implemented: true, handler: "skillEditor.ts:showSkillEditor" },
49
49
  "skill.enable": { implemented: true, handler: "extension.ts:phren.toggleSkill" },
50
- "skill.write": { implemented: false, reason: "No VS Code command for skill write" },
50
+ "skill.write": { implemented: true, handler: "skillEditor.ts:showSkillEditor" },
51
51
  // Project management
52
52
  "project.list": { implemented: true, handler: "PhrenTreeProvider.ts:projects section" },
53
53
  "project.manage": { implemented: true, handler: "extension.ts:phren.manageProject" },
@@ -1,16 +1,19 @@
1
1
  import * as fs from "fs";
2
- import { runtimeFile, getPhrenPath } from "./shared.js";
2
+ import * as path from "path";
3
+ import { runtimeFile, getPhrenPath, getProjectDirs } from "./shared.js";
3
4
  import { recordFeedback, flushEntryScores, getWorkflowPolicy, } from "./shared-governance.js";
4
5
  import { upsertCanonical } from "./shared-content.js";
5
- import { errorMessage } from "./utils.js";
6
+ import { errorMessage, isValidProjectName } from "./utils.js";
6
7
  import { addFinding as addFindingCore } from "./core-finding.js";
7
8
  import { runDoctor } from "./link.js";
8
9
  import { startWebUi } from "./memory-ui.js";
9
10
  import { startShell } from "./shell.js";
10
11
  import { runPhrenUpdate } from "./update.js";
11
- import { readRuntimeHealth } from "./data-access.js";
12
+ import { readRuntimeHealth, readReviewQueue, readReviewQueueAcrossProjects } from "./data-access.js";
12
13
  import { runSearch, runFragmentSearch, parseFragmentSearchArgs, runRelatedDocs, parseRelatedDocsArgs } from "./cli-search.js";
13
14
  import { resolveRuntimeProfile } from "./runtime-profile.js";
15
+ import { getProjectConsolidationStatus, CONSOLIDATION_ENTRY_THRESHOLD } from "./content-validate.js";
16
+ import { listAllSessions } from "./mcp-session.js";
14
17
  export async function handleSearch(opts, profile) {
15
18
  const result = await runSearch(opts, getPhrenPath(), profile);
16
19
  if (result.lines.length > 0) {
@@ -300,3 +303,110 @@ export async function handleUpdate(args) {
300
303
  process.exitCode = 1;
301
304
  }
302
305
  }
306
+ export async function handleReview(args) {
307
+ const phrenPath = getPhrenPath();
308
+ const profile = resolveRuntimeProfile(phrenPath);
309
+ const project = args[0] && !args[0].startsWith("-") ? args[0] : undefined;
310
+ if (project) {
311
+ if (!isValidProjectName(project)) {
312
+ console.error(`Invalid project name: "${project}".`);
313
+ process.exit(1);
314
+ }
315
+ const result = readReviewQueue(phrenPath, project);
316
+ if (!result.ok) {
317
+ console.error(result.error ?? "Failed to read review queue.");
318
+ process.exit(1);
319
+ }
320
+ const items = result.data;
321
+ if (items.length === 0) {
322
+ console.log(`No items in review queue for "${project}".`);
323
+ return;
324
+ }
325
+ console.log(`Review queue: ${project} (${items.length} item(s))\n`);
326
+ for (const item of items) {
327
+ const conf = item.confidence !== undefined ? ` [conf: ${item.confidence.toFixed(2)}]` : "";
328
+ const risky = item.risky ? " ⚠" : "";
329
+ console.log(` [${item.section}] ${item.date} ${item.text}${conf}${risky}`);
330
+ }
331
+ }
332
+ else {
333
+ const result = readReviewQueueAcrossProjects(phrenPath, profile);
334
+ if (!result.ok) {
335
+ console.error(result.error ?? "Failed to read review queue.");
336
+ process.exit(1);
337
+ }
338
+ const items = result.data;
339
+ if (items.length === 0) {
340
+ console.log("No items in review queue.");
341
+ return;
342
+ }
343
+ console.log(`Review queue: ${items.length} item(s) across all projects\n`);
344
+ let lastProject = "";
345
+ for (const item of items) {
346
+ if (item.project !== lastProject) {
347
+ console.log(`\n## ${item.project}`);
348
+ lastProject = item.project;
349
+ }
350
+ const conf = item.confidence !== undefined ? ` [conf: ${item.confidence.toFixed(2)}]` : "";
351
+ const risky = item.risky ? " ⚠" : "";
352
+ console.log(` [${item.section}] ${item.date} ${item.text}${conf}${risky}`);
353
+ }
354
+ }
355
+ }
356
+ export async function handleConsolidationStatus(args) {
357
+ const phrenPath = getPhrenPath();
358
+ const profile = resolveRuntimeProfile(phrenPath);
359
+ const project = args[0] && !args[0].startsWith("-") ? args[0] : undefined;
360
+ const projectDirs = project
361
+ ? (() => {
362
+ if (!isValidProjectName(project))
363
+ return null;
364
+ const dir = path.join(phrenPath, project);
365
+ return fs.existsSync(dir) ? [dir] : [];
366
+ })()
367
+ : getProjectDirs(phrenPath, profile);
368
+ if (projectDirs === null) {
369
+ console.error(`Invalid project name: "${project}".`);
370
+ process.exit(1);
371
+ }
372
+ if (project && projectDirs.length === 0) {
373
+ console.error(`Project "${project}" not found.`);
374
+ process.exit(1);
375
+ }
376
+ const results = [];
377
+ for (const dir of projectDirs) {
378
+ const status = getProjectConsolidationStatus(dir);
379
+ if (!status)
380
+ continue;
381
+ results.push({ ...status, threshold: CONSOLIDATION_ENTRY_THRESHOLD });
382
+ }
383
+ if (results.length === 0) {
384
+ console.log("No FINDINGS.md files found.");
385
+ return;
386
+ }
387
+ console.log("Consolidation status:\n");
388
+ for (const r of results) {
389
+ const last = r.lastConsolidated ? r.lastConsolidated : "never consolidated";
390
+ const rec = r.recommended ? " → consolidation recommended" : "";
391
+ console.log(` ${r.project}: ${r.entriesSince}/${r.threshold} entries since ${last}${rec}`);
392
+ }
393
+ }
394
+ export function handleSessionContext() {
395
+ const phrenPath = getPhrenPath();
396
+ const sessions = listAllSessions(phrenPath, 10);
397
+ const active = sessions.find((s) => s.status === "active");
398
+ if (!active) {
399
+ console.log("No active session. Call session_start (or use hooks) to begin a session.");
400
+ return;
401
+ }
402
+ console.log(`Session: ${active.sessionId.slice(0, 8)}`);
403
+ console.log(`Project: ${active.project ?? "none"}`);
404
+ if (active.agentScope)
405
+ console.log(`Agent scope: ${active.agentScope}`);
406
+ console.log(`Started: ${active.startedAt.slice(0, 16).replace("T", " ")}`);
407
+ console.log(`Duration: ~${active.durationMins ?? 0} min`);
408
+ console.log(`Findings added: ${active.findingsAdded}`);
409
+ console.log(`Tasks completed: ${active.tasksCompleted}`);
410
+ if (active.summary)
411
+ console.log(`Prior summary: ${active.summary}`);
412
+ }