my-pi 0.3.5 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +32 -252
  2. package/dist/extensions.d.ts +11 -0
  3. package/dist/extensions.js +148 -0
  4. package/dist/extensions.js.map +1 -0
  5. package/dist/index.d.ts +2 -1
  6. package/dist/index.js +40 -523
  7. package/dist/index.js.map +1 -1
  8. package/dist/manager.d.ts +3 -0
  9. package/dist/manager.js +71 -0
  10. package/dist/manager.js.map +1 -0
  11. package/dist/settings.d.ts +3 -0
  12. package/dist/settings.js +16 -0
  13. package/dist/settings.js.map +1 -0
  14. package/package.json +33 -78
  15. package/dist/api.d.ts +0 -494
  16. package/dist/api.js +0 -532
  17. package/dist/api.js.map +0 -1
  18. package/dist/builtin-registry-wSfsQBi4.js +0 -563
  19. package/dist/builtin-registry-wSfsQBi4.js.map +0 -1
  20. package/dist/footer-BAZIMVSb.js +0 -1
  21. package/dist/handoff-C6wR2mSG.js +0 -28
  22. package/dist/handoff-C6wR2mSG.js.map +0 -1
  23. package/dist/hooks-resolution-qlhPfMFJ.js +0 -485
  24. package/dist/hooks-resolution-qlhPfMFJ.js.map +0 -1
  25. package/dist/openrouter-fusion-config-BWsHBPQv.js +0 -65
  26. package/dist/openrouter-fusion-config-BWsHBPQv.js.map +0 -1
  27. package/dist/prompt-presets-XraV03Ed.js +0 -1402
  28. package/dist/prompt-presets-XraV03Ed.js.map +0 -1
  29. package/dist/session-name-CD6TVRnh.js +0 -158
  30. package/dist/session-name-CD6TVRnh.js.map +0 -1
  31. package/dist/settings-BCn3P9qH.js +0 -177
  32. package/dist/settings-BCn3P9qH.js.map +0 -1
  33. package/dist/startup-screen-DUeBWuAc.js +0 -218
  34. package/dist/startup-screen-DUeBWuAc.js.map +0 -1
  35. package/dist/turn-timer-CoyDI4gQ.js +0 -64
  36. package/dist/turn-timer-CoyDI4gQ.js.map +0 -1
  37. package/dist/umans-provider-C2UJ4qkO.js +0 -307
  38. package/dist/umans-provider-C2UJ4qkO.js.map +0 -1
package/README.md CHANGED
@@ -1,263 +1,43 @@
1
1
  # my-pi
2
2
 
3
- [![Semgrep](https://github.com/spences10/my-pi/actions/workflows/semgrep.yml/badge.svg)](https://github.com/spences10/my-pi/actions/workflows/semgrep.yml)
4
- [![built with vite+](https://img.shields.io/badge/built%20with-Vite+-646CFF?logo=vite&logoColor=white)](https://viteplus.dev)
5
- [![tested with vitest](https://img.shields.io/badge/tested%20with-Vitest-6E9F18?logo=vitest)](https://vitest.dev)
6
-
7
- My curated [Pi](https://pi.dev) distribution: a ready-to-run
8
- coding-agent CLI with MCP, LSP, skills, recall, redaction, telemetry,
9
- team mode, prompt presets, and other handy extensions prewired.
10
-
11
- ![my-pi package preview](./assets/pi-package-preview.png)
12
-
13
- Built on the
14
- [@earendil-works/pi-coding-agent](https://github.com/badlogic/pi-mono)
15
- SDK. Use the full distribution directly, or install individual
16
- `@spences10/pi-*` packages into your own Pi setup.
17
-
18
- ## Quick start
19
-
20
- ```bash
21
- pnpx --allow-build=@google/genai --allow-build=protobufjs my-pi@latest
22
- # or: npx my-pi@latest / bunx my-pi@latest
23
- ```
24
-
25
- ## Two ways to use my-pi
26
-
27
- ### 1. Run the full distribution
28
-
29
- Use `my-pi` if you want the complete, opinionated setup:
30
-
31
- ```bash
32
- pnpx --allow-build=@google/genai --allow-build=protobufjs my-pi@latest
33
- ```
34
-
35
- This is its own CLI wrapper around Pi. Do not install the root package
36
- with `pi install npm:my-pi`.
37
-
38
- ### 2. Install individual Pi packages
39
-
40
- Most extensions in this repo are also published as normal Pi packages:
41
-
42
- ```bash
43
- pi install npm:@spences10/pi-lsp
44
- pi install npm:@spences10/pi-mcp
45
- pi install npm:@spences10/pi-redact
46
- ```
47
-
48
- Use this path if you already have your own Pi setup and only want
49
- selected features. Package READMEs are the source of truth for install
50
- instructions, commands, configuration, and runtime behavior.
51
-
52
- For a project-local install, let Pi write the repo-owned package entry
53
- and resource overrides:
54
-
55
- ```bash
56
- pi install -l npm:@spences10/pi-lsp
57
- pi config -l
58
- ```
59
-
60
- Upstream Pi stores those choices in `.pi/settings.json`; project
61
- resource deltas may use `autoload: false`. Keep `@spences10/pi-*`
62
- extension state and resource-specific trust in the separate global
63
- `~/.pi/agent/my-pi-settings.json` store. A project must not be able to
64
- trust its own commands or executables through `.pi/settings.json`.
65
-
66
- ### Programmatic use
67
-
68
- `create_my_pi()` accepts upstream `InlineExtension` values, including
69
- named wrappers that keep startup extension paths descriptive. Bare
70
- factory functions remain supported.
71
-
72
- ```typescript
73
- import { create_my_pi, type InlineExtension } from 'my-pi';
74
-
75
- const audit_extension: InlineExtension = {
76
- name: 'audit-events',
77
- factory(pi) {
78
- pi.on('agent_start', () => console.log('agent started'));
79
- },
80
- };
81
-
82
- const runtime = await create_my_pi({
83
- extensionFactories: [audit_extension],
84
- });
85
- ```
86
-
87
- The wrapper above appears as `<inline:audit-events>` in Pi's startup
88
- Extensions list. Names beginning with `my-pi-` are reserved for the
89
- managed distribution extensions; `create_my_pi()` rejects consumer
90
- wrappers using that prefix before loading any extensions.
91
-
92
- ## What you get
93
-
94
- - **Pi-native CLI + SDK wrapper** — interactive TUI, print mode, JSON
95
- mode, RPC mode, and programmatic runtime creation.
96
- - **Project-aware MCP tools** — stdio and HTTP/streamable-HTTP servers
97
- from `mcp.json`, scoped so sensitive or noisy tools only load for
98
- the projects and orgs where they belong.
99
- - **Project-aware skills** — discover, enable, disable, import, and
100
- sync Pi-native skills, with different skill sets per project.
101
- - **LSP tools** — diagnostics, hover, definitions, references, and
102
- document symbols via language servers.
103
- - **Context sidecar** — local SQLite storage for oversized tool
104
- output, keeping long results searchable without flooding chat
105
- context.
106
- - **Guardrails** — Svelte and coding-preference checks that block
107
- configured anti-patterns before agents write them.
108
- - **Prompt presets** — base presets plus additive prompt layers with
109
- per-project persistence.
110
- - **Secret safety** — redaction plus reminders to use secret-safe
111
- environment loading.
112
- - **Recall, telemetry, and observability** — local support for
113
- prior-session lookup, evals, latency analysis, live event streams,
114
- and operational debugging.
115
- - **Git UI** — interactive source-control staging and commit support.
116
- - **Team mode** — peer coordination between independently opened Pi
117
- sessions using groups, artifacts, and durable mailboxes.
118
- - **Themes and TUI helpers** — visual polish and shared modal
119
- primitives.
120
-
121
- ## Requirements
122
-
123
- - Node.js `>=24.15.0`
124
- - pnpm 11 for local development
125
- - Pi authentication via `pi auth`, provider environment variables, or
126
- supported OAuth flows
127
-
128
- `my-pi` uses native `node:sqlite` through context, telemetry, and
129
- observability packages. The CLI suppresses Node's expected
130
- `node:sqlite` `ExperimentalWarning`; standalone package/API consumers
131
- own their process warning policy until Node marks it stable.
132
-
133
- ### pnpm 11 first-run build approval
134
-
135
- pnpm 11 asks for interactive approval before running the transitive
136
- `@google/genai` preinstall and `protobufjs` postinstall hooks. Neither
137
- hook builds runtime artifacts: the first prints a no-op message and
138
- the second only checks dependency version syntax. Declining them does
139
- not degrade `my-pi` functionality.
140
-
141
- For a deterministic first run, or after accidentally selecting `No`,
142
- rerun the Quick start command with both `--allow-build` flags. It
143
- allows those two known hooks without the two-stage selection and
144
- confirmation prompt. The package does not publish a `pnpm` settings
145
- block because pnpm 11 ignores package-level build policy. The
146
- `node-domexception` deprecation notice is also transitive and does not
147
- affect runtime behavior.
148
-
149
- ## Common usage
3
+ Scott Spence's Pi: upstream [Pi](https://pi.dev) with these extensions
4
+ built in.
5
+
6
+ | Key | Package |
7
+ | --------------------- | --------------------------------------------------------------------------------------------------------------- |
8
+ | `filter-output` | [`pi-redact`](https://github.com/spences10/my-pi/tree/main/packages/pi-redact#readme) |
9
+ | `confirm-destructive` | [`pi-confirm-destructive`](https://github.com/spences10/my-pi/tree/main/packages/pi-confirm-destructive#readme) |
10
+ | `context-sidecar` | [`pi-context`](https://github.com/spences10/my-pi/tree/main/packages/pi-context#readme) |
11
+ | `lsp` | [`pi-lsp`](https://github.com/spences10/my-pi/tree/main/packages/pi-lsp#readme) |
12
+ | `recall` | [`pi-recall`](https://github.com/spences10/my-pi/tree/main/packages/pi-recall#readme) |
13
+ | `telemetry` | [`pi-telemetry`](https://github.com/spences10/my-pi/tree/main/packages/pi-telemetry#readme) |
14
+ | `observability` | [`pi-observability`](https://github.com/spences10/my-pi/tree/main/packages/pi-observability#readme) |
15
+ | `team-mode` | [`pi-team-mode`](https://github.com/spences10/my-pi/tree/main/packages/pi-team-mode#readme) |
16
+ | `harness` | [`pi-harness`](https://github.com/spences10/my-pi/tree/main/packages/pi-harness#readme) |
17
+ | `git-ui` | [`pi-git-ui`](https://github.com/spences10/my-pi/tree/main/packages/pi-git-ui#readme) |
18
+ | `footer` | [`pi-footer`](https://github.com/spences10/my-pi/tree/main/packages/pi-footer#readme) |
19
+ | `codex-usage` | [`pi-codex-usage`](https://github.com/spences10/my-pi/tree/main/packages/pi-codex-usage#readme) |
20
+ | `kimi-usage` | [`pi-kimi-usage`](https://github.com/spences10/my-pi/tree/main/packages/pi-kimi-usage#readme) |
21
+ | `coding-preferences` | [`pi-coding-preferences`](https://github.com/spences10/my-pi/tree/main/packages/pi-coding-preferences#readme) |
22
+ | `svelte-guardrails` | [`pi-svelte-guardrails`](https://github.com/spences10/my-pi/tree/main/packages/pi-svelte-guardrails#readme) |
23
+ | `talk` | [`pi-talk`](https://github.com/spences10/my-pi/tree/main/packages/pi-talk#readme) |
24
+ | `starfield` | [`pi-starfield`](https://github.com/spences10/my-pi/tree/main/packages/pi-starfield#readme) |
25
+ | `themes` | [`pi-themes`](https://github.com/spences10/my-pi/tree/main/packages/pi-themes#readme) |
150
26
 
151
27
  ```bash
152
- # full TUI
153
28
  pnpx my-pi@latest
154
-
155
- # one-shot print mode
156
- pnpx my-pi@latest "summarize this repo"
157
- pnpx my-pi@latest -P "explicit print mode"
158
-
159
- # NDJSON events for scripts/agents
160
- pnpx my-pi@latest --json "list all TODO comments"
161
-
162
- # RPC mode for team/agent orchestration
163
- pnpx my-pi@latest --mode rpc
164
-
165
- # local live observability dashboard
166
- pnpx my-pi@latest
167
- # then run /observability in the TUI to open the browser dashboard
168
- pnpx my-pi@latest observability
169
29
  ```
170
30
 
171
- Positional prompt arguments are joined with a single space. Everything
172
- following `--` is prompt text, including tokens that look like
173
- options. A non-empty `--prompt` (`-p`) value takes precedence over
174
- positional text; stdin is used only when neither supplies a prompt.
175
- `--mode json` and `--json` both select NDJSON output; `--mode print`
176
- and `-P` both select plain text output.
177
-
178
- Pi handles model authentication natively. For provider-specific model
179
- examples, see the Pi docs and the relevant extension/package README.
180
-
181
- Umans.ai is available as a built-in provider. Run `/login`, choose API
182
- key auth, then choose Umans; select models like `umans/umans-coder` or
183
- `umans/umans-flash`. A stored API key takes precedence over
184
- `UMANS_API_KEY`; legacy Umans credentials remain readable. Pi
185
- refreshes the remote model catalog for `/model`, persists the last
186
- successful catalog, and falls back to the bundled catalog when the
187
- network is unavailable. Disable the provider with
188
- `--no-umans-provider`.
189
-
190
- OpenRouter Fusion is configured by default: `my-pi` injects a
191
- non-Anthropic Fusion panel/judge only for `openrouter/fusion`.
192
- Configure it in `~/.pi/agent/my-pi-settings.json` under
193
- `openRouterFusion`, e.g.
194
- `{"openRouterFusion":{"analysisModels":["deepseek/deepseek-v3.2"],"judgeModel":"~openai/gpt-latest","force":false}}`.
195
- Fusion is forced by default with `tool_choice: "required"`; set
196
- `force: false` to let OpenRouter decide whether deliberation is
197
- needed. Env vars `MY_PI_FUSION_ANALYSIS_MODELS`,
198
- `MY_PI_FUSION_JUDGE_MODEL`, and `MY_PI_FUSION_FORCE` still work as
199
- overrides. Disable with `--no-openrouter-fusion-config`.
200
-
201
- ## Reusable Pi packages
202
-
203
- Install the full distribution with `pnpx my-pi@latest`, or install
204
- selected extensions into vanilla Pi:
31
+ ## Turn extensions on or off
205
32
 
206
- ```bash
207
- # Bash/Zsh/Fish
208
- pi install npm:@spences10/pi-{context,lsp,team-mode}
33
+ ```text
34
+ /extensions Open the switchboard
35
+ /extensions list Show each extension and its state
36
+ /extensions disable <key> Turn one off (enable to turn it back on)
209
37
  ```
210
38
 
211
- Full package list here:
212
-
213
- | Package | Purpose |
214
- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------- |
215
- | [`@spences10/pi-coding-preferences`](./packages/pi-coding-preferences/README.md) | Configurable coding-workflow guardrails |
216
- | [`@spences10/pi-confirm-destructive`](./packages/pi-confirm-destructive/README.md) | Destructive action confirmations |
217
- | [`@spences10/pi-context`](./packages/pi-context/README.md) | Scoped SQLite FTS overflow cache for oversized tool output |
218
- | [`@spences10/pi-codex-usage`](./packages/pi-codex-usage/README.md) | OpenAI Codex usage in the footer status area |
219
- | [`@spences10/pi-factory`](./packages/pi-factory/README.md) | Paused experimental workflow control plane (opt-in) |
220
- | [`@spences10/pi-git-ui`](./packages/pi-git-ui/README.md) | Interactive source-control staging UI |
221
- | [`@spences10/pi-kimi-usage`](./packages/pi-kimi-usage/README.md) | Kimi For Coding usage in the footer status area |
222
- | [`@spences10/pi-lsp`](./packages/pi-lsp/README.md) | LSP-backed diagnostics and symbol tools |
223
- | [`@spences10/pi-mcp`](./packages/pi-mcp/README.md) | MCP server integration and `/mcp` |
224
- | [`@spences10/pi-nopeek`](./packages/pi-nopeek/README.md) | `nopeek` reminder for secret-safe environment loading |
225
- | [`@spences10/pi-observability`](./packages/pi-observability/README.md) | Live local event stream and browser dashboard |
226
- | [`@spences10/pi-omnisearch`](./packages/pi-omnisearch/README.md) | `mcp-omnisearch` reminder for verified web research |
227
- | [`@spences10/pi-recall`](./packages/pi-recall/README.md) | `pirecall` reminder and background sync |
228
- | [`@spences10/pi-redact`](./packages/pi-redact/README.md) | Output redaction and `/redact-stats` |
229
- | [`@spences10/pi-harness`](./packages/pi-harness/README.md) | Ephemeral task harness runtime |
230
- | [`@spences10/pi-skills`](./packages/pi-skills/README.md) | Skill management, import, and sync |
231
- | [`@spences10/pi-sqlite-tools`](./packages/pi-sqlite-tools/README.md) | `mcp-sqlite-tools` reminder for safer SQLite database work |
232
- | [`@spences10/pi-starfield`](./packages/pi-starfield/README.md) | Twinkling stars in the input editor |
233
- | [`@spences10/pi-svelte-guardrails`](./packages/pi-svelte-guardrails/README.md) | Svelte pattern guardrails |
234
- | [`@spences10/pi-talk`](./packages/pi-talk/README.md) | Hold-Space Deepgram dictation |
235
- | [`@spences10/pi-team-mode`](./packages/pi-team-mode/README.md) | Peer-session coordination and durable mailboxes |
236
- | [`@spences10/pi-telemetry`](./packages/pi-telemetry/README.md) | Local SQLite telemetry and `/telemetry` |
237
- | [`@spences10/pi-themes`](./packages/pi-themes/README.md) | Bundled theme pack for Pi |
238
-
239
- Shared helper packages such as `@spences10/pi-child-env`,
240
- `@spences10/pi-footer`, `@spences10/pi-git-remote`,
241
- `@spences10/pi-project-trust`, `@spences10/pi-settings`,
242
- `@spences10/pi-skill-importer`, `@spences10/pi-sqlite-core`, and
243
- `@spences10/pi-tui-modal` are published as dependencies and are not
244
- packages to install via `pi install`. See
245
- [`docs/package-map.md`](./docs/package-map.md) for the authoritative
246
- classification.
39
+ Changes save to `~/.pi/agent/my-pi-settings.json` and apply on reload.
40
+ Themes apply on the next start.
247
41
 
248
- ## Project structure
249
-
250
- ```text
251
- apps/
252
- web/ Landing page for discovering my-pi and its packages
253
- src/
254
- index.ts CLI entry point
255
- api.ts Programmatic API
256
- extensions/ Root-only built-ins and distro wiring
257
- packages/
258
- pi-*/ Reusable Pi packages and shared support packages
259
- .pi/
260
- presets.json Optional project prompt presets
261
- presets/*.md Optional project prompt preset files
262
- mcp.json Optional, user-created project MCP server config
263
- ```
42
+ Everything else (MCP, skills, models, sessions, `my-pi config`,
43
+ `my-pi install`) is upstream Pi: every Pi option and subcommand works.
@@ -0,0 +1,11 @@
1
+ import type { ExtensionFactory } from '@earendil-works/pi-coding-agent';
2
+ export interface MyPiExtension {
3
+ /** Saved in my-pi-settings.json `extensions.enabled`. */
4
+ key: string;
5
+ label: string;
6
+ description: string;
7
+ load: () => Promise<ExtensionFactory>;
8
+ }
9
+ export declare const EXTENSIONS: readonly MyPiExtension[];
10
+ /** Pi applies the saved theme before extensions load, so themes go in as a CLI path. */
11
+ export declare function themes_dir(): string;
@@ -0,0 +1,148 @@
1
+ import { createRequire } from 'node:module';
2
+ import { dirname, join } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ const require = createRequire(import.meta.url);
5
+ function package_dir(entry_url) {
6
+ // <package>/dist/index.js -> <package>
7
+ return dirname(dirname(fileURLToPath(entry_url)));
8
+ }
9
+ function with_resources(factory, resources) {
10
+ return async (pi) => {
11
+ pi.on('resources_discover', () => resources);
12
+ await factory(pi);
13
+ };
14
+ }
15
+ export const EXTENSIONS = [
16
+ {
17
+ key: 'filter-output',
18
+ label: 'Secret redaction',
19
+ description: 'Redacts likely secrets from tool output',
20
+ load: async () => (await import('@spences10/pi-redact'))
21
+ .default,
22
+ },
23
+ {
24
+ key: 'confirm-destructive',
25
+ label: 'Confirm destructive',
26
+ description: 'Asks before destructive shell commands',
27
+ load: async () => (await import('@spences10/pi-confirm-destructive')).default,
28
+ },
29
+ {
30
+ key: 'context-sidecar',
31
+ label: 'Context sidecar',
32
+ description: 'Searchable SQLite store for oversized tool output',
33
+ load: async () => (await import('@spences10/pi-context'))
34
+ .default,
35
+ },
36
+ {
37
+ key: 'lsp',
38
+ label: 'LSP',
39
+ description: 'Language-server diagnostics and symbol tools',
40
+ load: async () => (await import('@spences10/pi-lsp'))
41
+ .default,
42
+ },
43
+ {
44
+ key: 'recall',
45
+ label: 'Recall',
46
+ description: 'pirecall sync and past-session reminders',
47
+ load: async () => (await import('@spences10/pi-recall'))
48
+ .default,
49
+ },
50
+ {
51
+ key: 'telemetry',
52
+ label: 'Telemetry',
53
+ description: 'Local SQLite telemetry; /telemetry on to record',
54
+ load: async () => (await import('@spences10/pi-telemetry'))
55
+ .default,
56
+ },
57
+ {
58
+ key: 'observability',
59
+ label: 'Observability',
60
+ description: 'Live event stream and browser dashboard',
61
+ load: async () => (await import('@spences10/pi-observability')).default,
62
+ },
63
+ {
64
+ key: 'team-mode',
65
+ label: 'Team mode',
66
+ description: 'Coordination between open Pi sessions',
67
+ load: async () => (await import('@spences10/pi-team-mode'))
68
+ .default,
69
+ },
70
+ {
71
+ key: 'harness',
72
+ label: 'Harness',
73
+ description: 'Ephemeral task harness runtime and skills',
74
+ load: async () => {
75
+ const entry = import.meta.resolve('@spences10/pi-harness');
76
+ const { default: factory } = (await import(entry));
77
+ return with_resources(factory, {
78
+ skillPaths: [join(package_dir(entry), 'skills')],
79
+ });
80
+ },
81
+ },
82
+ {
83
+ key: 'git-ui',
84
+ label: 'Git UI',
85
+ description: 'Interactive staging, diff review, and commit',
86
+ load: async () => (await import('@spences10/pi-git-ui'))
87
+ .default,
88
+ },
89
+ {
90
+ key: 'footer',
91
+ label: 'Footer',
92
+ description: 'Configurable footer status line',
93
+ load: async () => (await import('@spences10/pi-footer'))
94
+ .default,
95
+ },
96
+ {
97
+ key: 'codex-usage',
98
+ label: 'Codex usage',
99
+ description: 'OpenAI Codex usage in the footer',
100
+ load: async () => (await import('@spences10/pi-codex-usage'))
101
+ .default,
102
+ },
103
+ {
104
+ key: 'kimi-usage',
105
+ label: 'Kimi usage',
106
+ description: 'Kimi For Coding usage in the footer',
107
+ load: async () => (await import('@spences10/pi-kimi-usage'))
108
+ .default,
109
+ },
110
+ {
111
+ key: 'coding-preferences',
112
+ label: 'Coding preferences',
113
+ description: 'Configurable coding-workflow guardrails',
114
+ load: async () => (await import('@spences10/pi-coding-preferences')).default,
115
+ },
116
+ {
117
+ key: 'svelte-guardrails',
118
+ label: 'Svelte guardrails',
119
+ description: 'Blocks discouraged Svelte patterns',
120
+ load: async () => (await import('@spences10/pi-svelte-guardrails')).default,
121
+ },
122
+ {
123
+ key: 'talk',
124
+ label: 'Talk',
125
+ description: 'Hold-Space Deepgram dictation',
126
+ load: async () => (await import('@spences10/pi-talk'))
127
+ .default,
128
+ },
129
+ {
130
+ key: 'starfield',
131
+ label: 'Starfield',
132
+ description: 'Twinkling stars in the input editor',
133
+ load: async () => (await import('@spences10/pi-starfield'))
134
+ .default,
135
+ },
136
+ {
137
+ key: 'themes',
138
+ label: 'Themes',
139
+ description: 'Bundled theme pack; choose one in /settings (restart to apply)',
140
+ // Loaded with --theme at startup; see theme_args().
141
+ load: async () => () => { },
142
+ },
143
+ ];
144
+ /** Pi applies the saved theme before extensions load, so themes go in as a CLI path. */
145
+ export function themes_dir() {
146
+ return join(dirname(require.resolve('@spences10/pi-themes/package.json')), 'themes');
147
+ }
148
+ //# sourceMappingURL=extensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extensions.js","sourceRoot":"","sources":["../src/extensions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAYzC,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,SAAS,WAAW,CAAC,SAAiB;IACrC,uCAAuC;IACvC,OAAO,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,cAAc,CACtB,OAAyB,EACzB,SAA2D;IAE3D,OAAO,KAAK,EAAE,EAAgB,EAAE,EAAE;QACjC,EAAE,CAAC,EAAE,CAAC,oBAAoB,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAC7C,MAAM,OAAO,CAAC,EAAE,CAAC,CAAC;IACnB,CAAC,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAA6B;IACnD;QACC,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,yCAAyC;QACtD,IAAI,EAAE,KAAK,IAAI,EAAE,CACf,CAAC,MAAM,MAAM,CAAC,sBAAsB,CAAC,CAAqB;aACzD,OAAO;KACV;IACD;Q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