@oh-my-pi/pi-coding-agent 17.2.9 → 17.2.11
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/CHANGELOG.md +83 -0
- package/dist/{CHANGELOG-8yy8h3bc.md → CHANGELOG-d9xenpn9.md} +83 -0
- package/dist/cli.js +10208 -12596
- package/dist/types/capability/mcp.d.ts +11 -0
- package/dist/types/capability/skill.d.ts +6 -0
- package/dist/types/cli/args.d.ts +1 -0
- package/dist/types/cli/command-help.d.ts +3 -0
- package/dist/types/commands/share.d.ts +25 -0
- package/dist/types/commit/agentic/index.d.ts +3 -1
- package/dist/types/commit/execute.d.ts +32 -0
- package/dist/types/commit/index.d.ts +2 -1
- package/dist/types/commit/pipeline.d.ts +7 -1
- package/dist/types/config/model-registry.d.ts +4 -0
- package/dist/types/config/model-resolver.d.ts +13 -0
- package/dist/types/config/settings-schema.d.ts +1 -34
- package/dist/types/discovery/agent-plugin-format.d.ts +143 -0
- package/dist/types/discovery/agent-plugins.d.ts +1 -0
- package/dist/types/discovery/contained-path.d.ts +34 -0
- package/dist/types/discovery/index.d.ts +1 -0
- package/dist/types/extensibility/custom-commands/types.d.ts +5 -5
- package/dist/types/extensibility/custom-tools/types.d.ts +3 -3
- package/dist/types/extensibility/extensions/loader.d.ts +9 -2
- package/dist/types/extensibility/extensions/types.d.ts +45 -8
- package/dist/types/extensibility/hooks/types.d.ts +5 -5
- package/dist/types/extensibility/shared-events.d.ts +3 -2
- package/dist/types/extensibility/skills.d.ts +5 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/main.d.ts +1 -1
- package/dist/types/mcp/transports/header-policy.d.ts +45 -0
- package/dist/types/mcp/types.d.ts +15 -0
- package/dist/types/modes/acp/acp-agent.d.ts +1 -1
- package/dist/types/modes/acp/acp-client-bridge.d.ts +1 -1
- package/dist/types/modes/acp/acp-event-mapper.d.ts +1 -1
- package/dist/types/modes/acp/acp-mode.d.ts +1 -1
- package/dist/types/modes/components/agent-hub-projection.d.ts +38 -0
- package/dist/types/modes/components/agent-hub-renderer.d.ts +41 -0
- package/dist/types/modes/components/agent-hub.d.ts +14 -5
- package/dist/types/modes/components/agent-transcript-viewer.d.ts +2 -0
- package/dist/types/modes/components/chat-transcript-builder.d.ts +2 -0
- package/dist/types/modes/components/custom-editor.d.ts +1 -2
- package/dist/types/modes/components/model-browser.d.ts +9 -1
- package/dist/types/modes/components/status-line/types.d.ts +2 -0
- package/dist/types/modes/components/tool-execution.d.ts +2 -0
- package/dist/types/modes/interactive-mode.d.ts +8 -1
- package/dist/types/modes/utils/transcript-render-helpers.d.ts +3 -2
- package/dist/types/registry/agent-registry.d.ts +47 -0
- package/dist/types/registry/persisted-agents.d.ts +3 -1
- package/dist/types/secrets/index.d.ts +23 -1
- package/dist/types/session/agent-session-events.d.ts +2 -2
- package/dist/types/session/agent-session.d.ts +4 -2
- package/dist/types/session/messages.d.ts +1 -0
- package/dist/types/session/prewalk.d.ts +3 -1
- package/dist/types/session/session-entries.d.ts +10 -0
- package/dist/types/session/session-loader.d.ts +11 -1
- package/dist/types/session/session-manager.d.ts +9 -1
- package/dist/types/session/session-tools.d.ts +18 -1
- package/dist/types/session/turn-recovery.d.ts +7 -2
- package/dist/types/slash-commands/acp-builtins.d.ts +1 -1
- package/dist/types/slash-commands/available-commands.d.ts +1 -1
- package/dist/types/task/executor.d.ts +6 -0
- package/dist/types/task/index.d.ts +4 -3
- package/dist/types/task/read-only-policy.d.ts +3 -0
- package/dist/types/task/structured-subagent.d.ts +2 -0
- package/dist/types/task/types.d.ts +4 -0
- package/dist/types/tools/bash.d.ts +3 -3
- package/dist/types/tools/browser/launch.d.ts +2 -1
- package/dist/types/tools/browser/tab-worker.d.ts +2 -2
- package/dist/types/tools/path-utils.d.ts +1 -0
- package/dist/types/tools/read.d.ts +1 -5
- package/dist/types/tools/run-scope.d.ts +27 -1
- package/dist/types/tools/shell-tokenize.d.ts +16 -0
- package/dist/types/tools/terminal-output.d.ts +1 -1
- package/dist/types/utils/turndown.d.ts +1 -1
- package/dist/types/vibe/runtime.d.ts +2 -3
- package/dist/types/web/scrapers/readthedocs.d.ts +0 -3
- package/dist/types/web/search/providers/browser-headers.d.ts +2 -3
- package/examples/custom-tools/README.md +1 -1
- package/examples/extensions/README.md +1 -1
- package/examples/extensions/api-demo.ts +5 -6
- package/examples/extensions/chalk-logger.ts +1 -1
- package/examples/extensions/hello.ts +2 -2
- package/examples/extensions/reload-runtime.ts +1 -1
- package/examples/extensions/tools.ts +2 -2
- package/examples/extensions/with-deps/index.ts +1 -1
- package/examples/sdk/06-extensions.ts +1 -1
- package/package.json +15 -31
- package/scripts/bundle-dist.ts +1 -11
- package/scripts/legacy-pi-virtual-module.ts +4 -1
- package/src/advisor/runtime.ts +54 -0
- package/src/capability/mcp.ts +11 -0
- package/src/capability/skill.ts +6 -0
- package/src/cli/agents-cli.ts +1 -1
- package/src/cli/args.ts +24 -2
- package/src/cli/auth-broker-cli.ts +1 -1
- package/src/cli/auth-gateway-cli.ts +1 -1
- package/src/cli/bench-cli.ts +1 -1
- package/src/cli/claude-trace-cli.ts +1 -1
- package/src/cli/command-help.ts +4 -0
- package/src/cli/config-cli.ts +1 -1
- package/src/cli/dry-balance-cli.ts +1 -1
- package/src/cli/file-processor.ts +1 -1
- package/src/cli/flag-tables.ts +4 -0
- package/src/cli/gallery-cli.ts +1 -1
- package/src/cli/grep-cli.ts +1 -1
- package/src/cli/grievances-cli.ts +1 -1
- package/src/cli/help-extra.ts +1 -1
- package/src/cli/models-cli.ts +1 -1
- package/src/cli/plugin-cli.ts +1 -1
- package/src/cli/read-cli.ts +1 -1
- package/src/cli/setup-cli.ts +1 -1
- package/src/cli/shell-cli.ts +1 -1
- package/src/cli/ssh-cli.ts +1 -1
- package/src/cli/stats-cli.ts +1 -1
- package/src/cli/tiny-models-cli.ts +1 -1
- package/src/cli/ttsr-cli.ts +1 -1
- package/src/cli/update-cli.ts +1 -1
- package/src/cli/usage-cli.ts +1 -1
- package/src/cli/web-search-cli.ts +1 -1
- package/src/cli/worktree-cli.ts +1 -1
- package/src/cli-commands.ts +5 -0
- package/src/commands/commit.ts +16 -3
- package/src/commands/say.ts +1 -1
- package/src/commands/share.ts +71 -0
- package/src/commands/token.ts +1 -1
- package/src/commit/agentic/agent.ts +1 -1
- package/src/commit/agentic/index.ts +39 -21
- package/src/commit/cli.ts +1 -1
- package/src/commit/execute.ts +56 -0
- package/src/commit/index.ts +2 -1
- package/src/commit/pipeline.ts +20 -7
- package/src/config/model-discovery.ts +1 -1
- package/src/config/model-registry.ts +21 -1
- package/src/config/model-resolver.ts +54 -7
- package/src/config/settings-schema.ts +2 -33
- package/src/config/settings.ts +46 -0
- package/src/discovery/agent-plugin-format.ts +551 -0
- package/src/discovery/agent-plugins.ts +341 -0
- package/src/discovery/agents.ts +4 -2
- package/src/discovery/builtin-rules/ts-no-inline-cast-access.md +5 -4
- package/src/discovery/builtin-rules/ts-no-tiny-functions.md +1 -1
- package/src/discovery/claude-plugins.ts +21 -5
- package/src/discovery/contained-path.ts +78 -0
- package/src/discovery/helpers.ts +23 -9
- package/src/discovery/index.ts +1 -0
- package/src/discovery/omp-plugins.ts +20 -7
- package/src/eval/py/runner.py +38 -1
- package/src/exec/non-interactive-env.ts +1 -0
- package/src/extensibility/custom-commands/loader.ts +4 -4
- package/src/extensibility/custom-commands/types.ts +5 -5
- package/src/extensibility/custom-tools/loader.ts +4 -4
- package/src/extensibility/custom-tools/types.ts +3 -3
- package/src/extensibility/extensions/loader.ts +85 -20
- package/src/extensibility/extensions/runner.ts +6 -0
- package/src/extensibility/extensions/types.ts +51 -8
- package/src/extensibility/hooks/loader.ts +4 -5
- package/src/extensibility/hooks/types.ts +5 -5
- package/src/extensibility/plugins/legacy-pi-compat.ts +53 -0
- package/src/extensibility/plugins/marketplace/manager.ts +2 -1
- package/src/extensibility/shared-events.ts +3 -2
- package/src/extensibility/skills.ts +9 -0
- package/src/index.ts +2 -2
- package/src/internal-urls/memory-protocol.ts +5 -1
- package/src/internal-urls/skill-protocol.ts +14 -0
- package/src/internal-urls/vault-protocol.ts +2 -2
- package/src/launch/client.ts +11 -1
- package/src/launch/protocol.ts +7 -2
- package/src/launch/terminal-output.ts +1 -1
- package/src/main.ts +88 -23
- package/src/markit/converters/docx.ts +1 -1
- package/src/markit/converters/epub.ts +1 -1
- package/src/markit/converters/pptx.ts +1 -1
- package/src/markit/converters/xlsx.ts +1 -1
- package/src/mcp/config.ts +3 -0
- package/src/mcp/manager.ts +12 -9
- package/src/mcp/transports/header-policy.ts +95 -0
- package/src/mcp/transports/http.ts +35 -52
- package/src/mcp/transports/sse.ts +20 -27
- package/src/mcp/types.ts +15 -0
- package/src/modes/acp/acp-agent.ts +20 -9
- package/src/modes/acp/acp-client-bridge.ts +1 -1
- package/src/modes/acp/acp-event-mapper.ts +1 -1
- package/src/modes/acp/acp-mode.ts +1 -1
- package/src/modes/components/agent-dashboard.ts +2 -0
- package/src/modes/components/agent-hub-projection.ts +248 -0
- package/src/modes/components/agent-hub-renderer.ts +194 -0
- package/src/modes/components/agent-hub.ts +674 -207
- package/src/modes/components/agent-transcript-viewer.ts +3 -0
- package/src/modes/components/assistant-message.ts +1 -1
- package/src/modes/components/chat-transcript-builder.ts +3 -0
- package/src/modes/components/custom-editor.ts +0 -9
- package/src/modes/components/extensions/inspector-panel.ts +11 -6
- package/src/modes/components/footer.ts +1 -3
- package/src/modes/components/model-browser.ts +11 -3
- package/src/modes/components/model-hub.ts +4 -1
- package/src/modes/components/status-line/component.ts +1 -0
- package/src/modes/components/status-line/segments.ts +10 -7
- package/src/modes/components/status-line/types.ts +2 -0
- package/src/modes/components/tool-execution.ts +13 -16
- package/src/modes/components/tree-selector.ts +62 -3
- package/src/modes/controllers/command-controller.ts +4 -1
- package/src/modes/controllers/event-controller.ts +44 -20
- package/src/modes/controllers/extension-ui-controller.ts +2 -2
- package/src/modes/controllers/input-controller.ts +20 -2
- package/src/modes/controllers/mcp-command-controller.ts +81 -20
- package/src/modes/controllers/selector-controller.ts +41 -49
- package/src/modes/controllers/streaming-reveal.ts +1 -1
- package/src/modes/interactive-mode.ts +13 -2
- package/src/modes/rpc/rpc-mode.ts +2 -2
- package/src/modes/runtime-init.ts +1 -1
- package/src/modes/theme/theme.ts +2 -2
- package/src/modes/utils/transcript-render-helpers.ts +4 -2
- package/src/modes/utils/ui-helpers.ts +1 -0
- package/src/prompts/tools/computer.md +1 -1
- package/src/registry/agent-lifecycle.ts +14 -7
- package/src/registry/agent-registry.ts +65 -2
- package/src/registry/persisted-agents.ts +341 -16
- package/src/sdk.ts +6 -49
- package/src/secrets/index.ts +52 -1
- package/src/session/agent-session-events.ts +2 -2
- package/src/session/agent-session.ts +54 -16
- package/src/session/messages.ts +1 -0
- package/src/session/prewalk.ts +57 -17
- package/src/session/session-context.ts +3 -5
- package/src/session/session-entries.ts +10 -0
- package/src/session/session-handoff.ts +5 -1
- package/src/session/session-listing.ts +1 -1
- package/src/session/session-loader.ts +74 -8
- package/src/session/session-manager.ts +22 -2
- package/src/session/session-paths.ts +57 -9
- package/src/session/session-tools.ts +65 -4
- package/src/session/todo-tracker.ts +11 -1
- package/src/session/turn-recovery.ts +96 -74
- package/src/slash-commands/acp-builtins.ts +1 -1
- package/src/slash-commands/available-commands.ts +1 -1
- package/src/slash-commands/builtin-registry.ts +12 -8
- package/src/task/executor.ts +70 -20
- package/src/task/index.ts +30 -34
- package/src/task/isolation-runner.ts +24 -11
- package/src/task/persisted-revive.ts +12 -5
- package/src/task/read-only-policy.ts +27 -0
- package/src/task/structured-subagent.ts +14 -4
- package/src/task/types.ts +4 -0
- package/src/tools/auto-generated-guard.ts +1 -1
- package/src/tools/bash-interactive.ts +4 -4
- package/src/tools/bash-skill-urls.ts +15 -0
- package/src/tools/bash.ts +16 -17
- package/src/tools/browser/cmux/cmux-tab.ts +66 -18
- package/src/tools/browser/launch.ts +41 -12
- package/src/tools/browser/readable.ts +9 -9
- package/src/tools/browser/tab-supervisor.ts +12 -3
- package/src/tools/browser/tab-worker-entry.ts +1 -1
- package/src/tools/browser/tab-worker.ts +101 -12
- package/src/tools/debug.ts +1 -1
- package/src/tools/fetch.ts +1 -1
- package/src/tools/jtd-to-json-schema.ts +123 -21
- package/src/tools/path-utils.ts +9 -2
- package/src/tools/read.ts +21 -9
- package/src/tools/run-scope.ts +290 -4
- package/src/tools/shell-tokenize.ts +98 -0
- package/src/tools/terminal-output.ts +1 -1
- package/src/tools/todo.ts +1 -1
- package/src/utils/clipboard.ts +10 -2
- package/src/utils/external-editor.ts +4 -2
- package/src/utils/jj.ts +1 -1
- package/src/utils/turndown.ts +1 -2
- package/src/vibe/runtime.ts +5 -5
- package/src/web/scrapers/arxiv.ts +1 -1
- package/src/web/scrapers/go-pkg.ts +1 -1
- package/src/web/scrapers/iacr.ts +1 -1
- package/src/web/scrapers/readthedocs.ts +2 -1
- package/src/web/scrapers/twitter.ts +2 -2
- package/src/web/scrapers/types.ts +1 -1
- package/src/web/scrapers/wikipedia.ts +1 -1
- package/src/web/search/providers/browser-headers.ts +12 -39
- package/src/web/search/providers/codex.ts +3 -26
- package/src/web/search/providers/ecosia.ts +1 -1
- package/src/web/search/providers/exa.ts +1 -1
- package/src/web/search/providers/google.ts +1 -1
- package/src/web/search/providers/mojeek.ts +1 -1
- package/src/web/search/providers/startpage.ts +1 -1
- package/src/markit/converters/mammoth.d.ts +0 -24
|
@@ -71,6 +71,8 @@ export interface ModelChangeEntry extends SessionEntryBase {
|
|
|
71
71
|
model: string;
|
|
72
72
|
/** Role: "default", "smol", "slow", etc. Undefined treated as "default" */
|
|
73
73
|
role?: string;
|
|
74
|
+
/** True when this transition selected a retry-fallback model rather than the configured model. */
|
|
75
|
+
resolvedModelIsFallback?: boolean;
|
|
74
76
|
}
|
|
75
77
|
export interface ServiceTierChangeEntry extends SessionEntryBase {
|
|
76
78
|
type: "service_tier_change";
|
|
@@ -183,6 +185,14 @@ export interface SessionInitEntry extends SessionEntryBase {
|
|
|
183
185
|
task: string;
|
|
184
186
|
/** Tools available to the agent */
|
|
185
187
|
tools: string[];
|
|
188
|
+
/** Agent definition name (for example `scout` or `reviewer`). */
|
|
189
|
+
agent?: string;
|
|
190
|
+
/** Semantic model role declared by the agent, retained even after concrete model resolution. */
|
|
191
|
+
modelRole?: string;
|
|
192
|
+
/** Initially resolved provider/model selector for historical display. */
|
|
193
|
+
resolvedModel?: string;
|
|
194
|
+
/** Whether the agent definition is read-only, allowing an exact zero-LoC attribution. */
|
|
195
|
+
readOnly?: boolean;
|
|
186
196
|
/** Output schema if structured output was requested. */
|
|
187
197
|
outputSchema?: unknown;
|
|
188
198
|
/** Enforcement policy recorded with the output schema for faithful revival. */
|
|
@@ -3,13 +3,23 @@ import { BlobStore } from "./blob-store.js";
|
|
|
3
3
|
import { type FileEntry, type SessionTitleSlotEntry } from "./session-entries.js";
|
|
4
4
|
import { type SessionStorage } from "./session-storage.js";
|
|
5
5
|
import { type SessionTitleUpdate } from "./session-title-slot.js";
|
|
6
|
+
export interface VisitEntriesFromFileStreamOptions {
|
|
7
|
+
/** Stop after the visitor returns `false`. */
|
|
8
|
+
shouldContinue?: () => boolean;
|
|
9
|
+
/** Stop after this many valid or malformed JSONL records have been consumed. */
|
|
10
|
+
maxRecords?: number;
|
|
11
|
+
/** Yield to the macrotask queue after this many bytes have been consumed. */
|
|
12
|
+
yieldEveryBytes?: number;
|
|
13
|
+
/** Yield to the macrotask queue after this many entries have been visited. */
|
|
14
|
+
yieldEveryEntries?: number;
|
|
15
|
+
}
|
|
6
16
|
/** Parse session JSONL while stripping and folding the optional fixed title slot. */
|
|
7
17
|
export declare function parseSessionContent(content: string): {
|
|
8
18
|
entries: FileEntry[];
|
|
9
19
|
titleSlot: SessionTitleUpdate | undefined;
|
|
10
20
|
};
|
|
11
21
|
/** Parse session JSONL and visit each entry without retaining prior entries. */
|
|
12
|
-
export declare function visitEntriesFromFileStream(filePath: string, visit: (entry: FileEntry) => void): Promise<SessionTitleUpdate | undefined>;
|
|
22
|
+
export declare function visitEntriesFromFileStream(filePath: string, visit: (entry: FileEntry) => void | boolean, options?: VisitEntriesFromFileStreamOptions): Promise<SessionTitleUpdate | undefined>;
|
|
13
23
|
/** Exported for testing — the ≥8MiB streaming path (works on any file size). */
|
|
14
24
|
export declare function loadEntriesFromFileStream(filePath: string): Promise<{
|
|
15
25
|
entries: FileEntry[];
|
|
@@ -220,12 +220,17 @@ export declare class SessionManager {
|
|
|
220
220
|
* Append a model change as a child of the current leaf, then advance the leaf.
|
|
221
221
|
* @param model Model in "provider/modelId" format
|
|
222
222
|
* @param role Optional role (default: "default")
|
|
223
|
+
* @param resolvedModelIsFallback Whether this transition selected a retry-fallback model
|
|
223
224
|
*/
|
|
224
|
-
appendModelChange(model: string, role?: string): string;
|
|
225
|
+
appendModelChange(model: string, role?: string, resolvedModelIsFallback?: boolean): string;
|
|
225
226
|
appendSessionInit(init: {
|
|
226
227
|
systemPrompt: string;
|
|
227
228
|
task: string;
|
|
228
229
|
tools: string[];
|
|
230
|
+
agent?: string;
|
|
231
|
+
modelRole?: string;
|
|
232
|
+
resolvedModel?: string;
|
|
233
|
+
readOnly?: boolean;
|
|
229
234
|
outputSchema?: unknown;
|
|
230
235
|
outputSchemaMode?: StructuredSubagentSchemaMode;
|
|
231
236
|
restrictToolNames?: boolean;
|
|
@@ -375,6 +380,9 @@ export declare class SessionManager {
|
|
|
375
380
|
systemPrompt: string;
|
|
376
381
|
task: string;
|
|
377
382
|
tools: string[];
|
|
383
|
+
agent?: string;
|
|
384
|
+
modelRole?: string;
|
|
385
|
+
resolvedModel?: string;
|
|
378
386
|
outputSchema?: unknown;
|
|
379
387
|
outputSchemaMode?: StructuredSubagentSchemaMode;
|
|
380
388
|
restrictToolNames?: boolean;
|
|
@@ -3,7 +3,7 @@ import type { Model } from "@oh-my-pi/pi-ai";
|
|
|
3
3
|
import type { ModelRegistry } from "../config/model-registry.js";
|
|
4
4
|
import type { Settings, SkillsSettings } from "../config/settings.js";
|
|
5
5
|
import type { CustomTool } from "../extensibility/custom-tools/types.js";
|
|
6
|
-
import type { ExtensionRunner } from "../extensibility/extensions/index.js";
|
|
6
|
+
import type { ExtensionRunner, ToolInfo } from "../extensibility/extensions/index.js";
|
|
7
7
|
import { type Skill, type SkillWarning } from "../extensibility/skills.js";
|
|
8
8
|
import { type LocalProtocolOptions } from "../internal-urls/index.js";
|
|
9
9
|
import type { MemoryBackendStartOptions } from "../memory-backend/types.js";
|
|
@@ -108,6 +108,14 @@ export declare class SessionTools {
|
|
|
108
108
|
get baseSystemPrompt(): string[];
|
|
109
109
|
/** Replaces the controller-owned base prompt without applying it to the agent. */
|
|
110
110
|
setBaseSystemPrompt(prompt: string[]): void;
|
|
111
|
+
/**
|
|
112
|
+
* Registers the per-turn `before_agent_start` system-prompt override and
|
|
113
|
+
* applies it to the agent. Base rebuilds during the turn preserve it until
|
|
114
|
+
* {@link clearTurnSystemPromptOverride}.
|
|
115
|
+
*/
|
|
116
|
+
setTurnSystemPromptOverride(prompt: string[]): void;
|
|
117
|
+
/** Drops the active per-turn override; later rebuilds fall back to the base prompt. */
|
|
118
|
+
clearTurnSystemPromptOverride(): void;
|
|
111
119
|
/** Skills currently rendered into the system prompt. */
|
|
112
120
|
get skills(): Skill[];
|
|
113
121
|
/** Diagnostics produced while loading the current skills. */
|
|
@@ -132,6 +140,15 @@ export declare class SessionTools {
|
|
|
132
140
|
hasBuiltInTool(name: string): boolean;
|
|
133
141
|
/** Names of every registered tool. */
|
|
134
142
|
getAllToolNames(): string[];
|
|
143
|
+
/**
|
|
144
|
+
* Full metadata for every registered tool, including source provenance.
|
|
145
|
+
*
|
|
146
|
+
* Backs the `getAllTools()` ExtensionAPI method. Returns {@link ToolInfo}
|
|
147
|
+
* objects (not bare names) so extensions authored against upstream
|
|
148
|
+
* `@earendil-works/pi-coding-agent` — which promises `ToolInfo[]` — can read
|
|
149
|
+
* `sourceInfo.source` unchanged.
|
|
150
|
+
*/
|
|
151
|
+
getAllToolInfos(): ToolInfo[];
|
|
135
152
|
/** Installs and activates the ephemeral vibe tool set. */
|
|
136
153
|
activateVibeTools(baseToolNames: string[]): Promise<void>;
|
|
137
154
|
/** Uninstalls vibe tools and activates the replacement set. */
|
|
@@ -100,8 +100,13 @@ export declare class TurnRecovery {
|
|
|
100
100
|
autoContinue: boolean;
|
|
101
101
|
triggerContextTokens?: number;
|
|
102
102
|
}): Promise<RecoveryCompactionResult>;
|
|
103
|
-
/**
|
|
104
|
-
|
|
103
|
+
/**
|
|
104
|
+
* Restores the configured primary after fallback cooldown expiry.
|
|
105
|
+
* @returns true when the active model was actually switched back to the
|
|
106
|
+
* primary, so callers can re-run the pre-send context-fit check against the
|
|
107
|
+
* reverted (possibly smaller) window before issuing the next request.
|
|
108
|
+
*/
|
|
109
|
+
maybeRestoreRetryFallbackPrimary(): Promise<boolean>;
|
|
105
110
|
/** Applies model fallback policy from live usage health before a turn starts. */
|
|
106
111
|
maybeApplyUsageAwareFallback(signal: AbortSignal, confirmer?: UsageFallbackConfirmer): Promise<boolean>;
|
|
107
112
|
/** Applies automatic retry, credential rotation, and model fallback policy. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AvailableCommand } from "@
|
|
1
|
+
import type { AvailableCommand } from "@oh-my-pi/pi-utils/acp";
|
|
2
2
|
import type { AcpBuiltinSlashCommandResult, SlashCommandRuntime } from "./types.js";
|
|
3
3
|
export type { AcpBuiltinSlashCommandResult } from "./types.js";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AvailableCommand } from "@
|
|
1
|
+
import type { AvailableCommand } from "@oh-my-pi/pi-utils/acp";
|
|
2
2
|
import type { SkillsSettings } from "../config/settings.js";
|
|
3
3
|
import type { LoadedCustomCommand } from "../extensibility/custom-commands/index.js";
|
|
4
4
|
import type { ExtensionRunner } from "../extensibility/extensions/index.js";
|
|
@@ -87,6 +87,8 @@ export interface ExecutorOptions {
|
|
|
87
87
|
*/
|
|
88
88
|
detached?: boolean;
|
|
89
89
|
modelOverride?: string | string[];
|
|
90
|
+
/** Explicit pre-expansion model role alias selected for this run. */
|
|
91
|
+
modelRole?: string;
|
|
90
92
|
/**
|
|
91
93
|
* Active model selector of the parent session, used as an auth-aware fallback
|
|
92
94
|
* if the resolved subagent model has no working credentials. See #985.
|
|
@@ -260,6 +262,8 @@ export interface IrcWakeTurnMonitorOptions {
|
|
|
260
262
|
agent: AgentDefinition;
|
|
261
263
|
description?: string;
|
|
262
264
|
modelOverride?: string | string[];
|
|
265
|
+
/** Explicit pre-expansion model role alias selected for this run. */
|
|
266
|
+
modelRole?: string;
|
|
263
267
|
eventBus?: EventBus;
|
|
264
268
|
parentToolCallId?: string;
|
|
265
269
|
/** Fallback session file when the registry ref carries none. */
|
|
@@ -309,6 +313,8 @@ export interface FollowUpTurnOptions {
|
|
|
309
313
|
message: string;
|
|
310
314
|
index?: number;
|
|
311
315
|
description?: string;
|
|
316
|
+
/** Explicit pre-expansion model role alias retained from the original run. */
|
|
317
|
+
modelRole?: string;
|
|
312
318
|
/** Structured-output state retained from the original invocation. */
|
|
313
319
|
outputSchema?: unknown;
|
|
314
320
|
outputSchemaMode?: StructuredSubagentSchemaMode;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import type { AgentTool, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
|
|
2
2
|
import type { ToolSession } from "../index.js";
|
|
3
3
|
import type { Theme } from "../modes/theme/theme.js";
|
|
4
|
-
import { type
|
|
4
|
+
import { type SingleResult, type TaskItem, type TaskToolDetails, type TaskToolSchemaInstance } from "./types.js";
|
|
5
5
|
import "../tools/review.js";
|
|
6
6
|
import { renderResult, renderCall as renderTaskCall } from "./render.js";
|
|
7
7
|
export { loadBundledAgents as BUNDLED_AGENTS } from "./agents.js";
|
|
8
8
|
export { discoverCommands, expandCommand, getCommand } from "./commands.js";
|
|
9
9
|
export { discoverAgents, getAgent } from "./discovery.js";
|
|
10
10
|
export { AgentOutputManager } from "./output-manager.js";
|
|
11
|
+
export * from "./read-only-policy.js";
|
|
11
12
|
export type { AgentDefinition, AgentProgress, SingleResult, SubagentEventPayload, SubagentLifecyclePayload, SubagentProgressPayload, TaskParams, TaskToolDetails, } from "./types.js";
|
|
12
13
|
export { TASK_SUBAGENT_EVENT_CHANNEL, TASK_SUBAGENT_LIFECYCLE_CHANNEL, TASK_SUBAGENT_PROGRESS_CHANNEL, taskSchema, } from "./types.js";
|
|
13
|
-
export declare const READ_ONLY_TOOL_NAMES: ReadonlySet<string>;
|
|
14
|
-
export declare function isReadOnlyAgent(agent: AgentDefinition): boolean;
|
|
15
14
|
/**
|
|
16
15
|
* Preview text for a child result. Falls back to "(no output)" — annotated
|
|
17
16
|
* with the request count when the child actually did work, so the parent can
|
|
@@ -50,6 +49,8 @@ export declare function composeSpawnAdvisory(args: {
|
|
|
50
49
|
willRunAsync: boolean;
|
|
51
50
|
scoutAvailable?: boolean;
|
|
52
51
|
}): string | undefined;
|
|
52
|
+
/** Rescan one cwd and publish its definitions to existing and future task tools. */
|
|
53
|
+
export declare function refreshAgentDiscovery(cwd: string): Promise<void>;
|
|
53
54
|
/**
|
|
54
55
|
* Task tool - Delegate tasks to specialized agents.
|
|
55
56
|
*
|
|
@@ -74,6 +74,8 @@ export interface EffectiveSubagentPolicy {
|
|
|
74
74
|
agent: AgentDefinition;
|
|
75
75
|
effectiveAgent: AgentDefinition;
|
|
76
76
|
modelOverride?: string | string[];
|
|
77
|
+
/** Explicit pre-expansion model role alias selected for this run. */
|
|
78
|
+
modelRole?: string;
|
|
77
79
|
parentActiveModelPattern?: string;
|
|
78
80
|
schema: StructuredSubagentSchemaResolution;
|
|
79
81
|
planMode: boolean;
|
|
@@ -336,6 +336,8 @@ export interface AgentProgress {
|
|
|
336
336
|
cost: number;
|
|
337
337
|
durationMs: number;
|
|
338
338
|
modelOverride?: string | string[];
|
|
339
|
+
/** Explicit pre-expansion model role alias selected for this run. */
|
|
340
|
+
modelRole?: string;
|
|
339
341
|
/** Resolved model display string in the form `<provider>/<id>`, optionally suffixed with `:<thinkingLevel>` when the level was set explicitly. Undefined when the model could not be resolved. */
|
|
340
342
|
resolvedModel?: string;
|
|
341
343
|
/** True when {@link resolvedModel} is the target of an active retry fallback (not the originally configured model). Lets observer-only UIs (collab guests, Agent Hub rows with no live session) flag the fallback and keep the provider. */
|
|
@@ -404,6 +406,8 @@ export interface SingleResult {
|
|
|
404
406
|
/** Model's context window in tokens, when known. */
|
|
405
407
|
contextWindow?: number;
|
|
406
408
|
modelOverride?: string | string[];
|
|
409
|
+
/** Explicit pre-expansion model role alias selected for this run. */
|
|
410
|
+
modelRole?: string;
|
|
407
411
|
/** Resolved model display string in the form `<provider>/<id>`, optionally suffixed with `:<thinkingLevel>` when the level was set explicitly. Omitted from tool-result JSON when undefined to keep wire payloads small. */
|
|
408
412
|
resolvedModel?: string;
|
|
409
413
|
/** True when {@link resolvedModel} is the target of an active retry fallback. Mirrors {@link AgentProgress.resolvedModelIsFallback} onto the settled result. */
|
|
@@ -119,7 +119,7 @@ export declare class BashTool implements AgentTool<typeof bashSchemaBase | typeo
|
|
|
119
119
|
}
|
|
120
120
|
export interface BashRenderArgs {
|
|
121
121
|
command?: string;
|
|
122
|
-
env?: Record<string,
|
|
122
|
+
env?: Record<string, unknown>;
|
|
123
123
|
timeout?: number;
|
|
124
124
|
cwd?: string;
|
|
125
125
|
__partialJson?: string;
|
|
@@ -141,10 +141,10 @@ export interface ShellRendererConfig<TArgs> {
|
|
|
141
141
|
resolveTitle: (args: TArgs | undefined, options: RenderResultOptions) => string;
|
|
142
142
|
resolveCommand?: (args: TArgs | undefined) => string | undefined;
|
|
143
143
|
resolveCwd?: (args: TArgs | undefined) => string | undefined;
|
|
144
|
-
resolveEnv?: (args: TArgs | undefined) => Record<string,
|
|
144
|
+
resolveEnv?: (args: TArgs | undefined) => Record<string, unknown> | undefined;
|
|
145
145
|
showHeader?: boolean;
|
|
146
146
|
}
|
|
147
|
-
export declare function getBashEnvForDisplay(args: BashRenderArgs): Record<string,
|
|
147
|
+
export declare function getBashEnvForDisplay(args: BashRenderArgs): Record<string, unknown> | undefined;
|
|
148
148
|
/**
|
|
149
149
|
* Returns the bash command formatted for the result body: the dim `$ cd … &&`
|
|
150
150
|
* prefix joined with syntax-highlighted command lines. The prefix is applied
|
|
@@ -116,7 +116,8 @@ export declare function applyStealthPatches(browser: Browser, page: Page, state:
|
|
|
116
116
|
override: UserAgentOverride | null;
|
|
117
117
|
}): Promise<void>;
|
|
118
118
|
/** Exposes executable candidates for detection tests. */
|
|
119
|
-
export declare function systemChromiumCandidatesForTest(platform?: NodeJS.Platform, home?: string, which?: (name: string) => string | undefined): string[];
|
|
119
|
+
export declare function systemChromiumCandidatesForTest(platform?: NodeJS.Platform, home?: string, which?: (name: string) => string | null | undefined): string[];
|
|
120
|
+
export declare function chromiumExecutableProbeForTest(executablePath: string): Promise<boolean>;
|
|
120
121
|
export declare function stealthIgnoreDefaultArgsForTest(executablePath: string | undefined): string[];
|
|
121
122
|
export declare function targetSupportsUserAgentOverrideForTest(target: Target): boolean;
|
|
122
123
|
export declare function configureUserAgentTargetsForTest(browser: Browser, state: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HTMLElement } from "
|
|
1
|
+
import type { HTMLElement } from "@oh-my-pi/pi-utils/dom";
|
|
2
2
|
import type { ElementHandle, Page } from "puppeteer-core";
|
|
3
3
|
import type { Transport } from "./tab-protocol.js";
|
|
4
4
|
declare module "puppeteer-core" {
|
|
@@ -72,7 +72,7 @@ export declare function preparePageForScreenshot(page: Pick<Page, "bringToFront"
|
|
|
72
72
|
export declare function describeInflight(inflight: Map<number, InflightOp>): string;
|
|
73
73
|
export declare class WorkerCore {
|
|
74
74
|
#private;
|
|
75
|
-
constructor(transport: Transport);
|
|
75
|
+
constructor(transport: Transport, isolated: boolean);
|
|
76
76
|
nextElementId(): number;
|
|
77
77
|
cacheElement(id: number, handle: ElementHandle): void;
|
|
78
78
|
}
|
|
@@ -185,6 +185,7 @@ type PathEntrySplitter = (item: string) => {
|
|
|
185
185
|
*/
|
|
186
186
|
export declare function splitDelimitedPathEntry(entry: string, cwd: string, options?: {
|
|
187
187
|
splitter?: PathEntrySplitter;
|
|
188
|
+
routedUrlPredicate?: (entry: string) => boolean;
|
|
188
189
|
}): Promise<string[] | null>;
|
|
189
190
|
/** Expand delimited entries in-place while preserving unsplit entries. */
|
|
190
191
|
export declare function expandDelimitedPathEntries(entries: readonly string[], cwd: string, options?: {
|
|
@@ -63,11 +63,7 @@ export declare class ReadTool implements AgentTool<typeof readSchema, ReadToolDe
|
|
|
63
63
|
readonly label = "Read";
|
|
64
64
|
readonly loadMode = "essential";
|
|
65
65
|
description: string;
|
|
66
|
-
|
|
67
|
-
path: string;
|
|
68
|
-
}, {
|
|
69
|
-
path: string;
|
|
70
|
-
}>;
|
|
66
|
+
get parameters(): typeof readSchema;
|
|
71
67
|
readonly strict = true;
|
|
72
68
|
constructor(session: ToolSession);
|
|
73
69
|
/**
|
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
/** Associates a browser operation failure with its owning evaluated run. */
|
|
2
|
+
export declare function markBrowserRunRejection<T>(reason: T, owner: object): T;
|
|
3
|
+
/** Returns whether a rejection was marked for the specified evaluated run. */
|
|
4
|
+
export declare function isBrowserRunRejection(reason: unknown, owner: object): boolean;
|
|
5
|
+
/** Returns whether a rejection belongs to the marked browser run or its evaluated source file. */
|
|
6
|
+
export declare function isBrowserRunOwnedRejection(reason: unknown, owner: object, filename: string): boolean;
|
|
7
|
+
type FloatingRejectionHandler = (reason: unknown) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Observes native promise-combinator results derived from browser promises for
|
|
10
|
+
* the duration of one evaluated run. Native `await` remains unchanged; dropped
|
|
11
|
+
* user continuations from `Promise.all` and `Promise.race` are routed to the
|
|
12
|
+
* owning run.
|
|
13
|
+
*/
|
|
14
|
+
export declare function withBrowserPromiseCombinatorTracking<T>(owner: object, onFloatingRejection: FloatingRejectionHandler, run: () => Promise<T>): Promise<T>;
|
|
15
|
+
/**
|
|
16
|
+
* Observes every explicit continuation of a browser promise without replacing
|
|
17
|
+
* the native promise. Browser failures remain contained; an unhandled error
|
|
18
|
+
* created by user continuation code is reported to the owning run.
|
|
19
|
+
*/
|
|
20
|
+
export declare function observeBrowserRunPromise<T>(promise: Promise<T>, owner: object, onFloatingRejection: FloatingRejectionHandler): Promise<T>;
|
|
21
|
+
/**
|
|
22
|
+
* Installs worker-realm rejection routing. Consumed browser-run failures stay in
|
|
23
|
+
* the worker; unrelated failures retain the default fatal worker behavior.
|
|
24
|
+
*/
|
|
25
|
+
export declare function installBrowserWorkerRejectionGuard(consume: (reason: unknown) => boolean): () => void;
|
|
1
26
|
/**
|
|
2
27
|
* Marks a run-scoped promise as observed without changing its behavior for awaited callers.
|
|
3
28
|
*
|
|
@@ -38,4 +63,5 @@ export declare function resolvePredicateTimeout(cellTimeoutMs: number, explicit?
|
|
|
38
63
|
*/
|
|
39
64
|
export declare function waitForRun(msOrPredicate: number | (() => unknown), signal: AbortSignal, opts?: WaitPredicateOptions): Promise<unknown>;
|
|
40
65
|
/** Binds a long-lived scope facade (page/tab/desktop objects) to one evaluated run's abort signal. */
|
|
41
|
-
export declare function bindRunFacade<T extends object>(target: T, signal: AbortSignal): T;
|
|
66
|
+
export declare function bindRunFacade<T extends object>(target: T, signal: AbortSignal, rejectionOwner?: object, onFloatingRejection?: FloatingRejectionHandler): T;
|
|
67
|
+
export {};
|
|
@@ -41,3 +41,19 @@ export interface FlatShellCommandSegment {
|
|
|
41
41
|
* complete input in that case.
|
|
42
42
|
*/
|
|
43
43
|
export declare function extractFlatShellCommandSegments(command: string): FlatShellCommandSegment[];
|
|
44
|
+
/**
|
|
45
|
+
* Parses a leading `cd <path> && ...` prefix so the bash tool can route the
|
|
46
|
+
* target through its structured `cwd` parameter when the model omits it.
|
|
47
|
+
*
|
|
48
|
+
* Returns the single path token (quotes and backslash escapes resolved to their
|
|
49
|
+
* literal value) and the command remainder after the top-level `&&`, or `null`
|
|
50
|
+
* when the command does not begin with exactly `cd`, one path token, and a
|
|
51
|
+
* top-level `&&`. The scanner deliberately bails on anything else in the prefix
|
|
52
|
+
* — redirects (`cd /tmp 2>/dev/null && ...`), extra arguments, or paths needing
|
|
53
|
+
* shell expansion (`$`, backticks, `(`) — leaving the whole command for the
|
|
54
|
+
* shell instead of absorbing shell syntax into `cwd`.
|
|
55
|
+
*/
|
|
56
|
+
export declare function extractLeadingCdTarget(command: string): {
|
|
57
|
+
path: string;
|
|
58
|
+
rest: string;
|
|
59
|
+
} | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Terminal as XtermTerminal } from "@
|
|
1
|
+
import type { Terminal as XtermTerminal } from "@oh-my-pi/pi-utils/vterm";
|
|
2
2
|
/** Applies the active tool-output color while preserving safe styles from a virtual terminal row. */
|
|
3
3
|
export declare function styleTerminalRow(row: string, baseForeground: string): string;
|
|
4
4
|
/** Reads terminal screen rows as sanitized text plus only the styles the TUI may replay. */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AsyncJobManager } from "../async/job-manager.js";
|
|
2
|
-
import type { SessionEntry } from "../session/session-entries.js";
|
|
3
2
|
import { SessionManager } from "../session/session-manager.js";
|
|
4
3
|
import type { ToolSession } from "../tools/index.js";
|
|
5
4
|
/** The two worker CLI flavors the director drives. */
|
|
@@ -87,8 +86,8 @@ export interface VibeWaitOutcome {
|
|
|
87
86
|
stillRunning: string[];
|
|
88
87
|
timedOut: boolean;
|
|
89
88
|
}
|
|
90
|
-
/** Child ids claimed by
|
|
91
|
-
export declare function persistedVibeChildIds(entries: Iterable<
|
|
89
|
+
/** Child ids claimed by valid Vibe spawn records from untrusted persisted JSON. */
|
|
90
|
+
export declare function persistedVibeChildIds(entries: Iterable<unknown>): Set<string>;
|
|
92
91
|
/** Thrown from a turn job body so the job manager marks the job failed while carrying the formatted result. */
|
|
93
92
|
export declare class VibeTurnError extends Error {
|
|
94
93
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Build a fresh, internally consistent desktop navigation fingerprint for one HTTP request.
|
|
3
|
-
* By default, this randomizes across
|
|
4
|
-
*
|
|
5
|
-
* stable Mac Chrome identity.
|
|
3
|
+
* By default, this randomizes across coherent modern Chrome, Firefox, and Safari profiles.
|
|
4
|
+
* Set `randomized` to `false` when a fetch must preserve a stable Mac Chrome identity.
|
|
6
5
|
*/
|
|
7
6
|
export declare function buildBrowserNavigationHeaders(options?: {
|
|
8
7
|
randomized?: boolean;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* API Demo Extension
|
|
3
3
|
*
|
|
4
|
-
* Demonstrates using ExtensionAPI's logger, injected
|
|
5
|
-
*
|
|
6
|
-
* the CustomToolAPI interface.
|
|
4
|
+
* Demonstrates using ExtensionAPI's logger, injected schema builder, and pi
|
|
5
|
+
* module access.
|
|
7
6
|
*/
|
|
8
7
|
import type { ExtensionAPI } from "@oh-my-pi/pi-coding-agent";
|
|
9
8
|
|
|
10
9
|
export default function (pi: ExtensionAPI) {
|
|
11
|
-
const
|
|
10
|
+
const z = pi.zod;
|
|
12
11
|
|
|
13
12
|
// Access the logger for debugging
|
|
14
13
|
pi.logger.debug("API demo extension loaded");
|
|
@@ -16,7 +15,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
16
15
|
pi.registerTool({
|
|
17
16
|
name: "api_demo",
|
|
18
17
|
label: "API Demo",
|
|
19
|
-
description: "Demonstrates ExtensionAPI capabilities: logger,
|
|
18
|
+
description: "Demonstrates ExtensionAPI capabilities: logger, schema validation, and pi module access",
|
|
20
19
|
parameters: z.object({
|
|
21
20
|
message: z.string().describe("Test message"),
|
|
22
21
|
logLevel: z.enum(["error", "warn", "debug"]).default("debug").describe("Log level to use"),
|
|
@@ -48,7 +47,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
48
47
|
``,
|
|
49
48
|
`Features demonstrated:`,
|
|
50
49
|
`1. ✓ Logger access via pi.logger`,
|
|
51
|
-
`2. ✓
|
|
50
|
+
`2. ✓ Schema builder access via pi.arktype`,
|
|
52
51
|
`3. ✓ Pi module access via pi.pi`,
|
|
53
52
|
``,
|
|
54
53
|
`Context:`,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Tests that jiti can resolve npm modules correctly.
|
|
4
4
|
*/
|
|
5
5
|
import type { ExtensionAPI } from "@oh-my-pi/pi-coding-agent";
|
|
6
|
-
import chalk from "chalk";
|
|
6
|
+
import chalk from "@oh-my-pi/pi-utils/chalk";
|
|
7
7
|
|
|
8
8
|
export default function (pi: ExtensionAPI) {
|
|
9
9
|
// Log with colors using chalk
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hello Tool - Minimal custom tool example
|
|
3
3
|
*
|
|
4
|
-
* Demonstrates using ExtensionAPI's logger
|
|
4
|
+
* Demonstrates using ExtensionAPI's logger and injected schema builder.
|
|
5
5
|
*/
|
|
6
6
|
import type { ExtensionAPI } from "@oh-my-pi/pi-coding-agent";
|
|
7
7
|
|
|
8
8
|
export default function (pi: ExtensionAPI) {
|
|
9
|
-
const
|
|
9
|
+
const z = pi.zod;
|
|
10
10
|
|
|
11
11
|
pi.registerTool({
|
|
12
12
|
name: "hello",
|
|
@@ -36,7 +36,7 @@ export default function toolsExtension(pi: ExtensionAPI) {
|
|
|
36
36
|
|
|
37
37
|
// Find the last tools-config entry in the current branch
|
|
38
38
|
async function restoreFromBranch(ctx: ExtensionContext) {
|
|
39
|
-
allTools = pi.getAllTools();
|
|
39
|
+
allTools = pi.getAllTools().map(t => t.name);
|
|
40
40
|
|
|
41
41
|
// Get entries in current branch only
|
|
42
42
|
const branchEntries = ctx.sessionManager.getBranch();
|
|
@@ -66,7 +66,7 @@ export default function toolsExtension(pi: ExtensionAPI) {
|
|
|
66
66
|
description: "Enable/disable tools",
|
|
67
67
|
handler: async (_args, ctx) => {
|
|
68
68
|
// Refresh tool list
|
|
69
|
-
allTools = pi.getAllTools();
|
|
69
|
+
allTools = pi.getAllTools().map(t => t.name);
|
|
70
70
|
|
|
71
71
|
await ctx.ui.custom((tui, theme, _keybindings, done) => {
|
|
72
72
|
// Build settings items for each tool
|
|
@@ -41,7 +41,7 @@ console.log();
|
|
|
41
41
|
import type { ExtensionAPI } from "@oh-my-pi/pi-coding-agent";
|
|
42
42
|
|
|
43
43
|
export default function (pi: ExtensionAPI) {
|
|
44
|
-
const
|
|
44
|
+
const z = pi.zod;
|
|
45
45
|
|
|
46
46
|
pi.on("agent_start", async () => {
|
|
47
47
|
console.log("[Extension] Agent starting");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
4
|
-
"version": "17.2.
|
|
4
|
+
"version": "17.2.11",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -49,21 +49,19 @@
|
|
|
49
49
|
"bench:guard": "bun scripts/bench-guard.ts"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@agentclientprotocol/sdk": "1.2.1",
|
|
53
52
|
"@babel/parser": "^7.29.7",
|
|
54
|
-
"@
|
|
55
|
-
"@oh-my-pi/
|
|
56
|
-
"@oh-my-pi/
|
|
57
|
-
"@oh-my-pi/
|
|
58
|
-
"@oh-my-pi/pi-
|
|
59
|
-
"@oh-my-pi/pi-
|
|
60
|
-
"@oh-my-pi/pi-
|
|
61
|
-
"@oh-my-pi/pi-
|
|
62
|
-
"@oh-my-pi/pi-
|
|
63
|
-
"@oh-my-pi/pi-
|
|
64
|
-
"@oh-my-pi/pi-
|
|
65
|
-
"@oh-my-pi/
|
|
66
|
-
"@oh-my-pi/snapcompact": "17.2.9",
|
|
53
|
+
"@oh-my-pi/hashline": "17.2.11",
|
|
54
|
+
"@oh-my-pi/omp-stats": "17.2.11",
|
|
55
|
+
"@oh-my-pi/omptype": "17.2.11",
|
|
56
|
+
"@oh-my-pi/pi-agent-core": "17.2.11",
|
|
57
|
+
"@oh-my-pi/pi-ai": "17.2.11",
|
|
58
|
+
"@oh-my-pi/pi-catalog": "17.2.11",
|
|
59
|
+
"@oh-my-pi/pi-mnemopi": "17.2.11",
|
|
60
|
+
"@oh-my-pi/pi-natives": "17.2.11",
|
|
61
|
+
"@oh-my-pi/pi-tui": "17.2.11",
|
|
62
|
+
"@oh-my-pi/pi-utils": "17.2.11",
|
|
63
|
+
"@oh-my-pi/pi-wire": "17.2.11",
|
|
64
|
+
"@oh-my-pi/snapcompact": "17.2.11",
|
|
67
65
|
"@opentelemetry/api": "^1.9.1",
|
|
68
66
|
"@opentelemetry/api-logs": "^0.220.0",
|
|
69
67
|
"@opentelemetry/context-async-hooks": "^2.9.0",
|
|
@@ -75,29 +73,15 @@
|
|
|
75
73
|
"@opentelemetry/sdk-metrics": "^2.9.0",
|
|
76
74
|
"@opentelemetry/sdk-trace-base": "^2.9.0",
|
|
77
75
|
"@opentelemetry/sdk-trace-node": "^2.9.0",
|
|
78
|
-
"@puppeteer/browsers": "^3.0.6",
|
|
79
|
-
"@types/turndown": "5.0.6",
|
|
80
|
-
"@xterm/headless": "^6.0.0",
|
|
81
|
-
"chalk": "^5.6.2",
|
|
82
|
-
"fast-xml-parser": "^5.9.3",
|
|
83
|
-
"handlebars": "^4.7.9",
|
|
84
|
-
"header-generator": "^2.1.82",
|
|
85
|
-
"linkedom": "^0.18.13",
|
|
86
|
-
"lru-cache": "11.5.2",
|
|
87
|
-
"mammoth": "^1.12.0",
|
|
88
76
|
"mupdf": "^1.28.0",
|
|
89
|
-
"puppeteer-core": "25.3.0"
|
|
90
|
-
"turndown": "7.2.4",
|
|
91
|
-
"turndown-plugin-gfm": "1.0.2",
|
|
92
|
-
"zod": "^4"
|
|
77
|
+
"puppeteer-core": "25.3.0"
|
|
93
78
|
},
|
|
94
79
|
"optionalDependencies": {
|
|
95
80
|
"@huggingface/transformers": "^4.2.0",
|
|
96
81
|
"sherpa-onnx-node": "1.13.2"
|
|
97
82
|
},
|
|
98
83
|
"devDependencies": {
|
|
99
|
-
"@types/bun": "^1.3.14"
|
|
100
|
-
"marked": "^18.0.6"
|
|
84
|
+
"@types/bun": "^1.3.14"
|
|
101
85
|
},
|
|
102
86
|
"engines": {
|
|
103
87
|
"bun": ">=1.3.14"
|