@herbertgao/pi-extensions 2026.9.4 → 2026.9.5

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 (109) hide show
  1. package/node_modules/@dietrichgebert/ponytail/.qoder-plugin/plugin.json +1 -1
  2. package/node_modules/@dietrichgebert/ponytail/README.es.md +33 -2
  3. package/node_modules/@dietrichgebert/ponytail/README.ko.md +33 -2
  4. package/node_modules/@dietrichgebert/ponytail/README.md +49 -5
  5. package/node_modules/@dietrichgebert/ponytail/assets/retriever-icon.png +0 -0
  6. package/node_modules/@dietrichgebert/ponytail/assets/retriever-logo-dark.svg +4 -0
  7. package/node_modules/@dietrichgebert/ponytail/assets/retriever-logo-light.svg +4 -0
  8. package/node_modules/@dietrichgebert/ponytail/hooks/claude-codex-hooks.json +0 -3
  9. package/node_modules/@dietrichgebert/ponytail/hooks/cursor-hooks.json +17 -0
  10. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-activate.js +22 -3
  11. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-mode-tracker.js +27 -2
  12. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-runtime.js +61 -2
  13. package/node_modules/@dietrichgebert/ponytail/package.json +2 -1
  14. package/node_modules/@dietrichgebert/ponytail/scripts/cursor-hooks.js +135 -0
  15. package/node_modules/@dietrichgebert/ponytail/scripts/uninstall.js +21 -4
  16. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/reference/index.ts +33 -15
  17. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +6 -2
  18. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/scroll.ts +23 -1
  19. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/diff/diff-renderer.ts +69 -14
  20. package/node_modules/@herbertgao/pi-cc-extensions/package.json +3 -3
  21. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/economics.ts +4 -4
  22. package/node_modules/@herbertgao/sol-pi/src/sol-pi/extensions/online-context-compact/extension.ts +41 -1
  23. package/node_modules/@juicesharp/rpiv-ask-user-question/ask-user-question.ts +5 -1
  24. package/node_modules/@juicesharp/rpiv-ask-user-question/events.ts +5 -1
  25. package/node_modules/@juicesharp/rpiv-ask-user-question/package.json +3 -2
  26. package/node_modules/@juicesharp/rpiv-ask-user-question/tool/normalize-params.ts +56 -0
  27. package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/option-list-view.ts +1 -1
  28. package/node_modules/@juicesharp/rpiv-ask-user-question/view/components/tab-bar.ts +1 -2
  29. package/node_modules/@pi-plugins/fast-mode/README.md +31 -44
  30. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +20914 -30
  31. package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
  32. package/node_modules/@pi-plugins/fast-mode/package.json +5 -7
  33. package/node_modules/@tifan/pi-copy-response/README.md +2 -2
  34. package/node_modules/@tifan/pi-copy-response/package.json +3 -2
  35. package/node_modules/@tifan/pi-inline-skills/README.md +2 -2
  36. package/node_modules/@tifan/pi-inline-skills/package.json +3 -2
  37. package/node_modules/@tifan/pi-mermaid-open/README.md +1 -1
  38. package/node_modules/@tifan/pi-mermaid-open/package.json +3 -2
  39. package/node_modules/@tifan/pi-preferred-thinking/package.json +3 -2
  40. package/node_modules/@tifan/pi-recap/package.json +3 -2
  41. package/node_modules/pi-mcp-adapter/CHANGELOG.md +78 -0
  42. package/node_modules/pi-mcp-adapter/README.md +125 -19
  43. package/node_modules/pi-mcp-adapter/agent-plugin-loader.ts +69 -30
  44. package/node_modules/pi-mcp-adapter/agent-plugin-provenance.ts +36 -0
  45. package/node_modules/pi-mcp-adapter/claude-plugin-loader.ts +365 -0
  46. package/node_modules/pi-mcp-adapter/commands.ts +13 -15
  47. package/node_modules/pi-mcp-adapter/config.ts +198 -30
  48. package/node_modules/pi-mcp-adapter/consent-manager.ts +40 -9
  49. package/node_modules/pi-mcp-adapter/direct-tool-surface.ts +250 -0
  50. package/node_modules/pi-mcp-adapter/direct-tools.ts +9 -228
  51. package/node_modules/pi-mcp-adapter/dist/agent-plugin-loader.js +74 -32
  52. package/node_modules/pi-mcp-adapter/dist/agent-plugin-loader.js.map +1 -1
  53. package/node_modules/pi-mcp-adapter/dist/agent-plugin-provenance.d.ts +1 -0
  54. package/node_modules/pi-mcp-adapter/dist/agent-plugin-provenance.js +31 -0
  55. package/node_modules/pi-mcp-adapter/dist/agent-plugin-provenance.js.map +1 -0
  56. package/node_modules/pi-mcp-adapter/dist/claude-plugin-loader.d.ts +9 -0
  57. package/node_modules/pi-mcp-adapter/dist/claude-plugin-loader.js +362 -0
  58. package/node_modules/pi-mcp-adapter/dist/claude-plugin-loader.js.map +1 -0
  59. package/node_modules/pi-mcp-adapter/dist/config.d.ts +3 -1
  60. package/node_modules/pi-mcp-adapter/dist/config.js +189 -27
  61. package/node_modules/pi-mcp-adapter/dist/config.js.map +1 -1
  62. package/node_modules/pi-mcp-adapter/dist/metadata-cache.js +7 -16
  63. package/node_modules/pi-mcp-adapter/dist/metadata-cache.js.map +1 -1
  64. package/node_modules/pi-mcp-adapter/dist/package-mcp-loader.js +5 -17
  65. package/node_modules/pi-mcp-adapter/dist/package-mcp-loader.js.map +1 -1
  66. package/node_modules/pi-mcp-adapter/dist/types.d.ts +30 -4
  67. package/node_modules/pi-mcp-adapter/dist/types.js +26 -0
  68. package/node_modules/pi-mcp-adapter/dist/types.js.map +1 -1
  69. package/node_modules/pi-mcp-adapter/dist/utils.d.ts +6 -0
  70. package/node_modules/pi-mcp-adapter/dist/utils.js +65 -6
  71. package/node_modules/pi-mcp-adapter/dist/utils.js.map +1 -1
  72. package/node_modules/pi-mcp-adapter/host-html-template.ts +20 -19
  73. package/node_modules/pi-mcp-adapter/http-ca.ts +84 -0
  74. package/node_modules/pi-mcp-adapter/index.ts +827 -164
  75. package/node_modules/pi-mcp-adapter/init.ts +48 -10
  76. package/node_modules/pi-mcp-adapter/lazy-loader.ts +7 -0
  77. package/node_modules/pi-mcp-adapter/mcp-auth-fetch.ts +113 -0
  78. package/node_modules/pi-mcp-adapter/mcp-auth-flow.ts +256 -77
  79. package/node_modules/pi-mcp-adapter/mcp-auth.ts +316 -54
  80. package/node_modules/pi-mcp-adapter/mcp-code.ts +45 -18
  81. package/node_modules/pi-mcp-adapter/mcp-install.ts +60 -0
  82. package/node_modules/pi-mcp-adapter/mcp-oauth-provider.ts +70 -6
  83. package/node_modules/pi-mcp-adapter/mcp-output-guard.ts +53 -42
  84. package/node_modules/pi-mcp-adapter/mcp-panel-theme.ts +104 -0
  85. package/node_modules/pi-mcp-adapter/mcp-panel.ts +366 -332
  86. package/node_modules/pi-mcp-adapter/mcp-references.ts +9 -14
  87. package/node_modules/pi-mcp-adapter/mcp-script-worker.mjs +3 -1
  88. package/node_modules/pi-mcp-adapter/mcp-setup-panel.ts +383 -341
  89. package/node_modules/pi-mcp-adapter/mcp-status.ts +5 -0
  90. package/node_modules/pi-mcp-adapter/metadata-cache.ts +7 -16
  91. package/node_modules/pi-mcp-adapter/namespace-tools.ts +61 -3
  92. package/node_modules/pi-mcp-adapter/oauth.ts +6 -2
  93. package/node_modules/pi-mcp-adapter/package-mcp-loader.ts +5 -17
  94. package/node_modules/pi-mcp-adapter/package.json +13 -3
  95. package/node_modules/pi-mcp-adapter/prompts.ts +35 -3
  96. package/node_modules/pi-mcp-adapter/proxy-modes.ts +108 -7
  97. package/node_modules/pi-mcp-adapter/runtime-owner.ts +16 -1
  98. package/node_modules/pi-mcp-adapter/sampling-handler.ts +9 -32
  99. package/node_modules/pi-mcp-adapter/sandbox-proxy-template.ts +20 -93
  100. package/node_modules/pi-mcp-adapter/server-manager.ts +227 -40
  101. package/node_modules/pi-mcp-adapter/session-approvals.ts +187 -0
  102. package/node_modules/pi-mcp-adapter/skills/mcp-scripting/SKILL.md +9 -1
  103. package/node_modules/pi-mcp-adapter/state.ts +10 -1
  104. package/node_modules/pi-mcp-adapter/tool-approval.ts +10 -22
  105. package/node_modules/pi-mcp-adapter/tool-metadata.ts +14 -0
  106. package/node_modules/pi-mcp-adapter/types.ts +57 -4
  107. package/node_modules/pi-mcp-adapter/ui-server.ts +36 -28
  108. package/node_modules/pi-mcp-adapter/utils.ts +64 -6
  109. package/package.json +12 -15
@@ -1,9 +1,50 @@
1
1
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
2
  import { spawnSync } from "node:child_process";
3
+ import { existsSync, realpathSync } from "node:fs";
3
4
  import { homedir, platform } from "node:os";
4
- import { extname, isAbsolute, join } from "node:path";
5
+ import { dirname, extname, isAbsolute, join, relative, resolve, sep } from "node:path";
6
+ import stripJsonComments from "strip-json-comments";
5
7
  import type { McpConfig, ServerEntry } from "./types.ts";
6
8
 
9
+ export function parseJsonWithComments(raw: string): unknown {
10
+ return JSON.parse(stripJsonComments(raw, { trailingCommas: true }));
11
+ }
12
+
13
+ /** Resolve a candidate only when its real path stays within the real root. */
14
+ export function resolveRealContainedPath(root: string, candidate: string, allowMissing = false): string | null {
15
+ const contained = resolveContainedPath(root, candidate);
16
+ if (!contained) return null;
17
+ const canonical = (path: string): string => {
18
+ let existing = path;
19
+ while (allowMissing && !existsSync(existing)) {
20
+ const parent = dirname(existing);
21
+ if (parent === existing) throw new Error("No existing path ancestor");
22
+ existing = parent;
23
+ }
24
+ return resolve(realpathSync(existing), relative(existing, path));
25
+ };
26
+ try {
27
+ return resolveContainedPath(canonical(root), canonical(contained));
28
+ } catch {
29
+ return null;
30
+ }
31
+ }
32
+
33
+ export function resolveContainedPath(root: string, candidate: string): string | null {
34
+ const resolved = resolve(root, candidate);
35
+ const rel = relative(root, resolved);
36
+ return rel === "" || (!rel.startsWith("..") && !rel.startsWith(sep) && !isAbsolute(rel)) ? resolved : null;
37
+ }
38
+
39
+ export function stableStringify(value: unknown): string {
40
+ if (value === null || typeof value !== "object") return JSON.stringify(value) ?? "undefined";
41
+ if (Array.isArray(value)) {
42
+ return `[${value.map(item => stableStringify(item)).join(",")}]`;
43
+ }
44
+ const object = value as Record<string, unknown>;
45
+ return `{${Object.keys(object).sort().map(key => `${JSON.stringify(key)}:${stableStringify(object[key])}`).join(",")}}`;
46
+ }
47
+
7
48
  async function execOpen(pi: ExtensionAPI, target: string, browser?: string, signal?: AbortSignal) {
8
49
  const os = platform();
9
50
 
@@ -64,11 +105,28 @@ export async function parallelLimit<T, R>(
64
105
  }
65
106
 
66
107
  export function getConfigPathFromArgv(): string | undefined {
67
- const idx = process.argv.indexOf("--mcp-config");
68
- if (idx >= 0 && idx + 1 < process.argv.length) {
69
- return process.argv[idx + 1];
108
+ let configPath: string | undefined;
109
+ for (let index = 2; index < process.argv.length; index++) {
110
+ const arg = process.argv[index];
111
+ if (arg === undefined) continue;
112
+ if (arg === "--") break;
113
+
114
+ if (arg === "--mcp-config") {
115
+ const value = process.argv[index + 1];
116
+ if (value !== undefined && !value.startsWith("-") && !value.startsWith("@")) {
117
+ configPath = value;
118
+ index++;
119
+ } else {
120
+ configPath = undefined;
121
+ }
122
+ continue;
123
+ }
124
+
125
+ if (arg.startsWith("--mcp-config=")) {
126
+ configPath = arg.slice("--mcp-config=".length);
127
+ }
70
128
  }
71
- return undefined;
129
+ return configPath;
72
130
  }
73
131
 
74
132
  export function interpolateEnvVars(value: string): string;
@@ -80,7 +138,7 @@ export function interpolateEnvVars(value: string, environment: NodeJS.ProcessEnv
80
138
  .replace(/\{env:(\w+)\}/g, (_, name) => environment[name] ?? "");
81
139
  }
82
140
 
83
- function getMissingEnvVars(value: string, environment: NodeJS.ProcessEnv): string[] {
141
+ export function getMissingEnvVars(value: string, environment: NodeJS.ProcessEnv = process.env): string[] {
84
142
  const missing = new Set<string>();
85
143
  for (const match of value.matchAll(/\$\{(\w+)\}|\$env:(\w+)|\{env:(\w+)\}/g)) {
86
144
  const name = match[1] ?? match[2] ?? match[3];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@herbertgao/pi-extensions",
3
- "version": "2026.9.4",
3
+ "version": "2026.9.5",
4
4
  "description": "Aggregate installer for HerbertGao-maintained Pi extensions.",
5
5
  "keywords": [
6
6
  "extensions",
@@ -38,18 +38,16 @@
38
38
  "@ast-grep/cli": "^0.45.0",
39
39
  "@ast-grep/napi": "^0.45.0",
40
40
  "@czottmann/pi-automode": "1.16.0",
41
- "@dietrichgebert/ponytail": "4.9.0",
41
+ "@dietrichgebert/ponytail": "4.10.0",
42
42
  "@earendil-works/pi-coding-agent": "^0.84.4",
43
43
  "@earendil-works/pi-tui": "^0.84.4",
44
- "@effect/platform-node": "4.0.0-beta.103",
45
- "@effect/platform-node-shared": "4.0.0-beta.103",
46
44
  "@herbertgao/pi-bark": "0.1.0",
47
- "@herbertgao/pi-cc-extensions": "0.9.1",
45
+ "@herbertgao/pi-cc-extensions": "0.9.2",
48
46
  "@herbertgao/pi-subagents": "0.17.1",
49
47
  "@herbertgao/resume-from": "0.2.0",
50
48
  "@herbertgao/sol-pi": "0.2.0",
51
- "@juicesharp/rpiv-ask-user-question": "2.9.0",
52
- "@juicesharp/rpiv-config": "^2.9.0",
49
+ "@juicesharp/rpiv-ask-user-question": "2.10.1",
50
+ "@juicesharp/rpiv-config": "^2.10.1",
53
51
  "@luxusai/pi-hindsight": "0.12.0",
54
52
  "@modelcontextprotocol/client": "2.0.0",
55
53
  "@modelcontextprotocol/core": "2.0.0",
@@ -61,15 +59,15 @@
61
59
  "@narumitw/pi-caffeinate": "0.49.7",
62
60
  "@narumitw/pi-tui-kit": "^0.59.0",
63
61
  "@noble/ed25519": "^3.1.0",
64
- "@pi-plugins/fast-mode": "0.1.11",
62
+ "@pi-plugins/fast-mode": "0.1.12",
65
63
  "@shikijs/cli": "^4.0.2",
66
64
  "@sinclair/typebox": "^0.34.49",
67
- "@tifan/pi-copy-response": "0.2.6",
65
+ "@tifan/pi-copy-response": "0.2.7",
68
66
  "@tifan/pi-handoff": "2.2.1",
69
- "@tifan/pi-inline-skills": "1.0.5",
70
- "@tifan/pi-mermaid-open": "0.2.0",
71
- "@tifan/pi-preferred-thinking": "1.0.1",
72
- "@tifan/pi-recap": "0.4.6",
67
+ "@tifan/pi-inline-skills": "1.0.6",
68
+ "@tifan/pi-mermaid-open": "0.2.1",
69
+ "@tifan/pi-preferred-thinking": "1.0.2",
70
+ "@tifan/pi-recap": "0.4.7",
73
71
  "@tifan/pi-rename": "0.6.0",
74
72
  "@vectorize-io/hindsight-client": "^0.9.0",
75
73
  "ajv": "^8.17.1",
@@ -79,7 +77,6 @@
79
77
  "cross-spawn": "^7.0.6",
80
78
  "dbus-native": "^0.15.2",
81
79
  "defuddle": "0.19.3",
82
- "effect": "4.0.0-beta.103",
83
80
  "gpt-tokenizer": "^3.4.0",
84
81
  "grok-mermaid": "0.2.2",
85
82
  "jiti": "^2.7.0",
@@ -93,7 +90,7 @@
93
90
  "pi-antigravity": "0.7.2",
94
91
  "pi-footer": "0.5.1",
95
92
  "pi-lens": "4.1.6",
96
- "pi-mcp-adapter": "2.32.1",
93
+ "pi-mcp-adapter": "2.34.0",
97
94
  "pi-web-access": "0.29.0",
98
95
  "pidusage": "^4.0.1",
99
96
  "promise.try": "^2.0.1",