my-pi 0.1.25 → 0.1.27
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 +133 -5
- package/dist/api.d.ts +201 -21
- package/dist/api.js +467 -2
- package/dist/api.js.map +1 -0
- package/dist/builtin-registry-CnQL50C2.js +233 -0
- package/dist/builtin-registry-CnQL50C2.js.map +1 -0
- package/dist/hooks-resolution-D7CSDzFs.js +419 -0
- package/dist/hooks-resolution-D7CSDzFs.js.map +1 -0
- package/dist/index.js +30 -93
- package/dist/index.js.map +1 -1
- package/dist/prompt-presets-DU1Ds6xx.js +1011 -0
- package/dist/prompt-presets-DU1Ds6xx.js.map +1 -0
- package/dist/session-name-C3y6uB0x.js +121 -0
- package/dist/session-name-C3y6uB0x.js.map +1 -0
- package/package.json +26 -24
- package/dist/api-CxtE0rcW.js +0 -2145
- package/dist/api-CxtE0rcW.js.map +0 -1
package/README.md
CHANGED
|
@@ -15,6 +15,18 @@ presets, local SQLite telemetry for evals, and a programmatic API.
|
|
|
15
15
|
Extension stacking patterns inspired by
|
|
16
16
|
[pi-vs-claude-code](https://github.com/disler/pi-vs-claude-code).
|
|
17
17
|
|
|
18
|
+
## What this is for
|
|
19
|
+
|
|
20
|
+
`my-pi` is a composable Pi-based coding-agent harness for local agent
|
|
21
|
+
work, eval runs, and agent-ops experiments. It is intentionally more
|
|
22
|
+
of a cockpit than a single-purpose assistant: the default CLI combines
|
|
23
|
+
MCP, LSP, skills, prompt presets, secret-safe tooling, local
|
|
24
|
+
telemetry, session recall, and optional team-mode orchestration.
|
|
25
|
+
|
|
26
|
+
The main design goal is repeatability: run an agent task, capture
|
|
27
|
+
structured telemetry, preserve session context, and reuse the same
|
|
28
|
+
configuration in interactive, print, JSON, RPC, or SDK-driven flows.
|
|
29
|
+
|
|
18
30
|
## Not a Pi package
|
|
19
31
|
|
|
20
32
|
Do not install this with `pi install npm:my-pi`.
|
|
@@ -44,6 +56,22 @@ directly as its own CLI.
|
|
|
44
56
|
- **Bundled themes + extension stacking** — ship defaults, then layer
|
|
45
57
|
extra project or ad-hoc extensions on top.
|
|
46
58
|
|
|
59
|
+
## Requirements
|
|
60
|
+
|
|
61
|
+
- **Node.js `>=24.15.0` minimum.** my-pi uses native `node:sqlite`
|
|
62
|
+
through the context sidecar and telemetry packages, and uses Node's
|
|
63
|
+
built-in TypeScript type stripping for small local scripts.
|
|
64
|
+
- **Node 24 is used in CI.** `node:sqlite` is a release-candidate Node
|
|
65
|
+
API line, so CI runs both the minimum supported Node 24 release and
|
|
66
|
+
the current Node 24 line while the code keeps SQLite usage small and
|
|
67
|
+
synchronous.
|
|
68
|
+
- **SQLite warning policy:** the `my-pi` CLI suppresses Node's
|
|
69
|
+
expected `node:sqlite` `ExperimentalWarning` before built-ins load.
|
|
70
|
+
Standalone package/API consumers own their process warning policy
|
|
71
|
+
until Node marks `node:sqlite` stable.
|
|
72
|
+
- **pnpm 10** is used for local development. End users can run with
|
|
73
|
+
`pnpx`, `npx`, or `bunx`.
|
|
74
|
+
|
|
47
75
|
## Get Started
|
|
48
76
|
|
|
49
77
|
```bash
|
|
@@ -59,9 +87,17 @@ priority order):
|
|
|
59
87
|
1. **`pi auth`** — interactive login, stores credentials in
|
|
60
88
|
`~/.pi/agent/auth.json`
|
|
61
89
|
2. **Environment variables** — `ANTHROPIC_API_KEY`, `MISTRAL_API_KEY`,
|
|
62
|
-
`CLOUDFLARE_API_KEY` + `CLOUDFLARE_ACCOUNT_ID`,
|
|
90
|
+
`XIAOMI_API_KEY`, `CLOUDFLARE_API_KEY` + `CLOUDFLARE_ACCOUNT_ID`,
|
|
91
|
+
etc.
|
|
63
92
|
3. **OAuth** — supported for providers that offer it
|
|
64
93
|
|
|
94
|
+
Xiaomi MiMo Token Plan is available through Pi's built-in `xiaomi`
|
|
95
|
+
provider:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
XIAOMI_API_KEY=... pnpx my-pi@latest -m xiaomi/mimo-v2.5-pro "summarize this repo"
|
|
99
|
+
```
|
|
100
|
+
|
|
65
101
|
Cloudflare Workers AI model IDs contain slashes. Pass the provider and
|
|
66
102
|
model together when needed:
|
|
67
103
|
|
|
@@ -129,7 +165,9 @@ Team state is stored under `~/.pi/agent/teams-local` by default, or
|
|
|
129
165
|
Telemetry is **disabled by default**. When enabled, my-pi records
|
|
130
166
|
operational telemetry for each run in a local SQLite database. This is
|
|
131
167
|
intended for eval harnesses, latency analysis, tool failure analysis,
|
|
132
|
-
and local debugging.
|
|
168
|
+
and local debugging. Telemetry captures structured operational data;
|
|
169
|
+
`pirecall` complements it by retrieving the surrounding session
|
|
170
|
+
transcript and prior-work context.
|
|
133
171
|
|
|
134
172
|
```bash
|
|
135
173
|
pnpx my-pi@latest --telemetry --json "solve this task"
|
|
@@ -174,6 +212,66 @@ Recommended eval env vars for correlation:
|
|
|
174
212
|
- `MY_PI_EVAL_ATTEMPT`
|
|
175
213
|
- `MY_PI_EVAL_SUITE`
|
|
176
214
|
|
|
215
|
+
A typical eval loop is:
|
|
216
|
+
|
|
217
|
+
1. Create a stable eval run/case id.
|
|
218
|
+
2. Run my-pi with `--telemetry`, usually with an isolated
|
|
219
|
+
`PI_CODING_AGENT_DIR` and `--untrusted` for reproducibility.
|
|
220
|
+
3. Query or export telemetry for timings, tool calls, provider
|
|
221
|
+
requests, and success/failure state.
|
|
222
|
+
4. Use `pirecall` to inspect the transcript context around the same
|
|
223
|
+
task when the structured rows are not enough.
|
|
224
|
+
5. Compare attempts by `MY_PI_EVAL_RUN_ID`, `MY_PI_EVAL_CASE_ID`,
|
|
225
|
+
`MY_PI_EVAL_ATTEMPT`, and `MY_PI_EVAL_SUITE`.
|
|
226
|
+
|
|
227
|
+
Example:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
export MY_PI_EVAL_RUN_ID="smoke-$(date +%Y%m%d-%H%M%S)"
|
|
231
|
+
export MY_PI_EVAL_CASE_ID="readme-review"
|
|
232
|
+
export MY_PI_EVAL_ATTEMPT=1
|
|
233
|
+
export MY_PI_EVAL_SUITE="smoke"
|
|
234
|
+
|
|
235
|
+
PI_CODING_AGENT_DIR="$PWD/.tmp/pi-agent" \
|
|
236
|
+
pnpx my-pi@latest \
|
|
237
|
+
--untrusted \
|
|
238
|
+
--telemetry \
|
|
239
|
+
--telemetry-db "$PWD/.tmp/evals.db" \
|
|
240
|
+
--json "review the README and report the top issue"
|
|
241
|
+
|
|
242
|
+
pnpx pirecall sync --json
|
|
243
|
+
pnpx pirecall recall "readme-review smoke" --json
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
For repeatable local cases after `pnpm run build`, use the TypeScript
|
|
247
|
+
wrapper script:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
pnpm run eval:local -- \
|
|
251
|
+
--suite smoke \
|
|
252
|
+
--case readme-review \
|
|
253
|
+
--prompt "review the README and report the top issue"
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
It sets `MY_PI_EVAL_*`, uses an isolated `.tmp/pi-agent`, writes
|
|
257
|
+
telemetry to `.tmp/evals.db`, and passes `--untrusted` by default. Add
|
|
258
|
+
extra my-pi flags after `--`, for example `-- --model openai:gpt-5`.
|
|
259
|
+
|
|
260
|
+
For assertion-backed regression gates, run the committed smoke suite
|
|
261
|
+
after `pnpm run build`:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
pnpm run eval:suite
|
|
265
|
+
pnpm run eval:suite -- --case no-mcp-removes-mcp-tools
|
|
266
|
+
pnpm run eval:suite -- --json
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Suites live in `evals/*.json`. Each case declares a command plus
|
|
270
|
+
objective assertions for exit code and expected/forbidden stdout,
|
|
271
|
+
stderr, or combined output. Cases can declare required environment
|
|
272
|
+
variable names; missing values are reported as skips without printing
|
|
273
|
+
secret values.
|
|
274
|
+
|
|
177
275
|
Recorded tables:
|
|
178
276
|
|
|
179
277
|
- `runs`
|
|
@@ -181,6 +279,11 @@ Recorded tables:
|
|
|
181
279
|
- `tool_calls`
|
|
182
280
|
- `provider_requests`
|
|
183
281
|
|
|
282
|
+
A telemetry export is JSON with one object per run and nested
|
|
283
|
+
summaries for turns, tool calls, and provider requests, keyed by
|
|
284
|
+
run/eval ids so it can be compared with the matching `pirecall`
|
|
285
|
+
transcript.
|
|
286
|
+
|
|
184
287
|
Query and export helpers:
|
|
185
288
|
|
|
186
289
|
- `/telemetry query ...` shows recent run summaries
|
|
@@ -287,7 +390,10 @@ built-in extensions.
|
|
|
287
390
|
|
|
288
391
|
Built-in extension choices can also be saved interactively with
|
|
289
392
|
`/extensions`. Startup flags like `--no-recall` and `--no-skills`
|
|
290
|
-
still force-disable those extensions for the current process only.
|
|
393
|
+
still force-disable those extensions for the current process only. The
|
|
394
|
+
built-in registry in `src/extensions/builtin-registry.ts` is the
|
|
395
|
+
source of truth for built-in order, API option names, disable flags,
|
|
396
|
+
labels, and runtime-mode constraints.
|
|
291
397
|
|
|
292
398
|
### Themes
|
|
293
399
|
|
|
@@ -485,8 +591,17 @@ In interactive mode:
|
|
|
485
591
|
|
|
486
592
|
The filter-output extension automatically redacts secrets (API keys,
|
|
487
593
|
tokens, passwords, private keys) from tool output before the LLM sees
|
|
488
|
-
them. Detection patterns from
|
|
489
|
-
[nopeek](https://github.com/spences10/nopeek).
|
|
594
|
+
them. Detection patterns come from
|
|
595
|
+
[nopeek](https://github.com/spences10/nopeek). This is a defensive
|
|
596
|
+
last-mile guard, not a substitute for secret hygiene: prefer `nopeek`
|
|
597
|
+
for loading credentials and avoid printing secrets in the first place.
|
|
598
|
+
|
|
599
|
+
The redactor intentionally errs on the side of caution, which means it
|
|
600
|
+
can occasionally hide benign metadata such as URLs or documentation
|
|
601
|
+
examples. If that happens in a trusted local context, inspect the file
|
|
602
|
+
directly or temporarily run with `--no-filter`; do not disable the
|
|
603
|
+
filter when reading unknown logs, `.env` files, or untrusted command
|
|
604
|
+
output.
|
|
490
605
|
|
|
491
606
|
Use `/redact-stats` to see how many secrets were caught. Disable with
|
|
492
607
|
`--no-filter`.
|
|
@@ -658,6 +773,18 @@ pi install npm:@spences10/pi-themes
|
|
|
658
773
|
Each package README is the entry point for install instructions,
|
|
659
774
|
commands, runtime behavior, and development notes.
|
|
660
775
|
|
|
776
|
+
## Monorepo build model
|
|
777
|
+
|
|
778
|
+
Workspace package ordering comes from `workspace:*` dependencies in
|
|
779
|
+
each `packages/*/package.json`. Root `build`, `check`, and `test`
|
|
780
|
+
first run package `build:self` scripts through pnpm's filtered
|
|
781
|
+
workspace graph, so sibling `dist` output is fresh before root packing
|
|
782
|
+
or tests. Individual package `build`, `check`, and `test` scripts use
|
|
783
|
+
the package name from `$npm_package_name^...` to build transitive
|
|
784
|
+
workspace dependencies from metadata, then run their local `*:self`
|
|
785
|
+
task. Do not hand-code sibling package names into scripts; add the
|
|
786
|
+
dependency to `dependencies` instead.
|
|
787
|
+
|
|
661
788
|
## Project Structure
|
|
662
789
|
|
|
663
790
|
```
|
|
@@ -665,6 +792,7 @@ src/
|
|
|
665
792
|
index.ts CLI entry point (citty + pi SDK)
|
|
666
793
|
api.ts Programmatic API (create_my_pi + re-exports)
|
|
667
794
|
extensions/
|
|
795
|
+
builtin-registry.ts Built-in extension metadata, ordering, flags, and loaders
|
|
668
796
|
manager/ Built-in extension manager and config
|
|
669
797
|
prompt-presets/ Runtime prompt preset selection and editing
|
|
670
798
|
session-name/ Session auto-naming
|
package/dist/api.d.ts
CHANGED
|
@@ -1,33 +1,210 @@
|
|
|
1
|
-
import * as _$_mariozechner_pi_coding_agent0 from "@mariozechner/pi-coding-agent";
|
|
2
|
-
import { AgentSessionRuntime, CreateAgentSessionFromServicesOptions, ExtensionFactory, ExtensionFactory as ExtensionFactory$1, InteractiveMode, InteractiveModeOptions, PrintModeOptions, runPrintMode, runRpcMode } from "@mariozechner/pi-coding-agent";
|
|
3
1
|
import { Api, Model } from "@mariozechner/pi-ai";
|
|
2
|
+
import * as _$_mariozechner_pi_coding_agent0 from "@mariozechner/pi-coding-agent";
|
|
3
|
+
import { AgentSessionRuntime, CreateAgentSessionFromServicesOptions, ExtensionAPI, ExtensionFactory, ExtensionFactory as ExtensionFactory$1, InteractiveMode, InteractiveModeOptions, PrintModeOptions, runPrintMode, runRpcMode } from "@mariozechner/pi-coding-agent";
|
|
4
|
+
import * as _$_spences10_pi_context0 from "@spences10/pi-context";
|
|
5
|
+
import * as _$_spences10_pi_mcp0 from "@spences10/pi-mcp";
|
|
6
|
+
import * as _$_spences10_pi_skills0 from "@spences10/pi-skills";
|
|
7
|
+
import * as _$_spences10_pi_redact0 from "@spences10/pi-redact";
|
|
8
|
+
import * as _$_spences10_pi_recall0 from "@spences10/pi-recall";
|
|
9
|
+
import * as _$_spences10_pi_nopeek0 from "@spences10/pi-nopeek";
|
|
10
|
+
import * as _$_spences10_pi_omnisearch0 from "@spences10/pi-omnisearch";
|
|
11
|
+
import * as _$_spences10_pi_sqlite_tools0 from "@spences10/pi-sqlite-tools";
|
|
12
|
+
import * as _$_spences10_pi_confirm_destructive0 from "@spences10/pi-confirm-destructive";
|
|
13
|
+
import * as _$_spences10_pi_team_mode0 from "@spences10/pi-team-mode";
|
|
4
14
|
|
|
5
|
-
//#region src/extensions/
|
|
6
|
-
|
|
15
|
+
//#region src/extensions/prompt-presets/index.d.ts
|
|
16
|
+
declare function prompt_presets(pi: ExtensionAPI): Promise<void>;
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/extensions/session-name/index.d.ts
|
|
19
|
+
declare function session_name(pi: ExtensionAPI): Promise<void>;
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/extensions/builtin-registry.d.ts
|
|
22
|
+
declare const BUILTIN_EXTENSION_REGISTRY: readonly [{
|
|
23
|
+
readonly key: "context-sidecar";
|
|
24
|
+
readonly label: "Context sidecar";
|
|
25
|
+
readonly docs_label: "SQLite context sidecar";
|
|
26
|
+
readonly description: "Local SQLite FTS sidecar for oversized tool output";
|
|
27
|
+
readonly default_enabled: true;
|
|
28
|
+
readonly option_name: "context_sidecar";
|
|
29
|
+
readonly cli_arg: "no-context-sidecar";
|
|
30
|
+
readonly cli_flag: "--no-context-sidecar";
|
|
31
|
+
readonly cli_description: "Disable SQLite context sidecar for large tool output";
|
|
32
|
+
readonly aliases: readonly ["context-sidecar", "context", "sidecar"];
|
|
33
|
+
readonly load: () => Promise<typeof _$_spences10_pi_context0.default>;
|
|
34
|
+
}, {
|
|
35
|
+
readonly key: "mcp";
|
|
36
|
+
readonly label: "MCP";
|
|
37
|
+
readonly docs_label: "MCP";
|
|
38
|
+
readonly description: "MCP server integration and /mcp command";
|
|
39
|
+
readonly default_enabled: true;
|
|
40
|
+
readonly option_name: "mcp";
|
|
41
|
+
readonly cli_arg: "no-mcp";
|
|
42
|
+
readonly cli_flag: "--no-mcp";
|
|
43
|
+
readonly cli_description: "Disable built-in MCP extension";
|
|
44
|
+
readonly aliases: readonly ["mcp"];
|
|
45
|
+
readonly load: () => Promise<typeof _$_spences10_pi_mcp0.default>;
|
|
46
|
+
}, {
|
|
47
|
+
readonly key: "skills";
|
|
48
|
+
readonly label: "Skills";
|
|
49
|
+
readonly docs_label: "Skills";
|
|
50
|
+
readonly description: "Managed pi-native skills and /skills command";
|
|
51
|
+
readonly default_enabled: true;
|
|
52
|
+
readonly option_name: "skills";
|
|
53
|
+
readonly cli_arg: "no-skills";
|
|
54
|
+
readonly cli_flag: "--no-skills";
|
|
55
|
+
readonly cli_description: "Disable built-in skills extension";
|
|
56
|
+
readonly aliases: readonly ["skills", "skill"];
|
|
57
|
+
readonly load: () => Promise<typeof _$_spences10_pi_skills0.default>;
|
|
58
|
+
}, {
|
|
59
|
+
readonly key: "filter-output";
|
|
60
|
+
readonly label: "Filter output";
|
|
61
|
+
readonly docs_label: "Output filtering";
|
|
62
|
+
readonly description: "Secret redaction for tool output";
|
|
63
|
+
readonly default_enabled: true;
|
|
64
|
+
readonly option_name: "filter_output";
|
|
65
|
+
readonly cli_arg: "no-filter";
|
|
66
|
+
readonly cli_flag: "--no-filter";
|
|
67
|
+
readonly cli_description: "Disable secret redaction in tool output";
|
|
68
|
+
readonly aliases: readonly ["filter-output", "filter_output", "filter", "redaction"];
|
|
69
|
+
readonly load: () => Promise<typeof _$_spences10_pi_redact0.default>;
|
|
70
|
+
}, {
|
|
71
|
+
readonly key: "recall";
|
|
72
|
+
readonly label: "Recall";
|
|
73
|
+
readonly docs_label: "Recall";
|
|
74
|
+
readonly description: "pirecall reminder and background session sync";
|
|
75
|
+
readonly default_enabled: true;
|
|
76
|
+
readonly option_name: "recall";
|
|
77
|
+
readonly cli_arg: "no-recall";
|
|
78
|
+
readonly cli_flag: "--no-recall";
|
|
79
|
+
readonly cli_description: "Disable recall extension";
|
|
80
|
+
readonly aliases: readonly ["recall", "pirecall"];
|
|
81
|
+
readonly load: () => Promise<typeof _$_spences10_pi_recall0.default>;
|
|
82
|
+
}, {
|
|
83
|
+
readonly key: "nopeek";
|
|
84
|
+
readonly label: "Nopeek";
|
|
85
|
+
readonly docs_label: "Nopeek";
|
|
86
|
+
readonly description: "nopeek reminder for secret-safe environment loading";
|
|
87
|
+
readonly default_enabled: true;
|
|
88
|
+
readonly option_name: "nopeek";
|
|
89
|
+
readonly cli_arg: "no-nopeek";
|
|
90
|
+
readonly cli_flag: "--no-nopeek";
|
|
91
|
+
readonly cli_description: "Disable nopeek reminder extension";
|
|
92
|
+
readonly aliases: readonly ["nopeek", "secrets", "secret-loading"];
|
|
93
|
+
readonly load: () => Promise<typeof _$_spences10_pi_nopeek0.default>;
|
|
94
|
+
}, {
|
|
95
|
+
readonly key: "omnisearch";
|
|
96
|
+
readonly label: "Omnisearch";
|
|
97
|
+
readonly docs_label: "Omnisearch";
|
|
98
|
+
readonly description: "mcp-omnisearch reminder for verified web research";
|
|
99
|
+
readonly default_enabled: true;
|
|
100
|
+
readonly option_name: "omnisearch";
|
|
101
|
+
readonly cli_arg: "no-omnisearch";
|
|
102
|
+
readonly cli_flag: "--no-omnisearch";
|
|
103
|
+
readonly cli_description: "Disable mcp-omnisearch reminder extension";
|
|
104
|
+
readonly aliases: readonly ["omnisearch", "search", "web-search", "research"];
|
|
105
|
+
readonly load: () => Promise<typeof _$_spences10_pi_omnisearch0.default>;
|
|
106
|
+
}, {
|
|
107
|
+
readonly key: "sqlite-tools";
|
|
108
|
+
readonly label: "SQLite tools";
|
|
109
|
+
readonly docs_label: "SQLite tools";
|
|
110
|
+
readonly description: "mcp-sqlite-tools reminder for safer SQLite database work";
|
|
111
|
+
readonly default_enabled: true;
|
|
112
|
+
readonly option_name: "sqlite_tools";
|
|
113
|
+
readonly cli_arg: "no-sqlite-tools";
|
|
114
|
+
readonly cli_flag: "--no-sqlite-tools";
|
|
115
|
+
readonly cli_description: "Disable mcp-sqlite-tools reminder extension";
|
|
116
|
+
readonly aliases: readonly ["sqlite-tools", "sqlite", "mcp-sqlite-tools"];
|
|
117
|
+
readonly load: () => Promise<typeof _$_spences10_pi_sqlite_tools0.default>;
|
|
118
|
+
}, {
|
|
119
|
+
readonly key: "prompt-presets";
|
|
120
|
+
readonly label: "Prompt presets";
|
|
121
|
+
readonly docs_label: "Prompt presets";
|
|
122
|
+
readonly description: "Runtime prompt preset selection and /prompt-preset command";
|
|
123
|
+
readonly default_enabled: true;
|
|
124
|
+
readonly option_name: "prompt_presets";
|
|
125
|
+
readonly cli_arg: "no-prompt-presets";
|
|
126
|
+
readonly cli_flag: "--no-prompt-presets";
|
|
127
|
+
readonly cli_description: "Disable prompt presets extension";
|
|
128
|
+
readonly aliases: readonly ["prompt-presets", "prompt-preset", "preset", "presets"];
|
|
129
|
+
readonly load: () => Promise<typeof prompt_presets>;
|
|
130
|
+
}, {
|
|
131
|
+
readonly key: "lsp";
|
|
132
|
+
readonly label: "LSP";
|
|
133
|
+
readonly docs_label: "LSP";
|
|
134
|
+
readonly description: "Language Server Protocol tools (diagnostics, hover, definition, references)";
|
|
135
|
+
readonly default_enabled: true;
|
|
136
|
+
readonly option_name: "lsp";
|
|
137
|
+
readonly cli_arg: "no-lsp";
|
|
138
|
+
readonly cli_flag: "--no-lsp";
|
|
139
|
+
readonly cli_description: "Disable LSP extension";
|
|
140
|
+
readonly aliases: readonly ["lsp", "language-server"];
|
|
141
|
+
readonly load: () => Promise<(pi: _$_mariozechner_pi_coding_agent0.ExtensionAPI) => Promise<void>>;
|
|
142
|
+
}, {
|
|
143
|
+
readonly key: "session-name";
|
|
144
|
+
readonly label: "Session name";
|
|
145
|
+
readonly docs_label: "Session auto-naming";
|
|
146
|
+
readonly description: "AI-powered session auto-naming and /session-name command";
|
|
147
|
+
readonly default_enabled: true;
|
|
148
|
+
readonly option_name: "session_name";
|
|
149
|
+
readonly cli_arg: "no-session-name";
|
|
150
|
+
readonly cli_flag: "--no-session-name";
|
|
151
|
+
readonly cli_description: "Disable session name extension";
|
|
152
|
+
readonly aliases: readonly ["session-name", "session", "auto-name"];
|
|
153
|
+
readonly mode_constraints: {
|
|
154
|
+
readonly disabled_in: readonly ["print", "json", "rpc"];
|
|
155
|
+
readonly reason: "UI-only session naming is only useful in interactive mode";
|
|
156
|
+
};
|
|
157
|
+
readonly load: () => Promise<typeof session_name>;
|
|
158
|
+
}, {
|
|
159
|
+
readonly key: "confirm-destructive";
|
|
160
|
+
readonly label: "Confirm destructive";
|
|
161
|
+
readonly docs_label: "Destructive action confirmation";
|
|
162
|
+
readonly description: "Prompt before destructive tool calls like file deletes, overwrites, and hard resets";
|
|
163
|
+
readonly default_enabled: true;
|
|
164
|
+
readonly option_name: "confirm_destructive";
|
|
165
|
+
readonly cli_arg: "no-confirm-destructive";
|
|
166
|
+
readonly cli_flag: "--no-confirm-destructive";
|
|
167
|
+
readonly cli_description: "Disable destructive action confirmations";
|
|
168
|
+
readonly aliases: readonly ["confirm-destructive", "confirm"];
|
|
169
|
+
readonly load: () => Promise<typeof _$_spences10_pi_confirm_destructive0.default>;
|
|
170
|
+
}, {
|
|
171
|
+
readonly key: "hooks-resolution";
|
|
172
|
+
readonly label: "Hooks resolution";
|
|
173
|
+
readonly docs_label: "Hooks resolution";
|
|
174
|
+
readonly description: "Claude Code style PostToolUse hook compatibility from .claude, .rulesync, and .pi configs";
|
|
175
|
+
readonly default_enabled: true;
|
|
176
|
+
readonly option_name: "hooks_resolution";
|
|
177
|
+
readonly cli_arg: "no-hooks";
|
|
178
|
+
readonly cli_flag: "--no-hooks";
|
|
179
|
+
readonly cli_description: "Disable Claude-style hook execution";
|
|
180
|
+
readonly aliases: readonly ["hooks-resolution", "hooks"];
|
|
181
|
+
readonly load: () => Promise<ExtensionFactory$1>;
|
|
182
|
+
}, {
|
|
183
|
+
readonly key: "team-mode";
|
|
184
|
+
readonly label: "Team mode";
|
|
185
|
+
readonly docs_label: "Team mode";
|
|
186
|
+
readonly description: "Experimental orchestrator/team mode with RPC teammates, tasks, and mailboxes";
|
|
187
|
+
readonly default_enabled: true;
|
|
188
|
+
readonly option_name: "team_mode";
|
|
189
|
+
readonly cli_arg: "no-team-mode";
|
|
190
|
+
readonly cli_flag: "--no-team-mode";
|
|
191
|
+
readonly cli_description: "Disable experimental team mode extension";
|
|
192
|
+
readonly aliases: readonly ["team-mode", "team", "teammates"];
|
|
193
|
+
readonly load: () => Promise<typeof _$_spences10_pi_team_mode0.default>;
|
|
194
|
+
}];
|
|
195
|
+
type BuiltinExtensionKey = (typeof BUILTIN_EXTENSION_REGISTRY)[number]['key'];
|
|
196
|
+
type BuiltinExtensionOptionName = (typeof BUILTIN_EXTENSION_REGISTRY)[number]['option_name'];
|
|
7
197
|
//#endregion
|
|
8
198
|
//#region src/api.d.ts
|
|
9
199
|
type MyPiRuntimeMode = 'interactive' | 'print' | 'json' | 'rpc';
|
|
10
200
|
type MyPiThinkingLevel = NonNullable<CreateAgentSessionFromServicesOptions['thinkingLevel']>;
|
|
11
|
-
|
|
201
|
+
type BuiltinExtensionOptions = Partial<Record<BuiltinExtensionOptionName, boolean>>;
|
|
202
|
+
interface CreateMyPiOptions extends BuiltinExtensionOptions {
|
|
12
203
|
cwd?: string;
|
|
13
204
|
agent_dir?: string;
|
|
14
205
|
extensions?: string[];
|
|
15
206
|
extensionFactories?: ExtensionFactory$1[];
|
|
16
207
|
runtime_mode?: MyPiRuntimeMode;
|
|
17
|
-
context_sidecar?: boolean;
|
|
18
|
-
mcp?: boolean;
|
|
19
|
-
skills?: boolean;
|
|
20
|
-
filter_output?: boolean;
|
|
21
|
-
recall?: boolean;
|
|
22
|
-
nopeek?: boolean;
|
|
23
|
-
omnisearch?: boolean;
|
|
24
|
-
sqlite_tools?: boolean;
|
|
25
|
-
prompt_presets?: boolean;
|
|
26
|
-
lsp?: boolean;
|
|
27
|
-
session_name?: boolean;
|
|
28
|
-
confirm_destructive?: boolean;
|
|
29
|
-
hooks_resolution?: boolean;
|
|
30
|
-
team_mode?: boolean;
|
|
31
208
|
telemetry?: boolean;
|
|
32
209
|
telemetry_db_path?: string;
|
|
33
210
|
model?: string;
|
|
@@ -39,14 +216,17 @@ interface CreateMyPiOptions {
|
|
|
39
216
|
append_system_prompt?: string;
|
|
40
217
|
untrusted_repo?: boolean;
|
|
41
218
|
}
|
|
219
|
+
type BuiltinExtensionLoader = () => Promise<ExtensionFactory$1>;
|
|
42
220
|
declare function apply_untrusted_repo_defaults(env?: NodeJS.ProcessEnv): string[];
|
|
43
221
|
declare function is_project_local_skill_path(cwd: string, file_path: string | undefined): boolean;
|
|
44
222
|
interface ModelRegistryLike {
|
|
45
223
|
getAll(): Model<Api>[];
|
|
46
224
|
}
|
|
47
225
|
declare function resolve_model_reference(model_reference: string | undefined, model_registry: ModelRegistryLike): Model<Api> | undefined;
|
|
48
|
-
declare function
|
|
226
|
+
declare function resolve_effective_thinking_level(model: Model<Api> | undefined, thinking: MyPiThinkingLevel | undefined): MyPiThinkingLevel | undefined;
|
|
227
|
+
declare function get_force_disabled_builtins(options: Pick<CreateMyPiOptions, 'runtime_mode'> & BuiltinExtensionOptions): ReadonlySet<BuiltinExtensionKey>;
|
|
228
|
+
declare function create_lazy_builtin_extension_factory(key: BuiltinExtensionKey, load_extension: BuiltinExtensionLoader, force_disabled: ReadonlySet<BuiltinExtensionKey>): ExtensionFactory$1;
|
|
49
229
|
declare function create_my_pi(options?: CreateMyPiOptions): Promise<_$_mariozechner_pi_coding_agent0.AgentSessionRuntime>;
|
|
50
230
|
//#endregion
|
|
51
|
-
export { type AgentSessionRuntime, CreateMyPiOptions, type ExtensionFactory, InteractiveMode, type InteractiveModeOptions, MyPiRuntimeMode, MyPiThinkingLevel, type PrintModeOptions, apply_untrusted_repo_defaults, create_my_pi, get_force_disabled_builtins, is_project_local_skill_path, resolve_model_reference, runPrintMode, runRpcMode };
|
|
231
|
+
export { type AgentSessionRuntime, CreateMyPiOptions, type ExtensionFactory, InteractiveMode, type InteractiveModeOptions, MyPiRuntimeMode, MyPiThinkingLevel, type PrintModeOptions, apply_untrusted_repo_defaults, create_lazy_builtin_extension_factory, create_my_pi, get_force_disabled_builtins, is_project_local_skill_path, resolve_effective_thinking_level, resolve_model_reference, runPrintMode, runRpcMode };
|
|
52
232
|
//# sourceMappingURL=api.d.ts.map
|