my-pi 0.2.5 → 0.2.7
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/README.md +1 -0
- package/dist/api.d.ts +17 -0
- package/dist/api.js +1 -1
- package/dist/{builtin-registry-D0Y9F9lN.js → builtin-registry-J_3v0ksc.js} +23 -1
- package/dist/builtin-registry-J_3v0ksc.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +11 -10
- package/dist/builtin-registry-D0Y9F9lN.js.map +0 -1
package/README.md
CHANGED
|
@@ -222,6 +222,7 @@ Full package list here:
|
|
|
222
222
|
| [`@spences10/pi-harness`](./packages/pi-harness/README.md) | Ephemeral task harness runtime |
|
|
223
223
|
| [`@spences10/pi-skills`](./packages/pi-skills/README.md) | Skill management, import, and sync |
|
|
224
224
|
| [`@spences10/pi-sqlite-tools`](./packages/pi-sqlite-tools/README.md) | `mcp-sqlite-tools` reminder for safer SQLite database work |
|
|
225
|
+
| [`@spences10/pi-starfield`](./packages/pi-starfield/README.md) | Twinkling stars in the input editor |
|
|
225
226
|
| [`@spences10/pi-svelte-guardrails`](./packages/pi-svelte-guardrails/README.md) | Svelte pattern guardrails |
|
|
226
227
|
| [`@spences10/pi-team-mode`](./packages/pi-team-mode/README.md) | Peer-session coordination and durable mailboxes |
|
|
227
228
|
| [`@spences10/pi-telemetry`](./packages/pi-telemetry/README.md) | Local SQLite telemetry and `/telemetry` |
|
package/dist/api.d.ts
CHANGED
|
@@ -239,6 +239,23 @@ declare const BUILTIN_EXTENSION_REGISTRY: readonly [{
|
|
|
239
239
|
readonly aliases: readonly ["sqlite-tools", "sqlite", "mcp-sqlite-tools"];
|
|
240
240
|
readonly external_package_name: '@spences10/pi-sqlite-tools';
|
|
241
241
|
readonly load: () => Promise<typeof import("@spences10/pi-sqlite-tools").default>;
|
|
242
|
+
}, {
|
|
243
|
+
readonly key: 'starfield';
|
|
244
|
+
readonly label: 'Starfield';
|
|
245
|
+
readonly docs_label: 'Starfield';
|
|
246
|
+
readonly description: 'Subtle twinkling stars in the input editor';
|
|
247
|
+
readonly default_enabled: true;
|
|
248
|
+
readonly option_name: 'starfield';
|
|
249
|
+
readonly cli_arg: 'no-starfield';
|
|
250
|
+
readonly cli_flag: '--no-starfield';
|
|
251
|
+
readonly cli_description: 'Disable the input star field';
|
|
252
|
+
readonly aliases: readonly ["starfield", "stars"];
|
|
253
|
+
readonly external_package_name: '@spences10/pi-starfield';
|
|
254
|
+
readonly mode_constraints: {
|
|
255
|
+
readonly disabled_in: readonly ["print", "json", "rpc"];
|
|
256
|
+
readonly reason: 'Starfield only renders in the interactive TUI';
|
|
257
|
+
};
|
|
258
|
+
readonly load: () => Promise<typeof import("@spences10/pi-starfield").default>;
|
|
242
259
|
}, {
|
|
243
260
|
readonly key: 'startup-screen';
|
|
244
261
|
readonly label: 'Startup screen';
|
package/dist/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as BUILTIN_EXTENSION_REGISTRY, t as BUILTIN_EXTENSIONS } from "./builtin-registry-
|
|
1
|
+
import { n as BUILTIN_EXTENSION_REGISTRY, t as BUILTIN_EXTENSIONS } from "./builtin-registry-J_3v0ksc.js";
|
|
2
2
|
import { n as save_settings, t as load_settings } from "./settings-BCn3P9qH.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { existsSync, readdirSync } from "node:fs";
|
|
@@ -283,6 +283,28 @@ const BUILTIN_EXTENSION_REGISTRY = [
|
|
|
283
283
|
external_package_name: "@spences10/pi-sqlite-tools",
|
|
284
284
|
load: async () => (await import("@spences10/pi-sqlite-tools")).default
|
|
285
285
|
},
|
|
286
|
+
{
|
|
287
|
+
key: "starfield",
|
|
288
|
+
label: "Starfield",
|
|
289
|
+
docs_label: "Starfield",
|
|
290
|
+
description: "Subtle twinkling stars in the input editor",
|
|
291
|
+
default_enabled: true,
|
|
292
|
+
option_name: "starfield",
|
|
293
|
+
cli_arg: "no-starfield",
|
|
294
|
+
cli_flag: "--no-starfield",
|
|
295
|
+
cli_description: "Disable the input star field",
|
|
296
|
+
aliases: ["starfield", "stars"],
|
|
297
|
+
external_package_name: "@spences10/pi-starfield",
|
|
298
|
+
mode_constraints: {
|
|
299
|
+
disabled_in: [
|
|
300
|
+
"print",
|
|
301
|
+
"json",
|
|
302
|
+
"rpc"
|
|
303
|
+
],
|
|
304
|
+
reason: "Starfield only renders in the interactive TUI"
|
|
305
|
+
},
|
|
306
|
+
load: async () => (await import("@spences10/pi-starfield")).default
|
|
307
|
+
},
|
|
286
308
|
{
|
|
287
309
|
key: "startup-screen",
|
|
288
310
|
label: "Startup screen",
|
|
@@ -512,4 +534,4 @@ const BUILTIN_EXTENSIONS = BUILTIN_EXTENSION_REGISTRY.map(({ load: _load, ...ext
|
|
|
512
534
|
//#endregion
|
|
513
535
|
export { BUILTIN_EXTENSION_REGISTRY as n, BUILTIN_EXTENSIONS as t };
|
|
514
536
|
|
|
515
|
-
//# sourceMappingURL=builtin-registry-
|
|
537
|
+
//# sourceMappingURL=builtin-registry-J_3v0ksc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builtin-registry-J_3v0ksc.js","names":[],"sources":["../src/extensions/builtin-registry.ts"],"sourcesContent":["import type { ExtensionFactory } from '@earendil-works/pi-coding-agent';\n\nexport type BuiltinExtensionRuntimeMode =\n\t| 'interactive'\n\t| 'print'\n\t| 'json'\n\t| 'rpc';\n\ntype BuiltinExtensionLoader = () => Promise<ExtensionFactory>;\n\nexport interface BuiltinExtensionManifestEntry {\n\tkey: string;\n\tlabel: string;\n\tdocs_label: string;\n\tdescription: string;\n\tdefault_enabled: boolean;\n\toption_name: string;\n\tcli_arg: string;\n\tcli_flag: `--${string}`;\n\tcli_description: string;\n\taliases: readonly string[];\n\tmode_constraints?: {\n\t\tdisabled_in: readonly BuiltinExtensionRuntimeMode[];\n\t\treason: string;\n\t};\n\texternal_package_name?: string;\n\tload: BuiltinExtensionLoader;\n}\n\nexport const BUILTIN_EXTENSION_REGISTRY = [\n\t{\n\t\tkey: 'context-sidecar',\n\t\tlabel: 'Context sidecar',\n\t\tdocs_label: 'SQLite context sidecar',\n\t\tdescription: 'Local SQLite FTS sidecar for oversized tool output',\n\t\tdefault_enabled: true,\n\t\toption_name: 'context_sidecar',\n\t\tcli_arg: 'no-context-sidecar',\n\t\tcli_flag: '--no-context-sidecar',\n\t\tcli_description:\n\t\t\t'Disable SQLite context sidecar for large tool output',\n\t\taliases: ['context-sidecar', 'context', 'sidecar'],\n\t\texternal_package_name: '@spences10/pi-context',\n\t\tload: async () => (await import('@spences10/pi-context')).default,\n\t},\n\t{\n\t\tkey: 'mcp',\n\t\tlabel: 'MCP',\n\t\tdocs_label: 'MCP',\n\t\tdescription: 'MCP server integration and /mcp command',\n\t\tdefault_enabled: true,\n\t\toption_name: 'mcp',\n\t\tcli_arg: 'no-mcp',\n\t\tcli_flag: '--no-mcp',\n\t\tcli_description: 'Disable built-in MCP extension',\n\t\taliases: ['mcp'],\n\t\texternal_package_name: '@spences10/pi-mcp',\n\t\tload: async () => (await import('@spences10/pi-mcp')).default,\n\t},\n\t{\n\t\tkey: 'openrouter-fusion-config',\n\t\tlabel: 'OpenRouter Fusion config',\n\t\tdocs_label: 'OpenRouter Fusion config guard',\n\t\tdescription:\n\t\t\t'Keeps OpenRouter Fusion off Anthropic by injecting a non-Anthropic panel and judge',\n\t\tdefault_enabled: true,\n\t\toption_name: 'openrouter_fusion_config',\n\t\tcli_arg: 'no-openrouter-fusion-config',\n\t\tcli_flag: '--no-openrouter-fusion-config',\n\t\tcli_description: 'Disable OpenRouter Fusion non-Anthropic config',\n\t\taliases: ['openrouter-fusion-config', 'fusion-budget'],\n\t\tload: async () =>\n\t\t\t(await import('./openrouter-fusion-config/index.js')).default,\n\t},\n\t{\n\t\tkey: 'umans-provider',\n\t\tlabel: 'Umans provider',\n\t\tdocs_label: 'Umans provider',\n\t\tdescription:\n\t\t\t'Umans.ai Anthropic Messages provider with API key login support',\n\t\tdefault_enabled: true,\n\t\toption_name: 'umans_provider',\n\t\tcli_arg: 'no-umans-provider',\n\t\tcli_flag: '--no-umans-provider',\n\t\tcli_description: 'Disable built-in Umans provider',\n\t\taliases: ['umans-provider', 'umans'],\n\t\tload: async () =>\n\t\t\t(await import('./umans-provider/index.js')).default,\n\t},\n\t{\n\t\tkey: 'footer',\n\t\tlabel: 'Footer',\n\t\tdocs_label: 'Footer',\n\t\tdescription: 'Configurable interactive footer/statusline',\n\t\tdefault_enabled: true,\n\t\toption_name: 'footer',\n\t\tcli_arg: 'no-footer',\n\t\tcli_flag: '--no-footer',\n\t\tcli_description: 'Disable custom footer/statusline',\n\t\taliases: ['footer', 'statusline', 'status-line'],\n\t\tmode_constraints: {\n\t\t\tdisabled_in: ['print', 'json', 'rpc'],\n\t\t\treason: 'Footer only renders in the interactive TUI',\n\t\t},\n\t\tload: async () => (await import('./footer/index.js')).default,\n\t},\n\t{\n\t\tkey: 'codex-usage',\n\t\tlabel: 'Codex usage',\n\t\tdocs_label: 'Codex usage status',\n\t\tdescription: 'OpenAI Codex usage status for the footer',\n\t\tdefault_enabled: true,\n\t\toption_name: 'codex_usage',\n\t\tcli_arg: 'no-codex-usage',\n\t\tcli_flag: '--no-codex-usage',\n\t\tcli_description: 'Disable Codex usage footer status',\n\t\taliases: ['codex-usage', 'codex-status'],\n\t\texternal_package_name: '@spences10/pi-codex-usage',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-codex-usage')).default,\n\t},\n\t{\n\t\tkey: 'kimi-usage',\n\t\tlabel: 'Kimi usage',\n\t\tdocs_label: 'Kimi usage status',\n\t\tdescription: 'Kimi For Coding usage status for the footer',\n\t\tdefault_enabled: true,\n\t\toption_name: 'kimi_usage',\n\t\tcli_arg: 'no-kimi-usage',\n\t\tcli_flag: '--no-kimi-usage',\n\t\tcli_description: 'Disable Kimi usage footer status',\n\t\taliases: ['kimi-usage', 'kimi-status'],\n\t\texternal_package_name: '@spences10/pi-kimi-usage',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-kimi-usage')).default,\n\t},\n\t{\n\t\tkey: 'harness',\n\t\tlabel: 'Harness',\n\t\tdocs_label: 'Task harness runtime',\n\t\tdescription:\n\t\t\t'Ephemeral /tmp task harness runtime with tools, enforcement, and bundled skills',\n\t\tdefault_enabled: true,\n\t\toption_name: 'harness',\n\t\tcli_arg: 'no-harness',\n\t\tcli_flag: '--no-harness',\n\t\tcli_description: 'Disable task harness runtime',\n\t\taliases: ['harness', 'task-harness'],\n\t\texternal_package_name: '@spences10/pi-harness',\n\t\tload: async () => (await import('@spences10/pi-harness')).default,\n\t},\n\t{\n\t\tkey: 'factory',\n\t\tlabel: 'Software factory (experimental)',\n\t\tdocs_label: 'Experimental software-factory control plane',\n\t\tdescription:\n\t\t\t'Paused experimental workflow control plane; enable explicitly for Factory v1 evaluation only',\n\t\tdefault_enabled: false,\n\t\toption_name: 'factory',\n\t\tcli_arg: 'no-factory',\n\t\tcli_flag: '--no-factory',\n\t\tcli_description: 'Disable software-factory control plane',\n\t\taliases: ['factory', 'software-factory', 'control-plane'],\n\t\texternal_package_name: '@spences10/pi-factory',\n\t\tload: async () => (await import('@spences10/pi-factory')).default,\n\t},\n\t{\n\t\tkey: 'skills',\n\t\tlabel: 'Skills',\n\t\tdocs_label: 'Skills',\n\t\tdescription: 'Managed pi-native skills and /skills command',\n\t\tdefault_enabled: true,\n\t\toption_name: 'skills',\n\t\tcli_arg: 'no-skills',\n\t\tcli_flag: '--no-skills',\n\t\tcli_description: 'Disable built-in skills extension',\n\t\taliases: ['skills', 'skill'],\n\t\texternal_package_name: '@spences10/pi-skills',\n\t\tload: async () => (await import('@spences10/pi-skills')).default,\n\t},\n\t{\n\t\tkey: 'skill-importer',\n\t\tlabel: 'Skill importer',\n\t\tdocs_label: 'Skill importer',\n\t\tdescription:\n\t\t\t'Import external Claude/plugin skills into Pi-native storage',\n\t\tdefault_enabled: true,\n\t\toption_name: 'skill_importer',\n\t\tcli_arg: 'no-skill-importer',\n\t\tcli_flag: '--no-skill-importer',\n\t\tcli_description: 'Disable external skill importer extension',\n\t\taliases: ['skill-importer', 'import-skills', 'skill-import'],\n\t\texternal_package_name: '@spences10/pi-skill-importer',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-skill-importer')).default,\n\t},\n\t{\n\t\tkey: 'filter-output',\n\t\tlabel: 'Secret redaction',\n\t\tdocs_label: 'Secret redaction',\n\t\tdescription:\n\t\t\t'Redacts secrets from tool output before the model sees them',\n\t\tdefault_enabled: true,\n\t\toption_name: 'filter_output',\n\t\tcli_arg: 'no-filter',\n\t\tcli_flag: '--no-filter',\n\t\tcli_description: 'Disable secret redaction in tool output',\n\t\taliases: [\n\t\t\t'filter-output',\n\t\t\t'filter_output',\n\t\t\t'filter',\n\t\t\t'redaction',\n\t\t\t'secret-redaction',\n\t\t\t'output-redaction',\n\t\t],\n\t\texternal_package_name: '@spences10/pi-redact',\n\t\tload: async () => (await import('@spences10/pi-redact')).default,\n\t},\n\t{\n\t\tkey: 'recall',\n\t\tlabel: 'Recall',\n\t\tdocs_label: 'Recall',\n\t\tdescription: 'pirecall reminder and background session sync',\n\t\tdefault_enabled: true,\n\t\toption_name: 'recall',\n\t\tcli_arg: 'no-recall',\n\t\tcli_flag: '--no-recall',\n\t\tcli_description: 'Disable recall extension',\n\t\taliases: ['recall', 'pirecall'],\n\t\texternal_package_name: '@spences10/pi-recall',\n\t\tload: async () => (await import('@spences10/pi-recall')).default,\n\t},\n\t{\n\t\tkey: 'nopeek',\n\t\tlabel: 'Nopeek',\n\t\tdocs_label: 'Nopeek',\n\t\tdescription:\n\t\t\t'nopeek reminder for secret-safe environment loading',\n\t\tdefault_enabled: true,\n\t\toption_name: 'nopeek',\n\t\tcli_arg: 'no-nopeek',\n\t\tcli_flag: '--no-nopeek',\n\t\tcli_description: 'Disable nopeek reminder extension',\n\t\taliases: ['nopeek', 'secrets', 'secret-loading'],\n\t\texternal_package_name: '@spences10/pi-nopeek',\n\t\tload: async () => (await import('@spences10/pi-nopeek')).default,\n\t},\n\t{\n\t\tkey: 'observability',\n\t\tlabel: 'Observability',\n\t\tdocs_label: 'Live observability',\n\t\tdescription:\n\t\t\t'Optional live event stream and local browser dashboard',\n\t\tdefault_enabled: true,\n\t\toption_name: 'observability',\n\t\tcli_arg: 'no-observability',\n\t\tcli_flag: '--no-observability',\n\t\tcli_description: 'Disable live observability extension',\n\t\taliases: ['observability', 'obs', 'live-events'],\n\t\texternal_package_name: '@spences10/pi-observability',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-observability')).default,\n\t},\n\t{\n\t\tkey: 'omnisearch',\n\t\tlabel: 'Omnisearch',\n\t\tdocs_label: 'Omnisearch',\n\t\tdescription: 'mcp-omnisearch reminder for verified web research',\n\t\tdefault_enabled: true,\n\t\toption_name: 'omnisearch',\n\t\tcli_arg: 'no-omnisearch',\n\t\tcli_flag: '--no-omnisearch',\n\t\tcli_description: 'Disable mcp-omnisearch reminder extension',\n\t\taliases: ['omnisearch', 'search', 'web-search', 'research'],\n\t\texternal_package_name: '@spences10/pi-omnisearch',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-omnisearch')).default,\n\t},\n\t{\n\t\tkey: 'sqlite-tools',\n\t\tlabel: 'SQLite tools',\n\t\tdocs_label: 'SQLite tools',\n\t\tdescription:\n\t\t\t'mcp-sqlite-tools reminder for safer SQLite database work',\n\t\tdefault_enabled: true,\n\t\toption_name: 'sqlite_tools',\n\t\tcli_arg: 'no-sqlite-tools',\n\t\tcli_flag: '--no-sqlite-tools',\n\t\tcli_description: 'Disable mcp-sqlite-tools reminder extension',\n\t\taliases: ['sqlite-tools', 'sqlite', 'mcp-sqlite-tools'],\n\t\texternal_package_name: '@spences10/pi-sqlite-tools',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-sqlite-tools')).default,\n\t},\n\t{\n\t\tkey: 'starfield',\n\t\tlabel: 'Starfield',\n\t\tdocs_label: 'Starfield',\n\t\tdescription: 'Subtle twinkling stars in the input editor',\n\t\tdefault_enabled: true,\n\t\toption_name: 'starfield',\n\t\tcli_arg: 'no-starfield',\n\t\tcli_flag: '--no-starfield',\n\t\tcli_description: 'Disable the input star field',\n\t\taliases: ['starfield', 'stars'],\n\t\texternal_package_name: '@spences10/pi-starfield',\n\t\tmode_constraints: {\n\t\t\tdisabled_in: ['print', 'json', 'rpc'],\n\t\t\treason: 'Starfield only renders in the interactive TUI',\n\t\t},\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-starfield')).default,\n\t},\n\t{\n\t\tkey: 'startup-screen',\n\t\tlabel: 'Startup screen',\n\t\tdocs_label: 'Startup screen',\n\t\tdescription:\n\t\t\t'Pixel-art gradient startup header for interactive sessions',\n\t\tdefault_enabled: true,\n\t\toption_name: 'startup_screen',\n\t\tcli_arg: 'no-startup-screen',\n\t\tcli_flag: '--no-startup-screen',\n\t\tcli_description: 'Disable the custom startup screen',\n\t\taliases: ['startup-screen', 'startup', 'header', 'splash'],\n\t\tmode_constraints: {\n\t\t\tdisabled_in: ['print', 'json', 'rpc'],\n\t\t\treason: 'Startup screen only renders in the interactive TUI',\n\t\t},\n\t\tload: async () =>\n\t\t\t(await import('./startup-screen/index.js')).default,\n\t},\n\t{\n\t\tkey: 'prompt-presets',\n\t\tlabel: 'Prompt presets',\n\t\tdocs_label: 'Prompt presets',\n\t\tdescription:\n\t\t\t'Runtime prompt preset selection and /prompt-preset command',\n\t\tdefault_enabled: true,\n\t\toption_name: 'prompt_presets',\n\t\tcli_arg: 'no-prompt-presets',\n\t\tcli_flag: '--no-prompt-presets',\n\t\tcli_description: 'Disable prompt presets extension',\n\t\taliases: ['prompt-preset', 'preset', 'presets'],\n\t\tload: async () =>\n\t\t\t(await import('./prompt-presets/index.js')).default,\n\t},\n\t{\n\t\tkey: 'turn-timer',\n\t\tlabel: 'Turn timer',\n\t\tdocs_label: 'Turn timer',\n\t\tdescription:\n\t\t\t'Live elapsed timer beside the working spinner with persisted turn durations',\n\t\tdefault_enabled: true,\n\t\toption_name: 'turn_timer',\n\t\tcli_arg: 'no-turn-timer',\n\t\tcli_flag: '--no-turn-timer',\n\t\tcli_description: 'Disable the working spinner turn timer',\n\t\taliases: ['turn-timer', 'timer', 'elapsed-time'],\n\t\tmode_constraints: {\n\t\t\tdisabled_in: ['print', 'json', 'rpc'],\n\t\t\treason: 'The live timer is only useful in the interactive TUI',\n\t\t},\n\t\tload: async () => (await import('./turn-timer/index.js')).default,\n\t},\n\t{\n\t\tkey: 'git-ui',\n\t\tlabel: 'Git UI',\n\t\tdocs_label: 'Git staging UI',\n\t\tdescription: 'Interactive source control staging panel',\n\t\tdefault_enabled: true,\n\t\toption_name: 'git_ui',\n\t\tcli_arg: 'no-git-ui',\n\t\tcli_flag: '--no-git-ui',\n\t\tcli_description: 'Disable built-in Git staging UI',\n\t\taliases: ['git-ui', 'git', 'source-control', 'scm'],\n\t\tmode_constraints: {\n\t\t\tdisabled_in: ['print', 'json', 'rpc'],\n\t\t\treason: 'Git UI is only useful in interactive mode',\n\t\t},\n\t\texternal_package_name: '@spences10/pi-git-ui',\n\t\tload: async () => (await import('@spences10/pi-git-ui')).default,\n\t},\n\t{\n\t\tkey: 'lsp',\n\t\tlabel: 'LSP',\n\t\tdocs_label: 'LSP',\n\t\tdescription:\n\t\t\t'Language Server Protocol tools (diagnostics, hover, definition, references)',\n\t\tdefault_enabled: true,\n\t\toption_name: 'lsp',\n\t\tcli_arg: 'no-lsp',\n\t\tcli_flag: '--no-lsp',\n\t\tcli_description: 'Disable LSP extension',\n\t\taliases: ['lsp', 'language-server'],\n\t\texternal_package_name: '@spences10/pi-lsp',\n\t\tload: async () => (await import('@spences10/pi-lsp')).default,\n\t},\n\t{\n\t\tkey: 'session-name',\n\t\tlabel: 'Session name',\n\t\tdocs_label: 'Session auto-naming',\n\t\tdescription:\n\t\t\t'AI-powered session auto-naming and /session-name command',\n\t\tdefault_enabled: true,\n\t\toption_name: 'session_name',\n\t\tcli_arg: 'no-session-name',\n\t\tcli_flag: '--no-session-name',\n\t\tcli_description: 'Disable session name extension',\n\t\taliases: ['session-name', 'session', 'auto-name'],\n\t\tmode_constraints: {\n\t\t\tdisabled_in: ['print', 'json', 'rpc'],\n\t\t\treason:\n\t\t\t\t'UI-only session naming is only useful in interactive mode',\n\t\t},\n\t\tload: async () =>\n\t\t\t(await import('./session-name/index.js')).default,\n\t},\n\t{\n\t\tkey: 'confirm-destructive',\n\t\tlabel: 'Confirm destructive',\n\t\tdocs_label: 'Destructive action confirmation',\n\t\tdescription:\n\t\t\t'Prompt before destructive tool calls like file deletes, overwrites, and hard resets',\n\t\tdefault_enabled: true,\n\t\toption_name: 'confirm_destructive',\n\t\tcli_arg: 'no-confirm-destructive',\n\t\tcli_flag: '--no-confirm-destructive',\n\t\tcli_description: 'Disable destructive action confirmations',\n\t\taliases: ['confirm-destructive', 'confirm'],\n\t\texternal_package_name: '@spences10/pi-confirm-destructive',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-confirm-destructive')).default,\n\t},\n\t{\n\t\tkey: 'hooks-resolution',\n\t\tlabel: 'Hooks resolution',\n\t\tdocs_label: 'Hooks resolution',\n\t\tdescription:\n\t\t\t'Claude Code style PreToolUse and PostToolUse hook compatibility from .claude, .rulesync, and .pi configs',\n\t\tdefault_enabled: true,\n\t\toption_name: 'hooks_resolution',\n\t\tcli_arg: 'no-hooks',\n\t\tcli_flag: '--no-hooks',\n\t\tcli_description: 'Disable Claude-style hook execution',\n\t\taliases: ['hooks-resolution', 'hooks'],\n\t\tload: async () =>\n\t\t\t(await import('./hooks-resolution/index.js')).default,\n\t},\n\t{\n\t\tkey: 'svelte-guardrails',\n\t\tlabel: 'Svelte guardrails',\n\t\tdocs_label: 'Svelte guardrails',\n\t\tdescription:\n\t\t\t'Blocks discouraged Svelte patterns like $effect before agents write them',\n\t\tdefault_enabled: true,\n\t\toption_name: 'svelte_guardrails',\n\t\tcli_arg: 'no-svelte-guardrails',\n\t\tcli_flag: '--no-svelte-guardrails',\n\t\tcli_description: 'Disable Svelte guardrails',\n\t\taliases: ['svelte-guardrails', 'svelte'],\n\t\texternal_package_name: '@spences10/pi-svelte-guardrails',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-svelte-guardrails')).default,\n\t},\n\t{\n\t\tkey: 'coding-preferences',\n\t\tlabel: 'Coding preferences',\n\t\tdocs_label: 'Coding preferences',\n\t\tdescription:\n\t\t\t'Blocks configured coding workflow anti-patterns from JSON preferences',\n\t\tdefault_enabled: true,\n\t\toption_name: 'coding_preferences',\n\t\tcli_arg: 'no-coding-preferences',\n\t\tcli_flag: '--no-coding-preferences',\n\t\tcli_description: 'Disable coding preferences guardrails',\n\t\taliases: ['coding-preferences', 'preferences', 'prefs'],\n\t\texternal_package_name: '@spences10/pi-coding-preferences',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-coding-preferences')).default,\n\t},\n\t{\n\t\tkey: 'handoff',\n\t\tlabel: 'Handoff',\n\t\tdocs_label: 'Handoff',\n\t\tdescription:\n\t\t\t'Help command for Pi continuation primitives like /fork, /tree, /export, /import, and /share',\n\t\tdefault_enabled: true,\n\t\toption_name: 'handoff',\n\t\tcli_arg: 'no-handoff',\n\t\tcli_flag: '--no-handoff',\n\t\tcli_description: 'Disable handoff helper command',\n\t\taliases: ['handoff', 'continuation'],\n\t\tload: async () => (await import('./handoff/index.js')).default,\n\t},\n\t{\n\t\tkey: 'team-mode',\n\t\tlabel: 'Team mode',\n\t\tdocs_label: 'Team mode',\n\t\tdescription:\n\t\t\t'Peer coordination between independently opened Pi sessions with groups, artifacts, and durable mailboxes',\n\t\tdefault_enabled: true,\n\t\toption_name: 'team_mode',\n\t\tcli_arg: 'no-team-mode',\n\t\tcli_flag: '--no-team-mode',\n\t\tcli_description: 'Disable peer-session team mode extension',\n\t\taliases: ['team-mode', 'team', 'teammates'],\n\t\texternal_package_name: '@spences10/pi-team-mode',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-team-mode')).default,\n\t},\n] as const satisfies readonly BuiltinExtensionManifestEntry[];\n\nexport type BuiltinExtensionKey =\n\t(typeof BUILTIN_EXTENSION_REGISTRY)[number]['key'];\n\nexport type BuiltinExtensionOptionName =\n\t(typeof BUILTIN_EXTENSION_REGISTRY)[number]['option_name'];\n\nexport type BuiltinExtensionInfo = Omit<\n\tBuiltinExtensionManifestEntry,\n\t'load'\n> & {\n\tkey: BuiltinExtensionKey;\n\toption_name: BuiltinExtensionOptionName;\n};\n\nexport const BUILTIN_EXTENSIONS: BuiltinExtensionInfo[] =\n\tBUILTIN_EXTENSION_REGISTRY.map(\n\t\t({ load: _load, ...extension }) => extension,\n\t);\n"],"mappings":";AA6BA,MAAa,6BAA6B;CACzC;EACC,KAAK;EACL,OAAO;EACP,YAAY;EACZ,aAAa;EACb,iBAAiB;EACjB,aAAa;EACb,SAAS;EACT,UAAU;EACV,iBACC;EACD,SAAS;GAAC;GAAmB;GAAW;EAAS;EACjD,uBAAuB;EACvB,MAAM,aAAa,MAAM,OAAO,yBAAA,CAA0B;CAC3D;CACA;EACC,KAAK;EACL,OAAO;EACP,YAAY;EACZ,aAAa;EACb,iBAAiB;EACjB,aAAa;EACb,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,SAAS,CAAC,KAAK;EACf,uBAAuB;EACvB,MAAM,aAAa,MAAM,OAAO,qBAAA,CAAsB;CACvD;CACA;EACC,KAAK;EACL,OAAO;EACP,YAAY;EACZ,aACC;EACD,iBAAiB;EACjB,aAAa;EACb,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,SAAS,CAAC,4BAA4B,eAAe;EACrD,MAAM,aACJ,MAAM,OAAO,0CAAA,CAAwC;CACxD;CACA;EACC,KAAK;EACL,OAAO;EACP,YAAY;EACZ,aACC;EACD,iBAAiB;EACjB,aAAa;EACb,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,SAAS,CAAC,kBAAkB,OAAO;EACnC,MAAM,aACJ,MAAM,O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AAoB,OAAO;EACrC,MAAM,aACJ,MAAM,OAAO,kCAAA,CAAgC;CAChD;CACA;EACC,KAAK;EACL,OAAO;EACP,YAAY;EACZ,aACC;EACD,iBAAiB;EACjB,aAAa;EACb,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,SAAS,CAAC,qBAAqB,QAAQ;EACvC,uBAAuB;EACvB,MAAM,aACJ,MAAM,OAAO,mCAAA,CAAoC;CACpD;CACA;EACC,KAAK;EACL,OAAO;EACP,YAAY;EACZ,aACC;EACD,iBAAiB;EACjB,aAAa;EACb,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,SAAS;GAAC;GAAsB;GAAe;EAAO;EACtD,uBAAuB;EACvB,MAAM,aACJ,MAAM,OAAO,oCAAA,CAAqC;CACrD;CACA;EACC,KAAK;EACL,OAAO;EACP,YAAY;EACZ,aACC;EACD,iBAAiB;EACjB,aAAa;EACb,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,SAAS,CAAC,WAAW,cAAc;EACnC,MAAM,aAAa,MAAM,OAAO,yBAAA,CAAuB;CACxD;CACA;EACC,KAAK;EACL,OAAO;EACP,YAAY;EACZ,aACC;EACD,iBAAiB;EACjB,aAAa;EACb,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,SAAS;GAAC;GAAa;GAAQ;EAAW;EAC1C,uBAAuB;EACvB,MAAM,aACJ,MAAM,OAAO,2BAAA,CAA4B;CAC5C;AACD;AAgBA,MAAa,qBACZ,2BAA2B,KACzB,EAAE,MAAM,OAAO,GAAG,gBAAgB,SACpC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as BUILTIN_EXTENSIONS } from "./builtin-registry-
|
|
2
|
+
import { t as BUILTIN_EXTENSIONS } from "./builtin-registry-J_3v0ksc.js";
|
|
3
3
|
import { defineCommand, renderUsage, runMain } from "citty";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -28,7 +28,7 @@ function is_citty_no_flag_set(args, cli_arg) {
|
|
|
28
28
|
}
|
|
29
29
|
function resolve_builtin_extension_options(args) {
|
|
30
30
|
const no_builtin = is_citty_no_flag_set(args, "no-builtin");
|
|
31
|
-
return Object.fromEntries(BUILTIN_EXTENSIONS.map((extension) => [extension.option_name, !no_builtin && !is_citty_no_flag_set(args, extension.cli_arg)]));
|
|
31
|
+
return Object.fromEntries(BUILTIN_EXTENSIONS.map((extension) => [extension.option_name, !no_builtin && !is_citty_no_flag_set(args, extension.cli_arg) && extension.default_enabled]));
|
|
32
32
|
}
|
|
33
33
|
function parse_extension_cli_args(argv, known_args) {
|
|
34
34
|
const known_flags = /* @__PURE__ */ new Map();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/cli-args.ts","../src/runtime-preflight.ts","../src/warnings.ts","../src/index.ts"],"sourcesContent":["import { resolve } from 'node:path';\nimport {\n\tBUILTIN_EXTENSIONS,\n\ttype BuiltinExtensionOptionName,\n} from './extensions/builtin-registry.js';\n\nconst THINKING_LEVELS = new Set([\n\t'off',\n\t'minimal',\n\t'low',\n\t'medium',\n\t'high',\n\t'xhigh',\n]);\n\nexport type CliThinkingLevel =\n\t| 'off'\n\t| 'minimal'\n\t| 'low'\n\t| 'medium'\n\t| 'high'\n\t| 'xhigh';\n\nexport type BuiltinDisableCliArgs = Record<\n\tstring,\n\t{\n\t\ttype: 'boolean';\n\t\tdescription: string;\n\t\tdefault: false;\n\t}\n>;\n\nexport interface CliArgDefinition {\n\ttype: 'boolean' | 'string' | 'enum' | 'positional';\n\talias?: string | readonly string[];\n}\n\nexport type CliArgDefinitions = Record<string, CliArgDefinition>;\n\nexport interface ParsedExtensionCliArgs {\n\textension_flag_values: Map<string, boolean | string>;\n\tpositionals: string[];\n\tdiagnostics: string[];\n}\n\nexport function create_builtin_disable_cli_args(): BuiltinDisableCliArgs {\n\treturn Object.fromEntries(\n\t\tBUILTIN_EXTENSIONS.map((extension) => [\n\t\t\textension.cli_arg,\n\t\t\t{\n\t\t\t\ttype: 'boolean' as const,\n\t\t\t\tdescription: extension.cli_description,\n\t\t\t\tdefault: false as const,\n\t\t\t},\n\t\t]),\n\t);\n}\n\nfunction is_citty_no_flag_set(\n\targs: Record<string, unknown>,\n\tcli_arg: string,\n): boolean {\n\tif (args[cli_arg]) return true;\n\n\tconst positive_kebab = cli_arg.replace(/^no-/, '');\n\tconst positive_camel = positive_kebab.replace(\n\t\t/-([a-z])/g,\n\t\t(_, char) => String(char).toUpperCase(),\n\t);\n\treturn (\n\t\targs[positive_kebab] === false || args[positive_camel] === false\n\t);\n}\n\nexport function resolve_builtin_extension_options(\n\targs: Record<string, unknown>,\n): Partial<Record<BuiltinExtensionOptionName, boolean>> {\n\tconst no_builtin = is_citty_no_flag_set(args, 'no-builtin');\n\treturn Object.fromEntries(\n\t\tBUILTIN_EXTENSIONS.map((extension) => [\n\t\t\textension.option_name,\n\t\t\t!no_builtin && !is_citty_no_flag_set(args, extension.cli_arg),\n\t\t]),\n\t) as Partial<Record<BuiltinExtensionOptionName, boolean>>;\n}\n\nexport function parse_extension_cli_args(\n\targv: string[],\n\tknown_args: CliArgDefinitions,\n): ParsedExtensionCliArgs {\n\tconst known_flags = new Map<string, CliArgDefinition['type']>();\n\tfor (const [name, definition] of Object.entries(known_args)) {\n\t\tknown_flags.set(`--${name}`, definition.type);\n\t\tconst camel_name = name.replace(/-([a-z])/g, (_, char) =>\n\t\t\tString(char).toUpperCase(),\n\t\t);\n\t\tknown_flags.set(`--${camel_name}`, definition.type);\n\t\tif (definition.type === 'boolean')\n\t\t\tknown_flags.set(`--no-${name}`, definition.type);\n\t\tconst aliases = Array.isArray(definition.alias)\n\t\t\t? definition.alias\n\t\t\t: definition.alias\n\t\t\t\t? [definition.alias]\n\t\t\t\t: [];\n\t\tfor (const alias of aliases)\n\t\t\tknown_flags.set(`-${alias}`, definition.type);\n\t}\n\n\tconst extension_flag_values = new Map<string, boolean | string>();\n\tconst positionals: string[] = [];\n\tconst diagnostics: string[] = [];\n\n\tfor (let i = 0; i < argv.length; i++) {\n\t\tconst arg = argv[i];\n\t\tif (!arg) continue;\n\t\tif (arg === '--') {\n\t\t\tpositionals.push(...argv.slice(i + 1));\n\t\t\tbreak;\n\t\t}\n\n\t\tconst equals_index = arg.indexOf('=');\n\t\tconst flag_token =\n\t\t\tequals_index === -1 ? arg : arg.slice(0, equals_index);\n\t\tconst known_type = known_flags.get(flag_token);\n\t\tif (known_type) {\n\t\t\tif (\n\t\t\t\tequals_index === -1 &&\n\t\t\t\t(known_type === 'string' || known_type === 'enum') &&\n\t\t\t\ti + 1 < argv.length\n\t\t\t) {\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (arg.startsWith('--')) {\n\t\t\tif (equals_index !== -1) {\n\t\t\t\textension_flag_values.set(\n\t\t\t\t\targ.slice(2, equals_index),\n\t\t\t\t\targ.slice(equals_index + 1),\n\t\t\t\t);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst name = arg.slice(2);\n\t\t\tconst next = argv[i + 1];\n\t\t\tif (\n\t\t\t\tnext !== undefined &&\n\t\t\t\t!next.startsWith('-') &&\n\t\t\t\t!next.startsWith('@')\n\t\t\t) {\n\t\t\t\textension_flag_values.set(name, next);\n\t\t\t\ti += 1;\n\t\t\t} else {\n\t\t\t\textension_flag_values.set(name, true);\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (arg.startsWith('-')) {\n\t\t\tdiagnostics.push(`Unknown option: ${arg}`);\n\t\t\tcontinue;\n\t\t}\n\t\tpositionals.push(arg);\n\t}\n\n\treturn { extension_flag_values, positionals, diagnostics };\n}\n\nexport function collect_flag_values(\n\targv: string[],\n\tflags: readonly string[],\n): string[] {\n\tconst values: string[] = [];\n\tconst flag_set = new Set(flags);\n\n\tfor (let i = 0; i < argv.length; i++) {\n\t\tconst arg = argv[i];\n\t\tif (!arg) continue;\n\n\t\tconst equals_index = arg.indexOf('=');\n\t\tif (equals_index !== -1) {\n\t\t\tconst name = arg.slice(0, equals_index);\n\t\t\tif (flag_set.has(name)) {\n\t\t\t\tvalues.push(arg.slice(equals_index + 1));\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (flag_set.has(arg) && i + 1 < argv.length) {\n\t\t\tconst next = argv[i + 1];\n\t\t\tif (next !== undefined) {\n\t\t\t\tvalues.push(next);\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn values;\n}\n\nexport function parse_extension_paths(\n\targv: string[],\n\tcwd = process.cwd(),\n): string[] {\n\treturn collect_flag_values(argv, ['-e', '--extension'])\n\t\t.map((path) => path.trim())\n\t\t.filter(Boolean)\n\t\t.map((path) => resolve(cwd, path));\n}\n\nfunction parse_comma_list_flags(\n\targv: string[],\n\tflags: readonly string[],\n): string[] | undefined {\n\tconst values = collect_flag_values(argv, flags)\n\t\t.flatMap((value) => value.split(','))\n\t\t.map((value) => value.trim())\n\t\t.filter(Boolean);\n\treturn values.length ? [...new Set(values)] : undefined;\n}\n\nexport function parse_tool_allowlist(\n\targv: string[],\n): string[] | undefined {\n\treturn parse_comma_list_flags(argv, ['--tools', '-t']);\n}\n\nexport function parse_tool_excludelist(\n\targv: string[],\n): string[] | undefined {\n\treturn parse_comma_list_flags(argv, ['--exclude-tools', '-xt']);\n}\n\nexport function parse_skill_allowlist(\n\targv: string[],\n): string[] | undefined {\n\treturn parse_comma_list_flags(argv, ['--skill']);\n}\n\nexport function parse_thinking_level(\n\tvalue: string | undefined,\n): CliThinkingLevel | undefined {\n\tconst normalized = value?.trim().toLowerCase();\n\tif (!normalized) return undefined;\n\tif (!THINKING_LEVELS.has(normalized)) {\n\t\tthrow new Error(\n\t\t\t'--thinking must be one of: off, minimal, low, medium, high, xhigh.',\n\t\t);\n\t}\n\treturn normalized as CliThinkingLevel;\n}\n","export const MINIMUM_NODE_VERSION = '24.15.0';\n\nfunction parse_node_version(\n\tversion: string,\n): [number, number, number] | undefined {\n\tconst match = /^v?(\\d+)\\.(\\d+)\\.(\\d+)(?:[-+].*)?$/.exec(version);\n\tif (!match) return undefined;\n\treturn [Number(match[1]), Number(match[2]), Number(match[3])];\n}\n\nexport function is_supported_node_version(version: string): boolean {\n\tconst current = parse_node_version(version);\n\tconst minimum = parse_node_version(MINIMUM_NODE_VERSION);\n\tif (!current || !minimum) return false;\n\n\tfor (let index = 0; index < current.length; index++) {\n\t\tif (current[index] > minimum[index]) return true;\n\t\tif (current[index] < minimum[index]) return false;\n\t}\n\treturn true;\n}\n\nexport function get_node_preflight_error(\n\tcurrent_version = process.versions.node,\n): string | undefined {\n\tif (is_supported_node_version(current_version)) return undefined;\n\treturn `my-pi requires Node >=${MINIMUM_NODE_VERSION}; current version is ${current_version}. Upgrade Node and retry.`;\n}\n","const SQLITE_EXPERIMENTAL_WARNING =\n\t'SQLite is an experimental feature';\nconst FILTER_INSTALLED = Symbol.for(\n\t'my-pi.sqlite-warning-filter-installed',\n);\nconst ORIGINAL_EMIT_WARNING = Symbol.for(\n\t'my-pi.original-emit-warning',\n);\n\ntype WarningEmitter = Pick<typeof process, 'emitWarning'> & {\n\t[FILTER_INSTALLED]?: boolean;\n\t[ORIGINAL_EMIT_WARNING]?: typeof process.emitWarning;\n};\n\nexport function should_suppress_warning(warning: Error): boolean {\n\treturn (\n\t\twarning.name === 'ExperimentalWarning' &&\n\t\twarning.message.includes(SQLITE_EXPERIMENTAL_WARNING)\n\t);\n}\n\nfunction should_suppress_emit_warning_args(args: unknown[]): boolean {\n\tconst [warning, options_or_type] = args;\n\tif (warning instanceof Error)\n\t\treturn should_suppress_warning(warning);\n\tconst warning_type =\n\t\ttypeof options_or_type === 'string'\n\t\t\t? options_or_type\n\t\t\t: options_or_type && typeof options_or_type === 'object'\n\t\t\t\t? (options_or_type as { type?: unknown }).type\n\t\t\t\t: undefined;\n\treturn (\n\t\twarning_type === 'ExperimentalWarning' &&\n\t\tString(warning).includes(SQLITE_EXPERIMENTAL_WARNING)\n\t);\n}\n\nexport function install_sqlite_warning_filter(\n\tprocess_like: WarningEmitter = process,\n): void {\n\tif (process_like[FILTER_INSTALLED]) return;\n\tprocess_like[FILTER_INSTALLED] = true;\n\n\tconst original_emit_warning =\n\t\tprocess_like[ORIGINAL_EMIT_WARNING] ?? process_like.emitWarning;\n\tprocess_like[ORIGINAL_EMIT_WARNING] = original_emit_warning;\n\n\tprocess_like.emitWarning = function emit_filtered_warning(\n\t\tthis: WarningEmitter,\n\t\t...args: unknown[]\n\t) {\n\t\tif (should_suppress_emit_warning_args(args)) return;\n\t\treturn (\n\t\t\toriginal_emit_warning as (...args: unknown[]) => void\n\t\t).apply(this, args);\n\t} as typeof process.emitWarning;\n}\n","#!/usr/bin/env node\n\nimport {\n\tdefineCommand,\n\trenderUsage,\n\trunMain,\n\ttype ArgsDef,\n\ttype CommandDef,\n} from 'citty';\nimport { existsSync, readFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport {\n\tcreate_builtin_disable_cli_args,\n\tparse_extension_cli_args,\n\tparse_extension_paths,\n\tparse_skill_allowlist,\n\tparse_thinking_level,\n\tparse_tool_allowlist,\n\tparse_tool_excludelist,\n\tresolve_builtin_extension_options,\n\ttype CliArgDefinitions,\n} from './cli-args.js';\nimport { get_node_preflight_error } from './runtime-preflight.js';\nimport { install_sqlite_warning_filter } from './warnings.js';\n\nconst node_preflight_error = get_node_preflight_error();\nif (node_preflight_error) {\n\tconsole.error(node_preflight_error);\n\tprocess.exit(1);\n}\n\ninstall_sqlite_warning_filter();\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\nconst package_root = join(__dirname, '..');\nconst pkg = JSON.parse(\n\treadFileSync(join(package_root, 'package.json'), 'utf-8'),\n);\n\n// my-pi is a wrapper around Pi; upstream Pi update banners are useful in\n// this repo, but confusing for installed wrapper users.\nif (!existsSync(join(package_root, '.git'))) {\n\tprocess.env.PI_SKIP_VERSION_CHECK ??= '1';\n}\n\nasync function read_stdin(): Promise<string> {\n\tconst chunks: Buffer[] = [];\n\tfor await (const chunk of process.stdin) {\n\t\tchunks.push(chunk as Buffer);\n\t}\n\treturn Buffer.concat(chunks).toString('utf-8').trim();\n}\n\ntype MyPiRuntime = Awaited<\n\tReturnType<(typeof import('./api.js'))['create_my_pi']>\n>;\ntype InteractiveModeConstructor =\n\t(typeof import('@earendil-works/pi-coding-agent'))['InteractiveMode'];\n\nasync function run_interactive_mode(\n\truntime: MyPiRuntime,\n\tInteractiveModeClass: InteractiveModeConstructor,\n): Promise<void> {\n\tconst original_write = process.stdout.write.bind(process.stdout);\n\tprocess.stdout.write = ((\n\t\tchunk: string | Uint8Array,\n\t\t...args: Parameters<typeof original_write>\n\t) => {\n\t\tif (typeof chunk === 'string') {\n\t\t\tconst escape = String.fromCharCode(27);\n\t\t\tconst styled_hint = new RegExp(\n\t\t\t\t`(To resume this session:${escape}\\\\[[\\\\d;]*m )pi( --session )`,\n\t\t\t\t'g',\n\t\t\t);\n\t\t\tchunk = chunk.replace(styled_hint, '$1my-pi$2');\n\t\t\tchunk = chunk.replace(\n\t\t\t\t/(To resume this session: )pi( --session )/g,\n\t\t\t\t'$1my-pi$2',\n\t\t\t);\n\t\t}\n\t\treturn Reflect.apply(original_write, process.stdout, [\n\t\t\tchunk,\n\t\t\t...args,\n\t\t]);\n\t}) as typeof process.stdout.write;\n\ttry {\n\t\tconst mode = new InteractiveModeClass(runtime, {\n\t\t\tmigratedProviders: [],\n\t\t\tmodelFallbackMessage: undefined,\n\t\t\tinitialMessage: undefined,\n\t\t\tinitialImages: [],\n\t\t\tinitialMessages: [],\n\t\t});\n\t\tawait mode.run();\n\t} finally {\n\t\tprocess.stdout.write =\n\t\t\toriginal_write as typeof process.stdout.write;\n\t}\n}\n\nconst HELP_APPENDIX = `\nMODES\n\n my-pi\n Interactive TUI with slash commands, editor, and session UI.\n\n my-pi \"prompt\"\n my-pi -P \"prompt\"\n One-shot print mode with plain text output.\n\n my-pi --json \"prompt\"\n Non-interactive NDJSON mode for scripts, evals, and other agents.\n\n my-pi --mode rpc\n RPC mode over stdin/stdout JSONL for orchestrators and teammate sessions.\n\nNOTES\n\n - In non-interactive modes, my-pi keeps headless-capable built-ins like\n MCP, LSP, prompt presets, recall, nopeek, Omnisearch, SQLite tools, hooks, and secret redaction.\n - UI-only built-ins like session auto-naming are skipped.\n - Repeat -e / --extension to compose multiple extensions.\n\nNESTED RUNS\n\n - Child runs inherit cwd and environment unless you isolate them explicitly.\n - Use --agent-dir to isolate auth, config, sessions, and telemetry state.\n - For safer evals or unknown repos, use --untrusted plus an explicit\n --system-prompt.\n\nEXAMPLES\n\n my-pi\n my-pi \"fix the failing test\"\n my-pi -P \"summarize this repo\"\n my-pi --json \"list all TODO comments\"\n echo \"plan a login page\" | my-pi --json\n my-pi --telemetry --json \"run eval case\"\n my-pi --telemetry --telemetry-db ./tmp/evals.db --json \"run case\"\n my-pi observability\n my-pi --untrusted --agent-dir /tmp/pi-agent --json \"run case\"\n my-pi -e ./my-ext.ts -e ./other-ext.ts \"hello\"\n my-pi -m claude-haiku-4-5-20241022 \"explain this file\"\n XIAOMI_API_KEY=... my-pi -m xiaomi/mimo-v2.5-pro \"summarize this repo\"\n my-pi -m cloudflare-workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast \"explain this file\"\n my-pi --preset terse,no-purple-prose \"summarize this repo\"\n my-pi --system-prompt \"You are a JSON classifier. Return only JSON.\" --json \"classify this\"\n\nPROMPT PRESETS\n\n Interactive commands:\n /prompt-preset help\n /prompt-preset export-defaults\n /prompt-preset edit-global terse\n /prompt-preset base detailed\n /prompt-preset enable bullets\n\n Short alias: /preset\n\n Editable preset files:\n ~/.pi/agent/presets/*.md\n .pi/presets/*.md\n`;\n\nasync function render_rich_usage<T extends ArgsDef>(\n\tcmd: CommandDef<T>,\n\tparent?: CommandDef<T>,\n): Promise<string> {\n\treturn `${await renderUsage(cmd, parent)}\\n${HELP_APPENDIX}`;\n}\n\nasync function print_usage<T extends ArgsDef>(\n\tcmd: CommandDef<T>,\n\tparent?: CommandDef<T>,\n): Promise<void> {\n\tconsole.log(await render_rich_usage(cmd, parent));\n}\n\nconst main = defineCommand({\n\tmeta: {\n\t\tname: 'my-pi',\n\t\tversion: pkg.version,\n\t\tdescription:\n\t\t\t'Composable pi coding agent with MCP, LSP, presets, and local eval telemetry',\n\t},\n\targs: {\n\t\tprint: {\n\t\t\ttype: 'boolean',\n\t\t\talias: 'P',\n\t\t\tdescription: 'Print mode (non-interactive, one-shot)',\n\t\t\tdefault: false,\n\t\t},\n\t\t'agent-dir': {\n\t\t\ttype: 'string',\n\t\t\tdescription:\n\t\t\t\t'Override Pi auth/config/session directory for this process',\n\t\t\trequired: false,\n\t\t},\n\t\t'session-dir': {\n\t\t\ttype: 'string',\n\t\t\tdescription:\n\t\t\t\t'Override Pi session storage directory for this process',\n\t\t\trequired: false,\n\t\t},\n\t\tjson: {\n\t\t\ttype: 'boolean',\n\t\t\talias: 'j',\n\t\t\tdescription: 'Output NDJSON events (for agent consumption)',\n\t\t\tdefault: false,\n\t\t},\n\t\tmode: {\n\t\t\ttype: 'string',\n\t\t\tdescription: 'Runtime mode: interactive, print, json, or rpc',\n\t\t\trequired: false,\n\t\t},\n\t\textension: {\n\t\t\ttype: 'string',\n\t\t\talias: 'e',\n\t\t\tdescription:\n\t\t\t\t'Extension path to load; repeatable via argv parsing',\n\t\t\trequired: false,\n\t\t},\n\t\t'no-builtin': {\n\t\t\ttype: 'boolean',\n\t\t\tdescription: 'Disable all built-in extensions',\n\t\t\tdefault: false,\n\t\t},\n\t\tuntrusted: {\n\t\t\ttype: 'boolean',\n\t\t\tdescription:\n\t\t\t\t'Safe mode for unknown repos: skip project MCP, hooks, project prompt presets, project skills, and project LSP binaries unless explicitly re-enabled',\n\t\t\tdefault: false,\n\t\t},\n\t\t...create_builtin_disable_cli_args(),\n\t\ttelemetry: {\n\t\t\ttype: 'boolean',\n\t\t\tdescription: 'Enable local SQLite telemetry for this process',\n\t\t\tdefault: false,\n\t\t},\n\t\t'no-telemetry': {\n\t\t\ttype: 'boolean',\n\t\t\tdescription: 'Disable local SQLite telemetry for this process',\n\t\t\tdefault: false,\n\t\t},\n\t\t'telemetry-db': {\n\t\t\ttype: 'string',\n\t\t\tdescription:\n\t\t\t\t'Override telemetry database path for this process',\n\t\t\trequired: false,\n\t\t},\n\t\tmodel: {\n\t\t\ttype: 'string',\n\t\t\talias: 'm',\n\t\t\tdescription:\n\t\t\t\t'Model to use (e.g. claude-sonnet-4-5-20241022, gpt-5.4, cloudflare-workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast)',\n\t\t},\n\t\tthinking: {\n\t\t\ttype: 'string',\n\t\t\tdescription:\n\t\t\t\t'Thinking level: off, minimal, low, medium, high, or xhigh',\n\t\t\trequired: false,\n\t\t},\n\t\ttools: {\n\t\t\ttype: 'string',\n\t\t\talias: 't',\n\t\t\tdescription:\n\t\t\t\t'Comma-separated allowlist of tool names to enable',\n\t\t\trequired: false,\n\t\t},\n\t\t'exclude-tools': {\n\t\t\ttype: 'string',\n\t\t\talias: 'xt',\n\t\t\tdescription: 'Comma-separated list of tool names to disable',\n\t\t\trequired: false,\n\t\t},\n\t\tsession: {\n\t\t\ttype: 'string',\n\t\t\tdescription: 'Resume a specific session file or session ID',\n\t\t\trequired: false,\n\t\t},\n\t\t'session-id': {\n\t\t\ttype: 'string',\n\t\t\tdescription:\n\t\t\t\t'Create or resume an exact project-local session ID',\n\t\t\trequired: false,\n\t\t},\n\t\tname: {\n\t\t\ttype: 'string',\n\t\t\talias: 'n',\n\t\t\tdescription: 'Set the session display name at startup',\n\t\t\trequired: false,\n\t\t},\n\t\tskill: {\n\t\t\ttype: 'string',\n\t\t\tdescription: 'Skill name to allow; repeatable in argv parsing',\n\t\t\trequired: false,\n\t\t},\n\t\t'system-prompt': {\n\t\t\ttype: 'string',\n\t\t\tdescription: 'Replace the base system prompt',\n\t\t\trequired: false,\n\t\t},\n\t\t'append-system-prompt': {\n\t\t\ttype: 'string',\n\t\t\tdescription: 'Append one-off instructions to the system prompt',\n\t\t\trequired: false,\n\t\t},\n\t\tprompt: {\n\t\t\ttype: 'string',\n\t\t\talias: 'p',\n\t\t\tdescription: 'Prompt text (alternative to positional argument)',\n\t\t\trequired: false,\n\t\t},\n\t},\n\tasync run({ args }) {\n\t\tconst cwd = process.cwd();\n\t\tconst parsed_extension_cli = parse_extension_cli_args(\n\t\t\tprocess.argv.slice(2),\n\t\t\tmain.args as CliArgDefinitions,\n\t\t);\n\t\tif (parsed_extension_cli.diagnostics.length) {\n\t\t\tfor (const message of parsed_extension_cli.diagnostics)\n\t\t\t\tconsole.error(`Error: ${message}`);\n\t\t\tprocess.exit(1);\n\t\t}\n\t\tconst extension_paths = parse_extension_paths(process.argv, cwd);\n\t\tconst selected_tools = parse_tool_allowlist(process.argv);\n\t\tconst excluded_tools = parse_tool_excludelist(process.argv);\n\t\tconst selected_skills = parse_skill_allowlist(process.argv);\n\t\tlet selected_thinking;\n\t\ttry {\n\t\t\tselected_thinking = parse_thinking_level(args.thinking);\n\t\t} catch (error) {\n\t\t\tconsole.error(\n\t\t\t\terror instanceof Error ? error.message : String(error),\n\t\t\t);\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tlet runtime_mode: 'interactive' | 'print' | 'json' | 'rpc' =\n\t\t\t'interactive';\n\t\tif (args.mode) {\n\t\t\tconst requested = String(args.mode).trim().toLowerCase();\n\t\t\tif (\n\t\t\t\t!['interactive', 'print', 'json', 'rpc'].includes(requested)\n\t\t\t) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t'Error: --mode must be one of interactive, print, json, rpc.',\n\t\t\t\t);\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\t\truntime_mode = requested as\n\t\t\t\t| 'interactive'\n\t\t\t\t| 'print'\n\t\t\t\t| 'json'\n\t\t\t\t| 'rpc';\n\t\t}\n\t\tif (args.json) runtime_mode = 'json';\n\t\telse if (args.print) runtime_mode = 'print';\n\n\t\tconst positionals = parsed_extension_cli.positionals;\n\t\tif (positionals?.[0] === 'observability') {\n\t\t\tconst { start_observability_server } =\n\t\t\t\tawait import('@spences10/pi-observability/server');\n\t\t\tstart_observability_server();\n\t\t\treturn;\n\t\t}\n\n\t\t// Resolve prompt: named --prompt flag > positional > stdin\n\t\tlet prompt = args.prompt;\n\t\tif (!prompt && positionals && positionals.length > 0) {\n\t\t\tprompt = positionals[0];\n\t\t}\n\t\tif (!prompt && !process.stdin.isTTY && runtime_mode !== 'rpc') {\n\t\t\tprompt = await read_stdin();\n\t\t}\n\t\tif (prompt && runtime_mode === 'interactive')\n\t\t\truntime_mode = 'print';\n\n\t\tif (\n\t\t\t!args.print &&\n\t\t\t!args.json &&\n\t\t\truntime_mode !== 'rpc' &&\n\t\t\t!prompt &&\n\t\t\t!process.stdout.isTTY\n\t\t) {\n\t\t\tawait print_usage(main);\n\t\t\treturn;\n\t\t}\n\n\t\t// Startup feedback so silence = broken (issue #3)\n\t\tif (runtime_mode !== 'interactive') {\n\t\t\tprocess.stderr.write(\n\t\t\t\t`my-pi: connecting to ${args.model || 'default model'}...\\n`,\n\t\t\t);\n\t\t}\n\n\t\tif (args.telemetry && args['no-telemetry']) {\n\t\t\tconsole.error(\n\t\t\t\t'Error: --telemetry and --no-telemetry cannot be used together.',\n\t\t\t);\n\t\t\tprocess.exit(1);\n\t\t}\n\t\tif (args.session && args['session-id']) {\n\t\t\tconsole.error(\n\t\t\t\t'Error: --session and --session-id cannot be used together.',\n\t\t\t);\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tlet telemetry_override: boolean | undefined;\n\t\tif (args.telemetry) {\n\t\t\ttelemetry_override = true;\n\t\t} else if (args['no-telemetry']) {\n\t\t\ttelemetry_override = false;\n\t\t}\n\n\t\tconst [\n\t\t\t{ create_my_pi },\n\t\t\t{ InteractiveMode, runPrintMode, runRpcMode },\n\t\t] = await Promise.all([\n\t\t\timport('./api.js'),\n\t\t\timport('@earendil-works/pi-coding-agent'),\n\t\t]);\n\n\t\tconst runtime = await create_my_pi({\n\t\t\tcwd,\n\t\t\tagent_dir: args['agent-dir'],\n\t\t\tsession_dir: args['session-dir'],\n\t\t\textensions: extension_paths,\n\t\t\textension_flag_values:\n\t\t\t\tparsed_extension_cli.extension_flag_values,\n\t\t\truntime_mode,\n\t\t\t...resolve_builtin_extension_options(args),\n\t\t\ttelemetry: telemetry_override,\n\t\t\ttelemetry_db_path: args['telemetry-db'],\n\t\t\tmodel: args.model,\n\t\t\tthinking: selected_thinking,\n\t\t\tselected_tools,\n\t\t\texcluded_tools,\n\t\t\tselected_skills,\n\t\t\tsession: args.session,\n\t\t\tsession_id: args['session-id'],\n\t\t\tstartup_session_name: args.name,\n\t\t\tsystem_prompt: args['system-prompt'],\n\t\t\tappend_system_prompt: args['append-system-prompt'],\n\t\t\tuntrusted_repo: args.untrusted,\n\t\t});\n\n\t\tfor (const diagnostic of runtime.diagnostics) {\n\t\t\tconst prefix =\n\t\t\t\tdiagnostic.type === 'error'\n\t\t\t\t\t? 'Error: '\n\t\t\t\t\t: diagnostic.type === 'warning'\n\t\t\t\t\t\t? 'Warning: '\n\t\t\t\t\t\t: '';\n\t\t\tconsole.error(`${prefix}${diagnostic.message}`);\n\t\t}\n\t\tif (\n\t\t\truntime.diagnostics.some(\n\t\t\t\t(diagnostic) => diagnostic.type === 'error',\n\t\t\t)\n\t\t) {\n\t\t\tawait runtime.dispose();\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tif (runtime_mode === 'rpc') {\n\t\t\tawait runRpcMode(runtime);\n\t\t} else if (args.print || args.json || prompt) {\n\t\t\tlet output_mode: 'json' | 'text' = 'text';\n\t\t\tif (args.json) {\n\t\t\t\toutput_mode = 'json';\n\t\t\t}\n\t\t\tconst code = await runPrintMode(runtime, {\n\t\t\t\tmode: output_mode,\n\t\t\t\tinitialMessage: prompt || '',\n\t\t\t\tinitialImages: [],\n\t\t\t\tmessages: [],\n\t\t\t});\n\t\t\tprocess.exit(code);\n\t\t} else if (!process.stdout.isTTY) {\n\t\t\tawait print_usage(main);\n\t\t} else {\n\t\t\tawait run_interactive_mode(runtime, InteractiveMode);\n\t\t}\n\t},\n});\n\nvoid runMain(main, {\n\tshowUsage: async (cmd, parent) => {\n\t\tawait print_usage(cmd, parent);\n\t},\n});\n"],"mappings":";;;;;;;AAMA,MAAM,kCAAkB,IAAI,IAAI;CAC/B;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AAgCD,SAAgB,kCAAyD;CACxE,OAAO,OAAO,YACb,mBAAmB,KAAK,cAAc,CACrC,UAAU,SACV;EACC,MAAM;EACN,aAAa,UAAU;EACvB,SAAS;CACV,CACD,CAAC,CACF;AACD;AAEA,SAAS,qBACR,MACA,SACU;CACV,IAAI,KAAK,UAAU,OAAO;CAE1B,MAAM,iBAAiB,QAAQ,QAAQ,QAAQ,EAAE;CACjD,MAAM,iBAAiB,eAAe,QACrC,cACC,GAAG,SAAS,OAAO,IAAI,CAAC,CAAC,YAAY,CACvC;CACA,OACC,KAAK,oBAAoB,SAAS,KAAK,oBAAoB;AAE7D;AAEA,SAAgB,kCACf,MACuD;CACvD,MAAM,aAAa,qBAAqB,MAAM,YAAY;CAC1D,OAAO,OAAO,YACb,mBAAmB,KAAK,cAAc,CACrC,UAAU,aACV,CAAC,cAAc,CAAC,qBAAqB,MAAM,UAAU,OAAO,CAC7D,CAAC,CACF;AACD;AAEA,SAAgB,yBACf,MACA,YACyB;CACzB,MAAM,8BAAc,IAAI,IAAsC;CAC9D,KAAK,MAAM,CAAC,MAAM,eAAe,OAAO,QAAQ,UAAU,GAAG;EAC5D,YAAY,IAAI,KAAK,QAAQ,WAAW,IAAI;EAC5C,MAAM,aAAa,KAAK,QAAQ,cAAc,GAAG,SAChD,OAAO,IAAI,CAAC,CAAC,YAAY,CAC1B;EACA,YAAY,IAAI,KA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,"file":"index.js","names":[],"sources":["../src/cli-args.ts","../src/runtime-preflight.ts","../src/warnings.ts","../src/index.ts"],"sourcesContent":["import { resolve } from 'node:path';\nimport {\n\tBUILTIN_EXTENSIONS,\n\ttype BuiltinExtensionOptionName,\n} from './extensions/builtin-registry.js';\n\nconst THINKING_LEVELS = new Set([\n\t'off',\n\t'minimal',\n\t'low',\n\t'medium',\n\t'high',\n\t'xhigh',\n]);\n\nexport type CliThinkingLevel =\n\t| 'off'\n\t| 'minimal'\n\t| 'low'\n\t| 'medium'\n\t| 'high'\n\t| 'xhigh';\n\nexport type BuiltinDisableCliArgs = Record<\n\tstring,\n\t{\n\t\ttype: 'boolean';\n\t\tdescription: string;\n\t\tdefault: false;\n\t}\n>;\n\nexport interface CliArgDefinition {\n\ttype: 'boolean' | 'string' | 'enum' | 'positional';\n\talias?: string | readonly string[];\n}\n\nexport type CliArgDefinitions = Record<string, CliArgDefinition>;\n\nexport interface ParsedExtensionCliArgs {\n\textension_flag_values: Map<string, boolean | string>;\n\tpositionals: string[];\n\tdiagnostics: string[];\n}\n\nexport function create_builtin_disable_cli_args(): BuiltinDisableCliArgs {\n\treturn Object.fromEntries(\n\t\tBUILTIN_EXTENSIONS.map((extension) => [\n\t\t\textension.cli_arg,\n\t\t\t{\n\t\t\t\ttype: 'boolean' as const,\n\t\t\t\tdescription: extension.cli_description,\n\t\t\t\tdefault: false as const,\n\t\t\t},\n\t\t]),\n\t);\n}\n\nfunction is_citty_no_flag_set(\n\targs: Record<string, unknown>,\n\tcli_arg: string,\n): boolean {\n\tif (args[cli_arg]) return true;\n\n\tconst positive_kebab = cli_arg.replace(/^no-/, '');\n\tconst positive_camel = positive_kebab.replace(\n\t\t/-([a-z])/g,\n\t\t(_, char) => String(char).toUpperCase(),\n\t);\n\treturn (\n\t\targs[positive_kebab] === false || args[positive_camel] === false\n\t);\n}\n\nexport function resolve_builtin_extension_options(\n\targs: Record<string, unknown>,\n): Partial<Record<BuiltinExtensionOptionName, boolean>> {\n\tconst no_builtin = is_citty_no_flag_set(args, 'no-builtin');\n\treturn Object.fromEntries(\n\t\tBUILTIN_EXTENSIONS.map((extension) => [\n\t\t\textension.option_name,\n\t\t\t!no_builtin &&\n\t\t\t\t!is_citty_no_flag_set(args, extension.cli_arg) &&\n\t\t\t\textension.default_enabled,\n\t\t]),\n\t) as Partial<Record<BuiltinExtensionOptionName, boolean>>;\n}\n\nexport function parse_extension_cli_args(\n\targv: string[],\n\tknown_args: CliArgDefinitions,\n): ParsedExtensionCliArgs {\n\tconst known_flags = new Map<string, CliArgDefinition['type']>();\n\tfor (const [name, definition] of Object.entries(known_args)) {\n\t\tknown_flags.set(`--${name}`, definition.type);\n\t\tconst camel_name = name.replace(/-([a-z])/g, (_, char) =>\n\t\t\tString(char).toUpperCase(),\n\t\t);\n\t\tknown_flags.set(`--${camel_name}`, definition.type);\n\t\tif (definition.type === 'boolean')\n\t\t\tknown_flags.set(`--no-${name}`, definition.type);\n\t\tconst aliases = Array.isArray(definition.alias)\n\t\t\t? definition.alias\n\t\t\t: definition.alias\n\t\t\t\t? [definition.alias]\n\t\t\t\t: [];\n\t\tfor (const alias of aliases)\n\t\t\tknown_flags.set(`-${alias}`, definition.type);\n\t}\n\n\tconst extension_flag_values = new Map<string, boolean | string>();\n\tconst positionals: string[] = [];\n\tconst diagnostics: string[] = [];\n\n\tfor (let i = 0; i < argv.length; i++) {\n\t\tconst arg = argv[i];\n\t\tif (!arg) continue;\n\t\tif (arg === '--') {\n\t\t\tpositionals.push(...argv.slice(i + 1));\n\t\t\tbreak;\n\t\t}\n\n\t\tconst equals_index = arg.indexOf('=');\n\t\tconst flag_token =\n\t\t\tequals_index === -1 ? arg : arg.slice(0, equals_index);\n\t\tconst known_type = known_flags.get(flag_token);\n\t\tif (known_type) {\n\t\t\tif (\n\t\t\t\tequals_index === -1 &&\n\t\t\t\t(known_type === 'string' || known_type === 'enum') &&\n\t\t\t\ti + 1 < argv.length\n\t\t\t) {\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (arg.startsWith('--')) {\n\t\t\tif (equals_index !== -1) {\n\t\t\t\textension_flag_values.set(\n\t\t\t\t\targ.slice(2, equals_index),\n\t\t\t\t\targ.slice(equals_index + 1),\n\t\t\t\t);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst name = arg.slice(2);\n\t\t\tconst next = argv[i + 1];\n\t\t\tif (\n\t\t\t\tnext !== undefined &&\n\t\t\t\t!next.startsWith('-') &&\n\t\t\t\t!next.startsWith('@')\n\t\t\t) {\n\t\t\t\textension_flag_values.set(name, next);\n\t\t\t\ti += 1;\n\t\t\t} else {\n\t\t\t\textension_flag_values.set(name, true);\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (arg.startsWith('-')) {\n\t\t\tdiagnostics.push(`Unknown option: ${arg}`);\n\t\t\tcontinue;\n\t\t}\n\t\tpositionals.push(arg);\n\t}\n\n\treturn { extension_flag_values, positionals, diagnostics };\n}\n\nexport function collect_flag_values(\n\targv: string[],\n\tflags: readonly string[],\n): string[] {\n\tconst values: string[] = [];\n\tconst flag_set = new Set(flags);\n\n\tfor (let i = 0; i < argv.length; i++) {\n\t\tconst arg = argv[i];\n\t\tif (!arg) continue;\n\n\t\tconst equals_index = arg.indexOf('=');\n\t\tif (equals_index !== -1) {\n\t\t\tconst name = arg.slice(0, equals_index);\n\t\t\tif (flag_set.has(name)) {\n\t\t\t\tvalues.push(arg.slice(equals_index + 1));\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (flag_set.has(arg) && i + 1 < argv.length) {\n\t\t\tconst next = argv[i + 1];\n\t\t\tif (next !== undefined) {\n\t\t\t\tvalues.push(next);\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn values;\n}\n\nexport function parse_extension_paths(\n\targv: string[],\n\tcwd = process.cwd(),\n): string[] {\n\treturn collect_flag_values(argv, ['-e', '--extension'])\n\t\t.map((path) => path.trim())\n\t\t.filter(Boolean)\n\t\t.map((path) => resolve(cwd, path));\n}\n\nfunction parse_comma_list_flags(\n\targv: string[],\n\tflags: readonly string[],\n): string[] | undefined {\n\tconst values = collect_flag_values(argv, flags)\n\t\t.flatMap((value) => value.split(','))\n\t\t.map((value) => value.trim())\n\t\t.filter(Boolean);\n\treturn values.length ? [...new Set(values)] : undefined;\n}\n\nexport function parse_tool_allowlist(\n\targv: string[],\n): string[] | undefined {\n\treturn parse_comma_list_flags(argv, ['--tools', '-t']);\n}\n\nexport function parse_tool_excludelist(\n\targv: string[],\n): string[] | undefined {\n\treturn parse_comma_list_flags(argv, ['--exclude-tools', '-xt']);\n}\n\nexport function parse_skill_allowlist(\n\targv: string[],\n): string[] | undefined {\n\treturn parse_comma_list_flags(argv, ['--skill']);\n}\n\nexport function parse_thinking_level(\n\tvalue: string | undefined,\n): CliThinkingLevel | undefined {\n\tconst normalized = value?.trim().toLowerCase();\n\tif (!normalized) return undefined;\n\tif (!THINKING_LEVELS.has(normalized)) {\n\t\tthrow new Error(\n\t\t\t'--thinking must be one of: off, minimal, low, medium, high, xhigh.',\n\t\t);\n\t}\n\treturn normalized as CliThinkingLevel;\n}\n","export const MINIMUM_NODE_VERSION = '24.15.0';\n\nfunction parse_node_version(\n\tversion: string,\n): [number, number, number] | undefined {\n\tconst match = /^v?(\\d+)\\.(\\d+)\\.(\\d+)(?:[-+].*)?$/.exec(version);\n\tif (!match) return undefined;\n\treturn [Number(match[1]), Number(match[2]), Number(match[3])];\n}\n\nexport function is_supported_node_version(version: string): boolean {\n\tconst current = parse_node_version(version);\n\tconst minimum = parse_node_version(MINIMUM_NODE_VERSION);\n\tif (!current || !minimum) return false;\n\n\tfor (let index = 0; index < current.length; index++) {\n\t\tif (current[index] > minimum[index]) return true;\n\t\tif (current[index] < minimum[index]) return false;\n\t}\n\treturn true;\n}\n\nexport function get_node_preflight_error(\n\tcurrent_version = process.versions.node,\n): string | undefined {\n\tif (is_supported_node_version(current_version)) return undefined;\n\treturn `my-pi requires Node >=${MINIMUM_NODE_VERSION}; current version is ${current_version}. Upgrade Node and retry.`;\n}\n","const SQLITE_EXPERIMENTAL_WARNING =\n\t'SQLite is an experimental feature';\nconst FILTER_INSTALLED = Symbol.for(\n\t'my-pi.sqlite-warning-filter-installed',\n);\nconst ORIGINAL_EMIT_WARNING = Symbol.for(\n\t'my-pi.original-emit-warning',\n);\n\ntype WarningEmitter = Pick<typeof process, 'emitWarning'> & {\n\t[FILTER_INSTALLED]?: boolean;\n\t[ORIGINAL_EMIT_WARNING]?: typeof process.emitWarning;\n};\n\nexport function should_suppress_warning(warning: Error): boolean {\n\treturn (\n\t\twarning.name === 'ExperimentalWarning' &&\n\t\twarning.message.includes(SQLITE_EXPERIMENTAL_WARNING)\n\t);\n}\n\nfunction should_suppress_emit_warning_args(args: unknown[]): boolean {\n\tconst [warning, options_or_type] = args;\n\tif (warning instanceof Error)\n\t\treturn should_suppress_warning(warning);\n\tconst warning_type =\n\t\ttypeof options_or_type === 'string'\n\t\t\t? options_or_type\n\t\t\t: options_or_type && typeof options_or_type === 'object'\n\t\t\t\t? (options_or_type as { type?: unknown }).type\n\t\t\t\t: undefined;\n\treturn (\n\t\twarning_type === 'ExperimentalWarning' &&\n\t\tString(warning).includes(SQLITE_EXPERIMENTAL_WARNING)\n\t);\n}\n\nexport function install_sqlite_warning_filter(\n\tprocess_like: WarningEmitter = process,\n): void {\n\tif (process_like[FILTER_INSTALLED]) return;\n\tprocess_like[FILTER_INSTALLED] = true;\n\n\tconst original_emit_warning =\n\t\tprocess_like[ORIGINAL_EMIT_WARNING] ?? process_like.emitWarning;\n\tprocess_like[ORIGINAL_EMIT_WARNING] = original_emit_warning;\n\n\tprocess_like.emitWarning = function emit_filtered_warning(\n\t\tthis: WarningEmitter,\n\t\t...args: unknown[]\n\t) {\n\t\tif (should_suppress_emit_warning_args(args)) return;\n\t\treturn (\n\t\t\toriginal_emit_warning as (...args: unknown[]) => void\n\t\t).apply(this, args);\n\t} as typeof process.emitWarning;\n}\n","#!/usr/bin/env node\n\nimport {\n\tdefineCommand,\n\trenderUsage,\n\trunMain,\n\ttype ArgsDef,\n\ttype CommandDef,\n} from 'citty';\nimport { existsSync, readFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport {\n\tcreate_builtin_disable_cli_args,\n\tparse_extension_cli_args,\n\tparse_extension_paths,\n\tparse_skill_allowlist,\n\tparse_thinking_level,\n\tparse_tool_allowlist,\n\tparse_tool_excludelist,\n\tresolve_builtin_extension_options,\n\ttype CliArgDefinitions,\n} from './cli-args.js';\nimport { get_node_preflight_error } from './runtime-preflight.js';\nimport { install_sqlite_warning_filter } from './warnings.js';\n\nconst node_preflight_error = get_node_preflight_error();\nif (node_preflight_error) {\n\tconsole.error(node_preflight_error);\n\tprocess.exit(1);\n}\n\ninstall_sqlite_warning_filter();\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\nconst package_root = join(__dirname, '..');\nconst pkg = JSON.parse(\n\treadFileSync(join(package_root, 'package.json'), 'utf-8'),\n);\n\n// my-pi is a wrapper around Pi; upstream Pi update banners are useful in\n// this repo, but confusing for installed wrapper users.\nif (!existsSync(join(package_root, '.git'))) {\n\tprocess.env.PI_SKIP_VERSION_CHECK ??= '1';\n}\n\nasync function read_stdin(): Promise<string> {\n\tconst chunks: Buffer[] = [];\n\tfor await (const chunk of process.stdin) {\n\t\tchunks.push(chunk as Buffer);\n\t}\n\treturn Buffer.concat(chunks).toString('utf-8').trim();\n}\n\ntype MyPiRuntime = Awaited<\n\tReturnType<(typeof import('./api.js'))['create_my_pi']>\n>;\ntype InteractiveModeConstructor =\n\t(typeof import('@earendil-works/pi-coding-agent'))['InteractiveMode'];\n\nasync function run_interactive_mode(\n\truntime: MyPiRuntime,\n\tInteractiveModeClass: InteractiveModeConstructor,\n): Promise<void> {\n\tconst original_write = process.stdout.write.bind(process.stdout);\n\tprocess.stdout.write = ((\n\t\tchunk: string | Uint8Array,\n\t\t...args: Parameters<typeof original_write>\n\t) => {\n\t\tif (typeof chunk === 'string') {\n\t\t\tconst escape = String.fromCharCode(27);\n\t\t\tconst styled_hint = new RegExp(\n\t\t\t\t`(To resume this session:${escape}\\\\[[\\\\d;]*m )pi( --session )`,\n\t\t\t\t'g',\n\t\t\t);\n\t\t\tchunk = chunk.replace(styled_hint, '$1my-pi$2');\n\t\t\tchunk = chunk.replace(\n\t\t\t\t/(To resume this session: )pi( --session )/g,\n\t\t\t\t'$1my-pi$2',\n\t\t\t);\n\t\t}\n\t\treturn Reflect.apply(original_write, process.stdout, [\n\t\t\tchunk,\n\t\t\t...args,\n\t\t]);\n\t}) as typeof process.stdout.write;\n\ttry {\n\t\tconst mode = new InteractiveModeClass(runtime, {\n\t\t\tmigratedProviders: [],\n\t\t\tmodelFallbackMessage: undefined,\n\t\t\tinitialMessage: undefined,\n\t\t\tinitialImages: [],\n\t\t\tinitialMessages: [],\n\t\t});\n\t\tawait mode.run();\n\t} finally {\n\t\tprocess.stdout.write =\n\t\t\toriginal_write as typeof process.stdout.write;\n\t}\n}\n\nconst HELP_APPENDIX = `\nMODES\n\n my-pi\n Interactive TUI with slash commands, editor, and session UI.\n\n my-pi \"prompt\"\n my-pi -P \"prompt\"\n One-shot print mode with plain text output.\n\n my-pi --json \"prompt\"\n Non-interactive NDJSON mode for scripts, evals, and other agents.\n\n my-pi --mode rpc\n RPC mode over stdin/stdout JSONL for orchestrators and teammate sessions.\n\nNOTES\n\n - In non-interactive modes, my-pi keeps headless-capable built-ins like\n MCP, LSP, prompt presets, recall, nopeek, Omnisearch, SQLite tools, hooks, and secret redaction.\n - UI-only built-ins like session auto-naming are skipped.\n - Repeat -e / --extension to compose multiple extensions.\n\nNESTED RUNS\n\n - Child runs inherit cwd and environment unless you isolate them explicitly.\n - Use --agent-dir to isolate auth, config, sessions, and telemetry state.\n - For safer evals or unknown repos, use --untrusted plus an explicit\n --system-prompt.\n\nEXAMPLES\n\n my-pi\n my-pi \"fix the failing test\"\n my-pi -P \"summarize this repo\"\n my-pi --json \"list all TODO comments\"\n echo \"plan a login page\" | my-pi --json\n my-pi --telemetry --json \"run eval case\"\n my-pi --telemetry --telemetry-db ./tmp/evals.db --json \"run case\"\n my-pi observability\n my-pi --untrusted --agent-dir /tmp/pi-agent --json \"run case\"\n my-pi -e ./my-ext.ts -e ./other-ext.ts \"hello\"\n my-pi -m claude-haiku-4-5-20241022 \"explain this file\"\n XIAOMI_API_KEY=... my-pi -m xiaomi/mimo-v2.5-pro \"summarize this repo\"\n my-pi -m cloudflare-workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast \"explain this file\"\n my-pi --preset terse,no-purple-prose \"summarize this repo\"\n my-pi --system-prompt \"You are a JSON classifier. Return only JSON.\" --json \"classify this\"\n\nPROMPT PRESETS\n\n Interactive commands:\n /prompt-preset help\n /prompt-preset export-defaults\n /prompt-preset edit-global terse\n /prompt-preset base detailed\n /prompt-preset enable bullets\n\n Short alias: /preset\n\n Editable preset files:\n ~/.pi/agent/presets/*.md\n .pi/presets/*.md\n`;\n\nasync function render_rich_usage<T extends ArgsDef>(\n\tcmd: CommandDef<T>,\n\tparent?: CommandDef<T>,\n): Promise<string> {\n\treturn `${await renderUsage(cmd, parent)}\\n${HELP_APPENDIX}`;\n}\n\nasync function print_usage<T extends ArgsDef>(\n\tcmd: CommandDef<T>,\n\tparent?: CommandDef<T>,\n): Promise<void> {\n\tconsole.log(await render_rich_usage(cmd, parent));\n}\n\nconst main = defineCommand({\n\tmeta: {\n\t\tname: 'my-pi',\n\t\tversion: pkg.version,\n\t\tdescription:\n\t\t\t'Composable pi coding agent with MCP, LSP, presets, and local eval telemetry',\n\t},\n\targs: {\n\t\tprint: {\n\t\t\ttype: 'boolean',\n\t\t\talias: 'P',\n\t\t\tdescription: 'Print mode (non-interactive, one-shot)',\n\t\t\tdefault: false,\n\t\t},\n\t\t'agent-dir': {\n\t\t\ttype: 'string',\n\t\t\tdescription:\n\t\t\t\t'Override Pi auth/config/session directory for this process',\n\t\t\trequired: false,\n\t\t},\n\t\t'session-dir': {\n\t\t\ttype: 'string',\n\t\t\tdescription:\n\t\t\t\t'Override Pi session storage directory for this process',\n\t\t\trequired: false,\n\t\t},\n\t\tjson: {\n\t\t\ttype: 'boolean',\n\t\t\talias: 'j',\n\t\t\tdescription: 'Output NDJSON events (for agent consumption)',\n\t\t\tdefault: false,\n\t\t},\n\t\tmode: {\n\t\t\ttype: 'string',\n\t\t\tdescription: 'Runtime mode: interactive, print, json, or rpc',\n\t\t\trequired: false,\n\t\t},\n\t\textension: {\n\t\t\ttype: 'string',\n\t\t\talias: 'e',\n\t\t\tdescription:\n\t\t\t\t'Extension path to load; repeatable via argv parsing',\n\t\t\trequired: false,\n\t\t},\n\t\t'no-builtin': {\n\t\t\ttype: 'boolean',\n\t\t\tdescription: 'Disable all built-in extensions',\n\t\t\tdefault: false,\n\t\t},\n\t\tuntrusted: {\n\t\t\ttype: 'boolean',\n\t\t\tdescription:\n\t\t\t\t'Safe mode for unknown repos: skip project MCP, hooks, project prompt presets, project skills, and project LSP binaries unless explicitly re-enabled',\n\t\t\tdefault: false,\n\t\t},\n\t\t...create_builtin_disable_cli_args(),\n\t\ttelemetry: {\n\t\t\ttype: 'boolean',\n\t\t\tdescription: 'Enable local SQLite telemetry for this process',\n\t\t\tdefault: false,\n\t\t},\n\t\t'no-telemetry': {\n\t\t\ttype: 'boolean',\n\t\t\tdescription: 'Disable local SQLite telemetry for this process',\n\t\t\tdefault: false,\n\t\t},\n\t\t'telemetry-db': {\n\t\t\ttype: 'string',\n\t\t\tdescription:\n\t\t\t\t'Override telemetry database path for this process',\n\t\t\trequired: false,\n\t\t},\n\t\tmodel: {\n\t\t\ttype: 'string',\n\t\t\talias: 'm',\n\t\t\tdescription:\n\t\t\t\t'Model to use (e.g. claude-sonnet-4-5-20241022, gpt-5.4, cloudflare-workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast)',\n\t\t},\n\t\tthinking: {\n\t\t\ttype: 'string',\n\t\t\tdescription:\n\t\t\t\t'Thinking level: off, minimal, low, medium, high, or xhigh',\n\t\t\trequired: false,\n\t\t},\n\t\ttools: {\n\t\t\ttype: 'string',\n\t\t\talias: 't',\n\t\t\tdescription:\n\t\t\t\t'Comma-separated allowlist of tool names to enable',\n\t\t\trequired: false,\n\t\t},\n\t\t'exclude-tools': {\n\t\t\ttype: 'string',\n\t\t\talias: 'xt',\n\t\t\tdescription: 'Comma-separated list of tool names to disable',\n\t\t\trequired: false,\n\t\t},\n\t\tsession: {\n\t\t\ttype: 'string',\n\t\t\tdescription: 'Resume a specific session file or session ID',\n\t\t\trequired: false,\n\t\t},\n\t\t'session-id': {\n\t\t\ttype: 'string',\n\t\t\tdescription:\n\t\t\t\t'Create or resume an exact project-local session ID',\n\t\t\trequired: false,\n\t\t},\n\t\tname: {\n\t\t\ttype: 'string',\n\t\t\talias: 'n',\n\t\t\tdescription: 'Set the session display name at startup',\n\t\t\trequired: false,\n\t\t},\n\t\tskill: {\n\t\t\ttype: 'string',\n\t\t\tdescription: 'Skill name to allow; repeatable in argv parsing',\n\t\t\trequired: false,\n\t\t},\n\t\t'system-prompt': {\n\t\t\ttype: 'string',\n\t\t\tdescription: 'Replace the base system prompt',\n\t\t\trequired: false,\n\t\t},\n\t\t'append-system-prompt': {\n\t\t\ttype: 'string',\n\t\t\tdescription: 'Append one-off instructions to the system prompt',\n\t\t\trequired: false,\n\t\t},\n\t\tprompt: {\n\t\t\ttype: 'string',\n\t\t\talias: 'p',\n\t\t\tdescription: 'Prompt text (alternative to positional argument)',\n\t\t\trequired: false,\n\t\t},\n\t},\n\tasync run({ args }) {\n\t\tconst cwd = process.cwd();\n\t\tconst parsed_extension_cli = parse_extension_cli_args(\n\t\t\tprocess.argv.slice(2),\n\t\t\tmain.args as CliArgDefinitions,\n\t\t);\n\t\tif (parsed_extension_cli.diagnostics.length) {\n\t\t\tfor (const message of parsed_extension_cli.diagnostics)\n\t\t\t\tconsole.error(`Error: ${message}`);\n\t\t\tprocess.exit(1);\n\t\t}\n\t\tconst extension_paths = parse_extension_paths(process.argv, cwd);\n\t\tconst selected_tools = parse_tool_allowlist(process.argv);\n\t\tconst excluded_tools = parse_tool_excludelist(process.argv);\n\t\tconst selected_skills = parse_skill_allowlist(process.argv);\n\t\tlet selected_thinking;\n\t\ttry {\n\t\t\tselected_thinking = parse_thinking_level(args.thinking);\n\t\t} catch (error) {\n\t\t\tconsole.error(\n\t\t\t\terror instanceof Error ? error.message : String(error),\n\t\t\t);\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tlet runtime_mode: 'interactive' | 'print' | 'json' | 'rpc' =\n\t\t\t'interactive';\n\t\tif (args.mode) {\n\t\t\tconst requested = String(args.mode).trim().toLowerCase();\n\t\t\tif (\n\t\t\t\t!['interactive', 'print', 'json', 'rpc'].includes(requested)\n\t\t\t) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t'Error: --mode must be one of interactive, print, json, rpc.',\n\t\t\t\t);\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\t\t\truntime_mode = requested as\n\t\t\t\t| 'interactive'\n\t\t\t\t| 'print'\n\t\t\t\t| 'json'\n\t\t\t\t| 'rpc';\n\t\t}\n\t\tif (args.json) runtime_mode = 'json';\n\t\telse if (args.print) runtime_mode = 'print';\n\n\t\tconst positionals = parsed_extension_cli.positionals;\n\t\tif (positionals?.[0] === 'observability') {\n\t\t\tconst { start_observability_server } =\n\t\t\t\tawait import('@spences10/pi-observability/server');\n\t\t\tstart_observability_server();\n\t\t\treturn;\n\t\t}\n\n\t\t// Resolve prompt: named --prompt flag > positional > stdin\n\t\tlet prompt = args.prompt;\n\t\tif (!prompt && positionals && positionals.length > 0) {\n\t\t\tprompt = positionals[0];\n\t\t}\n\t\tif (!prompt && !process.stdin.isTTY && runtime_mode !== 'rpc') {\n\t\t\tprompt = await read_stdin();\n\t\t}\n\t\tif (prompt && runtime_mode === 'interactive')\n\t\t\truntime_mode = 'print';\n\n\t\tif (\n\t\t\t!args.print &&\n\t\t\t!args.json &&\n\t\t\truntime_mode !== 'rpc' &&\n\t\t\t!prompt &&\n\t\t\t!process.stdout.isTTY\n\t\t) {\n\t\t\tawait print_usage(main);\n\t\t\treturn;\n\t\t}\n\n\t\t// Startup feedback so silence = broken (issue #3)\n\t\tif (runtime_mode !== 'interactive') {\n\t\t\tprocess.stderr.write(\n\t\t\t\t`my-pi: connecting to ${args.model || 'default model'}...\\n`,\n\t\t\t);\n\t\t}\n\n\t\tif (args.telemetry && args['no-telemetry']) {\n\t\t\tconsole.error(\n\t\t\t\t'Error: --telemetry and --no-telemetry cannot be used together.',\n\t\t\t);\n\t\t\tprocess.exit(1);\n\t\t}\n\t\tif (args.session && args['session-id']) {\n\t\t\tconsole.error(\n\t\t\t\t'Error: --session and --session-id cannot be used together.',\n\t\t\t);\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tlet telemetry_override: boolean | undefined;\n\t\tif (args.telemetry) {\n\t\t\ttelemetry_override = true;\n\t\t} else if (args['no-telemetry']) {\n\t\t\ttelemetry_override = false;\n\t\t}\n\n\t\tconst [\n\t\t\t{ create_my_pi },\n\t\t\t{ InteractiveMode, runPrintMode, runRpcMode },\n\t\t] = await Promise.all([\n\t\t\timport('./api.js'),\n\t\t\timport('@earendil-works/pi-coding-agent'),\n\t\t]);\n\n\t\tconst runtime = await create_my_pi({\n\t\t\tcwd,\n\t\t\tagent_dir: args['agent-dir'],\n\t\t\tsession_dir: args['session-dir'],\n\t\t\textensions: extension_paths,\n\t\t\textension_flag_values:\n\t\t\t\tparsed_extension_cli.extension_flag_values,\n\t\t\truntime_mode,\n\t\t\t...resolve_builtin_extension_options(args),\n\t\t\ttelemetry: telemetry_override,\n\t\t\ttelemetry_db_path: args['telemetry-db'],\n\t\t\tmodel: args.model,\n\t\t\tthinking: selected_thinking,\n\t\t\tselected_tools,\n\t\t\texcluded_tools,\n\t\t\tselected_skills,\n\t\t\tsession: args.session,\n\t\t\tsession_id: args['session-id'],\n\t\t\tstartup_session_name: args.name,\n\t\t\tsystem_prompt: args['system-prompt'],\n\t\t\tappend_system_prompt: args['append-system-prompt'],\n\t\t\tuntrusted_repo: args.untrusted,\n\t\t});\n\n\t\tfor (const diagnostic of runtime.diagnostics) {\n\t\t\tconst prefix =\n\t\t\t\tdiagnostic.type === 'error'\n\t\t\t\t\t? 'Error: '\n\t\t\t\t\t: diagnostic.type === 'warning'\n\t\t\t\t\t\t? 'Warning: '\n\t\t\t\t\t\t: '';\n\t\t\tconsole.error(`${prefix}${diagnostic.message}`);\n\t\t}\n\t\tif (\n\t\t\truntime.diagnostics.some(\n\t\t\t\t(diagnostic) => diagnostic.type === 'error',\n\t\t\t)\n\t\t) {\n\t\t\tawait runtime.dispose();\n\t\t\tprocess.exit(1);\n\t\t}\n\n\t\tif (runtime_mode === 'rpc') {\n\t\t\tawait runRpcMode(runtime);\n\t\t} else if (args.print || args.json || prompt) {\n\t\t\tlet output_mode: 'json' | 'text' = 'text';\n\t\t\tif (args.json) {\n\t\t\t\toutput_mode = 'json';\n\t\t\t}\n\t\t\tconst code = await runPrintMode(runtime, {\n\t\t\t\tmode: output_mode,\n\t\t\t\tinitialMessage: prompt || '',\n\t\t\t\tinitialImages: [],\n\t\t\t\tmessages: [],\n\t\t\t});\n\t\t\tprocess.exit(code);\n\t\t} else if (!process.stdout.isTTY) {\n\t\t\tawait print_usage(main);\n\t\t} else {\n\t\t\tawait run_interactive_mode(runtime, InteractiveMode);\n\t\t}\n\t},\n});\n\nvoid runMain(main, {\n\tshowUsage: async (cmd, parent) => {\n\t\tawait print_usage(cmd, parent);\n\t},\n});\n"],"mappings":";;;;;;;AAMA,MAAM,kCAAkB,IAAI,IAAI;CAC/B;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AAgCD,SAAgB,kCAAyD;CACxE,OAAO,OAAO,YACb,mBAAmB,KAAK,cAAc,CACrC,UAAU,SACV;EACC,MAAM;EACN,aAAa,UAAU;EACvB,SAAS;CACV,CAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEtB,eAAe,kBACd,KACA,QACkB;CAClB,OAAO,GAAG,MAAM,YAAY,KAAK,MAAM,EAAE,IAAI;AAC9C;AAEA,eAAe,YACd,KACA,QACgB;CAChB,QAAQ,IAAI,MAAM,kBAAkB,KAAK,MAAM,CAAC;AACjD;AAEA,MAAM,OAAO,cAAc;CAC1B,MAAM;EACL,MAAM;EACN,SAAS,IAAI;EACb,aACC;CACF;CACA,MAAM;EACL,OAAO;GACN,MAAM;GACN,OAAO;GACP,aAAa;GACb,SAAS;EACV;EACA,aAAa;GACZ,MAAM;GACN,aACC;GACD,UAAU;EACX;EACA,eAAe;GACd,MAAM;GACN,aACC;GACD,UAAU;EACX;EACA,MAAM;GACL,MAAM;GACN,OAAO;GACP,aAAa;GACb,SAAS;EACV;EACA,MAAM;GACL,MAAM;GACN,aAAa;GACb,UAAU;EACX;EACA,WAAW;GACV,MAAM;GACN,OAAO;GACP,aACC;GACD,UAAU;EACX;EACA,cAAc;GACb,MAAM;GACN,aAAa;GACb,SAAS;EACV;EACA,WAAW;GACV,MAAM;GACN,aACC;GACD,SAAS;EACV;EACA,GAAG,gCAAgC;EACnC,WAAW;GACV,MAAM;GACN,aAAa;GACb,SAAS;EACV;EACA,gBAAgB;GACf,MAAM;GACN,aAAa;GACb,SAAS;EACV;EACA,gBAAgB;GACf,MAAM;GACN,aACC;GACD,UAAU;EACX;EACA,OAAO;GACN,MAAM;GACN,OAAO;GACP,aACC;EACF;EACA,UAAU;GACT,MAAM;GACN,aACC;GACD,UAAU;EACX;EACA,OAAO;GACN,MAAM;GACN,OAAO;GACP,aACC;GACD,UAAU;EACX;EACA,iBAAiB;GAChB,MAAM;GACN,OAAO;GACP,aAAa;GACb,UAAU;EACX;EACA,SAAS;GACR,MAAM;GACN,aAAa;GACb,UAAU;EACX;EACA,cAAc;GACb,MAAM;GACN,aACC;GACD,UAAU;EACX;EACA,MAAM;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AAa;GAC7C,MAAM,SACL,WAAW,SAAS,UACjB,YACA,WAAW,SAAS,YACnB,cACA;GACL,QAAQ,MAAM,GAAG,SAAS,WAAW,SAAS;EAC/C;EACA,IACC,QAAQ,YAAY,MAClB,eAAe,WAAW,SAAS,OACrC,GACC;GACD,MAAM,QAAQ,QAAQ;GACtB,QAAQ,KAAK,CAAC;EACf;EAEA,IAAI,iBAAiB,OACpB,MAAM,WAAW,OAAO;OAClB,IAAI,KAAK,SAAS,KAAK,QAAQ,QAAQ;GAC7C,IAAI,cAA+B;GACnC,IAAI,KAAK,MACR,cAAc;GAEf,MAAM,OAAO,MAAM,aAAa,SAAS;IACxC,MAAM;IACN,gBAAgB,UAAU;IAC1B,eAAe,CAAC;IAChB,UAAU,CAAC;GACZ,CAAC;GACD,QAAQ,KAAK,IAAI;EAClB,OAAO,IAAI,CAAC,QAAQ,OAAO,OAC1B,MAAM,YAAY,IAAI;OAEtB,MAAM,qBAAqB,SAAS,eAAe;CAErD;AACD,CAAC;AAEI,QAAQ,MAAM,EAClB,WAAW,OAAO,KAAK,WAAW;CACjC,MAAM,YAAY,KAAK,MAAM;AAC9B,EACD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "my-pi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Composable pi coding agent with MCP, LSP, prompt presets, and local eval telemetry",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@earendil-works/pi-ai": "0.
|
|
47
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
48
|
-
"@earendil-works/pi-tui": "0.
|
|
46
|
+
"@earendil-works/pi-ai": "0.85.1",
|
|
47
|
+
"@earendil-works/pi-coding-agent": "0.85.1",
|
|
48
|
+
"@earendil-works/pi-tui": "0.85.1",
|
|
49
49
|
"@spences10/pi-project-trust": "0.0.19",
|
|
50
50
|
"@spences10/pi-settings": "0.0.3",
|
|
51
51
|
"@spences10/pi-themes": "0.0.10",
|
|
@@ -56,22 +56,22 @@
|
|
|
56
56
|
"@changesets/cli": "^3.0.0",
|
|
57
57
|
"@resvg/resvg-js": "^2.6.2",
|
|
58
58
|
"@types/node": "^25.8.0",
|
|
59
|
-
"@vitest/coverage-v8": "
|
|
59
|
+
"@vitest/coverage-v8": "5.0.0",
|
|
60
60
|
"vite-plus": "^0.3.0",
|
|
61
|
-
"vitest": "
|
|
61
|
+
"vitest": "5.0.0"
|
|
62
62
|
},
|
|
63
63
|
"optionalDependencies": {
|
|
64
64
|
"@spences10/pi-child-env": "0.1.10",
|
|
65
65
|
"@spences10/pi-codex-usage": "0.0.2",
|
|
66
66
|
"@spences10/pi-coding-preferences": "0.0.15",
|
|
67
|
-
"@spences10/pi-confirm-destructive": "0.0.
|
|
67
|
+
"@spences10/pi-confirm-destructive": "0.0.21",
|
|
68
68
|
"@spences10/pi-context": "0.1.16",
|
|
69
|
-
"@spences10/pi-factory": "0.0.
|
|
69
|
+
"@spences10/pi-factory": "0.0.16",
|
|
70
70
|
"@spences10/pi-footer": "0.0.16",
|
|
71
71
|
"@spences10/pi-git-ui": "0.0.16",
|
|
72
|
-
"@spences10/pi-harness": "0.1.
|
|
72
|
+
"@spences10/pi-harness": "0.1.1",
|
|
73
73
|
"@spences10/pi-kimi-usage": "0.0.2",
|
|
74
|
-
"@spences10/pi-lsp": "0.0.
|
|
74
|
+
"@spences10/pi-lsp": "0.0.47",
|
|
75
75
|
"@spences10/pi-mcp": "0.0.60",
|
|
76
76
|
"@spences10/pi-nopeek": "0.0.16",
|
|
77
77
|
"@spences10/pi-observability": "0.0.23",
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"@spences10/pi-skill-importer": "0.0.13",
|
|
82
82
|
"@spences10/pi-skills": "0.0.36",
|
|
83
83
|
"@spences10/pi-sqlite-tools": "0.0.15",
|
|
84
|
+
"@spences10/pi-starfield": "0.0.1",
|
|
84
85
|
"@spences10/pi-svelte-guardrails": "0.0.16",
|
|
85
86
|
"@spences10/pi-team-mode": "0.0.57",
|
|
86
87
|
"@spences10/pi-telemetry": "0.0.33"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builtin-registry-D0Y9F9lN.js","names":[],"sources":["../src/extensions/builtin-registry.ts"],"sourcesContent":["import type { ExtensionFactory } from '@earendil-works/pi-coding-agent';\n\nexport type BuiltinExtensionRuntimeMode =\n\t| 'interactive'\n\t| 'print'\n\t| 'json'\n\t| 'rpc';\n\ntype BuiltinExtensionLoader = () => Promise<ExtensionFactory>;\n\nexport interface BuiltinExtensionManifestEntry {\n\tkey: string;\n\tlabel: string;\n\tdocs_label: string;\n\tdescription: string;\n\tdefault_enabled: boolean;\n\toption_name: string;\n\tcli_arg: string;\n\tcli_flag: `--${string}`;\n\tcli_description: string;\n\taliases: readonly string[];\n\tmode_constraints?: {\n\t\tdisabled_in: readonly BuiltinExtensionRuntimeMode[];\n\t\treason: string;\n\t};\n\texternal_package_name?: string;\n\tload: BuiltinExtensionLoader;\n}\n\nexport const BUILTIN_EXTENSION_REGISTRY = [\n\t{\n\t\tkey: 'context-sidecar',\n\t\tlabel: 'Context sidecar',\n\t\tdocs_label: 'SQLite context sidecar',\n\t\tdescription: 'Local SQLite FTS sidecar for oversized tool output',\n\t\tdefault_enabled: true,\n\t\toption_name: 'context_sidecar',\n\t\tcli_arg: 'no-context-sidecar',\n\t\tcli_flag: '--no-context-sidecar',\n\t\tcli_description:\n\t\t\t'Disable SQLite context sidecar for large tool output',\n\t\taliases: ['context-sidecar', 'context', 'sidecar'],\n\t\texternal_package_name: '@spences10/pi-context',\n\t\tload: async () => (await import('@spences10/pi-context')).default,\n\t},\n\t{\n\t\tkey: 'mcp',\n\t\tlabel: 'MCP',\n\t\tdocs_label: 'MCP',\n\t\tdescription: 'MCP server integration and /mcp command',\n\t\tdefault_enabled: true,\n\t\toption_name: 'mcp',\n\t\tcli_arg: 'no-mcp',\n\t\tcli_flag: '--no-mcp',\n\t\tcli_description: 'Disable built-in MCP extension',\n\t\taliases: ['mcp'],\n\t\texternal_package_name: '@spences10/pi-mcp',\n\t\tload: async () => (await import('@spences10/pi-mcp')).default,\n\t},\n\t{\n\t\tkey: 'openrouter-fusion-config',\n\t\tlabel: 'OpenRouter Fusion config',\n\t\tdocs_label: 'OpenRouter Fusion config guard',\n\t\tdescription:\n\t\t\t'Keeps OpenRouter Fusion off Anthropic by injecting a non-Anthropic panel and judge',\n\t\tdefault_enabled: true,\n\t\toption_name: 'openrouter_fusion_config',\n\t\tcli_arg: 'no-openrouter-fusion-config',\n\t\tcli_flag: '--no-openrouter-fusion-config',\n\t\tcli_description: 'Disable OpenRouter Fusion non-Anthropic config',\n\t\taliases: ['openrouter-fusion-config', 'fusion-budget'],\n\t\tload: async () =>\n\t\t\t(await import('./openrouter-fusion-config/index.js')).default,\n\t},\n\t{\n\t\tkey: 'umans-provider',\n\t\tlabel: 'Umans provider',\n\t\tdocs_label: 'Umans provider',\n\t\tdescription:\n\t\t\t'Umans.ai Anthropic Messages provider with API key login support',\n\t\tdefault_enabled: true,\n\t\toption_name: 'umans_provider',\n\t\tcli_arg: 'no-umans-provider',\n\t\tcli_flag: '--no-umans-provider',\n\t\tcli_description: 'Disable built-in Umans provider',\n\t\taliases: ['umans-provider', 'umans'],\n\t\tload: async () =>\n\t\t\t(await import('./umans-provider/index.js')).default,\n\t},\n\t{\n\t\tkey: 'footer',\n\t\tlabel: 'Footer',\n\t\tdocs_label: 'Footer',\n\t\tdescription: 'Configurable interactive footer/statusline',\n\t\tdefault_enabled: true,\n\t\toption_name: 'footer',\n\t\tcli_arg: 'no-footer',\n\t\tcli_flag: '--no-footer',\n\t\tcli_description: 'Disable custom footer/statusline',\n\t\taliases: ['footer', 'statusline', 'status-line'],\n\t\tmode_constraints: {\n\t\t\tdisabled_in: ['print', 'json', 'rpc'],\n\t\t\treason: 'Footer only renders in the interactive TUI',\n\t\t},\n\t\tload: async () => (await import('./footer/index.js')).default,\n\t},\n\t{\n\t\tkey: 'codex-usage',\n\t\tlabel: 'Codex usage',\n\t\tdocs_label: 'Codex usage status',\n\t\tdescription: 'OpenAI Codex usage status for the footer',\n\t\tdefault_enabled: true,\n\t\toption_name: 'codex_usage',\n\t\tcli_arg: 'no-codex-usage',\n\t\tcli_flag: '--no-codex-usage',\n\t\tcli_description: 'Disable Codex usage footer status',\n\t\taliases: ['codex-usage', 'codex-status'],\n\t\texternal_package_name: '@spences10/pi-codex-usage',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-codex-usage')).default,\n\t},\n\t{\n\t\tkey: 'kimi-usage',\n\t\tlabel: 'Kimi usage',\n\t\tdocs_label: 'Kimi usage status',\n\t\tdescription: 'Kimi For Coding usage status for the footer',\n\t\tdefault_enabled: true,\n\t\toption_name: 'kimi_usage',\n\t\tcli_arg: 'no-kimi-usage',\n\t\tcli_flag: '--no-kimi-usage',\n\t\tcli_description: 'Disable Kimi usage footer status',\n\t\taliases: ['kimi-usage', 'kimi-status'],\n\t\texternal_package_name: '@spences10/pi-kimi-usage',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-kimi-usage')).default,\n\t},\n\t{\n\t\tkey: 'harness',\n\t\tlabel: 'Harness',\n\t\tdocs_label: 'Task harness runtime',\n\t\tdescription:\n\t\t\t'Ephemeral /tmp task harness runtime with tools, enforcement, and bundled skills',\n\t\tdefault_enabled: true,\n\t\toption_name: 'harness',\n\t\tcli_arg: 'no-harness',\n\t\tcli_flag: '--no-harness',\n\t\tcli_description: 'Disable task harness runtime',\n\t\taliases: ['harness', 'task-harness'],\n\t\texternal_package_name: '@spences10/pi-harness',\n\t\tload: async () => (await import('@spences10/pi-harness')).default,\n\t},\n\t{\n\t\tkey: 'factory',\n\t\tlabel: 'Software factory (experimental)',\n\t\tdocs_label: 'Experimental software-factory control plane',\n\t\tdescription:\n\t\t\t'Paused experimental workflow control plane; enable explicitly for Factory v1 evaluation only',\n\t\tdefault_enabled: false,\n\t\toption_name: 'factory',\n\t\tcli_arg: 'no-factory',\n\t\tcli_flag: '--no-factory',\n\t\tcli_description: 'Disable software-factory control plane',\n\t\taliases: ['factory', 'software-factory', 'control-plane'],\n\t\texternal_package_name: '@spences10/pi-factory',\n\t\tload: async () => (await import('@spences10/pi-factory')).default,\n\t},\n\t{\n\t\tkey: 'skills',\n\t\tlabel: 'Skills',\n\t\tdocs_label: 'Skills',\n\t\tdescription: 'Managed pi-native skills and /skills command',\n\t\tdefault_enabled: true,\n\t\toption_name: 'skills',\n\t\tcli_arg: 'no-skills',\n\t\tcli_flag: '--no-skills',\n\t\tcli_description: 'Disable built-in skills extension',\n\t\taliases: ['skills', 'skill'],\n\t\texternal_package_name: '@spences10/pi-skills',\n\t\tload: async () => (await import('@spences10/pi-skills')).default,\n\t},\n\t{\n\t\tkey: 'skill-importer',\n\t\tlabel: 'Skill importer',\n\t\tdocs_label: 'Skill importer',\n\t\tdescription:\n\t\t\t'Import external Claude/plugin skills into Pi-native storage',\n\t\tdefault_enabled: true,\n\t\toption_name: 'skill_importer',\n\t\tcli_arg: 'no-skill-importer',\n\t\tcli_flag: '--no-skill-importer',\n\t\tcli_description: 'Disable external skill importer extension',\n\t\taliases: ['skill-importer', 'import-skills', 'skill-import'],\n\t\texternal_package_name: '@spences10/pi-skill-importer',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-skill-importer')).default,\n\t},\n\t{\n\t\tkey: 'filter-output',\n\t\tlabel: 'Secret redaction',\n\t\tdocs_label: 'Secret redaction',\n\t\tdescription:\n\t\t\t'Redacts secrets from tool output before the model sees them',\n\t\tdefault_enabled: true,\n\t\toption_name: 'filter_output',\n\t\tcli_arg: 'no-filter',\n\t\tcli_flag: '--no-filter',\n\t\tcli_description: 'Disable secret redaction in tool output',\n\t\taliases: [\n\t\t\t'filter-output',\n\t\t\t'filter_output',\n\t\t\t'filter',\n\t\t\t'redaction',\n\t\t\t'secret-redaction',\n\t\t\t'output-redaction',\n\t\t],\n\t\texternal_package_name: '@spences10/pi-redact',\n\t\tload: async () => (await import('@spences10/pi-redact')).default,\n\t},\n\t{\n\t\tkey: 'recall',\n\t\tlabel: 'Recall',\n\t\tdocs_label: 'Recall',\n\t\tdescription: 'pirecall reminder and background session sync',\n\t\tdefault_enabled: true,\n\t\toption_name: 'recall',\n\t\tcli_arg: 'no-recall',\n\t\tcli_flag: '--no-recall',\n\t\tcli_description: 'Disable recall extension',\n\t\taliases: ['recall', 'pirecall'],\n\t\texternal_package_name: '@spences10/pi-recall',\n\t\tload: async () => (await import('@spences10/pi-recall')).default,\n\t},\n\t{\n\t\tkey: 'nopeek',\n\t\tlabel: 'Nopeek',\n\t\tdocs_label: 'Nopeek',\n\t\tdescription:\n\t\t\t'nopeek reminder for secret-safe environment loading',\n\t\tdefault_enabled: true,\n\t\toption_name: 'nopeek',\n\t\tcli_arg: 'no-nopeek',\n\t\tcli_flag: '--no-nopeek',\n\t\tcli_description: 'Disable nopeek reminder extension',\n\t\taliases: ['nopeek', 'secrets', 'secret-loading'],\n\t\texternal_package_name: '@spences10/pi-nopeek',\n\t\tload: async () => (await import('@spences10/pi-nopeek')).default,\n\t},\n\t{\n\t\tkey: 'observability',\n\t\tlabel: 'Observability',\n\t\tdocs_label: 'Live observability',\n\t\tdescription:\n\t\t\t'Optional live event stream and local browser dashboard',\n\t\tdefault_enabled: true,\n\t\toption_name: 'observability',\n\t\tcli_arg: 'no-observability',\n\t\tcli_flag: '--no-observability',\n\t\tcli_description: 'Disable live observability extension',\n\t\taliases: ['observability', 'obs', 'live-events'],\n\t\texternal_package_name: '@spences10/pi-observability',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-observability')).default,\n\t},\n\t{\n\t\tkey: 'omnisearch',\n\t\tlabel: 'Omnisearch',\n\t\tdocs_label: 'Omnisearch',\n\t\tdescription: 'mcp-omnisearch reminder for verified web research',\n\t\tdefault_enabled: true,\n\t\toption_name: 'omnisearch',\n\t\tcli_arg: 'no-omnisearch',\n\t\tcli_flag: '--no-omnisearch',\n\t\tcli_description: 'Disable mcp-omnisearch reminder extension',\n\t\taliases: ['omnisearch', 'search', 'web-search', 'research'],\n\t\texternal_package_name: '@spences10/pi-omnisearch',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-omnisearch')).default,\n\t},\n\t{\n\t\tkey: 'sqlite-tools',\n\t\tlabel: 'SQLite tools',\n\t\tdocs_label: 'SQLite tools',\n\t\tdescription:\n\t\t\t'mcp-sqlite-tools reminder for safer SQLite database work',\n\t\tdefault_enabled: true,\n\t\toption_name: 'sqlite_tools',\n\t\tcli_arg: 'no-sqlite-tools',\n\t\tcli_flag: '--no-sqlite-tools',\n\t\tcli_description: 'Disable mcp-sqlite-tools reminder extension',\n\t\taliases: ['sqlite-tools', 'sqlite', 'mcp-sqlite-tools'],\n\t\texternal_package_name: '@spences10/pi-sqlite-tools',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-sqlite-tools')).default,\n\t},\n\t{\n\t\tkey: 'startup-screen',\n\t\tlabel: 'Startup screen',\n\t\tdocs_label: 'Startup screen',\n\t\tdescription:\n\t\t\t'Pixel-art gradient startup header for interactive sessions',\n\t\tdefault_enabled: true,\n\t\toption_name: 'startup_screen',\n\t\tcli_arg: 'no-startup-screen',\n\t\tcli_flag: '--no-startup-screen',\n\t\tcli_description: 'Disable the custom startup screen',\n\t\taliases: ['startup-screen', 'startup', 'header', 'splash'],\n\t\tmode_constraints: {\n\t\t\tdisabled_in: ['print', 'json', 'rpc'],\n\t\t\treason: 'Startup screen only renders in the interactive TUI',\n\t\t},\n\t\tload: async () =>\n\t\t\t(await import('./startup-screen/index.js')).default,\n\t},\n\t{\n\t\tkey: 'prompt-presets',\n\t\tlabel: 'Prompt presets',\n\t\tdocs_label: 'Prompt presets',\n\t\tdescription:\n\t\t\t'Runtime prompt preset selection and /prompt-preset command',\n\t\tdefault_enabled: true,\n\t\toption_name: 'prompt_presets',\n\t\tcli_arg: 'no-prompt-presets',\n\t\tcli_flag: '--no-prompt-presets',\n\t\tcli_description: 'Disable prompt presets extension',\n\t\taliases: ['prompt-preset', 'preset', 'presets'],\n\t\tload: async () =>\n\t\t\t(await import('./prompt-presets/index.js')).default,\n\t},\n\t{\n\t\tkey: 'turn-timer',\n\t\tlabel: 'Turn timer',\n\t\tdocs_label: 'Turn timer',\n\t\tdescription:\n\t\t\t'Live elapsed timer beside the working spinner with persisted turn durations',\n\t\tdefault_enabled: true,\n\t\toption_name: 'turn_timer',\n\t\tcli_arg: 'no-turn-timer',\n\t\tcli_flag: '--no-turn-timer',\n\t\tcli_description: 'Disable the working spinner turn timer',\n\t\taliases: ['turn-timer', 'timer', 'elapsed-time'],\n\t\tmode_constraints: {\n\t\t\tdisabled_in: ['print', 'json', 'rpc'],\n\t\t\treason: 'The live timer is only useful in the interactive TUI',\n\t\t},\n\t\tload: async () => (await import('./turn-timer/index.js')).default,\n\t},\n\t{\n\t\tkey: 'git-ui',\n\t\tlabel: 'Git UI',\n\t\tdocs_label: 'Git staging UI',\n\t\tdescription: 'Interactive source control staging panel',\n\t\tdefault_enabled: true,\n\t\toption_name: 'git_ui',\n\t\tcli_arg: 'no-git-ui',\n\t\tcli_flag: '--no-git-ui',\n\t\tcli_description: 'Disable built-in Git staging UI',\n\t\taliases: ['git-ui', 'git', 'source-control', 'scm'],\n\t\tmode_constraints: {\n\t\t\tdisabled_in: ['print', 'json', 'rpc'],\n\t\t\treason: 'Git UI is only useful in interactive mode',\n\t\t},\n\t\texternal_package_name: '@spences10/pi-git-ui',\n\t\tload: async () => (await import('@spences10/pi-git-ui')).default,\n\t},\n\t{\n\t\tkey: 'lsp',\n\t\tlabel: 'LSP',\n\t\tdocs_label: 'LSP',\n\t\tdescription:\n\t\t\t'Language Server Protocol tools (diagnostics, hover, definition, references)',\n\t\tdefault_enabled: true,\n\t\toption_name: 'lsp',\n\t\tcli_arg: 'no-lsp',\n\t\tcli_flag: '--no-lsp',\n\t\tcli_description: 'Disable LSP extension',\n\t\taliases: ['lsp', 'language-server'],\n\t\texternal_package_name: '@spences10/pi-lsp',\n\t\tload: async () => (await import('@spences10/pi-lsp')).default,\n\t},\n\t{\n\t\tkey: 'session-name',\n\t\tlabel: 'Session name',\n\t\tdocs_label: 'Session auto-naming',\n\t\tdescription:\n\t\t\t'AI-powered session auto-naming and /session-name command',\n\t\tdefault_enabled: true,\n\t\toption_name: 'session_name',\n\t\tcli_arg: 'no-session-name',\n\t\tcli_flag: '--no-session-name',\n\t\tcli_description: 'Disable session name extension',\n\t\taliases: ['session-name', 'session', 'auto-name'],\n\t\tmode_constraints: {\n\t\t\tdisabled_in: ['print', 'json', 'rpc'],\n\t\t\treason:\n\t\t\t\t'UI-only session naming is only useful in interactive mode',\n\t\t},\n\t\tload: async () =>\n\t\t\t(await import('./session-name/index.js')).default,\n\t},\n\t{\n\t\tkey: 'confirm-destructive',\n\t\tlabel: 'Confirm destructive',\n\t\tdocs_label: 'Destructive action confirmation',\n\t\tdescription:\n\t\t\t'Prompt before destructive tool calls like file deletes, overwrites, and hard resets',\n\t\tdefault_enabled: true,\n\t\toption_name: 'confirm_destructive',\n\t\tcli_arg: 'no-confirm-destructive',\n\t\tcli_flag: '--no-confirm-destructive',\n\t\tcli_description: 'Disable destructive action confirmations',\n\t\taliases: ['confirm-destructive', 'confirm'],\n\t\texternal_package_name: '@spences10/pi-confirm-destructive',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-confirm-destructive')).default,\n\t},\n\t{\n\t\tkey: 'hooks-resolution',\n\t\tlabel: 'Hooks resolution',\n\t\tdocs_label: 'Hooks resolution',\n\t\tdescription:\n\t\t\t'Claude Code style PreToolUse and PostToolUse hook compatibility from .claude, .rulesync, and .pi configs',\n\t\tdefault_enabled: true,\n\t\toption_name: 'hooks_resolution',\n\t\tcli_arg: 'no-hooks',\n\t\tcli_flag: '--no-hooks',\n\t\tcli_description: 'Disable Claude-style hook execution',\n\t\taliases: ['hooks-resolution', 'hooks'],\n\t\tload: async () =>\n\t\t\t(await import('./hooks-resolution/index.js')).default,\n\t},\n\t{\n\t\tkey: 'svelte-guardrails',\n\t\tlabel: 'Svelte guardrails',\n\t\tdocs_label: 'Svelte guardrails',\n\t\tdescription:\n\t\t\t'Blocks discouraged Svelte patterns like $effect before agents write them',\n\t\tdefault_enabled: true,\n\t\toption_name: 'svelte_guardrails',\n\t\tcli_arg: 'no-svelte-guardrails',\n\t\tcli_flag: '--no-svelte-guardrails',\n\t\tcli_description: 'Disable Svelte guardrails',\n\t\taliases: ['svelte-guardrails', 'svelte'],\n\t\texternal_package_name: '@spences10/pi-svelte-guardrails',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-svelte-guardrails')).default,\n\t},\n\t{\n\t\tkey: 'coding-preferences',\n\t\tlabel: 'Coding preferences',\n\t\tdocs_label: 'Coding preferences',\n\t\tdescription:\n\t\t\t'Blocks configured coding workflow anti-patterns from JSON preferences',\n\t\tdefault_enabled: true,\n\t\toption_name: 'coding_preferences',\n\t\tcli_arg: 'no-coding-preferences',\n\t\tcli_flag: '--no-coding-preferences',\n\t\tcli_description: 'Disable coding preferences guardrails',\n\t\taliases: ['coding-preferences', 'preferences', 'prefs'],\n\t\texternal_package_name: '@spences10/pi-coding-preferences',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-coding-preferences')).default,\n\t},\n\t{\n\t\tkey: 'handoff',\n\t\tlabel: 'Handoff',\n\t\tdocs_label: 'Handoff',\n\t\tdescription:\n\t\t\t'Help command for Pi continuation primitives like /fork, /tree, /export, /import, and /share',\n\t\tdefault_enabled: true,\n\t\toption_name: 'handoff',\n\t\tcli_arg: 'no-handoff',\n\t\tcli_flag: '--no-handoff',\n\t\tcli_description: 'Disable handoff helper command',\n\t\taliases: ['handoff', 'continuation'],\n\t\tload: async () => (await import('./handoff/index.js')).default,\n\t},\n\t{\n\t\tkey: 'team-mode',\n\t\tlabel: 'Team mode',\n\t\tdocs_label: 'Team mode',\n\t\tdescription:\n\t\t\t'Peer coordination between independently opened Pi sessions with groups, artifacts, and durable mailboxes',\n\t\tdefault_enabled: true,\n\t\toption_name: 'team_mode',\n\t\tcli_arg: 'no-team-mode',\n\t\tcli_flag: '--no-team-mode',\n\t\tcli_description: 'Disable peer-session team mode extension',\n\t\taliases: ['team-mode', 'team', 'teammates'],\n\t\texternal_package_name: '@spences10/pi-team-mode',\n\t\tload: async () =>\n\t\t\t(await import('@spences10/pi-team-mode')).default,\n\t},\n] as const satisfies readonly BuiltinExtensionManifestEntry[];\n\nexport type BuiltinExtensionKey =\n\t(typeof BUILTIN_EXTENSION_REGISTRY)[number]['key'];\n\nexport type BuiltinExtensionOptionName =\n\t(typeof BUILTIN_EXTENSION_REGISTRY)[number]['option_name'];\n\nexport type BuiltinExtensionInfo = Omit<\n\tBuiltinExtensionManifestEntry,\n\t'load'\n> & {\n\tkey: BuiltinExtensionKey;\n\toption_name: BuiltinExtensionOptionName;\n};\n\nexport const BUILTIN_EXTENSIONS: BuiltinExtensionInfo[] =\n\tBUILTIN_EXTENSION_REGISTRY.map(\n\t\t({ load: _load, ...extension }) => extension,\n\t);\n"],"mappings":";AA6BA,MAAa,6BAA6B;CACzC;EACC,KAAK;EACL,OAAO;EACP,YAAY;EACZ,aAAa;EACb,iBAAiB;EACjB,aAAa;EACb,SAAS;EACT,UAAU;EACV,iBACC;EACD,SAAS;GAAC;GAAmB;GAAW;EAAS;EACjD,uBAAuB;EACvB,MAAM,aAAa,MAAM,OAAO,yBAAA,CAA0B;CAC3D;CACA;EACC,KAAK;EACL,OAAO;EACP,YAAY;EACZ,aAAa;EACb,iBAAiB;EACjB,aAAa;EACb,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,SAAS,CAAC,KAAK;EACf,uBAAuB;EACvB,MAAM,aAAa,MAAM,OAAO,qBAAA,CAAsB;CACvD;CACA;EACC,KAAK;EACL,OAAO;EACP,YAAY;EACZ,aAC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