fix: centralize Windows exec handling and async migrations (#318)

* Add Windows exec foundation helpers

* server: centralize windows exec handling phase 2

* migrate cli daemon status to execCommand

* refactor: complete phase 4 async exec migrations

* test: cover windows exec helpers

* fix: use beforeEach for context.skip in test setup
This commit is contained in:
Mohamed Boudra
2026-04-13 15:20:59 +07:00
committed by GitHub
parent f0c59ec534
commit bf76915884
44 changed files with 3048 additions and 2781 deletions

View File

@@ -123,11 +123,13 @@ async function verifyInjectedMcpForProvider(
}
async function main(): Promise<void> {
if (!isProviderAvailable("claude")) {
const claudeAvailable = await isProviderAvailable("claude");
if (!claudeAvailable) {
throw new Error(
"Claude is not available in this environment. Ensure the `claude` binary and credentials are configured.",
);
}
const codexAvailable = await isProviderAvailable("codex");
const logger = pino({ level: "silent" });
const rootCwd = await mkdtemp(path.join(os.tmpdir(), "paseo-mcp-inject-real-"));
@@ -136,7 +138,7 @@ async function main(): Promise<void> {
const daemon = await createTestPaseoDaemon({
agentClients: {
claude: new ClaudeAgentClient({ logger }),
...(isProviderAvailable("codex") ? { codex: new CodexAppServerAgentClient(logger) } : {}),
...(codexAvailable ? { codex: new CodexAppServerAgentClient(logger) } : {}),
},
logger,
});
@@ -159,7 +161,7 @@ async function main(): Promise<void> {
results.push(claudeResult);
console.log(`[PASS] Claude MCP injection verified for agent ${claudeResult.agentId}`);
if (isProviderAvailable("codex")) {
if (codexAvailable) {
const codexResult = await verifyInjectedMcpForProvider(client, "codex", codexCwd);
createdAgentIds.push(codexResult.agentId);
results.push(codexResult);