@earendil-works/pi-coding-agent 0.84.1 → 0.84.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/CHANGELOG.md +139 -0
- package/README.md +9 -4
- package/dist/bundle/chunks/anthropic-messages-JWX2WP65.js +45 -0
- package/dist/bundle/chunks/anthropic.js +75 -0
- package/dist/bundle/chunks/azure-openai-responses-5ENVCQ7U.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +74 -0
- package/dist/bundle/chunks/chunk-4L3WN2XY.js +2 -0
- package/dist/bundle/chunks/chunk-6CYCI3EJ.js +12 -0
- package/dist/bundle/chunks/chunk-6R7UI4IY.js +2 -0
- package/dist/bundle/chunks/chunk-AXIIZGTV.js +2 -0
- package/dist/bundle/chunks/chunk-DRQDKNXA.js +2 -0
- package/dist/bundle/chunks/chunk-E5KXRMZK.js +1547 -0
- package/dist/bundle/chunks/chunk-GMWCTUPB.js +2 -0
- package/dist/bundle/chunks/chunk-GPPBJGBU.js +50 -0
- package/dist/bundle/chunks/chunk-JUUC5AZY.js +2 -0
- package/dist/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
- package/dist/bundle/chunks/chunk-MNAIPA3J.js +2 -0
- package/dist/bundle/chunks/chunk-NBBFIJUL.js +11 -0
- package/dist/bundle/chunks/chunk-NUHFSC37.js +25 -0
- package/dist/bundle/chunks/chunk-PGXDEOVV.js +2 -0
- package/dist/bundle/chunks/chunk-PJACZCIR.js +2 -0
- package/dist/bundle/chunks/chunk-PRRNXB7S.js +2 -0
- package/dist/bundle/chunks/chunk-TEPMHNKQ.js +2 -0
- package/dist/bundle/chunks/chunk-TRDNDS6A.js +4 -0
- package/dist/bundle/chunks/chunk-UAQELI3K.js +2 -0
- package/dist/bundle/chunks/chunk-XDUWOHPL.js +6 -0
- package/dist/bundle/chunks/chunk-XNGRGP62.js +2 -0
- package/dist/bundle/chunks/dist-RDWOYWHR.js +13 -0
- package/dist/bundle/chunks/github-copilot.js +2 -0
- package/dist/bundle/chunks/google-generative-ai-XDKMGBCJ.js +2 -0
- package/dist/bundle/chunks/google-vertex-D5FGEO3Y.js +2 -0
- package/dist/bundle/chunks/image-resize-worker.js +2 -0
- package/dist/bundle/chunks/kimi-coding.js +2 -0
- package/dist/bundle/chunks/lib-HGQMNYVT.js +9 -0
- package/dist/bundle/chunks/mistral-conversations-YK73UAOZ.js +5 -0
- package/dist/bundle/chunks/multipart-parser-SQ6GDJL7.js +3 -0
- package/dist/bundle/chunks/openai-codex-responses-GJVBJXLB.js +8 -0
- package/dist/bundle/chunks/openai-codex.js +75 -0
- package/dist/bundle/chunks/openai-completions-JD4WAC3R.js +7 -0
- package/dist/bundle/chunks/openai-responses-BSOJMSEV.js +2 -0
- package/dist/bundle/chunks/openrouter-images-N4XVVFSD.js +2 -0
- package/dist/bundle/chunks/openrouter.js +75 -0
- package/dist/bundle/chunks/pi-messages-TPFH44NP.js +8 -0
- package/dist/bundle/chunks/radius.js +75 -0
- package/dist/bundle/chunks/src-UK77SYZE.js +4 -0
- package/dist/bundle/chunks/xai.js +2 -0
- package/dist/bundle/cli.js +3 -0
- package/dist/bundle/client.js +2 -0
- package/dist/bundle/index.js +2 -0
- package/dist/bundle/rpc-entry.js +3 -0
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +40 -9
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/auth-command.d.ts.map +1 -1
- package/dist/cli/auth-command.js +5 -4
- package/dist/cli/auth-command.js.map +1 -1
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js +2 -1
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/config.d.ts +4 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +22 -14
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts +33 -9
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +169 -101
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +6 -7
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +3 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +4 -3
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +41 -32
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/defaults.d.ts +1 -0
- package/dist/core/defaults.d.ts.map +1 -1
- package/dist/core/defaults.js +9 -0
- package/dist/core/defaults.js.map +1 -1
- package/dist/core/experimental.d.ts +4 -0
- package/dist/core/experimental.d.ts.map +1 -1
- package/dist/core/experimental.js +4 -0
- package/dist/core/experimental.js.map +1 -1
- package/dist/core/extensions/index.d.ts +2 -2
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +115 -48
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/types.d.ts +42 -9
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js +3 -0
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +1 -1
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/keybindings.d.ts +38 -13
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +26 -5
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-config.d.ts +10 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +4 -1
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.d.ts +1 -0
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +14 -8
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/models-store.d.ts.map +1 -1
- package/dist/core/models-store.js +2 -1
- package/dist/core/models-store.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +22 -14
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-manifest.d.ts.map +1 -1
- package/dist/core/pi-manifest.js +2 -1
- package/dist/core/pi-manifest.js.map +1 -1
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +2 -2
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +2 -1
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +3 -2
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts +7 -5
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +12 -4
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-export.d.ts +4 -0
- package/dist/core/session-export.d.ts.map +1 -0
- package/dist/core/session-export.js +32 -0
- package/dist/core/session-export.js.map +1 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +4 -3
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-diagnostics.d.ts +9 -0
- package/dist/core/settings-diagnostics.d.ts.map +1 -0
- package/dist/core/settings-diagnostics.js +21 -0
- package/dist/core/settings-diagnostics.js.map +1 -0
- package/dist/core/settings-manager.d.ts +15 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +64 -10
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +51 -33
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +2 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +12 -3
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +14 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +38 -20
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit-diff.d.ts +0 -5
- package/dist/core/tools/edit-diff.d.ts.map +1 -1
- package/dist/core/tools/edit-diff.js +2 -5
- package/dist/core/tools/edit-diff.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +22 -4
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +1 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +4 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +18 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/powershell.d.ts +16 -0
- package/dist/core/tools/powershell.d.ts.map +1 -0
- package/dist/core/tools/powershell.js +39 -0
- package/dist/core/tools/powershell.js.map +1 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +2 -0
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +2 -0
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +2 -1
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/extensions/llama/index.d.ts.map +1 -1
- package/dist/extensions/llama/index.js +2 -0
- package/dist/extensions/llama/index.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +6 -2
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +4 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +23 -16
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +4 -3
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +9 -3
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +58 -13
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +10 -3
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +128 -56
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
- package/dist/modes/interactive/components/settings-submenu.js +165 -0
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +15 -3
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +74 -17
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +10 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +2 -1
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +19 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +250 -129
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-catalog-refresh.d.ts +7 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.js +34 -0
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
- package/dist/modes/interactive/session-share.d.ts +16 -0
- package/dist/modes/interactive/session-share.d.ts.map +1 -0
- package/dist/modes/interactive/session-share.js +188 -0
- package/dist/modes/interactive/session-share.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +2 -0
- package/dist/modes/interactive/theme/light.json +2 -0
- package/dist/modes/interactive/theme/theme-controller.d.ts +10 -2
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +25 -11
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +9 -1
- package/dist/modes/interactive/theme/theme.d.ts +5 -3
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +16 -5
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/json-event.d.ts +18 -12
- package/dist/modes/json-event.d.ts.map +1 -1
- package/dist/modes/json-event.js +22 -5
- package/dist/modes/json-event.js.map +1 -1
- package/dist/package-manager-cli.d.ts +1 -0
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +187 -3
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/server/create-harness.d.ts.map +1 -1
- package/dist/server/create-harness.js +2 -0
- package/dist/server/create-harness.js.map +1 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +2 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/management-http.d.ts +5 -3
- package/dist/utils/management-http.d.ts.map +1 -1
- package/dist/utils/management-http.js +14 -10
- package/dist/utils/management-http.js.map +1 -1
- package/dist/utils/shell.d.ts +3 -0
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +17 -5
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts +1 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +60 -1
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/text.d.ts +8 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +9 -0
- package/dist/utils/text.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +10 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +14 -19
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/compaction.md +21 -6
- package/docs/custom-provider.md +6 -3
- package/docs/environment-variables.md +16 -10
- package/docs/extensions.md +21 -7
- package/docs/json.md +12 -5
- package/docs/keybindings.md +15 -9
- package/docs/llama-cpp.md +2 -0
- package/docs/models.md +8 -2
- package/docs/packages.md +2 -2
- package/docs/rpc.md +24 -7
- package/docs/sdk.md +16 -2
- package/docs/settings.md +41 -2
- package/docs/skills.md +4 -3
- package/docs/terminal-setup.md +34 -11
- package/docs/themes.md +24 -3
- package/docs/tui.md +2 -2
- package/docs/usage.md +9 -4
- package/docs/windows.md +24 -2
- package/examples/extensions/border-status-editor.ts +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/git-checkpoint.ts +2 -2
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/notify.ts +3 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/README.md +3 -1
- package/examples/extensions/subagent/agents.ts +40 -9
- package/examples/extensions/subagent/index.ts +27 -4
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/rpc-extension-ui.ts +1 -1
- package/examples/sdk/06-extensions.ts +1 -1
- package/examples/sdk/README.md +1 -1
- package/npm-shrinkwrap.json +28 -132
- package/package.json +12 -14
|
@@ -23,6 +23,42 @@ export interface AgentDiscoveryResult {
|
|
|
23
23
|
projectAgentsDir: string | null;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Raw agent frontmatter. Values are `unknown` because `parseFrontmatter` runs a
|
|
28
|
+
* real YAML parser, so any scalar or collection can appear here.
|
|
29
|
+
*
|
|
30
|
+
* A type alias rather than an interface: `parseFrontmatter` constrains its
|
|
31
|
+
* parameter to `Record<string, unknown>`, and only an alias picks up the
|
|
32
|
+
* implicit index signature that satisfies it.
|
|
33
|
+
*/
|
|
34
|
+
type AgentFrontmatter = {
|
|
35
|
+
name?: unknown;
|
|
36
|
+
description?: unknown;
|
|
37
|
+
tools?: unknown;
|
|
38
|
+
model?: unknown;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Normalize a frontmatter `tools` value to a list of tool names.
|
|
43
|
+
*
|
|
44
|
+
* Both spellings are valid YAML and both are in use:
|
|
45
|
+
*
|
|
46
|
+
* tools: read, bash # string
|
|
47
|
+
* tools: [read, bash] # array
|
|
48
|
+
*
|
|
49
|
+
* so accept either. Anything else (a number, a map, a nested list) yields no
|
|
50
|
+
* tools rather than throwing: this runs inside agent discovery, where a single
|
|
51
|
+
* bad file must not take down every other agent in the same directory.
|
|
52
|
+
*/
|
|
53
|
+
function parseToolList(value: unknown): string[] | undefined {
|
|
54
|
+
const raw = Array.isArray(value) ? value : typeof value === "string" ? value.split(",") : [];
|
|
55
|
+
const tools = raw
|
|
56
|
+
.filter((t): t is string => typeof t === "string")
|
|
57
|
+
.map((t) => t.trim())
|
|
58
|
+
.filter(Boolean);
|
|
59
|
+
return tools.length > 0 ? tools : undefined;
|
|
60
|
+
}
|
|
61
|
+
|
|
26
62
|
function loadAgentsFromDir(dir: string, source: "user" | "project"): AgentConfig[] {
|
|
27
63
|
const agents: AgentConfig[] = [];
|
|
28
64
|
|
|
@@ -49,22 +85,17 @@ function loadAgentsFromDir(dir: string, source: "user" | "project"): AgentConfig
|
|
|
49
85
|
continue;
|
|
50
86
|
}
|
|
51
87
|
|
|
52
|
-
const { frontmatter, body } = parseFrontmatter<
|
|
88
|
+
const { frontmatter, body } = parseFrontmatter<AgentFrontmatter>(content);
|
|
53
89
|
|
|
54
|
-
if (
|
|
90
|
+
if (typeof frontmatter.name !== "string" || typeof frontmatter.description !== "string") {
|
|
55
91
|
continue;
|
|
56
92
|
}
|
|
57
93
|
|
|
58
|
-
const tools = frontmatter.tools
|
|
59
|
-
?.split(",")
|
|
60
|
-
.map((t: string) => t.trim())
|
|
61
|
-
.filter(Boolean);
|
|
62
|
-
|
|
63
94
|
agents.push({
|
|
64
95
|
name: frontmatter.name,
|
|
65
96
|
description: frontmatter.description,
|
|
66
|
-
tools:
|
|
67
|
-
model: frontmatter.model,
|
|
97
|
+
tools: parseToolList(frontmatter.tools),
|
|
98
|
+
model: typeof frontmatter.model === "string" ? frontmatter.model : undefined,
|
|
68
99
|
systemPrompt: body,
|
|
69
100
|
source,
|
|
70
101
|
filePath,
|
|
@@ -16,7 +16,7 @@ import { spawn } from "node:child_process";
|
|
|
16
16
|
import * as fs from "node:fs";
|
|
17
17
|
import * as os from "node:os";
|
|
18
18
|
import * as path from "node:path";
|
|
19
|
-
import type { AgentToolResult } from "@earendil-works/pi-agent-core";
|
|
19
|
+
import type { AgentToolResult, ThinkingLevel } from "@earendil-works/pi-agent-core";
|
|
20
20
|
import type { Message } from "@earendil-works/pi-ai";
|
|
21
21
|
import { StringEnum } from "@earendil-works/pi-ai";
|
|
22
22
|
import {
|
|
@@ -264,8 +264,14 @@ function getPiInvocation(args: string[]): { command: string; args: string[] } {
|
|
|
264
264
|
|
|
265
265
|
type OnUpdateCallback = (partial: AgentToolResult<SubagentDetails>) => void;
|
|
266
266
|
|
|
267
|
+
interface DispatchDefaults {
|
|
268
|
+
model?: string;
|
|
269
|
+
thinkingLevel?: ThinkingLevel;
|
|
270
|
+
}
|
|
271
|
+
|
|
267
272
|
async function runSingleAgent(
|
|
268
273
|
defaultCwd: string,
|
|
274
|
+
dispatchDefaults: DispatchDefaults,
|
|
269
275
|
agents: AgentConfig[],
|
|
270
276
|
agentName: string,
|
|
271
277
|
task: string,
|
|
@@ -292,7 +298,12 @@ async function runSingleAgent(
|
|
|
292
298
|
}
|
|
293
299
|
|
|
294
300
|
const args: string[] = ["--mode", "json", "-p", "--no-session"];
|
|
295
|
-
|
|
301
|
+
const inheritsDispatchConfig = !agent.model;
|
|
302
|
+
const model = agent.model ?? dispatchDefaults.model;
|
|
303
|
+
if (model) args.push("--model", model);
|
|
304
|
+
if (inheritsDispatchConfig && dispatchDefaults.thinkingLevel) {
|
|
305
|
+
args.push("--thinking", dispatchDefaults.thinkingLevel);
|
|
306
|
+
}
|
|
296
307
|
if (agent.tools && agent.tools.length > 0) args.push("--tools", agent.tools.join(","));
|
|
297
308
|
|
|
298
309
|
let tmpPromptDir: string | null = null;
|
|
@@ -306,7 +317,7 @@ async function runSingleAgent(
|
|
|
306
317
|
messages: [],
|
|
307
318
|
stderr: "",
|
|
308
319
|
usage: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, cost: 0, contextTokens: 0, turns: 0 },
|
|
309
|
-
model
|
|
320
|
+
model,
|
|
310
321
|
step,
|
|
311
322
|
};
|
|
312
323
|
|
|
@@ -471,6 +482,10 @@ export default function (pi: ExtensionAPI) {
|
|
|
471
482
|
|
|
472
483
|
async execute(_toolCallId, params, signal, onUpdate, ctx) {
|
|
473
484
|
const agentScope: AgentScope = params.agentScope ?? "user";
|
|
485
|
+
const dispatchDefaults: DispatchDefaults = {
|
|
486
|
+
model: ctx.model ? `${ctx.model.provider}/${ctx.model.id}` : undefined,
|
|
487
|
+
thinkingLevel: ctx.thinkingLevel,
|
|
488
|
+
};
|
|
474
489
|
const discovery = discoverAgents(ctx.cwd, agentScope);
|
|
475
490
|
const agents = discovery.agents;
|
|
476
491
|
const confirmProjectAgents = params.confirmProjectAgents ?? true;
|
|
@@ -502,7 +517,12 @@ export default function (pi: ExtensionAPI) {
|
|
|
502
517
|
};
|
|
503
518
|
}
|
|
504
519
|
|
|
505
|
-
if (
|
|
520
|
+
if (
|
|
521
|
+
(agentScope === "project" || agentScope === "both") &&
|
|
522
|
+
confirmProjectAgents &&
|
|
523
|
+
ctx.hasUI &&
|
|
524
|
+
!ctx.isProjectTrusted()
|
|
525
|
+
) {
|
|
506
526
|
const requestedAgentNames = new Set<string>();
|
|
507
527
|
if (params.chain) for (const step of params.chain) requestedAgentNames.add(step.agent);
|
|
508
528
|
if (params.tasks) for (const t of params.tasks) requestedAgentNames.add(t.agent);
|
|
@@ -552,6 +572,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
552
572
|
|
|
553
573
|
const result = await runSingleAgent(
|
|
554
574
|
ctx.cwd,
|
|
575
|
+
dispatchDefaults,
|
|
555
576
|
agents,
|
|
556
577
|
step.agent,
|
|
557
578
|
taskWithContext,
|
|
@@ -624,6 +645,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
624
645
|
const results = await mapWithConcurrencyLimit(params.tasks, MAX_CONCURRENCY, async (t, index) => {
|
|
625
646
|
const result = await runSingleAgent(
|
|
626
647
|
ctx.cwd,
|
|
648
|
+
dispatchDefaults,
|
|
627
649
|
agents,
|
|
628
650
|
t.agent,
|
|
629
651
|
t.task,
|
|
@@ -666,6 +688,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
666
688
|
if (params.agent && params.task) {
|
|
667
689
|
const result = await runSingleAgent(
|
|
668
690
|
ctx.cwd,
|
|
691
|
+
dispatchDefaults,
|
|
669
692
|
agents,
|
|
670
693
|
params.agent,
|
|
671
694
|
params.task,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "0.84.
|
|
3
|
+
"version": "0.84.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "0.84.
|
|
9
|
+
"version": "0.84.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|
|
@@ -71,7 +71,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
71
71
|
});
|
|
72
72
|
|
|
73
73
|
pi.on("agent_end", async (event) => {
|
|
74
|
-
console.log(\`[Extension]
|
|
74
|
+
console.log(\`[Extension] Low-level run ended, \${event.messages.length} messages\`);
|
|
75
75
|
});
|
|
76
76
|
|
|
77
77
|
// Register a custom tool
|
package/examples/sdk/README.md
CHANGED
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@earendil-works/pi-coding-agent",
|
|
3
|
-
"version": "0.84.
|
|
3
|
+
"version": "0.84.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@earendil-works/pi-coding-agent",
|
|
9
|
-
"version": "0.84.
|
|
9
|
+
"version": "0.84.3",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@earendil-works/pi-agent-core": "^0.84.
|
|
13
|
-
"@earendil-works/pi-ai": "^0.84.
|
|
14
|
-
"@earendil-works/pi-client": "^0.84.
|
|
15
|
-
"@earendil-works/pi-protocol": "^0.84.
|
|
16
|
-
"@earendil-works/pi-tui": "^0.84.
|
|
12
|
+
"@earendil-works/pi-agent-core": "^0.84.3",
|
|
13
|
+
"@earendil-works/pi-ai": "^0.84.3",
|
|
14
|
+
"@earendil-works/pi-client": "^0.84.3",
|
|
15
|
+
"@earendil-works/pi-protocol": "^0.84.3",
|
|
16
|
+
"@earendil-works/pi-tui": "^0.84.3",
|
|
17
17
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
18
18
|
"chalk": "5.6.2",
|
|
19
19
|
"cross-spawn": "7.0.6",
|
|
20
20
|
"diff": "8.0.4",
|
|
21
|
-
"glob": "13.0.6",
|
|
22
21
|
"grok-mermaid": "0.2.2",
|
|
23
22
|
"highlight.js": "10.7.3",
|
|
24
23
|
"hosted-git-info": "9.0.3",
|
|
@@ -35,7 +34,7 @@
|
|
|
35
34
|
"@mariozechner/clipboard": "0.3.9"
|
|
36
35
|
},
|
|
37
36
|
"bin": {
|
|
38
|
-
"pi": "dist/cli.js"
|
|
37
|
+
"pi": "dist/bundle/cli.js"
|
|
39
38
|
},
|
|
40
39
|
"engines": {
|
|
41
40
|
"node": ">=22.19.0"
|
|
@@ -477,12 +476,12 @@
|
|
|
477
476
|
}
|
|
478
477
|
},
|
|
479
478
|
"node_modules/@earendil-works/pi-agent-core": {
|
|
480
|
-
"version": "0.84.
|
|
481
|
-
"resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-0.84.
|
|
479
|
+
"version": "0.84.3",
|
|
480
|
+
"resolved": "https://registry.npmjs.org/@earendil-works/pi-agent-core/-/pi-agent-core-0.84.3.tgz",
|
|
482
481
|
"license": "MIT",
|
|
483
482
|
"dependencies": {
|
|
484
|
-
"@earendil-works/pi-ai": "^0.84.
|
|
485
|
-
"@earendil-works/pi-telemetry": "^0.84.
|
|
483
|
+
"@earendil-works/pi-ai": "^0.84.3",
|
|
484
|
+
"@earendil-works/pi-telemetry": "^0.84.3",
|
|
486
485
|
"diff": "8.0.4",
|
|
487
486
|
"ignore": "7.0.5",
|
|
488
487
|
"typebox": "1.3.7",
|
|
@@ -493,20 +492,18 @@
|
|
|
493
492
|
}
|
|
494
493
|
},
|
|
495
494
|
"node_modules/@earendil-works/pi-ai": {
|
|
496
|
-
"version": "0.84.
|
|
497
|
-
"resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-0.84.
|
|
495
|
+
"version": "0.84.3",
|
|
496
|
+
"resolved": "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-0.84.3.tgz",
|
|
498
497
|
"license": "MIT",
|
|
499
498
|
"dependencies": {
|
|
500
499
|
"@anthropic-ai/sdk": "0.91.1",
|
|
501
500
|
"@aws-sdk/client-bedrock-runtime": "3.1048.0",
|
|
502
|
-
"@earendil-works/pi-telemetry": "^0.84.
|
|
501
|
+
"@earendil-works/pi-telemetry": "^0.84.3",
|
|
503
502
|
"@google/genai": "1.52.0",
|
|
504
|
-
"@mistralai/mistralai": "2.2.6",
|
|
505
|
-
"@opentelemetry/api": "1.9.0",
|
|
506
503
|
"@smithy/node-http-handler": "4.7.3",
|
|
507
504
|
"http-proxy-agent": "7.0.2",
|
|
508
505
|
"https-proxy-agent": "7.0.6",
|
|
509
|
-
"openai": "6.
|
|
506
|
+
"openai": "6.40.0",
|
|
510
507
|
"partial-json": "0.1.7",
|
|
511
508
|
"typebox": "1.3.7"
|
|
512
509
|
},
|
|
@@ -518,19 +515,19 @@
|
|
|
518
515
|
}
|
|
519
516
|
},
|
|
520
517
|
"node_modules/@earendil-works/pi-client": {
|
|
521
|
-
"version": "0.84.
|
|
522
|
-
"resolved": "https://registry.npmjs.org/@earendil-works/pi-client/-/pi-client-0.84.
|
|
518
|
+
"version": "0.84.3",
|
|
519
|
+
"resolved": "https://registry.npmjs.org/@earendil-works/pi-client/-/pi-client-0.84.3.tgz",
|
|
523
520
|
"license": "MIT",
|
|
524
521
|
"dependencies": {
|
|
525
|
-
"@earendil-works/pi-protocol": "^0.84.
|
|
522
|
+
"@earendil-works/pi-protocol": "^0.84.3"
|
|
526
523
|
},
|
|
527
524
|
"engines": {
|
|
528
525
|
"node": ">=22.19.0"
|
|
529
526
|
}
|
|
530
527
|
},
|
|
531
528
|
"node_modules/@earendil-works/pi-protocol": {
|
|
532
|
-
"version": "0.84.
|
|
533
|
-
"resolved": "https://registry.npmjs.org/@earendil-works/pi-protocol/-/pi-protocol-0.84.
|
|
529
|
+
"version": "0.84.3",
|
|
530
|
+
"resolved": "https://registry.npmjs.org/@earendil-works/pi-protocol/-/pi-protocol-0.84.3.tgz",
|
|
534
531
|
"license": "MIT",
|
|
535
532
|
"dependencies": {
|
|
536
533
|
"typebox": "1.3.7"
|
|
@@ -540,16 +537,16 @@
|
|
|
540
537
|
}
|
|
541
538
|
},
|
|
542
539
|
"node_modules/@earendil-works/pi-telemetry": {
|
|
543
|
-
"version": "0.84.
|
|
544
|
-
"resolved": "https://registry.npmjs.org/@earendil-works/pi-telemetry/-/pi-telemetry-0.84.
|
|
540
|
+
"version": "0.84.3",
|
|
541
|
+
"resolved": "https://registry.npmjs.org/@earendil-works/pi-telemetry/-/pi-telemetry-0.84.3.tgz",
|
|
545
542
|
"license": "MIT",
|
|
546
543
|
"engines": {
|
|
547
544
|
"node": ">=22.19.0"
|
|
548
545
|
}
|
|
549
546
|
},
|
|
550
547
|
"node_modules/@earendil-works/pi-tui": {
|
|
551
|
-
"version": "0.84.
|
|
552
|
-
"resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-0.84.
|
|
548
|
+
"version": "0.84.3",
|
|
549
|
+
"resolved": "https://registry.npmjs.org/@earendil-works/pi-tui/-/pi-tui-0.84.3.tgz",
|
|
553
550
|
"license": "MIT",
|
|
554
551
|
"dependencies": {
|
|
555
552
|
"get-east-asian-width": "1.6.0",
|
|
@@ -762,26 +759,6 @@
|
|
|
762
759
|
],
|
|
763
760
|
"optional": true
|
|
764
761
|
},
|
|
765
|
-
"node_modules/@mistralai/mistralai": {
|
|
766
|
-
"version": "2.2.6",
|
|
767
|
-
"resolved": "https://registry.npmjs.org/@mistralai/mistralai/-/mistralai-2.2.6.tgz",
|
|
768
|
-
"integrity": "sha512-W8pX7zHxjJvMIpw8JMxeJEleapXX0Q9NPszdNzqkM3MIEoIGPObdodujj+WHteXEvGfaP/AMwlNyRfEzSY6dQQ==",
|
|
769
|
-
"license": "Apache-2.0",
|
|
770
|
-
"dependencies": {
|
|
771
|
-
"@opentelemetry/semantic-conventions": "^1.40.0",
|
|
772
|
-
"ws": "^8.18.0",
|
|
773
|
-
"zod": "^3.25.0 || ^4.0.0",
|
|
774
|
-
"zod-to-json-schema": "^3.25.0"
|
|
775
|
-
},
|
|
776
|
-
"peerDependencies": {
|
|
777
|
-
"@opentelemetry/api": "^1.9.0"
|
|
778
|
-
},
|
|
779
|
-
"peerDependenciesMeta": {
|
|
780
|
-
"@opentelemetry/api": {
|
|
781
|
-
"optional": true
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
},
|
|
785
762
|
"node_modules/@nodable/entities": {
|
|
786
763
|
"version": "2.1.0",
|
|
787
764
|
"resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-2.1.0.tgz",
|
|
@@ -794,24 +771,6 @@
|
|
|
794
771
|
}
|
|
795
772
|
]
|
|
796
773
|
},
|
|
797
|
-
"node_modules/@opentelemetry/api": {
|
|
798
|
-
"version": "1.9.0",
|
|
799
|
-
"resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.9.0.tgz",
|
|
800
|
-
"integrity": "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==",
|
|
801
|
-
"license": "Apache-2.0",
|
|
802
|
-
"engines": {
|
|
803
|
-
"node": ">=8.0.0"
|
|
804
|
-
}
|
|
805
|
-
},
|
|
806
|
-
"node_modules/@opentelemetry/semantic-conventions": {
|
|
807
|
-
"version": "1.41.1",
|
|
808
|
-
"resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.41.1.tgz",
|
|
809
|
-
"integrity": "sha512-/UhIkaZgPutTFmQ7RnIJGgDXZmtEJ7Dvi86xNTFWcnRxVRNk/aotsqDJYeEvDP+FSMB2SdW+pQzNMcWP0rwuNA==",
|
|
810
|
-
"license": "Apache-2.0",
|
|
811
|
-
"engines": {
|
|
812
|
-
"node": ">=14"
|
|
813
|
-
}
|
|
814
|
-
},
|
|
815
774
|
"node_modules/@protobufjs/aspromise": {
|
|
816
775
|
"version": "1.1.2",
|
|
817
776
|
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
|
|
@@ -1263,23 +1222,6 @@
|
|
|
1263
1222
|
"url": "https://github.com/sponsors/sindresorhus"
|
|
1264
1223
|
}
|
|
1265
1224
|
},
|
|
1266
|
-
"node_modules/glob": {
|
|
1267
|
-
"version": "13.0.6",
|
|
1268
|
-
"resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
|
|
1269
|
-
"integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
|
|
1270
|
-
"license": "BlueOak-1.0.0",
|
|
1271
|
-
"dependencies": {
|
|
1272
|
-
"minimatch": "^10.2.2",
|
|
1273
|
-
"minipass": "^7.1.3",
|
|
1274
|
-
"path-scurry": "^2.0.2"
|
|
1275
|
-
},
|
|
1276
|
-
"engines": {
|
|
1277
|
-
"node": "18 || 20 || >=22"
|
|
1278
|
-
},
|
|
1279
|
-
"funding": {
|
|
1280
|
-
"url": "https://github.com/sponsors/isaacs"
|
|
1281
|
-
}
|
|
1282
|
-
},
|
|
1283
1225
|
"node_modules/google-auth-library": {
|
|
1284
1226
|
"version": "10.6.2",
|
|
1285
1227
|
"resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.6.2.tgz",
|
|
@@ -1477,15 +1419,6 @@
|
|
|
1477
1419
|
"url": "https://github.com/sponsors/isaacs"
|
|
1478
1420
|
}
|
|
1479
1421
|
},
|
|
1480
|
-
"node_modules/minipass": {
|
|
1481
|
-
"version": "7.1.3",
|
|
1482
|
-
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz",
|
|
1483
|
-
"integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==",
|
|
1484
|
-
"license": "BlueOak-1.0.0",
|
|
1485
|
-
"engines": {
|
|
1486
|
-
"node": ">=16 || 14 >=14.17"
|
|
1487
|
-
}
|
|
1488
|
-
},
|
|
1489
1422
|
"node_modules/ms": {
|
|
1490
1423
|
"version": "2.1.3",
|
|
1491
1424
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
|
@@ -1531,9 +1464,9 @@
|
|
|
1531
1464
|
}
|
|
1532
1465
|
},
|
|
1533
1466
|
"node_modules/openai": {
|
|
1534
|
-
"version": "6.
|
|
1535
|
-
"resolved": "https://registry.npmjs.org/openai/-/openai-6.
|
|
1536
|
-
"integrity": "sha512-
|
|
1467
|
+
"version": "6.40.0",
|
|
1468
|
+
"resolved": "https://registry.npmjs.org/openai/-/openai-6.40.0.tgz",
|
|
1469
|
+
"integrity": "sha512-MWtTjd/gQt4jpbji61NTgFWJLoY/PdRJ6wG9/ZDRMYNMlBKrCrSlkLI+KgHP1vR1qT6LKSAyAqIxno6lcK9JiA==",
|
|
1537
1470
|
"license": "Apache-2.0",
|
|
1538
1471
|
"peerDependencies": {
|
|
1539
1472
|
"ws": "^8.18.0",
|
|
@@ -1546,9 +1479,6 @@
|
|
|
1546
1479
|
"zod": {
|
|
1547
1480
|
"optional": true
|
|
1548
1481
|
}
|
|
1549
|
-
},
|
|
1550
|
-
"bin": {
|
|
1551
|
-
"openai": "bin/cli"
|
|
1552
1482
|
}
|
|
1553
1483
|
},
|
|
1554
1484
|
"node_modules/p-retry": {
|
|
@@ -1600,22 +1530,6 @@
|
|
|
1600
1530
|
"node": ">=8"
|
|
1601
1531
|
}
|
|
1602
1532
|
},
|
|
1603
|
-
"node_modules/path-scurry": {
|
|
1604
|
-
"version": "2.0.2",
|
|
1605
|
-
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
|
|
1606
|
-
"integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==",
|
|
1607
|
-
"license": "BlueOak-1.0.0",
|
|
1608
|
-
"dependencies": {
|
|
1609
|
-
"lru-cache": "^11.0.0",
|
|
1610
|
-
"minipass": "^7.1.2"
|
|
1611
|
-
},
|
|
1612
|
-
"engines": {
|
|
1613
|
-
"node": "18 || 20 || >=22"
|
|
1614
|
-
},
|
|
1615
|
-
"funding": {
|
|
1616
|
-
"url": "https://github.com/sponsors/isaacs"
|
|
1617
|
-
}
|
|
1618
|
-
},
|
|
1619
1533
|
"node_modules/proper-lockfile": {
|
|
1620
1534
|
"version": "4.1.2",
|
|
1621
1535
|
"resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz",
|
|
@@ -1846,24 +1760,6 @@
|
|
|
1846
1760
|
"funding": {
|
|
1847
1761
|
"url": "https://github.com/sponsors/eemeli"
|
|
1848
1762
|
}
|
|
1849
|
-
},
|
|
1850
|
-
"node_modules/zod": {
|
|
1851
|
-
"version": "3.25.76",
|
|
1852
|
-
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
|
|
1853
|
-
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
|
|
1854
|
-
"license": "MIT",
|
|
1855
|
-
"funding": {
|
|
1856
|
-
"url": "https://github.com/sponsors/colinhacks"
|
|
1857
|
-
}
|
|
1858
|
-
},
|
|
1859
|
-
"node_modules/zod-to-json-schema": {
|
|
1860
|
-
"version": "3.25.2",
|
|
1861
|
-
"resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.2.tgz",
|
|
1862
|
-
"integrity": "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==",
|
|
1863
|
-
"license": "ISC",
|
|
1864
|
-
"peerDependencies": {
|
|
1865
|
-
"zod": "^3.25.28 || ^4"
|
|
1866
|
-
}
|
|
1867
1763
|
}
|
|
1868
1764
|
}
|
|
1869
1765
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@earendil-works/pi-coding-agent",
|
|
3
|
-
"version": "0.84.
|
|
3
|
+
"version": "0.84.3",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piConfig": {
|
|
7
7
|
"configDir": ".pi"
|
|
8
8
|
},
|
|
9
9
|
"bin": {
|
|
10
|
-
"pi": "dist/cli.js"
|
|
10
|
+
"pi": "dist/bundle/cli.js"
|
|
11
11
|
},
|
|
12
12
|
"main": "./dist/index.js",
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"import": "./dist/index.js"
|
|
18
18
|
},
|
|
19
19
|
"./rpc-entry": {
|
|
20
|
-
"import": "./dist/rpc-entry.js"
|
|
20
|
+
"import": "./dist/bundle/rpc-entry.js"
|
|
21
21
|
},
|
|
22
22
|
"./client": {
|
|
23
23
|
"types": "./dist/client/index.d.ts",
|
|
@@ -34,8 +34,9 @@
|
|
|
34
34
|
],
|
|
35
35
|
"scripts": {
|
|
36
36
|
"clean": "shx rm -rf dist",
|
|
37
|
-
"build": "
|
|
38
|
-
"build:
|
|
37
|
+
"build": "npm run build:unbundled && node ../../scripts/build-coding-agent-bundle.mjs",
|
|
38
|
+
"build:unbundled": "tsgo -p tsconfig.build.json && shx chmod +x dist/cli.js dist/rpc-entry.js && npm run copy-assets",
|
|
39
|
+
"build:binary": "npm --prefix ../tui run build && npm --prefix ../telemetry run build && npm --prefix ../ai run build && npm --prefix ../agent run build && npm --prefix ../protocol run build && npm --prefix ../client run build && npm run build && bun build --compile --no-compile-autoload-bunfig ./src/bun/cli.ts ./src/utils/image-resize-worker.ts --outfile dist/pi && npm run copy-binary-assets",
|
|
39
40
|
"copy-assets": "shx mkdir -p dist/modes/interactive/theme && shx cp src/modes/interactive/theme/*.json dist/modes/interactive/theme/ && shx mkdir -p dist/modes/interactive/assets && shx cp src/modes/interactive/assets/*.png dist/modes/interactive/assets/ && shx mkdir -p dist/core/export-html/vendor && shx cp src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js dist/core/export-html/ && shx cp src/core/export-html/vendor/*.js dist/core/export-html/vendor/",
|
|
40
41
|
"copy-binary-assets": "shx cp package.json dist/ && shx cp README.md dist/ && shx cp CHANGELOG.md dist/ && shx mkdir -p dist/theme && shx cp src/modes/interactive/theme/*.json dist/theme/ && shx mkdir -p dist/assets && shx cp src/modes/interactive/assets/*.png dist/assets/ && shx mkdir -p dist/export-html/vendor && shx cp src/core/export-html/template.html dist/export-html/ && shx cp src/core/export-html/vendor/*.js dist/export-html/vendor/ && shx cp -r docs dist/ && shx cp -r examples dist/ && shx cp ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/",
|
|
41
42
|
"test": "vitest --run",
|
|
@@ -43,16 +44,15 @@
|
|
|
43
44
|
"prepublishOnly": "npm run clean && npm run build && npm run shrinkwrap"
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
|
-
"@earendil-works/pi-agent-core": "^0.84.
|
|
47
|
-
"@earendil-works/pi-ai": "^0.84.
|
|
48
|
-
"@earendil-works/pi-client": "^0.84.
|
|
49
|
-
"@earendil-works/pi-protocol": "^0.84.
|
|
50
|
-
"@earendil-works/pi-tui": "^0.84.
|
|
47
|
+
"@earendil-works/pi-agent-core": "^0.84.3",
|
|
48
|
+
"@earendil-works/pi-ai": "^0.84.3",
|
|
49
|
+
"@earendil-works/pi-client": "^0.84.3",
|
|
50
|
+
"@earendil-works/pi-protocol": "^0.84.3",
|
|
51
|
+
"@earendil-works/pi-tui": "^0.84.3",
|
|
51
52
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
52
53
|
"chalk": "5.6.2",
|
|
53
54
|
"cross-spawn": "7.0.6",
|
|
54
55
|
"diff": "8.0.4",
|
|
55
|
-
"glob": "13.0.6",
|
|
56
56
|
"grok-mermaid": "0.2.2",
|
|
57
57
|
"highlight.js": "10.7.3",
|
|
58
58
|
"hosted-git-info": "9.0.3",
|
|
@@ -77,10 +77,8 @@
|
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@types/cross-spawn": "6.0.6",
|
|
80
|
-
"@types/diff": "7.0.2",
|
|
81
80
|
"@types/hosted-git-info": "3.0.5",
|
|
82
|
-
"@types/
|
|
83
|
-
"@types/node": "24.12.4",
|
|
81
|
+
"@types/node": "22.19.19",
|
|
84
82
|
"@types/proper-lockfile": "4.1.4",
|
|
85
83
|
"@types/semver": "7.7.1",
|
|
86
84
|
"shx": "0.4.0",
|