mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(coding-agent): update runtime dependencies (#9341)
This commit is contained in:
parent
f53ac11351
commit
4a6ed01945
16 changed files with 1351 additions and 1750 deletions
981
package-lock.json
generated
981
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -59,7 +59,7 @@
|
|||
"@biomejs/biome": "2.3.5",
|
||||
"@types/node": "22.19.19",
|
||||
"@typescript/native-preview": "7.0.0-dev.20260120.1",
|
||||
"esbuild": "0.28.1",
|
||||
"esbuild": "0.28.2",
|
||||
"husky": "9.1.7",
|
||||
"shx": "0.4.0",
|
||||
"tsx": "4.22.1",
|
||||
|
|
@ -70,10 +70,6 @@
|
|||
},
|
||||
"version": "0.0.3",
|
||||
"overrides": {
|
||||
"protobufjs": "7.6.5",
|
||||
"rimraf": "6.1.2",
|
||||
"gaxios": {
|
||||
"rimraf": "6.1.2"
|
||||
}
|
||||
"protobufjs": "7.6.6"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@
|
|||
"@earendil-works/pi-ai": "^0.85.1",
|
||||
"@earendil-works/pi-telemetry": "^0.85.1",
|
||||
"diff": "8.0.4",
|
||||
"ignore": "7.0.5",
|
||||
"typebox": "1.3.7",
|
||||
"ignore": "7.0.8",
|
||||
"typebox": "1.3.27",
|
||||
"yaml": "2.9.0"
|
||||
},
|
||||
"keywords": [
|
||||
|
|
|
|||
|
|
@ -64,16 +64,16 @@
|
|||
"prepublishOnly": "npm run clean && npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@anthropic-ai/sdk": "0.123.0",
|
||||
"@aws-sdk/client-bedrock-runtime": "3.1048.0",
|
||||
"@anthropic-ai/sdk": "0.124.0",
|
||||
"@aws-sdk/client-bedrock-runtime": "3.1127.0",
|
||||
"@earendil-works/pi-telemetry": "^0.85.1",
|
||||
"@google/genai": "1.52.0",
|
||||
"@smithy/node-http-handler": "4.7.3",
|
||||
"http-proxy-agent": "7.0.2",
|
||||
"https-proxy-agent": "7.0.6",
|
||||
"@google/genai": "2.21.0",
|
||||
"@smithy/node-http-handler": "4.12.1",
|
||||
"http-proxy-agent": "9.1.0",
|
||||
"https-proxy-agent": "9.1.0",
|
||||
"openai": "6.40.0",
|
||||
"partial-json": "0.1.7",
|
||||
"typebox": "1.3.7"
|
||||
"typebox": "1.3.27"
|
||||
},
|
||||
"keywords": [
|
||||
"ai",
|
||||
|
|
|
|||
|
|
@ -396,6 +396,7 @@ export function mapStopReason(reason: FinishReason): StopReason {
|
|||
case FinishReason.LANGUAGE:
|
||||
case FinishReason.MALFORMED_FUNCTION_CALL:
|
||||
case FinishReason.UNEXPECTED_TOOL_CALL:
|
||||
case FinishReason.TOO_MANY_TOOL_CALLS:
|
||||
case FinishReason.NO_IMAGE:
|
||||
return "error";
|
||||
default: {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
"node": ">=22.19.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"esbuild": "0.28.1"
|
||||
"esbuild": "0.28.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"shx": "0.4.0",
|
||||
|
|
|
|||
975
packages/coding-agent/install-lock/package-lock.json
generated
975
packages/coding-agent/install-lock/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -7,11 +7,7 @@
|
|||
"@earendil-works/pi-coding-agent": "0.85.1"
|
||||
},
|
||||
"overrides": {
|
||||
"protobufjs": "7.6.5",
|
||||
"rimraf": "6.1.2",
|
||||
"gaxios": {
|
||||
"rimraf": "6.1.2"
|
||||
}
|
||||
"protobufjs": "7.6.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.19.0"
|
||||
|
|
|
|||
975
packages/coding-agent/npm-shrinkwrap.json
generated
975
packages/coding-agent/npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -54,27 +54,23 @@
|
|||
"@earendil-works/pi-ai": "^0.85.1",
|
||||
"@earendil-works/pi-tui": "^0.85.1",
|
||||
"@silvia-odwyer/photon-node": "0.3.4",
|
||||
"chalk": "5.6.2",
|
||||
"chalk": "6.0.0",
|
||||
"cross-spawn": "7.0.6",
|
||||
"diff": "8.0.4",
|
||||
"grok-mermaid": "0.2.2",
|
||||
"grok-mermaid": "0.2.3",
|
||||
"highlight.js": "10.7.3",
|
||||
"hosted-git-info": "9.0.3",
|
||||
"ignore": "7.0.5",
|
||||
"ignore": "7.0.8",
|
||||
"jiti": "2.7.0",
|
||||
"minimatch": "10.2.5",
|
||||
"minimatch": "10.2.6",
|
||||
"proper-lockfile": "4.1.2",
|
||||
"semver": "7.8.0",
|
||||
"typebox": "1.3.7",
|
||||
"undici": "8.9.0",
|
||||
"semver": "7.8.5",
|
||||
"typebox": "1.3.27",
|
||||
"undici": "8.10.2",
|
||||
"yaml": "2.9.0"
|
||||
},
|
||||
"overrides": {
|
||||
"protobufjs": "7.6.5",
|
||||
"rimraf": "6.1.2",
|
||||
"gaxios": {
|
||||
"rimraf": "6.1.2"
|
||||
}
|
||||
"protobufjs": "7.6.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@earendil-works/pi-client": "^0.85.1",
|
||||
|
|
|
|||
|
|
@ -62,15 +62,24 @@ describe("Mermaid rendering", () => {
|
|||
expect(transformMermaid(partialMarkdown, { isStreaming: true })).toContain("───▶");
|
||||
});
|
||||
|
||||
it("falls back to the code block with a warning after streaming", () => {
|
||||
it("renders diagrams with class assignments", () => {
|
||||
const markdown = "```mermaid\nflowchart LR\n A[Foo]:::highlight --> B[Bar]\n```";
|
||||
const rendered = transformMermaid(markdown);
|
||||
|
||||
expect(rendered).not.toContain("```mermaid");
|
||||
expect(rendered).not.toContain("Mermaid diagram not rendered");
|
||||
expect(rendered).toContain("│ Foo ├───▶│ Bar │");
|
||||
});
|
||||
|
||||
it("falls back to the code block with a warning after streaming", () => {
|
||||
const markdown = "```mermaid\nflowchart LR\n A[Foo] invalid\n```";
|
||||
const final = transformMermaid(markdown);
|
||||
const followedByText = transformMermaid(`${markdown}\nFollowing text`);
|
||||
const streaming = transformMermaid(markdown, { isStreaming: true });
|
||||
|
||||
expect(final).toContain(markdown);
|
||||
expect(final).toContain("```\n`Mermaid diagram not rendered");
|
||||
expect(final).toContain('dropped, expected a link: ":::highlight --> B[Bar]"');
|
||||
expect(final).toContain('dropped, expected a link: "invalid"');
|
||||
expect(final).not.toContain("more)");
|
||||
expect(followedByText).toContain(" \nFollowing text");
|
||||
expect(streaming).not.toContain("Mermaid diagram not rendered");
|
||||
|
|
@ -79,13 +88,13 @@ describe("Mermaid rendering", () => {
|
|||
});
|
||||
|
||||
it("summarizes additional partial-render warnings", () => {
|
||||
const markdown = "```mermaid\nflowchart LR\n A[Foo]:::highlight --> B[Bar]\n C[Baz]:::other --> D[Qux]\n```";
|
||||
const markdown = "```mermaid\nflowchart LR\n A[Foo] invalid\n B[Bar] also-invalid\n```";
|
||||
const rendered = transformMermaid(markdown);
|
||||
|
||||
expect(rendered).toContain(markdown);
|
||||
expect(rendered).toContain('dropped, expected a link: ":::highlight --> B[Bar]"');
|
||||
expect(rendered).toContain('dropped, expected a link: "invalid"');
|
||||
expect(rendered).toContain("(+1 more)");
|
||||
expect(rendered).not.toContain('dropped, expected a link: ":::other --> D[Qux]"');
|
||||
expect(rendered).not.toContain('dropped, expected a link: "also-invalid"');
|
||||
});
|
||||
|
||||
it("respects rendering modes and skips thinking blocks", () => {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@earendil-works/chord": "^0.85.1",
|
||||
"typebox": "1.3.7"
|
||||
"typebox": "1.3.27"
|
||||
},
|
||||
"devDependencies": {
|
||||
"shx": "0.4.0",
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@
|
|||
"types": "./dist/index.d.ts",
|
||||
"dependencies": {
|
||||
"get-east-asian-width": "1.6.0",
|
||||
"marked": "18.0.5"
|
||||
"marked": "18.0.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@xterm/headless": "5.5.0",
|
||||
"chalk": "5.6.2"
|
||||
"chalk": "6.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ const allowedExternalPackages = new Set([
|
|||
// Optional native accelerators. Their callers fall back to JavaScript when absent.
|
||||
"bufferutil",
|
||||
"utf-8-validate",
|
||||
// Optional native proxy authentication. Its caller reports an install hint when absent.
|
||||
"kerberos",
|
||||
// Optional debug output coloring.
|
||||
"supports-color",
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ const internalPackagePrefix = "@earendil-works/pi-";
|
|||
const internalPackageNames = new Set(["@earendil-works/chord"]);
|
||||
const installPackageName = "@earendil-works/pi-coding-agent-install";
|
||||
const allowedInstallScriptPackages = new Map([
|
||||
["@google/genai@1.52.0", "preinstall is a no-op in the published package"],
|
||||
["esbuild@0.28.1", "postinstall selects and verifies the platform-specific esbuild binary"],
|
||||
["protobufjs@7.6.5", "postinstall only warns about protobufjs version scheme mismatches"],
|
||||
["@google/genai@2.21.0", "preinstall is a no-op in the published package"],
|
||||
["esbuild@0.28.2", "postinstall selects and verifies the platform-specific esbuild binary"],
|
||||
["protobufjs@7.6.6", "postinstall only warns about protobufjs version scheme mismatches"],
|
||||
]);
|
||||
|
||||
const args = new Set(process.argv.slice(2));
|
||||
|
|
@ -211,22 +211,36 @@ function addInternalWorkspace(installLockPackages, addedPaths, queue, name, work
|
|||
addedPaths.add(outputPath);
|
||||
|
||||
for (const dependencyName of Object.keys(packageDependencies(packageJson))) {
|
||||
queue.push({ name: dependencyName, from: outputPath });
|
||||
queue.push({
|
||||
name: dependencyName,
|
||||
sourceFrom: workspace.lockPath,
|
||||
sourceBase: workspace.lockPath,
|
||||
outputBase: outputPath,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function addExternalPackage(lockPackages, installLockPackages, addedPaths, queue, name, from) {
|
||||
const lockPath = resolveExternalDependency(lockPackages, name, from);
|
||||
if (addedPaths.has(lockPath)) {
|
||||
function addExternalPackage(lockPackages, installLockPackages, addedPaths, queue, item) {
|
||||
const sourceLockPath = resolveExternalDependency(lockPackages, item.name, item.sourceFrom);
|
||||
const outputLockPath =
|
||||
item.sourceBase && sourceLockPath.startsWith(`${item.sourceBase}/`)
|
||||
? [item.outputBase, sourceLockPath.slice(item.sourceBase.length + 1)].filter(Boolean).join("/")
|
||||
: sourceLockPath;
|
||||
if (addedPaths.has(outputLockPath)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const entry = lockPackages[lockPath];
|
||||
installLockPackages[lockPath] = copyLockEntry(entry);
|
||||
addedPaths.add(lockPath);
|
||||
const entry = lockPackages[sourceLockPath];
|
||||
installLockPackages[outputLockPath] = copyLockEntry(entry);
|
||||
addedPaths.add(outputLockPath);
|
||||
|
||||
for (const dependencyName of Object.keys(packageDependencies(entry))) {
|
||||
queue.push({ name: dependencyName, from: lockPath });
|
||||
queue.push({
|
||||
name: dependencyName,
|
||||
sourceFrom: sourceLockPath,
|
||||
sourceBase: item.sourceBase,
|
||||
outputBase: item.outputBase,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -376,7 +390,10 @@ function generateInstallLock() {
|
|||
};
|
||||
const addedPaths = new Set([""]);
|
||||
const internalNames = new Set();
|
||||
const queue = Object.keys(packageDependencies(installerPackageJson)).map((name) => ({ name, from: "" }));
|
||||
const queue = Object.keys(packageDependencies(installerPackageJson)).map((name) => ({
|
||||
name,
|
||||
sourceFrom: "",
|
||||
}));
|
||||
|
||||
while (queue.length > 0) {
|
||||
const item = queue.shift();
|
||||
|
|
@ -394,7 +411,7 @@ function generateInstallLock() {
|
|||
continue;
|
||||
}
|
||||
|
||||
addExternalPackage(lockPackages, installLockPackages, addedPaths, queue, item.name, item.from);
|
||||
addExternalPackage(lockPackages, installLockPackages, addedPaths, queue, item);
|
||||
}
|
||||
|
||||
const installLock = {
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ const shrinkwrapPath = join(codingAgentDir, "npm-shrinkwrap.json");
|
|||
const internalPackagePrefix = "@earendil-works/pi-";
|
||||
const internalPackageNames = new Set(["@earendil-works/chord"]);
|
||||
const allowedInstallScriptPackages = new Map([
|
||||
["@google/genai@1.52.0", "preinstall is a no-op in the published package"],
|
||||
["esbuild@0.28.1", "postinstall selects and verifies the platform-specific esbuild binary"],
|
||||
["protobufjs@7.6.5", "postinstall only warns about protobufjs version scheme mismatches"],
|
||||
["@google/genai@2.21.0", "preinstall is a no-op in the published package"],
|
||||
["esbuild@0.28.2", "postinstall selects and verifies the platform-specific esbuild binary"],
|
||||
["protobufjs@7.6.6", "postinstall only warns about protobufjs version scheme mismatches"],
|
||||
]);
|
||||
|
||||
const args = new Set(process.argv.slice(2));
|
||||
|
|
@ -204,22 +204,36 @@ function addInternalWorkspace(shrinkwrapPackages, addedPaths, queue, name, works
|
|||
addedPaths.add(outputPath);
|
||||
|
||||
for (const dependencyName of Object.keys(packageDependencies(packageJson))) {
|
||||
queue.push({ name: dependencyName, from: outputPath });
|
||||
queue.push({
|
||||
name: dependencyName,
|
||||
sourceFrom: workspace.lockPath,
|
||||
sourceBase: workspace.lockPath,
|
||||
outputBase: outputPath,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function addExternalPackage(lockPackages, shrinkwrapPackages, addedPaths, queue, name, from) {
|
||||
const lockPath = resolveExternalDependency(lockPackages, name, from);
|
||||
if (addedPaths.has(lockPath)) {
|
||||
function addExternalPackage(lockPackages, shrinkwrapPackages, addedPaths, queue, item) {
|
||||
const sourceLockPath = resolveExternalDependency(lockPackages, item.name, item.sourceFrom);
|
||||
const outputLockPath =
|
||||
item.sourceBase && sourceLockPath.startsWith(`${item.sourceBase}/`)
|
||||
? [item.outputBase, sourceLockPath.slice(item.sourceBase.length + 1)].filter(Boolean).join("/")
|
||||
: sourceLockPath;
|
||||
if (addedPaths.has(outputLockPath)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const entry = lockPackages[lockPath];
|
||||
shrinkwrapPackages[lockPath] = copyLockEntry(entry);
|
||||
addedPaths.add(lockPath);
|
||||
const entry = lockPackages[sourceLockPath];
|
||||
shrinkwrapPackages[outputLockPath] = copyLockEntry(entry);
|
||||
addedPaths.add(outputLockPath);
|
||||
|
||||
for (const dependencyName of Object.keys(packageDependencies(entry))) {
|
||||
queue.push({ name: dependencyName, from: lockPath });
|
||||
queue.push({
|
||||
name: dependencyName,
|
||||
sourceFrom: sourceLockPath,
|
||||
sourceBase: item.sourceBase,
|
||||
outputBase: item.outputBase,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -303,7 +317,12 @@ function generateShrinkwrap() {
|
|||
};
|
||||
const addedPaths = new Set([""]);
|
||||
const internalNames = new Set();
|
||||
const queue = Object.keys(packageDependencies(codingAgentPackage)).map((name) => ({ name, from: "" }));
|
||||
const queue = Object.keys(packageDependencies(codingAgentPackage)).map((name) => ({
|
||||
name,
|
||||
sourceFrom: "packages/coding-agent",
|
||||
sourceBase: "packages/coding-agent",
|
||||
outputBase: "",
|
||||
}));
|
||||
|
||||
while (queue.length > 0) {
|
||||
const item = queue.shift();
|
||||
|
|
@ -321,7 +340,7 @@ function generateShrinkwrap() {
|
|||
continue;
|
||||
}
|
||||
|
||||
addExternalPackage(lockPackages, shrinkwrapPackages, addedPaths, queue, item.name, item.from);
|
||||
addExternalPackage(lockPackages, shrinkwrapPackages, addedPaths, queue, item);
|
||||
}
|
||||
|
||||
const shrinkwrap = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue