@oh-my-pi/pi-coding-agent 8.4.2 → 8.4.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-coding-agent",
3
- "version": "8.4.2",
3
+ "version": "8.4.3",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "ompConfig": {
@@ -50,6 +50,14 @@
50
50
  "types": "./src/session/*.ts",
51
51
  "import": "./src/session/*.ts"
52
52
  },
53
+ "./internal-urls": {
54
+ "types": "./src/internal-urls/index.ts",
55
+ "import": "./src/internal-urls/index.ts"
56
+ },
57
+ "./internal-urls/*": {
58
+ "types": "./src/internal-urls/*.ts",
59
+ "import": "./src/internal-urls/*.ts"
60
+ },
53
61
  "./vendor/photon/*": {
54
62
  "types": "./src/vendor/photon/*",
55
63
  "import": "./src/vendor/photon/*"
@@ -75,11 +83,11 @@
75
83
  "test": "bun test"
76
84
  },
77
85
  "dependencies": {
78
- "@oh-my-pi/omp-stats": "8.4.2",
79
- "@oh-my-pi/pi-agent-core": "8.4.2",
80
- "@oh-my-pi/pi-ai": "8.4.2",
81
- "@oh-my-pi/pi-tui": "8.4.2",
82
- "@oh-my-pi/pi-utils": "8.4.2",
86
+ "@oh-my-pi/omp-stats": "8.4.3",
87
+ "@oh-my-pi/pi-agent-core": "8.4.3",
88
+ "@oh-my-pi/pi-ai": "8.4.3",
89
+ "@oh-my-pi/pi-tui": "8.4.3",
90
+ "@oh-my-pi/pi-utils": "8.4.3",
83
91
  "@openai/agents": "^0.4.3",
84
92
  "@sinclair/typebox": "^0.34.46",
85
93
  "ajv": "^8.17.1",
@@ -5,7 +5,6 @@
5
5
  import * as path from "node:path";
6
6
  import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
7
7
  import type { AssistantMessage, ImageContent, Message, Model, UsageReport } from "@oh-my-pi/pi-ai";
8
- import { resolvePlanUrlToPath } from "@oh-my-pi/pi-coding-agent/internal-urls";
9
8
  import type { Component, Loader, SlashCommand } from "@oh-my-pi/pi-tui";
10
9
  import {
11
10
  CombinedAutocompleteProvider,
@@ -24,6 +23,7 @@ import type { SettingsManager } from "../config/settings-manager";
24
23
  import type { ExtensionUIContext } from "../extensibility/extensions";
25
24
  import type { CompactOptions } from "../extensibility/extensions/types";
26
25
  import { loadSlashCommands } from "../extensibility/slash-commands";
26
+ import { resolvePlanUrlToPath } from "../internal-urls";
27
27
  import planModeApprovedPrompt from "../prompts/system/plan-mode-approved.md" with { type: "text" };
28
28
  import type { AgentSession, AgentSessionEvent } from "../session/agent-session";
29
29
  import { HistoryStorage } from "../session/history-storage";
@@ -136,7 +136,7 @@ export class InteractiveMode implements InteractiveModeContext {
136
136
  private planModeHasEntered = false;
137
137
  public readonly lspServers: Array<{ name: string; status: "ready" | "error"; fileTypes: string[] }> | undefined =
138
138
  undefined;
139
- public mcpManager?: import("@oh-my-pi/pi-coding-agent/mcp").MCPManager;
139
+ public mcpManager?: import("../mcp").MCPManager;
140
140
  private readonly toolUiContextSetter: (uiContext: ExtensionUIContext, hasUI: boolean) => void;
141
141
 
142
142
  private readonly commandController: CommandController;
@@ -152,7 +152,7 @@ export class InteractiveMode implements InteractiveModeContext {
152
152
  changelogMarkdown: string | undefined = undefined,
153
153
  setToolUIContext: (uiContext: ExtensionUIContext, hasUI: boolean) => void = () => {},
154
154
  lspServers: Array<{ name: string; status: "ready" | "error"; fileTypes: string[] }> | undefined = undefined,
155
- mcpManager?: import("@oh-my-pi/pi-coding-agent/mcp").MCPManager,
155
+ mcpManager?: import("../mcp").MCPManager,
156
156
  ) {
157
157
  this.session = session;
158
158
  this.sessionManager = session.sessionManager;
@@ -27,7 +27,6 @@ import type {
27
27
  UsageReport,
28
28
  } from "@oh-my-pi/pi-ai";
29
29
  import { isContextOverflow, modelsAreEqual, supportsXhigh } from "@oh-my-pi/pi-ai";
30
- import { resolvePlanUrlToPath } from "@oh-my-pi/pi-coding-agent/internal-urls";
31
30
  import { abortableSleep, isEnoent, logger } from "@oh-my-pi/pi-utils";
32
31
  import { YAML } from "bun";
33
32
  import type { Rule } from "../capability/rule";
@@ -61,6 +60,7 @@ import type { CompactOptions, ContextUsage } from "../extensibility/extensions/t
61
60
  import type { HookCommandContext } from "../extensibility/hooks/types";
62
61
  import type { Skill, SkillWarning } from "../extensibility/skills";
63
62
  import { expandSlashCommand, type FileSlashCommand } from "../extensibility/slash-commands";
63
+ import { resolvePlanUrlToPath } from "../internal-urls";
64
64
  import { executePython as executePythonCommand, type PythonResult } from "../ipy/executor";
65
65
  import { theme } from "../modes/theme/theme";
66
66
  import { normalizeDiff, normalizeToLF, ParseError, previewPatch, stripBom } from "../patch";
@@ -5,18 +5,18 @@
5
5
  */
6
6
  import path from "node:path";
7
7
  import type { AgentEvent, ThinkingLevel } from "@oh-my-pi/pi-agent-core";
8
- import type { PromptTemplate } from "@oh-my-pi/pi-coding-agent/config/prompt-templates";
9
- import type { Skill } from "@oh-my-pi/pi-coding-agent/extensibility/skills";
10
- import { getPreludeDocs } from "@oh-my-pi/pi-coding-agent/ipy/executor";
11
- import { checkPythonKernelAvailability } from "@oh-my-pi/pi-coding-agent/ipy/kernel";
12
- import type { ContextFileEntry, ToolSession } from "@oh-my-pi/pi-coding-agent/tools";
13
8
  import type { ModelRegistry } from "../config/model-registry";
14
9
  import { formatModelString, parseModelPattern } from "../config/model-resolver";
10
+ import type { PromptTemplate } from "../config/prompt-templates";
11
+ import type { Skill } from "../extensibility/skills";
12
+ import { getPreludeDocs } from "../ipy/executor";
13
+ import { checkPythonKernelAvailability } from "../ipy/kernel";
15
14
  import { LspTool } from "../lsp";
16
15
  import type { LspParams } from "../lsp/types";
17
16
  import { callTool } from "../mcp/client";
18
17
  import type { MCPManager } from "../mcp/manager";
19
18
  import type { AuthStorage } from "../session/auth-storage";
19
+ import type { ContextFileEntry, ToolSession } from "../tools";
20
20
  import { PythonTool, type PythonToolParams } from "../tools/python";
21
21
  import type { EventBus } from "../utils/event-bus";
22
22
  import { subprocessToolRegistry } from "./subprocess-tool-registry";
@@ -80,7 +80,7 @@ export interface ExecutorOptions {
80
80
  authStorage?: AuthStorage;
81
81
  modelRegistry?: ModelRegistry;
82
82
  settingsManager?: {
83
- serialize: () => import("@oh-my-pi/pi-coding-agent/config/settings-manager").Settings;
83
+ serialize: () => import("../config/settings-manager").Settings;
84
84
  getPlansDirectory: (cwd?: string) => string;
85
85
  getPythonToolMode?: () => "ipy-only" | "bash-only" | "both";
86
86
  getPythonKernelMode?: () => "session" | "per-call";
package/src/task/index.ts CHANGED
@@ -17,14 +17,12 @@ import * as os from "node:os";
17
17
  import path from "node:path";
18
18
  import type { AgentTool, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
19
19
  import type { Usage } from "@oh-my-pi/pi-ai";
20
- import planModeSubagentPrompt from "@oh-my-pi/pi-coding-agent/prompts/system/plan-mode-subagent.md" with {
21
- type: "text",
22
- };
23
20
  import { $ } from "bun";
24
21
  import { nanoid } from "nanoid";
25
22
  import type { ToolSession } from "..";
26
23
  import { renderPromptTemplate } from "../config/prompt-templates";
27
24
  import type { Theme } from "../modes/theme/theme";
25
+ import planModeSubagentPrompt from "../prompts/system/plan-mode-subagent.md" with { type: "text" };
28
26
  import taskDescriptionTemplate from "../prompts/tools/task.md" with { type: "text" };
29
27
  import { formatDuration } from "../tools/render-utils";
30
28
  // Import review tools for side effects (registers subagent tool handlers)
@@ -1,11 +1,11 @@
1
1
  import type { AgentEvent, ThinkingLevel } from "@oh-my-pi/pi-agent-core";
2
- import type { PromptTemplate } from "@oh-my-pi/pi-coding-agent/config/prompt-templates";
3
- import type { Skill } from "@oh-my-pi/pi-coding-agent/extensibility/skills";
4
- import type { PreludeHelper } from "@oh-my-pi/pi-coding-agent/ipy/kernel";
5
- import type { ContextFileEntry } from "@oh-my-pi/pi-coding-agent/tools";
6
2
  import type { SerializedModelRegistry } from "../config/model-registry";
3
+ import type { PromptTemplate } from "../config/prompt-templates";
7
4
  import type { Settings } from "../config/settings-manager";
5
+ import type { Skill } from "../extensibility/skills";
6
+ import type { PreludeHelper } from "../ipy/kernel";
8
7
  import type { SerializedAuthStorage } from "../session/auth-storage";
8
+ import type { ContextFileEntry } from "../tools";
9
9
 
10
10
  /**
11
11
  * MCP tool metadata passed from parent to worker for proxy tool creation.
@@ -14,7 +14,6 @@
14
14
  */
15
15
  import type { AgentEvent, ThinkingLevel } from "@oh-my-pi/pi-agent-core";
16
16
  import type { Api, Model } from "@oh-my-pi/pi-ai";
17
- import { setPreludeDocsCache } from "@oh-my-pi/pi-coding-agent/ipy/executor";
18
17
  import { logger, postmortem, untilAborted } from "@oh-my-pi/pi-utils";
19
18
  import type { TSchema } from "@sinclair/typebox";
20
19
  import { ModelRegistry } from "../config/model-registry";
@@ -22,6 +21,7 @@ import { parseModelPattern, parseModelString } from "../config/model-resolver";
22
21
  import { renderPromptTemplate } from "../config/prompt-templates";
23
22
  import { SettingsManager } from "../config/settings-manager";
24
23
  import type { CustomTool } from "../extensibility/custom-tools/types";
24
+ import { setPreludeDocsCache } from "../ipy/executor";
25
25
  import { type LspToolDetails, lspSchema } from "../lsp/types";
26
26
  import lspDescription from "../prompts/tools/lsp.md" with { type: "text" };
27
27
  import { createAgentSession, discoverAuthStorage, discoverModels } from "../sdk";
@@ -1,12 +1,12 @@
1
1
  import * as fs from "node:fs/promises";
2
2
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
3
- import { renderPromptTemplate } from "@oh-my-pi/pi-coding-agent/config/prompt-templates";
4
- import { resolvePlanUrlToPath } from "@oh-my-pi/pi-coding-agent/internal-urls";
5
- import enterPlanModeDescription from "@oh-my-pi/pi-coding-agent/prompts/tools/enter-plan-mode.md" with { type: "text" };
6
- import type { ToolSession } from "@oh-my-pi/pi-coding-agent/tools";
7
- import { ToolError } from "@oh-my-pi/pi-coding-agent/tools/tool-errors";
8
3
  import { isEnoent } from "@oh-my-pi/pi-utils";
9
4
  import { Type } from "@sinclair/typebox";
5
+ import { renderPromptTemplate } from "../config/prompt-templates";
6
+ import { resolvePlanUrlToPath } from "../internal-urls";
7
+ import enterPlanModeDescription from "../prompts/tools/enter-plan-mode.md" with { type: "text" };
8
+ import type { ToolSession } from ".";
9
+ import { ToolError } from "./tool-errors";
10
10
 
11
11
  const enterPlanModeSchema = Type.Object({
12
12
  workflow: Type.Optional(Type.Union([Type.Literal("parallel"), Type.Literal("iterative")])),
@@ -1,8 +1,8 @@
1
1
  import type { AgentTool } from "@oh-my-pi/pi-agent-core";
2
- import type { PromptTemplate } from "@oh-my-pi/pi-coding-agent/config/prompt-templates";
3
- import type { Skill } from "@oh-my-pi/pi-coding-agent/extensibility/skills";
4
2
  import { logger } from "@oh-my-pi/pi-utils";
3
+ import type { PromptTemplate } from "../config/prompt-templates";
5
4
  import type { BashInterceptorRule } from "../config/settings-manager";
5
+ import type { Skill } from "../extensibility/skills";
6
6
  import type { InternalUrlRouter } from "../internal-urls";
7
7
  import { getPreludeDocs, warmPythonEnvironment } from "../ipy/executor";
8
8
  import { checkPythonKernelAvailability } from "../ipy/kernel";
@@ -144,9 +144,9 @@ export interface ToolSession {
144
144
  /** Get the current session model string, regardless of how it was chosen */
145
145
  getActiveModelString?: () => string | undefined;
146
146
  /** Auth storage for passing to subagents (avoids re-discovery) */
147
- authStorage?: import("@oh-my-pi/pi-coding-agent/session/auth-storage").AuthStorage;
147
+ authStorage?: import("../session/auth-storage").AuthStorage;
148
148
  /** Model registry for passing to subagents (avoids re-discovery) */
149
- modelRegistry?: import("@oh-my-pi/pi-coding-agent/config/model-registry").ModelRegistry;
149
+ modelRegistry?: import("../config/model-registry").ModelRegistry;
150
150
  /** MCP manager for proxying MCP calls through parent */
151
151
  mcpManager?: import("../mcp/manager").MCPManager;
152
152
  /** Internal URL router for agent:// and skill:// URLs */
@@ -155,7 +155,7 @@ export interface ToolSession {
155
155
  agentOutputManager?: AgentOutputManager;
156
156
  /** Settings manager for passing to subagents (avoids SQLite access in workers) */
157
157
  settingsManager?: {
158
- serialize: () => import("@oh-my-pi/pi-coding-agent/config/settings-manager").Settings;
158
+ serialize: () => import("../config/settings-manager").Settings;
159
159
  getPlansDirectory: (cwd?: string) => string;
160
160
  };
161
161
  /** Settings manager (optional) */
@@ -1,4 +1,4 @@
1
- import { resolvePlanUrlToPath } from "@oh-my-pi/pi-coding-agent/internal-urls";
1
+ import { resolvePlanUrlToPath } from "../internal-urls";
2
2
  import type { ToolSession } from ".";
3
3
  import { resolveToCwd } from "./path-utils";
4
4
  import { ToolError } from "./tool-errors";