open-coleslaw 0.1.4 → 0.1.6

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/dist/index.js CHANGED
@@ -1215,24 +1215,26 @@ async function invokeReal(options) {
1215
1215
  "--print",
1216
1216
  "--output-format",
1217
1217
  "json",
1218
- "--system-prompt",
1219
- systemPrompt,
1220
1218
  "--no-session-persistence"
1221
1219
  ];
1220
+ if (systemPrompt) {
1221
+ args.push("--append-system-prompt", systemPrompt);
1222
+ }
1222
1223
  if (allowedTools.length > 0) {
1223
1224
  args.push("--allowedTools", allowedTools.join(","));
1224
1225
  }
1225
- args.push(prompt);
1226
1226
  logger.info("Invoking Claude CLI", {
1227
- maxTurns,
1227
+ promptLength: prompt.length,
1228
1228
  toolCount: allowedTools.length
1229
1229
  });
1230
1230
  return new Promise((resolve) => {
1231
1231
  const child = spawn("claude", args, {
1232
1232
  cwd: cwd ?? process.cwd(),
1233
- stdio: ["ignore", "pipe", "pipe"],
1233
+ stdio: ["pipe", "pipe", "pipe"],
1234
1234
  env: { ...process.env }
1235
1235
  });
1236
+ child.stdin.write(prompt);
1237
+ child.stdin.end();
1236
1238
  const stdoutChunks = [];
1237
1239
  const stderrChunks = [];
1238
1240
  child.stdout.on("data", (chunk) => {