my-pi 0.1.74 → 0.1.76

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 CHANGED
@@ -69,8 +69,9 @@ instructions, commands, configuration, and runtime behavior.
69
69
  per-project persistence.
70
70
  - **Secret safety** — redaction plus reminders to use secret-safe
71
71
  environment loading.
72
- - **Recall and telemetry** — local support for prior-session lookup,
73
- evals, latency analysis, and operational debugging.
72
+ - **Recall, telemetry, and observability** — local support for
73
+ prior-session lookup, evals, latency analysis, live event streams,
74
+ and operational debugging.
74
75
  - **Git UI** — interactive source-control staging and commit support.
75
76
  - **Team mode** — local RPC teammate orchestration with tasks and
76
77
  mailboxes.
@@ -84,10 +85,10 @@ instructions, commands, configuration, and runtime behavior.
84
85
  - Pi authentication via `pi auth`, provider environment variables, or
85
86
  supported OAuth flows
86
87
 
87
- `my-pi` uses native `node:sqlite` through context and telemetry
88
- packages. The CLI suppresses Node's expected `node:sqlite`
89
- `ExperimentalWarning`; standalone package/API consumers own their
90
- process warning policy until Node marks it stable.
88
+ `my-pi` uses native `node:sqlite` through context, telemetry, and
89
+ observability packages. The CLI suppresses Node's expected
90
+ `node:sqlite` `ExperimentalWarning`; standalone package/API consumers
91
+ own their process warning policy until Node marks it stable.
91
92
 
92
93
  ## Common usage
93
94
 
@@ -104,6 +105,11 @@ pnpx my-pi@latest --json "list all TODO comments"
104
105
 
105
106
  # RPC mode for team/agent orchestration
106
107
  pnpx my-pi@latest --mode rpc
108
+
109
+ # local live observability dashboard
110
+ pnpx my-pi@latest
111
+ # then run /observability in the TUI
112
+ pnpx my-pi@latest observability
107
113
  ```
108
114
 
109
115
  Pi handles model authentication natively. For provider-specific model
@@ -130,6 +136,7 @@ Full package list here:
130
136
  | [`@spences10/pi-lsp`](./packages/pi-lsp/README.md) | LSP-backed diagnostics and symbol tools |
131
137
  | [`@spences10/pi-mcp`](./packages/pi-mcp/README.md) | MCP server integration and `/mcp` |
132
138
  | [`@spences10/pi-nopeek`](./packages/pi-nopeek/README.md) | `nopeek` reminder for secret-safe environment loading |
139
+ | [`@spences10/pi-observability`](./packages/pi-observability/README.md) | Live local event stream and browser dashboard |
133
140
  | [`@spences10/pi-omnisearch`](./packages/pi-omnisearch/README.md) | `mcp-omnisearch` reminder for verified web research |
134
141
  | [`@spences10/pi-recall`](./packages/pi-recall/README.md) | `pirecall` reminder and background sync |
135
142
  | [`@spences10/pi-redact`](./packages/pi-redact/README.md) | Output redaction and `/redact-stats` |
package/dist/api.d.ts CHANGED
@@ -113,6 +113,18 @@ declare const BUILTIN_EXTENSION_REGISTRY: readonly [{
113
113
  readonly cli_description: "Disable nopeek reminder extension";
114
114
  readonly aliases: readonly ["nopeek", "secrets", "secret-loading"];
115
115
  readonly load: () => Promise<typeof import("@spences10/pi-nopeek").default>;
116
+ }, {
117
+ readonly key: "observability";
118
+ readonly label: "Observability";
119
+ readonly docs_label: "Live observability";
120
+ readonly description: "Optional live event stream and local browser dashboard";
121
+ readonly default_enabled: true;
122
+ readonly option_name: "observability";
123
+ readonly cli_arg: "no-observability";
124
+ readonly cli_flag: "--no-observability";
125
+ readonly cli_description: "Disable live observability extension";
126
+ readonly aliases: readonly ["observability", "obs", "live-events"];
127
+ readonly load: () => Promise<typeof import("@spences10/pi-observability").default>;
116
128
  }, {
117
129
  readonly key: "omnisearch";
118
130
  readonly label: "Omnisearch";
package/dist/api.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as BUILTIN_EXTENSION_REGISTRY, t as BUILTIN_EXTENSIONS } from "./builtin-registry-DBm8gws_.js";
1
+ import { n as BUILTIN_EXTENSION_REGISTRY, t as BUILTIN_EXTENSIONS } from "./builtin-registry-DWaASzvW.js";
2
2
  import { createRequire } from "node:module";
3
3
  import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
4
4
  import { basename, dirname, isAbsolute, join, resolve } from "node:path";
@@ -135,6 +135,23 @@ const BUILTIN_EXTENSION_REGISTRY = [
135
135
  ],
136
136
  load: async () => (await import("@spences10/pi-nopeek")).default
137
137
  },
138
+ {
139
+ key: "observability",
140
+ label: "Observability",
141
+ docs_label: "Live observability",
142
+ description: "Optional live event stream and local browser dashboard",
143
+ default_enabled: true,
144
+ option_name: "observability",
145
+ cli_arg: "no-observability",
146
+ cli_flag: "--no-observability",
147
+ cli_description: "Disable live observability extension",
148
+ aliases: [
149
+ "observability",
150
+ "obs",
151
+ "live-events"
152
+ ],
153
+ load: async () => (await import("@spences10/pi-observability")).default
154
+ },
138
155
  {
139
156
  key: "omnisearch",
140
157
  label: "Omnisearch",
@@ -368,4 +385,4 @@ const BUILTIN_EXTENSIONS = BUILTIN_EXTENSION_REGISTRY.map(({ load: _load, ...ext
368
385
  //#endregion
369
386
  export { BUILTIN_EXTENSION_REGISTRY as n, BUILTIN_EXTENSIONS as t };
370
387
 
371
- //# sourceMappingURL=builtin-registry-DBm8gws_.js.map
388
+ //# sourceMappingURL=builtin-registry-DWaASzvW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin-registry-DWaASzvW.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\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\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\tload: async () => (await import('@spences10/pi-mcp')).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: '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\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\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\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\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\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\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\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\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: '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\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\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\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\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\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'Experimental orchestrator/team mode with RPC teammates, tasks, and 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 experimental team mode extension',\n\t\taliases: ['team-mode', 'team', 'teammates'],\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":";AA4BA,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,MAAM,aAAa,MAAM,OAAO,0BAA0B;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,MAAM,aAAa,MAAM,OAAO,sBAAsB;CACvD;CACA;EACC,KAAK;EACL,OAAO;EACP,YAAY;EACZ,aAAa;EACb,iBAAiB;EACjB,aAAa;EACb,SAAS;EACT,UAAU;EACV,iBAAiB;EACjB,SAAS;GAAC;GAAU;GAAc;EAAa;EAC/C,kBAAkB;GACjB,aAAa;IAAC;IAAS;IAAQ;GAAK;GACpC,QAAQ;EACT;EACA,MAAM,aAAa,MAAM,OAAO,yBAAsB;CACvD;CACA;EACC,KAAK;EACL,OAAO;EACP,YAAY;EACZ,aA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AAiB;EACjB,SAAS;GAAC;GAAa;GAAQ;EAAW;EAC1C,MAAM,aACJ,MAAM,OAAO,4BAA4B;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-DBm8gws_.js";
2
+ import { t as BUILTIN_EXTENSIONS } from "./builtin-registry-DWaASzvW.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";
@@ -163,6 +163,7 @@ EXAMPLES
163
163
  echo "plan a login page" | my-pi --json
164
164
  my-pi --telemetry --json "run eval case"
165
165
  my-pi --telemetry --telemetry-db ./tmp/evals.db --json "run case"
166
+ my-pi observability
166
167
  my-pi --untrusted --agent-dir /tmp/pi-agent --json "run case"
167
168
  my-pi -e ./my-ext.ts -e ./other-ext.ts "hello"
168
169
  my-pi -m claude-haiku-4-5-20241022 "explain this file"
@@ -347,11 +348,14 @@ const main = defineCommand({
347
348
  }
348
349
  if (args.json) runtime_mode = "json";
349
350
  else if (args.print) runtime_mode = "print";
350
- let prompt = args.prompt;
351
- if (!prompt) {
352
- const positionals = args._;
353
- if (positionals && positionals.length > 0) prompt = positionals[0];
351
+ const positionals = args._;
352
+ if (positionals?.[0] === "observability") {
353
+ const { start_observability_server } = await import("@spences10/pi-observability/server");
354
+ start_observability_server();
355
+ return;
354
356
  }
357
+ let prompt = args.prompt;
358
+ if (!prompt && positionals && positionals.length > 0) prompt = positionals[0];
355
359
  if (!prompt && !process.stdin.isTTY && runtime_mode !== "rpc") prompt = await read_stdin();
356
360
  if (prompt && runtime_mode === "interactive") runtime_mode = "print";
357
361
  if (!args.print && !args.json && runtime_mode !== "rpc" && !prompt && !process.stdout.isTTY) {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/cli-args.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 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\nexport function resolve_builtin_extension_options(\n\targs: Record<string, unknown>,\n): Partial<Record<BuiltinExtensionOptionName, boolean>> {\n\tconst no_builtin = Boolean(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 && !args[extension.cli_arg],\n\t\t]),\n\t) as Partial<Record<BuiltinExtensionOptionName, boolean>>;\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","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\n// CLI for my-pi — composable pi coding agent\n\nimport { defineCommand, renderUsage, runMain } 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_paths,\n\tparse_skill_allowlist,\n\tparse_thinking_level,\n\tparse_tool_allowlist,\n\tparse_tool_excludelist,\n\tresolve_builtin_extension_options,\n} from './cli-args.js';\nimport { install_sqlite_warning_filter } from './warnings.js';\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\nasync function run_interactive_mode(\n\truntime: any,\n\tInteractiveModeClass: any,\n): Promise<void> {\n\tconst original_write = process.stdout.write.bind(process.stdout);\n\tprocess.stdout.write = ((chunk: any, ...args: any[]) => {\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 original_write(chunk, ...args);\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 --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(\n\tcmd: any,\n\tparent?: any,\n): Promise<string> {\n\treturn `${await (renderUsage as any)(cmd, parent)}\\n${HELP_APPENDIX}`;\n}\n\nasync function print_usage(cmd: any, parent?: any): 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 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\t// Resolve prompt: named --prompt flag > positional > stdin\n\t\tlet prompt = args.prompt;\n\t\tif (!prompt) {\n\t\t\t// Check for positional arguments (after citty strips flags)\n\t\t\tconst positionals = (args as any)._ as string[] | undefined;\n\t\t\tif (positionals && positionals.length > 0) {\n\t\t\t\tprompt = positionals[0];\n\t\t\t}\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 as any);\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\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\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 as any);\n\t\t} else {\n\t\t\tawait run_interactive_mode(runtime, InteractiveMode);\n\t\t}\n\t},\n});\n\nvoid runMain(main as any, {\n\tshowUsage: async (cmd: any, parent: any) => {\n\t\tawait print_usage(cmd, parent);\n\t},\n});\n"],"mappings":";;;;;;;AAMA,MAAM,kBAAkB,IAAI,IAAI;CAC/B;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AAmBD,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,SAAgB,kCACf,MACuD;CACvD,MAAM,aAAa,QAAQ,KAAK,aAAa;CAC7C,OAAO,OAAO,YACb,mBAAmB,KAAK,cAAc,CACrC,UAAU,aACV,CAAC,cAAc,CAAC,KAAK,UAAU,QAChC,CAAC,CACF;AAC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;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;GACL,MAAM;GACN,OAAO;GACP,aAAa;GACb,UAAU;EACX;EACA,OAAO;GACN,MAAM;GACN,aAAa;GACb,UAAU;EACX;EACA,iBAAiB;GAChB,MAAM;GACN,aAAa;GACb,UAAU;EACX;EACA,wBAAwB;GACvB,MAAM;GACN,aAAa;GACb,UAAU;EACX;EACA,QAAQ;GACP,MAAM;GACN,OAAO;GACP,aAAa;GACb,UAAU;EACX;CACD;CACA,MAAM,IAAI,EAAE,QAAQ;EACnB,MAAM,MAAM,QAAQ,IAAI;EACxB,MAAM,kBAAkB,sBAAsB,QAAQ,MAAM,GAAG;EAC/D,MAAM,iBAAiB,qBAAqB,QAAQ,IAAI;EACxD,MAAM,iBAAiB,uBAAuB,QAAQ,IAAI;EAC1D,MAAM,kBAAkB,sBAAsB,QAAQ,IAAI;EAC1D,IAAI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B,MAAM,QAAQ,IAAI,CACrB,OAAO,aACP,OAAO,kCACR,CAAC;EAED,MAAM,UAAU,MAAM,aAAa;GAClC;GACA,WAAW,KAAK;GAChB,aAAa,KAAK;GAClB,YAAY;GACZ;GACA,GAAG,kCAAkC,IAAI;GACzC,WAAW;GACX,mBAAmB,KAAK;GACxB,OAAO,KAAK;GACZ,UAAU;GACV;GACA;GACA;GACA,SAAS,KAAK;GACd,YAAY,KAAK;GACjB,sBAAsB,KAAK;GAC3B,eAAe,KAAK;GACpB,sBAAsB,KAAK;GAC3B,gBAAgB,KAAK;EACtB,CAAC;EAED,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,IAAW;OAE7B,MAAM,qBAAqB,SAAS,eAAe;CAErD;AACD,CAAC;AAEI,QAAQ,MAAa,EACzB,WAAW,OAAO,KAAU,WAAgB;CAC3C,MAAM,YAAY,KAAK,MAAM;AAC9B,EACD,CAAC"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/cli-args.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 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\nexport function resolve_builtin_extension_options(\n\targs: Record<string, unknown>,\n): Partial<Record<BuiltinExtensionOptionName, boolean>> {\n\tconst no_builtin = Boolean(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 && !args[extension.cli_arg],\n\t\t]),\n\t) as Partial<Record<BuiltinExtensionOptionName, boolean>>;\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","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\n// CLI for my-pi — composable pi coding agent\n\nimport { defineCommand, renderUsage, runMain } 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_paths,\n\tparse_skill_allowlist,\n\tparse_thinking_level,\n\tparse_tool_allowlist,\n\tparse_tool_excludelist,\n\tresolve_builtin_extension_options,\n} from './cli-args.js';\nimport { install_sqlite_warning_filter } from './warnings.js';\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\nasync function run_interactive_mode(\n\truntime: any,\n\tInteractiveModeClass: any,\n): Promise<void> {\n\tconst original_write = process.stdout.write.bind(process.stdout);\n\tprocess.stdout.write = ((chunk: any, ...args: any[]) => {\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 original_write(chunk, ...args);\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(\n\tcmd: any,\n\tparent?: any,\n): Promise<string> {\n\treturn `${await (renderUsage as any)(cmd, parent)}\\n${HELP_APPENDIX}`;\n}\n\nasync function print_usage(cmd: any, parent?: any): 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 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 = (args as any)._ as string[] | undefined;\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 as any);\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\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\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 as any);\n\t\t} else {\n\t\t\tawait run_interactive_mode(runtime, InteractiveMode);\n\t\t}\n\t},\n});\n\nvoid runMain(main as any, {\n\tshowUsage: async (cmd: any, parent: any) => {\n\t\tawait print_usage(cmd, parent);\n\t},\n});\n"],"mappings":";;;;;;;AAMA,MAAM,kBAAkB,IAAI,IAAI;CAC/B;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AAmBD,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,SAAgB,kCACf,MACuD;CACvD,MAAM,aAAa,QAAQ,KAAK,aAAa;CAC7C,OAAO,OAAO,YACb,mBAAmB,KAAK,cAAc,CACrC,UAAU,aACV,CAAC,cAAc,CAAC,KAAK,UAAU,QAChC,CAAC,CACF;AACD;AAEA,SAAgB,oBACf,MACA,OACW;CACX,MAAM,SAAmB,CAAC;CAC1B,MAAM,WAAW,IAAI,IAAI,KAAK;CAE9B,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;EACrC,MAAM,MAAM,KAAK;EACjB,IAAI,CAAC,KAAK;EAEV,MAAM,eAAe,IAAI,QAAQ,GAAG;EACpC,IAAI,iBAAiB,IAAI;GACxB,MAAM,OAAO,IAAI,MAAM,GAAG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ACZ,UAAU;GACV;GACA;GACA;GACA,SAAS,KAAK;GACd,YAAY,KAAK;GACjB,sBAAsB,KAAK;GAC3B,eAAe,KAAK;GACpB,sBAAsB,KAAK;GAC3B,gBAAgB,KAAK;EACtB,CAAC;EAED,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,IAAW;OAE7B,MAAM,qBAAqB,SAAS,eAAe;CAErD;AACD,CAAC;AAEI,QAAQ,MAAa,EACzB,WAAW,OAAO,KAAU,WAAgB;CAC3C,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.1.74",
3
+ "version": "0.1.76",
4
4
  "description": "Composable pi coding agent with MCP, LSP, prompt presets, and local eval telemetry",
5
5
  "keywords": [
6
6
  "cli",
@@ -43,43 +43,44 @@
43
43
  }
44
44
  },
45
45
  "dependencies": {
46
- "@earendil-works/pi-ai": "0.78.0",
47
- "@earendil-works/pi-coding-agent": "0.78.0",
48
- "@earendil-works/pi-tui": "0.78.0",
46
+ "@earendil-works/pi-ai": "0.78.1",
47
+ "@earendil-works/pi-coding-agent": "0.78.1",
48
+ "@earendil-works/pi-tui": "0.78.1",
49
49
  "citty": "^0.2.2",
50
50
  "typebox": "^1.1.38",
51
- "@spences10/pi-project-trust": "0.0.12",
51
+ "@spences10/pi-project-trust": "0.0.13",
52
52
  "@spences10/pi-settings": "0.0.0",
53
- "@spences10/pi-themes": "0.0.8",
54
- "@spences10/pi-tui-modal": "0.0.20"
53
+ "@spences10/pi-tui-modal": "0.0.20",
54
+ "@spences10/pi-themes": "0.0.8"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@changesets/cli": "^2.31.0",
58
58
  "@resvg/resvg-js": "^2.6.2",
59
59
  "@types/node": "^25.8.0",
60
- "@vitest/coverage-v8": "4.1.7",
60
+ "@vitest/coverage-v8": "4.1.8",
61
61
  "vite-plus": "^0.1.22",
62
- "vitest": "4.1.7"
62
+ "vitest": "4.1.8"
63
63
  },
64
64
  "optionalDependencies": {
65
65
  "@spences10/pi-child-env": "0.1.8",
66
66
  "@spences10/pi-coding-preferences": "0.0.10",
67
67
  "@spences10/pi-context": "0.0.24",
68
68
  "@spences10/pi-confirm-destructive": "0.0.16",
69
- "@spences10/pi-git-ui": "0.0.12",
70
- "@spences10/pi-lsp": "0.0.33",
71
69
  "@spences10/pi-footer": "0.0.7",
72
- "@spences10/pi-mcp": "0.0.38",
70
+ "@spences10/pi-git-ui": "0.0.12",
71
+ "@spences10/pi-lsp": "0.0.34",
72
+ "@spences10/pi-mcp": "0.0.39",
73
73
  "@spences10/pi-nopeek": "0.0.13",
74
74
  "@spences10/pi-omnisearch": "0.0.13",
75
75
  "@spences10/pi-recall": "0.0.13",
76
76
  "@spences10/pi-redact": "0.0.12",
77
+ "@spences10/pi-observability": "0.0.2",
77
78
  "@spences10/pi-skill-importer": "0.0.8",
78
79
  "@spences10/pi-skills": "0.0.28",
79
80
  "@spences10/pi-sqlite-tools": "0.0.12",
80
81
  "@spences10/pi-svelte-guardrails": "0.0.11",
81
- "@spences10/pi-team-mode": "0.0.31",
82
- "@spences10/pi-telemetry": "0.0.23"
82
+ "@spences10/pi-team-mode": "0.0.32",
83
+ "@spences10/pi-telemetry": "0.0.24"
83
84
  },
84
85
  "engines": {
85
86
  "node": ">=24.15.0"
@@ -1 +0,0 @@
1
- {"version":3,"file":"builtin-registry-DBm8gws_.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\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\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\tload: async () => (await import('@spences10/pi-mcp')).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: '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\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\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\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\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\tload: async () => (await import('@spences10/pi-nopeek')).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\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\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: '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\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\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\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\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\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'Experimental orchestrator/team mode with RPC teammates, tasks, and 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 experimental team mode extension',\n\t\taliases: ['team-mode', 'team', 'teammates'],\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":";AA4BA,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,MAAM,aAAa,MAAM,OAAO,0BAA0B;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,MAAM,aAAa,MAAM,OAAO,sBAAsB;CACvD;CACA;EACC,KAAK;EACL,OAAO;EACP,YAAY;EACZ,aAAa;EACb,iBAAiB;EACjB,aAAa;EACb,SAAS;EACT,UAAU;E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