pi-namespace-patch 1.2.0-namespace.2 → 1.4.0-namespace.1
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/CHANGELOG.md +102 -0
- package/README.md +5 -5
- package/dist/bundle/chunks/anthropic-messages-5FHV3XZG.js +6 -0
- package/dist/bundle/chunks/azure-openai-responses-KLTRI2FU.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +12 -9
- package/dist/bundle/chunks/{chunk-TRDNDS6A.js → chunk-3V45WARH.js} +6 -3
- package/dist/bundle/chunks/chunk-4GGCU36O.js +11 -0
- package/dist/bundle/chunks/{chunk-S3GGRYIO.js → chunk-5AGIVGSV.js} +1 -1
- package/dist/bundle/chunks/{chunk-F5ZABL6Z.js → chunk-7CBJINYJ.js} +2 -2
- package/dist/bundle/chunks/{chunk-DRQDKNXA.js → chunk-7DDKXS2Q.js} +1 -1
- package/dist/bundle/chunks/{chunk-CQ3XTLTY.js → chunk-A45IWOC6.js} +4 -4
- package/dist/bundle/chunks/{chunk-WJUNYZC5.js → chunk-BSS6T6KQ.js} +1 -1
- package/dist/bundle/chunks/{chunk-H3QXYIF7.js → chunk-CF5GWZHW.js} +1 -1
- package/dist/bundle/chunks/{chunk-DOST5PQW.js → chunk-EGE5YVUM.js} +1 -1
- package/dist/bundle/chunks/{chunk-C2AEIDJZ.js → chunk-FB6L7ZMV.js} +1 -1
- package/dist/bundle/chunks/chunk-H76KZMOI.js +2 -0
- package/dist/bundle/chunks/{chunk-GDR5JFDJ.js → chunk-INGZIYBC.js} +2 -2
- package/dist/bundle/chunks/{chunk-D7PHKNBM.js → chunk-IUWY2KTF.js} +11 -11
- package/dist/bundle/chunks/{chunk-4L3WN2XY.js → chunk-JXWJOIH4.js} +1 -1
- package/dist/bundle/chunks/{chunk-6CYCI3EJ.js → chunk-LVVZS2NO.js} +1 -1
- package/dist/bundle/chunks/{chunk-5GTPJSRI.js → chunk-N43LRJ4N.js} +1 -1
- package/dist/bundle/chunks/chunk-NFLURVK3.js +2 -0
- package/dist/bundle/chunks/chunk-QSDU2SDK.js +16 -0
- package/dist/bundle/chunks/chunk-RISAW7OQ.js +9 -0
- package/dist/bundle/chunks/{chunk-AKJ3ZOR3.js → chunk-RWO6Q3KK.js} +1 -1
- package/dist/bundle/chunks/{chunk-6MWTY2OB.js → chunk-T726RZZU.js} +10 -9
- package/dist/bundle/chunks/{chunk-ZBURYEWF.js → chunk-TMTOQ7H7.js} +1 -1
- package/dist/bundle/chunks/chunk-TRERZKRC.js +2 -0
- package/dist/bundle/chunks/{chunk-22CYIUS4.js → chunk-UKVNB6C4.js} +1 -1
- package/dist/bundle/chunks/chunk-Z6I32PHA.js +2 -0
- package/dist/bundle/chunks/{chunk-H7S5Z6OB.js → chunk-ZEIZZEGK.js} +42 -40
- package/dist/bundle/chunks/{cli-SWM4FQ6V.js → cli-MIMUTM5L.js} +1 -1
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-7J6REGDV.js +2 -0
- package/dist/bundle/chunks/{easter-egg-3d-OX6RUCIS.js → easter-egg-3d-RMLF7AC4.js} +1 -1
- package/dist/bundle/chunks/{execute-3CFUPDLS.js → execute-MT7QEDSI.js} +9 -3
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/google-generative-ai-VPNFZDHO.js +2 -0
- package/dist/bundle/chunks/google-vertex-ZFM23MQ4.js +2 -0
- package/dist/bundle/chunks/https-proxy-agent-LVOO5TPL.js +13 -0
- package/dist/bundle/chunks/{jiti-loader-C3NU2SDH.js → jiti-loader-GL4HJFAD.js} +1 -1
- package/dist/bundle/chunks/{jiti-static-loader-E6ANQD5T.js → jiti-static-loader-2RCDI6B4.js} +1 -1
- package/dist/bundle/chunks/{lib-TEDK3E5I.js → lib-4AVRLBHM.js} +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-FYN623RH.js → llama-cpp-classify-U4EH6TAM.js} +2 -2
- package/dist/bundle/chunks/mistral-conversations-WCAJTBXO.js +5 -0
- package/dist/bundle/chunks/{multipart-parser-SQ6GDJL7.js → multipart-parser-FMGQ7342.js} +1 -1
- package/dist/bundle/chunks/{node-TWVVAGPO.js → node-AUOGOBCN.js} +1 -1
- package/dist/bundle/chunks/{node-N5BSDOA5.js → node-KCMANYC2.js} +1 -1
- package/dist/bundle/chunks/openai-codex-responses-JQR3IK2C.js +10 -0
- package/dist/bundle/chunks/openai-completions-27RKPL37.js +7 -0
- package/dist/bundle/chunks/{openai-decisions-WVPMQ4JD.js → openai-decisions-MJYPUCLX.js} +1 -1
- package/dist/bundle/chunks/openai-responses-I2TBW7OL.js +4 -0
- package/dist/bundle/chunks/openrouter-images-WBAVKHHY.js +2 -0
- package/dist/bundle/chunks/pi-messages-S7RKCD5K.js +8 -0
- package/dist/bundle/chunks/{runtime-366HE7CW.js → runtime-GJOZRI5I.js} +1 -1
- package/dist/bundle/chunks/{src-UK77SYZE.js → src-QKGKDFSU.js} +1 -1
- package/dist/bundle/chunks/typesafe-system-one-4C7ULOVP.js +2 -0
- package/dist/bundle/chunks/virtual-modules-6XWNE4NR.js +2 -0
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/credential-print.d.ts.map +1 -1
- package/dist/cli/credential-print.js +4 -4
- package/dist/cli/credential-print.js.map +1 -1
- package/dist/core/agent-session.d.ts +9 -3
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +45 -15
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/client-identity.d.ts +8 -0
- package/dist/core/client-identity.d.ts.map +1 -0
- package/dist/core/client-identity.js +15 -0
- package/dist/core/client-identity.js.map +1 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +1 -2
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +2 -2
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +20 -15
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js +2 -0
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/template.html +1 -0
- package/dist/core/export-html/template.js +23 -17
- package/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
- package/dist/core/export-html/vendor/marked.min.js +30 -29
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +3 -0
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/virtual-modules.js +3 -0
- package/dist/core/extensions/virtual-modules.js.map +1 -1
- package/dist/core/model-config.d.ts +939 -8
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +48 -24
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.d.ts +56 -43
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +253 -358
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +6 -3
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/prompt-templates.d.ts.map +1 -1
- package/dist/core/prompt-templates.js +7 -2
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/provider-composer.d.ts +2 -1
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +7 -3
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +8 -9
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +1 -0
- package/dist/core/settings-defaults.d.ts.map +1 -1
- package/dist/core/settings-defaults.js +1 -0
- package/dist/core/settings-defaults.js.map +1 -1
- package/dist/core/settings-manager.d.ts +4 -2
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +11 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +2 -0
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +4 -0
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/slash-commands.js +1 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +3 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +2 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +21 -0
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/read.d.ts.map +1 -1
- package/dist/core/tools/renderers/read.js +7 -11
- package/dist/core/tools/renderers/read.js.map +1 -1
- package/dist/extensions/codemode/execute.d.ts.map +1 -1
- package/dist/extensions/codemode/execute.js +101 -14
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/mcp/config.d.ts.map +1 -1
- package/dist/extensions/mcp/config.js +3 -2
- package/dist/extensions/mcp/config.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +10 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +2 -9
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +11 -15
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +76 -111
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/session-share.d.ts.map +1 -1
- package/dist/modes/interactive/session-share.js +9 -2
- package/dist/modes/interactive/session-share.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +2 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/clipboard-command.d.ts.map +1 -1
- package/dist/utils/clipboard-command.js +3 -0
- package/dist/utils/clipboard-command.js.map +1 -1
- package/dist/utils/pi-user-agent.d.ts +1 -0
- package/dist/utils/pi-user-agent.d.ts.map +1 -1
- package/dist/utils/pi-user-agent.js +3 -2
- package/dist/utils/pi-user-agent.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +45 -13
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +4 -3
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/cli.md +3 -3
- package/docs/codemode.md +3 -1
- package/docs/compaction.md +3 -3
- package/docs/custom-provider.md +53 -1
- package/docs/docs.json +8 -0
- package/docs/environment-variables.md +1 -0
- package/docs/extensions.md +133 -10
- package/docs/llama-cpp.md +1 -1
- package/docs/models-configuration.md +196 -0
- package/docs/models.md +21 -5
- package/docs/nvidia-rtx-llama-cpp.md +96 -0
- package/docs/sessions.md +1 -1
- package/docs/settings.md +2 -1
- package/docs/tui.md +70 -0
- package/docs/usage.md +1 -1
- package/docs/windows.md +16 -2
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/minimal-mode.ts +4 -5
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/index.ts +4 -6
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +7 -6
- package/schemas/models.schema.json +88 -34
- package/schemas/settings.schema.json +18 -0
- package/dist/bundle/chunks/anthropic-messages-Q7SXESRX.js +0 -6
- package/dist/bundle/chunks/azure-openai-responses-LM52U7CK.js +0 -2
- package/dist/bundle/chunks/chunk-3ZATHNCK.js +0 -9
- package/dist/bundle/chunks/chunk-HACVPRBJ.js +0 -11
- package/dist/bundle/chunks/chunk-ITZNWD4K.js +0 -2
- package/dist/bundle/chunks/chunk-TN4NLWHF.js +0 -11
- package/dist/bundle/chunks/chunk-WBQBCFWG.js +0 -2
- package/dist/bundle/chunks/chunk-XIX7LUWI.js +0 -2
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-UTBL2KOF.js +0 -2
- package/dist/bundle/chunks/google-generative-ai-DXKP72HC.js +0 -2
- package/dist/bundle/chunks/google-vertex-W6SIDOVV.js +0 -2
- package/dist/bundle/chunks/https-proxy-agent-2VXB7436.js +0 -13
- package/dist/bundle/chunks/mistral-conversations-GBMHTSYF.js +0 -5
- package/dist/bundle/chunks/openai-codex-responses-RN6B5UPP.js +0 -10
- package/dist/bundle/chunks/openai-completions-QW2B4SML.js +0 -7
- package/dist/bundle/chunks/openai-responses-KDJUSIU7.js +0 -3
- package/dist/bundle/chunks/openrouter-images-DUPG5DZO.js +0 -2
- package/dist/bundle/chunks/pi-messages-YHKPQIHC.js +0 -8
- package/dist/bundle/chunks/typesafe-system-one-ZSK3RN4B.js +0 -2
- package/dist/bundle/chunks/virtual-modules-KHZAOPVZ.js +0 -2
- package/dist/core/provider-attribution.d.ts +0 -4
- package/dist/core/provider-attribution.d.ts.map +0 -1
- package/dist/core/provider-attribution.js +0 -72
- package/dist/core/provider-attribution.js.map +0 -1
package/docs/tui.md
CHANGED
|
@@ -65,6 +65,76 @@ Regular mode leaves mouse input to the terminal because the terminal owns scroll
|
|
|
65
65
|
|
|
66
66
|
`ctx.ui.custom()` temporarily gives one component control of the interactive area and resolves when that component calls the supplied completion callback.
|
|
67
67
|
|
|
68
|
+
### Build a minimal custom screen
|
|
69
|
+
|
|
70
|
+
This complete extension shows the custom-component lifecycle: render within the supplied width, use injected keybindings, invalidate cached output after state changes, request a render, and finish through `done()`.
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
74
|
+
import { truncateToWidth } from "@earendil-works/pi-tui";
|
|
75
|
+
|
|
76
|
+
export default function (pi: ExtensionAPI) {
|
|
77
|
+
pi.registerCommand("pick-target", {
|
|
78
|
+
description: "Pick a deployment target",
|
|
79
|
+
handler: async (_args, ctx) => {
|
|
80
|
+
if (ctx.mode !== "tui") {
|
|
81
|
+
ctx.ui.notify("pick-target requires interactive mode", "error");
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const choices = ["development", "staging", "production"];
|
|
86
|
+
const selected = await ctx.ui.custom<string | undefined>((tui, theme, keybindings, done) => {
|
|
87
|
+
let selectedIndex = 0;
|
|
88
|
+
let cachedWidth: number | undefined;
|
|
89
|
+
let cachedLines: string[] | undefined;
|
|
90
|
+
|
|
91
|
+
const invalidate = () => {
|
|
92
|
+
cachedWidth = undefined;
|
|
93
|
+
cachedLines = undefined;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
render(width: number): string[] {
|
|
98
|
+
if (cachedLines && cachedWidth === width) return cachedLines;
|
|
99
|
+
|
|
100
|
+
cachedWidth = width;
|
|
101
|
+
cachedLines = [
|
|
102
|
+
theme.fg("accent", "Choose a deployment target"),
|
|
103
|
+
...choices.map((choice, index) => `${index === selectedIndex ? "> " : " "}${choice}`),
|
|
104
|
+
theme.fg("dim", "up/down move, enter selects, escape cancels"),
|
|
105
|
+
].map((line) => truncateToWidth(line, width));
|
|
106
|
+
return cachedLines;
|
|
107
|
+
},
|
|
108
|
+
handleInput(data: string): void {
|
|
109
|
+
if (keybindings.matches(data, "tui.select.up")) {
|
|
110
|
+
selectedIndex = (selectedIndex - 1 + choices.length) % choices.length;
|
|
111
|
+
} else if (keybindings.matches(data, "tui.select.down")) {
|
|
112
|
+
selectedIndex = (selectedIndex + 1) % choices.length;
|
|
113
|
+
} else if (keybindings.matches(data, "tui.select.confirm")) {
|
|
114
|
+
done(choices[selectedIndex]);
|
|
115
|
+
return;
|
|
116
|
+
} else if (keybindings.matches(data, "tui.select.cancel")) {
|
|
117
|
+
done(undefined);
|
|
118
|
+
return;
|
|
119
|
+
} else {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
invalidate();
|
|
124
|
+
tui.requestRender();
|
|
125
|
+
},
|
|
126
|
+
invalidate,
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
if (selected) ctx.ui.notify(`Selected ${selected}`, "info");
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
This component does not display a text cursor, so it does not need `Focusable`. A component containing `Input` or `Editor` must implement `Focusable` and propagate its `focused` value to that child.
|
|
137
|
+
|
|
68
138
|
Pass `overlay: true` to draw above existing content. Overlay options control size, anchors, offsets, margins, and responsive visibility. An overlay handle can change focus or temporarily hide and show the overlay with `setHidden()` while the interaction remains active.
|
|
69
139
|
|
|
70
140
|
Focused overlays retain input ownership across ordinary renders. If another component should receive input while an overlay remains visible, explicitly release or redirect focus through the handle.
|
package/docs/usage.md
CHANGED
|
@@ -79,7 +79,7 @@ Use `!!` when you want to run a command without sending its output to the model.
|
|
|
79
79
|
|
|
80
80
|
Press `Ctrl+X` or run `/copy` to copy the last assistant response. Use `/export` to save the session as HTML or JSONL.
|
|
81
81
|
|
|
82
|
-
Use `/share` to upload the session and get a viewer link.
|
|
82
|
+
Use `/share` to upload the session and get a viewer link. By default, Radius authentication makes the artifact visible to your Radius organization; otherwise, Pi creates a private GitHub gist through the GitHub CLI. The [`sessionShareDestination`](settings.md#sessions-and-context) setting can force either destination. Review the session first because it can contain prompts, tool output, file contents, and credentials exposed during the conversation.
|
|
83
83
|
|
|
84
84
|
## Adjust the terminal
|
|
85
85
|
|
package/docs/windows.md
CHANGED
|
@@ -19,8 +19,9 @@ For most native Windows users, installing [Git for Windows](https://git-scm.com/
|
|
|
19
19
|
Pi resolves Bash in this order:
|
|
20
20
|
|
|
21
21
|
1. `shellPath` from `~/.pi/agent/settings.json`
|
|
22
|
-
2. Git Bash
|
|
23
|
-
3.
|
|
22
|
+
2. Git Bash at `%ProgramFiles%\Git\bin\bash.exe`
|
|
23
|
+
3. Git Bash at `%ProgramFiles(x86)%\Git\bin\bash.exe`
|
|
24
|
+
4. `bash.exe` on `PATH`, including Cygwin, MSYS2, or legacy WSL Bash
|
|
24
25
|
|
|
25
26
|
Start Pi and enter this command to verify the shell:
|
|
26
27
|
|
|
@@ -34,6 +35,13 @@ If Pi cannot find Bash, it reports the locations it checked. Install Git for Win
|
|
|
34
35
|
|
|
35
36
|
The optional `powershell` tool runs commands through `pwsh.exe` when available, then falls back to Windows PowerShell. It starts PowerShell with `-NoProfile -NonInteractive -ExecutionPolicy Bypass`. Administrator-enforced execution policies can still take precedence.
|
|
36
37
|
|
|
38
|
+
PowerShell discovery checks these locations in order:
|
|
39
|
+
|
|
40
|
+
1. `pwsh.exe` on `PATH`
|
|
41
|
+
2. `%ProgramFiles%\PowerShell\7\pwsh.exe`
|
|
42
|
+
3. `powershell.exe` on `PATH`
|
|
43
|
+
4. `%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe`
|
|
44
|
+
|
|
37
45
|
To replace the model-facing `bash` tool with `powershell`, add this to `~/.pi/agent/settings.json`:
|
|
38
46
|
|
|
39
47
|
```json
|
|
@@ -48,6 +56,12 @@ Restart Pi, then ask it to run a harmless PowerShell command. The `!` and `!!` e
|
|
|
48
56
|
|
|
49
57
|
See [Settings](settings.md#tools) for other tool combinations.
|
|
50
58
|
|
|
59
|
+
## WSL
|
|
60
|
+
|
|
61
|
+
WSL path conversion on Windows and extra Git branch polling in WSL recognize `/mnt/<drive>`, not custom mount roots.
|
|
62
|
+
|
|
63
|
+
When using the legacy WSL `bash.exe` launcher from Windows, Pi sends commands over stdin to avoid command-line quoting problems.
|
|
64
|
+
|
|
51
65
|
## Use a custom Bash executable
|
|
52
66
|
|
|
53
67
|
Set `shellPath` when Bash is installed somewhere Pi does not discover automatically:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.4.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-gondolin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-gondolin",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.4.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@earendil-works/gondolin": "0.12.0"
|
|
12
12
|
}
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
createLsToolDefinition,
|
|
26
26
|
createReadToolDefinition,
|
|
27
27
|
createWriteToolDefinition,
|
|
28
|
+
formatReadLineRange,
|
|
28
29
|
} from "@earendil-works/pi-coding-agent";
|
|
29
30
|
import { Text } from "@earendil-works/pi-tui";
|
|
30
31
|
import { homedir } from "os";
|
|
@@ -65,11 +66,9 @@ export default function (pi: ExtensionAPI) {
|
|
|
65
66
|
const path = shortenPath(args.path || "");
|
|
66
67
|
let pathDisplay = path ? theme.fg("accent", path) : theme.fg("toolOutput", "...");
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
if (
|
|
70
|
-
|
|
71
|
-
const endLine = args.limit !== undefined ? startLine + args.limit - 1 : "";
|
|
72
|
-
pathDisplay += theme.fg("warning", `:${startLine}${endLine ? `-${endLine}` : ""}`);
|
|
69
|
+
const lineRange = formatReadLineRange(args.offset, args.limit);
|
|
70
|
+
if (lineRange) {
|
|
71
|
+
pathDisplay += theme.fg("warning", lineRange);
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
return new Text(`${theme.fg("toolTitle", theme.bold("read"))} ${pathDisplay}`, 0, 0);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.4.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
12
|
}
|
|
@@ -22,6 +22,7 @@ import { StringEnum } from "@earendil-works/pi-ai";
|
|
|
22
22
|
import {
|
|
23
23
|
CONFIG_DIR_NAME,
|
|
24
24
|
type ExtensionAPI,
|
|
25
|
+
formatReadLineRange,
|
|
25
26
|
getAgentDir,
|
|
26
27
|
getMarkdownTheme,
|
|
27
28
|
withFileMutationQueue,
|
|
@@ -87,13 +88,10 @@ function formatToolCall(
|
|
|
87
88
|
case "read": {
|
|
88
89
|
const rawPath = (args.file_path || args.path || "...") as string;
|
|
89
90
|
const filePath = shortenPath(rawPath);
|
|
90
|
-
const
|
|
91
|
-
const limit = args.limit as number | undefined;
|
|
91
|
+
const lineRange = formatReadLineRange(args.offset, args.limit);
|
|
92
92
|
let text = themeFg("accent", filePath);
|
|
93
|
-
if (
|
|
94
|
-
|
|
95
|
-
const endLine = limit !== undefined ? startLine + limit - 1 : "";
|
|
96
|
-
text += themeFg("warning", `:${startLine}${endLine ? `-${endLine}` : ""}`);
|
|
93
|
+
if (lineRange) {
|
|
94
|
+
text += themeFg("warning", lineRange);
|
|
97
95
|
}
|
|
98
96
|
return themeFg("muted", "read ") + text;
|
|
99
97
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.4.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-namespace-patch",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0-namespace.1",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management — maskshell fork build with the pi.namespace patch (earendil-works/pi#8834)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piConfig": {
|
|
@@ -37,14 +37,15 @@
|
|
|
37
37
|
"copy-binary-assets": "shx cp package.json dist/ && shx cp README.md dist/ && shx cp CHANGELOG.md dist/ && shx mkdir -p dist/theme && shx cp src/modes/interactive/theme/*.json dist/theme/ && shx mkdir -p dist/assets && shx cp src/modes/interactive/assets/*.png dist/assets/ && shx mkdir -p dist/export-html/vendor && shx cp src/core/export-html/template.html dist/export-html/ && shx cp src/core/export-html/vendor/*.js dist/export-html/vendor/ && shx cp -r docs dist/ && shx cp -r examples dist/ && shx cp ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/",
|
|
38
38
|
"test": "vitest --run",
|
|
39
39
|
"generate:schemas": "node --import ./src/experimental/source-resolver.ts scripts/generate-schemas.ts",
|
|
40
|
+
"generate:references": "node --import ./src/experimental/source-resolver.ts scripts/generate-references.ts",
|
|
40
41
|
"prepublishOnly": "npm run clean && npm run build"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"@earendil-works/pi-agent-core": "
|
|
44
|
-
"@earendil-works/pi-ai": "
|
|
45
|
-
"@earendil-works/pi-codemode": "
|
|
46
|
-
"@earendil-works/pi-mcp": "
|
|
47
|
-
"@earendil-works/pi-tui": "
|
|
44
|
+
"@earendil-works/pi-agent-core": "1.4.0+namespace.1",
|
|
45
|
+
"@earendil-works/pi-ai": "1.4.0+namespace.1",
|
|
46
|
+
"@earendil-works/pi-codemode": "1.4.0+namespace.1",
|
|
47
|
+
"@earendil-works/pi-mcp": "1.4.0+namespace.1",
|
|
48
|
+
"@earendil-works/pi-tui": "1.4.0+namespace.1",
|
|
48
49
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
49
50
|
"brace-expansion": "5.0.12",
|
|
50
51
|
"chalk": "6.0.0",
|
|
@@ -18,23 +18,28 @@
|
|
|
18
18
|
"properties": {
|
|
19
19
|
"name": {
|
|
20
20
|
"type": "string",
|
|
21
|
-
"minLength": 1
|
|
21
|
+
"minLength": 1,
|
|
22
|
+
"description": "Display name."
|
|
22
23
|
},
|
|
23
24
|
"baseUrl": {
|
|
24
25
|
"type": "string",
|
|
25
|
-
"minLength": 1
|
|
26
|
+
"minLength": 1,
|
|
27
|
+
"description": "API base URL. Also applies to the provider's built-in models."
|
|
26
28
|
},
|
|
27
29
|
"apiKey": {
|
|
28
30
|
"type": "string",
|
|
29
|
-
"minLength": 1
|
|
31
|
+
"minLength": 1,
|
|
32
|
+
"description": "Literal key, \"$NAME\" environment interpolation, or \"!command\" output."
|
|
30
33
|
},
|
|
31
34
|
"api": {
|
|
32
35
|
"type": "string",
|
|
33
|
-
"minLength": 1
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"description": "API for the provider's models, such as \"openai-completions\", \"openai-responses\", \"anthropic-messages\", or \"google-generative-ai\"."
|
|
34
38
|
},
|
|
35
39
|
"oauth": {
|
|
36
40
|
"type": "string",
|
|
37
|
-
"const": "radius"
|
|
41
|
+
"const": "radius",
|
|
42
|
+
"description": "OAuth login flow. Requires baseUrl."
|
|
38
43
|
},
|
|
39
44
|
"headers": {
|
|
40
45
|
"type": "object",
|
|
@@ -42,14 +47,17 @@
|
|
|
42
47
|
"^.*$": {
|
|
43
48
|
"type": "string"
|
|
44
49
|
}
|
|
45
|
-
}
|
|
50
|
+
},
|
|
51
|
+
"description": "Request headers. Values resolve like apiKey."
|
|
46
52
|
},
|
|
47
53
|
"compat": {
|
|
48
54
|
"$ref": "#/$defs/ProviderCompat",
|
|
49
55
|
"description": "Provider and model compatibility overrides."
|
|
50
56
|
},
|
|
51
57
|
"authHeader": {
|
|
52
|
-
"type": "boolean"
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"default": false,
|
|
60
|
+
"description": "Whether to send the resolved API key as Authorization: Bearer."
|
|
53
61
|
},
|
|
54
62
|
"models": {
|
|
55
63
|
"type": "array",
|
|
@@ -61,25 +69,32 @@
|
|
|
61
69
|
"properties": {
|
|
62
70
|
"id": {
|
|
63
71
|
"type": "string",
|
|
64
|
-
"minLength": 1
|
|
72
|
+
"minLength": 1,
|
|
73
|
+
"description": "Model ID sent to the API."
|
|
65
74
|
},
|
|
66
75
|
"name": {
|
|
67
76
|
"type": "string",
|
|
68
|
-
"minLength": 1
|
|
77
|
+
"minLength": 1,
|
|
78
|
+
"description": "Display name, also matched by --model patterns."
|
|
69
79
|
},
|
|
70
80
|
"api": {
|
|
71
81
|
"type": "string",
|
|
72
|
-
"minLength": 1
|
|
82
|
+
"minLength": 1,
|
|
83
|
+
"description": "Overrides the provider api."
|
|
73
84
|
},
|
|
74
85
|
"baseUrl": {
|
|
75
86
|
"type": "string",
|
|
76
|
-
"minLength": 1
|
|
87
|
+
"minLength": 1,
|
|
88
|
+
"description": "Overrides the provider baseUrl."
|
|
77
89
|
},
|
|
78
90
|
"reasoning": {
|
|
79
|
-
"type": "boolean"
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"default": false,
|
|
93
|
+
"description": "Whether the model supports thinking."
|
|
80
94
|
},
|
|
81
95
|
"thinkingLevelMap": {
|
|
82
|
-
"$ref": "#/$defs/ThinkingLevelMap"
|
|
96
|
+
"$ref": "#/$defs/ThinkingLevelMap",
|
|
97
|
+
"description": "Provider value sent for each thinking level. null marks a level unsupported. Levels the model does not map use the provider's default value through high; xhigh and max are unsupported."
|
|
83
98
|
},
|
|
84
99
|
"input": {
|
|
85
100
|
"type": "array",
|
|
@@ -88,7 +103,10 @@
|
|
|
88
103
|
"text",
|
|
89
104
|
"image"
|
|
90
105
|
]
|
|
91
|
-
}
|
|
106
|
+
},
|
|
107
|
+
"default": [
|
|
108
|
+
"text"
|
|
109
|
+
]
|
|
92
110
|
},
|
|
93
111
|
"inputLimits": {
|
|
94
112
|
"$ref": "#/$defs/ModelInputLimits"
|
|
@@ -98,21 +116,26 @@
|
|
|
98
116
|
},
|
|
99
117
|
"promptCache": {
|
|
100
118
|
"$ref": "#/$defs/ModelPromptCache",
|
|
101
|
-
"description": "Best-effort prompt cache lifetime in seconds for
|
|
119
|
+
"description": "Best-effort prompt cache lifetime in seconds for the short and long retention tiers. Pi warms only tiers with a known lifetime."
|
|
102
120
|
},
|
|
103
121
|
"contextWindow": {
|
|
104
122
|
"type": "number",
|
|
105
|
-
"exclusiveMinimum": 0
|
|
123
|
+
"exclusiveMinimum": 0,
|
|
124
|
+
"default": 128000,
|
|
125
|
+
"description": "Context window in tokens."
|
|
106
126
|
},
|
|
107
127
|
"maxTokens": {
|
|
108
128
|
"type": "number",
|
|
109
|
-
"exclusiveMinimum": 0
|
|
129
|
+
"exclusiveMinimum": 0,
|
|
130
|
+
"default": 16384,
|
|
131
|
+
"description": "Maximum output tokens."
|
|
110
132
|
},
|
|
111
133
|
"samplingParams": {
|
|
112
134
|
"type": "object",
|
|
113
135
|
"patternProperties": {
|
|
114
136
|
"^.*$": {}
|
|
115
|
-
}
|
|
137
|
+
},
|
|
138
|
+
"description": "Fields merged into every request body. Applies only to OpenAI-compatible APIs."
|
|
116
139
|
},
|
|
117
140
|
"samplingParamsByThinkingLevel": {
|
|
118
141
|
"type": "object",
|
|
@@ -159,7 +182,8 @@
|
|
|
159
182
|
"^.*$": {}
|
|
160
183
|
}
|
|
161
184
|
}
|
|
162
|
-
}
|
|
185
|
+
},
|
|
186
|
+
"description": "samplingParams per thinking level, merged over samplingParams."
|
|
163
187
|
},
|
|
164
188
|
"headers": {
|
|
165
189
|
"type": "object",
|
|
@@ -167,7 +191,8 @@
|
|
|
167
191
|
"^.*$": {
|
|
168
192
|
"type": "string"
|
|
169
193
|
}
|
|
170
|
-
}
|
|
194
|
+
},
|
|
195
|
+
"description": "Request headers. Values resolve like apiKey."
|
|
171
196
|
},
|
|
172
197
|
"compat": {
|
|
173
198
|
"$ref": "#/$defs/ProviderCompat",
|
|
@@ -184,13 +209,16 @@
|
|
|
184
209
|
"properties": {
|
|
185
210
|
"name": {
|
|
186
211
|
"type": "string",
|
|
187
|
-
"minLength": 1
|
|
212
|
+
"minLength": 1,
|
|
213
|
+
"description": "Display name, also matched by --model patterns."
|
|
188
214
|
},
|
|
189
215
|
"reasoning": {
|
|
190
|
-
"type": "boolean"
|
|
216
|
+
"type": "boolean",
|
|
217
|
+
"description": "Whether the model supports thinking."
|
|
191
218
|
},
|
|
192
219
|
"thinkingLevelMap": {
|
|
193
|
-
"$ref": "#/$defs/ThinkingLevelMap"
|
|
220
|
+
"$ref": "#/$defs/ThinkingLevelMap",
|
|
221
|
+
"description": "Provider value sent for each thinking level. null marks a level unsupported. Levels the model does not map use the provider's default value through high; xhigh and max are unsupported."
|
|
194
222
|
},
|
|
195
223
|
"input": {
|
|
196
224
|
"type": "array",
|
|
@@ -263,21 +291,24 @@
|
|
|
263
291
|
},
|
|
264
292
|
"promptCache": {
|
|
265
293
|
"$ref": "#/$defs/ModelPromptCache",
|
|
266
|
-
"description": "Best-effort prompt cache lifetime in seconds for
|
|
294
|
+
"description": "Best-effort prompt cache lifetime in seconds for the short and long retention tiers. Pi warms only tiers with a known lifetime."
|
|
267
295
|
},
|
|
268
296
|
"contextWindow": {
|
|
269
297
|
"type": "number",
|
|
270
|
-
"exclusiveMinimum": 0
|
|
298
|
+
"exclusiveMinimum": 0,
|
|
299
|
+
"description": "Context window in tokens."
|
|
271
300
|
},
|
|
272
301
|
"maxTokens": {
|
|
273
302
|
"type": "number",
|
|
274
|
-
"exclusiveMinimum": 0
|
|
303
|
+
"exclusiveMinimum": 0,
|
|
304
|
+
"description": "Maximum output tokens."
|
|
275
305
|
},
|
|
276
306
|
"samplingParams": {
|
|
277
307
|
"type": "object",
|
|
278
308
|
"patternProperties": {
|
|
279
309
|
"^.*$": {}
|
|
280
|
-
}
|
|
310
|
+
},
|
|
311
|
+
"description": "Fields merged into every request body. Applies only to OpenAI-compatible APIs."
|
|
281
312
|
},
|
|
282
313
|
"samplingParamsByThinkingLevel": {
|
|
283
314
|
"type": "object",
|
|
@@ -324,7 +355,8 @@
|
|
|
324
355
|
"^.*$": {}
|
|
325
356
|
}
|
|
326
357
|
}
|
|
327
|
-
}
|
|
358
|
+
},
|
|
359
|
+
"description": "samplingParams per thinking level, merged over samplingParams."
|
|
328
360
|
},
|
|
329
361
|
"headers": {
|
|
330
362
|
"type": "object",
|
|
@@ -332,7 +364,8 @@
|
|
|
332
364
|
"^.*$": {
|
|
333
365
|
"type": "string"
|
|
334
366
|
}
|
|
335
|
-
}
|
|
367
|
+
},
|
|
368
|
+
"description": "Request headers. Values resolve like apiKey."
|
|
336
369
|
},
|
|
337
370
|
"compat": {
|
|
338
371
|
"$ref": "#/$defs/ProviderCompat",
|
|
@@ -1003,6 +1036,11 @@
|
|
|
1003
1036
|
"description": "Whether the model accepts prompt_cache_options. Older OpenAI models reject the parameter.",
|
|
1004
1037
|
"default": false
|
|
1005
1038
|
},
|
|
1039
|
+
"supportsMidConvoEffort": {
|
|
1040
|
+
"type": "boolean",
|
|
1041
|
+
"description": "Whether thinking level changes are sent inside the conversation instead of changing the request's effort, so a change keeps the prompt cache. Used by the anthropic-messages and openai-responses APIs.",
|
|
1042
|
+
"default": false
|
|
1043
|
+
},
|
|
1006
1044
|
"supportsMaxOutputTokens": {
|
|
1007
1045
|
"type": "boolean",
|
|
1008
1046
|
"description": "Whether the provider accepts max_output_tokens. Some Codex-protocol gateways reject it.",
|
|
@@ -1038,11 +1076,6 @@
|
|
|
1038
1076
|
"description": "Whether the provider supports Anthropic strict tool schemas. Generated Anthropic models enable it explicitly.",
|
|
1039
1077
|
"default": false
|
|
1040
1078
|
},
|
|
1041
|
-
"supportsMidConvoEffort": {
|
|
1042
|
-
"type": "boolean",
|
|
1043
|
-
"description": "Whether the exact model transport supports effort-only system messages and thinking binding controls.",
|
|
1044
|
-
"default": false
|
|
1045
|
-
},
|
|
1046
1079
|
"supportsMidConvoToolChanges": {
|
|
1047
1080
|
"type": "boolean",
|
|
1048
1081
|
"description": "Whether the exact model accepts mid-conversation tool_addition and tool_removal blocks. Requires supportsMidConvoSystemMessages.",
|
|
@@ -1074,6 +1107,27 @@
|
|
|
1074
1107
|
},
|
|
1075
1108
|
"maxItems": 3,
|
|
1076
1109
|
"description": "Models Anthropic accepts for server-side refusal fallback, with local pricing metadata for returned fallback responses. When absent or empty, callers must omit fallbacks; Anthropic rejects the field for models with no permitted fallback targets."
|
|
1110
|
+
},
|
|
1111
|
+
"imageInput": {
|
|
1112
|
+
"anyOf": [
|
|
1113
|
+
{
|
|
1114
|
+
"type": "string",
|
|
1115
|
+
"const": "assets"
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
"type": "string",
|
|
1119
|
+
"const": "images"
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
"type": "string",
|
|
1123
|
+
"const": "state-image-urls"
|
|
1124
|
+
}
|
|
1125
|
+
],
|
|
1126
|
+
"description": "How the service takes classifier images. \"assets\" sends TypeSafe's assets map (PNG and JPEG) and references the images from the state, as TypeSafe and Jev on Workers AI expect. \"images\" sends Clef's images list of data URLs (PNG, JPEG, and WebP, at most four), as Clef on Workers AI expects. \"state-image-urls\" places image_url parts before the state, as OpenRouter expects; OpenRouter drops assets without an error. Auto-detected from the provider, baseUrl, and model ID. Classifier models read it from the provider-level compat; models and modelOverrides entries apply to chat models only."
|
|
1127
|
+
},
|
|
1128
|
+
"sendImageOptInHeader": {
|
|
1129
|
+
"type": "boolean",
|
|
1130
|
+
"description": "Whether requests with images send the TypeSafe-Danger-Zone-Images: true header, which TypeSafe's own API requires for its experimental image input. Defaults to true for the typesafe-system-one API unless the model is detected as OpenRouter."
|
|
1077
1131
|
}
|
|
1078
1132
|
},
|
|
1079
1133
|
"additionalProperties": true
|
|
@@ -50,6 +50,24 @@
|
|
|
50
50
|
],
|
|
51
51
|
"default": "auto"
|
|
52
52
|
},
|
|
53
|
+
"sessionShareDestination": {
|
|
54
|
+
"anyOf": [
|
|
55
|
+
{
|
|
56
|
+
"type": "string",
|
|
57
|
+
"const": "auto"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "string",
|
|
61
|
+
"const": "gist"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"type": "string",
|
|
65
|
+
"const": "radius"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"description": "Destination used by /share. \"auto\" uses Radius when authenticated and otherwise creates a GitHub gist.",
|
|
69
|
+
"default": "auto"
|
|
70
|
+
},
|
|
53
71
|
"steeringMode": {
|
|
54
72
|
"anyOf": [
|
|
55
73
|
{
|