singleton-pipeline 0.4.0-beta.7 → 0.4.0-beta.9
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/claude.js +5 -2
- package/packages/cli/src/runners/codex.js +5 -2
- package/packages/cli/src/runners/copilot.js +11 -15
- 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.9)
|
|
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.9",
|
|
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.9';
|
|
206
206
|
|
|
207
207
|
async function showWelcome(root, shell) {
|
|
208
208
|
const now = new Date();
|
|
@@ -97,8 +97,11 @@ export const claudeRunner = {
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
|
|
100
|
-
child.stdin.
|
|
101
|
-
|
|
100
|
+
child.stdin.on('error', () => { /* surfaced via close handler */ });
|
|
101
|
+
try {
|
|
102
|
+
child.stdin.write(userPrompt);
|
|
103
|
+
child.stdin.end();
|
|
104
|
+
} catch { /* same */ }
|
|
102
105
|
});
|
|
103
106
|
|
|
104
107
|
return {
|
|
@@ -128,8 +128,11 @@ export const codexRunner = {
|
|
|
128
128
|
resolve({ events, stderr: stderrText });
|
|
129
129
|
});
|
|
130
130
|
|
|
131
|
-
child.stdin.
|
|
132
|
-
|
|
131
|
+
child.stdin.on('error', () => { /* surfaced via close handler */ });
|
|
132
|
+
try {
|
|
133
|
+
child.stdin.write(prompt);
|
|
134
|
+
child.stdin.end();
|
|
135
|
+
} catch { /* same */ }
|
|
133
136
|
});
|
|
134
137
|
|
|
135
138
|
let text = '';
|
|
@@ -81,14 +81,15 @@ export function buildCopilotPermissionArgs(securityPolicy = {}) {
|
|
|
81
81
|
return args;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
export function buildCopilotArgs({ model, runnerAgent, securityPolicy = {} } = {}) {
|
|
85
|
-
//
|
|
86
|
-
// as
|
|
87
|
-
//
|
|
88
|
-
//
|
|
84
|
+
export function buildCopilotArgs({ prompt, model, runnerAgent, securityPolicy = {} } = {}) {
|
|
85
|
+
// Copilot CLI expects the user prompt as `-p <text>`. `-p -` is interpreted
|
|
86
|
+
// as the literal string "-" (not stdin), so we pass the actual prompt here.
|
|
87
|
+
// Callers are responsible for keeping the prompt under the platform arg
|
|
88
|
+
// length limit (Windows ~32KB) — large context blobs should be referenced
|
|
89
|
+
// as files on disk rather than inlined.
|
|
89
90
|
const args = [
|
|
90
91
|
'-p',
|
|
91
|
-
'
|
|
92
|
+
prompt ?? '',
|
|
92
93
|
'--output-format',
|
|
93
94
|
'json',
|
|
94
95
|
...buildCopilotPermissionArgs(securityPolicy),
|
|
@@ -147,15 +148,13 @@ export const copilotRunner = {
|
|
|
147
148
|
timeoutMs = DEFAULT_TIMEOUT_MS,
|
|
148
149
|
}) {
|
|
149
150
|
// When --agent is used, Copilot loads the system prompt from .github/agents/<name>.md.
|
|
150
|
-
//
|
|
151
|
-
//
|
|
152
|
-
// pipe ONLY the user prompt when runnerAgent is set — this matches the pattern
|
|
153
|
-
// `copilot -p "<user_message>" --agent <name>` used in standalone bash scripts.
|
|
151
|
+
// We pass only the user prompt as `-p <text>` to match the `copilot -p "<msg>" --agent <name>`
|
|
152
|
+
// pattern. When --agent is not used we inline the system prompt with our XML wrappers.
|
|
154
153
|
const prompt = runnerAgent ? userPrompt : buildPrompt(systemPrompt, userPrompt);
|
|
155
|
-
const args = buildCopilotArgs({ model, runnerAgent, securityPolicy });
|
|
154
|
+
const args = buildCopilotArgs({ prompt, model, runnerAgent, securityPolicy });
|
|
156
155
|
|
|
157
156
|
const { events, stderr } = await new Promise((resolve, reject) => {
|
|
158
|
-
const child = spawn('copilot', args, { cwd, stdio: ['
|
|
157
|
+
const child = spawn('copilot', args, { cwd, stdio: ['ignore', 'pipe', 'pipe'] });
|
|
159
158
|
const stdoutChunks = [];
|
|
160
159
|
let stderrText = '';
|
|
161
160
|
let timedOut = false;
|
|
@@ -166,9 +165,6 @@ export const copilotRunner = {
|
|
|
166
165
|
setTimeout(() => child.kill('SIGKILL'), 5000).unref();
|
|
167
166
|
}, timeoutMs);
|
|
168
167
|
|
|
169
|
-
child.stdin.write(prompt);
|
|
170
|
-
child.stdin.end();
|
|
171
|
-
|
|
172
168
|
child.stdout.on('data', (d) => stdoutChunks.push(d.toString()));
|
|
173
169
|
child.stderr.on('data', (d) => (stderrText += d.toString()));
|
|
174
170
|
child.on('error', (err) => {
|