@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.
- package/package.json +7 -3
- 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
|
@@ -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,
|
package/src/exa/company.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Research companies using Exa's comprehensive data sources.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { CustomTool } from "@oh-my-pi/pi-coding-agent/extensibility/custom-tools/types";
|
|
7
8
|
import { Type } from "@sinclair/typebox";
|
|
8
|
-
import type { CustomTool } from "$c/extensibility/custom-tools/types";
|
|
9
9
|
import { callExaTool, findApiKey, formatSearchResults, isSearchResponse } from "./mcp-client";
|
|
10
10
|
import type { ExaRenderDetails } from "./types";
|
|
11
11
|
|
package/src/exa/index.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* - 14 websets tools (CRUD, items, search, enrichment, monitor)
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import type { ExaSettings } from "
|
|
13
|
-
import type { CustomTool } from "
|
|
12
|
+
import type { ExaSettings } from "@oh-my-pi/pi-coding-agent/config/settings-manager";
|
|
13
|
+
import type { CustomTool } from "@oh-my-pi/pi-coding-agent/extensibility/custom-tools/types";
|
|
14
14
|
import { companyTool } from "./company";
|
|
15
15
|
import { linkedinTool } from "./linkedin";
|
|
16
16
|
import { researcherTools } from "./researcher";
|
package/src/exa/linkedin.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Search LinkedIn for people, companies, and professional content.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { CustomTool } from "@oh-my-pi/pi-coding-agent/extensibility/custom-tools/types";
|
|
7
8
|
import { Type } from "@sinclair/typebox";
|
|
8
|
-
import type { CustomTool } from "$c/extensibility/custom-tools/types";
|
|
9
9
|
import { callExaTool, findApiKey, formatSearchResults, isSearchResponse } from "./mcp-client";
|
|
10
10
|
import type { ExaRenderDetails } from "./types";
|
|
11
11
|
|
package/src/exa/mcp-client.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
import { existsSync, readFileSync } from "node:fs";
|
|
8
8
|
import { homedir } from "node:os";
|
|
9
|
+
import type { CustomTool, CustomToolResult } from "@oh-my-pi/pi-coding-agent/extensibility/custom-tools/types";
|
|
10
|
+
import { callMCP } from "@oh-my-pi/pi-coding-agent/mcp/json-rpc";
|
|
9
11
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
10
12
|
import type { TSchema } from "@sinclair/typebox";
|
|
11
|
-
import type { CustomTool, CustomToolResult } from "$c/extensibility/custom-tools/types";
|
|
12
|
-
import { callMCP } from "$c/mcp/json-rpc";
|
|
13
13
|
import type {
|
|
14
14
|
ExaRenderDetails,
|
|
15
15
|
ExaSearchResponse,
|
package/src/exa/render.ts
CHANGED
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
* Tree-based rendering with collapsed/expanded states for Exa search results.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type {
|
|
8
|
-
import {
|
|
9
|
-
import { logger } from "@oh-my-pi/pi-utils";
|
|
10
|
-
import type { RenderResultOptions } from "$c/extensibility/custom-tools/types";
|
|
11
|
-
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";
|
|
12
9
|
import {
|
|
13
10
|
formatCount,
|
|
14
11
|
formatExpandHint,
|
|
@@ -19,7 +16,10 @@ import {
|
|
|
19
16
|
PREVIEW_LIMITS,
|
|
20
17
|
TRUNCATE_LENGTHS,
|
|
21
18
|
truncate,
|
|
22
|
-
} from "
|
|
19
|
+
} from "@oh-my-pi/pi-coding-agent/tools/render-utils";
|
|
20
|
+
import type { Component } from "@oh-my-pi/pi-tui";
|
|
21
|
+
import { Text } from "@oh-my-pi/pi-tui";
|
|
22
|
+
import { logger } from "@oh-my-pi/pi-utils";
|
|
23
23
|
import type { ExaRenderDetails } from "./types";
|
|
24
24
|
|
|
25
25
|
const COLLAPSED_PREVIEW_LINES = PREVIEW_LIMITS.COLLAPSED_LINES;
|
package/src/exa/researcher.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Async research tasks with polling for completion.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { CustomTool } from "@oh-my-pi/pi-coding-agent/extensibility/custom-tools/types";
|
|
7
8
|
import { Type } from "@sinclair/typebox";
|
|
8
|
-
import type { CustomTool } from "$c/extensibility/custom-tools/types";
|
|
9
9
|
import { callExaTool, findApiKey } from "./mcp-client";
|
|
10
10
|
import type { ExaRenderDetails } from "./types";
|
|
11
11
|
|
package/src/exa/search.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import { StringEnum } from "@oh-my-pi/pi-ai";
|
|
8
|
+
import type { CustomTool } from "@oh-my-pi/pi-coding-agent/extensibility/custom-tools/types";
|
|
8
9
|
import { Type } from "@sinclair/typebox";
|
|
9
|
-
import type { CustomTool } from "$c/extensibility/custom-tools/types";
|
|
10
10
|
import { callExaTool, findApiKey, formatSearchResults, isSearchResponse } from "./mcp-client";
|
|
11
11
|
import type { ExaRenderDetails } from "./types";
|
|
12
12
|
|
package/src/exa/websets.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* CRUD operations for websets, items, searches, enrichments, and monitoring.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { CustomTool } from "@oh-my-pi/pi-coding-agent/extensibility/custom-tools/types";
|
|
7
8
|
import { Type } from "@sinclair/typebox";
|
|
8
|
-
import type { CustomTool } from "$c/extensibility/custom-tools/types";
|
|
9
9
|
import { callWebsetsTool, findApiKey } from "./mcp-client";
|
|
10
10
|
import type { ExaRenderDetails } from "./types";
|
|
11
11
|
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Provides unified bash execution for AgentSession.executeBash() and direct calls.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import { OutputSink } from "@oh-my-pi/pi-coding-agent/session/streaming-output";
|
|
8
|
+
import { getShellConfig } from "@oh-my-pi/pi-coding-agent/utils/shell";
|
|
9
|
+
import { getOrCreateSnapshot, getSnapshotSourceCommand } from "@oh-my-pi/pi-coding-agent/utils/shell-snapshot";
|
|
7
10
|
import { cspawn, Exception, ptree } from "@oh-my-pi/pi-utils";
|
|
8
|
-
import { OutputSink } from "$c/session/streaming-output";
|
|
9
|
-
import { getShellConfig } from "$c/utils/shell";
|
|
10
|
-
import { getOrCreateSnapshot, getSnapshotSourceCommand } from "$c/utils/shell-snapshot";
|
|
11
11
|
|
|
12
12
|
export interface BashExecutorOptions {
|
|
13
13
|
cwd?: string;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { existsSync } from "node:fs";
|
|
9
9
|
import { join } from "node:path";
|
|
10
|
-
import { getAgentDir } from "
|
|
10
|
+
import { getAgentDir } from "@oh-my-pi/pi-coding-agent/config";
|
|
11
11
|
|
|
12
12
|
export interface CustomShareResult {
|
|
13
13
|
/** URL to display/open (optional - script may handle everything itself) */
|
package/src/export/html/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { existsSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { basename } from "node:path";
|
|
3
3
|
import type { AgentState } from "@oh-my-pi/pi-agent-core";
|
|
4
|
-
import { APP_NAME } from "
|
|
5
|
-
import { getResolvedThemeColors, getThemeExportColors } from "
|
|
6
|
-
import { SessionManager } from "
|
|
4
|
+
import { APP_NAME } from "@oh-my-pi/pi-coding-agent/config";
|
|
5
|
+
import { getResolvedThemeColors, getThemeExportColors } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
6
|
+
import { SessionManager } from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
|
7
7
|
|
|
8
8
|
// Pre-generated template (created by scripts/generate-template.ts at publish time)
|
|
9
9
|
import { TEMPLATE } from "./template.generated";
|
package/src/export/ttsr.ts
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* injected as a system reminder, and the request is retried.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import type { Rule } from "@oh-my-pi/pi-coding-agent/capability/rule";
|
|
10
|
+
import type { TtsrSettings } from "@oh-my-pi/pi-coding-agent/config/settings-manager";
|
|
9
11
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
10
|
-
import type { Rule } from "$c/capability/rule";
|
|
11
|
-
import type { TtsrSettings } from "$c/config/settings-manager";
|
|
12
12
|
|
|
13
13
|
interface TtsrEntry {
|
|
14
14
|
rule: Rule;
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
* multiple reviewer agents based on diff weight and locality.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { renderPromptTemplate } from "
|
|
16
|
-
import type { CustomCommand, CustomCommandAPI } from "
|
|
17
|
-
import type { HookCommandContext } from "
|
|
18
|
-
import reviewRequestTemplate from "
|
|
15
|
+
import { renderPromptTemplate } from "@oh-my-pi/pi-coding-agent/config/prompt-templates";
|
|
16
|
+
import type { CustomCommand, CustomCommandAPI } from "@oh-my-pi/pi-coding-agent/extensibility/custom-commands/types";
|
|
17
|
+
import type { HookCommandContext } from "@oh-my-pi/pi-coding-agent/extensibility/hooks/types";
|
|
18
|
+
import reviewRequestTemplate from "@oh-my-pi/pi-coding-agent/prompts/review-request.md" with { type: "text" };
|
|
19
19
|
|
|
20
20
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
21
21
|
// Types
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
import { type Dirent, existsSync, readdirSync } from "node:fs";
|
|
9
9
|
import * as path from "node:path";
|
|
10
|
+
import { getAgentDir, getConfigDirs } from "@oh-my-pi/pi-coding-agent/config";
|
|
11
|
+
import { execCommand } from "@oh-my-pi/pi-coding-agent/exec/exec";
|
|
12
|
+
import * as piCodingAgent from "@oh-my-pi/pi-coding-agent/index";
|
|
10
13
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
11
14
|
import * as typebox from "@sinclair/typebox";
|
|
12
|
-
import { getAgentDir, getConfigDirs } from "$c/config";
|
|
13
|
-
import { execCommand } from "$c/exec/exec";
|
|
14
|
-
import * as piCodingAgent from "$c/index";
|
|
15
15
|
import { ReviewCommand } from "./bundled/review";
|
|
16
16
|
import type {
|
|
17
17
|
CustomCommand,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* arbitrary logic with full access to the hook context.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { ExecOptions, ExecResult, HookCommandContext } from "
|
|
9
|
+
import type { ExecOptions, ExecResult, HookCommandContext } from "@oh-my-pi/pi-coding-agent/extensibility/hooks/types";
|
|
10
10
|
|
|
11
11
|
// Re-export for custom commands to use
|
|
12
12
|
export type { ExecOptions, ExecResult, HookCommandContext };
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import * as path from "node:path";
|
|
9
|
+
import { toolCapability } from "@oh-my-pi/pi-coding-agent/capability/tool";
|
|
10
|
+
import { type CustomTool, loadCapability } from "@oh-my-pi/pi-coding-agent/discovery";
|
|
11
|
+
import { expandPath } from "@oh-my-pi/pi-coding-agent/discovery/helpers";
|
|
12
|
+
import type { ExecOptions } from "@oh-my-pi/pi-coding-agent/exec/exec";
|
|
13
|
+
import { execCommand } from "@oh-my-pi/pi-coding-agent/exec/exec";
|
|
14
|
+
import type { HookUIContext } from "@oh-my-pi/pi-coding-agent/extensibility/hooks/types";
|
|
15
|
+
import { getAllPluginToolPaths } from "@oh-my-pi/pi-coding-agent/extensibility/plugins/loader";
|
|
16
|
+
import * as piCodingAgent from "@oh-my-pi/pi-coding-agent/index";
|
|
17
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
9
18
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
10
19
|
import * as typebox from "@sinclair/typebox";
|
|
11
|
-
import { toolCapability } from "$c/capability/tool";
|
|
12
|
-
import { type CustomTool, loadCapability } from "$c/discovery";
|
|
13
|
-
import { expandPath } from "$c/discovery/helpers";
|
|
14
|
-
import type { ExecOptions } from "$c/exec/exec";
|
|
15
|
-
import { execCommand } from "$c/exec/exec";
|
|
16
|
-
import type { HookUIContext } from "$c/extensibility/hooks/types";
|
|
17
|
-
import { getAllPluginToolPaths } from "$c/extensibility/plugins/loader";
|
|
18
|
-
import * as piCodingAgent from "$c/index";
|
|
19
|
-
import { theme } from "$c/modes/theme/theme";
|
|
20
20
|
import type { CustomToolAPI, CustomToolFactory, LoadedCustomTool, ToolLoadError } from "./types";
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
import type { AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
|
|
9
9
|
import type { Model } from "@oh-my-pi/pi-ai";
|
|
10
|
+
import type { ModelRegistry } from "@oh-my-pi/pi-coding-agent/config/model-registry";
|
|
11
|
+
import type { ExecOptions, ExecResult } from "@oh-my-pi/pi-coding-agent/exec/exec";
|
|
12
|
+
import type { HookUIContext } from "@oh-my-pi/pi-coding-agent/extensibility/hooks/types";
|
|
13
|
+
import type { Theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
14
|
+
import type { ReadonlySessionManager } from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
|
10
15
|
import type { Component } from "@oh-my-pi/pi-tui";
|
|
11
16
|
import type { Static, TSchema } from "@sinclair/typebox";
|
|
12
|
-
import type { ModelRegistry } from "$c/config/model-registry";
|
|
13
|
-
import type { ExecOptions, ExecResult } from "$c/exec/exec";
|
|
14
|
-
import type { HookUIContext } from "$c/extensibility/hooks/types";
|
|
15
|
-
import type { Theme } from "$c/modes/theme/theme";
|
|
16
|
-
import type { ReadonlySessionManager } from "$c/session/session-manager";
|
|
17
17
|
|
|
18
18
|
/** Alias for clarity */
|
|
19
19
|
export type CustomToolUIContext = HookUIContext;
|
|
@@ -22,7 +22,7 @@ export type CustomToolUIContext = HookUIContext;
|
|
|
22
22
|
export type { AgentToolResult, AgentToolUpdateCallback };
|
|
23
23
|
|
|
24
24
|
// Re-export for backward compatibility
|
|
25
|
-
export type { ExecOptions, ExecResult } from "
|
|
25
|
+
export type { ExecOptions, ExecResult } from "@oh-my-pi/pi-coding-agent/exec/exec";
|
|
26
26
|
|
|
27
27
|
/** API passed to custom tool factory (stable across session changes) */
|
|
28
28
|
export interface CustomToolAPI {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import type { AgentTool, AgentToolResult, AgentToolUpdateCallback, RenderResultOptions } from "@oh-my-pi/pi-agent-core";
|
|
6
|
+
import type { Theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
6
7
|
import type { Component } from "@oh-my-pi/pi-tui";
|
|
7
8
|
import type { Static, TSchema } from "@sinclair/typebox";
|
|
8
|
-
import type { Theme } from "$c/modes/theme/theme";
|
|
9
9
|
import type { CustomTool, CustomToolContext, LoadedCustomTool } from "./types";
|
|
10
10
|
|
|
11
11
|
export class CustomToolAdapter<TParams extends TSchema = TSchema, TDetails = any, TTheme extends Theme = Theme>
|
|
@@ -6,18 +6,18 @@ import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
|
6
6
|
import * as path from "node:path";
|
|
7
7
|
import type { ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
8
8
|
import type { ImageContent, Model, TextContent } from "@oh-my-pi/pi-ai";
|
|
9
|
+
import { type ExtensionModule, extensionModuleCapability } from "@oh-my-pi/pi-coding-agent/capability/extension-module";
|
|
10
|
+
import { loadCapability } from "@oh-my-pi/pi-coding-agent/discovery";
|
|
11
|
+
import { expandPath, getExtensionNameFromPath } from "@oh-my-pi/pi-coding-agent/discovery/helpers";
|
|
12
|
+
import type { ExecOptions } from "@oh-my-pi/pi-coding-agent/exec/exec";
|
|
13
|
+
import { execCommand } from "@oh-my-pi/pi-coding-agent/exec/exec";
|
|
14
|
+
import * as piCodingAgent from "@oh-my-pi/pi-coding-agent/index";
|
|
15
|
+
import type { CustomMessage } from "@oh-my-pi/pi-coding-agent/session/messages";
|
|
16
|
+
import { EventBus } from "@oh-my-pi/pi-coding-agent/utils/event-bus";
|
|
9
17
|
import type { KeyId } from "@oh-my-pi/pi-tui";
|
|
10
18
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
11
19
|
import type { TSchema } from "@sinclair/typebox";
|
|
12
20
|
import * as TypeBox from "@sinclair/typebox";
|
|
13
|
-
import { type ExtensionModule, extensionModuleCapability } from "$c/capability/extension-module";
|
|
14
|
-
import { loadCapability } from "$c/discovery";
|
|
15
|
-
import { expandPath, getExtensionNameFromPath } from "$c/discovery/helpers";
|
|
16
|
-
import type { ExecOptions } from "$c/exec/exec";
|
|
17
|
-
import { execCommand } from "$c/exec/exec";
|
|
18
|
-
import * as piCodingAgent from "$c/index";
|
|
19
|
-
import type { CustomMessage } from "$c/session/messages";
|
|
20
|
-
import { EventBus } from "$c/utils/event-bus";
|
|
21
21
|
import type {
|
|
22
22
|
Extension,
|
|
23
23
|
ExtensionAPI,
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
|
|
6
6
|
import type { ImageContent, Model } from "@oh-my-pi/pi-ai";
|
|
7
|
+
import type { ModelRegistry } from "@oh-my-pi/pi-coding-agent/config/model-registry";
|
|
8
|
+
import { type Theme, theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
9
|
+
import type { SessionManager } from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
|
7
10
|
import type { KeyId } from "@oh-my-pi/pi-tui";
|
|
8
11
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
9
|
-
import type { ModelRegistry } from "$c/config/model-registry";
|
|
10
|
-
import { type Theme, theme } from "$c/modes/theme/theme";
|
|
11
|
-
import type { SessionManager } from "$c/session/session-manager";
|
|
12
12
|
import type {
|
|
13
13
|
BeforeAgentStartEvent,
|
|
14
14
|
BeforeAgentStartEventResult,
|
|
@@ -10,30 +10,36 @@
|
|
|
10
10
|
|
|
11
11
|
import type { AgentMessage, AgentToolResult, AgentToolUpdateCallback, ThinkingLevel } from "@oh-my-pi/pi-agent-core";
|
|
12
12
|
import type { ImageContent, Model, TextContent, ToolResultMessage } from "@oh-my-pi/pi-ai";
|
|
13
|
-
import type {
|
|
14
|
-
import type {
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
17
|
-
import type
|
|
18
|
-
import type {
|
|
19
|
-
import type
|
|
20
|
-
import type {
|
|
21
|
-
import type {
|
|
22
|
-
import type {
|
|
23
|
-
import type { CompactionPreparation, CompactionResult } from "$c/session/compaction";
|
|
24
|
-
import type { CustomMessage } from "$c/session/messages";
|
|
13
|
+
import type { KeybindingsManager } from "@oh-my-pi/pi-coding-agent/config/keybindings";
|
|
14
|
+
import type { ModelRegistry } from "@oh-my-pi/pi-coding-agent/config/model-registry";
|
|
15
|
+
import type { BashResult } from "@oh-my-pi/pi-coding-agent/exec/bash-executor";
|
|
16
|
+
import type { ExecOptions, ExecResult } from "@oh-my-pi/pi-coding-agent/exec/exec";
|
|
17
|
+
import type * as piCodingAgent from "@oh-my-pi/pi-coding-agent/index";
|
|
18
|
+
import type { PythonResult } from "@oh-my-pi/pi-coding-agent/ipy/executor";
|
|
19
|
+
import type { Theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
20
|
+
import type { EditToolDetails } from "@oh-my-pi/pi-coding-agent/patch";
|
|
21
|
+
import type { CompactionPreparation, CompactionResult } from "@oh-my-pi/pi-coding-agent/session/compaction";
|
|
22
|
+
import type { CustomMessage } from "@oh-my-pi/pi-coding-agent/session/messages";
|
|
25
23
|
import type {
|
|
26
24
|
BranchSummaryEntry,
|
|
27
25
|
CompactionEntry,
|
|
28
26
|
ReadonlySessionManager,
|
|
29
27
|
SessionEntry,
|
|
30
28
|
SessionManager,
|
|
31
|
-
} from "
|
|
32
|
-
import type {
|
|
33
|
-
|
|
29
|
+
} from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
|
30
|
+
import type {
|
|
31
|
+
BashToolDetails,
|
|
32
|
+
FindToolDetails,
|
|
33
|
+
GrepToolDetails,
|
|
34
|
+
LsToolDetails,
|
|
35
|
+
ReadToolDetails,
|
|
36
|
+
} from "@oh-my-pi/pi-coding-agent/tools";
|
|
37
|
+
import type { EventBus } from "@oh-my-pi/pi-coding-agent/utils/event-bus";
|
|
38
|
+
import type { AutocompleteItem, Component, EditorComponent, EditorTheme, KeyId, TUI } from "@oh-my-pi/pi-tui";
|
|
39
|
+
import type { Static, TSchema } from "@sinclair/typebox";
|
|
34
40
|
|
|
35
|
-
export type { AppAction, KeybindingsManager } from "
|
|
36
|
-
export type { ExecOptions, ExecResult } from "
|
|
41
|
+
export type { AppAction, KeybindingsManager } from "@oh-my-pi/pi-coding-agent/config/keybindings";
|
|
42
|
+
export type { ExecOptions, ExecResult } from "@oh-my-pi/pi-coding-agent/exec/exec";
|
|
37
43
|
export type { AgentToolResult, AgentToolUpdateCallback };
|
|
38
44
|
|
|
39
45
|
// ============================================================================
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import type { AgentTool, AgentToolContext, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
|
|
6
6
|
import type { ImageContent, TextContent } from "@oh-my-pi/pi-ai";
|
|
7
|
+
import type { Theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
7
8
|
import type { Static, TSchema } from "@sinclair/typebox";
|
|
8
|
-
import type { Theme } from "$c/modes/theme/theme";
|
|
9
9
|
import type { ExtensionRunner } from "./runner";
|
|
10
10
|
import type { RegisteredTool, ToolCallEventResult, ToolResultEventResult } from "./types";
|
|
11
11
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// biome-ignore assist/source/organizeImports: biome is not smart
|
|
2
|
-
export type { ReadonlySessionManager, UsageStatistics } from "
|
|
2
|
+
export type { ReadonlySessionManager, UsageStatistics } from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
|
3
3
|
export {
|
|
4
4
|
discoverAndLoadHooks,
|
|
5
5
|
loadHooks,
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as path from "node:path";
|
|
6
|
+
import { hookCapability } from "@oh-my-pi/pi-coding-agent/capability/hook";
|
|
7
|
+
import type { Hook } from "@oh-my-pi/pi-coding-agent/discovery";
|
|
8
|
+
import { loadCapability } from "@oh-my-pi/pi-coding-agent/discovery";
|
|
9
|
+
import { expandPath } from "@oh-my-pi/pi-coding-agent/discovery/helpers";
|
|
10
|
+
import * as piCodingAgent from "@oh-my-pi/pi-coding-agent/index";
|
|
11
|
+
import type { HookMessage } from "@oh-my-pi/pi-coding-agent/session/messages";
|
|
12
|
+
import type { SessionManager } from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
|
6
13
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
7
14
|
import * as typebox from "@sinclair/typebox";
|
|
8
|
-
import { hookCapability } from "$c/capability/hook";
|
|
9
|
-
import type { Hook } from "$c/discovery";
|
|
10
|
-
import { loadCapability } from "$c/discovery";
|
|
11
|
-
import { expandPath } from "$c/discovery/helpers";
|
|
12
|
-
import * as piCodingAgent from "$c/index";
|
|
13
|
-
import type { HookMessage } from "$c/session/messages";
|
|
14
|
-
import type { SessionManager } from "$c/session/session-manager";
|
|
15
15
|
import { execCommand } from "./runner";
|
|
16
16
|
import type { ExecOptions, HookAPI, HookFactory, HookMessageRenderer, RegisteredCommand } from "./types";
|
|
17
17
|
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
|
|
6
6
|
import type { Model } from "@oh-my-pi/pi-ai";
|
|
7
|
-
import type { ModelRegistry } from "
|
|
8
|
-
import { theme } from "
|
|
9
|
-
import type { SessionManager } from "
|
|
7
|
+
import type { ModelRegistry } from "@oh-my-pi/pi-coding-agent/config/model-registry";
|
|
8
|
+
import { theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
9
|
+
import type { SessionManager } from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
|
10
10
|
import type {
|
|
11
11
|
AppendEntryHandler,
|
|
12
12
|
BranchHandler,
|
|
@@ -40,7 +40,7 @@ import type {
|
|
|
40
40
|
export type HookErrorListener = (error: HookError) => void;
|
|
41
41
|
|
|
42
42
|
// Re-export execCommand for backward compatibility
|
|
43
|
-
export { execCommand } from "
|
|
43
|
+
export { execCommand } from "@oh-my-pi/pi-coding-agent/exec/exec";
|
|
44
44
|
|
|
45
45
|
/** No-op UI context used when no UI is available */
|
|
46
46
|
const noOpUIContext: HookUIContext = {
|
|
@@ -7,24 +7,30 @@
|
|
|
7
7
|
|
|
8
8
|
import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
|
|
9
9
|
import type { ImageContent, Message, Model, TextContent, ToolResultMessage } from "@oh-my-pi/pi-ai";
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
14
|
-
import type {
|
|
15
|
-
import type {
|
|
16
|
-
import type { HookMessage } from "$c/session/messages";
|
|
10
|
+
import type { ModelRegistry } from "@oh-my-pi/pi-coding-agent/config/model-registry";
|
|
11
|
+
import type { ExecOptions, ExecResult } from "@oh-my-pi/pi-coding-agent/exec/exec";
|
|
12
|
+
import type { Theme } from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
13
|
+
import type { EditToolDetails } from "@oh-my-pi/pi-coding-agent/patch";
|
|
14
|
+
import type { CompactionPreparation, CompactionResult } from "@oh-my-pi/pi-coding-agent/session/compaction/index";
|
|
15
|
+
import type { HookMessage } from "@oh-my-pi/pi-coding-agent/session/messages";
|
|
17
16
|
import type {
|
|
18
17
|
BranchSummaryEntry,
|
|
19
18
|
CompactionEntry,
|
|
20
19
|
ReadonlySessionManager,
|
|
21
20
|
SessionEntry,
|
|
22
21
|
SessionManager,
|
|
23
|
-
} from "
|
|
24
|
-
import type {
|
|
22
|
+
} from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
|
23
|
+
import type {
|
|
24
|
+
BashToolDetails,
|
|
25
|
+
FindToolDetails,
|
|
26
|
+
GrepToolDetails,
|
|
27
|
+
LsToolDetails,
|
|
28
|
+
ReadToolDetails,
|
|
29
|
+
} from "@oh-my-pi/pi-coding-agent/tools/index";
|
|
30
|
+
import type { Component, TUI } from "@oh-my-pi/pi-tui";
|
|
25
31
|
|
|
26
32
|
// Re-export for backward compatibility
|
|
27
|
-
export type { ExecOptions, ExecResult } from "
|
|
33
|
+
export type { ExecOptions, ExecResult } from "@oh-my-pi/pi-coding-agent/exec/exec";
|
|
28
34
|
|
|
29
35
|
/**
|
|
30
36
|
* UI context for hooks to request interactive UI from the harness.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { lstatSync, symlinkSync, unlinkSync } from "node:fs";
|
|
2
2
|
import { mkdir } from "node:fs/promises";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
|
-
import { getAgentDir } from "
|
|
4
|
+
import { getAgentDir } from "@oh-my-pi/pi-coding-agent/config";
|
|
5
5
|
import type { InstalledPlugin } from "./types";
|
|
6
6
|
|
|
7
7
|
const PLUGINS_DIR = join(getAgentDir(), "plugins");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { homedir } from "node:os";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { CONFIG_DIR_NAME, getConfigDirPaths } from "
|
|
3
|
+
import { CONFIG_DIR_NAME, getConfigDirPaths } from "@oh-my-pi/pi-coding-agent/config";
|
|
4
4
|
|
|
5
5
|
// =============================================================================
|
|
6
6
|
// Plugin Directory Paths
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { readdirSync, readFileSync, statSync } from "node:fs";
|
|
2
2
|
import { realpath } from "node:fs/promises";
|
|
3
3
|
import { basename, join } from "node:path";
|
|
4
|
+
import { skillCapability } from "@oh-my-pi/pi-coding-agent/capability/skill";
|
|
5
|
+
import type { SourceMeta } from "@oh-my-pi/pi-coding-agent/capability/types";
|
|
6
|
+
import type { SkillsSettings } from "@oh-my-pi/pi-coding-agent/config/settings-manager";
|
|
7
|
+
import type {
|
|
8
|
+
Skill as CapabilitySkill,
|
|
9
|
+
SkillFrontmatter as ImportedSkillFrontmatter,
|
|
10
|
+
} from "@oh-my-pi/pi-coding-agent/discovery";
|
|
11
|
+
import { loadCapability } from "@oh-my-pi/pi-coding-agent/discovery";
|
|
12
|
+
import { parseFrontmatter } from "@oh-my-pi/pi-coding-agent/utils/frontmatter";
|
|
4
13
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
5
|
-
import { skillCapability } from "$c/capability/skill";
|
|
6
|
-
import type { SourceMeta } from "$c/capability/types";
|
|
7
|
-
import type { SkillsSettings } from "$c/config/settings-manager";
|
|
8
|
-
import type { Skill as CapabilitySkill, SkillFrontmatter as ImportedSkillFrontmatter } from "$c/discovery";
|
|
9
|
-
import { loadCapability } from "$c/discovery";
|
|
10
|
-
import { parseFrontmatter } from "$c/utils/frontmatter";
|
|
11
14
|
|
|
12
15
|
// Re-export SkillFrontmatter for backward compatibility
|
|
13
16
|
export type { ImportedSkillFrontmatter as SkillFrontmatter };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { slashCommandCapability } from "
|
|
2
|
-
import { renderPromptTemplate } from "
|
|
3
|
-
import type { SlashCommand } from "
|
|
4
|
-
import { loadCapability } from "
|
|
5
|
-
import { EMBEDDED_COMMAND_TEMPLATES } from "
|
|
6
|
-
import { parseFrontmatter } from "
|
|
1
|
+
import { slashCommandCapability } from "@oh-my-pi/pi-coding-agent/capability/slash-command";
|
|
2
|
+
import { renderPromptTemplate } from "@oh-my-pi/pi-coding-agent/config/prompt-templates";
|
|
3
|
+
import type { SlashCommand } from "@oh-my-pi/pi-coding-agent/discovery";
|
|
4
|
+
import { loadCapability } from "@oh-my-pi/pi-coding-agent/discovery";
|
|
5
|
+
import { EMBEDDED_COMMAND_TEMPLATES } from "@oh-my-pi/pi-coding-agent/task/commands";
|
|
6
|
+
import { parseFrontmatter } from "@oh-my-pi/pi-coding-agent/utils/frontmatter";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Represents a custom slash command loaded from a file
|
package/src/index.ts
CHANGED
|
@@ -3,11 +3,7 @@
|
|
|
3
3
|
// TypeBox helper for string enums (convenience for custom tools)
|
|
4
4
|
// Re-export from pi-ai which uses the correct enum-based schema format
|
|
5
5
|
export { StringEnum } from "@oh-my-pi/pi-ai";
|
|
6
|
-
|
|
7
|
-
export { Container, Markdown, Spacer, Text } from "@oh-my-pi/pi-tui";
|
|
8
|
-
// Logging
|
|
9
|
-
export { logger } from "@oh-my-pi/pi-utils";
|
|
10
|
-
export type { FileDiagnosticsResult } from "$c/lsp/index";
|
|
6
|
+
export type { FileDiagnosticsResult } from "@oh-my-pi/pi-coding-agent/lsp/index";
|
|
11
7
|
// UI components for extensions
|
|
12
8
|
export {
|
|
13
9
|
ArminComponent,
|
|
@@ -41,7 +37,7 @@ export {
|
|
|
41
37
|
UserMessageComponent,
|
|
42
38
|
UserMessageSelectorComponent,
|
|
43
39
|
type VisualTruncateResult,
|
|
44
|
-
} from "
|
|
40
|
+
} from "@oh-my-pi/pi-coding-agent/modes/components/index";
|
|
45
41
|
// Theme utilities for custom tools
|
|
46
42
|
export {
|
|
47
43
|
getLanguageFromPath,
|
|
@@ -52,7 +48,11 @@ export {
|
|
|
52
48
|
initTheme,
|
|
53
49
|
Theme,
|
|
54
50
|
type ThemeColor,
|
|
55
|
-
} from "
|
|
51
|
+
} from "@oh-my-pi/pi-coding-agent/modes/theme/theme";
|
|
52
|
+
// Re-export TUI components for custom tool rendering
|
|
53
|
+
export { Container, Markdown, Spacer, Text } from "@oh-my-pi/pi-tui";
|
|
54
|
+
// Logging
|
|
55
|
+
export { logger } from "@oh-my-pi/pi-utils";
|
|
56
56
|
export { getAgentDir, VERSION } from "./config";
|
|
57
57
|
export { formatKeyHint, formatKeyHints } from "./config/keybindings";
|
|
58
58
|
export { ModelRegistry } from "./config/model-registry";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* - rule://<name> - Reads rule content
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { Rule } from "
|
|
10
|
+
import type { Rule } from "@oh-my-pi/pi-coding-agent/capability/rule";
|
|
11
11
|
import type { InternalResource, InternalUrl, ProtocolHandler } from "./types";
|
|
12
12
|
|
|
13
13
|
export interface RuleProtocolOptions {
|