@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-coding-agent",
3
- "version": "8.0.2",
3
+ "version": "8.0.4",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "ompConfig": {
@@ -20,6 +20,10 @@
20
20
  "./hooks": {
21
21
  "types": "./src/extensibility/hooks/index.ts",
22
22
  "import": "./src/extensibility/hooks/index.ts"
23
+ },
24
+ "./*": {
25
+ "types": "./src/*.ts",
26
+ "import": "./src/*.ts"
23
27
  }
24
28
  },
25
29
  "files": [
@@ -44,8 +48,8 @@
44
48
  "dependencies": {
45
49
  "@oh-my-pi/omp-stats": "8.0.0",
46
50
  "@oh-my-pi/pi-agent-core": "8.0.0",
47
- "@oh-my-pi/pi-ai": "8.0.0",
48
- "@oh-my-pi/pi-tui": "8.0.0",
51
+ "@oh-my-pi/pi-ai": "8.0.1",
52
+ "@oh-my-pi/pi-tui": "8.0.1",
49
53
  "@oh-my-pi/pi-utils": "8.0.0",
50
54
  "@openai/agents": "^0.3.7",
51
55
  "@sinclair/typebox": "^0.34.46",
package/src/cli/args.ts CHANGED
@@ -3,9 +3,9 @@
3
3
  */
4
4
 
5
5
  import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
6
+ import { APP_NAME, CONFIG_DIR_NAME, ENV_AGENT_DIR } from "@oh-my-pi/pi-coding-agent/config";
7
+ import { BUILTIN_TOOLS } from "@oh-my-pi/pi-coding-agent/tools/index";
6
8
  import chalk from "chalk";
7
- import { APP_NAME, CONFIG_DIR_NAME, ENV_AGENT_DIR } from "$c/config";
8
- import { BUILTIN_TOOLS } from "$c/tools/index";
9
9
 
10
10
  export type Mode = "text" | "json" | "rpc";
11
11
 
@@ -5,11 +5,11 @@
5
5
  * Uses SETTINGS_DEFS as the source of truth for available settings.
6
6
  */
7
7
 
8
+ import { APP_NAME, getAgentDir } from "@oh-my-pi/pi-coding-agent/config";
9
+ import { SettingsManager } from "@oh-my-pi/pi-coding-agent/config/settings-manager";
10
+ import { SETTINGS_DEFS, type SettingDef } from "@oh-my-pi/pi-coding-agent/modes/components/settings-defs";
11
+ import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
8
12
  import chalk from "chalk";
9
- import { APP_NAME, getAgentDir } from "$c/config";
10
- import { SettingsManager } from "$c/config/settings-manager";
11
- import { SETTINGS_DEFS, type SettingDef } from "$c/modes/components/settings-defs";
12
- import { theme } from "$c/modes/theme/theme";
13
13
 
14
14
  // =============================================================================
15
15
  // Types
@@ -5,10 +5,10 @@
5
5
  import { existsSync, readFileSync, statSync } from "node:fs";
6
6
  import { resolve } from "node:path";
7
7
  import type { ImageContent } from "@oh-my-pi/pi-ai";
8
+ import { resolveReadPath } from "@oh-my-pi/pi-coding-agent/tools/path-utils";
9
+ import { formatDimensionNote, resizeImage } from "@oh-my-pi/pi-coding-agent/utils/image-resize";
10
+ import { detectSupportedImageMimeTypeFromFile } from "@oh-my-pi/pi-coding-agent/utils/mime";
8
11
  import chalk from "chalk";
9
- import { resolveReadPath } from "$c/tools/path-utils";
10
- import { formatDimensionNote, resizeImage } from "$c/utils/image-resize";
11
- import { detectSupportedImageMimeTypeFromFile } from "$c/utils/mime";
12
12
 
13
13
  export interface ProcessedFiles {
14
14
  text: string;
@@ -3,8 +3,8 @@
3
3
  */
4
4
 
5
5
  import type { Api, Model } from "@oh-my-pi/pi-ai";
6
- import type { ModelRegistry } from "$c/config/model-registry";
7
- import { fuzzyFilter } from "$c/utils/fuzzy";
6
+ import type { ModelRegistry } from "@oh-my-pi/pi-coding-agent/config/model-registry";
7
+ import { fuzzyFilter } from "@oh-my-pi/pi-coding-agent/utils/fuzzy";
8
8
 
9
9
  /**
10
10
  * Format a number as human-readable (e.g., 200000 -> "200K", 1000000 -> "1M")
@@ -4,10 +4,14 @@
4
4
  * Handles `omp plugin <command>` subcommands for plugin lifecycle management.
5
5
  */
6
6
 
7
+ import { APP_NAME } from "@oh-my-pi/pi-coding-agent/config";
8
+ import {
9
+ PluginManager,
10
+ parseSettingValue,
11
+ validateSetting,
12
+ } from "@oh-my-pi/pi-coding-agent/extensibility/plugins/index";
13
+ import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
7
14
  import chalk from "chalk";
8
- import { APP_NAME } from "$c/config";
9
- import { PluginManager, parseSettingValue, validateSetting } from "$c/extensibility/plugins/index";
10
- import { theme } from "$c/modes/theme/theme";
11
15
 
12
16
  // =============================================================================
13
17
  // Types
@@ -2,9 +2,9 @@
2
2
  * TUI session selector for --resume flag
3
3
  */
4
4
 
5
+ import { SessionSelectorComponent } from "@oh-my-pi/pi-coding-agent/modes/components/session-selector";
6
+ import type { SessionInfo } from "@oh-my-pi/pi-coding-agent/session/session-manager";
5
7
  import { ProcessTerminal, TUI } from "@oh-my-pi/pi-tui";
6
- import { SessionSelectorComponent } from "$c/modes/components/session-selector";
7
- import type { SessionInfo } from "$c/session/session-manager";
8
8
 
9
9
  /** Show TUI session selector and return selected session path or null if cancelled */
10
10
  export async function selectSession(sessions: SessionInfo[]): Promise<string | null> {
@@ -4,10 +4,10 @@
4
4
  * Handles `omp setup <component>` to install dependencies for optional features.
5
5
  */
6
6
 
7
+ import { APP_NAME } from "@oh-my-pi/pi-coding-agent/config";
8
+ import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
7
9
  import { $ } from "bun";
8
10
  import chalk from "chalk";
9
- import { APP_NAME } from "$c/config";
10
- import { theme } from "$c/modes/theme/theme";
11
11
 
12
12
  export type SetupComponent = "python";
13
13
 
@@ -4,8 +4,8 @@
4
4
  * Handles `omp stats` subcommand for viewing AI usage statistics.
5
5
  */
6
6
 
7
+ import { APP_NAME } from "@oh-my-pi/pi-coding-agent/config";
7
8
  import chalk from "chalk";
8
- import { APP_NAME } from "$c/config";
9
9
 
10
10
  // =============================================================================
11
11
  // Types
@@ -10,9 +10,9 @@ import { createWriteStream, existsSync, renameSync, unlinkSync } from "node:fs";
10
10
  import { dirname } from "node:path";
11
11
  import { Readable } from "node:stream";
12
12
  import { pipeline } from "node:stream/promises";
13
+ import { APP_NAME, VERSION } from "@oh-my-pi/pi-coding-agent/config";
14
+ import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
13
15
  import chalk from "chalk";
14
- import { APP_NAME, VERSION } from "$c/config";
15
- import { theme } from "$c/modes/theme/theme";
16
16
 
17
17
  /**
18
18
  * Detect if we're running as a Bun compiled binary.
@@ -1,5 +1,6 @@
1
1
  import { existsSync, readFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
+ import { getAgentDir } from "@oh-my-pi/pi-coding-agent/config";
3
4
  import {
4
5
  DEFAULT_EDITOR_KEYBINDINGS,
5
6
  type EditorAction,
@@ -10,7 +11,6 @@ import {
10
11
  setEditorKeybindings,
11
12
  } from "@oh-my-pi/pi-tui";
12
13
  import { logger } from "@oh-my-pi/pi-utils";
13
- import { getAgentDir } from "$c/config";
14
14
 
15
15
  /**
16
16
  * Application-level actions (coding agent specific).
@@ -11,10 +11,10 @@ import {
11
11
  type Model,
12
12
  normalizeDomain,
13
13
  } from "@oh-my-pi/pi-ai";
14
+ import type { AuthStorage } from "@oh-my-pi/pi-coding-agent/session/auth-storage";
14
15
  import { logger } from "@oh-my-pi/pi-utils";
15
16
  import { type Static, Type } from "@sinclair/typebox";
16
17
  import AjvModule from "ajv";
17
- import type { AuthStorage } from "$c/session/auth-storage";
18
18
 
19
19
  const Ajv = (AjvModule as any).default || AjvModule;
20
20
 
@@ -4,8 +4,8 @@
4
4
 
5
5
  import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
6
6
  import { type Api, type KnownProvider, type Model, modelsAreEqual } from "@oh-my-pi/pi-ai";
7
+ import { isValidThinkingLevel } from "@oh-my-pi/pi-coding-agent/cli/args";
7
8
  import chalk from "chalk";
8
- import { isValidThinkingLevel } from "$c/cli/args";
9
9
  import type { ModelRegistry } from "./model-registry";
10
10
 
11
11
  /** Default model IDs for each known provider */
@@ -1,8 +1,8 @@
1
1
  import { join, resolve } from "node:path";
2
+ import { CONFIG_DIR_NAME, getPromptsDir } from "@oh-my-pi/pi-coding-agent/config";
3
+ import { parseFrontmatter } from "@oh-my-pi/pi-coding-agent/utils/frontmatter";
2
4
  import { logger } from "@oh-my-pi/pi-utils";
3
5
  import Handlebars from "handlebars";
4
- import { CONFIG_DIR_NAME, getPromptsDir } from "$c/config";
5
- import { parseFrontmatter } from "$c/utils/frontmatter";
6
6
 
7
7
  /**
8
8
  * Represents a prompt template loaded from a markdown file
@@ -1,11 +1,11 @@
1
1
  import { rename } from "node:fs/promises";
2
2
  import { join } from "node:path";
3
+ import { type Settings as SettingsItem, settingsCapability } from "@oh-my-pi/pi-coding-agent/capability/settings";
4
+ import { getAgentDbPath, getAgentDir } from "@oh-my-pi/pi-coding-agent/config";
5
+ import { loadCapability } from "@oh-my-pi/pi-coding-agent/discovery";
6
+ import type { SymbolPreset } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
7
+ import { AgentStorage } from "@oh-my-pi/pi-coding-agent/session/agent-storage";
3
8
  import { logger } from "@oh-my-pi/pi-utils";
4
- import { type Settings as SettingsItem, settingsCapability } from "$c/capability/settings";
5
- import { getAgentDbPath, getAgentDir } from "$c/config";
6
- import { loadCapability } from "$c/discovery";
7
- import type { SymbolPreset } from "$c/modes/theme/theme";
8
- import { AgentStorage } from "$c/session/agent-storage";
9
9
 
10
10
  export interface CompactionSettings {
11
11
  enabled?: boolean; // default: true
package/src/cursor.ts CHANGED
@@ -8,7 +8,7 @@ import type {
8
8
  AgentToolUpdateCallback,
9
9
  } from "@oh-my-pi/pi-agent-core";
10
10
  import type { CursorMcpCall, CursorExecHandlers as ICursorExecHandlers, ToolResultMessage } from "@oh-my-pi/pi-ai";
11
- import { resolveToCwd } from "$c/tools/path-utils";
11
+ import { resolveToCwd } from "@oh-my-pi/pi-coding-agent/tools/path-utils";
12
12
 
13
13
  interface CursorExecBridgeOptions {
14
14
  cwd: string;
@@ -7,10 +7,10 @@
7
7
  */
8
8
 
9
9
  import { dirname, join, sep } from "node:path";
10
- import { type ContextFile, contextFileCapability } from "$c/capability/context-file";
11
- import { readFile } from "$c/capability/fs";
12
- import { registerProvider } from "$c/capability/index";
13
- import type { LoadContext, LoadResult } from "$c/capability/types";
10
+ import { type ContextFile, contextFileCapability } from "@oh-my-pi/pi-coding-agent/capability/context-file";
11
+ import { readFile } from "@oh-my-pi/pi-coding-agent/capability/fs";
12
+ import { registerProvider } from "@oh-my-pi/pi-coding-agent/capability/index";
13
+ import type { LoadContext, LoadResult } from "@oh-my-pi/pi-coding-agent/capability/types";
14
14
  import { calculateDepth, createSourceMeta } from "./helpers";
15
15
 
16
16
  const PROVIDER_ID = "agents-md";
@@ -5,24 +5,28 @@
5
5
  * .pi is an alias for backwards compatibility.
6
6
  */
7
7
 
8
+ import { type ContextFile, contextFileCapability } from "@oh-my-pi/pi-coding-agent/capability/context-file";
9
+ import {
10
+ type Extension,
11
+ type ExtensionManifest,
12
+ extensionCapability,
13
+ } from "@oh-my-pi/pi-coding-agent/capability/extension";
14
+ import { type ExtensionModule, extensionModuleCapability } from "@oh-my-pi/pi-coding-agent/capability/extension-module";
15
+ import { readDirEntries, readFile } from "@oh-my-pi/pi-coding-agent/capability/fs";
16
+ import { type Hook, hookCapability } from "@oh-my-pi/pi-coding-agent/capability/hook";
17
+ import { registerProvider } from "@oh-my-pi/pi-coding-agent/capability/index";
18
+ import { type Instruction, instructionCapability } from "@oh-my-pi/pi-coding-agent/capability/instruction";
19
+ import { type MCPServer, mcpCapability } from "@oh-my-pi/pi-coding-agent/capability/mcp";
20
+ import { type Prompt, promptCapability } from "@oh-my-pi/pi-coding-agent/capability/prompt";
21
+ import { type Rule, ruleCapability } from "@oh-my-pi/pi-coding-agent/capability/rule";
22
+ import { type Settings, settingsCapability } from "@oh-my-pi/pi-coding-agent/capability/settings";
23
+ import { type Skill, skillCapability } from "@oh-my-pi/pi-coding-agent/capability/skill";
24
+ import { type SlashCommand, slashCommandCapability } from "@oh-my-pi/pi-coding-agent/capability/slash-command";
25
+ import { type SystemPrompt, systemPromptCapability } from "@oh-my-pi/pi-coding-agent/capability/system-prompt";
26
+ import { type CustomTool, toolCapability } from "@oh-my-pi/pi-coding-agent/capability/tool";
27
+ import type { LoadContext, LoadResult } from "@oh-my-pi/pi-coding-agent/capability/types";
28
+ import { parseFrontmatter } from "@oh-my-pi/pi-coding-agent/utils/frontmatter";
8
29
  import { dirname, isAbsolute, join, resolve } from "path";
9
- import { type ContextFile, contextFileCapability } from "$c/capability/context-file";
10
- import { type Extension, type ExtensionManifest, extensionCapability } from "$c/capability/extension";
11
- import { type ExtensionModule, extensionModuleCapability } from "$c/capability/extension-module";
12
- import { readDirEntries, readFile } from "$c/capability/fs";
13
- import { type Hook, hookCapability } from "$c/capability/hook";
14
- import { registerProvider } from "$c/capability/index";
15
- import { type Instruction, instructionCapability } from "$c/capability/instruction";
16
- import { type MCPServer, mcpCapability } from "$c/capability/mcp";
17
- import { type Prompt, promptCapability } from "$c/capability/prompt";
18
- import { type Rule, ruleCapability } from "$c/capability/rule";
19
- import { type Settings, settingsCapability } from "$c/capability/settings";
20
- import { type Skill, skillCapability } from "$c/capability/skill";
21
- import { type SlashCommand, slashCommandCapability } from "$c/capability/slash-command";
22
- import { type SystemPrompt, systemPromptCapability } from "$c/capability/system-prompt";
23
- import { type CustomTool, toolCapability } from "$c/capability/tool";
24
- import type { LoadContext, LoadResult } from "$c/capability/types";
25
- import { parseFrontmatter } from "$c/utils/frontmatter";
26
30
  import {
27
31
  createSourceMeta,
28
32
  discoverExtensionModulePaths,
@@ -6,18 +6,18 @@
6
6
  */
7
7
 
8
8
  import { join, sep } from "node:path";
9
- import { type ContextFile, contextFileCapability } from "$c/capability/context-file";
10
- import { type ExtensionModule, extensionModuleCapability } from "$c/capability/extension-module";
11
- import { readFile } from "$c/capability/fs";
12
- import { type Hook, hookCapability } from "$c/capability/hook";
13
- import { registerProvider } from "$c/capability/index";
14
- import { type MCPServer, mcpCapability } from "$c/capability/mcp";
15
- import { type Settings, settingsCapability } from "$c/capability/settings";
16
- import { type Skill, skillCapability } from "$c/capability/skill";
17
- import { type SlashCommand, slashCommandCapability } from "$c/capability/slash-command";
18
- import { type SystemPrompt, systemPromptCapability } from "$c/capability/system-prompt";
19
- import { type CustomTool, toolCapability } from "$c/capability/tool";
20
- import type { LoadContext, LoadResult } from "$c/capability/types";
9
+ import { type ContextFile, contextFileCapability } from "@oh-my-pi/pi-coding-agent/capability/context-file";
10
+ import { type ExtensionModule, extensionModuleCapability } from "@oh-my-pi/pi-coding-agent/capability/extension-module";
11
+ import { readFile } from "@oh-my-pi/pi-coding-agent/capability/fs";
12
+ import { type Hook, hookCapability } from "@oh-my-pi/pi-coding-agent/capability/hook";
13
+ import { registerProvider } from "@oh-my-pi/pi-coding-agent/capability/index";
14
+ import { type MCPServer, mcpCapability } from "@oh-my-pi/pi-coding-agent/capability/mcp";
15
+ import { type Settings, settingsCapability } from "@oh-my-pi/pi-coding-agent/capability/settings";
16
+ import { type Skill, skillCapability } from "@oh-my-pi/pi-coding-agent/capability/skill";
17
+ import { type SlashCommand, slashCommandCapability } from "@oh-my-pi/pi-coding-agent/capability/slash-command";
18
+ import { type SystemPrompt, systemPromptCapability } from "@oh-my-pi/pi-coding-agent/capability/system-prompt";
19
+ import { type CustomTool, toolCapability } from "@oh-my-pi/pi-coding-agent/capability/tool";
20
+ import type { LoadContext, LoadResult } from "@oh-my-pi/pi-coding-agent/capability/types";
21
21
  import {
22
22
  calculateDepth,
23
23
  createSourceMeta,
@@ -6,12 +6,12 @@
6
6
  */
7
7
 
8
8
  import { dirname, resolve } from "node:path";
9
- import { readDirEntries, readFile } from "$c/capability/fs";
10
- import { registerProvider } from "$c/capability/index";
11
- import type { Rule } from "$c/capability/rule";
12
- import { ruleCapability } from "$c/capability/rule";
13
- import type { LoadContext, LoadResult } from "$c/capability/types";
14
- import { parseFrontmatter } from "$c/utils/frontmatter";
9
+ import { readDirEntries, readFile } from "@oh-my-pi/pi-coding-agent/capability/fs";
10
+ import { registerProvider } from "@oh-my-pi/pi-coding-agent/capability/index";
11
+ import type { Rule } from "@oh-my-pi/pi-coding-agent/capability/rule";
12
+ import { ruleCapability } from "@oh-my-pi/pi-coding-agent/capability/rule";
13
+ import type { LoadContext, LoadResult } from "@oh-my-pi/pi-coding-agent/capability/types";
14
+ import { parseFrontmatter } from "@oh-my-pi/pi-coding-agent/utils/frontmatter";
15
15
  import { createSourceMeta, loadFilesFromDir } from "./helpers";
16
16
 
17
17
  const PROVIDER_ID = "cline";
@@ -8,29 +8,29 @@
8
8
  */
9
9
 
10
10
  import { join } from "node:path";
11
+ import type { ContextFile } from "@oh-my-pi/pi-coding-agent/capability/context-file";
12
+ import { contextFileCapability } from "@oh-my-pi/pi-coding-agent/capability/context-file";
13
+ import { type ExtensionModule, extensionModuleCapability } from "@oh-my-pi/pi-coding-agent/capability/extension-module";
14
+ import { readFile } from "@oh-my-pi/pi-coding-agent/capability/fs";
15
+ import type { Hook } from "@oh-my-pi/pi-coding-agent/capability/hook";
16
+ import { hookCapability } from "@oh-my-pi/pi-coding-agent/capability/hook";
17
+ import { registerProvider } from "@oh-my-pi/pi-coding-agent/capability/index";
18
+ import type { MCPServer } from "@oh-my-pi/pi-coding-agent/capability/mcp";
19
+ import { mcpCapability } from "@oh-my-pi/pi-coding-agent/capability/mcp";
20
+ import type { Prompt } from "@oh-my-pi/pi-coding-agent/capability/prompt";
21
+ import { promptCapability } from "@oh-my-pi/pi-coding-agent/capability/prompt";
22
+ import type { Settings } from "@oh-my-pi/pi-coding-agent/capability/settings";
23
+ import { settingsCapability } from "@oh-my-pi/pi-coding-agent/capability/settings";
24
+ import type { Skill } from "@oh-my-pi/pi-coding-agent/capability/skill";
25
+ import { skillCapability } from "@oh-my-pi/pi-coding-agent/capability/skill";
26
+ import type { SlashCommand } from "@oh-my-pi/pi-coding-agent/capability/slash-command";
27
+ import { slashCommandCapability } from "@oh-my-pi/pi-coding-agent/capability/slash-command";
28
+ import type { CustomTool } from "@oh-my-pi/pi-coding-agent/capability/tool";
29
+ import { toolCapability } from "@oh-my-pi/pi-coding-agent/capability/tool";
30
+ import type { LoadContext, LoadResult } from "@oh-my-pi/pi-coding-agent/capability/types";
31
+ import { parseFrontmatter } from "@oh-my-pi/pi-coding-agent/utils/frontmatter";
11
32
  import { logger } from "@oh-my-pi/pi-utils";
12
33
  import { parse as parseToml } from "smol-toml";
13
- import type { ContextFile } from "$c/capability/context-file";
14
- import { contextFileCapability } from "$c/capability/context-file";
15
- import { type ExtensionModule, extensionModuleCapability } from "$c/capability/extension-module";
16
- import { readFile } from "$c/capability/fs";
17
- import type { Hook } from "$c/capability/hook";
18
- import { hookCapability } from "$c/capability/hook";
19
- import { registerProvider } from "$c/capability/index";
20
- import type { MCPServer } from "$c/capability/mcp";
21
- import { mcpCapability } from "$c/capability/mcp";
22
- import type { Prompt } from "$c/capability/prompt";
23
- import { promptCapability } from "$c/capability/prompt";
24
- import type { Settings } from "$c/capability/settings";
25
- import { settingsCapability } from "$c/capability/settings";
26
- import type { Skill } from "$c/capability/skill";
27
- import { skillCapability } from "$c/capability/skill";
28
- import type { SlashCommand } from "$c/capability/slash-command";
29
- import { slashCommandCapability } from "$c/capability/slash-command";
30
- import type { CustomTool } from "$c/capability/tool";
31
- import { toolCapability } from "$c/capability/tool";
32
- import type { LoadContext, LoadResult } from "$c/capability/types";
33
- import { parseFrontmatter } from "$c/utils/frontmatter";
34
34
  import {
35
35
  createSourceMeta,
36
36
  discoverExtensionModulePaths,
@@ -14,15 +14,15 @@
14
14
  * - settings: From settings.json if present
15
15
  */
16
16
 
17
- import { readFile } from "$c/capability/fs";
18
- import { registerProvider } from "$c/capability/index";
19
- import { type MCPServer, mcpCapability } from "$c/capability/mcp";
20
- import type { Rule } from "$c/capability/rule";
21
- import { ruleCapability } from "$c/capability/rule";
22
- import type { Settings } from "$c/capability/settings";
23
- import { settingsCapability } from "$c/capability/settings";
24
- import type { LoadContext, LoadResult } from "$c/capability/types";
25
- import { parseFrontmatter } from "$c/utils/frontmatter";
17
+ import { readFile } from "@oh-my-pi/pi-coding-agent/capability/fs";
18
+ import { registerProvider } from "@oh-my-pi/pi-coding-agent/capability/index";
19
+ import { type MCPServer, mcpCapability } from "@oh-my-pi/pi-coding-agent/capability/mcp";
20
+ import type { Rule } from "@oh-my-pi/pi-coding-agent/capability/rule";
21
+ import { ruleCapability } from "@oh-my-pi/pi-coding-agent/capability/rule";
22
+ import type { Settings } from "@oh-my-pi/pi-coding-agent/capability/settings";
23
+ import { settingsCapability } from "@oh-my-pi/pi-coding-agent/capability/settings";
24
+ import type { LoadContext, LoadResult } from "@oh-my-pi/pi-coding-agent/capability/types";
25
+ import { parseFrontmatter } from "@oh-my-pi/pi-coding-agent/utils/frontmatter";
26
26
  import {
27
27
  createSourceMeta,
28
28
  expandEnvVarsDeep,
@@ -17,15 +17,19 @@
17
17
  */
18
18
 
19
19
  import { join, sep } from "node:path";
20
- import { type ContextFile, contextFileCapability } from "$c/capability/context-file";
21
- import { type Extension, type ExtensionManifest, extensionCapability } from "$c/capability/extension";
22
- import { type ExtensionModule, extensionModuleCapability } from "$c/capability/extension-module";
23
- import { readDirEntries, readFile } from "$c/capability/fs";
24
- import { registerProvider } from "$c/capability/index";
25
- import { type MCPServer, mcpCapability } from "$c/capability/mcp";
26
- import { type Settings, settingsCapability } from "$c/capability/settings";
27
- import { type SystemPrompt, systemPromptCapability } from "$c/capability/system-prompt";
28
- import type { LoadContext, LoadResult } from "$c/capability/types";
20
+ import { type ContextFile, contextFileCapability } from "@oh-my-pi/pi-coding-agent/capability/context-file";
21
+ import {
22
+ type Extension,
23
+ type ExtensionManifest,
24
+ extensionCapability,
25
+ } from "@oh-my-pi/pi-coding-agent/capability/extension";
26
+ import { type ExtensionModule, extensionModuleCapability } from "@oh-my-pi/pi-coding-agent/capability/extension-module";
27
+ import { readDirEntries, readFile } from "@oh-my-pi/pi-coding-agent/capability/fs";
28
+ import { registerProvider } from "@oh-my-pi/pi-coding-agent/capability/index";
29
+ import { type MCPServer, mcpCapability } from "@oh-my-pi/pi-coding-agent/capability/mcp";
30
+ import { type Settings, settingsCapability } from "@oh-my-pi/pi-coding-agent/capability/settings";
31
+ import { type SystemPrompt, systemPromptCapability } from "@oh-my-pi/pi-coding-agent/capability/system-prompt";
32
+ import type { LoadContext, LoadResult } from "@oh-my-pi/pi-coding-agent/capability/types";
29
33
  import {
30
34
  calculateDepth,
31
35
  createSourceMeta,
@@ -13,12 +13,12 @@
13
13
  */
14
14
 
15
15
  import { basename, dirname, sep } from "node:path";
16
- import { type ContextFile, contextFileCapability } from "$c/capability/context-file";
17
- import { readFile } from "$c/capability/fs";
18
- import { registerProvider } from "$c/capability/index";
19
- import { type Instruction, instructionCapability } from "$c/capability/instruction";
20
- import type { LoadContext, LoadResult, SourceMeta } from "$c/capability/types";
21
- import { parseFrontmatter } from "$c/utils/frontmatter";
16
+ import { type ContextFile, contextFileCapability } from "@oh-my-pi/pi-coding-agent/capability/context-file";
17
+ import { readFile } from "@oh-my-pi/pi-coding-agent/capability/fs";
18
+ import { registerProvider } from "@oh-my-pi/pi-coding-agent/capability/index";
19
+ import { type Instruction, instructionCapability } from "@oh-my-pi/pi-coding-agent/capability/instruction";
20
+ import type { LoadContext, LoadResult, SourceMeta } from "@oh-my-pi/pi-coding-agent/capability/types";
21
+ import { parseFrontmatter } from "@oh-my-pi/pi-coding-agent/utils/frontmatter";
22
22
  import { calculateDepth, createSourceMeta, getProjectPath, loadFilesFromDir } from "./helpers";
23
23
 
24
24
  const PROVIDER_ID = "github";
@@ -5,10 +5,10 @@
5
5
  import { homedir } from "node:os";
6
6
  import { join, resolve } from "node:path";
7
7
  import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
8
- import { readDirEntries, readFile } from "$c/capability/fs";
9
- import type { Skill, SkillFrontmatter } from "$c/capability/skill";
10
- import type { LoadContext, LoadResult, SourceMeta } from "$c/capability/types";
11
- import { parseFrontmatter } from "$c/utils/frontmatter";
8
+ import { readDirEntries, readFile } from "@oh-my-pi/pi-coding-agent/capability/fs";
9
+ import type { Skill, SkillFrontmatter } from "@oh-my-pi/pi-coding-agent/capability/skill";
10
+ import type { LoadContext, LoadResult, SourceMeta } from "@oh-my-pi/pi-coding-agent/capability/types";
11
+ import { parseFrontmatter } from "@oh-my-pi/pi-coding-agent/utils/frontmatter";
12
12
 
13
13
  const VALID_THINKING_LEVELS: readonly string[] = ["off", "minimal", "low", "medium", "high", "xhigh"];
14
14
  const UNICODE_SPACES = /[\u00A0\u2000-\u200A\u202F\u205F\u3000]/g;
@@ -35,10 +35,10 @@ import "./agents-md";
35
35
  import "./mcp-json";
36
36
  import "./ssh";
37
37
 
38
- export type { ContextFile } from "$c/capability/context-file";
39
- export type { Extension, ExtensionManifest } from "$c/capability/extension";
40
- export type { ExtensionModule } from "$c/capability/extension-module";
41
- export type { Hook } from "$c/capability/hook";
38
+ export type { ContextFile } from "@oh-my-pi/pi-coding-agent/capability/context-file";
39
+ export type { Extension, ExtensionManifest } from "@oh-my-pi/pi-coding-agent/capability/extension";
40
+ export type { ExtensionModule } from "@oh-my-pi/pi-coding-agent/capability/extension-module";
41
+ export type { Hook } from "@oh-my-pi/pi-coding-agent/capability/hook";
42
42
  // Re-export the main API from capability registry
43
43
  export {
44
44
  cacheStats,
@@ -62,18 +62,18 @@ export {
62
62
  // Cache management
63
63
  reset,
64
64
  setDisabledProviders,
65
- } from "$c/capability/index";
66
- export type { Instruction } from "$c/capability/instruction";
65
+ } from "@oh-my-pi/pi-coding-agent/capability/index";
66
+ export type { Instruction } from "@oh-my-pi/pi-coding-agent/capability/instruction";
67
67
  // Re-export capability item types
68
- export type { MCPServer } from "$c/capability/mcp";
69
- export type { Prompt } from "$c/capability/prompt";
70
- export type { Rule, RuleFrontmatter } from "$c/capability/rule";
71
- export type { Settings } from "$c/capability/settings";
72
- export type { Skill, SkillFrontmatter } from "$c/capability/skill";
73
- export type { SlashCommand } from "$c/capability/slash-command";
74
- export type { SSHHost } from "$c/capability/ssh";
75
- export type { SystemPrompt } from "$c/capability/system-prompt";
76
- export type { CustomTool } from "$c/capability/tool";
68
+ export type { MCPServer } from "@oh-my-pi/pi-coding-agent/capability/mcp";
69
+ export type { Prompt } from "@oh-my-pi/pi-coding-agent/capability/prompt";
70
+ export type { Rule, RuleFrontmatter } from "@oh-my-pi/pi-coding-agent/capability/rule";
71
+ export type { Settings } from "@oh-my-pi/pi-coding-agent/capability/settings";
72
+ export type { Skill, SkillFrontmatter } from "@oh-my-pi/pi-coding-agent/capability/skill";
73
+ export type { SlashCommand } from "@oh-my-pi/pi-coding-agent/capability/slash-command";
74
+ export type { SSHHost } from "@oh-my-pi/pi-coding-agent/capability/ssh";
75
+ export type { SystemPrompt } from "@oh-my-pi/pi-coding-agent/capability/system-prompt";
76
+ export type { CustomTool } from "@oh-my-pi/pi-coding-agent/capability/tool";
77
77
  // Re-export types
78
78
  export type {
79
79
  Capability,
@@ -85,4 +85,4 @@ export type {
85
85
  Provider,
86
86
  ProviderInfo,
87
87
  SourceMeta,
88
- } from "$c/capability/types";
88
+ } from "@oh-my-pi/pi-coding-agent/capability/types";
@@ -8,10 +8,10 @@
8
8
  */
9
9
 
10
10
  import { join } from "node:path";
11
- import { readFile } from "$c/capability/fs";
12
- import { registerProvider } from "$c/capability/index";
13
- import { type MCPServer, mcpCapability } from "$c/capability/mcp";
14
- import type { LoadContext, LoadResult, SourceMeta } from "$c/capability/types";
11
+ import { readFile } from "@oh-my-pi/pi-coding-agent/capability/fs";
12
+ import { registerProvider } from "@oh-my-pi/pi-coding-agent/capability/index";
13
+ import { type MCPServer, mcpCapability } from "@oh-my-pi/pi-coding-agent/capability/mcp";
14
+ import type { LoadContext, LoadResult, SourceMeta } from "@oh-my-pi/pi-coding-agent/capability/types";
15
15
  import { createSourceMeta, expandEnvVarsDeep, parseJSON } from "./helpers";
16
16
 
17
17
  const PROVIDER_ID = "mcp-json";
@@ -6,10 +6,10 @@
6
6
  */
7
7
 
8
8
  import { join } from "node:path";
9
- import { readFile } from "$c/capability/fs";
10
- import { registerProvider } from "$c/capability/index";
11
- import { type SSHHost, sshCapability } from "$c/capability/ssh";
12
- import type { LoadContext, LoadResult, SourceMeta } from "$c/capability/types";
9
+ import { readFile } from "@oh-my-pi/pi-coding-agent/capability/fs";
10
+ import { registerProvider } from "@oh-my-pi/pi-coding-agent/capability/index";
11
+ import { type SSHHost, sshCapability } from "@oh-my-pi/pi-coding-agent/capability/ssh";
12
+ import type { LoadContext, LoadResult, SourceMeta } from "@oh-my-pi/pi-coding-agent/capability/types";
13
13
  import { createSourceMeta, expandEnvVarsDeep, parseJSON } from "./helpers";
14
14
 
15
15
  const PROVIDER_ID = "ssh-json";
@@ -5,10 +5,10 @@
5
5
  * Supports MCP server discovery from `mcp.json` with nested `mcp.servers` structure.
6
6
  */
7
7
 
8
- import { readFile } from "$c/capability/fs";
9
- import { registerProvider } from "$c/capability/index";
10
- import { type MCPServer, mcpCapability } from "$c/capability/mcp";
11
- import type { LoadContext, LoadResult } from "$c/capability/types";
8
+ import { readFile } from "@oh-my-pi/pi-coding-agent/capability/fs";
9
+ import { registerProvider } from "@oh-my-pi/pi-coding-agent/capability/index";
10
+ import { type MCPServer, mcpCapability } from "@oh-my-pi/pi-coding-agent/capability/mcp";
11
+ import type { LoadContext, LoadResult } from "@oh-my-pi/pi-coding-agent/capability/types";
12
12
  import { createSourceMeta, expandEnvVarsDeep, getProjectPath, parseJSON } from "./helpers";
13
13
 
14
14
  const PROVIDER_ID = "vscode";