@oh-my-pi/pi-coding-agent 8.0.2 → 8.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -1
- package/src/cli/args.ts +2 -2
- package/src/cli/config-cli.ts +4 -4
- package/src/cli/file-processor.ts +3 -3
- package/src/cli/list-models.ts +2 -2
- package/src/cli/plugin-cli.ts +7 -3
- package/src/cli/session-picker.ts +2 -2
- package/src/cli/setup-cli.ts +2 -2
- package/src/cli/stats-cli.ts +1 -1
- package/src/cli/update-cli.ts +2 -2
- package/src/config/keybindings.ts +1 -1
- package/src/config/model-registry.ts +1 -1
- package/src/config/model-resolver.ts +1 -1
- package/src/config/prompt-templates.ts +2 -2
- package/src/config/settings-manager.ts +5 -5
- package/src/cursor.ts +1 -1
- package/src/discovery/agents-md.ts +4 -4
- package/src/discovery/builtin.ts +21 -17
- package/src/discovery/claude.ts +12 -12
- package/src/discovery/cline.ts +6 -6
- package/src/discovery/codex.ts +21 -21
- package/src/discovery/cursor.ts +9 -9
- package/src/discovery/gemini.ts +13 -9
- package/src/discovery/github.ts +6 -6
- package/src/discovery/helpers.ts +4 -4
- package/src/discovery/index.ts +16 -16
- package/src/discovery/mcp-json.ts +4 -4
- package/src/discovery/ssh.ts +4 -4
- package/src/discovery/vscode.ts +4 -4
- package/src/discovery/windsurf.ts +6 -6
- package/src/exa/company.ts +1 -1
- package/src/exa/index.ts +2 -2
- package/src/exa/linkedin.ts +1 -1
- package/src/exa/mcp-client.ts +2 -2
- package/src/exa/render.ts +6 -6
- package/src/exa/researcher.ts +1 -1
- package/src/exa/search.ts +1 -1
- package/src/exa/websets.ts +1 -1
- package/src/exec/bash-executor.ts +3 -3
- package/src/export/custom-share.ts +1 -1
- package/src/export/html/index.ts +3 -3
- package/src/export/ttsr.ts +2 -2
- package/src/extensibility/custom-commands/bundled/review/index.ts +4 -4
- package/src/extensibility/custom-commands/loader.ts +3 -3
- package/src/extensibility/custom-commands/types.ts +1 -1
- package/src/extensibility/custom-tools/loader.ts +9 -9
- package/src/extensibility/custom-tools/types.ts +6 -6
- package/src/extensibility/custom-tools/wrapper.ts +1 -1
- package/src/extensibility/extensions/loader.ts +8 -8
- package/src/extensibility/extensions/runner.ts +3 -3
- package/src/extensibility/extensions/types.ts +23 -17
- package/src/extensibility/extensions/wrapper.ts +1 -1
- package/src/extensibility/hooks/index.ts +1 -1
- package/src/extensibility/hooks/loader.ts +7 -7
- package/src/extensibility/hooks/runner.ts +4 -4
- package/src/extensibility/hooks/types.ts +16 -10
- package/src/extensibility/plugins/doctor.ts +1 -1
- package/src/extensibility/plugins/installer.ts +1 -1
- package/src/extensibility/plugins/paths.ts +1 -1
- package/src/extensibility/skills.ts +9 -6
- package/src/extensibility/slash-commands.ts +6 -6
- package/src/index.ts +7 -7
- package/src/internal-urls/rule-protocol.ts +1 -1
- package/src/internal-urls/skill-protocol.ts +1 -1
- package/src/ipy/executor.ts +3 -3
- package/src/ipy/gateway-coordinator.ts +3 -3
- package/src/ipy/kernel.ts +3 -3
- package/src/lsp/client.ts +1 -1
- package/src/lsp/clients/biome-client.ts +1 -1
- package/src/lsp/clients/index.ts +1 -1
- package/src/lsp/clients/lsp-linter-client.ts +4 -4
- package/src/lsp/config.ts +1 -1
- package/src/lsp/index.ts +6 -6
- package/src/lsp/render.ts +7 -2
- package/src/lsp/utils.ts +1 -1
- package/src/main.ts +1 -1
- package/src/mcp/config.ts +3 -3
- package/src/mcp/loader.ts +2 -2
- package/src/mcp/manager.ts +1 -1
- package/src/mcp/tool-bridge.ts +6 -2
- package/src/mcp/tool-cache.ts +1 -1
- package/src/mcp/transports/http.ts +1 -1
- package/src/mcp/transports/stdio.ts +1 -1
- package/src/migrations.ts +2 -2
- package/src/modes/components/armin.ts +1 -1
- package/src/modes/components/assistant-message.ts +1 -1
- package/src/modes/components/bash-execution.ts +3 -3
- package/src/modes/components/bordered-loader.ts +1 -1
- package/src/modes/components/branch-summary-message.ts +2 -2
- package/src/modes/components/compaction-summary-message.ts +2 -2
- package/src/modes/components/custom-message.ts +3 -3
- package/src/modes/components/diff.ts +1 -1
- package/src/modes/components/dynamic-border.ts +1 -1
- package/src/modes/components/extensions/extension-dashboard.ts +3 -3
- package/src/modes/components/extensions/extension-list.ts +2 -2
- package/src/modes/components/extensions/inspector-panel.ts +1 -1
- package/src/modes/components/extensions/state-manager.ts +17 -11
- package/src/modes/components/extensions/types.ts +1 -1
- package/src/modes/components/footer.ts +3 -3
- package/src/modes/components/history-search.ts +2 -2
- package/src/modes/components/hook-editor.ts +1 -1
- package/src/modes/components/hook-input.ts +1 -1
- package/src/modes/components/hook-message.ts +3 -3
- package/src/modes/components/hook-selector.ts +1 -1
- package/src/modes/components/keybinding-hints.ts +2 -2
- package/src/modes/components/login-dialog.ts +1 -1
- package/src/modes/components/model-selector.ts +5 -5
- package/src/modes/components/oauth-selector.ts +2 -2
- package/src/modes/components/plugin-settings.ts +3 -3
- package/src/modes/components/python-execution.ts +3 -3
- package/src/modes/components/queue-mode-selector.ts +1 -1
- package/src/modes/components/read-tool-group.ts +2 -2
- package/src/modes/components/session-selector.ts +3 -3
- package/src/modes/components/settings-defs.ts +2 -2
- package/src/modes/components/settings-selector.ts +2 -2
- package/src/modes/components/show-images-selector.ts +1 -1
- package/src/modes/components/status-line/segments.ts +2 -2
- package/src/modes/components/status-line/separators.ts +1 -1
- package/src/modes/components/status-line/types.ts +2 -2
- package/src/modes/components/status-line-segment-editor.ts +2 -2
- package/src/modes/components/status-line.ts +3 -3
- package/src/modes/components/theme-selector.ts +1 -1
- package/src/modes/components/thinking-selector.ts +1 -1
- package/src/modes/components/todo-display.ts +2 -2
- package/src/modes/components/todo-reminder.ts +2 -2
- package/src/modes/components/tool-execution.ts +11 -6
- package/src/modes/components/tree-selector.ts +3 -3
- package/src/modes/components/ttsr-notification.ts +2 -2
- package/src/modes/components/user-message-selector.ts +1 -1
- package/src/modes/components/user-message.ts +1 -1
- package/src/modes/components/welcome.ts +2 -2
- package/src/modes/controllers/command-controller.ts +15 -15
- package/src/modes/controllers/event-controller.ts +13 -9
- package/src/modes/controllers/extension-ui-controller.ts +17 -11
- package/src/modes/controllers/input-controller.ts +6 -6
- package/src/modes/controllers/selector-controller.ts +22 -16
- package/src/modes/interactive-mode.ts +12 -12
- package/src/modes/print-mode.ts +1 -1
- package/src/modes/rpc/rpc-client.ts +3 -3
- package/src/modes/rpc/rpc-mode.ts +6 -3
- package/src/modes/rpc/rpc-types.ts +3 -3
- package/src/modes/theme/theme.ts +1 -1
- package/src/modes/types.ts +8 -8
- package/src/modes/utils/ui-helpers.ts +14 -14
- package/src/patch/applicator.ts +1 -1
- package/src/patch/diff.ts +1 -1
- package/src/patch/index.ts +8 -8
- package/src/patch/shared.ts +9 -9
- package/src/sdk.ts +19 -16
- package/src/session/agent-session.ts +27 -27
- package/src/session/agent-storage.ts +2 -2
- package/src/session/auth-storage.ts +1 -1
- package/src/session/compaction/branch-summarization.ts +7 -5
- package/src/session/compaction/compaction.ts +16 -6
- package/src/session/compaction/utils.ts +5 -3
- package/src/session/history-storage.ts +1 -1
- package/src/session/messages.ts +2 -2
- package/src/session/session-manager.ts +2 -2
- package/src/session/storage-migration.ts +2 -2
- package/src/session/streaming-output.ts +1 -1
- package/src/ssh/connection-manager.ts +1 -1
- package/src/ssh/ssh-executor.ts +1 -1
- package/src/ssh/sshfs-mount.ts +1 -1
- package/src/system-prompt.ts +14 -8
- package/src/task/agents.ts +8 -8
- package/src/task/commands.ts +5 -5
- package/src/task/discovery.ts +3 -3
- package/src/task/executor.ts +11 -11
- package/src/task/index.ts +4 -4
- package/src/task/render.ts +6 -6
- package/src/task/subprocess-tool-registry.ts +1 -1
- package/src/task/worker-protocol.ts +3 -3
- package/src/task/worker.ts +18 -13
- package/src/tools/ask.ts +4 -4
- package/src/tools/bash-interceptor.ts +4 -1
- package/src/tools/bash.ts +8 -8
- package/src/tools/calculator.ts +4 -4
- package/src/tools/complete.ts +1 -1
- package/src/tools/context.ts +2 -2
- package/src/tools/fetch.ts +11 -11
- package/src/tools/find.ts +7 -7
- package/src/tools/gemini-image.ts +6 -6
- package/src/tools/grep.ts +8 -8
- package/src/tools/index.ts +19 -19
- package/src/tools/list-limit.ts +1 -1
- package/src/tools/ls.ts +4 -4
- package/src/tools/notebook.ts +3 -3
- package/src/tools/output-meta.ts +3 -3
- package/src/tools/output-utils.ts +1 -1
- package/src/tools/python.ts +10 -10
- package/src/tools/read.ts +11 -11
- package/src/tools/render-utils.ts +1 -1
- package/src/tools/renderers.ts +6 -6
- package/src/tools/review.ts +2 -2
- package/src/tools/ssh.ts +12 -12
- package/src/tools/todo-write.ts +5 -5
- package/src/tools/tool-result.ts +3 -3
- package/src/tools/write.ts +11 -11
- package/src/utils/changelog.ts +1 -1
- package/src/utils/file-mentions.ts +9 -4
- package/src/utils/image-convert.ts +1 -1
- package/src/utils/image-resize.ts +1 -1
- package/src/utils/shell.ts +1 -1
- package/src/utils/title-generator.ts +4 -4
- package/src/utils/tools-manager.ts +1 -1
- package/src/web/scrapers/choosealicense.ts +1 -1
- package/src/web/scrapers/twitter.ts +1 -1
- package/src/web/scrapers/types.ts +1 -1
- package/src/web/scrapers/utils.ts +1 -1
- package/src/web/scrapers/youtube.ts +2 -2
- package/src/web/search/auth.ts +8 -4
- package/src/web/search/index.ts +19 -10
- package/src/web/search/providers/anthropic.ts +8 -3
- package/src/web/search/providers/exa.ts +2 -2
- package/src/web/search/providers/perplexity.ts +2 -2
- 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.
|
|
3
|
+
"version": "8.0.3",
|
|
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": [
|
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
|
|
package/src/cli/config-cli.ts
CHANGED
|
@@ -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;
|
package/src/cli/list-models.ts
CHANGED
|
@@ -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 "
|
|
7
|
-
import { fuzzyFilter } from "
|
|
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")
|
package/src/cli/plugin-cli.ts
CHANGED
|
@@ -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> {
|
package/src/cli/setup-cli.ts
CHANGED
|
@@ -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
|
|
package/src/cli/stats-cli.ts
CHANGED
|
@@ -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
|
package/src/cli/update-cli.ts
CHANGED
|
@@ -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 "
|
|
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 "
|
|
11
|
-
import { readFile } from "
|
|
12
|
-
import { registerProvider } from "
|
|
13
|
-
import type { LoadContext, LoadResult } from "
|
|
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";
|
package/src/discovery/builtin.ts
CHANGED
|
@@ -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,
|
package/src/discovery/claude.ts
CHANGED
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { join, sep } from "node:path";
|
|
9
|
-
import { type ContextFile, contextFileCapability } from "
|
|
10
|
-
import { type ExtensionModule, extensionModuleCapability } from "
|
|
11
|
-
import { readFile } from "
|
|
12
|
-
import { type Hook, hookCapability } from "
|
|
13
|
-
import { registerProvider } from "
|
|
14
|
-
import { type MCPServer, mcpCapability } from "
|
|
15
|
-
import { type Settings, settingsCapability } from "
|
|
16
|
-
import { type Skill, skillCapability } from "
|
|
17
|
-
import { type SlashCommand, slashCommandCapability } from "
|
|
18
|
-
import { type SystemPrompt, systemPromptCapability } from "
|
|
19
|
-
import { type CustomTool, toolCapability } from "
|
|
20
|
-
import type { LoadContext, LoadResult } from "
|
|
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,
|
package/src/discovery/cline.ts
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { dirname, resolve } from "node:path";
|
|
9
|
-
import { readDirEntries, readFile } from "
|
|
10
|
-
import { registerProvider } from "
|
|
11
|
-
import type { Rule } from "
|
|
12
|
-
import { ruleCapability } from "
|
|
13
|
-
import type { LoadContext, LoadResult } from "
|
|
14
|
-
import { parseFrontmatter } from "
|
|
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";
|
package/src/discovery/codex.ts
CHANGED
|
@@ -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,
|
package/src/discovery/cursor.ts
CHANGED
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
* - settings: From settings.json if present
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { readFile } from "
|
|
18
|
-
import { registerProvider } from "
|
|
19
|
-
import { type MCPServer, mcpCapability } from "
|
|
20
|
-
import type { Rule } from "
|
|
21
|
-
import { ruleCapability } from "
|
|
22
|
-
import type { Settings } from "
|
|
23
|
-
import { settingsCapability } from "
|
|
24
|
-
import type { LoadContext, LoadResult } from "
|
|
25
|
-
import { parseFrontmatter } from "
|
|
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,
|
package/src/discovery/gemini.ts
CHANGED
|
@@ -17,15 +17,19 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { join, sep } from "node:path";
|
|
20
|
-
import { type ContextFile, contextFileCapability } from "
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
import { type
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
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,
|
package/src/discovery/github.ts
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { basename, dirname, sep } from "node:path";
|
|
16
|
-
import { type ContextFile, contextFileCapability } from "
|
|
17
|
-
import { readFile } from "
|
|
18
|
-
import { registerProvider } from "
|
|
19
|
-
import { type Instruction, instructionCapability } from "
|
|
20
|
-
import type { LoadContext, LoadResult, SourceMeta } from "
|
|
21
|
-
import { parseFrontmatter } from "
|
|
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";
|
package/src/discovery/helpers.ts
CHANGED
|
@@ -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 "
|
|
9
|
-
import type { Skill, SkillFrontmatter } from "
|
|
10
|
-
import type { LoadContext, LoadResult, SourceMeta } from "
|
|
11
|
-
import { parseFrontmatter } from "
|
|
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;
|
package/src/discovery/index.ts
CHANGED
|
@@ -35,10 +35,10 @@ import "./agents-md";
|
|
|
35
35
|
import "./mcp-json";
|
|
36
36
|
import "./ssh";
|
|
37
37
|
|
|
38
|
-
export type { ContextFile } from "
|
|
39
|
-
export type { Extension, ExtensionManifest } from "
|
|
40
|
-
export type { ExtensionModule } from "
|
|
41
|
-
export type { Hook } from "
|
|
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 "
|
|
66
|
-
export type { Instruction } from "
|
|
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 "
|
|
69
|
-
export type { Prompt } from "
|
|
70
|
-
export type { Rule, RuleFrontmatter } from "
|
|
71
|
-
export type { Settings } from "
|
|
72
|
-
export type { Skill, SkillFrontmatter } from "
|
|
73
|
-
export type { SlashCommand } from "
|
|
74
|
-
export type { SSHHost } from "
|
|
75
|
-
export type { SystemPrompt } from "
|
|
76
|
-
export type { CustomTool } from "
|
|
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 "
|
|
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 "
|
|
12
|
-
import { registerProvider } from "
|
|
13
|
-
import { type MCPServer, mcpCapability } from "
|
|
14
|
-
import type { LoadContext, LoadResult, SourceMeta } from "
|
|
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";
|
package/src/discovery/ssh.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { join } from "node:path";
|
|
9
|
-
import { readFile } from "
|
|
10
|
-
import { registerProvider } from "
|
|
11
|
-
import { type SSHHost, sshCapability } from "
|
|
12
|
-
import type { LoadContext, LoadResult, SourceMeta } from "
|
|
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";
|
package/src/discovery/vscode.ts
CHANGED
|
@@ -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 "
|
|
9
|
-
import { registerProvider } from "
|
|
10
|
-
import { type MCPServer, mcpCapability } from "
|
|
11
|
-
import type { LoadContext, LoadResult } from "
|
|
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";
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
* - Legacy .windsurfrules file
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { readFile } from "
|
|
15
|
-
import { registerProvider } from "
|
|
16
|
-
import { type MCPServer, mcpCapability } from "
|
|
17
|
-
import { type Rule, ruleCapability } from "
|
|
18
|
-
import type { LoadContext, LoadResult } from "
|
|
19
|
-
import { parseFrontmatter } from "
|
|
14
|
+
import { readFile } from "@oh-my-pi/pi-coding-agent/capability/fs";
|
|
15
|
+
import { registerProvider } from "@oh-my-pi/pi-coding-agent/capability/index";
|
|
16
|
+
import { type MCPServer, mcpCapability } from "@oh-my-pi/pi-coding-agent/capability/mcp";
|
|
17
|
+
import { type Rule, ruleCapability } from "@oh-my-pi/pi-coding-agent/capability/rule";
|
|
18
|
+
import type { LoadContext, LoadResult } from "@oh-my-pi/pi-coding-agent/capability/types";
|
|
19
|
+
import { parseFrontmatter } from "@oh-my-pi/pi-coding-agent/utils/frontmatter";
|
|
20
20
|
import {
|
|
21
21
|
createSourceMeta,
|
|
22
22
|
expandEnvVarsDeep,
|