@astralyn/pi 1.0.0 → 1.0.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 +19 -0
- package/dist/bundle/chunks/{anthropic-messages-CG2BSDQS.js → anthropic-messages-YET4T7BO.js} +3 -3
- package/dist/bundle/chunks/azure-openai-responses-SBLL5YN3.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +2 -2
- package/dist/bundle/chunks/{chunk-SGLYRVQL.js → chunk-4TT2QGFL.js} +1 -1
- package/dist/bundle/chunks/{chunk-HESRDUKO.js → chunk-H2N2THAO.js} +72 -52
- package/dist/bundle/chunks/{chunk-PFZKRUMO.js → chunk-IZ3S3GDX.js} +1 -1
- package/dist/bundle/chunks/{chunk-6UFFVA7M.js → chunk-NY3CWK44.js} +1 -1
- package/dist/bundle/chunks/chunk-SVJ7OGEB.js +2 -0
- package/dist/bundle/chunks/chunk-XDYM2567.js +20 -0
- package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-YB7XPPP4.js → cloudflare-workers-ai-system-one-QI46LUZ6.js} +1 -1
- package/dist/bundle/chunks/codemode-worker.js +24 -3
- package/dist/bundle/chunks/{google-generative-ai-V5ZM5MCL.js → google-generative-ai-YTZCSHQN.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-22THOFP5.js → google-vertex-OTFZJJXQ.js} +1 -1
- package/dist/bundle/chunks/{mistral-conversations-WHSCJJWP.js → mistral-conversations-ELH4V4TY.js} +1 -1
- package/dist/bundle/chunks/node-USQQ7C6M.js +16 -0
- package/dist/bundle/chunks/openai-chatgpt.js +1 -1
- package/dist/bundle/chunks/{openai-codex-responses-N7GDPBPP.js → openai-codex-responses-OLVTU4UA.js} +1 -1
- package/dist/bundle/chunks/openai-completions-53M2KJ67.js +7 -0
- package/dist/bundle/chunks/openai-responses-4ABDEL4Z.js +3 -0
- package/dist/bundle/chunks/{virtual-modules-4RQ2L6W4.js → virtual-modules-YFKU7JZF.js} +1 -1
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +4 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +3 -0
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +1 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/export-html/tool-renderer.d.ts +3 -3
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +5 -0
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +3 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +6 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +9 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +6 -0
- package/dist/core/mcp-servers.d.ts.map +1 -1
- package/dist/core/mcp-servers.js +11 -0
- package/dist/core/mcp-servers.js.map +1 -1
- package/dist/core/model-config.d.ts +36 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +14 -2
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-resolver.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 +13 -0
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/tools/renderers/index.d.ts +2 -2
- package/dist/core/tools/renderers/index.d.ts.map +1 -1
- package/dist/core/tools/renderers/index.js.map +1 -1
- package/dist/extensions/mcp/cli.d.ts.map +1 -1
- package/dist/extensions/mcp/cli.js +3 -0
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/config.d.ts +15 -3
- package/dist/extensions/mcp/config.d.ts.map +1 -1
- package/dist/extensions/mcp/config.js +46 -10
- package/dist/extensions/mcp/config.js.map +1 -1
- package/dist/extensions/mcp/index.d.ts +4 -1
- package/dist/extensions/mcp/index.d.ts.map +1 -1
- package/dist/extensions/mcp/index.js +80 -45
- package/dist/extensions/mcp/index.js.map +1 -1
- package/dist/extensions/mcp/oauth.d.ts +4 -1
- package/dist/extensions/mcp/oauth.d.ts.map +1 -1
- package/dist/extensions/mcp/oauth.js +54 -10
- package/dist/extensions/mcp/oauth.js.map +1 -1
- package/dist/extensions/mcp/runtime.d.ts.map +1 -1
- package/dist/extensions/mcp/runtime.js +1 -0
- package/dist/extensions/mcp/runtime.js.map +1 -1
- package/dist/extensions/mcp/tools.d.ts +3 -1
- package/dist/extensions/mcp/tools.d.ts.map +1 -1
- package/dist/extensions/mcp/tools.js +19 -13
- package/dist/extensions/mcp/tools.js.map +1 -1
- package/dist/extensions/mcp/ui.d.ts.map +1 -1
- package/dist/extensions/mcp/ui.js +8 -4
- package/dist/extensions/mcp/ui.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/armin.d.ts +3 -0
- package/dist/modes/interactive/components/armin.d.ts.map +1 -1
- package/dist/modes/interactive/components/armin.js +7 -5
- package/dist/modes/interactive/components/armin.js.map +1 -1
- package/dist/modes/interactive/components/auth-url.d.ts +14 -0
- package/dist/modes/interactive/components/auth-url.d.ts.map +1 -0
- package/dist/modes/interactive/components/auth-url.js +34 -0
- package/dist/modes/interactive/components/auth-url.js.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.d.ts +104 -0
- package/dist/modes/interactive/components/easter-egg-3d.d.ts.map +1 -0
- package/dist/modes/interactive/components/{pi-logo-animation.js → easter-egg-3d.js} +121 -74
- package/dist/modes/interactive/components/easter-egg-3d.js.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.d.ts +6 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.d.ts.map +1 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.js +24 -0
- package/dist/modes/interactive/components/easter-egg-3d.lazy.js.map +1 -0
- package/dist/modes/interactive/components/index.d.ts +0 -1
- package/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/dist/modes/interactive/components/index.js +0 -1
- package/dist/modes/interactive/components/index.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +2 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +9 -5
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +15 -17
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/tool-view/tool-execution.d.ts +4 -19
- package/dist/modes/interactive/tool-view/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/tool-view/tool-execution.js +23 -67
- package/dist/modes/interactive/tool-view/tool-execution.js.map +1 -1
- package/dist/utils/image-convert.d.ts +12 -0
- package/dist/utils/image-convert.d.ts.map +1 -1
- package/dist/utils/image-convert.js +45 -6
- package/dist/utils/image-convert.js.map +1 -1
- package/docs/codemode.md +1 -1
- package/docs/extensions.md +4 -0
- package/docs/keybindings.md +1 -1
- package/docs/mcp.md +23 -1
- package/docs/models.md +30 -3
- 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/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +58 -58
- package/package.json +11 -11
- package/dist/bundle/chunks/azure-openai-responses-PBA4QKCM.js +0 -2
- package/dist/bundle/chunks/chunk-PJVFYVHE.js +0 -42
- package/dist/bundle/chunks/chunk-Z2RKSI3O.js +0 -2
- package/dist/bundle/chunks/node-CXWYTK2I.js +0 -16
- package/dist/bundle/chunks/openai-completions-RGGQK5UW.js +0 -7
- package/dist/bundle/chunks/openai-responses-3ZLD5JYI.js +0 -3
- package/dist/modes/interactive/components/daxnuts.d.ts +0 -23
- package/dist/modes/interactive/components/daxnuts.d.ts.map +0 -1
- package/dist/modes/interactive/components/daxnuts.js +0 -138
- package/dist/modes/interactive/components/daxnuts.js.map +0 -1
- package/dist/modes/interactive/components/pi-logo-animation.d.ts +0 -68
- package/dist/modes/interactive/components/pi-logo-animation.d.ts.map +0 -1
- package/dist/modes/interactive/components/pi-logo-animation.js.map +0 -1
- package/dist/modes/interactive/components/pi-logo-animation.lazy.d.ts +0 -7
- package/dist/modes/interactive/components/pi-logo-animation.lazy.d.ts.map +0 -1
- package/dist/modes/interactive/components/pi-logo-animation.lazy.js +0 -12
- package/dist/modes/interactive/components/pi-logo-animation.lazy.js.map +0 -1
|
@@ -40,6 +40,7 @@ import { getChangelogPath, getNewEntries, normalizeChangelogLinks, parseChangelo
|
|
|
40
40
|
import { copyToClipboard, readClipboardFilePaths, readClipboardText } from "../../utils/clipboard.js";
|
|
41
41
|
import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
|
|
42
42
|
import { parseGitUrl } from "../../utils/git.js";
|
|
43
|
+
import { ensurePngTranscoder } from "../../utils/image-convert.js";
|
|
43
44
|
import { getCwdRelativePath } from "../../utils/paths.js";
|
|
44
45
|
import { getPiUserAgent } from "../../utils/pi-user-agent.js";
|
|
45
46
|
import { killTrackedDetachedChildren } from "../../utils/shell.js";
|
|
@@ -56,9 +57,9 @@ import { CompactionSummaryMessageComponent } from "./components/compaction-summa
|
|
|
56
57
|
import { CustomEditor } from "./components/custom-editor.js";
|
|
57
58
|
import { CustomEntryComponent } from "./components/custom-entry.js";
|
|
58
59
|
import { CustomMessageComponent } from "./components/custom-message.js";
|
|
59
|
-
import { DaxnutsComponent } from "./components/daxnuts.js";
|
|
60
60
|
import { DynamicBorder } from "./components/dynamic-border.js";
|
|
61
61
|
import { EarendilAnnouncementComponent } from "./components/earendil-announcement.js";
|
|
62
|
+
import { playArmin3d, playPiLogo3d } from "./components/easter-egg-3d.lazy.js";
|
|
62
63
|
import { ExtensionEditorComponent } from "./components/extension-editor.js";
|
|
63
64
|
import { ExtensionInputComponent } from "./components/extension-input.js";
|
|
64
65
|
import { ExtensionSelectorComponent } from "./components/extension-selector.js";
|
|
@@ -69,7 +70,6 @@ import { createMermaidMarkdownTransformer } from "./components/mermaid.js";
|
|
|
69
70
|
import { ModelSelectorComponent } from "./components/model-selector.js";
|
|
70
71
|
import { formatAuthSelectorProviderStatus, formatAuthSelectorProviderType, OAuthSelectorComponent, } from "./components/oauth-selector.js";
|
|
71
72
|
import { piLogoLines, piWordmark, supportsPiLogo } from "./components/pi-logo.js";
|
|
72
|
-
import { playPiLogoAnimation } from "./components/pi-logo-animation.lazy.js";
|
|
73
73
|
import { createLoginMenuSelector } from "./components/radius-login-selector.js";
|
|
74
74
|
import { ScopedModelsSelectorComponent } from "./components/scoped-models-selector.js";
|
|
75
75
|
import { SessionSelectorComponent } from "./components/session-selector.js";
|
|
@@ -681,6 +681,7 @@ export class InteractiveMode {
|
|
|
681
681
|
// Start the UI before initializing extensions so session_start handlers can use interactive dialogs
|
|
682
682
|
this.ui.start();
|
|
683
683
|
this.isInitialized = true;
|
|
684
|
+
this.ensurePngTranscoder();
|
|
684
685
|
this.themeController.applyFromSettings();
|
|
685
686
|
// The header and startup notices bake theme colors into their text, so build them once the terminal
|
|
686
687
|
// reported its colors. This ends at the terminal's DA1 reply, or after 100 ms if it answers nothing.
|
|
@@ -732,7 +733,7 @@ export class InteractiveMode {
|
|
|
732
733
|
const onboarding = () => theme.fg("dim", `Pi can explain its own features and look up its docs. Ask it how to use or extend Pi.`);
|
|
733
734
|
const header = new BuiltInHeader(() => `${withLogo(compactInstructions())}\n${compactOnboarding()}\n\n${onboarding()}`, () => `${withLogo(expandedInstructions())}\n\n${onboarding()}`, this.getStartupExpansionState(), 1, 0);
|
|
734
735
|
if (showLogo)
|
|
735
|
-
header.onLogoClick = (column, row) =>
|
|
736
|
+
header.onLogoClick = (column, row) => playPiLogo3d(this.renderer, column, row);
|
|
736
737
|
this.builtInHeader = header;
|
|
737
738
|
// Setup UI layout
|
|
738
739
|
this.headerContainer.addChild(new Spacer(1));
|
|
@@ -1528,8 +1529,16 @@ export class InteractiveMode {
|
|
|
1528
1529
|
applyFullscreenScrollbarSetting() {
|
|
1529
1530
|
this.transcriptScrollView?.setScrollbar(this.settingsManager.getFullscreenScrollbar());
|
|
1530
1531
|
}
|
|
1532
|
+
/** Lets extension images use the PNG transcoder; tool results register it themselves. */
|
|
1533
|
+
ensurePngTranscoder() {
|
|
1534
|
+
ensurePngTranscoder(() => {
|
|
1535
|
+
this.ui.invalidate();
|
|
1536
|
+
this.ui.requestRender();
|
|
1537
|
+
});
|
|
1538
|
+
}
|
|
1531
1539
|
applyRuntimeSettings() {
|
|
1532
1540
|
setCapabilityOverrides(this.settingsManager.getTerminalCapabilityOverrides());
|
|
1541
|
+
this.ensurePngTranscoder();
|
|
1533
1542
|
configureHttpDispatcher(this.settingsManager.getHttpIdleTimeoutMs());
|
|
1534
1543
|
this.applyFullscreenScrollbarSetting();
|
|
1535
1544
|
if (this.renderer instanceof TuiAltScreen) {
|
|
@@ -1649,7 +1658,7 @@ export class InteractiveMode {
|
|
|
1649
1658
|
* whatever this returns, so they never reach into the tool registry themselves.
|
|
1650
1659
|
*/
|
|
1651
1660
|
getRegisteredToolDefinition(toolName) {
|
|
1652
|
-
return withBuiltInRenderers(toolName, this.session.getToolDefinition(toolName));
|
|
1661
|
+
return this.session.extensionRunner.resolveToolRenderers(toolName, () => withBuiltInRenderers(toolName, this.session.getToolDefinition(toolName)));
|
|
1653
1662
|
}
|
|
1654
1663
|
getMarkdownTransformers() {
|
|
1655
1664
|
return [this.mermaidMarkdownTransformer, ...this.session.extensionRunner.getMarkdownTransformers()];
|
|
@@ -4232,7 +4241,6 @@ export class InteractiveMode {
|
|
|
4232
4241
|
this.updateEditorBorderColor();
|
|
4233
4242
|
this.showStatus(`Model: ${model.id}`);
|
|
4234
4243
|
void this.maybeWarnAboutAnthropicSubscriptionAuth(model);
|
|
4235
|
-
this.checkDaxnutsEasterEgg(model);
|
|
4236
4244
|
}
|
|
4237
4245
|
catch (error) {
|
|
4238
4246
|
this.showError(error instanceof Error ? error.message : String(error));
|
|
@@ -4365,7 +4373,6 @@ export class InteractiveMode {
|
|
|
4365
4373
|
done();
|
|
4366
4374
|
this.showStatus(persist ? `Default model: ${model.provider}/${model.id}` : `Model: ${model.id}`);
|
|
4367
4375
|
void this.maybeWarnAboutAnthropicSubscriptionAuth(model);
|
|
4368
|
-
this.checkDaxnutsEasterEgg(model);
|
|
4369
4376
|
}
|
|
4370
4377
|
catch (error) {
|
|
4371
4378
|
done();
|
|
@@ -5021,7 +5028,6 @@ export class InteractiveMode {
|
|
|
5021
5028
|
if (selectedModel) {
|
|
5022
5029
|
this.showStatus(`${actionLabel}. Selected ${selectedModel.id}. Credentials saved to ${getAuthPath()}`);
|
|
5023
5030
|
void this.maybeWarnAboutAnthropicSubscriptionAuth(selectedModel);
|
|
5024
|
-
this.checkDaxnutsEasterEgg(selectedModel);
|
|
5025
5031
|
}
|
|
5026
5032
|
else {
|
|
5027
5033
|
this.showStatus(`${actionLabel}. Credentials saved to ${getAuthPath()}`);
|
|
@@ -5770,6 +5776,8 @@ export class InteractiveMode {
|
|
|
5770
5776
|
this.ui.requestRender();
|
|
5771
5777
|
}
|
|
5772
5778
|
handleArminSaysHi() {
|
|
5779
|
+
if (playArmin3d(this.renderer))
|
|
5780
|
+
return;
|
|
5773
5781
|
this.chatContainer.addChild(new Spacer(1));
|
|
5774
5782
|
this.chatContainer.addChild(new ArminComponent(this.ui));
|
|
5775
5783
|
this.ui.requestRender();
|
|
@@ -5779,16 +5787,6 @@ export class InteractiveMode {
|
|
|
5779
5787
|
this.chatContainer.addChild(new EarendilAnnouncementComponent());
|
|
5780
5788
|
this.ui.requestRender();
|
|
5781
5789
|
}
|
|
5782
|
-
handleDaxnuts() {
|
|
5783
|
-
this.chatContainer.addChild(new Spacer(1));
|
|
5784
|
-
this.chatContainer.addChild(new DaxnutsComponent(this.ui));
|
|
5785
|
-
this.ui.requestRender();
|
|
5786
|
-
}
|
|
5787
|
-
checkDaxnutsEasterEgg(model) {
|
|
5788
|
-
if (model.provider === "opencode" && model.id.toLowerCase().includes("kimi-k2.5")) {
|
|
5789
|
-
this.handleDaxnuts();
|
|
5790
|
-
}
|
|
5791
|
-
}
|
|
5792
5790
|
async handleBashCommand(command, excludeFromContext = false) {
|
|
5793
5791
|
const extensionRunner = this.session.extensionRunner;
|
|
5794
5792
|
// Emit user_bash event to let extensions intercept
|