orchestrating 0.1.8 → 0.1.10
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/bin/orch +16 -2
- package/package.json +1 -1
package/bin/orch
CHANGED
|
@@ -305,6 +305,7 @@ if (!adapter) {
|
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
let child;
|
|
308
|
+
let childRunning = false;
|
|
308
309
|
let handleServerMessage; // set per-mode
|
|
309
310
|
let exitRequested = false;
|
|
310
311
|
|
|
@@ -330,7 +331,6 @@ if (adapter) {
|
|
|
330
331
|
|
|
331
332
|
// Confirmation-type tools — these need "yes" response, not permission grants
|
|
332
333
|
const CONFIRMATION_TOOLS = new Set(["ExitPlanMode", "EnterPlanMode"]);
|
|
333
|
-
let childRunning = false;
|
|
334
334
|
|
|
335
335
|
// Build clean env for child processes (no nesting detection, no leaked keys)
|
|
336
336
|
const childEnv = (() => {
|
|
@@ -463,6 +463,14 @@ if (adapter) {
|
|
|
463
463
|
}
|
|
464
464
|
spawnClaude(initialArgs);
|
|
465
465
|
|
|
466
|
+
// Emit the initial prompt as a user message so the dashboard shows it
|
|
467
|
+
if (prompt) {
|
|
468
|
+
sendToServer({
|
|
469
|
+
type: "agent_event", sessionId,
|
|
470
|
+
event: { kind: "user_message", text: prompt },
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
|
|
466
474
|
// Respawn claude with -c to continue after permission grants or follow-up
|
|
467
475
|
function respawnWithContinue(prompt) {
|
|
468
476
|
const args = ["--output-format", "stream-json", "--verbose", "-c"];
|
|
@@ -880,7 +888,13 @@ function cleanup() {
|
|
|
880
888
|
process.on("SIGINT", () => {
|
|
881
889
|
if (adapter) {
|
|
882
890
|
exitRequested = true;
|
|
883
|
-
|
|
891
|
+
if (childRunning) {
|
|
892
|
+
child.kill("SIGINT");
|
|
893
|
+
} else {
|
|
894
|
+
// Child already exited (idle/waiting for follow-up) — exit now
|
|
895
|
+
cleanup();
|
|
896
|
+
process.exit(0);
|
|
897
|
+
}
|
|
884
898
|
} else {
|
|
885
899
|
child.stdin.write("\x03");
|
|
886
900
|
}
|