@wahack/pi-coding-agent 15.11.4 → 15.11.6
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/package.json +27 -5
- package/src/autoresearch/dashboard.ts +1 -1
- package/src/autoresearch/index.ts +1 -1
- package/src/autoresearch/tools/init-experiment.ts +1 -1
- package/src/autoresearch/tools/log-experiment.ts +1 -1
- package/src/autoresearch/tools/run-experiment.ts +1 -1
- package/src/autoresearch/tools/update-notes.ts +1 -1
- package/src/cli/claude-trace-cli.ts +1 -1
- package/src/cli/dry-balance-cli.ts +1 -1
- package/src/cli/gallery-cli.ts +1 -1
- package/src/cli/gallery-fixtures/shell.ts +1 -1
- package/src/cli/grep-cli.ts +1 -1
- package/src/cli/list-models.ts +1 -1
- package/src/cli/session-picker.ts +1 -1
- package/src/cli/shell-cli.ts +1 -1
- package/src/cli/update-cli.ts +1 -1
- package/src/commands/grep.ts +1 -1
- package/src/commit/agentic/agent.ts +1 -1
- package/src/config/keybindings.ts +2 -2
- package/src/config/model-resolver.ts +1 -1
- package/src/config/resolve-config-value.ts +1 -1
- package/src/debug/index.ts +2 -2
- package/src/debug/log-viewer.ts +1 -1
- package/src/debug/protocol-probe.ts +1 -1
- package/src/debug/raw-sse.ts +1 -1
- package/src/debug/report-bundle.ts +1 -1
- package/src/debug/terminal-info.ts +1 -1
- package/src/discovery/helpers.ts +1 -1
- package/src/edit/hashline/block-resolver.ts +1 -1
- package/src/edit/normalize.ts +1 -1
- package/src/edit/renderer.ts +2 -2
- package/src/exec/bash-executor.ts +1 -1
- package/src/export/ttsr.ts +1 -1
- package/src/extensibility/custom-tools/types.ts +1 -1
- package/src/extensibility/extensions/loader.ts +1 -1
- package/src/extensibility/extensions/runner.ts +1 -1
- package/src/extensibility/extensions/types.ts +1 -1
- package/src/extensibility/hooks/types.ts +1 -1
- package/src/extensibility/slash-commands.ts +1 -1
- package/src/goals/tools/goal-tool.ts +2 -2
- package/src/index.ts +1 -1
- package/src/lite.ts +10 -0
- package/src/lsp/render.ts +2 -2
- package/src/mcp/render.ts +2 -2
- package/src/modes/components/agent-dashboard.ts +1 -1
- package/src/modes/components/agent-hub.ts +1 -1
- package/src/modes/components/assistant-message.ts +1 -1
- package/src/modes/components/bash-execution.ts +1 -1
- package/src/modes/components/bordered-loader.ts +1 -1
- package/src/modes/components/branch-summary-message.ts +1 -1
- package/src/modes/components/btw-panel.ts +1 -1
- package/src/modes/components/chat-block.ts +1 -1
- package/src/modes/components/compaction-summary-message.ts +1 -1
- package/src/modes/components/copy-selector.ts +1 -1
- package/src/modes/components/countdown-timer.ts +1 -1
- package/src/modes/components/custom-editor.ts +1 -1
- package/src/modes/components/custom-message.ts +2 -2
- package/src/modes/components/dynamic-border.ts +1 -1
- package/src/modes/components/error-banner.ts +1 -1
- package/src/modes/components/eval-execution.ts +1 -1
- package/src/modes/components/execution-shared.ts +1 -1
- package/src/modes/components/extensions/extension-dashboard.ts +1 -1
- package/src/modes/components/extensions/extension-list.ts +1 -1
- package/src/modes/components/extensions/inspector-panel.ts +1 -1
- package/src/modes/components/extensions/state-manager.ts +1 -1
- package/src/modes/components/footer.ts +1 -1
- package/src/modes/components/history-search.ts +1 -1
- package/src/modes/components/hook-editor.ts +1 -1
- package/src/modes/components/hook-input.ts +1 -1
- package/src/modes/components/hook-message.ts +2 -2
- package/src/modes/components/hook-selector.ts +1 -1
- package/src/modes/components/keybinding-hints.ts +1 -1
- package/src/modes/components/late-diagnostics-message.ts +1 -1
- package/src/modes/components/login-dialog.ts +1 -1
- package/src/modes/components/mcp-add-wizard.ts +1 -1
- package/src/modes/components/message-frame.ts +2 -2
- package/src/modes/components/model-selector.ts +1 -1
- package/src/modes/components/oauth-selector.ts +1 -1
- package/src/modes/components/omfg-panel.ts +1 -1
- package/src/modes/components/overlay-box.ts +1 -1
- package/src/modes/components/plan-review-overlay.ts +1 -1
- package/src/modes/components/plugin-selector.ts +1 -1
- package/src/modes/components/plugin-settings.ts +1 -1
- package/src/modes/components/queue-mode-selector.ts +1 -1
- package/src/modes/components/read-tool-group.ts +2 -2
- package/src/modes/components/session-selector.ts +1 -1
- package/src/modes/components/settings-defs.ts +1 -1
- package/src/modes/components/settings-selector.ts +1 -1
- package/src/modes/components/show-images-selector.ts +1 -1
- package/src/modes/components/skill-message.ts +2 -2
- package/src/modes/components/status-line/component.ts +1 -1
- package/src/modes/components/status-line/segments.ts +1 -1
- package/src/modes/components/theme-selector.ts +1 -1
- package/src/modes/components/thinking-selector.ts +1 -1
- package/src/modes/components/tiny-title-download-progress.ts +1 -1
- package/src/modes/components/todo-reminder.ts +1 -1
- package/src/modes/components/tool-execution.ts +1 -1
- package/src/modes/components/transcript-container.ts +1 -1
- package/src/modes/components/tree-selector.ts +1 -1
- package/src/modes/components/ttsr-notification.ts +1 -1
- package/src/modes/components/user-message-selector.ts +1 -1
- package/src/modes/components/user-message.ts +1 -1
- package/src/modes/components/visual-truncate.ts +1 -1
- package/src/modes/components/welcome.ts +1 -1
- package/src/modes/controllers/command-controller-shared.ts +1 -1
- package/src/modes/controllers/command-controller.ts +1 -1
- package/src/modes/controllers/event-controller.ts +1 -1
- package/src/modes/controllers/extension-ui-controller.ts +2 -2
- package/src/modes/controllers/input-controller.ts +1 -1
- package/src/modes/controllers/mcp-command-controller.ts +1 -1
- package/src/modes/controllers/selector-controller.ts +2 -2
- package/src/modes/controllers/streaming-reveal.ts +1 -1
- package/src/modes/emoji-autocomplete.ts +1 -1
- package/src/modes/index.ts +1 -1
- package/src/modes/interactive-mode.ts +2 -2
- package/src/modes/internal-url-autocomplete.ts +1 -1
- package/src/modes/prompt-action-autocomplete.ts +1 -1
- package/src/modes/setup-wizard/scenes/glyph.ts +1 -1
- package/src/modes/setup-wizard/scenes/outro.ts +1 -1
- package/src/modes/setup-wizard/scenes/providers.ts +1 -1
- package/src/modes/setup-wizard/scenes/sign-in.ts +1 -1
- package/src/modes/setup-wizard/scenes/splash.ts +1 -1
- package/src/modes/setup-wizard/scenes/theme.ts +1 -1
- package/src/modes/setup-wizard/scenes/types.ts +1 -1
- package/src/modes/setup-wizard/scenes/web-search.ts +1 -1
- package/src/modes/setup-wizard/wizard-overlay.ts +1 -1
- package/src/modes/shared.ts +1 -1
- package/src/modes/theme/theme.ts +3 -3
- package/src/modes/types.ts +1 -1
- package/src/modes/utils/context-usage.ts +1 -1
- package/src/modes/utils/keybinding-matchers.ts +1 -1
- package/src/modes/utils/ui-helpers.ts +1 -1
- package/src/sdk.ts +1 -1
- package/src/session/agent-session.ts +1 -1
- package/src/session/session-manager.ts +1 -1
- package/src/task/render.ts +2 -2
- package/src/task/subprocess-tool-registry.ts +1 -1
- package/src/task/worktree.ts +1 -1
- package/src/tools/ask.ts +1 -1
- package/src/tools/ast-edit.ts +3 -3
- package/src/tools/ast-grep.ts +3 -3
- package/src/tools/bash-command-fixup.ts +1 -1
- package/src/tools/bash-interactive.ts +2 -2
- package/src/tools/bash.ts +2 -2
- package/src/tools/browser/attach.ts +1 -1
- package/src/tools/browser/render.ts +2 -2
- package/src/tools/debug.ts +1 -1
- package/src/tools/eval-render.ts +2 -2
- package/src/tools/fetch.ts +2 -2
- package/src/tools/find.ts +3 -3
- package/src/tools/fs-cache-invalidation.ts +1 -1
- package/src/tools/gh-renderer.ts +1 -1
- package/src/tools/inspect-image-renderer.ts +2 -2
- package/src/tools/irc.ts +1 -1
- package/src/tools/job.ts +2 -2
- package/src/tools/memory-render.ts +2 -2
- package/src/tools/read.ts +3 -3
- package/src/tools/render-utils.ts +5 -5
- package/src/tools/renderers.ts +1 -1
- package/src/tools/resolve.ts +2 -2
- package/src/tools/review.ts +2 -2
- package/src/tools/search-tool-bm25.ts +2 -2
- package/src/tools/search.ts +3 -3
- package/src/tools/ssh.ts +1 -1
- package/src/tools/todo.ts +2 -2
- package/src/tools/write.ts +1 -1
- package/src/tui/code-cell.ts +1 -1
- package/src/tui/hyperlink.ts +1 -1
- package/src/tui/output-block.ts +2 -2
- package/src/tui/tree-list.ts +1 -1
- package/src/tui/utils.ts +2 -2
- package/src/utils/block-context.ts +1 -1
- package/src/utils/clipboard.ts +2 -2
- package/src/web/search/render.ts +2 -2
- package/src/workspace-tree.ts +1 -1
- package/stubs/natives/index.ts +50 -2
- package/stubs/tui/index.ts +51 -4
- package/src/stubs/natives/index.ts +0 -814
- package/src/stubs/natives/package.json +0 -7
- package/src/stubs/tui/index.ts +0 -282
- package/src/stubs/tui/package.json +0 -7
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@wahack/pi-coding-agent",
|
|
4
|
-
"version": "15.11.
|
|
4
|
+
"version": "15.11.6",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -60,19 +60,33 @@
|
|
|
60
60
|
"@opentelemetry/resources": "^1.30.0",
|
|
61
61
|
"@opentelemetry/sdk-trace-base": "^1.30.0",
|
|
62
62
|
"@opentelemetry/sdk-trace-node": "^1.30.0",
|
|
63
|
+
"@puppeteer/browsers": "^3.0.4",
|
|
64
|
+
"@types/turndown": "^5.0.6",
|
|
65
|
+
"@xterm/headless": "^6.0.0",
|
|
63
66
|
"chalk": "^5.4.0",
|
|
64
67
|
"diff": "^7.0.0",
|
|
68
|
+
"fflate": "^0.8.3",
|
|
69
|
+
"handlebars": "^4.7.9",
|
|
70
|
+
"linkedom": "^0.18.12",
|
|
65
71
|
"lru-cache": "^11.0.0",
|
|
72
|
+
"markit-ai": "^0.5.3",
|
|
73
|
+
"puppeteer-core": "^25.1.0",
|
|
74
|
+
"turndown": "^7.2.4",
|
|
75
|
+
"turndown-plugin-gfm": "^1.0.2",
|
|
66
76
|
"zod": "^3.24.0"
|
|
67
77
|
},
|
|
68
|
-
"optionalDependencies": {
|
|
69
|
-
|
|
78
|
+
"optionalDependencies": {
|
|
79
|
+
"@huggingface/transformers": "^4.2.0"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@types/bun": "^1.3.14"
|
|
83
|
+
},
|
|
70
84
|
"engines": {
|
|
71
85
|
"bun": ">=1.3.14"
|
|
72
86
|
},
|
|
73
87
|
"files": [
|
|
74
|
-
"src",
|
|
75
88
|
"stubs",
|
|
89
|
+
"src",
|
|
76
90
|
"dist/cli.js",
|
|
77
91
|
"dist/*.node",
|
|
78
92
|
"scripts",
|
|
@@ -550,6 +564,14 @@
|
|
|
550
564
|
"types": "./src/web/search/providers/*.ts",
|
|
551
565
|
"import": "./src/web/search/providers/*.ts"
|
|
552
566
|
},
|
|
553
|
-
"./*.js": "./src/*.ts"
|
|
567
|
+
"./*.js": "./src/*.ts",
|
|
568
|
+
"./lite": {
|
|
569
|
+
"types": "./src/lite.ts",
|
|
570
|
+
"import": "./src/lite.ts"
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"imports": {
|
|
574
|
+
"#stubs/natives": "./stubs/natives/index.ts",
|
|
575
|
+
"#stubs/tui": "./stubs/tui/index.ts"
|
|
554
576
|
}
|
|
555
577
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { matchesKey, replaceTabs, ScrollView, Text, truncateToWidth, visibleWidth } from '
|
|
1
|
+
import { matchesKey, replaceTabs, ScrollView, Text, truncateToWidth, visibleWidth } from '#stubs/tui'
|
|
2
2
|
import type { Theme } from "../modes/theme/theme";
|
|
3
3
|
import { formatElapsed, formatNum, isBetter } from "./helpers";
|
|
4
4
|
import { currentResults, findBaselineMetric, findBaselineRunNumber, findBaselineSecondary } from "./state";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
2
|
import * as path from "node:path";
|
|
3
|
-
import type { AutocompleteItem } from '
|
|
3
|
+
import type { AutocompleteItem } from '#stubs/tui'
|
|
4
4
|
import { logger, prompt } from "@oh-my-pi/pi-utils";
|
|
5
5
|
import type { ExtensionContext, ExtensionFactory } from "../extensibility/extensions";
|
|
6
6
|
import * as git from "../utils/git";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as path from "node:path";
|
|
2
2
|
|
|
3
|
-
import { Text } from '
|
|
3
|
+
import { Text } from '#stubs/tui'
|
|
4
4
|
import * as z from "zod/v4";
|
|
5
5
|
import type { ToolDefinition } from "../../extensibility/extensions";
|
|
6
6
|
import type { Theme } from "../../modes/theme/theme";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
2
|
import * as path from "node:path";
|
|
3
3
|
|
|
4
|
-
import { Text } from '
|
|
4
|
+
import { Text } from '#stubs/tui'
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import type { ToolDefinition } from "../../extensibility/extensions";
|
|
7
7
|
import type { Theme } from "../../modes/theme/theme";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
2
|
import * as path from "node:path";
|
|
3
|
-
import { Text } from '
|
|
3
|
+
import { Text } from '#stubs/tui'
|
|
4
4
|
import { formatBytes } from "@oh-my-pi/pi-utils";
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { executeBash } from "../../exec/bash-executor";
|
|
@@ -9,7 +9,7 @@ import * as net from "node:net";
|
|
|
9
9
|
import * as path from "node:path";
|
|
10
10
|
import * as tls from "node:tls";
|
|
11
11
|
import * as zlib from "node:zlib";
|
|
12
|
-
import { PtySession } from '
|
|
12
|
+
import { PtySession } from '#stubs/natives'
|
|
13
13
|
import xterm from "@xterm/headless";
|
|
14
14
|
|
|
15
15
|
const DEFAULT_PROXY_HOST = "127.0.0.1";
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
} from "@oh-my-pi/pi-ai";
|
|
14
14
|
import { streamSimple } from "@oh-my-pi/pi-ai";
|
|
15
15
|
import type { CanonicalModelVariant } from "@oh-my-pi/pi-catalog/identity";
|
|
16
|
-
import { replaceTabs, truncateToWidth } from '
|
|
16
|
+
import { replaceTabs, truncateToWidth } from '#stubs/tui'
|
|
17
17
|
import { formatDuration, getProjectDir } from "@oh-my-pi/pi-utils";
|
|
18
18
|
import chalk from "chalk";
|
|
19
19
|
import { type CanonicalModelQueryOptions, ModelRegistry } from "../config/model-registry";
|
package/src/cli/gallery-cli.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* having to provoke each state through a live agent session.
|
|
9
9
|
*/
|
|
10
10
|
import type { AgentTool } from "@oh-my-pi/pi-agent-core";
|
|
11
|
-
import type { TUI } from '
|
|
11
|
+
import type { TUI } from '#stubs/tui'
|
|
12
12
|
import { getProjectDir } from "@oh-my-pi/pi-utils";
|
|
13
13
|
import { Settings } from "../config/settings";
|
|
14
14
|
import { ToolExecutionComponent } from "../modes/components/tool-execution";
|
|
@@ -95,7 +95,7 @@ export const shellFixtures: Record<string, GalleryFixture> = {
|
|
|
95
95
|
details: {
|
|
96
96
|
language: "python",
|
|
97
97
|
languages: ["python"],
|
|
98
|
-
jsonOutputs: [["@ai-sdk/anthropic", "@oh-my-pi/pi-ai", '
|
|
98
|
+
jsonOutputs: [["@ai-sdk/anthropic", "@oh-my-pi/pi-ai", '#stubs/tui']],
|
|
99
99
|
cells: [
|
|
100
100
|
{
|
|
101
101
|
index: 0,
|
package/src/cli/grep-cli.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Handles `omp grep` subcommand for testing grep tool on Windows.
|
|
5
5
|
*/
|
|
6
6
|
import * as path from "node:path";
|
|
7
|
-
import { GrepOutputMode, grep } from '
|
|
7
|
+
import { GrepOutputMode, grep } from '#stubs/natives'
|
|
8
8
|
import { APP_NAME } from "@oh-my-pi/pi-utils";
|
|
9
9
|
import chalk from "chalk";
|
|
10
10
|
|
package/src/cli/list-models.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { Api, Model } from "@oh-my-pi/pi-ai";
|
|
5
5
|
import { getSupportedEfforts } from "@oh-my-pi/pi-catalog/model-thinking";
|
|
6
|
-
import { fuzzyFilter } from '
|
|
6
|
+
import { fuzzyFilter } from '#stubs/tui'
|
|
7
7
|
import { formatNumber } from "@oh-my-pi/pi-utils";
|
|
8
8
|
import type { ModelRegistry } from "../config/model-registry";
|
|
9
9
|
import { discoverAndLoadExtensions, loadExtensions } from "../extensibility/extensions";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProcessTerminal, TUI } from '
|
|
1
|
+
import { ProcessTerminal, TUI } from '#stubs/tui'
|
|
2
2
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
3
3
|
import { SessionSelectorComponent } from "../modes/components/session-selector";
|
|
4
4
|
import { HistoryStorage } from "../session/history-storage";
|
package/src/cli/shell-cli.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as path from "node:path";
|
|
7
7
|
import { createInterface } from "node:readline/promises";
|
|
8
|
-
import { Shell } from '
|
|
8
|
+
import { Shell } from '#stubs/natives'
|
|
9
9
|
import { APP_NAME, getProjectDir } from "@oh-my-pi/pi-utils";
|
|
10
10
|
import chalk from "chalk";
|
|
11
11
|
import { Settings } from "../config/settings";
|
package/src/cli/update-cli.ts
CHANGED
|
@@ -36,7 +36,7 @@ const NPM_REGISTRY = "https://registry.npmjs.org/";
|
|
|
36
36
|
* disk; see {@link buildBunInstallArgs} for why this must be installed
|
|
37
37
|
* explicitly rather than inherited as a transitive dependency.
|
|
38
38
|
*/
|
|
39
|
-
const NATIVES_PACKAGE = '
|
|
39
|
+
const NATIVES_PACKAGE = '#stubs/natives';
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Platform tags the release pipeline publishes as
|
package/src/commands/grep.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Test grep tool.
|
|
3
3
|
*/
|
|
4
|
-
import { GrepOutputMode } from '
|
|
4
|
+
import { GrepOutputMode } from '#stubs/natives'
|
|
5
5
|
import { Args, Command, Flags } from "@oh-my-pi/pi-utils/cli";
|
|
6
6
|
import { type GrepCommandArgs, runGrepCommand } from "../cli/grep-cli";
|
|
7
7
|
import { initTheme } from "../modes/theme/theme";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { INTENT_FIELD, type ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
2
2
|
import type { Api, Model } from "@oh-my-pi/pi-ai";
|
|
3
|
-
import { Markdown } from '
|
|
3
|
+
import { Markdown } from '#stubs/tui'
|
|
4
4
|
import { prompt } from "@oh-my-pi/pi-utils";
|
|
5
5
|
import chalk from "chalk";
|
|
6
6
|
import typesDescriptionPrompt from "../../commit/prompts/types-description.md" with { type: "text" };
|
|
@@ -6,7 +6,7 @@ import { type Keybinding,
|
|
|
6
6
|
type KeyId,
|
|
7
7
|
setKeybindings,
|
|
8
8
|
TUI_KEYBINDINGS,
|
|
9
|
-
KeybindingsManager as TuiKeybindingsManager, } from '
|
|
9
|
+
KeybindingsManager as TuiKeybindingsManager, } from '#stubs/tui'
|
|
10
10
|
import { getAgentDir, isEnoent, logger } from "@oh-my-pi/pi-utils";
|
|
11
11
|
import { YAML } from "bun";
|
|
12
12
|
|
|
@@ -54,7 +54,7 @@ interface AppKeybindings {
|
|
|
54
54
|
|
|
55
55
|
export type AppKeybinding = keyof AppKeybindings;
|
|
56
56
|
|
|
57
|
-
declare module '
|
|
57
|
+
declare module '#stubs/tui' {
|
|
58
58
|
interface Keybindings extends AppKeybindings {}
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -22,7 +22,7 @@ import { buildModelProviderPriorityRank } from "@oh-my-pi/pi-catalog/identity";
|
|
|
22
22
|
import { clampThinkingLevelForModel } from "@oh-my-pi/pi-catalog/model-thinking";
|
|
23
23
|
import { modelsAreEqual } from "@oh-my-pi/pi-catalog/models";
|
|
24
24
|
import { DEFAULT_MODEL_PER_PROVIDER } from "@oh-my-pi/pi-catalog/provider-models";
|
|
25
|
-
import { fuzzyMatch } from '
|
|
25
|
+
import { fuzzyMatch } from '#stubs/tui'
|
|
26
26
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
27
27
|
import chalk from "chalk";
|
|
28
28
|
import MODEL_PRIO from "../priority.json" with { type: "json" };
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Note: command execution is async to avoid blocking the TUI.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { executeShell } from '
|
|
7
|
+
import { executeShell } from '#stubs/natives'
|
|
8
8
|
|
|
9
9
|
/** Cache for successful shell command results (persists for process lifetime). */
|
|
10
10
|
const commandResultCache = new Map<string, string>();
|
package/src/debug/index.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as fs from "node:fs/promises";
|
|
7
7
|
import * as url from "node:url";
|
|
8
|
-
import { getWorkProfile } from '
|
|
8
|
+
import { getWorkProfile } from '#stubs/natives'
|
|
9
9
|
import { Container,
|
|
10
10
|
isNotificationSuppressed,
|
|
11
11
|
Loader,
|
|
@@ -14,7 +14,7 @@ import { Container,
|
|
|
14
14
|
Spacer,
|
|
15
15
|
TERMINAL,
|
|
16
16
|
type TerminalNotification,
|
|
17
|
-
Text, } from '
|
|
17
|
+
Text, } from '#stubs/tui'
|
|
18
18
|
import { getSessionsDir } from "@oh-my-pi/pi-utils";
|
|
19
19
|
import { DynamicBorder } from "../modes/components/dynamic-border";
|
|
20
20
|
import { TranscriptBlock } from "../modes/components/transcript-container";
|
package/src/debug/log-viewer.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { type Component,
|
|
|
4
4
|
padding,
|
|
5
5
|
replaceTabs,
|
|
6
6
|
truncateToWidth,
|
|
7
|
-
visibleWidth, } from '
|
|
7
|
+
visibleWidth, } from '#stubs/tui'
|
|
8
8
|
import { sanitizeText } from "@oh-my-pi/pi-utils";
|
|
9
9
|
import { theme } from "../modes/theme/theme";
|
|
10
10
|
import { copyToClipboard } from "../utils/clipboard";
|
|
@@ -24,7 +24,7 @@ import { type Component,
|
|
|
24
24
|
Spacer,
|
|
25
25
|
TERMINAL,
|
|
26
26
|
Text,
|
|
27
|
-
type TextSizingScale, } from '
|
|
27
|
+
type TextSizingScale, } from '#stubs/tui'
|
|
28
28
|
import { DynamicBorder } from "../modes/components/dynamic-border";
|
|
29
29
|
import { theme } from "../modes/theme/theme";
|
|
30
30
|
|
package/src/debug/raw-sse.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { type Component,
|
|
|
4
4
|
replaceTabs,
|
|
5
5
|
ScrollView,
|
|
6
6
|
truncateToWidth,
|
|
7
|
-
visibleWidth, } from '
|
|
7
|
+
visibleWidth, } from '#stubs/tui'
|
|
8
8
|
import { sanitizeText } from "@oh-my-pi/pi-utils";
|
|
9
9
|
import { theme } from "../modes/theme/theme";
|
|
10
10
|
import { copyToClipboard } from "../utils/clipboard";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as fs from "node:fs/promises";
|
|
7
7
|
import * as path from "node:path";
|
|
8
|
-
import type { WorkProfile } from '
|
|
8
|
+
import type { WorkProfile } from '#stubs/natives'
|
|
9
9
|
import { APP_NAME, getLogPath, getLogsDir, getReportsDir, isEnoent } from "@oh-my-pi/pi-utils";
|
|
10
10
|
import type { CpuProfile, HeapSnapshot } from "./profiler";
|
|
11
11
|
import { collectSystemInfo, sanitizeEnv } from "./system-info";
|
|
@@ -11,7 +11,7 @@ import { getCellDimensions,
|
|
|
11
11
|
isOsc99Supported,
|
|
12
12
|
NotifyProtocol,
|
|
13
13
|
TERMINAL,
|
|
14
|
-
TERMINAL_ID, } from '
|
|
14
|
+
TERMINAL_ID, } from '#stubs/tui'
|
|
15
15
|
|
|
16
16
|
/** Live values the debug view reads off the running TUI, not the static capability table. */
|
|
17
17
|
export interface TerminalRuntimeState {
|
package/src/discovery/helpers.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as fs from "node:fs";
|
|
|
2
2
|
import * as os from "node:os";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
5
|
-
import { FileType, glob } from '
|
|
5
|
+
import { FileType, glob } from '#stubs/natives'
|
|
6
6
|
import {
|
|
7
7
|
CONFIG_DIR_NAME,
|
|
8
8
|
getConfigDirName,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* the requested line (or `null` when none can be resolved).
|
|
7
7
|
*/
|
|
8
8
|
import type { BlockResolver } from "@oh-my-pi/hashline";
|
|
9
|
-
import { blockRangeAt } from '
|
|
9
|
+
import { blockRangeAt } from '#stubs/natives'
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* `blockRangeAt` runs a full synchronous tree-sitter parse of `text` per
|
package/src/edit/normalize.ts
CHANGED
package/src/edit/renderer.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { HL_FILE_PREFIX, HL_FILE_SUFFIX } from "@oh-my-pi/hashline";
|
|
6
|
-
import type { Component } from '
|
|
7
|
-
import { sliceWithWidth, visibleWidth, wrapTextWithAnsi } from '
|
|
6
|
+
import type { Component } from '#stubs/tui'
|
|
7
|
+
import { sliceWithWidth, visibleWidth, wrapTextWithAnsi } from '#stubs/tui'
|
|
8
8
|
import { sanitizeText } from "@oh-my-pi/pi-utils";
|
|
9
9
|
import type { RenderResultOptions } from "../extensibility/custom-tools/types";
|
|
10
10
|
import type { FileDiagnosticsResult } from "../lsp";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as fs from "node:fs/promises";
|
|
7
7
|
import { ExponentialYield } from "@oh-my-pi/pi-agent-core/utils/yield";
|
|
8
|
-
import { executeShell, type MinimizerOptions, Shell, type ShellRunResult } from '
|
|
8
|
+
import { executeShell, type MinimizerOptions, Shell, type ShellRunResult } from '#stubs/natives'
|
|
9
9
|
import { isExecutable, type ShellConfig } from "@oh-my-pi/pi-utils/procmgr";
|
|
10
10
|
import { Settings, type ShellMinimizerSettings } from "../config/settings";
|
|
11
11
|
import { OutputSink } from "../session/streaming-output";
|
package/src/export/ttsr.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* injected as a system reminder, and the request is retried.
|
|
7
7
|
*/
|
|
8
8
|
import * as path from "node:path";
|
|
9
|
-
import { AstMatchStrictness, astMatch } from '
|
|
9
|
+
import { AstMatchStrictness, astMatch } from '#stubs/natives'
|
|
10
10
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
11
11
|
import type { Rule } from "../capability/rule";
|
|
12
12
|
import type { TtsrSettings } from "../config/settings";
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
} from "@oh-my-pi/pi-agent-core";
|
|
14
14
|
import type { CompactionResult } from "@oh-my-pi/pi-agent-core/compaction";
|
|
15
15
|
import type { FetchImpl, Model, Static, TSchema } from "@oh-my-pi/pi-ai";
|
|
16
|
-
import type { Component } from '
|
|
16
|
+
import type { Component } from '#stubs/tui'
|
|
17
17
|
import type { Rule } from "../../capability/rule";
|
|
18
18
|
import type { ModelRegistry } from "../../config/model-registry";
|
|
19
19
|
import type { Settings } from "../../config/settings";
|
|
@@ -7,7 +7,7 @@ import * as path from "node:path";
|
|
|
7
7
|
import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
8
8
|
import type { ImageContent, Model, TextContent, TSchema } from "@oh-my-pi/pi-ai";
|
|
9
9
|
import * as PiCodingAgent from "@wahack/pi-coding-agent";
|
|
10
|
-
import type { KeyId } from '
|
|
10
|
+
import type { KeyId } from '#stubs/tui'
|
|
11
11
|
import { hasFsCode, isEacces, isEnoent, logger } from "@oh-my-pi/pi-utils";
|
|
12
12
|
import * as Zod from "zod/v4";
|
|
13
13
|
import { type ExtensionModule, extensionModuleCapability } from "../../capability/extension-module";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
|
|
5
5
|
import type { CredentialDisabledEvent, ImageContent, Model, ProviderResponseMetadata } from "@oh-my-pi/pi-ai";
|
|
6
|
-
import type { KeyId } from '
|
|
6
|
+
import type { KeyId } from '#stubs/tui'
|
|
7
7
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
8
8
|
import type { ModelRegistry } from "../../config/model-registry";
|
|
9
9
|
import type { MemoryRuntimeContext } from "../../memory-backend";
|
|
@@ -31,7 +31,7 @@ import type {
|
|
|
31
31
|
} from "@oh-my-pi/pi-ai";
|
|
32
32
|
import type { OAuthCredentials, OAuthLoginCallbacks } from "@oh-my-pi/pi-ai/oauth/types";
|
|
33
33
|
import type * as piCodingAgent from "@wahack/pi-coding-agent";
|
|
34
|
-
import type { AutocompleteItem, Component, EditorTheme, KeyId, TUI } from '
|
|
34
|
+
import type { AutocompleteItem, Component, EditorTheme, KeyId, TUI } from '#stubs/tui'
|
|
35
35
|
import type { logger as PiLogger } from "@oh-my-pi/pi-utils";
|
|
36
36
|
import type * as Zod from "zod/v4";
|
|
37
37
|
import type { KeybindingsManager } from "../../config/keybindings";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ImageContent, Message, Model, TextContent } from "@oh-my-pi/pi-ai";
|
|
2
|
-
import type { Component, TUI } from '
|
|
2
|
+
import type { Component, TUI } from '#stubs/tui'
|
|
3
3
|
import type { ModelRegistry } from "../../config/model-registry";
|
|
4
4
|
import type { EditToolDetails } from "../../edit";
|
|
5
5
|
import type { ExecOptions, ExecResult } from "../../exec/exec";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AutocompleteItem } from '
|
|
1
|
+
import type { AutocompleteItem } from '#stubs/tui'
|
|
2
2
|
import { parseFrontmatter, prompt } from "@oh-my-pi/pi-utils";
|
|
3
3
|
import { slashCommandCapability } from "../capability/slash-command";
|
|
4
4
|
import { appendInlineArgsFallback, templateUsesInlineArgPlaceholders } from "../config/prompt-templates";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
|
|
2
|
-
import type { Component } from '
|
|
3
|
-
import { Text } from '
|
|
2
|
+
import type { Component } from '#stubs/tui'
|
|
3
|
+
import { Text } from '#stubs/tui'
|
|
4
4
|
import { formatNumber, prompt } from "@oh-my-pi/pi-utils";
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import type { RenderResultOptions } from "../../extensibility/custom-tools/types";
|
package/src/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { HookEditorComponent, HookInputComponent, HookSelectorComponent } from "
|
|
|
3
3
|
// Core session management
|
|
4
4
|
|
|
5
5
|
// Re-export TUI components for custom tool rendering
|
|
6
|
-
export { Container, Markdown, Spacer, Text } from '
|
|
6
|
+
export { Container, Markdown, Spacer, Text } from '#stubs/tui';
|
|
7
7
|
// Logging
|
|
8
8
|
export { getAgentDir, logger, VERSION } from "@oh-my-pi/pi-utils";
|
|
9
9
|
export * from "./config/keybindings";
|
package/src/lite.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Lightweight entry point for consumers that only need the SDK surface.
|
|
2
|
+
// This re-exports the symbols used by downstream integrations without pulling
|
|
3
|
+
// in the full CLI/TUI implementation tree when imported via the ./lite path.
|
|
4
|
+
|
|
5
|
+
export { AuthStorage } from "./session/auth-storage";
|
|
6
|
+
export { discoverSkills } from "./sdk";
|
|
7
|
+
export { Settings } from "./config/settings";
|
|
8
|
+
export { ModelRegistry } from "./config/model-registry";
|
|
9
|
+
export { SessionManager } from "./session/session-manager";
|
|
10
|
+
export { createAgentSession } from "./sdk";
|
package/src/lsp/render.ts
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* - Collapsible/expandable views
|
|
9
9
|
*/
|
|
10
10
|
import type { RenderResultOptions } from "@oh-my-pi/pi-agent-core";
|
|
11
|
-
import { type HighlightColors, highlightCode as nativeHighlightCode, supportsLanguage } from '
|
|
12
|
-
import { type Component, Text } from '
|
|
11
|
+
import { type HighlightColors, highlightCode as nativeHighlightCode, supportsLanguage } from '#stubs/natives'
|
|
12
|
+
import { type Component, Text } from '#stubs/tui'
|
|
13
13
|
import { getLanguageFromPath, type Theme } from "../modes/theme/theme";
|
|
14
14
|
import {
|
|
15
15
|
formatExpandHint,
|
package/src/mcp/render.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Provides structured display of MCP tool calls and results,
|
|
5
5
|
* showing args and output in JSON tree format similar to task tool.
|
|
6
6
|
*/
|
|
7
|
-
import type { Component } from '
|
|
8
|
-
import { Text } from '
|
|
7
|
+
import type { Component } from '#stubs/tui'
|
|
8
|
+
import { Text } from '#stubs/tui'
|
|
9
9
|
import type { RenderResultOptions } from "../extensibility/custom-tools/types";
|
|
10
10
|
import type { Theme } from "../modes/theme/theme";
|
|
11
11
|
import {
|
|
@@ -31,7 +31,7 @@ import { type Component,
|
|
|
31
31
|
Text,
|
|
32
32
|
truncateToWidth,
|
|
33
33
|
visibleWidth,
|
|
34
|
-
wrapTextWithAnsi, } from '
|
|
34
|
+
wrapTextWithAnsi, } from '#stubs/tui'
|
|
35
35
|
import { isEnoent, prompt } from "@oh-my-pi/pi-utils";
|
|
36
36
|
import { YAML } from "bun";
|
|
37
37
|
import { getConfigDirs } from "../../config";
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import * as fs from "node:fs";
|
|
17
17
|
import type { ToolResultMessage } from "@oh-my-pi/pi-ai";
|
|
18
|
-
import { Container, Editor, Markdown, type MarkdownTheme, matchesKey, ScrollView } from '
|
|
18
|
+
import { Container, Editor, Markdown, type MarkdownTheme, matchesKey, ScrollView } from '#stubs/tui'
|
|
19
19
|
import { formatAge, formatDuration, formatNumber, logger } from "@oh-my-pi/pi-utils";
|
|
20
20
|
import type { KeyId } from "../../config/keybindings";
|
|
21
21
|
import { IrcBus } from "../../irc/bus";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AssistantMessage, ImageContent, Usage } from "@oh-my-pi/pi-ai";
|
|
2
|
-
import { Container, Image, type ImageBudget, ImageProtocol, Markdown, Spacer, TERMINAL, Text } from '
|
|
2
|
+
import { Container, Image, type ImageBudget, ImageProtocol, Markdown, Spacer, TERMINAL, Text } from '#stubs/tui'
|
|
3
3
|
import { formatNumber } from "@oh-my-pi/pi-utils";
|
|
4
4
|
import { settings } from "../../config/settings";
|
|
5
5
|
import type { AssistantThinkingRenderer } from "../../extensibility/extensions/types";
|
|
@@ -10,7 +10,7 @@ import { Container,
|
|
|
10
10
|
Text,
|
|
11
11
|
type TUI,
|
|
12
12
|
truncateToWidth,
|
|
13
|
-
visibleWidth, } from '
|
|
13
|
+
visibleWidth, } from '#stubs/tui'
|
|
14
14
|
import { sanitizeText } from "@oh-my-pi/pi-utils";
|
|
15
15
|
import { theme } from "../../modes/theme/theme";
|
|
16
16
|
import type { TruncationMeta } from "../../tools/output-meta";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CancellableLoader, Container, Spacer, Text, type TUI } from '
|
|
1
|
+
import { CancellableLoader, Container, Spacer, Text, type TUI } from '#stubs/tui'
|
|
2
2
|
import type { Theme } from "../../modes/theme/theme";
|
|
3
3
|
import { DynamicBorder } from "./dynamic-border";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Component, Container, Markdown, Spacer, Text, type TUI } from '
|
|
1
|
+
import { type Component, Container, Markdown, Spacer, Text, type TUI } from '#stubs/tui'
|
|
2
2
|
import { replaceTabs } from "../../tools/render-utils";
|
|
3
3
|
import { getMarkdownTheme, theme } from "../theme/theme";
|
|
4
4
|
import { DynamicBorder } from "./dynamic-border";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box, type Component, Markdown } from '
|
|
1
|
+
import { Box, type Component, Markdown } from '#stubs/tui'
|
|
2
2
|
import { getMarkdownTheme, theme } from "../../modes/theme/theme";
|
|
3
3
|
import type { CompactionSummaryMessage } from "../../session/messages";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Component, matchesKey, padding, Text, truncateToWidth, visibleWidth } from '
|
|
1
|
+
import { type Component, matchesKey, padding, Text, truncateToWidth, visibleWidth } from '#stubs/tui'
|
|
2
2
|
import { replaceTabs } from "../../tools/render-utils";
|
|
3
3
|
import { highlightCode, theme } from "../theme/theme";
|
|
4
4
|
import type { CopyTarget } from "../utils/copy-targets";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addKeyAliases, canonicalKeyId, Editor, type KeyId, parseKey, parseKittySequence } from '
|
|
1
|
+
import { addKeyAliases, canonicalKeyId, Editor, type KeyId, parseKey, parseKittySequence } from '#stubs/tui'
|
|
2
2
|
import type { AppKeybinding } from "../../config/keybindings";
|
|
3
3
|
import { imageReferenceHyperlink, PLACEHOLDER_REGEX, renderPlaceholders } from "../image-references";
|
|
4
4
|
import { highlightMagicKeywords } from "../magic-keywords";
|