sisyphi 1.1.27 → 1.1.29
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/cli.js +181 -58
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +0 -17
- package/dist/daemon.js.map +1 -1
- package/dist/templates/dashboard-claude.md +1 -1
- package/package.json +1 -1
- package/templates/dashboard-claude.md +1 -1
package/dist/cli.js
CHANGED
|
@@ -2280,6 +2280,20 @@ async function sendRequest(request, timeoutMs) {
|
|
|
2280
2280
|
throw lastErr;
|
|
2281
2281
|
}
|
|
2282
2282
|
|
|
2283
|
+
// src/cli/stdin.ts
|
|
2284
|
+
function readStdin(opts = {}) {
|
|
2285
|
+
if (!opts.force && process.stdin.isTTY) return Promise.resolve(null);
|
|
2286
|
+
return new Promise((resolve12, reject) => {
|
|
2287
|
+
const chunks = [];
|
|
2288
|
+
process.stdin.on("data", (chunk) => chunks.push(chunk));
|
|
2289
|
+
process.stdin.on("end", () => {
|
|
2290
|
+
const text = Buffer.concat(chunks).toString("utf-8").trim();
|
|
2291
|
+
resolve12(text || null);
|
|
2292
|
+
});
|
|
2293
|
+
process.stdin.on("error", reject);
|
|
2294
|
+
});
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2283
2297
|
// src/cli/tmux.ts
|
|
2284
2298
|
import { execSync as execSync4 } from "child_process";
|
|
2285
2299
|
function isTmuxInstalled() {
|
|
@@ -2381,8 +2395,49 @@ function attachToTmuxSession(sessionName) {
|
|
|
2381
2395
|
}
|
|
2382
2396
|
}
|
|
2383
2397
|
function registerStart(program2) {
|
|
2384
|
-
program2.command("start").description("Start a new sisyphus session").argument("
|
|
2398
|
+
program2.command("start").description("Start a new sisyphus session").argument("[task]", "Task description for the orchestrator (omit when using --stdin)").option("-c, --context <context>", "Background context for the orchestrator").option("-n, --name <name>", "Human-readable name for the session").option("--effort <tier>", "Pipeline effort tier (low|medium|high|xhigh)").option("--no-tmux-check", "Skip the tmux session check").option("--stdin", "Read the task description from stdin (avoids shell escaping for long prompts)").option("--context-stdin", "Read the context from stdin (mutually exclusive with --stdin)").action(async (taskArg, opts) => {
|
|
2385
2399
|
const cwd = process.env["SISYPHUS_CWD"] ?? process.cwd();
|
|
2400
|
+
if (opts.stdin && opts.contextStdin) {
|
|
2401
|
+
console.error("Error: --stdin and --context-stdin cannot be combined; pipe one and pass the other on argv");
|
|
2402
|
+
process.exit(1);
|
|
2403
|
+
}
|
|
2404
|
+
let task = taskArg;
|
|
2405
|
+
let context = opts.context;
|
|
2406
|
+
if (opts.stdin) {
|
|
2407
|
+
const piped = await readStdin({ force: true });
|
|
2408
|
+
if (!piped) {
|
|
2409
|
+
console.error("Error: --stdin set but no input received on stdin");
|
|
2410
|
+
process.exit(1);
|
|
2411
|
+
}
|
|
2412
|
+
if (taskArg !== void 0 && taskArg !== "-") {
|
|
2413
|
+
console.error("Error: --stdin conflicts with [task] positional; pass one or the other");
|
|
2414
|
+
process.exit(1);
|
|
2415
|
+
}
|
|
2416
|
+
task = piped;
|
|
2417
|
+
} else if (taskArg === "-") {
|
|
2418
|
+
const piped = await readStdin({ force: true });
|
|
2419
|
+
if (!piped) {
|
|
2420
|
+
console.error("Error: task '-' means read stdin, but no input received");
|
|
2421
|
+
process.exit(1);
|
|
2422
|
+
}
|
|
2423
|
+
task = piped;
|
|
2424
|
+
}
|
|
2425
|
+
if (opts.contextStdin) {
|
|
2426
|
+
const piped = await readStdin({ force: true });
|
|
2427
|
+
if (!piped) {
|
|
2428
|
+
console.error("Error: --context-stdin set but no input received on stdin");
|
|
2429
|
+
process.exit(1);
|
|
2430
|
+
}
|
|
2431
|
+
if (opts.context !== void 0) {
|
|
2432
|
+
console.error("Error: --context-stdin conflicts with -c/--context; use one");
|
|
2433
|
+
process.exit(1);
|
|
2434
|
+
}
|
|
2435
|
+
context = piped;
|
|
2436
|
+
}
|
|
2437
|
+
if (!task) {
|
|
2438
|
+
console.error("Error: provide <task> argument, pipe via --stdin, or pass `-` as the task");
|
|
2439
|
+
process.exit(1);
|
|
2440
|
+
}
|
|
2386
2441
|
if (opts.effort !== void 0) {
|
|
2387
2442
|
const validTiers = ["low", "medium", "high", "xhigh"];
|
|
2388
2443
|
if (!validTiers.includes(opts.effort)) {
|
|
@@ -2396,7 +2451,7 @@ function registerStart(program2) {
|
|
|
2396
2451
|
process.exit(1);
|
|
2397
2452
|
}
|
|
2398
2453
|
const effort = opts.effort;
|
|
2399
|
-
const request = { type: "start", task, context
|
|
2454
|
+
const request = { type: "start", task, context, cwd, name: opts.name, ...effort !== void 0 ? { effort } : {} };
|
|
2400
2455
|
const response = await sendRequest(request);
|
|
2401
2456
|
if (!response.ok) {
|
|
2402
2457
|
console.error(`Error: ${response.error}`);
|
|
@@ -2812,11 +2867,11 @@ function parseTarget(raw) {
|
|
|
2812
2867
|
if (/^agent-\d+$/i.test(raw)) return { kind: "agent", agentId: raw };
|
|
2813
2868
|
return null;
|
|
2814
2869
|
}
|
|
2815
|
-
function
|
|
2870
|
+
function readStdin2() {
|
|
2816
2871
|
return readFileSync6(0, "utf-8");
|
|
2817
2872
|
}
|
|
2818
2873
|
function registerTell(program2) {
|
|
2819
|
-
program2.command("tell <target> [text]").description("Type a prompt directly into a running pane (orchestrator or agent-NNN). Submits immediately unlike `message`.").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID)").option("--no-submit", "Paste text but do not press Enter (caller can review/submit manually)").option("--
|
|
2874
|
+
program2.command("tell <target> [text]").description("Type a prompt directly into a running pane (orchestrator or agent-NNN). Submits immediately unlike `message`.").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID)").option("--no-submit", "Paste text but do not press Enter (caller can review/submit manually)").option("--stdin", "Read prompt body from stdin instead of the [text] argument (avoids shell escaping)").action(async (targetRaw, textArg, opts) => {
|
|
2820
2875
|
const sessionId = opts.session ?? process.env.SISYPHUS_SESSION_ID;
|
|
2821
2876
|
if (!sessionId) {
|
|
2822
2877
|
console.error("Error: provide --session or set SISYPHUS_SESSION_ID");
|
|
@@ -2828,15 +2883,19 @@ function registerTell(program2) {
|
|
|
2828
2883
|
process.exit(1);
|
|
2829
2884
|
}
|
|
2830
2885
|
let text;
|
|
2831
|
-
if (opts.
|
|
2832
|
-
text =
|
|
2886
|
+
if (opts.stdin) {
|
|
2887
|
+
text = readStdin2();
|
|
2833
2888
|
if (text === "") {
|
|
2834
|
-
console.error("Error: --
|
|
2889
|
+
console.error("Error: --stdin set but stdin was empty");
|
|
2890
|
+
process.exit(1);
|
|
2891
|
+
}
|
|
2892
|
+
if (textArg != null && textArg !== "") {
|
|
2893
|
+
console.error("Error: --stdin conflicts with [text] argument; pass one source");
|
|
2835
2894
|
process.exit(1);
|
|
2836
2895
|
}
|
|
2837
2896
|
} else {
|
|
2838
2897
|
if (textArg == null || textArg === "") {
|
|
2839
|
-
console.error("Error: provide [text] argument or use --
|
|
2898
|
+
console.error("Error: provide [text] argument or use --stdin");
|
|
2840
2899
|
process.exit(1);
|
|
2841
2900
|
}
|
|
2842
2901
|
text = textArg;
|
|
@@ -3036,12 +3095,32 @@ function registerRead(program2) {
|
|
|
3036
3095
|
|
|
3037
3096
|
// src/cli/commands/message.ts
|
|
3038
3097
|
function registerMessage(program2) {
|
|
3039
|
-
program2.command("message
|
|
3098
|
+
program2.command("message").description("Queue a message for the orchestrator to see on next cycle").argument("[content]", "Message content (omit when using --stdin or piping)").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").option("--agent <agentId>", "Route message to a specific agent inbox instead of the orchestrator").option("--stdin", "Force-read message content from stdin (avoids shell escaping for long prompts)").action(async (contentArg, opts) => {
|
|
3040
3099
|
const sessionId = opts.session ?? process.env.SISYPHUS_SESSION_ID;
|
|
3041
3100
|
if (!sessionId) {
|
|
3042
3101
|
console.error("Error: provide --session or set SISYPHUS_SESSION_ID environment variable");
|
|
3043
3102
|
process.exit(1);
|
|
3044
3103
|
}
|
|
3104
|
+
let content;
|
|
3105
|
+
if (opts.stdin) {
|
|
3106
|
+
content = await readStdin({ force: true });
|
|
3107
|
+
if (!content) {
|
|
3108
|
+
console.error("Error: --stdin set but no input received on stdin");
|
|
3109
|
+
process.exit(1);
|
|
3110
|
+
}
|
|
3111
|
+
if (contentArg !== void 0 && contentArg !== "-") {
|
|
3112
|
+
console.error("Error: --stdin conflicts with [content] argument; pass one source");
|
|
3113
|
+
process.exit(1);
|
|
3114
|
+
}
|
|
3115
|
+
} else if (contentArg === "-" || contentArg === void 0) {
|
|
3116
|
+
content = await readStdin();
|
|
3117
|
+
if (!content) {
|
|
3118
|
+
console.error("Error: provide [content] argument, pipe via stdin, or use --stdin");
|
|
3119
|
+
process.exit(1);
|
|
3120
|
+
}
|
|
3121
|
+
} else {
|
|
3122
|
+
content = contentArg;
|
|
3123
|
+
}
|
|
3045
3124
|
const source = process.env.SISYPHUS_AGENT_ID ? { type: "agent", agentId: process.env.SISYPHUS_AGENT_ID } : void 0;
|
|
3046
3125
|
const request = { type: "message", sessionId, content, source, ...opts.agent ? { agentId: opts.agent } : {} };
|
|
3047
3126
|
const response = await sendRequest(request);
|
|
@@ -3780,8 +3859,28 @@ function registerDelete(program2) {
|
|
|
3780
3859
|
|
|
3781
3860
|
// src/cli/commands/resume.ts
|
|
3782
3861
|
function registerResume(program2) {
|
|
3783
|
-
program2.command("resume").description("Respawn orchestrator with new instructions (for paused/completed sessions)").addHelpText("after", "\n Use `resume` to restart a paused or completed session with new instructions.\n Use `continue` to keep working on a completed session without new instructions.\n").argument("<session-id>", "Session ID to resume").argument("[message]", "Additional instructions for the orchestrator").action(async (sessionId,
|
|
3862
|
+
program2.command("resume").description("Respawn orchestrator with new instructions (for paused/completed sessions)").addHelpText("after", "\n Use `resume` to restart a paused or completed session with new instructions.\n Use `continue` to keep working on a completed session without new instructions.\n").argument("<session-id>", "Session ID to resume").argument("[message]", "Additional instructions for the orchestrator (omit when using --stdin)").option("--stdin", "Read message from stdin (avoids shell escaping for long prompts)").action(async (sessionId, messageArg, opts) => {
|
|
3784
3863
|
const cwd = process.env["SISYPHUS_CWD"] ?? process.cwd();
|
|
3864
|
+
let message = messageArg;
|
|
3865
|
+
if (opts.stdin) {
|
|
3866
|
+
const piped = await readStdin({ force: true });
|
|
3867
|
+
if (!piped) {
|
|
3868
|
+
console.error("Error: --stdin set but no input received on stdin");
|
|
3869
|
+
process.exit(1);
|
|
3870
|
+
}
|
|
3871
|
+
if (messageArg !== void 0 && messageArg !== "-") {
|
|
3872
|
+
console.error("Error: --stdin conflicts with [message] argument; pass one source");
|
|
3873
|
+
process.exit(1);
|
|
3874
|
+
}
|
|
3875
|
+
message = piped;
|
|
3876
|
+
} else if (messageArg === "-") {
|
|
3877
|
+
const piped = await readStdin({ force: true });
|
|
3878
|
+
if (!piped) {
|
|
3879
|
+
console.error("Error: message '-' means read stdin, but no input received");
|
|
3880
|
+
process.exit(1);
|
|
3881
|
+
}
|
|
3882
|
+
message = piped;
|
|
3883
|
+
}
|
|
3785
3884
|
const request = { type: "resume", sessionId, cwd, message };
|
|
3786
3885
|
const response = await sendRequest(request);
|
|
3787
3886
|
if (response.ok) {
|
|
@@ -4130,20 +4229,6 @@ function registerSessionContext(program2) {
|
|
|
4130
4229
|
import { existsSync as existsSync12 } from "fs";
|
|
4131
4230
|
import { join as join14, resolve as resolve5 } from "path";
|
|
4132
4231
|
|
|
4133
|
-
// src/cli/stdin.ts
|
|
4134
|
-
function readStdin2() {
|
|
4135
|
-
if (process.stdin.isTTY) return Promise.resolve(null);
|
|
4136
|
-
return new Promise((resolve12, reject) => {
|
|
4137
|
-
const chunks = [];
|
|
4138
|
-
process.stdin.on("data", (chunk) => chunks.push(chunk));
|
|
4139
|
-
process.stdin.on("end", () => {
|
|
4140
|
-
const text = Buffer.concat(chunks).toString("utf-8").trim();
|
|
4141
|
-
resolve12(text || null);
|
|
4142
|
-
});
|
|
4143
|
-
process.stdin.on("error", reject);
|
|
4144
|
-
});
|
|
4145
|
-
}
|
|
4146
|
-
|
|
4147
4232
|
// src/daemon/frontmatter.ts
|
|
4148
4233
|
import { readFileSync as readFileSync16, existsSync as existsSync11, readdirSync as readdirSync5 } from "fs";
|
|
4149
4234
|
import { homedir as homedir7 } from "os";
|
|
@@ -4245,7 +4330,7 @@ function listTypes() {
|
|
|
4245
4330
|
}
|
|
4246
4331
|
}
|
|
4247
4332
|
function registerSpawn(program2) {
|
|
4248
|
-
program2.command("spawn").description("Spawn a new agent (orchestrator only)").argument("[instruction]", "Task instruction for the agent").option("--agent-type <type>", "Agent type (e.g. sisyphus:debug, sisyphus:explore)", "worker").option("--name <name>", "Agent name").option("--instruction <instruction>", "Task instruction for the agent (or pipe via stdin)").option("--repo <name>", "Repo subdirectory to use for this agent").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").option("--list-types", "List available agent types and exit").action(async (positionalInstruction, opts) => {
|
|
4333
|
+
program2.command("spawn").description("Spawn a new agent (orchestrator only)").argument("[instruction]", "Task instruction for the agent").option("--agent-type <type>", "Agent type (e.g. sisyphus:debug, sisyphus:explore)", "worker").option("--name <name>", "Agent name").option("--instruction <instruction>", "Task instruction for the agent (or pipe via stdin)").option("--stdin", "Force-read instruction from stdin (avoids shell escaping for long prompts)").option("--repo <name>", "Repo subdirectory to use for this agent").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").option("--list-types", "List available agent types and exit").action(async (positionalInstruction, opts) => {
|
|
4249
4334
|
if (opts.listTypes) {
|
|
4250
4335
|
listTypes();
|
|
4251
4336
|
return;
|
|
@@ -4261,9 +4346,22 @@ function registerSpawn(program2) {
|
|
|
4261
4346
|
process.exit(1);
|
|
4262
4347
|
}
|
|
4263
4348
|
const positional = positionalInstruction === "-" ? void 0 : positionalInstruction;
|
|
4264
|
-
|
|
4349
|
+
let instruction;
|
|
4350
|
+
if (opts.stdin) {
|
|
4351
|
+
instruction = await readStdin({ force: true });
|
|
4352
|
+
if (!instruction) {
|
|
4353
|
+
console.error("Error: --stdin set but no input received on stdin");
|
|
4354
|
+
process.exit(1);
|
|
4355
|
+
}
|
|
4356
|
+
if (opts.instruction || positional) {
|
|
4357
|
+
console.error("Error: --stdin conflicts with --instruction / [instruction]; pass one source");
|
|
4358
|
+
process.exit(1);
|
|
4359
|
+
}
|
|
4360
|
+
} else {
|
|
4361
|
+
instruction = opts.instruction ?? positional ?? await readStdin();
|
|
4362
|
+
}
|
|
4265
4363
|
if (!instruction) {
|
|
4266
|
-
console.error("Error: --instruction is required (or pipe via stdin)");
|
|
4364
|
+
console.error("Error: --instruction is required (or pipe via stdin / use --stdin)");
|
|
4267
4365
|
process.exit(1);
|
|
4268
4366
|
}
|
|
4269
4367
|
if (instruction.trim().length < 20) {
|
|
@@ -4306,7 +4404,7 @@ function registerSpawn(program2) {
|
|
|
4306
4404
|
|
|
4307
4405
|
// src/cli/commands/submit.ts
|
|
4308
4406
|
function registerSubmit(program2) {
|
|
4309
|
-
program2.command("submit").description("Submit work report and exit (agent only)").option("--report <report>", "Work report (or pipe via stdin)").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").action(async (opts) => {
|
|
4407
|
+
program2.command("submit").description("Submit work report and exit (agent only)").option("--report <report>", "Work report (or pipe via stdin)").option("--stdin", "Force-read report from stdin (avoids shell escaping for long prompts)").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").action(async (opts) => {
|
|
4310
4408
|
assertTmux();
|
|
4311
4409
|
const sessionId = opts.session ?? process.env.SISYPHUS_SESSION_ID;
|
|
4312
4410
|
const agentId = process.env.SISYPHUS_AGENT_ID;
|
|
@@ -4314,9 +4412,22 @@ function registerSubmit(program2) {
|
|
|
4314
4412
|
console.error("Error: provide --session or set SISYPHUS_SESSION_ID (and SISYPHUS_AGENT_ID) environment variables");
|
|
4315
4413
|
process.exit(1);
|
|
4316
4414
|
}
|
|
4317
|
-
|
|
4415
|
+
let report;
|
|
4416
|
+
if (opts.stdin) {
|
|
4417
|
+
report = await readStdin({ force: true });
|
|
4418
|
+
if (!report) {
|
|
4419
|
+
console.error("Error: --stdin set but no input received on stdin");
|
|
4420
|
+
process.exit(1);
|
|
4421
|
+
}
|
|
4422
|
+
if (opts.report) {
|
|
4423
|
+
console.error("Error: --stdin conflicts with --report; pass one source");
|
|
4424
|
+
process.exit(1);
|
|
4425
|
+
}
|
|
4426
|
+
} else {
|
|
4427
|
+
report = opts.report ?? await readStdin();
|
|
4428
|
+
}
|
|
4318
4429
|
if (!report) {
|
|
4319
|
-
console.error("Error: provide --report
|
|
4430
|
+
console.error("Error: provide --report, pipe content via stdin, or use --stdin");
|
|
4320
4431
|
process.exit(1);
|
|
4321
4432
|
}
|
|
4322
4433
|
const request = { type: "submit", sessionId, agentId, report };
|
|
@@ -4333,7 +4444,7 @@ function registerSubmit(program2) {
|
|
|
4333
4444
|
|
|
4334
4445
|
// src/cli/commands/report.ts
|
|
4335
4446
|
function registerReport(program2) {
|
|
4336
|
-
program2.command("report").description("Send a progress report without exiting (agent only)").option("--message <message>", "Progress report content").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").action(async (opts) => {
|
|
4447
|
+
program2.command("report").description("Send a progress report without exiting (agent only)").option("--message <message>", "Progress report content").option("--stdin", "Force-read message from stdin (avoids shell escaping for long prompts)").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").action(async (opts) => {
|
|
4337
4448
|
assertTmux();
|
|
4338
4449
|
const sessionId = opts.session ?? process.env.SISYPHUS_SESSION_ID;
|
|
4339
4450
|
const agentId = process.env.SISYPHUS_AGENT_ID;
|
|
@@ -4341,9 +4452,22 @@ function registerReport(program2) {
|
|
|
4341
4452
|
console.error("Error: provide --session or set SISYPHUS_SESSION_ID (and SISYPHUS_AGENT_ID) environment variables");
|
|
4342
4453
|
process.exit(1);
|
|
4343
4454
|
}
|
|
4344
|
-
|
|
4455
|
+
let content;
|
|
4456
|
+
if (opts.stdin) {
|
|
4457
|
+
content = await readStdin({ force: true });
|
|
4458
|
+
if (!content) {
|
|
4459
|
+
console.error("Error: --stdin set but no input received on stdin");
|
|
4460
|
+
process.exit(1);
|
|
4461
|
+
}
|
|
4462
|
+
if (opts.message) {
|
|
4463
|
+
console.error("Error: --stdin conflicts with --message; pass one source");
|
|
4464
|
+
process.exit(1);
|
|
4465
|
+
}
|
|
4466
|
+
} else {
|
|
4467
|
+
content = opts.message ?? await readStdin();
|
|
4468
|
+
}
|
|
4345
4469
|
if (!content) {
|
|
4346
|
-
console.error("Error: provide --message
|
|
4470
|
+
console.error("Error: provide --message, pipe content via stdin, or use --stdin");
|
|
4347
4471
|
process.exit(1);
|
|
4348
4472
|
}
|
|
4349
4473
|
const request = { type: "report", sessionId, agentId, content };
|
|
@@ -4435,14 +4559,28 @@ function registerAgentRestart(program2) {
|
|
|
4435
4559
|
|
|
4436
4560
|
// src/cli/commands/yield.ts
|
|
4437
4561
|
function registerYield(program2) {
|
|
4438
|
-
program2.command("yield").description("Yield control back to daemon (orchestrator only)").option("--prompt <text>", "Short orienting nudge for the next cycle (or pipe via stdin) \u2014 name what just happened; leave tactical decisions to the fresh read of the reports").option("--mode <mode>", "System prompt mode for next cycle (discovery, planning, implementation, validation, completion)").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").action(async (opts) => {
|
|
4562
|
+
program2.command("yield").description("Yield control back to daemon (orchestrator only)").option("--prompt <text>", "Short orienting nudge for the next cycle (or pipe via stdin) \u2014 name what just happened; leave tactical decisions to the fresh read of the reports").option("--stdin", "Force-read prompt from stdin (avoids shell escaping for long prompts)").option("--mode <mode>", "System prompt mode for next cycle (discovery, planning, implementation, validation, completion)").option("--session <sessionId>", "Session ID (defaults to SISYPHUS_SESSION_ID env var)").action(async (opts) => {
|
|
4439
4563
|
assertTmux();
|
|
4440
4564
|
const sessionId = opts.session ?? process.env.SISYPHUS_SESSION_ID;
|
|
4441
4565
|
if (!sessionId) {
|
|
4442
4566
|
console.error("Error: provide --session or set SISYPHUS_SESSION_ID environment variable");
|
|
4443
4567
|
process.exit(1);
|
|
4444
4568
|
}
|
|
4445
|
-
|
|
4569
|
+
let nextPrompt;
|
|
4570
|
+
if (opts.stdin) {
|
|
4571
|
+
const piped = await readStdin({ force: true });
|
|
4572
|
+
if (!piped) {
|
|
4573
|
+
console.error("Error: --stdin set but no input received on stdin");
|
|
4574
|
+
process.exit(1);
|
|
4575
|
+
}
|
|
4576
|
+
if (opts.prompt) {
|
|
4577
|
+
console.error("Error: --stdin conflicts with --prompt; pass one source");
|
|
4578
|
+
process.exit(1);
|
|
4579
|
+
}
|
|
4580
|
+
nextPrompt = piped;
|
|
4581
|
+
} else {
|
|
4582
|
+
nextPrompt = opts.prompt ?? await readStdin() ?? void 0;
|
|
4583
|
+
}
|
|
4446
4584
|
const request = { type: "yield", sessionId, agentId: "orchestrator", nextPrompt, mode: opts.mode };
|
|
4447
4585
|
const response = await sendRequest(request);
|
|
4448
4586
|
if (response.ok) {
|
|
@@ -4653,9 +4791,9 @@ bind -T copy-mode-vi C-j send -X scroll-down
|
|
|
4653
4791
|
set -g status on
|
|
4654
4792
|
set -g status-style "bg=#1d1e21,fg=#d4cbb8"
|
|
4655
4793
|
set -g status-position bottom
|
|
4656
|
-
set -g status-left "#
|
|
4657
|
-
set -g status-left-length
|
|
4658
|
-
set -g status-right "#{E:@
|
|
4794
|
+
set -g status-left "#{E:@sisyphus_left}"
|
|
4795
|
+
set -g status-left-length 250
|
|
4796
|
+
set -g status-right "#{E:@sisyphus_right}#[fg=#2d2f33]#[bg=#2d2f33,fg=#b0a898] %H:%M "
|
|
4659
4797
|
set -g status-right-length 250
|
|
4660
4798
|
set -g status-interval 2
|
|
4661
4799
|
|
|
@@ -4891,8 +5029,9 @@ function printResults(result, daemonOk, keybindMsg) {
|
|
|
4891
5029
|
console.log(" \u2717 Daemon: Failed to start");
|
|
4892
5030
|
}
|
|
4893
5031
|
console.log(` \u2713 Keybindings: ${keybindMsg}`);
|
|
4894
|
-
console.log(" \u2713 Status bar: daemon-rendered via @
|
|
4895
|
-
console.log("
|
|
5032
|
+
console.log(" \u2713 Status bar: daemon-rendered via @sisyphus_left / @sisyphus_right");
|
|
5033
|
+
console.log(" status-left: #{E:@sisyphus_left}");
|
|
5034
|
+
console.log(" status-right: #{E:@sisyphus_right}");
|
|
4896
5035
|
if (result.sisyphusPlugin.installed && result.sisyphusPlugin.installPath) {
|
|
4897
5036
|
const suffix = result.sisyphusPlugin.autoInstalled ? " (just installed)" : "";
|
|
4898
5037
|
console.log(` \u2713 sisyphus@sisyphus plugin: ${result.sisyphusPlugin.installPath}${suffix}`);
|
|
@@ -10489,24 +10628,9 @@ function attachNotify(diagnostic2) {
|
|
|
10489
10628
|
});
|
|
10490
10629
|
}
|
|
10491
10630
|
|
|
10492
|
-
// src/cli/commands/tmux-status.ts
|
|
10493
|
-
import { execSync as execSync15 } from "child_process";
|
|
10494
|
-
function attachTmuxStatus(diagnostic2) {
|
|
10495
|
-
diagnostic2.command("tmux-status").description("Output session status dots for tmux status bar").action(() => {
|
|
10496
|
-
try {
|
|
10497
|
-
const status = execSync15(
|
|
10498
|
-
"tmux show-option -gv @sisyphus_status",
|
|
10499
|
-
{ encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] }
|
|
10500
|
-
).trim();
|
|
10501
|
-
if (status) process.stdout.write(status);
|
|
10502
|
-
} catch {
|
|
10503
|
-
}
|
|
10504
|
-
});
|
|
10505
|
-
}
|
|
10506
|
-
|
|
10507
10631
|
// src/cli/commands/tmux-sessions.ts
|
|
10508
10632
|
init_paths();
|
|
10509
|
-
import { execSync as
|
|
10633
|
+
import { execSync as execSync15 } from "child_process";
|
|
10510
10634
|
import { readFileSync as readFileSync30, existsSync as existsSync29 } from "fs";
|
|
10511
10635
|
var DOT_MAP = {
|
|
10512
10636
|
"orchestrator:processing": { icon: "\u25CF", color: "#d4ad6a" },
|
|
@@ -10527,7 +10651,7 @@ function readManifest() {
|
|
|
10527
10651
|
}
|
|
10528
10652
|
function tmuxExec(cmd) {
|
|
10529
10653
|
try {
|
|
10530
|
-
return
|
|
10654
|
+
return execSync15(cmd, { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] }).trim();
|
|
10531
10655
|
} catch {
|
|
10532
10656
|
return null;
|
|
10533
10657
|
}
|
|
@@ -10623,7 +10747,6 @@ registerDeploy(program);
|
|
|
10623
10747
|
registerCloud(program);
|
|
10624
10748
|
var diagnostic = program.command("diagnostic", { hidden: true });
|
|
10625
10749
|
attachNotify(diagnostic);
|
|
10626
|
-
attachTmuxStatus(diagnostic);
|
|
10627
10750
|
attachTmuxSessions(diagnostic);
|
|
10628
10751
|
program.addHelpText("after", `
|
|
10629
10752
|
Examples:
|