@herbertgao/pi-extensions 2026.10.8 → 2026.10.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.
Files changed (68) hide show
  1. package/README.md +4 -3
  2. package/THIRD_PARTY_NOTICES.md +0 -26
  3. package/node_modules/@dietrichgebert/ponytail/.qoder-plugin/plugin.json +1 -1
  4. package/node_modules/@dietrichgebert/ponytail/README.md +16 -0
  5. package/node_modules/@dietrichgebert/ponytail/hooks/band/board.ts +560 -0
  6. package/node_modules/@dietrichgebert/ponytail/hooks/band/logo.ts +3 -0
  7. package/node_modules/@dietrichgebert/ponytail/hooks/band/metrics.ts +317 -0
  8. package/node_modules/@dietrichgebert/ponytail/hooks/band/register.tsx +472 -0
  9. package/node_modules/@dietrichgebert/ponytail/hooks/band/types.d.ts +35 -0
  10. package/node_modules/@dietrichgebert/ponytail/hooks/claude-band.json +6 -0
  11. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-band-import.js +274 -0
  12. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-mode-tracker.js +43 -5
  13. package/node_modules/@dietrichgebert/ponytail/package.json +1 -1
  14. package/node_modules/@dietrichgebert/ponytail/skills/ponytail/SKILL.md +1 -1
  15. package/node_modules/@dietrichgebert/ponytail/skills/ponytail-debt/SKILL.md +1 -2
  16. package/node_modules/@dietrichgebert/ponytail/skills/ponytail-gain/SKILL.md +0 -1
  17. package/node_modules/@dietrichgebert/ponytail/skills/ponytail-help/SKILL.md +6 -0
  18. package/node_modules/@herbertgao/pi-cc-extensions/README.en.md +7 -5
  19. package/node_modules/@herbertgao/pi-cc-extensions/README.md +3 -1
  20. package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/config.ts +5 -0
  21. package/node_modules/@herbertgao/pi-cc-extensions/extensions/config/panel.ts +11 -0
  22. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/token-rate.ts +21 -5
  23. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/shell/working-message.ts +23 -4
  24. package/node_modules/@herbertgao/pi-cc-extensions/extensions/index.ts +1 -1
  25. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/markdown-enhance.ts +4 -128
  26. package/node_modules/@herbertgao/pi-cc-extensions/package.json +4 -4
  27. package/package.json +3 -8
  28. package/node_modules/pi-multi-account/CHANGELOG.md +0 -1264
  29. package/node_modules/pi-multi-account/CONTRIBUTING.md +0 -61
  30. package/node_modules/pi-multi-account/LICENSE +0 -21
  31. package/node_modules/pi-multi-account/README.md +0 -277
  32. package/node_modules/pi-multi-account/SECURITY.md +0 -27
  33. package/node_modules/pi-multi-account/auth-file-transaction.ts +0 -56
  34. package/node_modules/pi-multi-account/child-usability.ts +0 -233
  35. package/node_modules/pi-multi-account/compaction-summary.ts +0 -32
  36. package/node_modules/pi-multi-account/completion-route-planner.ts +0 -224
  37. package/node_modules/pi-multi-account/config-file-transaction.ts +0 -42
  38. package/node_modules/pi-multi-account/context-guard.ts +0 -420
  39. package/node_modules/pi-multi-account/cursor/LICENSE +0 -21
  40. package/node_modules/pi-multi-account/cursor/NOTICE +0 -2
  41. package/node_modules/pi-multi-account/cursor/auth.ts +0 -165
  42. package/node_modules/pi-multi-account/cursor/bridge-handle.ts +0 -155
  43. package/node_modules/pi-multi-account/cursor/conversation-registry.ts +0 -104
  44. package/node_modules/pi-multi-account/cursor/cursor-models-raw.json +0 -611
  45. package/node_modules/pi-multi-account/cursor/cursor-shared.ts +0 -192
  46. package/node_modules/pi-multi-account/cursor/h2-bridge.mjs +0 -175
  47. package/node_modules/pi-multi-account/cursor/index.ts +0 -572
  48. package/node_modules/pi-multi-account/cursor/message-parsing.ts +0 -323
  49. package/node_modules/pi-multi-account/cursor/prompt-usage.ts +0 -53
  50. package/node_modules/pi-multi-account/cursor/proto/agent_pb.ts +0 -15294
  51. package/node_modules/pi-multi-account/cursor/proxy.ts +0 -2510
  52. package/node_modules/pi-multi-account/cursor/session-lifecycle.ts +0 -40
  53. package/node_modules/pi-multi-account/cursor/sse-keepalive.ts +0 -24
  54. package/node_modules/pi-multi-account/cursor/stream-lifecycle.ts +0 -193
  55. package/node_modules/pi-multi-account/cursor/upstream-watchdog.ts +0 -88
  56. package/node_modules/pi-multi-account/cursor-bridge.ts +0 -240
  57. package/node_modules/pi-multi-account/cursor-model-name.ts +0 -12
  58. package/node_modules/pi-multi-account/index.ts +0 -12340
  59. package/node_modules/pi-multi-account/model-catalog.ts +0 -354
  60. package/node_modules/pi-multi-account/model-pins.ts +0 -36
  61. package/node_modules/pi-multi-account/package.json +0 -104
  62. package/node_modules/pi-multi-account/pi-contract.ts +0 -281
  63. package/node_modules/pi-multi-account/provider-payload-stream.ts +0 -52
  64. package/node_modules/pi-multi-account/provider-priority.ts +0 -189
  65. package/node_modules/pi-multi-account/slot-proxy-auth.ts +0 -177
  66. package/node_modules/pi-multi-account/slot-proxy.ts +0 -366
  67. package/node_modules/pi-multi-account/state-file-transaction.ts +0 -67
  68. package/node_modules/pi-multi-account/usage.ts +0 -1128
@@ -60,7 +60,7 @@ export default function (pi: ExtensionAPI): void {
60
60
  getThinkingAnimationFrame: () => compactThinking?.getThinkingAnimationFrame?.() ?? 0,
61
61
  setCompactSummaryActive: (active) => compactThinking?.setCompactSummaryActive?.(active),
62
62
  };
63
- markdownEnhance(pi);
63
+ if (config.enableMarkdownEnhance) markdownEnhance(pi);
64
64
  claudeCodeStyle(pi, undefined, compactThinkingQuery);
65
65
  compactThinking = installCompactThinking(pi, getCompactThinkingConfig());
66
66
 
@@ -41,99 +41,6 @@ function collectFence(lines: string[], i: number): { diagram: string; next: numb
41
41
  return null; // 未闭合:放弃转换,保持原文
42
42
  }
43
43
 
44
- // ============================================================================
45
- // GitHub 风格提示框(admonition)
46
- // ============================================================================
47
-
48
- const ADMONITION = /^>\s*\[\s*!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\s*\]\s*(.*)$/i;
49
- const ADMONITION_STYLE: Record<string, { icon: string; label: string }> = {
50
- NOTE: { icon: "💡", label: "NOTE" },
51
- TIP: { icon: "✅", label: "TIP" },
52
- IMPORTANT: { icon: "❗", label: "IMPORTANT" },
53
- WARNING: { icon: "⚠️", label: "WARNING" },
54
- CAUTION: { icon: "⚠️", label: "CAUTION" },
55
- };
56
-
57
- /**
58
- * 把 > [!TYPE] 及其后续 > 行转成带加粗标签的引用块,视觉上成提示框。
59
- * 多行内容用空格合并为一行。返回 null 表示该行不是提示框。
60
- */
61
- function renderAdmonition(lines: string[], i: number): { output: string[]; next: number } | null {
62
- const m = lines[i].match(ADMONITION);
63
- if (!m) return null;
64
- const style = ADMONITION_STYLE[m[1].toUpperCase()];
65
- const body: string[] = [m[2]];
66
- let j = i + 1;
67
- while (j < lines.length && /^>\s?/.test(lines[j]) && !ADMONITION.test(lines[j])) {
68
- body.push(lines[j].replace(/^>\s?/, ""));
69
- j++;
70
- }
71
- while (body.length > 0 && body[body.length - 1].trim() === "") body.pop();
72
- // 内容合并为一行,作为引用块正文
73
- const content = body.join(" ").trim();
74
- // 保留引用块形态(pi 渲染为左侧竖线),标签加粗
75
- return {
76
- output: [`> **${style.icon} ${style.label}**${content ? ` ${content}` : ""}`, ""],
77
- next: j,
78
- };
79
- }
80
-
81
- // ============================================================================
82
- // 裸 URL 转可点击超链接
83
- // ============================================================================
84
-
85
- const URL_RE = /(?<!<)(?<!\]\()https?:\/\/[^\s<>'"|,。;:!?、」』】()【】《》『』「」]+/g;
86
- const TRIM_URL_RE = /[.,;:!?】」』"'》)}]+$/;
87
-
88
- /**
89
- * 去掉 URL 尾部标点;括号按平衡保留(如 Wikipedia 链接含括号、
90
- * IPv6 地址含 [::1]),尾部不成对的 ] 与 ) 会截掉。
91
- */
92
- function trimUrl(url: string): string {
93
- let t = url.replace(TRIM_URL_RE, "");
94
- for (;;) {
95
- if (t.endsWith(")") && (t.match(/\(/g)?.length ?? 0) < (t.match(/\)/g)?.length ?? 0)) {
96
- t = t.slice(0, -1);
97
- } else if (t.endsWith("]") && (t.match(/\[/g)?.length ?? 0) < (t.match(/\]/g)?.length ?? 0)) {
98
- t = t.slice(0, -1);
99
- } else {
100
- break;
101
- }
102
- }
103
- return t;
104
- }
105
-
106
- /**
107
- * 把代码块和行内代码外的裸 URL 转成 markdown 链接。
108
- * 已有的 [text](url) / ![alt](url) / <url> 自动链接用 lookbehind 排除。
109
- */
110
- function linkifyUrls(markdown: string): string {
111
- const lines = markdown.split("\n");
112
- const out: string[] = [];
113
- let fence: MarkdownFence | undefined;
114
- for (const line of lines) {
115
- const scanned = scanMarkdownFence(line, fence);
116
- fence = scanned.fence;
117
- if (scanned.protected) {
118
- out.push(line);
119
- continue;
120
- }
121
- // 行内代码(`...`)按反引号分片,只处理偶数片(代码外)
122
- const parts = line.split("`");
123
- for (let p = 0; p < parts.length; p++) {
124
- if (p % 2 === 0) {
125
- parts[p] = parts[p].replace(URL_RE, (url) => {
126
- const trimmed = trimUrl(url);
127
- if (trimmed.length === 0) return url;
128
- return `[${trimmed}](${trimmed})`;
129
- });
130
- }
131
- }
132
- out.push(parts.join("`"));
133
- }
134
- return out.join("\n");
135
- }
136
-
137
44
  // ============================================================================
138
45
  // 圈数字 → 半角括号
139
46
  // ============================================================================
@@ -231,7 +138,9 @@ function normalizeMultilineLinks(markdown: string): string {
231
138
 
232
139
  export default function (pi: ExtensionAPI): void {
233
140
  // 注意:pi 每个扩展只有一个 markdownTransformer 槽位,多次注册会互相覆盖,
234
- // 所以三个转换合并为一次注册,内部按序链式执行。
141
+ // 所以剩下的转换合并为一次注册,内部按序链式执行。
142
+ // 提示框和裸 URL 不接管:pi 的 marked 已自带裸 URL 链接化(带尾标点回退,
143
+ // 且在链接文本内不再嵌套),提示框交给默认引用块风格。
235
144
  pi.registerMarkdownTransformer((markdown, context) => {
236
145
  const { messageType, isStreaming = false } = context ?? {};
237
146
  // thinking 保持原文;普通回复即使流式中也先关闭跨行链接的空白点击区。
@@ -241,11 +150,7 @@ export default function (pi: ExtensionAPI): void {
241
150
  // 0. 圈数字转半角括号(Nerd Font 补丁字形缺陷规避)
242
151
  markdown = deCircled(markdown);
243
152
  // 1. Mermaid 方言渲染
244
- markdown = renderDiagrams(markdown, context);
245
- // 2. GitHub 风格提示框
246
- markdown = renderAdmonitions(markdown);
247
- // 3. 裸 URL 转超链接
248
- return linkifyUrls(markdown);
153
+ return renderDiagrams(markdown, context);
249
154
  });
250
155
  }
251
156
 
@@ -307,32 +212,3 @@ function renderDiagrams(
307
212
  }
308
213
  return out.join("\n");
309
214
  }
310
-
311
- /** GitHub 风格提示框 → 加粗标签引用块(跳过代码块)。 */
312
- function renderAdmonitions(markdown: string): string {
313
- const lines = markdown.split("\n");
314
- const out: string[] = [];
315
- let fence: MarkdownFence | undefined;
316
- let i = 0;
317
- while (i < lines.length) {
318
- const line = lines[i];
319
- const scanned = scanMarkdownFence(line, fence);
320
- fence = scanned.fence;
321
- if (scanned.protected) {
322
- out.push(line);
323
- i++;
324
- continue;
325
- }
326
- if (/^>\s*\[\s*!/i.test(line)) {
327
- const result = renderAdmonition(lines, i);
328
- if (result) {
329
- out.push(...result.output);
330
- i = result.next;
331
- continue;
332
- }
333
- }
334
- out.push(line);
335
- i++;
336
- }
337
- return out.join("\n");
338
- }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@herbertgao/pi-cc-extensions",
3
- "version": "1.0.6-local.1",
3
+ "version": "1.0.7-local.1",
4
4
  "license": "MIT",
5
5
  "description": "A Pi productivity suite with Claude Code-style UI, context inspection, and agent/session references",
6
6
  "type": "module",
@@ -71,10 +71,10 @@
71
71
  },
72
72
  "x-upstream": {
73
73
  "package": "pi-cc-extensions",
74
- "version": "1.0.6",
75
- "reviewedVersion": "1.0.6",
74
+ "version": "1.0.7",
75
+ "reviewedVersion": "1.0.7",
76
76
  "repository": "https://github.com/minuque/pi-cc-extensions",
77
- "commit": "52d5b095d3d4c77b9634267ac9c34a1ce34cb485",
77
+ "commit": "5963eefd452822994e6a001830ded7676ebb1845",
78
78
  "trackVersion": true
79
79
  }
80
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@herbertgao/pi-extensions",
3
- "version": "2026.10.8",
3
+ "version": "2026.10.10",
4
4
  "description": "Aggregate installer for HerbertGao-maintained Pi extensions.",
5
5
  "keywords": [
6
6
  "extensions",
@@ -37,11 +37,10 @@
37
37
  "dependencies": {
38
38
  "@ast-grep/cli": "0.45.3",
39
39
  "@ast-grep/napi": "^0.45.0",
40
- "@bufbuild/protobuf": "^2.15.0",
41
- "@dietrichgebert/ponytail": "5.2.0",
40
+ "@dietrichgebert/ponytail": "5.3.2",
42
41
  "@herbertgao/pi-agency": "0.1.1",
43
42
  "@herbertgao/pi-bark": "0.2.1",
44
- "@herbertgao/pi-cc-extensions": "1.0.6-local.1",
43
+ "@herbertgao/pi-cc-extensions": "1.0.7-local.1",
45
44
  "@herbertgao/pi-subagents": "0.22.0-local.1",
46
45
  "@herbertgao/sol-pi": "0.4.1",
47
46
  "@juicesharp/rpiv-ask-user-question": "2.13.8",
@@ -74,14 +73,12 @@
74
73
  "p-limit": "^6.1.0",
75
74
  "pi-antigravity": "0.10.0",
76
75
  "pi-lens": "4.4.3",
77
- "pi-multi-account": "1.24.0",
78
76
  "pi-next-cue": "1.0.7",
79
77
  "pi-provider-qoder": "0.6.1",
80
78
  "pi-typesafe": "0.10.0",
81
79
  "pi-web-access": "0.41.0",
82
80
  "pidusage": "^4.0.1",
83
81
  "promise.try": "^2.0.1",
84
- "proper-lockfile": "4.1.2",
85
82
  "turndown": "^7.2.0",
86
83
  "unbash": "4.0.10",
87
84
  "undici": "^8.11.2",
@@ -122,7 +119,6 @@
122
119
  "grok-mermaid",
123
120
  "pi-antigravity",
124
121
  "pi-lens",
125
- "pi-multi-account",
126
122
  "pi-next-cue",
127
123
  "pi-provider-qoder",
128
124
  "pi-typesafe",
@@ -151,7 +147,6 @@
151
147
  "./node_modules/@narumitw/pi-btw/dist/index.ts",
152
148
  "./node_modules/@narumitw/pi-caffeinate/dist/index.ts",
153
149
  "./node_modules/@pi-plugins/fast-mode/dist/index.mjs",
154
- "./node_modules/pi-multi-account/index.ts",
155
150
  "./node_modules/pi-next-cue/index.ts",
156
151
  "./node_modules/pi-lens/dist/index.js",
157
152
  "./node_modules/pi-web-access/dist",