@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.
Files changed (181) hide show
  1. package/package.json +27 -5
  2. package/src/autoresearch/dashboard.ts +1 -1
  3. package/src/autoresearch/index.ts +1 -1
  4. package/src/autoresearch/tools/init-experiment.ts +1 -1
  5. package/src/autoresearch/tools/log-experiment.ts +1 -1
  6. package/src/autoresearch/tools/run-experiment.ts +1 -1
  7. package/src/autoresearch/tools/update-notes.ts +1 -1
  8. package/src/cli/claude-trace-cli.ts +1 -1
  9. package/src/cli/dry-balance-cli.ts +1 -1
  10. package/src/cli/gallery-cli.ts +1 -1
  11. package/src/cli/gallery-fixtures/shell.ts +1 -1
  12. package/src/cli/grep-cli.ts +1 -1
  13. package/src/cli/list-models.ts +1 -1
  14. package/src/cli/session-picker.ts +1 -1
  15. package/src/cli/shell-cli.ts +1 -1
  16. package/src/cli/update-cli.ts +1 -1
  17. package/src/commands/grep.ts +1 -1
  18. package/src/commit/agentic/agent.ts +1 -1
  19. package/src/config/keybindings.ts +2 -2
  20. package/src/config/model-resolver.ts +1 -1
  21. package/src/config/resolve-config-value.ts +1 -1
  22. package/src/debug/index.ts +2 -2
  23. package/src/debug/log-viewer.ts +1 -1
  24. package/src/debug/protocol-probe.ts +1 -1
  25. package/src/debug/raw-sse.ts +1 -1
  26. package/src/debug/report-bundle.ts +1 -1
  27. package/src/debug/terminal-info.ts +1 -1
  28. package/src/discovery/helpers.ts +1 -1
  29. package/src/edit/hashline/block-resolver.ts +1 -1
  30. package/src/edit/normalize.ts +1 -1
  31. package/src/edit/renderer.ts +2 -2
  32. package/src/exec/bash-executor.ts +1 -1
  33. package/src/export/ttsr.ts +1 -1
  34. package/src/extensibility/custom-tools/types.ts +1 -1
  35. package/src/extensibility/extensions/loader.ts +1 -1
  36. package/src/extensibility/extensions/runner.ts +1 -1
  37. package/src/extensibility/extensions/types.ts +1 -1
  38. package/src/extensibility/hooks/types.ts +1 -1
  39. package/src/extensibility/slash-commands.ts +1 -1
  40. package/src/goals/tools/goal-tool.ts +2 -2
  41. package/src/index.ts +1 -1
  42. package/src/lite.ts +10 -0
  43. package/src/lsp/render.ts +2 -2
  44. package/src/mcp/render.ts +2 -2
  45. package/src/modes/components/agent-dashboard.ts +1 -1
  46. package/src/modes/components/agent-hub.ts +1 -1
  47. package/src/modes/components/assistant-message.ts +1 -1
  48. package/src/modes/components/bash-execution.ts +1 -1
  49. package/src/modes/components/bordered-loader.ts +1 -1
  50. package/src/modes/components/branch-summary-message.ts +1 -1
  51. package/src/modes/components/btw-panel.ts +1 -1
  52. package/src/modes/components/chat-block.ts +1 -1
  53. package/src/modes/components/compaction-summary-message.ts +1 -1
  54. package/src/modes/components/copy-selector.ts +1 -1
  55. package/src/modes/components/countdown-timer.ts +1 -1
  56. package/src/modes/components/custom-editor.ts +1 -1
  57. package/src/modes/components/custom-message.ts +2 -2
  58. package/src/modes/components/dynamic-border.ts +1 -1
  59. package/src/modes/components/error-banner.ts +1 -1
  60. package/src/modes/components/eval-execution.ts +1 -1
  61. package/src/modes/components/execution-shared.ts +1 -1
  62. package/src/modes/components/extensions/extension-dashboard.ts +1 -1
  63. package/src/modes/components/extensions/extension-list.ts +1 -1
  64. package/src/modes/components/extensions/inspector-panel.ts +1 -1
  65. package/src/modes/components/extensions/state-manager.ts +1 -1
  66. package/src/modes/components/footer.ts +1 -1
  67. package/src/modes/components/history-search.ts +1 -1
  68. package/src/modes/components/hook-editor.ts +1 -1
  69. package/src/modes/components/hook-input.ts +1 -1
  70. package/src/modes/components/hook-message.ts +2 -2
  71. package/src/modes/components/hook-selector.ts +1 -1
  72. package/src/modes/components/keybinding-hints.ts +1 -1
  73. package/src/modes/components/late-diagnostics-message.ts +1 -1
  74. package/src/modes/components/login-dialog.ts +1 -1
  75. package/src/modes/components/mcp-add-wizard.ts +1 -1
  76. package/src/modes/components/message-frame.ts +2 -2
  77. package/src/modes/components/model-selector.ts +1 -1
  78. package/src/modes/components/oauth-selector.ts +1 -1
  79. package/src/modes/components/omfg-panel.ts +1 -1
  80. package/src/modes/components/overlay-box.ts +1 -1
  81. package/src/modes/components/plan-review-overlay.ts +1 -1
  82. package/src/modes/components/plugin-selector.ts +1 -1
  83. package/src/modes/components/plugin-settings.ts +1 -1
  84. package/src/modes/components/queue-mode-selector.ts +1 -1
  85. package/src/modes/components/read-tool-group.ts +2 -2
  86. package/src/modes/components/session-selector.ts +1 -1
  87. package/src/modes/components/settings-defs.ts +1 -1
  88. package/src/modes/components/settings-selector.ts +1 -1
  89. package/src/modes/components/show-images-selector.ts +1 -1
  90. package/src/modes/components/skill-message.ts +2 -2
  91. package/src/modes/components/status-line/component.ts +1 -1
  92. package/src/modes/components/status-line/segments.ts +1 -1
  93. package/src/modes/components/theme-selector.ts +1 -1
  94. package/src/modes/components/thinking-selector.ts +1 -1
  95. package/src/modes/components/tiny-title-download-progress.ts +1 -1
  96. package/src/modes/components/todo-reminder.ts +1 -1
  97. package/src/modes/components/tool-execution.ts +1 -1
  98. package/src/modes/components/transcript-container.ts +1 -1
  99. package/src/modes/components/tree-selector.ts +1 -1
  100. package/src/modes/components/ttsr-notification.ts +1 -1
  101. package/src/modes/components/user-message-selector.ts +1 -1
  102. package/src/modes/components/user-message.ts +1 -1
  103. package/src/modes/components/visual-truncate.ts +1 -1
  104. package/src/modes/components/welcome.ts +1 -1
  105. package/src/modes/controllers/command-controller-shared.ts +1 -1
  106. package/src/modes/controllers/command-controller.ts +1 -1
  107. package/src/modes/controllers/event-controller.ts +1 -1
  108. package/src/modes/controllers/extension-ui-controller.ts +2 -2
  109. package/src/modes/controllers/input-controller.ts +1 -1
  110. package/src/modes/controllers/mcp-command-controller.ts +1 -1
  111. package/src/modes/controllers/selector-controller.ts +2 -2
  112. package/src/modes/controllers/streaming-reveal.ts +1 -1
  113. package/src/modes/emoji-autocomplete.ts +1 -1
  114. package/src/modes/index.ts +1 -1
  115. package/src/modes/interactive-mode.ts +2 -2
  116. package/src/modes/internal-url-autocomplete.ts +1 -1
  117. package/src/modes/prompt-action-autocomplete.ts +1 -1
  118. package/src/modes/setup-wizard/scenes/glyph.ts +1 -1
  119. package/src/modes/setup-wizard/scenes/outro.ts +1 -1
  120. package/src/modes/setup-wizard/scenes/providers.ts +1 -1
  121. package/src/modes/setup-wizard/scenes/sign-in.ts +1 -1
  122. package/src/modes/setup-wizard/scenes/splash.ts +1 -1
  123. package/src/modes/setup-wizard/scenes/theme.ts +1 -1
  124. package/src/modes/setup-wizard/scenes/types.ts +1 -1
  125. package/src/modes/setup-wizard/scenes/web-search.ts +1 -1
  126. package/src/modes/setup-wizard/wizard-overlay.ts +1 -1
  127. package/src/modes/shared.ts +1 -1
  128. package/src/modes/theme/theme.ts +3 -3
  129. package/src/modes/types.ts +1 -1
  130. package/src/modes/utils/context-usage.ts +1 -1
  131. package/src/modes/utils/keybinding-matchers.ts +1 -1
  132. package/src/modes/utils/ui-helpers.ts +1 -1
  133. package/src/sdk.ts +1 -1
  134. package/src/session/agent-session.ts +1 -1
  135. package/src/session/session-manager.ts +1 -1
  136. package/src/task/render.ts +2 -2
  137. package/src/task/subprocess-tool-registry.ts +1 -1
  138. package/src/task/worktree.ts +1 -1
  139. package/src/tools/ask.ts +1 -1
  140. package/src/tools/ast-edit.ts +3 -3
  141. package/src/tools/ast-grep.ts +3 -3
  142. package/src/tools/bash-command-fixup.ts +1 -1
  143. package/src/tools/bash-interactive.ts +2 -2
  144. package/src/tools/bash.ts +2 -2
  145. package/src/tools/browser/attach.ts +1 -1
  146. package/src/tools/browser/render.ts +2 -2
  147. package/src/tools/debug.ts +1 -1
  148. package/src/tools/eval-render.ts +2 -2
  149. package/src/tools/fetch.ts +2 -2
  150. package/src/tools/find.ts +3 -3
  151. package/src/tools/fs-cache-invalidation.ts +1 -1
  152. package/src/tools/gh-renderer.ts +1 -1
  153. package/src/tools/inspect-image-renderer.ts +2 -2
  154. package/src/tools/irc.ts +1 -1
  155. package/src/tools/job.ts +2 -2
  156. package/src/tools/memory-render.ts +2 -2
  157. package/src/tools/read.ts +3 -3
  158. package/src/tools/render-utils.ts +5 -5
  159. package/src/tools/renderers.ts +1 -1
  160. package/src/tools/resolve.ts +2 -2
  161. package/src/tools/review.ts +2 -2
  162. package/src/tools/search-tool-bm25.ts +2 -2
  163. package/src/tools/search.ts +3 -3
  164. package/src/tools/ssh.ts +1 -1
  165. package/src/tools/todo.ts +2 -2
  166. package/src/tools/write.ts +1 -1
  167. package/src/tui/code-cell.ts +1 -1
  168. package/src/tui/hyperlink.ts +1 -1
  169. package/src/tui/output-block.ts +2 -2
  170. package/src/tui/tree-list.ts +1 -1
  171. package/src/tui/utils.ts +2 -2
  172. package/src/utils/block-context.ts +1 -1
  173. package/src/utils/clipboard.ts +2 -2
  174. package/src/web/search/render.ts +2 -2
  175. package/src/workspace-tree.ts +1 -1
  176. package/stubs/natives/index.ts +50 -2
  177. package/stubs/tui/index.ts +51 -4
  178. package/src/stubs/natives/index.ts +0 -814
  179. package/src/stubs/natives/package.json +0 -7
  180. package/src/stubs/tui/index.ts +0 -282
  181. package/src/stubs/tui/package.json +0 -7
@@ -1,4 +1,4 @@
1
- import { TabBar } from '../../stubs/tui/index.ts'
1
+ import { TabBar } from '#stubs/tui'
2
2
  import { getTabBarTheme } from "../../shared";
3
3
  import { SignInTab } from "./sign-in";
4
4
  import type { SetupScene, SetupSceneController, SetupSceneHost, SetupTab } from "./types";
@@ -1,7 +1,7 @@
1
1
  import type { AuthStorage } from "@oh-my-pi/pi-ai";
2
2
  import { PASTE_CODE_LOGIN_PROVIDERS } from "@oh-my-pi/pi-ai";
3
3
  import type { OAuthProvider } from "@oh-my-pi/pi-ai/oauth/types";
4
- import { Input, matchesKey, wrapTextWithAnsi } from '../../stubs/tui/index.ts'
4
+ import { Input, matchesKey, wrapTextWithAnsi } from '#stubs/tui'
5
5
  import { getAgentDbPath } from "@oh-my-pi/pi-utils";
6
6
  import { OAuthSelectorComponent } from "../../components/oauth-selector";
7
7
  import { theme } from "../../theme/theme";
@@ -1,4 +1,4 @@
1
- import { padding, truncateToWidth, visibleWidth } from '../../stubs/tui/index.ts'
1
+ import { padding, truncateToWidth, visibleWidth } from '#stubs/tui'
2
2
  import { gradientEscape, gradientLogo, PI_LOGO, type ShineConfig } from "../../components/welcome";
3
3
  import { theme } from "../../theme/theme";
4
4
 
@@ -1,4 +1,4 @@
1
- import { padding, type SelectItem, SelectList, truncateToWidth, visibleWidth } from '../../stubs/tui/index.ts'
1
+ import { padding, type SelectItem, SelectList, truncateToWidth, visibleWidth } from '#stubs/tui'
2
2
  import {
3
3
  enableAutoTheme,
4
4
  getAvailableThemes,
@@ -1,4 +1,4 @@
1
- import type { Component } from '../../stubs/tui/index.ts'
1
+ import type { Component } from '#stubs/tui'
2
2
  import type { InteractiveModeContext } from "../../types";
3
3
 
4
4
  export type SetupSceneResult = "done" | "skipped";
@@ -1,4 +1,4 @@
1
- import { type SelectItem, SelectList, truncateToWidth } from '../../stubs/tui/index.ts'
1
+ import { type SelectItem, SelectList, truncateToWidth } from '#stubs/tui'
2
2
  import { SETTINGS_SCHEMA } from "../../../config/settings-schema";
3
3
  import { getSearchProvider, setPreferredSearchProvider } from "../../../web/search/provider";
4
4
  import { isSearchProviderPreference, type SearchProviderId } from "../../../web/search/types";
@@ -1,4 +1,4 @@
1
- import { type Component, matchesKey, padding, truncateToWidth, visibleWidth } from '../../stubs/tui/index.ts'
1
+ import { type Component, matchesKey, padding, truncateToWidth, visibleWidth } from '#stubs/tui'
2
2
  import { APP_NAME } from "@oh-my-pi/pi-utils";
3
3
  import { gradientLogo, PI_LOGO } from "../components/welcome";
4
4
  import { theme } from "../theme/theme";
@@ -1,5 +1,5 @@
1
1
  import { stripVTControlCharacters } from "node:util";
2
- import type { TabBarTheme } from '../../stubs/tui/index.ts'
2
+ import type { TabBarTheme } from '#stubs/tui'
3
3
  import { theme } from "./theme/theme";
4
4
 
5
5
  // ═══════════════════════════════════════════════════════════════════════════
@@ -6,8 +6,8 @@ import { detectMacOSAppearance,
6
6
  MacAppearanceObserver,
7
7
  type HighlightColors as NativeHighlightColors,
8
8
  highlightCode as nativeHighlightCode,
9
- supportsLanguage as nativeSupportsLanguage, } from '../../stubs/natives/index.ts'
10
- import type { EditorTheme, MarkdownTheme, SelectListTheme, SymbolTheme } from '../../stubs/tui/index.ts'
9
+ supportsLanguage as nativeSupportsLanguage, } from '#stubs/natives'
10
+ import type { EditorTheme, MarkdownTheme, SelectListTheme, SymbolTheme } from '#stubs/tui'
11
11
  import { adjustHsv, colorLuma, getCustomThemesDir, isEnoent, logger, relativeLuminance } from "@oh-my-pi/pi-utils";
12
12
  import chalk from "chalk";
13
13
  import { LRUCache } from "lru-cache/raw";
@@ -2661,7 +2661,7 @@ export function getEditorTheme(): EditorTheme {
2661
2661
  };
2662
2662
  }
2663
2663
 
2664
- export function getSettingsListTheme(): import('./stubs/tui/index.ts').SettingsListTheme {
2664
+ export function getSettingsListTheme(): import('#stubs/tui').SettingsListTheme {
2665
2665
  return {
2666
2666
  label: (text: string, selected: boolean, changed: boolean) =>
2667
2667
  changed ? theme.fg("statusLineGitDirty", text) : selected ? theme.fg("accent", text) : text,
@@ -1,7 +1,7 @@
1
1
  import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
2
2
  import type { CompactionOutcome } from "@oh-my-pi/pi-agent-core/compaction";
3
3
  import type { AssistantMessage, ImageContent, Message, UsageReport } from "@oh-my-pi/pi-ai";
4
- import type { Component, Container, EditorTheme, Loader, Spacer, Text, TUI } from '../../stubs/tui/index.ts'
4
+ import type { Component, Container, EditorTheme, Loader, Spacer, Text, TUI } from '#stubs/tui'
5
5
  import type { KeybindingsManager } from "../config/keybindings";
6
6
  import type { Settings } from "../config/settings";
7
7
  import type {
@@ -1,7 +1,7 @@
1
1
  import type { CompactionSettings } from "@oh-my-pi/pi-agent-core/compaction";
2
2
  import { effectiveReserveTokens, estimateTokens, resolveThresholdTokens } from "@oh-my-pi/pi-agent-core/compaction";
3
3
  import type { Model } from "@oh-my-pi/pi-ai";
4
- import { countTokens } from '../../stubs/natives/index.ts'
4
+ import { countTokens } from '#stubs/natives'
5
5
  import { formatNumber } from "@oh-my-pi/pi-utils";
6
6
  import type { Skill } from "../../extensibility/skills";
7
7
  import type { AgentSession } from "../../session/agent-session";
@@ -1,4 +1,4 @@
1
- import { getKeybindings, matchesKey } from '../../stubs/tui/index.ts'
1
+ import { getKeybindings, matchesKey } from '#stubs/tui'
2
2
 
3
3
  /**
4
4
  * Match the coding-agent interrupt key.
@@ -1,6 +1,6 @@
1
1
  import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
2
2
  import type { AssistantMessage, ImageContent, Message } from "@oh-my-pi/pi-ai";
3
- import { type Component, Spacer, Text, TruncatedText } from '../../stubs/tui/index.ts'
3
+ import { type Component, Spacer, Text, TruncatedText } from '#stubs/tui'
4
4
  import { settings } from "../../config/settings";
5
5
  import { getFileSnapshotStore } from "../../edit/file-snapshot-store";
6
6
  import { AssistantMessageComponent } from "../../modes/components/assistant-message";
package/src/sdk.ts CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  prewarmOpenAICodexResponses,
21
21
  } from "@oh-my-pi/pi-ai/providers/openai-codex-responses";
22
22
  import { DEFAULT_MODEL_PER_PROVIDER } from "@oh-my-pi/pi-catalog/provider-models";
23
- import type { Component } from './stubs/tui/index.ts';
23
+ import type { Component } from '#stubs/tui';
24
24
  import {
25
25
  $env,
26
26
  $flag,
@@ -94,7 +94,7 @@ import {
94
94
  } from "@oh-my-pi/pi-ai";
95
95
  import { getSupportedEfforts } from "@oh-my-pi/pi-catalog/model-thinking";
96
96
  import { modelsAreEqual } from "@oh-my-pi/pi-catalog/models";
97
- import { countTokens, MacOSPowerAssertion } from '../../stubs/natives/index.ts'
97
+ import { countTokens, MacOSPowerAssertion } from '#stubs/natives'
98
98
  import {
99
99
  extractRetryHint,
100
100
  getAgentDbPath,
@@ -11,7 +11,7 @@ import type {
11
11
  TextContent,
12
12
  Usage,
13
13
  } from "@oh-my-pi/pi-ai";
14
- import { getTerminalId } from '../../stubs/tui/index.ts'
14
+ import { getTerminalId } from '#stubs/tui'
15
15
  import {
16
16
  getBlobsDir,
17
17
  getAgentDir as getDefaultAgentDir,
@@ -5,8 +5,8 @@
5
5
  * task execution in the terminal UI.
6
6
  */
7
7
  import path from "node:path";
8
- import type { Component } from '../../stubs/tui/index.ts'
9
- import { Container, Markdown, Text } from '../../stubs/tui/index.ts'
8
+ import type { Component } from '#stubs/tui'
9
+ import { Container, Markdown, Text } from '#stubs/tui'
10
10
  import { formatNumber } from "@oh-my-pi/pi-utils";
11
11
  import { settings } from "../config/settings";
12
12
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
@@ -6,7 +6,7 @@
6
6
  * - Trigger subprocess termination on completion
7
7
  * - Provide custom rendering for realtime/final display
8
8
  */
9
- import type { Component } from '../../stubs/tui/index.ts'
9
+ import type { Component } from '#stubs/tui'
10
10
  import type { Theme } from "../modes/theme/theme";
11
11
 
12
12
  /** Event from subprocess tool execution (parsed from JSONL) */
@@ -2,7 +2,7 @@ import type { Dirent } from "node:fs";
2
2
  import * as fs from "node:fs/promises";
3
3
  import * as os from "node:os";
4
4
  import * as path from "node:path";
5
- import * as natives from '../../stubs/natives/index.ts';
5
+ import * as natives from '#stubs/natives';
6
6
  import { getWorktreeDir, hashPath, logger, Snowflake } from "@oh-my-pi/pi-utils";
7
7
  import * as git from "../utils/git";
8
8
  import { mapWithConcurrencyLimit } from "./parallel";
package/src/tools/ask.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  */
17
17
 
18
18
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
19
- import { type Component, Markdown, type MarkdownTheme, renderInlineMarkdown, TERMINAL, Text } from '../../stubs/tui/index.ts'
19
+ import { type Component, Markdown, type MarkdownTheme, renderInlineMarkdown, TERMINAL, Text } from '#stubs/tui'
20
20
  import { prompt, untilAborted } from "@oh-my-pi/pi-utils";
21
21
  import * as z from "zod/v4";
22
22
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
@@ -1,9 +1,9 @@
1
1
  import * as path from "node:path";
2
2
  import { formatHashlineHeader } from "@oh-my-pi/hashline";
3
3
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
4
- import { type AstReplaceChange, type AstReplaceFileChange, astEdit } from '../../stubs/natives/index.ts'
5
- import type { Component } from '../../stubs/tui/index.ts'
6
- import { replaceTabs, Text } from '../../stubs/tui/index.ts'
4
+ import { type AstReplaceChange, type AstReplaceFileChange, astEdit } from '#stubs/natives'
5
+ import type { Component } from '#stubs/tui'
6
+ import { replaceTabs, Text } from '#stubs/tui'
7
7
  import { $envpos, prompt, untilAborted } from "@oh-my-pi/pi-utils";
8
8
  import * as z from "zod/v4";
9
9
  import { canonicalSnapshotKey, getFileSnapshotStore } from "../edit/file-snapshot-store";
@@ -1,9 +1,9 @@
1
1
  import * as path from "node:path";
2
2
  import { formatHashlineHeader } from "@oh-my-pi/hashline";
3
3
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
4
- import { type AstFindMatch, astGrep } from '../../stubs/natives/index.ts'
5
- import type { Component } from '../../stubs/tui/index.ts'
6
- import { Text } from '../../stubs/tui/index.ts'
4
+ import { type AstFindMatch, astGrep } from '#stubs/natives'
5
+ import type { Component } from '#stubs/tui'
6
+ import { Text } from '#stubs/tui'
7
7
  import { prompt, untilAborted } from "@oh-my-pi/pi-utils";
8
8
  import * as z from "zod/v4";
9
9
  import { recordFileSnapshot } from "../edit/file-snapshot-store";
@@ -19,7 +19,7 @@
19
19
  * `pi_shell::fixup`, driven by the real `brush-parser` AST. This module is a
20
20
  * thin sync wrapper plus user-facing notice formatting.
21
21
  */
22
- import { applyBashFixups as nativeApplyBashFixups } from '../../stubs/natives/index.ts'
22
+ import { applyBashFixups as nativeApplyBashFixups } from '#stubs/natives'
23
23
 
24
24
  export interface BashFixupResult {
25
25
  /** Possibly-rewritten command. */
@@ -1,5 +1,5 @@
1
1
  import type { AgentToolContext } from "@oh-my-pi/pi-agent-core";
2
- import { type PtyRunResult, PtySession } from '../../stubs/natives/index.ts'
2
+ import { type PtyRunResult, PtySession } from '#stubs/natives'
3
3
  import { type Component,
4
4
  extractPrintableText,
5
5
  matchesKey,
@@ -7,7 +7,7 @@ import { type Component,
7
7
  parseKey,
8
8
  parseKittySequence,
9
9
  truncateToWidth,
10
- visibleWidth, } from '../../stubs/tui/index.ts'
10
+ visibleWidth, } from '#stubs/tui'
11
11
  import { sanitizeText } from "@oh-my-pi/pi-utils";
12
12
  import type * as XtermModule from "@xterm/headless";
13
13
  import type { Terminal as XtermTerminalType } from "@xterm/headless";
package/src/tools/bash.ts CHANGED
@@ -6,8 +6,8 @@ import type {
6
6
  AgentToolUpdateCallback,
7
7
  ToolApprovalDecision,
8
8
  } from "@oh-my-pi/pi-agent-core";
9
- import type { Component } from '../../stubs/tui/index.ts'
10
- import { ImageProtocol, TERMINAL } from '../../stubs/tui/index.ts'
9
+ import type { Component } from '#stubs/tui'
10
+ import { ImageProtocol, TERMINAL } from '#stubs/tui'
11
11
  import { getProjectDir, isEnoent, logger, prompt } from "@oh-my-pi/pi-utils";
12
12
  import * as z from "zod/v4";
13
13
  import { type BashResult, executeBash } from "../exec/bash-executor";
@@ -1,5 +1,5 @@
1
1
  import * as net from "node:net";
2
- import { Process, ProcessStatus } from '../../stubs/natives/index.ts'
2
+ import { Process, ProcessStatus } from '#stubs/natives'
3
3
  import type { Browser, Page } from "puppeteer-core";
4
4
  import { ToolError, throwIfAborted } from "../tool-errors";
5
5
 
@@ -5,8 +5,8 @@
5
5
  * cell with status icon, optional output, and expand/collapse handling. `open`
6
6
  * and `close` actions render as compact status lines.
7
7
  */
8
- import type { Component } from '../../stubs/tui/index.ts'
9
- import { Text } from '../../stubs/tui/index.ts'
8
+ import type { Component } from '#stubs/tui'
9
+ import { Text } from '#stubs/tui'
10
10
  import type { RenderResultOptions } from "../../extensibility/custom-tools/types";
11
11
  import type { Theme } from "../../modes/theme/theme";
12
12
  import { Hasher, isFramedBlockComponent, markFramedBlockComponent, renderCodeCell, renderStatusLine } from "../../tui";
@@ -7,7 +7,7 @@ import type {
7
7
  RenderResultOptions,
8
8
  ToolApprovalDecision,
9
9
  } from "@oh-my-pi/pi-agent-core";
10
- import { type Component, Text } from '../../stubs/tui/index.ts'
10
+ import { type Component, Text } from '#stubs/tui'
11
11
  import { isEnoent, prompt } from "@oh-my-pi/pi-utils";
12
12
  import * as z from "zod/v4";
13
13
  import {
@@ -8,8 +8,8 @@
8
8
  * is still initializing, which previously crashed module load with a TDZ
9
9
  * `Cannot access 'evalToolRenderer' before initialization`.
10
10
  */
11
- import type { Component } from '../../stubs/tui/index.ts'
12
- import { Markdown, Text } from '../../stubs/tui/index.ts'
11
+ import type { Component } from '#stubs/tui'
12
+ import { Markdown, Text } from '#stubs/tui'
13
13
  import { formatNumber } from "@oh-my-pi/pi-utils";
14
14
  import { settings } from "../config/settings";
15
15
  import type { EvalCellResult, EvalLanguage, EvalStatusEvent, EvalToolDetails } from "../eval/types";
@@ -4,8 +4,8 @@ import * as os from "node:os";
4
4
  import * as path from "node:path";
5
5
  import type { AgentToolResult } from "@oh-my-pi/pi-agent-core";
6
6
  import type { FetchImpl, ImageContent, TextContent } from "@oh-my-pi/pi-ai";
7
- import { htmlToMarkdown } from '../../stubs/natives/index.ts'
8
- import { type Component, Text } from '../../stubs/tui/index.ts'
7
+ import { htmlToMarkdown } from '#stubs/natives'
8
+ import { type Component, Text } from '#stubs/tui'
9
9
  import { $which, ptree, truncate } from "@oh-my-pi/pi-utils";
10
10
  import { LRUCache } from "lru-cache/raw";
11
11
  import type { Settings } from "../config/settings";
package/src/tools/find.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as fs from "node:fs";
2
2
  import * as path from "node:path";
3
3
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
4
- import * as natives from '../../stubs/natives/index.ts';
5
- import type { Component } from '../../stubs/tui/index.ts'
6
- import { Text } from '../../stubs/tui/index.ts'
4
+ import * as natives from '#stubs/natives';
5
+ import type { Component } from '#stubs/tui'
6
+ import { Text } from '#stubs/tui'
7
7
  import { formatGroupedPaths, isEnoent, prompt, untilAborted } from "@oh-my-pi/pi-utils";
8
8
  import * as z from "zod/v4";
9
9
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
@@ -1,4 +1,4 @@
1
- import { invalidateFsScanCache } from '../../stubs/natives/index.ts'
1
+ import { invalidateFsScanCache } from '#stubs/natives'
2
2
 
3
3
  /**
4
4
  * Invalidate shared filesystem scan caches after a content write/update.
@@ -1,4 +1,4 @@
1
- import { type Component, padding, Text, visibleWidth } from '../../stubs/tui/index.ts'
1
+ import { type Component, padding, Text, visibleWidth } from '#stubs/tui'
2
2
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
3
3
  import type { Theme, ThemeColor } from "../modes/theme/theme";
4
4
  import { framedBlock, renderStatusLine } from "../tui";
@@ -1,5 +1,5 @@
1
- import type { Component } from '../../stubs/tui/index.ts'
2
- import { Text } from '../../stubs/tui/index.ts'
1
+ import type { Component } from '#stubs/tui'
2
+ import { Text } from '#stubs/tui'
3
3
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
4
4
  import type { Theme } from "../modes/theme/theme";
5
5
  import { framedBlock, renderStatusLine } from "../tui";
package/src/tools/irc.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  */
11
11
 
12
12
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
13
- import { type Component, Text } from '../../stubs/tui/index.ts'
13
+ import { type Component, Text } from '#stubs/tui'
14
14
  import { formatAge, formatDuration, prompt } from "@oh-my-pi/pi-utils";
15
15
  import * as z from "zod/v4";
16
16
  import type { Settings } from "../config/settings";
package/src/tools/job.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
2
- import type { Component } from '../../stubs/tui/index.ts'
3
- import { Text } from '../../stubs/tui/index.ts'
2
+ import type { Component } from '#stubs/tui'
3
+ import { Text } from '#stubs/tui'
4
4
  import { prompt } from "@oh-my-pi/pi-utils";
5
5
  import * as z from "zod/v4";
6
6
  import type { AsyncJob, AsyncJobManager } from "../async";
@@ -9,8 +9,8 @@
9
9
  * a status line with a couple of dim bullets reads far cleaner than boxing a
10
10
  * one-line memory note.
11
11
  */
12
- import type { Component } from '../../stubs/tui/index.ts'
13
- import { Text } from '../../stubs/tui/index.ts'
12
+ import type { Component } from '#stubs/tui'
13
+ import { Text } from '#stubs/tui'
14
14
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
15
15
  import type { Theme } from "../modes/theme/theme";
16
16
  import { Ellipsis, renderStatusLine, truncateToWidth } from "../tui";
package/src/tools/read.ts CHANGED
@@ -4,9 +4,9 @@ import * as path from "node:path";
4
4
  import { formatHashlineHeader, formatNumberedLine, formatNumberedLines } from "@oh-my-pi/hashline";
5
5
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
6
6
  import type { ImageContent, TextContent } from "@oh-my-pi/pi-ai";
7
- import { glob, type SummaryResult, summarizeCode } from '../../stubs/natives/index.ts'
8
- import type { Component } from '../../stubs/tui/index.ts'
9
- import { Text } from '../../stubs/tui/index.ts'
7
+ import { glob, type SummaryResult, summarizeCode } from '#stubs/natives'
8
+ import type { Component } from '#stubs/tui'
9
+ import { Text } from '#stubs/tui'
10
10
  import { getRemoteDir, logger, prompt, readImageMetadata, untilAborted } from "@oh-my-pi/pi-utils";
11
11
  import * as z from "zod/v4";
12
12
  import {
@@ -8,9 +8,9 @@
8
8
  import * as os from "node:os";
9
9
  import * as path from "node:path";
10
10
  import type { ToolCallContext } from "@oh-my-pi/pi-agent-core";
11
- import type { Ellipsis } from '../../stubs/natives/index.ts'
12
- import type { Component } from '../../stubs/tui/index.ts'
13
- import { getKeybindings, replaceTabs, truncateToWidth } from '../../stubs/tui/index.ts'
11
+ import type { Ellipsis } from '#stubs/natives'
12
+ import type { Component } from '#stubs/tui'
13
+ import { getKeybindings, replaceTabs, truncateToWidth } from '#stubs/tui'
14
14
  import { pluralize } from "@oh-my-pi/pi-utils";
15
15
  import { formatKeyHints, type KeyId } from "../config/keybindings";
16
16
  import { settings } from "../config/settings";
@@ -18,8 +18,8 @@ import type { Theme } from "../modes/theme/theme";
18
18
  import { Hasher } from "../tui/utils";
19
19
  import { formatDimensionNote, type ResizedImage } from "../utils/image-resize";
20
20
 
21
- export { Ellipsis } from '../../stubs/natives/index.ts';
22
- export { replaceTabs, truncateToWidth, wrapTextWithAnsi } from '../../stubs/tui/index.ts';
21
+ export { Ellipsis } from '#stubs/natives';
22
+ export { replaceTabs, truncateToWidth, wrapTextWithAnsi } from '#stubs/tui';
23
23
 
24
24
  // =============================================================================
25
25
  // Standardized Display Constants
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * These provide rich visualization for tool calls and results in the TUI.
5
5
  */
6
- import type { Component } from '../../stubs/tui/index.ts'
6
+ import type { Component } from '#stubs/tui'
7
7
  import { editToolRenderer } from "../edit/renderer";
8
8
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
9
9
  import { goalToolRenderer } from "../goals/tools/goal-tool";
@@ -1,6 +1,6 @@
1
1
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
2
- import type { Component } from '../../stubs/tui/index.ts'
3
- import { Text } from '../../stubs/tui/index.ts'
2
+ import type { Component } from '#stubs/tui'
3
+ import { Text } from '#stubs/tui'
4
4
  import { prompt, untilAborted } from "@oh-my-pi/pi-utils";
5
5
  import * as z from "zod/v4";
6
6
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
@@ -9,8 +9,8 @@
9
9
 
10
10
  import path from "node:path";
11
11
  import type { AgentTool } from "@oh-my-pi/pi-agent-core";
12
- import type { Component } from '../../stubs/tui/index.ts'
13
- import { Container, Text } from '../../stubs/tui/index.ts'
12
+ import type { Component } from '#stubs/tui'
13
+ import { Container, Text } from '#stubs/tui'
14
14
  import { isRecord } from "@oh-my-pi/pi-utils";
15
15
  import * as z from "zod/v4";
16
16
  import type { Theme, ThemeColor } from "../modes/theme/theme";
@@ -1,6 +1,6 @@
1
1
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
2
- import type { Component } from '../../stubs/tui/index.ts'
3
- import { Text } from '../../stubs/tui/index.ts'
2
+ import type { Component } from '#stubs/tui'
3
+ import { Text } from '#stubs/tui'
4
4
  import { 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";
@@ -3,9 +3,9 @@ import { tmpdir } from "node:os";
3
3
  import * as path from "node:path";
4
4
  import { formatHashlineHeader } from "@oh-my-pi/hashline";
5
5
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
6
- import { type GrepMatch, GrepOutputMode, type GrepResult, grep } from '../../stubs/natives/index.ts'
7
- import type { Component } from '../../stubs/tui/index.ts'
8
- import { Text } from '../../stubs/tui/index.ts'
6
+ import { type GrepMatch, GrepOutputMode, type GrepResult, grep } from '#stubs/natives'
7
+ import type { Component } from '#stubs/tui'
8
+ import { Text } from '#stubs/tui'
9
9
  import { prompt, untilAborted } from "@oh-my-pi/pi-utils";
10
10
  import * as z from "zod/v4";
11
11
  import { recordFileSnapshot } from "../edit/file-snapshot-store";
package/src/tools/ssh.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
2
- import type { Component } from '../../stubs/tui/index.ts'
2
+ import type { Component } from '#stubs/tui'
3
3
  import { prompt } from "@oh-my-pi/pi-utils";
4
4
  import * as z from "zod/v4";
5
5
  import type { SSHHost } from "../capability/ssh";
package/src/tools/todo.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
2
- import type { Component } from '../../stubs/tui/index.ts'
3
- import { Text } from '../../stubs/tui/index.ts'
2
+ import type { Component } from '#stubs/tui'
3
+ import { Text } from '#stubs/tui'
4
4
  import { prompt } from "@oh-my-pi/pi-utils";
5
5
  import chalk from "chalk";
6
6
  import * as z from "zod/v4";
@@ -4,7 +4,7 @@ import * as path from "node:path";
4
4
 
5
5
  import { formatHashlineHeader, stripHashlinePrefixes } from "@oh-my-pi/hashline";
6
6
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
7
- import type { Component } from '../../stubs/tui/index.ts'
7
+ import type { Component } from '#stubs/tui'
8
8
  import { isEnoent, isRecord, prompt, untilAborted } from "@oh-my-pi/pi-utils";
9
9
  import * as z from "zod/v4";
10
10
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Render a code or markdown cell with optional output section.
3
3
  */
4
- import { Markdown } from '../../stubs/tui/index.ts'
4
+ import { Markdown } from '#stubs/tui'
5
5
  import { getMarkdownTheme, highlightCode, type Theme } from "../modes/theme/theme";
6
6
  import {
7
7
  formatDuration,
@@ -6,7 +6,7 @@
6
6
  * permits it. Falls back to plain text when disabled.
7
7
  */
8
8
  import * as url from "node:url";
9
- import { TERMINAL } from '../../stubs/tui/index.ts'
9
+ import { TERMINAL } from '#stubs/tui'
10
10
  import { settings } from "../config/settings";
11
11
  import {
12
12
  LocalProtocolHandler,
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Bordered output container with optional header and sections.
3
3
  */
4
- import type { Component } from '../../stubs/tui/index.ts'
5
- import { ImageProtocol, padding, TERMINAL, visibleWidth, wrapTextWithAnsi } from '../../stubs/tui/index.ts'
4
+ import type { Component } from '#stubs/tui'
5
+ import { ImageProtocol, padding, TERMINAL, visibleWidth, wrapTextWithAnsi } from '#stubs/tui'
6
6
  import type { Theme, ThemeColor } from "../modes/theme/theme";
7
7
  import { getSixelLineMask } from "../utils/sixel";
8
8
  import type { State } from "./types";
@@ -2,7 +2,7 @@
2
2
  * Hierarchical tree list rendering helper.
3
3
  */
4
4
 
5
- import { replaceTabs } from '../../stubs/tui/index.ts'
5
+ import { replaceTabs } from '#stubs/tui'
6
6
  import type { Theme } from "../modes/theme/theme";
7
7
  import { formatMoreItems } from "../tools/render-utils";
8
8
  import type { TreeContext } from "./types";
package/src/tui/utils.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Shared helpers for tool-rendered UI components.
3
3
  */
4
- import { padding, visibleWidth } from '../../stubs/tui/index.ts'
4
+ import { padding, visibleWidth } from '#stubs/tui'
5
5
  import type { Theme, ThemeBg } from "../modes/theme/theme";
6
6
  import type { State } from "./types";
7
7
 
8
- export { Ellipsis, truncateToWidth } from '../../stubs/tui/index.ts';
8
+ export { Ellipsis, truncateToWidth } from '#stubs/tui';
9
9
 
10
10
  /** Cached typed-array scratch space for hashing non-string primitives. */
11
11
  const hashBuf = new ArrayBuffer(8);
@@ -1,4 +1,4 @@
1
- import { enclosingBlockBoundaries } from '../../stubs/natives/index.ts'
1
+ import { enclosingBlockBoundaries } from '#stubs/natives'
2
2
  import { logger } from "@oh-my-pi/pi-utils";
3
3
 
4
4
  const OPEN_TO_CLOSE: Record<string, string> = {
@@ -1,6 +1,6 @@
1
1
  import { execSync } from "node:child_process";
2
- import type { ClipboardImage } from '../../stubs/natives/index.ts'
3
- import * as native from '../../stubs/natives/index.ts';
2
+ import type { ClipboardImage } from '#stubs/natives'
3
+ import * as native from '#stubs/natives';
4
4
  import { logger } from "@oh-my-pi/pi-utils";
5
5
 
6
6
  function hasDisplay(): boolean {
@@ -4,8 +4,8 @@
4
4
  * Tree-based rendering with collapsed/expanded states for web search results.
5
5
  */
6
6
 
7
- import type { Component } from '../../stubs/tui/index.ts'
8
- import { Markdown, Text } from '../../stubs/tui/index.ts'
7
+ import type { Component } from '#stubs/tui'
8
+ import { Markdown, Text } from '#stubs/tui'
9
9
  import type { RenderResultOptions } from "../../extensibility/custom-tools/types";
10
10
  import { getMarkdownTheme, type Theme } from "../../modes/theme/theme";
11
11
  import {