@oh-my-pi/pi-coding-agent 8.0.2 → 8.0.4

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 (216) hide show
  1. package/package.json +7 -3
  2. package/src/cli/args.ts +2 -2
  3. package/src/cli/config-cli.ts +4 -4
  4. package/src/cli/file-processor.ts +3 -3
  5. package/src/cli/list-models.ts +2 -2
  6. package/src/cli/plugin-cli.ts +7 -3
  7. package/src/cli/session-picker.ts +2 -2
  8. package/src/cli/setup-cli.ts +2 -2
  9. package/src/cli/stats-cli.ts +1 -1
  10. package/src/cli/update-cli.ts +2 -2
  11. package/src/config/keybindings.ts +1 -1
  12. package/src/config/model-registry.ts +1 -1
  13. package/src/config/model-resolver.ts +1 -1
  14. package/src/config/prompt-templates.ts +2 -2
  15. package/src/config/settings-manager.ts +5 -5
  16. package/src/cursor.ts +1 -1
  17. package/src/discovery/agents-md.ts +4 -4
  18. package/src/discovery/builtin.ts +21 -17
  19. package/src/discovery/claude.ts +12 -12
  20. package/src/discovery/cline.ts +6 -6
  21. package/src/discovery/codex.ts +21 -21
  22. package/src/discovery/cursor.ts +9 -9
  23. package/src/discovery/gemini.ts +13 -9
  24. package/src/discovery/github.ts +6 -6
  25. package/src/discovery/helpers.ts +4 -4
  26. package/src/discovery/index.ts +16 -16
  27. package/src/discovery/mcp-json.ts +4 -4
  28. package/src/discovery/ssh.ts +4 -4
  29. package/src/discovery/vscode.ts +4 -4
  30. package/src/discovery/windsurf.ts +6 -6
  31. package/src/exa/company.ts +1 -1
  32. package/src/exa/index.ts +2 -2
  33. package/src/exa/linkedin.ts +1 -1
  34. package/src/exa/mcp-client.ts +2 -2
  35. package/src/exa/render.ts +6 -6
  36. package/src/exa/researcher.ts +1 -1
  37. package/src/exa/search.ts +1 -1
  38. package/src/exa/websets.ts +1 -1
  39. package/src/exec/bash-executor.ts +3 -3
  40. package/src/export/custom-share.ts +1 -1
  41. package/src/export/html/index.ts +3 -3
  42. package/src/export/ttsr.ts +2 -2
  43. package/src/extensibility/custom-commands/bundled/review/index.ts +4 -4
  44. package/src/extensibility/custom-commands/loader.ts +3 -3
  45. package/src/extensibility/custom-commands/types.ts +1 -1
  46. package/src/extensibility/custom-tools/loader.ts +9 -9
  47. package/src/extensibility/custom-tools/types.ts +6 -6
  48. package/src/extensibility/custom-tools/wrapper.ts +1 -1
  49. package/src/extensibility/extensions/loader.ts +8 -8
  50. package/src/extensibility/extensions/runner.ts +3 -3
  51. package/src/extensibility/extensions/types.ts +23 -17
  52. package/src/extensibility/extensions/wrapper.ts +1 -1
  53. package/src/extensibility/hooks/index.ts +1 -1
  54. package/src/extensibility/hooks/loader.ts +7 -7
  55. package/src/extensibility/hooks/runner.ts +4 -4
  56. package/src/extensibility/hooks/types.ts +16 -10
  57. package/src/extensibility/plugins/doctor.ts +1 -1
  58. package/src/extensibility/plugins/installer.ts +1 -1
  59. package/src/extensibility/plugins/paths.ts +1 -1
  60. package/src/extensibility/skills.ts +9 -6
  61. package/src/extensibility/slash-commands.ts +6 -6
  62. package/src/index.ts +7 -7
  63. package/src/internal-urls/rule-protocol.ts +1 -1
  64. package/src/internal-urls/skill-protocol.ts +1 -1
  65. package/src/ipy/executor.ts +3 -3
  66. package/src/ipy/gateway-coordinator.ts +3 -3
  67. package/src/ipy/kernel.ts +3 -3
  68. package/src/lsp/client.ts +1 -1
  69. package/src/lsp/clients/biome-client.ts +1 -1
  70. package/src/lsp/clients/index.ts +1 -1
  71. package/src/lsp/clients/lsp-linter-client.ts +4 -4
  72. package/src/lsp/config.ts +1 -1
  73. package/src/lsp/index.ts +6 -6
  74. package/src/lsp/render.ts +7 -2
  75. package/src/lsp/utils.ts +1 -1
  76. package/src/main.ts +1 -1
  77. package/src/mcp/config.ts +3 -3
  78. package/src/mcp/loader.ts +2 -2
  79. package/src/mcp/manager.ts +1 -1
  80. package/src/mcp/tool-bridge.ts +6 -2
  81. package/src/mcp/tool-cache.ts +1 -1
  82. package/src/mcp/transports/http.ts +1 -1
  83. package/src/mcp/transports/stdio.ts +1 -1
  84. package/src/migrations.ts +2 -2
  85. package/src/modes/components/armin.ts +1 -1
  86. package/src/modes/components/assistant-message.ts +1 -1
  87. package/src/modes/components/bash-execution.ts +3 -3
  88. package/src/modes/components/bordered-loader.ts +1 -1
  89. package/src/modes/components/branch-summary-message.ts +2 -2
  90. package/src/modes/components/compaction-summary-message.ts +2 -2
  91. package/src/modes/components/custom-message.ts +3 -3
  92. package/src/modes/components/diff.ts +1 -1
  93. package/src/modes/components/dynamic-border.ts +1 -1
  94. package/src/modes/components/extensions/extension-dashboard.ts +3 -3
  95. package/src/modes/components/extensions/extension-list.ts +2 -2
  96. package/src/modes/components/extensions/inspector-panel.ts +1 -1
  97. package/src/modes/components/extensions/state-manager.ts +17 -11
  98. package/src/modes/components/extensions/types.ts +1 -1
  99. package/src/modes/components/footer.ts +3 -3
  100. package/src/modes/components/history-search.ts +2 -2
  101. package/src/modes/components/hook-editor.ts +1 -1
  102. package/src/modes/components/hook-input.ts +1 -1
  103. package/src/modes/components/hook-message.ts +3 -3
  104. package/src/modes/components/hook-selector.ts +1 -1
  105. package/src/modes/components/keybinding-hints.ts +2 -2
  106. package/src/modes/components/login-dialog.ts +1 -1
  107. package/src/modes/components/model-selector.ts +5 -5
  108. package/src/modes/components/oauth-selector.ts +2 -2
  109. package/src/modes/components/plugin-settings.ts +3 -3
  110. package/src/modes/components/python-execution.ts +3 -3
  111. package/src/modes/components/queue-mode-selector.ts +1 -1
  112. package/src/modes/components/read-tool-group.ts +2 -2
  113. package/src/modes/components/session-selector.ts +3 -3
  114. package/src/modes/components/settings-defs.ts +2 -2
  115. package/src/modes/components/settings-selector.ts +2 -2
  116. package/src/modes/components/show-images-selector.ts +1 -1
  117. package/src/modes/components/status-line/segments.ts +2 -2
  118. package/src/modes/components/status-line/separators.ts +1 -1
  119. package/src/modes/components/status-line/types.ts +2 -2
  120. package/src/modes/components/status-line-segment-editor.ts +2 -2
  121. package/src/modes/components/status-line.ts +3 -3
  122. package/src/modes/components/theme-selector.ts +1 -1
  123. package/src/modes/components/thinking-selector.ts +1 -1
  124. package/src/modes/components/todo-display.ts +2 -2
  125. package/src/modes/components/todo-reminder.ts +2 -2
  126. package/src/modes/components/tool-execution.ts +11 -6
  127. package/src/modes/components/tree-selector.ts +3 -3
  128. package/src/modes/components/ttsr-notification.ts +2 -2
  129. package/src/modes/components/user-message-selector.ts +1 -1
  130. package/src/modes/components/user-message.ts +1 -1
  131. package/src/modes/components/welcome.ts +2 -2
  132. package/src/modes/controllers/command-controller.ts +15 -15
  133. package/src/modes/controllers/event-controller.ts +13 -9
  134. package/src/modes/controllers/extension-ui-controller.ts +17 -11
  135. package/src/modes/controllers/input-controller.ts +6 -6
  136. package/src/modes/controllers/selector-controller.ts +22 -16
  137. package/src/modes/interactive-mode.ts +12 -12
  138. package/src/modes/print-mode.ts +1 -1
  139. package/src/modes/rpc/rpc-client.ts +3 -3
  140. package/src/modes/rpc/rpc-mode.ts +6 -3
  141. package/src/modes/rpc/rpc-types.ts +3 -3
  142. package/src/modes/theme/theme.ts +1 -1
  143. package/src/modes/types.ts +8 -8
  144. package/src/modes/utils/ui-helpers.ts +14 -14
  145. package/src/patch/applicator.ts +1 -1
  146. package/src/patch/diff.ts +1 -1
  147. package/src/patch/index.ts +8 -8
  148. package/src/patch/shared.ts +9 -9
  149. package/src/sdk.ts +19 -16
  150. package/src/session/agent-session.ts +27 -27
  151. package/src/session/agent-storage.ts +2 -2
  152. package/src/session/auth-storage.ts +1 -1
  153. package/src/session/compaction/branch-summarization.ts +7 -5
  154. package/src/session/compaction/compaction.ts +16 -6
  155. package/src/session/compaction/utils.ts +5 -3
  156. package/src/session/history-storage.ts +1 -1
  157. package/src/session/messages.ts +2 -2
  158. package/src/session/session-manager.ts +2 -2
  159. package/src/session/storage-migration.ts +2 -2
  160. package/src/session/streaming-output.ts +1 -1
  161. package/src/ssh/connection-manager.ts +1 -1
  162. package/src/ssh/ssh-executor.ts +1 -1
  163. package/src/ssh/sshfs-mount.ts +1 -1
  164. package/src/system-prompt.ts +14 -8
  165. package/src/task/agents.ts +8 -8
  166. package/src/task/commands.ts +5 -5
  167. package/src/task/discovery.ts +3 -3
  168. package/src/task/executor.ts +11 -11
  169. package/src/task/index.ts +4 -4
  170. package/src/task/render.ts +6 -6
  171. package/src/task/subprocess-tool-registry.ts +1 -1
  172. package/src/task/worker-protocol.ts +3 -3
  173. package/src/task/worker.ts +18 -13
  174. package/src/tools/ask.ts +4 -4
  175. package/src/tools/bash-interceptor.ts +4 -1
  176. package/src/tools/bash.ts +8 -8
  177. package/src/tools/calculator.ts +4 -4
  178. package/src/tools/complete.ts +1 -1
  179. package/src/tools/context.ts +2 -2
  180. package/src/tools/fetch.ts +11 -11
  181. package/src/tools/find.ts +7 -7
  182. package/src/tools/gemini-image.ts +6 -6
  183. package/src/tools/grep.ts +8 -8
  184. package/src/tools/index.ts +19 -19
  185. package/src/tools/list-limit.ts +1 -1
  186. package/src/tools/ls.ts +4 -4
  187. package/src/tools/notebook.ts +3 -3
  188. package/src/tools/output-meta.ts +3 -3
  189. package/src/tools/output-utils.ts +1 -1
  190. package/src/tools/python.ts +10 -10
  191. package/src/tools/read.ts +11 -11
  192. package/src/tools/render-utils.ts +1 -1
  193. package/src/tools/renderers.ts +6 -6
  194. package/src/tools/review.ts +2 -2
  195. package/src/tools/ssh.ts +12 -12
  196. package/src/tools/todo-write.ts +5 -5
  197. package/src/tools/tool-result.ts +3 -3
  198. package/src/tools/write.ts +11 -11
  199. package/src/utils/changelog.ts +1 -1
  200. package/src/utils/file-mentions.ts +9 -4
  201. package/src/utils/image-convert.ts +1 -1
  202. package/src/utils/image-resize.ts +1 -1
  203. package/src/utils/shell.ts +1 -1
  204. package/src/utils/title-generator.ts +4 -4
  205. package/src/utils/tools-manager.ts +1 -1
  206. package/src/web/scrapers/choosealicense.ts +1 -1
  207. package/src/web/scrapers/twitter.ts +1 -1
  208. package/src/web/scrapers/types.ts +1 -1
  209. package/src/web/scrapers/utils.ts +1 -1
  210. package/src/web/scrapers/youtube.ts +2 -2
  211. package/src/web/search/auth.ts +8 -4
  212. package/src/web/search/index.ts +19 -10
  213. package/src/web/search/providers/anthropic.ts +8 -3
  214. package/src/web/search/providers/exa.ts +2 -2
  215. package/src/web/search/providers/perplexity.ts +2 -2
  216. package/src/web/search/render.ts +5 -5
@@ -2,16 +2,16 @@ import { randomUUID } from "node:crypto";
2
2
  import path from "node:path";
3
3
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
4
4
  import { StringEnum } from "@oh-my-pi/pi-ai";
5
+ import { renderPromptTemplate } from "@oh-my-pi/pi-coding-agent/config/prompt-templates";
6
+ import type { RenderResultOptions } from "@oh-my-pi/pi-coding-agent/extensibility/custom-tools/types";
7
+ import type { Theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
8
+ import todoWriteDescription from "@oh-my-pi/pi-coding-agent/prompts/tools/todo-write.md" with { type: "text" };
9
+ import type { ToolSession } from "@oh-my-pi/pi-coding-agent/sdk";
5
10
  import type { Component } from "@oh-my-pi/pi-tui";
6
11
  import { Text } from "@oh-my-pi/pi-tui";
7
12
  import { logger } from "@oh-my-pi/pi-utils";
8
13
  import { Type } from "@sinclair/typebox";
9
14
  import chalk from "chalk";
10
- import { renderPromptTemplate } from "$c/config/prompt-templates";
11
- import type { RenderResultOptions } from "$c/extensibility/custom-tools/types";
12
- import type { Theme } from "$c/modes/theme/theme";
13
- import todoWriteDescription from "$c/prompts/tools/todo-write.md" with { type: "text" };
14
- import type { ToolSession } from "$c/sdk";
15
15
 
16
16
  const todoWriteSchema = Type.Object({
17
17
  todos: Type.Array(
@@ -1,13 +1,13 @@
1
1
  import type { AgentToolResult } from "@oh-my-pi/pi-agent-core";
2
2
  import type { ImageContent, TextContent } from "@oh-my-pi/pi-ai";
3
- import type { OutputSummary } from "$c/session/streaming-output";
3
+ import type { OutputSummary } from "@oh-my-pi/pi-coding-agent/session/streaming-output";
4
4
  import type {
5
5
  OutputMeta,
6
6
  TruncationOptions,
7
7
  TruncationSummaryOptions,
8
8
  TruncationTextOptions,
9
- } from "$c/tools/output-meta";
10
- import { outputMeta } from "$c/tools/output-meta";
9
+ } from "@oh-my-pi/pi-coding-agent/tools/output-meta";
10
+ import { outputMeta } from "@oh-my-pi/pi-coding-agent/tools/output-meta";
11
11
  import type { TruncationResult } from "./truncate";
12
12
 
13
13
  type ToolContent = Array<TextContent | ImageContent>;
@@ -5,22 +5,22 @@ import type {
5
5
  AgentToolUpdateCallback,
6
6
  ToolCallContext,
7
7
  } from "@oh-my-pi/pi-agent-core";
8
- import type { Component } from "@oh-my-pi/pi-tui";
9
- import { Text } from "@oh-my-pi/pi-tui";
10
- import { untilAborted } from "@oh-my-pi/pi-utils";
11
- import { Type } from "@sinclair/typebox";
12
- import { renderPromptTemplate } from "$c/config/prompt-templates";
13
- import type { RenderResultOptions } from "$c/extensibility/custom-tools/types";
8
+ import { renderPromptTemplate } from "@oh-my-pi/pi-coding-agent/config/prompt-templates";
9
+ import type { RenderResultOptions } from "@oh-my-pi/pi-coding-agent/extensibility/custom-tools/types";
14
10
  import {
15
11
  createLspWritethrough,
16
12
  type FileDiagnosticsResult,
17
13
  type WritethroughCallback,
18
14
  writethroughNoop,
19
- } from "$c/lsp/index";
20
- import { getLanguageFromPath, highlightCode, type Theme } from "$c/modes/theme/theme";
21
- import writeDescription from "$c/prompts/tools/write.md" with { type: "text" };
22
- import type { ToolSession } from "$c/sdk";
23
- import { type OutputMeta, outputMeta } from "$c/tools/output-meta";
15
+ } from "@oh-my-pi/pi-coding-agent/lsp/index";
16
+ import { getLanguageFromPath, highlightCode, type Theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
17
+ import writeDescription from "@oh-my-pi/pi-coding-agent/prompts/tools/write.md" with { type: "text" };
18
+ import type { ToolSession } from "@oh-my-pi/pi-coding-agent/sdk";
19
+ import { type OutputMeta, outputMeta } from "@oh-my-pi/pi-coding-agent/tools/output-meta";
20
+ import type { Component } from "@oh-my-pi/pi-tui";
21
+ import { Text } from "@oh-my-pi/pi-tui";
22
+ import { untilAborted } from "@oh-my-pi/pi-utils";
23
+ import { Type } from "@sinclair/typebox";
24
24
  import { resolveToCwd } from "./path-utils";
25
25
  import { formatDiagnostics, formatExpandHint, formatStatusIcon, replaceTabs, shortenPath } from "./render-utils";
26
26
  import type { RenderCallOptions } from "./renderers";
@@ -96,4 +96,4 @@ export function getNewEntries(entries: ChangelogEntry[], lastVersion: string): C
96
96
  }
97
97
 
98
98
  // Re-export getChangelogPath from paths.ts for convenience
99
- export { getChangelogPath } from "$c/config";
99
+ export { getChangelogPath } from "@oh-my-pi/pi-coding-agent/config";
@@ -8,10 +8,15 @@
8
8
 
9
9
  import path from "node:path";
10
10
  import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
11
- import type { FileMentionMessage } from "$c/session/messages";
12
- import { resolveReadPath } from "$c/tools/path-utils";
13
- import { formatAge } from "$c/tools/render-utils";
14
- import { DEFAULT_MAX_BYTES, formatSize, truncateHead, truncateStringToBytesFromStart } from "$c/tools/truncate";
11
+ import type { FileMentionMessage } from "@oh-my-pi/pi-coding-agent/session/messages";
12
+ import { resolveReadPath } from "@oh-my-pi/pi-coding-agent/tools/path-utils";
13
+ import { formatAge } from "@oh-my-pi/pi-coding-agent/tools/render-utils";
14
+ import {
15
+ DEFAULT_MAX_BYTES,
16
+ formatSize,
17
+ truncateHead,
18
+ truncateStringToBytesFromStart,
19
+ } from "@oh-my-pi/pi-coding-agent/tools/truncate";
15
20
 
16
21
  /** Regex to match @filepath patterns in text */
17
22
  const FILE_MENTION_REGEX = /@([^\s@]+)/g;
@@ -1,4 +1,4 @@
1
- import * as photon from "$c/vendor/photon";
1
+ import * as photon from "@oh-my-pi/pi-coding-agent/vendor/photon";
2
2
 
3
3
  /**
4
4
  * Convert image to PNG format for terminal display.
@@ -1,5 +1,5 @@
1
1
  import type { ImageContent } from "@oh-my-pi/pi-ai";
2
- import * as photon from "$c/vendor/photon";
2
+ import * as photon from "@oh-my-pi/pi-coding-agent/vendor/photon";
3
3
 
4
4
  export interface ImageResizeOptions {
5
5
  maxWidth?: number; // Default: 2000
@@ -1,7 +1,7 @@
1
1
  import { constants } from "node:fs";
2
2
  import { access } from "node:fs/promises";
3
+ import { SettingsManager } from "@oh-my-pi/pi-coding-agent/config/settings-manager";
3
4
  import { $ } from "bun";
4
- import { SettingsManager } from "$c/config/settings-manager";
5
5
 
6
6
  export interface ShellConfig {
7
7
  shell: string;
@@ -4,11 +4,11 @@
4
4
 
5
5
  import type { Api, Model } from "@oh-my-pi/pi-ai";
6
6
  import { completeSimple } from "@oh-my-pi/pi-ai";
7
+ import type { ModelRegistry } from "@oh-my-pi/pi-coding-agent/config/model-registry";
8
+ import { parseModelString, SMOL_MODEL_PRIORITY } from "@oh-my-pi/pi-coding-agent/config/model-resolver";
9
+ import { renderPromptTemplate } from "@oh-my-pi/pi-coding-agent/config/prompt-templates";
10
+ import titleSystemPrompt from "@oh-my-pi/pi-coding-agent/prompts/system/title-system.md" with { type: "text" };
7
11
  import { logger } from "@oh-my-pi/pi-utils";
8
- import type { ModelRegistry } from "$c/config/model-registry";
9
- import { parseModelString, SMOL_MODEL_PRIORITY } from "$c/config/model-resolver";
10
- import { renderPromptTemplate } from "$c/config/prompt-templates";
11
- import titleSystemPrompt from "$c/prompts/system/title-system.md" with { type: "text" };
12
12
 
13
13
  const TITLE_SYSTEM_PROMPT = renderPromptTemplate(titleSystemPrompt);
14
14
 
@@ -1,9 +1,9 @@
1
1
  import { chmod, mkdir, rename, rm } from "node:fs/promises";
2
2
  import { arch, platform } from "node:os";
3
3
  import { join } from "node:path";
4
+ import { APP_NAME, getBinDir } from "@oh-my-pi/pi-coding-agent/config";
4
5
  import { createTempDir, logger } from "@oh-my-pi/pi-utils";
5
6
  import { $ } from "bun";
6
- import { APP_NAME, getBinDir } from "$c/config";
7
7
 
8
8
  const TOOLS_DIR = getBinDir();
9
9
 
@@ -1,4 +1,4 @@
1
- import { parseFrontmatter } from "$c/utils/frontmatter";
1
+ import { parseFrontmatter } from "@oh-my-pi/pi-coding-agent/utils/frontmatter";
2
2
  import type { RenderResult, SpecialHandler } from "./types";
3
3
  import { finalizeOutput, loadPage } from "./types";
4
4
 
@@ -1,5 +1,5 @@
1
+ import { ToolAbortError } from "@oh-my-pi/pi-coding-agent/tools/tool-errors";
1
2
  import { parse as parseHtml } from "node-html-parser";
2
- import { ToolAbortError } from "$c/tools/tool-errors";
3
3
  import type { RenderResult, SpecialHandler } from "./types";
4
4
  import { finalizeOutput, loadPage } from "./types";
5
5
 
@@ -2,7 +2,7 @@
2
2
  * Shared types and utilities for web-fetch handlers
3
3
  */
4
4
 
5
- import { ToolAbortError } from "$c/tools/tool-errors";
5
+ import { ToolAbortError } from "@oh-my-pi/pi-coding-agent/tools/tool-errors";
6
6
 
7
7
  export interface RenderResult {
8
8
  url: string;
@@ -1,9 +1,9 @@
1
1
  import { rm } from "node:fs/promises";
2
2
  import { tmpdir } from "node:os";
3
3
  import * as path from "node:path";
4
+ import { ensureTool } from "@oh-my-pi/pi-coding-agent/utils/tools-manager";
4
5
  import { ptree } from "@oh-my-pi/pi-utils";
5
6
  import { nanoid } from "nanoid";
6
- import { ensureTool } from "$c/utils/tools-manager";
7
7
  import { createRequestSignal } from "./types";
8
8
 
9
9
  const MAX_BYTES = 50 * 1024 * 1024; // 50MB for binary files
@@ -1,10 +1,10 @@
1
1
  import { unlinkSync } from "node:fs";
2
2
  import { tmpdir } from "node:os";
3
3
  import path from "node:path";
4
+ import { throwIfAborted } from "@oh-my-pi/pi-coding-agent/tools/tool-errors";
5
+ import { ensureTool } from "@oh-my-pi/pi-coding-agent/utils/tools-manager";
4
6
  import { cspawn } from "@oh-my-pi/pi-utils";
5
7
  import { nanoid } from "nanoid";
6
- import { throwIfAborted } from "$c/tools/tool-errors";
7
- import { ensureTool } from "$c/utils/tools-manager";
8
8
  import type { RenderResult, SpecialHandler } from "./types";
9
9
  import { finalizeOutput } from "./types";
10
10
 
@@ -11,11 +11,15 @@
11
11
  import * as os from "node:os";
12
12
  import * as path from "node:path";
13
13
  import { buildAnthropicHeaders as buildProviderAnthropicHeaders } from "@oh-my-pi/pi-ai";
14
+ import { getAgentDbPath, getConfigDirPaths } from "@oh-my-pi/pi-coding-agent/config";
15
+ import { AgentStorage } from "@oh-my-pi/pi-coding-agent/session/agent-storage";
16
+ import type {
17
+ AuthCredential,
18
+ AuthCredentialEntry,
19
+ AuthStorageData,
20
+ } from "@oh-my-pi/pi-coding-agent/session/auth-storage";
21
+ import { migrateJsonStorage } from "@oh-my-pi/pi-coding-agent/session/storage-migration";
14
22
  import { logger } from "@oh-my-pi/pi-utils";
15
- import { getAgentDbPath, getConfigDirPaths } from "$c/config";
16
- import { AgentStorage } from "$c/session/agent-storage";
17
- import type { AuthCredential, AuthCredentialEntry, AuthStorageData } from "$c/session/auth-storage";
18
- import { migrateJsonStorage } from "$c/session/storage-migration";
19
23
  import type { AnthropicAuthConfig, AnthropicOAuthCredential, ModelsJson } from "./types";
20
24
 
21
25
  const DEFAULT_BASE_URL = "https://api.anthropic.com";
@@ -14,17 +14,26 @@
14
14
 
15
15
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
16
16
  import { StringEnum } from "@oh-my-pi/pi-ai";
17
+ import { renderPromptTemplate } from "@oh-my-pi/pi-coding-agent/config/prompt-templates";
18
+ import {
19
+ callExaTool,
20
+ findApiKey as findExaKey,
21
+ formatSearchResults,
22
+ isSearchResponse,
23
+ } from "@oh-my-pi/pi-coding-agent/exa/mcp-client";
24
+ import { renderExaCall, renderExaResult } from "@oh-my-pi/pi-coding-agent/exa/render";
25
+ import type { ExaRenderDetails } from "@oh-my-pi/pi-coding-agent/exa/types";
26
+ import type {
27
+ CustomTool,
28
+ CustomToolContext,
29
+ RenderResultOptions,
30
+ } from "@oh-my-pi/pi-coding-agent/extensibility/custom-tools/types";
31
+ import type { Theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
32
+ import webSearchSystemPrompt from "@oh-my-pi/pi-coding-agent/prompts/system/web-search.md" with { type: "text" };
33
+ import webSearchDescription from "@oh-my-pi/pi-coding-agent/prompts/tools/web-search.md" with { type: "text" };
34
+ import type { ToolSession } from "@oh-my-pi/pi-coding-agent/tools/index";
35
+ import { formatAge } from "@oh-my-pi/pi-coding-agent/tools/render-utils";
17
36
  import { Type } from "@sinclair/typebox";
18
- import { renderPromptTemplate } from "$c/config/prompt-templates";
19
- import { callExaTool, findApiKey as findExaKey, formatSearchResults, isSearchResponse } from "$c/exa/mcp-client";
20
- import { renderExaCall, renderExaResult } from "$c/exa/render";
21
- import type { ExaRenderDetails } from "$c/exa/types";
22
- import type { CustomTool, CustomToolContext, RenderResultOptions } from "$c/extensibility/custom-tools/types";
23
- import type { Theme } from "$c/modes/theme/theme";
24
- import webSearchSystemPrompt from "$c/prompts/system/web-search.md" with { type: "text" };
25
- import webSearchDescription from "$c/prompts/tools/web-search.md" with { type: "text" };
26
- import type { ToolSession } from "$c/tools/index";
27
- import { formatAge } from "$c/tools/render-utils";
28
37
  import { findAnthropicAuth } from "./auth";
29
38
  import { searchAnthropic } from "./providers/anthropic";
30
39
  import { searchExa } from "./providers/exa";
@@ -6,7 +6,12 @@
6
6
  */
7
7
 
8
8
  import { applyClaudeToolPrefix, buildAnthropicSystemBlocks, stripClaudeToolPrefix } from "@oh-my-pi/pi-ai";
9
- import { buildAnthropicHeaders, buildAnthropicUrl, findAnthropicAuth, getEnv } from "$c/web/search/auth";
9
+ import {
10
+ buildAnthropicHeaders,
11
+ buildAnthropicUrl,
12
+ findAnthropicAuth,
13
+ getEnv,
14
+ } from "@oh-my-pi/pi-coding-agent/web/search/auth";
10
15
  import type {
11
16
  AnthropicApiResponse,
12
17
  AnthropicAuthConfig,
@@ -14,8 +19,8 @@ import type {
14
19
  WebSearchCitation,
15
20
  WebSearchResponse,
16
21
  WebSearchSource,
17
- } from "$c/web/search/types";
18
- import { WebSearchProviderError } from "$c/web/search/types";
22
+ } from "@oh-my-pi/pi-coding-agent/web/search/types";
23
+ import { WebSearchProviderError } from "@oh-my-pi/pi-coding-agent/web/search/types";
19
24
 
20
25
  const DEFAULT_MODEL = "claude-haiku-4-5";
21
26
  const DEFAULT_MAX_TOKENS = 4096;
@@ -7,8 +7,8 @@
7
7
 
8
8
  import { existsSync, readFileSync } from "node:fs";
9
9
  import { homedir } from "node:os";
10
- import type { WebSearchResponse, WebSearchSource } from "$c/web/search/types";
11
- import { WebSearchProviderError } from "$c/web/search/types";
10
+ import type { WebSearchResponse, WebSearchSource } from "@oh-my-pi/pi-coding-agent/web/search/types";
11
+ import { WebSearchProviderError } from "@oh-my-pi/pi-coding-agent/web/search/types";
12
12
 
13
13
  const EXA_API_URL = "https://api.exa.ai/search";
14
14
 
@@ -12,8 +12,8 @@ import type {
12
12
  WebSearchCitation,
13
13
  WebSearchResponse,
14
14
  WebSearchSource,
15
- } from "$c/web/search/types";
16
- import { WebSearchProviderError } from "$c/web/search/types";
15
+ } from "@oh-my-pi/pi-coding-agent/web/search/types";
16
+ import { WebSearchProviderError } from "@oh-my-pi/pi-coding-agent/web/search/types";
17
17
 
18
18
  const PERPLEXITY_API_URL = "https://api.perplexity.ai/chat/completions";
19
19
 
@@ -4,10 +4,8 @@
4
4
  * Tree-based rendering with collapsed/expanded states for web search results.
5
5
  */
6
6
 
7
- import type { Component } from "@oh-my-pi/pi-tui";
8
- import { Text } from "@oh-my-pi/pi-tui";
9
- import type { RenderResultOptions } from "$c/extensibility/custom-tools/types";
10
- import type { Theme } from "$c/modes/theme/theme";
7
+ import type { RenderResultOptions } from "@oh-my-pi/pi-coding-agent/extensibility/custom-tools/types";
8
+ import type { Theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
11
9
  import {
12
10
  formatAge,
13
11
  formatCount,
@@ -19,7 +17,9 @@ import {
19
17
  PREVIEW_LIMITS,
20
18
  TRUNCATE_LENGTHS,
21
19
  truncate,
22
- } from "$c/tools/render-utils";
20
+ } from "@oh-my-pi/pi-coding-agent/tools/render-utils";
21
+ import type { Component } from "@oh-my-pi/pi-tui";
22
+ import { Text } from "@oh-my-pi/pi-tui";
23
23
  import type { WebSearchResponse } from "./types";
24
24
 
25
25
  const MAX_COLLAPSED_ANSWER_LINES = PREVIEW_LIMITS.COLLAPSED_LINES;