mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-07-09 17:28:45 +00:00
Merge main into model-registry
This commit is contained in:
commit
abbd911693
220 changed files with 10488 additions and 4354 deletions
|
|
@ -12,7 +12,7 @@ const shrinkwrapPath = join(codingAgentDir, "npm-shrinkwrap.json");
|
|||
const internalPackagePrefix = "@earendil-works/pi-";
|
||||
const allowedInstallScriptPackages = new Map([
|
||||
["@google/genai@1.52.0", "preinstall is a no-op in the published package"],
|
||||
["protobufjs@7.5.9", "postinstall only warns about protobufjs version scheme mismatches"],
|
||||
["protobufjs@7.6.4", "postinstall only warns about protobufjs version scheme mismatches"],
|
||||
]);
|
||||
|
||||
const args = new Set(process.argv.slice(2));
|
||||
|
|
|
|||
55
scripts/repro-5893-wsl-bash.mjs
Normal file
55
scripts/repro-5893-wsl-bash.mjs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
#!/usr/bin/env node
|
||||
import { existsSync } from "node:fs";
|
||||
import { createBashTool } from "../packages/coding-agent/src/core/tools/bash.ts";
|
||||
|
||||
const shellPath = "C:\\Windows\\System32\\bash.exe";
|
||||
const nameExpansion = "$" + "{name}";
|
||||
const countExpansion = "$" + "{count}";
|
||||
const iExpansion = "$" + "{i}";
|
||||
|
||||
function getTextOutput(result) {
|
||||
return result.content
|
||||
.filter((content) => content.type === "text")
|
||||
.map((content) => content.text ?? "")
|
||||
.join("\n");
|
||||
}
|
||||
|
||||
async function runCase(label, command, expectedOutput) {
|
||||
const tool = createBashTool(process.cwd(), { shellPath });
|
||||
const result = await tool.execute(label, { command });
|
||||
const output = getTextOutput(result).trimEnd();
|
||||
if (output !== expectedOutput) {
|
||||
throw new Error(
|
||||
[
|
||||
`${label} failed`,
|
||||
"Expected:",
|
||||
expectedOutput,
|
||||
"Actual:",
|
||||
output,
|
||||
].join("\n"),
|
||||
);
|
||||
}
|
||||
console.log(output);
|
||||
}
|
||||
|
||||
if (process.platform !== "win32") {
|
||||
throw new Error("This repro must run from Windows PowerShell/CMD, not macOS/Linux or inside WSL.");
|
||||
}
|
||||
|
||||
if (!existsSync(shellPath)) {
|
||||
throw new Error(`WSL bash launcher not found at ${shellPath}. Install/enable WSL first.`);
|
||||
}
|
||||
|
||||
await runCase(
|
||||
"issue-5893-simple-variable",
|
||||
`name='World'; echo "Hello, ${nameExpansion}!"`,
|
||||
"Hello, World!",
|
||||
);
|
||||
|
||||
await runCase(
|
||||
"issue-5893-loop-variable",
|
||||
`count=3; for i in $(seq 1 ${countExpansion}); do echo "Iteration ${iExpansion} of ${countExpansion}"; done`,
|
||||
"Iteration 1 of 3\nIteration 2 of 3\nIteration 3 of 3",
|
||||
);
|
||||
|
||||
console.log("issue #5893 WSL bash repro passed");
|
||||
Loading…
Add table
Add a link
Reference in a new issue