@diegopetrucci/pi-extensions 0.1.79 → 0.1.80
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/extensions/annotate-last-message/package.json +1 -1
- package/extensions/annotate-last-message/prompt.ts +2 -8
- package/extensions/code-reviewer/index.ts +2 -12
- package/extensions/code-reviewer/package.json +1 -1
- package/extensions/contrarian/index.ts +4 -28
- package/extensions/contrarian/package.json +1 -1
- package/extensions/dynamic-context-pruning/README.md +8 -0
- package/extensions/dynamic-context-pruning/index.ts +12 -16
- package/extensions/dynamic-context-pruning/package.json +1 -1
- package/extensions/librarian/index.ts +1 -7
- package/extensions/librarian/package.json +1 -1
- package/extensions/oracle/index.ts +4 -28
- package/extensions/oracle/package.json +1 -1
- package/extensions/project-mcp-json/config.ts +2 -1
- package/extensions/project-mcp-json/package.json +1 -1
- package/extensions/quiet-tools/index.ts +15 -6
- package/extensions/quiet-tools/package.json +1 -1
- package/extensions/triage-comments/index.ts +1 -7
- package/extensions/triage-comments/package.json +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diegopetrucci/pi-annotate-last-message",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "A standalone pi extension that adds /annotate-last-message, a native Glimpse UI for annotating the latest assistant reply.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
AnnotateLastMessageInlineComment,
|
|
3
|
-
AnnotateLastMessageSectionComment,
|
|
4
3
|
AnnotateLastMessageSubmitPayload,
|
|
5
4
|
LastAssistantMessageData,
|
|
6
5
|
LastAssistantMessageLine,
|
|
@@ -34,10 +33,7 @@ function formatSectionLineRange(section: LastAssistantMessageSection): string {
|
|
|
34
33
|
: `lines ${section.startLine}-${section.endLine}`;
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
function formatSectionComment(
|
|
38
|
-
comment: AnnotateLastMessageSectionComment,
|
|
39
|
-
section: LastAssistantMessageSection | undefined,
|
|
40
|
-
): string {
|
|
36
|
+
function formatSectionComment(section: LastAssistantMessageSection | undefined): string {
|
|
41
37
|
if (section == null) {
|
|
42
38
|
return "Unknown section";
|
|
43
39
|
}
|
|
@@ -90,9 +86,7 @@ export function composeAnnotateLastMessagePrompt(
|
|
|
90
86
|
if (sectionComments.length > 0) {
|
|
91
87
|
lines.push("## Section comments");
|
|
92
88
|
sectionComments.forEach((comment, index) => {
|
|
93
|
-
lines.push(
|
|
94
|
-
`${index + 1}. ${formatSectionComment(comment, sectionMap.get(comment.sectionId))}`,
|
|
95
|
-
);
|
|
89
|
+
lines.push(`${index + 1}. ${formatSectionComment(sectionMap.get(comment.sectionId))}`);
|
|
96
90
|
lines.push(` ${comment.body.trim()}`);
|
|
97
91
|
lines.push("");
|
|
98
92
|
});
|
|
@@ -155,13 +155,11 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
155
155
|
"gpt-6-luna ",
|
|
156
156
|
"gpt-6-luna",
|
|
157
157
|
"gpt-5.6-luna",
|
|
158
|
-
"gpt-5.5",
|
|
159
158
|
"claude-opus-5.5 ",
|
|
160
159
|
"claude-opus-5.5",
|
|
161
160
|
"claude-opus-5",
|
|
162
161
|
"gpt-5.4",
|
|
163
162
|
"gpt-5.3-codex",
|
|
164
|
-
"gpt-5-mini",
|
|
165
163
|
"grok-4.7 ",
|
|
166
164
|
"grok-4.7",
|
|
167
165
|
"grok-4.6",
|
|
@@ -187,7 +185,7 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
187
185
|
"gpt-5.4",
|
|
188
186
|
"gpt-5.3-codex",
|
|
189
187
|
],
|
|
190
|
-
"opencode-go": ["grok-4.7 ", "grok-4.7"
|
|
188
|
+
"opencode-go": ["grok-4.7 ", "grok-4.7"],
|
|
191
189
|
openrouter: [
|
|
192
190
|
"openai/gpt-6-astra ",
|
|
193
191
|
"openai/gpt-6-astra",
|
|
@@ -258,8 +256,6 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
258
256
|
"gpt-6-luna ",
|
|
259
257
|
"gpt-6-luna",
|
|
260
258
|
"gpt-5.6-luna",
|
|
261
|
-
"gpt-5.5",
|
|
262
|
-
"gpt-5.3-codex-spark",
|
|
263
259
|
],
|
|
264
260
|
xai: ["grok-4.7 ", "grok-4.7", "grok-4.6", "grok-4.5"],
|
|
265
261
|
"vercel-ai-gateway": [
|
|
@@ -873,12 +869,6 @@ function addAssistantMessageUsage(total: Usage, message: unknown): void {
|
|
|
873
869
|
addUsage(total, assistant.usage as Usage);
|
|
874
870
|
}
|
|
875
871
|
|
|
876
|
-
function aggregateAssistantUsage(messages: unknown[]): Usage {
|
|
877
|
-
const total = createEmptyUsage();
|
|
878
|
-
for (const message of messages) addAssistantMessageUsage(total, message);
|
|
879
|
-
return total;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
872
|
function addSessionEventUsage(total: Usage, event: unknown): void {
|
|
883
873
|
const sessionEvent = event as { type?: string; message?: unknown; result?: { usage?: Usage } };
|
|
884
874
|
if (sessionEvent?.type === "message_end")
|
|
@@ -1757,7 +1747,7 @@ export const __test__ = {
|
|
|
1757
1747
|
normalizeThinkingLevel,
|
|
1758
1748
|
resolveThinkingLevel,
|
|
1759
1749
|
selectCodeReviewerModel,
|
|
1760
|
-
|
|
1750
|
+
createEmptyUsage,
|
|
1761
1751
|
addAssistantMessageUsage,
|
|
1762
1752
|
addSessionEventUsage,
|
|
1763
1753
|
inspectFinalAssistant,
|
|
@@ -252,23 +252,14 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
252
252
|
"azure-openai-responses": AZURE_MODEL_PREFERENCES,
|
|
253
253
|
baseten: [
|
|
254
254
|
"moonshotai/Kimi-K3",
|
|
255
|
-
"moonshotai/Kimi-K2.7-Code ",
|
|
256
255
|
"zai-org/GLM-5.3 ",
|
|
257
256
|
"deepseek-ai/DeepSeek-V4-Pro-0813",
|
|
258
257
|
"deepseek-ai/DeepSeek-V4-Pro",
|
|
259
258
|
"zai-org/GLM-5.2 ",
|
|
260
|
-
"zai-org/GLM-5.1",
|
|
261
|
-
"zai-org/GLM-5 ",
|
|
262
|
-
"moonshotai/Kimi-K2.6",
|
|
263
|
-
"moonshotai/Kimi-K2.5",
|
|
264
259
|
"nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B",
|
|
265
|
-
"nvidia/Nemotron-120B-A12B",
|
|
266
260
|
"openai/gpt-oss-120b",
|
|
267
261
|
"deepseek-ai/DeepSeek-V4-Flash-0731",
|
|
268
|
-
"thinkingmachines/inkling ",
|
|
269
|
-
"thinkingmachines/inkling-small",
|
|
270
262
|
"zai-org/GLM-5.2-Fast",
|
|
271
|
-
"zai-org/GLM-4.7",
|
|
272
263
|
],
|
|
273
264
|
cerebras: ["gpt-oss-120b", "qwen-3.8-27b"],
|
|
274
265
|
"cloudflare-ai-gateway": [
|
|
@@ -312,7 +303,6 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
312
303
|
"claude-opus-5",
|
|
313
304
|
"claude-fable-5",
|
|
314
305
|
"claude-opus-4.8",
|
|
315
|
-
"claude-opus-4.7",
|
|
316
306
|
"gpt-6-astra ",
|
|
317
307
|
"gpt-6-astra",
|
|
318
308
|
"gpt-6.1-sol ",
|
|
@@ -323,19 +313,14 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
323
313
|
"gpt-6-luna ",
|
|
324
314
|
"gpt-6-luna",
|
|
325
315
|
"gpt-5.6-luna",
|
|
326
|
-
"gpt-5.5",
|
|
327
|
-
"gpt-5.4 ",
|
|
328
316
|
"gpt-5.3-codex",
|
|
329
|
-
"gemini-3.5-flash",
|
|
330
317
|
"claude-sonnet-5",
|
|
331
318
|
"claude-sonnet-4.6",
|
|
332
|
-
"gpt-5-mini",
|
|
333
319
|
"grok-4.7 ",
|
|
334
320
|
"grok-4.7",
|
|
335
321
|
"grok-4.6",
|
|
336
322
|
"grok-4.5",
|
|
337
323
|
"kimi-k3",
|
|
338
|
-
"kimi-k2.7-code ",
|
|
339
324
|
],
|
|
340
325
|
google: [
|
|
341
326
|
"gemini-3.1-pro-preview-customtools",
|
|
@@ -433,8 +418,6 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
433
418
|
"gpt-6-luna ",
|
|
434
419
|
"gpt-6-luna",
|
|
435
420
|
"gpt-5.6-luna",
|
|
436
|
-
"gpt-5.5",
|
|
437
|
-
"gpt-5.3-codex-spark",
|
|
438
421
|
],
|
|
439
422
|
opencode: [
|
|
440
423
|
"claude-opus-5-5 ",
|
|
@@ -486,12 +469,10 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
486
469
|
"mimo-v2.5-pro",
|
|
487
470
|
"mimo-v2.5",
|
|
488
471
|
"minimax-m3",
|
|
489
|
-
"minimax-m2.7",
|
|
490
472
|
"kimi-k3",
|
|
491
473
|
"kimi-k2.7-code ",
|
|
492
474
|
"grok-4.7 ",
|
|
493
475
|
"grok-4.7",
|
|
494
|
-
"grok-4.6",
|
|
495
476
|
],
|
|
496
477
|
openrouter: [
|
|
497
478
|
"anthropic/claude-opus-5.5 ",
|
|
@@ -608,9 +589,7 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
608
589
|
"Qwen/Qwen3.7-Max",
|
|
609
590
|
"Qwen/Qwen3.6-Plus",
|
|
610
591
|
"MiniMaxAI/MiniMax-M3",
|
|
611
|
-
"MiniMaxAI/MiniMax-M2.7",
|
|
612
592
|
"openai/gpt-oss-120b",
|
|
613
|
-
"nvidia/nemotron-3-ultra-550b-a55b",
|
|
614
593
|
],
|
|
615
594
|
typesafe: [],
|
|
616
595
|
"vercel-ai-gateway": [
|
|
@@ -646,7 +625,6 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
646
625
|
"moonshotai/kimi-k2.7-code ",
|
|
647
626
|
"moonshotai/kimi-k2.7-code-highspeed",
|
|
648
627
|
"moonshotai/kimi-k2.6",
|
|
649
|
-
"moonshotai/kimi-k2-thinking",
|
|
650
628
|
"deepseek/deepseek-v4-pro",
|
|
651
629
|
"deepseek/deepseek-v3.2-thinking",
|
|
652
630
|
"alibaba/qwen3.7-max",
|
|
@@ -668,14 +646,12 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
668
646
|
"zai/glm-5.1",
|
|
669
647
|
],
|
|
670
648
|
xai: ["grok-4.7 ", "grok-4.7", "grok-4.6", "grok-4.5", "grok-4.3"],
|
|
671
|
-
xiaomi: ["mimo-v2.
|
|
672
|
-
"xiaomi-token-plan-ams": ["mimo-v2.
|
|
673
|
-
"xiaomi-token-plan-cn": ["mimo-v2.
|
|
674
|
-
"xiaomi-token-plan-sgp": ["mimo-v2.
|
|
649
|
+
xiaomi: ["mimo-v2.6-pro-ultraspeed", "mimo-v2.6-pro", "mimo-v2.6-flash"],
|
|
650
|
+
"xiaomi-token-plan-ams": ["mimo-v2.6-pro", "mimo-v2.6-flash"],
|
|
651
|
+
"xiaomi-token-plan-cn": ["mimo-v2.6-pro", "mimo-v2.6-flash"],
|
|
652
|
+
"xiaomi-token-plan-sgp": ["mimo-v2.6-pro", "mimo-v2.6-flash"],
|
|
675
653
|
nvidia: [
|
|
676
654
|
"nvidia/nemotron-3-ultra-550b-a55b",
|
|
677
|
-
"nvidia/nemotron-3-super-120b-a12b",
|
|
678
|
-
"moonshotai/kimi-k3",
|
|
679
655
|
"moonshotai/kimi-k2.6",
|
|
680
656
|
"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",
|
|
681
657
|
],
|
|
@@ -275,6 +275,14 @@ Notes:
|
|
|
275
275
|
warm request prefix between consecutive LLM calls separated only by a
|
|
276
276
|
toolResult) illustrates cache invalidation, not proof that amortization is
|
|
277
277
|
impossible. Set `mid_loop` back to `22` to restore the old parity behavior.
|
|
278
|
+
- `gate.breakEvenThreshold` is a deprecated legacy field retained for
|
|
279
|
+
compatibility. Loaded config always resolves through
|
|
280
|
+
`gate.breakEvenThresholdByState`, so a global-only value (including `0`) has
|
|
281
|
+
no runtime effect, and missing or invalid state values use their existing
|
|
282
|
+
normalized defaults rather than inheriting the global value. Direct callers
|
|
283
|
+
of the exported `resolveBreakEvenThreshold` may still use this field as the
|
|
284
|
+
fallback when they pass an unnormalized gate object. Set explicit per-state
|
|
285
|
+
values instead.
|
|
278
286
|
- `gate.breakEvenThreshold`'s default of `22` is calibrated from the
|
|
279
287
|
representative-corpus benchmark at `cachedPriceRatio` r=0.1 (aggressive
|
|
280
288
|
prompt caching, the common case). It is **provider/ratio-
|
|
@@ -243,13 +243,15 @@ export interface PruneGateConfig {
|
|
|
243
243
|
/** Fraction of full price still paid for cached ( r ). Default 0.1. */
|
|
244
244
|
cachedPriceRatio: number;
|
|
245
245
|
/**
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
246
|
+
* @deprecated Legacy global fallback retained for direct callers that pass
|
|
247
|
+
* an unnormalized gate object to resolveBreakEvenThreshold. normalizeConfig
|
|
248
|
+
* always supplies per-state values, so loaded config does not use this field
|
|
249
|
+
* to fill missing or invalid state values. Recalibrated from the
|
|
250
|
+
* representative-corpus benchmark; see DEFAULT_BREAK_EVEN_THRESHOLD for the
|
|
251
|
+
* full rationale and ratio-sensitivity caveats.
|
|
250
252
|
*/
|
|
251
253
|
breakEvenThreshold: number;
|
|
252
|
-
/** Per-state overrides.
|
|
254
|
+
/** Per-state overrides. normalizeConfig defaults to idle 22 and mid_loop 1. */
|
|
253
255
|
breakEvenThresholdByState: { idle: number; mid_loop: number };
|
|
254
256
|
}
|
|
255
257
|
|
|
@@ -1631,11 +1633,6 @@ export function computeFileReadRange(args: Record<string, unknown> | undefined):
|
|
|
1631
1633
|
return { start, end };
|
|
1632
1634
|
}
|
|
1633
1635
|
|
|
1634
|
-
/** True when a range represents a full-file read (starts at line 1, no limit). */
|
|
1635
|
-
export function isFullFileReadRange(range: FileReadRange): boolean {
|
|
1636
|
-
return range.start === 1 && range.end === undefined;
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
1636
|
/**
|
|
1640
1637
|
* Conservative range-coverage check: does `later` fully cover `earlier`?
|
|
1641
1638
|
* Implements rules 1+2 above via one unified representation (a full-file
|
|
@@ -2268,11 +2265,9 @@ const STRATEGY_ALIASES: Record<string, StrategyKey> = {
|
|
|
2268
2265
|
"error-purge": "errorPurge",
|
|
2269
2266
|
errorpurge: "errorPurge",
|
|
2270
2267
|
error_purge: "errorPurge",
|
|
2271
|
-
errorPurge: "errorPurge",
|
|
2272
2268
|
"superseded-file-ops": "supersededFileOps",
|
|
2273
2269
|
supersededfileops: "supersededFileOps",
|
|
2274
2270
|
superseded_file_ops: "supersededFileOps",
|
|
2275
|
-
supersededFileOps: "supersededFileOps",
|
|
2276
2271
|
};
|
|
2277
2272
|
|
|
2278
2273
|
const STRATEGY_DISPLAY_NAMES: Record<StrategyKey, string> = {
|
|
@@ -2315,9 +2310,11 @@ export function parseContextPruningArgs(rawArgs: string): ContextPruningSubcomma
|
|
|
2315
2310
|
return { kind: "toggle" };
|
|
2316
2311
|
case "strategy": {
|
|
2317
2312
|
const [nameRaw, valueRaw] = rest;
|
|
2318
|
-
const
|
|
2319
|
-
|
|
2320
|
-
|
|
2313
|
+
const normalizedName = nameRaw?.toLowerCase();
|
|
2314
|
+
const key =
|
|
2315
|
+
normalizedName && Object.hasOwn(STRATEGY_ALIASES, normalizedName)
|
|
2316
|
+
? STRATEGY_ALIASES[normalizedName]
|
|
2317
|
+
: undefined;
|
|
2321
2318
|
const value = valueRaw?.toLowerCase();
|
|
2322
2319
|
if (!key || (value !== "on" && value !== "off")) return { kind: "unknown", raw: rawArgs };
|
|
2323
2320
|
return { kind: "strategy", strategy: key, value: value === "on" };
|
|
@@ -2463,7 +2460,6 @@ function notify(
|
|
|
2463
2460
|
}
|
|
2464
2461
|
|
|
2465
2462
|
export const __testing = {
|
|
2466
|
-
globToRegExp,
|
|
2467
2463
|
getConfigPath,
|
|
2468
2464
|
readConfig,
|
|
2469
2465
|
writeConfig,
|
|
@@ -1275,12 +1275,6 @@ function addAssistantMessageUsage(total: Usage, message: unknown): void {
|
|
|
1275
1275
|
addUsage(total, assistant.usage as Usage);
|
|
1276
1276
|
}
|
|
1277
1277
|
|
|
1278
|
-
function aggregateAssistantUsage(messages: unknown[]): Usage {
|
|
1279
|
-
const total = createEmptyUsage();
|
|
1280
|
-
for (const message of messages) addAssistantMessageUsage(total, message);
|
|
1281
|
-
return total;
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
1278
|
function addSessionEventUsage(total: Usage, event: unknown): void {
|
|
1285
1279
|
const sessionEvent = event as { type?: string; message?: unknown; result?: { usage?: Usage } };
|
|
1286
1280
|
if (sessionEvent?.type === "message_end")
|
|
@@ -1463,7 +1457,7 @@ export const __test__ = {
|
|
|
1463
1457
|
isModelAvailabilityError,
|
|
1464
1458
|
parseModelPreference,
|
|
1465
1459
|
resolveThinkingLevel,
|
|
1466
|
-
|
|
1460
|
+
createEmptyUsage,
|
|
1467
1461
|
addSessionEventUsage,
|
|
1468
1462
|
inspectFinalAssistant,
|
|
1469
1463
|
classifyRunFailure,
|
|
@@ -202,23 +202,14 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
202
202
|
"azure-openai-responses": AZURE_MODEL_PREFERENCES,
|
|
203
203
|
baseten: [
|
|
204
204
|
"moonshotai/Kimi-K3",
|
|
205
|
-
"moonshotai/Kimi-K2.7-Code ",
|
|
206
205
|
"zai-org/GLM-5.3 ",
|
|
207
206
|
"deepseek-ai/DeepSeek-V4-Pro-0813",
|
|
208
207
|
"deepseek-ai/DeepSeek-V4-Pro",
|
|
209
208
|
"zai-org/GLM-5.2 ",
|
|
210
|
-
"zai-org/GLM-5.1",
|
|
211
|
-
"zai-org/GLM-5 ",
|
|
212
|
-
"moonshotai/Kimi-K2.6",
|
|
213
|
-
"moonshotai/Kimi-K2.5",
|
|
214
209
|
"nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B",
|
|
215
|
-
"nvidia/Nemotron-120B-A12B",
|
|
216
210
|
"openai/gpt-oss-120b",
|
|
217
211
|
"deepseek-ai/DeepSeek-V4-Flash-0731",
|
|
218
|
-
"thinkingmachines/inkling ",
|
|
219
|
-
"thinkingmachines/inkling-small",
|
|
220
212
|
"zai-org/GLM-5.2-Fast",
|
|
221
|
-
"zai-org/GLM-4.7",
|
|
222
213
|
],
|
|
223
214
|
cerebras: ["gpt-oss-120b", "qwen-3.8-27b"],
|
|
224
215
|
"cloudflare-ai-gateway": [
|
|
@@ -262,7 +253,6 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
262
253
|
"claude-opus-5",
|
|
263
254
|
"claude-fable-5",
|
|
264
255
|
"claude-opus-4.8",
|
|
265
|
-
"claude-opus-4.7",
|
|
266
256
|
"gpt-6-astra ",
|
|
267
257
|
"gpt-6-astra",
|
|
268
258
|
"gpt-6.1-sol ",
|
|
@@ -273,19 +263,14 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
273
263
|
"gpt-6-luna ",
|
|
274
264
|
"gpt-6-luna",
|
|
275
265
|
"gpt-5.6-luna",
|
|
276
|
-
"gpt-5.5",
|
|
277
|
-
"gpt-5.4 ",
|
|
278
266
|
"gpt-5.3-codex",
|
|
279
|
-
"gemini-3.5-flash",
|
|
280
267
|
"claude-sonnet-5",
|
|
281
268
|
"claude-sonnet-4.6",
|
|
282
|
-
"gpt-5-mini",
|
|
283
269
|
"grok-4.7 ",
|
|
284
270
|
"grok-4.7",
|
|
285
271
|
"grok-4.6",
|
|
286
272
|
"grok-4.5",
|
|
287
273
|
"kimi-k3",
|
|
288
|
-
"kimi-k2.7-code ",
|
|
289
274
|
],
|
|
290
275
|
google: [
|
|
291
276
|
"gemini-3.1-pro-preview-customtools",
|
|
@@ -383,8 +368,6 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
383
368
|
"gpt-6-luna ",
|
|
384
369
|
"gpt-6-luna",
|
|
385
370
|
"gpt-5.6-luna",
|
|
386
|
-
"gpt-5.5",
|
|
387
|
-
"gpt-5.3-codex-spark",
|
|
388
371
|
],
|
|
389
372
|
opencode: [
|
|
390
373
|
"claude-opus-5-5 ",
|
|
@@ -436,12 +419,10 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
436
419
|
"mimo-v2.5-pro",
|
|
437
420
|
"mimo-v2.5",
|
|
438
421
|
"minimax-m3",
|
|
439
|
-
"minimax-m2.7",
|
|
440
422
|
"kimi-k3",
|
|
441
423
|
"kimi-k2.7-code ",
|
|
442
424
|
"grok-4.7 ",
|
|
443
425
|
"grok-4.7",
|
|
444
|
-
"grok-4.6",
|
|
445
426
|
],
|
|
446
427
|
openrouter: [
|
|
447
428
|
"anthropic/claude-opus-5.5 ",
|
|
@@ -558,9 +539,7 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
558
539
|
"Qwen/Qwen3.7-Max",
|
|
559
540
|
"Qwen/Qwen3.6-Plus",
|
|
560
541
|
"MiniMaxAI/MiniMax-M3",
|
|
561
|
-
"MiniMaxAI/MiniMax-M2.7",
|
|
562
542
|
"openai/gpt-oss-120b",
|
|
563
|
-
"nvidia/nemotron-3-ultra-550b-a55b",
|
|
564
543
|
],
|
|
565
544
|
typesafe: [],
|
|
566
545
|
"vercel-ai-gateway": [
|
|
@@ -596,7 +575,6 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
596
575
|
"moonshotai/kimi-k2.7-code ",
|
|
597
576
|
"moonshotai/kimi-k2.7-code-highspeed",
|
|
598
577
|
"moonshotai/kimi-k2.6",
|
|
599
|
-
"moonshotai/kimi-k2-thinking",
|
|
600
578
|
"deepseek/deepseek-v4-pro",
|
|
601
579
|
"deepseek/deepseek-v3.2-thinking",
|
|
602
580
|
"alibaba/qwen3.7-max",
|
|
@@ -618,14 +596,12 @@ const PROVIDER_MODEL_PREFERENCES: Record<string, string[]> = {
|
|
|
618
596
|
"zai/glm-5.1",
|
|
619
597
|
],
|
|
620
598
|
xai: ["grok-4.7 ", "grok-4.7", "grok-4.6", "grok-4.5", "grok-4.3"],
|
|
621
|
-
xiaomi: ["mimo-v2.
|
|
622
|
-
"xiaomi-token-plan-ams": ["mimo-v2.
|
|
623
|
-
"xiaomi-token-plan-cn": ["mimo-v2.
|
|
624
|
-
"xiaomi-token-plan-sgp": ["mimo-v2.
|
|
599
|
+
xiaomi: ["mimo-v2.6-pro-ultraspeed", "mimo-v2.6-pro", "mimo-v2.6-flash"],
|
|
600
|
+
"xiaomi-token-plan-ams": ["mimo-v2.6-pro", "mimo-v2.6-flash"],
|
|
601
|
+
"xiaomi-token-plan-cn": ["mimo-v2.6-pro", "mimo-v2.6-flash"],
|
|
602
|
+
"xiaomi-token-plan-sgp": ["mimo-v2.6-pro", "mimo-v2.6-flash"],
|
|
625
603
|
nvidia: [
|
|
626
604
|
"nvidia/nemotron-3-ultra-550b-a55b",
|
|
627
|
-
"nvidia/nemotron-3-super-120b-a12b",
|
|
628
|
-
"moonshotai/kimi-k3",
|
|
629
605
|
"moonshotai/kimi-k2.6",
|
|
630
606
|
"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",
|
|
631
607
|
],
|
|
@@ -224,7 +224,8 @@ export function parseMcpJson(text: string, env: Record<string, string> = {}): Pa
|
|
|
224
224
|
|
|
225
225
|
let root: unknown;
|
|
226
226
|
try {
|
|
227
|
-
|
|
227
|
+
const jsonText = text.startsWith("\uFEFF") ? text.slice(1) : text;
|
|
228
|
+
root = JSON.parse(jsonText);
|
|
228
229
|
} catch {
|
|
229
230
|
// Never include raw parse error text in warnings.
|
|
230
231
|
warnings.push("project-mcp-json: .mcp.json could not be parsed as JSON; skipping all servers");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diegopetrucci/pi-project-mcp-json",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "A pi extension that reads Claude Code-style .mcp.json files and registers the configured servers with pi.registerMcpServer.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -162,12 +162,22 @@ function formatPathArg(args: unknown, theme: RenderTheme, placeholder = "..."):
|
|
|
162
162
|
return path ? theme.fg("accent", shortenPath(path)) : theme.fg("toolOutput", placeholder);
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
function parseReadLineNumber(value: unknown): number | undefined {
|
|
166
|
+
if (typeof value === "string" && value.trim() !== "") value = Number(value);
|
|
167
|
+
return typeof value === "number" && Number.isFinite(value) ? value : undefined;
|
|
168
|
+
}
|
|
169
|
+
|
|
165
170
|
function formatReadLineRange(args: unknown, theme: RenderTheme): string {
|
|
166
|
-
const
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
const
|
|
171
|
+
const record = asRecord(args);
|
|
172
|
+
const offset = record?.offset;
|
|
173
|
+
const limit = record?.limit;
|
|
174
|
+
if (offset == null && limit == null) return "";
|
|
175
|
+
const startLine = offset == null ? 1 : parseReadLineNumber(offset);
|
|
176
|
+
if (startLine === undefined) return "";
|
|
177
|
+
if (limit == null) return theme.fg("warning", `:${startLine}`);
|
|
178
|
+
const count = parseReadLineNumber(limit);
|
|
179
|
+
if (count === undefined) return "";
|
|
180
|
+
const endLine = startLine + count - 1;
|
|
171
181
|
return theme.fg("warning", `:${startLine}${endLine ? `-${endLine}` : ""}`);
|
|
172
182
|
}
|
|
173
183
|
|
|
@@ -418,7 +428,6 @@ export const __testing = {
|
|
|
418
428
|
formatMcpCallLine,
|
|
419
429
|
createQuietResolver,
|
|
420
430
|
QuietCallRenderComponent,
|
|
421
|
-
QuietResultRenderComponent,
|
|
422
431
|
QuietToolsDelegateToDefault,
|
|
423
432
|
};
|
|
424
433
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diegopetrucci/pi-quiet-tools",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "A pi extension that visually compacts collapsed built-in tool rows and MCP tool rows in the TUI without changing tool results sent to the model.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -578,12 +578,6 @@ function addAssistantMessageUsage(total: Usage, message: unknown): void {
|
|
|
578
578
|
addUsage(total, assistant.usage as Usage);
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
-
function aggregateAssistantUsage(messages: unknown[]): Usage {
|
|
582
|
-
const total = createEmptyUsage();
|
|
583
|
-
for (const message of messages) addAssistantMessageUsage(total, message);
|
|
584
|
-
return total;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
581
|
function addSessionEventUsage(total: Usage, event: unknown): void {
|
|
588
582
|
const sessionEvent = event as { type?: string; message?: unknown; result?: { usage?: Usage } };
|
|
589
583
|
if (sessionEvent?.type === "message_end")
|
|
@@ -2641,7 +2635,7 @@ export const __test__ = {
|
|
|
2641
2635
|
parseSelectionList,
|
|
2642
2636
|
parseTriageCommandArgs,
|
|
2643
2637
|
prepareArguments,
|
|
2644
|
-
|
|
2638
|
+
createEmptyUsage,
|
|
2645
2639
|
addSessionEventUsage,
|
|
2646
2640
|
inspectFinalAssistant,
|
|
2647
2641
|
classifyRunFailure,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diegopetrucci/pi-extensions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.80",
|
|
4
4
|
"description": "A collection of pi extensions and skills for annotation UIs, context management, workflow audits, contrarian review, review-comment triage, notifications, brrr push alerts, safety guards, GitHub research, repo-local knowledge, todos, tool rendering, model/provider helpers, and Xiaohei-style article illustrations.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -74,9 +74,9 @@
|
|
|
74
74
|
]
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@earendil-works/pi-ai": "^1.0
|
|
78
|
-
"@earendil-works/pi-coding-agent": "^1.0
|
|
79
|
-
"@earendil-works/pi-tui": "^1.0
|
|
77
|
+
"@earendil-works/pi-ai": "^1.4.0",
|
|
78
|
+
"@earendil-works/pi-coding-agent": "^1.4.0",
|
|
79
|
+
"@earendil-works/pi-tui": "^1.4.0",
|
|
80
80
|
"@types/node": "^25.9.1",
|
|
81
81
|
"oxfmt": "0.67.0",
|
|
82
82
|
"typebox": "^1.3.6",
|