singleton-pipeline 0.4.0-beta.1 → 0.4.0-beta.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/README.md +1 -1
- package/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/commands/repl.js +1 -1
- package/packages/cli/src/index.js +1 -1
- package/packages/cli/src/runners/_shared.js +7 -0
- package/packages/cli/src/runners/claude.js +2 -1
- package/packages/cli/src/runners/codex.js +3 -2
- package/packages/cli/src/runners/copilot.js +2 -2
- package/packages/cli/src/runners/opencode.js +2 -2
- package/packages/server/package.json +1 -1
- package/packages/web/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Singleton Pipeline Builder (v0.4.0-beta.
|
|
1
|
+
# Singleton Pipeline Builder (v0.4.0-beta.3)
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/singleton-pipeline)
|
|
4
4
|
[](https://www.npmjs.com/package/singleton-pipeline)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "singleton-pipeline",
|
|
3
|
-
"version": "0.4.0-beta.
|
|
3
|
+
"version": "0.4.0-beta.3",
|
|
4
4
|
"description": "Visual pipeline builder for multi-agent AI workflows. Orchestrates Claude Code, Codex, Copilot, and OpenCode under a unified security policy.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -202,7 +202,7 @@ const SINGLETON_RAW = [
|
|
|
202
202
|
];
|
|
203
203
|
|
|
204
204
|
const ART_WIDTH = Math.max(...SINGLETON_RAW.map((l) => l.length));
|
|
205
|
-
const APP_VERSION = 'v0.4.0-beta.
|
|
205
|
+
const APP_VERSION = 'v0.4.0-beta.3';
|
|
206
206
|
|
|
207
207
|
async function showWelcome(root, shell) {
|
|
208
208
|
const now = new Date();
|
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
// normalize the common patterns: parsing lines, walking nested events to find
|
|
4
4
|
// usage/cost, and extracting assistant text from messages with varying schemas.
|
|
5
5
|
|
|
6
|
+
// On Windows, npm-installed CLI binaries are shipped as .cmd wrappers (claude.cmd,
|
|
7
|
+
// copilot.cmd, codex.cmd, opencode.cmd). Node's spawn does not append the extension
|
|
8
|
+
// automatically, so we resolve the platform-specific name here.
|
|
9
|
+
export function resolveBinary(command) {
|
|
10
|
+
return process.platform === 'win32' ? `${command}.cmd` : command;
|
|
11
|
+
}
|
|
12
|
+
|
|
6
13
|
export function safeJsonParse(line) {
|
|
7
14
|
try {
|
|
8
15
|
return JSON.parse(line);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
|
+
import { resolveBinary } from './_shared.js';
|
|
2
3
|
|
|
3
4
|
const DEFAULT_TIMEOUT_MS = Number(process.env.SINGLETON_RUNNER_TIMEOUT_MS) || 10 * 60 * 1000;
|
|
4
5
|
const ALLOWED_PERMISSION_MODES = new Set(['bypassPermissions']);
|
|
@@ -62,7 +63,7 @@ export const claudeRunner = {
|
|
|
62
63
|
if (model) args.push('--model', model);
|
|
63
64
|
|
|
64
65
|
const raw = await new Promise((resolve, reject) => {
|
|
65
|
-
const child = spawn('claude', args, { cwd, stdio: ['pipe', 'pipe', 'pipe'] });
|
|
66
|
+
const child = spawn(resolveBinary('claude'), args, { cwd, stdio: ['pipe', 'pipe', 'pipe'], shell: process.platform === 'win32' });
|
|
66
67
|
let stdout = '';
|
|
67
68
|
let stderr = '';
|
|
68
69
|
let timedOut = false;
|
|
@@ -3,7 +3,7 @@ import os from 'node:os';
|
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { spawn } from 'node:child_process';
|
|
5
5
|
import { discoverCodexProjectInstructions } from './codex-instructions.js';
|
|
6
|
-
import { findUsage, safeJsonParse } from './_shared.js';
|
|
6
|
+
import { findUsage, resolveBinary, safeJsonParse } from './_shared.js';
|
|
7
7
|
|
|
8
8
|
const DEFAULT_TIMEOUT_MS = Number(process.env.SINGLETON_RUNNER_TIMEOUT_MS) || 10 * 60 * 1000;
|
|
9
9
|
|
|
@@ -79,9 +79,10 @@ export const codexRunner = {
|
|
|
79
79
|
const args = buildCodexArgs({ prompt, model, outputFile, securityPolicy });
|
|
80
80
|
|
|
81
81
|
const { events, stderr } = await new Promise((resolve, reject) => {
|
|
82
|
-
const child = spawn('codex', args, {
|
|
82
|
+
const child = spawn(resolveBinary('codex'), args, {
|
|
83
83
|
cwd,
|
|
84
84
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
85
|
+
shell: process.platform === 'win32',
|
|
85
86
|
env: {
|
|
86
87
|
...process.env,
|
|
87
88
|
CODEX_HOME: process.env.CODEX_HOME || path.join(os.homedir(), '.codex'),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { extractText, safeJsonParse } from './_shared.js';
|
|
3
|
+
import { extractText, resolveBinary, safeJsonParse } from './_shared.js';
|
|
4
4
|
|
|
5
5
|
const DEFAULT_TIMEOUT_MS = Number(process.env.SINGLETON_RUNNER_TIMEOUT_MS) || 10 * 60 * 1000;
|
|
6
6
|
|
|
@@ -141,7 +141,7 @@ export const copilotRunner = {
|
|
|
141
141
|
const args = buildCopilotArgs({ prompt, model, runnerAgent, securityPolicy });
|
|
142
142
|
|
|
143
143
|
const { events, stderr } = await new Promise((resolve, reject) => {
|
|
144
|
-
const child = spawn('copilot', args, { cwd, stdio: ['ignore', 'pipe', 'pipe'] });
|
|
144
|
+
const child = spawn(resolveBinary('copilot'), args, { cwd, stdio: ['ignore', 'pipe', 'pipe'], shell: process.platform === 'win32' });
|
|
145
145
|
const stdoutChunks = [];
|
|
146
146
|
let stderrText = '';
|
|
147
147
|
let timedOut = false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { extractText, findCostUsd, findUsage, safeJsonParse } from './_shared.js';
|
|
3
|
+
import { extractText, findCostUsd, findUsage, resolveBinary, safeJsonParse } from './_shared.js';
|
|
4
4
|
|
|
5
5
|
const DEFAULT_TIMEOUT_MS = Number(process.env.SINGLETON_RUNNER_TIMEOUT_MS) || 10 * 60 * 1000;
|
|
6
6
|
|
|
@@ -199,7 +199,7 @@ export const opencodeRunner = {
|
|
|
199
199
|
});
|
|
200
200
|
|
|
201
201
|
const runResult = await new Promise((resolve, reject) => {
|
|
202
|
-
const child = spawn('opencode', args, { cwd, env, stdio: ['ignore', 'pipe', 'pipe'] });
|
|
202
|
+
const child = spawn(resolveBinary('opencode'), args, { cwd, env, stdio: ['ignore', 'pipe', 'pipe'], shell: process.platform === 'win32' });
|
|
203
203
|
const stdoutChunks = [];
|
|
204
204
|
let stderrText = '';
|
|
205
205
|
let timedOut = false;
|