singleton-pipeline 0.4.0-beta.8 → 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 CHANGED
@@ -1,4 +1,4 @@
1
- # Singleton Pipeline Builder (v0.4.0-beta.8)
1
+ # Singleton Pipeline Builder (v0.4.0-beta.9)
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/singleton-pipeline/beta.svg)](https://www.npmjs.com/package/singleton-pipeline)
4
4
  [![npm downloads](https://img.shields.io/npm/dm/singleton-pipeline.svg)](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.8",
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",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singleton/cli",
3
- "version": "0.4.0-beta.8",
3
+ "version": "0.4.0-beta.9",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "singleton": "./src/index.js"
@@ -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.8';
205
+ const APP_VERSION = 'v0.4.0-beta.9';
206
206
 
207
207
  async function showWelcome(root, shell) {
208
208
  const now = new Date();
@@ -22,7 +22,7 @@ function groupAgentsByProvider(agents) {
22
22
  program
23
23
  .name('singleton')
24
24
  .description('Singleton Pipeline Builder — scan agents and build pipelines')
25
- .version('0.4.0-beta.8');
25
+ .version('0.4.0-beta.9');
26
26
 
27
27
  program
28
28
  .command('scan')
@@ -81,14 +81,15 @@ export function buildCopilotPermissionArgs(securityPolicy = {}) {
81
81
  return args;
82
82
  }
83
83
 
84
- export function buildCopilotArgs({ model, runnerAgent, securityPolicy = {} } = {}) {
85
- // Prompt is written to stdin (see copilotRunner.run) instead of being passed
86
- // as `-p <prompt>`. This avoids the Windows command-line length limit (~32KB)
87
- // that hits as soon as the scout's context.md is injected into downstream
88
- // prompts.
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
- // Sending Singleton's combined <system>...<user>...</user> stdin in that case
151
- // duplicates the system instructions and buries the user inputs in noise. So we
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: ['pipe', 'pipe', 'pipe'] });
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,15 +165,6 @@ export const copilotRunner = {
166
165
  setTimeout(() => child.kill('SIGKILL'), 5000).unref();
167
166
  }, timeoutMs);
168
167
 
169
- // Silence EPIPE/EOF if the child process exits before consuming stdin
170
- // (e.g. copilot rejects the args, hits an internal limit, or crashes).
171
- // We surface the real reason via the 'close' handler with exit code + stderr.
172
- child.stdin.on('error', () => { /* swallowed — see close handler */ });
173
- try {
174
- child.stdin.write(prompt);
175
- child.stdin.end();
176
- } catch { /* same */ }
177
-
178
168
  child.stdout.on('data', (d) => stdoutChunks.push(d.toString()));
179
169
  child.stderr.on('data', (d) => (stderrText += d.toString()));
180
170
  child.on('error', (err) => {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singleton/server",
3
- "version": "0.4.0-beta.8",
3
+ "version": "0.4.0-beta.9",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "dependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singleton/web",
3
- "version": "0.4.0-beta.8",
3
+ "version": "0.4.0-beta.9",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {