singleton-pipeline 0.4.0-beta.3 → 0.4.0-beta.5
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 +2 -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 +0 -7
- package/packages/cli/src/runners/claude.js +2 -3
- package/packages/cli/src/runners/codex.js +3 -4
- package/packages/cli/src/runners/copilot.js +13 -6
- package/packages/cli/src/runners/opencode.js +3 -3
- 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.5)
|
|
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.5",
|
|
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",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"chalk": "^5.6.2",
|
|
54
54
|
"commander": "^12.1.0",
|
|
55
55
|
"cors": "^2.8.5",
|
|
56
|
+
"cross-spawn": "^7.0.6",
|
|
56
57
|
"express": "^4.21.2",
|
|
57
58
|
"fast-glob": "^3.3.2",
|
|
58
59
|
"figlet": "^1.11.0",
|
|
@@ -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.5';
|
|
206
206
|
|
|
207
207
|
async function showWelcome(root, shell) {
|
|
208
208
|
const now = new Date();
|
|
@@ -3,13 +3,6 @@
|
|
|
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
|
-
|
|
13
6
|
export function safeJsonParse(line) {
|
|
14
7
|
try {
|
|
15
8
|
return JSON.parse(line);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveBinary } from './_shared.js';
|
|
1
|
+
import spawn from 'cross-spawn';
|
|
3
2
|
|
|
4
3
|
const DEFAULT_TIMEOUT_MS = Number(process.env.SINGLETON_RUNNER_TIMEOUT_MS) || 10 * 60 * 1000;
|
|
5
4
|
const ALLOWED_PERMISSION_MODES = new Set(['bypassPermissions']);
|
|
@@ -63,7 +62,7 @@ export const claudeRunner = {
|
|
|
63
62
|
if (model) args.push('--model', model);
|
|
64
63
|
|
|
65
64
|
const raw = await new Promise((resolve, reject) => {
|
|
66
|
-
const child = spawn(
|
|
65
|
+
const child = spawn('claude', args, { cwd, stdio: ['pipe', 'pipe', 'pipe'] });
|
|
67
66
|
let stdout = '';
|
|
68
67
|
let stderr = '';
|
|
69
68
|
let timedOut = false;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import
|
|
4
|
+
import spawn from 'cross-spawn';
|
|
5
5
|
import { discoverCodexProjectInstructions } from './codex-instructions.js';
|
|
6
|
-
import { findUsage,
|
|
6
|
+
import { findUsage, 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,10 +79,9 @@ 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(
|
|
82
|
+
const child = spawn('codex', args, {
|
|
83
83
|
cwd,
|
|
84
84
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
85
|
-
shell: process.platform === 'win32',
|
|
86
85
|
env: {
|
|
87
86
|
...process.env,
|
|
88
87
|
CODEX_HOME: process.env.CODEX_HOME || path.join(os.homedir(), '.codex'),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import spawn from 'cross-spawn';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { extractText,
|
|
3
|
+
import { extractText, safeJsonParse } from './_shared.js';
|
|
4
4
|
|
|
5
5
|
const DEFAULT_TIMEOUT_MS = Number(process.env.SINGLETON_RUNNER_TIMEOUT_MS) || 10 * 60 * 1000;
|
|
6
6
|
|
|
@@ -76,10 +76,14 @@ export function buildCopilotPermissionArgs(securityPolicy = {}) {
|
|
|
76
76
|
return args;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
export function buildCopilotArgs({
|
|
79
|
+
export function buildCopilotArgs({ model, runnerAgent, securityPolicy = {} } = {}) {
|
|
80
|
+
// Prompt is written to stdin (see copilotRunner.run) instead of being passed
|
|
81
|
+
// as `-p <prompt>`. This avoids the Windows command-line length limit (~32KB)
|
|
82
|
+
// that hits as soon as the scout's context.md is injected into downstream
|
|
83
|
+
// prompts.
|
|
80
84
|
const args = [
|
|
81
85
|
'-p',
|
|
82
|
-
|
|
86
|
+
'-',
|
|
83
87
|
'--output-format',
|
|
84
88
|
'json',
|
|
85
89
|
...buildCopilotPermissionArgs(securityPolicy),
|
|
@@ -138,10 +142,10 @@ export const copilotRunner = {
|
|
|
138
142
|
timeoutMs = DEFAULT_TIMEOUT_MS,
|
|
139
143
|
}) {
|
|
140
144
|
const prompt = buildPrompt(systemPrompt, userPrompt);
|
|
141
|
-
const args = buildCopilotArgs({
|
|
145
|
+
const args = buildCopilotArgs({ model, runnerAgent, securityPolicy });
|
|
142
146
|
|
|
143
147
|
const { events, stderr } = await new Promise((resolve, reject) => {
|
|
144
|
-
const child = spawn(
|
|
148
|
+
const child = spawn('copilot', args, { cwd, stdio: ['pipe', 'pipe', 'pipe'] });
|
|
145
149
|
const stdoutChunks = [];
|
|
146
150
|
let stderrText = '';
|
|
147
151
|
let timedOut = false;
|
|
@@ -152,6 +156,9 @@ export const copilotRunner = {
|
|
|
152
156
|
setTimeout(() => child.kill('SIGKILL'), 5000).unref();
|
|
153
157
|
}, timeoutMs);
|
|
154
158
|
|
|
159
|
+
child.stdin.write(prompt);
|
|
160
|
+
child.stdin.end();
|
|
161
|
+
|
|
155
162
|
child.stdout.on('data', (d) => stdoutChunks.push(d.toString()));
|
|
156
163
|
child.stderr.on('data', (d) => (stderrText += d.toString()));
|
|
157
164
|
child.on('error', (err) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import spawn from 'cross-spawn';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { extractText, findCostUsd, findUsage,
|
|
3
|
+
import { extractText, findCostUsd, findUsage, 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(
|
|
202
|
+
const child = spawn('opencode', args, { cwd, env, stdio: ['ignore', 'pipe', 'pipe'] });
|
|
203
203
|
const stdoutChunks = [];
|
|
204
204
|
let stderrText = '';
|
|
205
205
|
let timedOut = false;
|