my-pi 0.1.26 → 0.1.28
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 +131 -4
- package/dist/api.d.ts +199 -20
- package/dist/api.js +36 -1741
- package/dist/api.js.map +1 -1
- 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 +14 -84
- 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 +27 -25
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
|
|
@@ -51,6 +79,13 @@ pnpx my-pi@latest
|
|
|
51
79
|
# or: npx my-pi@latest / bunx my-pi@latest
|
|
52
80
|
```
|
|
53
81
|
|
|
82
|
+
With pnpm 10's build-script approval gate, use explicit build
|
|
83
|
+
allowances if you want a warning-free `pnpx` install:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pnpm dlx --allow-build=@google/genai --allow-build=koffi --allow-build=protobufjs my-pi@latest
|
|
87
|
+
```
|
|
88
|
+
|
|
54
89
|
### API Keys
|
|
55
90
|
|
|
56
91
|
Pi handles authentication natively via `AuthStorage`. Options (in
|
|
@@ -137,7 +172,9 @@ Team state is stored under `~/.pi/agent/teams-local` by default, or
|
|
|
137
172
|
Telemetry is **disabled by default**. When enabled, my-pi records
|
|
138
173
|
operational telemetry for each run in a local SQLite database. This is
|
|
139
174
|
intended for eval harnesses, latency analysis, tool failure analysis,
|
|
140
|
-
and local debugging.
|
|
175
|
+
and local debugging. Telemetry captures structured operational data;
|
|
176
|
+
`pirecall` complements it by retrieving the surrounding session
|
|
177
|
+
transcript and prior-work context.
|
|
141
178
|
|
|
142
179
|
```bash
|
|
143
180
|
pnpx my-pi@latest --telemetry --json "solve this task"
|
|
@@ -182,6 +219,66 @@ Recommended eval env vars for correlation:
|
|
|
182
219
|
- `MY_PI_EVAL_ATTEMPT`
|
|
183
220
|
- `MY_PI_EVAL_SUITE`
|
|
184
221
|
|
|
222
|
+
A typical eval loop is:
|
|
223
|
+
|
|
224
|
+
1. Create a stable eval run/case id.
|
|
225
|
+
2. Run my-pi with `--telemetry`, usually with an isolated
|
|
226
|
+
`PI_CODING_AGENT_DIR` and `--untrusted` for reproducibility.
|
|
227
|
+
3. Query or export telemetry for timings, tool calls, provider
|
|
228
|
+
requests, and success/failure state.
|
|
229
|
+
4. Use `pirecall` to inspect the transcript context around the same
|
|
230
|
+
task when the structured rows are not enough.
|
|
231
|
+
5. Compare attempts by `MY_PI_EVAL_RUN_ID`, `MY_PI_EVAL_CASE_ID`,
|
|
232
|
+
`MY_PI_EVAL_ATTEMPT`, and `MY_PI_EVAL_SUITE`.
|
|
233
|
+
|
|
234
|
+
Example:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
export MY_PI_EVAL_RUN_ID="smoke-$(date +%Y%m%d-%H%M%S)"
|
|
238
|
+
export MY_PI_EVAL_CASE_ID="readme-review"
|
|
239
|
+
export MY_PI_EVAL_ATTEMPT=1
|
|
240
|
+
export MY_PI_EVAL_SUITE="smoke"
|
|
241
|
+
|
|
242
|
+
PI_CODING_AGENT_DIR="$PWD/.tmp/pi-agent" \
|
|
243
|
+
pnpx my-pi@latest \
|
|
244
|
+
--untrusted \
|
|
245
|
+
--telemetry \
|
|
246
|
+
--telemetry-db "$PWD/.tmp/evals.db" \
|
|
247
|
+
--json "review the README and report the top issue"
|
|
248
|
+
|
|
249
|
+
pnpx pirecall sync --json
|
|
250
|
+
pnpx pirecall recall "readme-review smoke" --json
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
For repeatable local cases after `pnpm run build`, use the TypeScript
|
|
254
|
+
wrapper script:
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
pnpm run eval:local -- \
|
|
258
|
+
--suite smoke \
|
|
259
|
+
--case readme-review \
|
|
260
|
+
--prompt "review the README and report the top issue"
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
It sets `MY_PI_EVAL_*`, uses an isolated `.tmp/pi-agent`, writes
|
|
264
|
+
telemetry to `.tmp/evals.db`, and passes `--untrusted` by default. Add
|
|
265
|
+
extra my-pi flags after `--`, for example `-- --model openai:gpt-5`.
|
|
266
|
+
|
|
267
|
+
For assertion-backed regression gates, run the committed smoke suite
|
|
268
|
+
after `pnpm run build`:
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
pnpm run eval:suite
|
|
272
|
+
pnpm run eval:suite -- --case no-mcp-removes-mcp-tools
|
|
273
|
+
pnpm run eval:suite -- --json
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Suites live in `evals/*.json`. Each case declares a command plus
|
|
277
|
+
objective assertions for exit code and expected/forbidden stdout,
|
|
278
|
+
stderr, or combined output. Cases can declare required environment
|
|
279
|
+
variable names; missing values are reported as skips without printing
|
|
280
|
+
secret values.
|
|
281
|
+
|
|
185
282
|
Recorded tables:
|
|
186
283
|
|
|
187
284
|
- `runs`
|
|
@@ -189,6 +286,11 @@ Recorded tables:
|
|
|
189
286
|
- `tool_calls`
|
|
190
287
|
- `provider_requests`
|
|
191
288
|
|
|
289
|
+
A telemetry export is JSON with one object per run and nested
|
|
290
|
+
summaries for turns, tool calls, and provider requests, keyed by
|
|
291
|
+
run/eval ids so it can be compared with the matching `pirecall`
|
|
292
|
+
transcript.
|
|
293
|
+
|
|
192
294
|
Query and export helpers:
|
|
193
295
|
|
|
194
296
|
- `/telemetry query ...` shows recent run summaries
|
|
@@ -295,7 +397,10 @@ built-in extensions.
|
|
|
295
397
|
|
|
296
398
|
Built-in extension choices can also be saved interactively with
|
|
297
399
|
`/extensions`. Startup flags like `--no-recall` and `--no-skills`
|
|
298
|
-
still force-disable those extensions for the current process only.
|
|
400
|
+
still force-disable those extensions for the current process only. The
|
|
401
|
+
built-in registry in `src/extensions/builtin-registry.ts` is the
|
|
402
|
+
source of truth for built-in order, API option names, disable flags,
|
|
403
|
+
labels, and runtime-mode constraints.
|
|
299
404
|
|
|
300
405
|
### Themes
|
|
301
406
|
|
|
@@ -493,8 +598,17 @@ In interactive mode:
|
|
|
493
598
|
|
|
494
599
|
The filter-output extension automatically redacts secrets (API keys,
|
|
495
600
|
tokens, passwords, private keys) from tool output before the LLM sees
|
|
496
|
-
them. Detection patterns from
|
|
497
|
-
[nopeek](https://github.com/spences10/nopeek).
|
|
601
|
+
them. Detection patterns come from
|
|
602
|
+
[nopeek](https://github.com/spences10/nopeek). This is a defensive
|
|
603
|
+
last-mile guard, not a substitute for secret hygiene: prefer `nopeek`
|
|
604
|
+
for loading credentials and avoid printing secrets in the first place.
|
|
605
|
+
|
|
606
|
+
The redactor intentionally errs on the side of caution, which means it
|
|
607
|
+
can occasionally hide benign metadata such as URLs or documentation
|
|
608
|
+
examples. If that happens in a trusted local context, inspect the file
|
|
609
|
+
directly or temporarily run with `--no-filter`; do not disable the
|
|
610
|
+
filter when reading unknown logs, `.env` files, or untrusted command
|
|
611
|
+
output.
|
|
498
612
|
|
|
499
613
|
Use `/redact-stats` to see how many secrets were caught. Disable with
|
|
500
614
|
`--no-filter`.
|
|
@@ -666,6 +780,18 @@ pi install npm:@spences10/pi-themes
|
|
|
666
780
|
Each package README is the entry point for install instructions,
|
|
667
781
|
commands, runtime behavior, and development notes.
|
|
668
782
|
|
|
783
|
+
## Monorepo build model
|
|
784
|
+
|
|
785
|
+
Workspace package ordering comes from `workspace:*` dependencies in
|
|
786
|
+
each `packages/*/package.json`. Root `build`, `check`, and `test`
|
|
787
|
+
first run package `build:self` scripts through pnpm's filtered
|
|
788
|
+
workspace graph, so sibling `dist` output is fresh before root packing
|
|
789
|
+
or tests. Individual package `build`, `check`, and `test` scripts use
|
|
790
|
+
the package name from `$npm_package_name^...` to build transitive
|
|
791
|
+
workspace dependencies from metadata, then run their local `*:self`
|
|
792
|
+
task. Do not hand-code sibling package names into scripts; add the
|
|
793
|
+
dependency to `dependencies` instead.
|
|
794
|
+
|
|
669
795
|
## Project Structure
|
|
670
796
|
|
|
671
797
|
```
|
|
@@ -673,6 +799,7 @@ src/
|
|
|
673
799
|
index.ts CLI entry point (citty + pi SDK)
|
|
674
800
|
api.ts Programmatic API (create_my_pi + re-exports)
|
|
675
801
|
extensions/
|
|
802
|
+
builtin-registry.ts Built-in extension metadata, ordering, flags, and loaders
|
|
676
803
|
manager/ Built-in extension manager and config
|
|
677
804
|
prompt-presets/ Runtime prompt preset selection and editing
|
|
678
805
|
session-name/ Session auto-naming
|
package/dist/api.d.ts
CHANGED
|
@@ -1,33 +1,210 @@
|
|
|
1
1
|
import { Api, Model } from "@mariozechner/pi-ai";
|
|
2
2
|
import * as _$_mariozechner_pi_coding_agent0 from "@mariozechner/pi-coding-agent";
|
|
3
|
-
import { AgentSessionRuntime, CreateAgentSessionFromServicesOptions, ExtensionFactory, ExtensionFactory as ExtensionFactory$1, InteractiveMode, InteractiveModeOptions, PrintModeOptions, runPrintMode, runRpcMode } 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,6 +216,7 @@ 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 {
|
|
@@ -46,8 +224,9 @@ interface ModelRegistryLike {
|
|
|
46
224
|
}
|
|
47
225
|
declare function resolve_model_reference(model_reference: string | undefined, model_registry: ModelRegistryLike): Model<Api> | undefined;
|
|
48
226
|
declare function resolve_effective_thinking_level(model: Model<Api> | undefined, thinking: MyPiThinkingLevel | undefined): MyPiThinkingLevel | undefined;
|
|
49
|
-
declare function get_force_disabled_builtins(options: Pick<CreateMyPiOptions, 'runtime_mode'
|
|
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;
|
|
50
229
|
declare function create_my_pi(options?: CreateMyPiOptions): Promise<_$_mariozechner_pi_coding_agent0.AgentSessionRuntime>;
|
|
51
230
|
//#endregion
|
|
52
|
-
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_effective_thinking_level, 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 };
|
|
53
232
|
//# sourceMappingURL=api.d.ts.map
|