sideby 0.39.0 → 0.40.0
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/build.json +1 -1
- package/dist/src/cli/commands.js +34 -3
- package/dist/src/cli/json-schemas.js +9 -2
- package/dist/src/cli/main.js +10 -2
- package/dist/src/core/cli-commands.js +12 -0
- package/dist/src/core/config.d.ts +1 -0
- package/dist/src/core/config.js +3 -0
- package/dist/src/core/progress-state.d.ts +21 -7
- package/dist/src/core/progress-state.js +32 -8
- package/dist/src/core/search-catalog.js +18 -0
- package/dist/src/core/unattended-pending.d.ts +14 -2
- package/dist/src/core/unattended-pending.js +27 -3
- package/dist/src/core/unattended-state.d.ts +19 -1
- package/dist/src/core/unattended-state.js +31 -5
- package/dist/src/core/unattended-wait.d.ts +86 -0
- package/dist/src/core/unattended-wait.js +125 -0
- package/dist/src/core/unattended.d.ts +19 -0
- package/dist/src/core/unattended.js +37 -4
- package/dist/src/panel/handler.js +16 -1
- package/dist/src/panel/i18n.d.ts +9 -0
- package/dist/src/panel/i18n.js +26 -8
- package/dist/src/panel/page-script.js +51 -2
- package/dist/src/panel/page-styles.js +7 -0
- package/dist/src/progress/hook.d.ts +7 -0
- package/dist/src/progress/hook.js +18 -11
- package/dist/src/types.d.ts +5 -0
- package/dist/src/unattended/hook.d.ts +21 -6
- package/dist/src/unattended/hook.js +261 -19
- package/package.json +1 -1
- package/schemas/config.json +14 -0
- package/schemas/unattended-defer.json +5 -0
- package/schemas/unattended-pending.json +5 -0
- package/schemas/unattended.json +16 -2
- package/skills/sideby/SKILL.md +3 -2
- package/skills/sideby/references/progress.md +3 -3
- package/skills/sideby/references/unattended.md +16 -2
|
@@ -9,6 +9,12 @@ export interface UnattendedHookDeps {
|
|
|
9
9
|
sleep?: (ms: number) => Promise<void>;
|
|
10
10
|
/** Whether the Host that started the hook is gone (`ppid` 1 by default): nothing is left to wake. */
|
|
11
11
|
parentGone?: () => boolean;
|
|
12
|
+
/** The Host's pid, whose session record says what is on screen (Answer Wait); `process.ppid` by default. */
|
|
13
|
+
hostPid?: number;
|
|
14
|
+
/** Answer Wait, for tests: runs once the wait is over, before the last check. */
|
|
15
|
+
beforeAct?: () => Promise<unknown>;
|
|
16
|
+
/** Answer Wait, for tests: runs after the Pending Decision is kept, before the check that may take it back. */
|
|
17
|
+
afterKeep?: () => Promise<unknown>;
|
|
12
18
|
}
|
|
13
19
|
/**
|
|
14
20
|
* The question as the user should read it later: each question (with its short header) and its options' labels.
|
|
@@ -16,8 +22,11 @@ export interface UnattendedHookDeps {
|
|
|
16
22
|
* the tool's input.
|
|
17
23
|
*/
|
|
18
24
|
export declare function questionText(input: Record<string, unknown>): string;
|
|
19
|
-
/**
|
|
20
|
-
|
|
25
|
+
/**
|
|
26
|
+
* What the model reads instead of an answer. `waited`: the question was on screen this many minutes with nobody
|
|
27
|
+
* answering (Answer Wait); the session shows the text too, so it opens with what happened for the person coming back.
|
|
28
|
+
*/
|
|
29
|
+
export declare function questionReason(state: UnattendedState, now: Date, zh: boolean, kept: boolean, waited?: number): string;
|
|
21
30
|
/** How much of the end of the model's last message is read to tell whether it ends on a question. */
|
|
22
31
|
export declare const QUESTION_TAIL = 600;
|
|
23
32
|
/**
|
|
@@ -34,8 +43,11 @@ export declare const QUESTION_PATTERNS: readonly RegExp[];
|
|
|
34
43
|
* paragraph (and the one before it when the last is a list), unless a negation comes just before it ("无需你来决定").
|
|
35
44
|
*/
|
|
36
45
|
export declare function endingQuestion(message: string): string | undefined;
|
|
37
|
-
/**
|
|
38
|
-
|
|
46
|
+
/**
|
|
47
|
+
* What the model reads when it ended its turn on a question and nobody is here to answer. `waited`: the question was
|
|
48
|
+
* left this many minutes with no reply (Answer Wait); this note then wakes the session, and is not the user's reply.
|
|
49
|
+
*/
|
|
50
|
+
export declare function stopReason(state: UnattendedState, now: Date, zh: boolean, kept: boolean, waited?: number): string;
|
|
39
51
|
/** What a declined MCP form is kept as: the server's name and what it asked, never a field's value. */
|
|
40
52
|
export declare function elicitationText(v: Record<string, unknown>): string;
|
|
41
53
|
/**
|
|
@@ -52,8 +64,11 @@ export declare function commandProgram(command: string): string | undefined;
|
|
|
52
64
|
* other tool its name only.
|
|
53
65
|
*/
|
|
54
66
|
export declare function permissionText(tool: string, input: Record<string, unknown>): string;
|
|
55
|
-
/**
|
|
56
|
-
|
|
67
|
+
/**
|
|
68
|
+
* What the model reads instead of the permission prompt Claude Code would have shown. `waited`: the prompt was on
|
|
69
|
+
* screen this many minutes with nobody answering (Answer Wait).
|
|
70
|
+
*/
|
|
71
|
+
export declare function permissionReason(state: UnattendedState, now: Date, kept: boolean, waited?: number): string;
|
|
57
72
|
/**
|
|
58
73
|
* What the user reads once in an Attended Session while Unattended Mode is on (ADR-0075), as a `systemMessage`: shown
|
|
59
74
|
* in the session, never to the model.
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
// most three times in a row, and keeps a Pending Decision when that did not help (Turn Retry, ADR-0067). And in Claude
|
|
16
16
|
// it runs in the background on every prompt (`UserPromptSubmit`, `async`): a prompt a person typed makes that session
|
|
17
17
|
// an Attended Session for 30 minutes, which it leaves alone as if the mode were off, telling the user once (ADR-0075).
|
|
18
|
+
// A question or a permission prompt Claude Code shows, in an Attended Session or while the mode is off, is watched in
|
|
19
|
+
// the background (Answer Wait, ADR-0077): once it has waited `unattended.answerWait` minutes with nobody answering and
|
|
20
|
+
// the mode is on, it is refused as the mode would refuse it, and so is a turn that ended on a question written as text
|
|
21
|
+
// (a second `Stop` entry, `asyncRewake`). It never answers anything with "yes".
|
|
18
22
|
// A failure before the decision is made does nothing: that is
|
|
19
23
|
// how a session behaves without the feature (unlike `network-hook`, which blocks when it cannot tell). Once the
|
|
20
24
|
// decision is to refuse, it refuses: keeping the Pending Decision and writing the reason are best effort, and their
|
|
@@ -22,9 +26,10 @@
|
|
|
22
26
|
import { resolvePaths } from '../core/paths.js';
|
|
23
27
|
import { hostMade, launchPrompt, sidebyMessage } from '../core/prompt-origin.js';
|
|
24
28
|
import { ATTENDED_MS, markAttended, markTold, ownTranscript, promptOrigin, readAttended, sessionUnattended, } from '../core/unattended-attended.js';
|
|
25
|
-
import { addPendingDecision } from '../core/unattended-pending.js';
|
|
29
|
+
import { addPendingDecision, withdrawPendingDecision, } from '../core/unattended-pending.js';
|
|
26
30
|
import { clearRetryStreak, countFailure, passingFailure, RETRY_LIMIT, readRetryStreak, retryDelay, retryGaveUpText, retryMessage, } from '../core/unattended-retry.js';
|
|
27
31
|
import { clockText, readUnattendedConfig, readUnattendedOverride, UNATTENDED_ENV, unattendedState, } from '../core/unattended-state.js';
|
|
32
|
+
import { lastLook, waitedMinutes, watchScreen } from '../core/unattended-wait.js';
|
|
28
33
|
export const UNATTENDED_HOOK_COMMAND = 'sideby unattended-hook';
|
|
29
34
|
/** The tool each Host's model asks the user with. */
|
|
30
35
|
export const ASK_TOOLS = {
|
|
@@ -107,21 +112,31 @@ export function questionText(input) {
|
|
|
107
112
|
}
|
|
108
113
|
return parts.join('\n\n') || JSON.stringify(input);
|
|
109
114
|
}
|
|
110
|
-
/**
|
|
111
|
-
|
|
115
|
+
/**
|
|
116
|
+
* What the model reads instead of an answer. `waited`: the question was on screen this many minutes with nobody
|
|
117
|
+
* answering (Answer Wait); the session shows the text too, so it opens with what happened for the person coming back.
|
|
118
|
+
*/
|
|
119
|
+
export function questionReason(state, now, zh, kept, waited) {
|
|
112
120
|
const until = state.until ? clockText(Date.parse(state.until), now.getTime(), zh) : undefined;
|
|
113
121
|
const session = state.reason === 'session';
|
|
114
122
|
if (zh) {
|
|
115
123
|
const when = session ? '(这个会话)' : until ? `(到 ${until})` : '(没有结束时间)';
|
|
116
124
|
const keep = kept ? 'sideby 已把这个问题记下,等用户回来看' : 'sideby 没能记下这个问题,请写进最终汇报';
|
|
117
|
-
|
|
125
|
+
const head = waited
|
|
126
|
+
? `${waited} 分钟没人回答:sideby 无人值守已开启${when},会话不再等回答,${keep}。`
|
|
127
|
+
: `未显示:sideby 无人值守已开启${when},现在没人能回答,${keep}。`;
|
|
128
|
+
return `${head}不要再问。能撤回的选择按推荐的选项继续,在最终汇报里写出这个问题和你的选择。删除、对外发送或发布、部署、付费等难撤回的操作不要做:跳过它,运行 \`sideby unattended defer "<一句话>"\` 记下,再继续做其余的事。`;
|
|
118
129
|
}
|
|
119
130
|
const when = session ? 'for this session' : until ? `until ${until}` : 'with no end set';
|
|
120
131
|
const keep = kept
|
|
121
132
|
? 'sideby kept this question for the user to look at later'
|
|
122
133
|
: 'sideby could not keep this question, so put it in your final report';
|
|
123
|
-
|
|
134
|
+
const head = waited
|
|
135
|
+
? `No answer after ${minutesText(waited)}: sideby's Unattended Mode is on ${when}, so the session goes on without one, and ${keep}.`
|
|
136
|
+
: `Not shown: sideby's Unattended Mode is on ${when}, so nobody is here to answer, and ${keep}.`;
|
|
137
|
+
return `${head} Do not ask again. Where the choice can be undone, go on with the recommended option, and list the question and your choice in your final report. Do not do anything hard to undo (deleting, sending or posting anything outside, publishing, deploying, paying): skip it, record it with \`sideby unattended defer "<one sentence>"\`, and go on with the rest.`;
|
|
124
138
|
}
|
|
139
|
+
const minutesText = (n) => (n === 1 ? '1 minute' : `${n} minutes`);
|
|
125
140
|
/** How much of the end of the model's last message is read to tell whether it ends on a question. */
|
|
126
141
|
export const QUESTION_TAIL = 600;
|
|
127
142
|
/**
|
|
@@ -217,20 +232,29 @@ export function endingQuestion(message) {
|
|
|
217
232
|
return question;
|
|
218
233
|
return undefined;
|
|
219
234
|
}
|
|
220
|
-
/**
|
|
221
|
-
|
|
235
|
+
/**
|
|
236
|
+
* What the model reads when it ended its turn on a question and nobody is here to answer. `waited`: the question was
|
|
237
|
+
* left this many minutes with no reply (Answer Wait); this note then wakes the session, and is not the user's reply.
|
|
238
|
+
*/
|
|
239
|
+
export function stopReason(state, now, zh, kept, waited) {
|
|
222
240
|
const until = state.until ? clockText(Date.parse(state.until), now.getTime(), zh) : undefined;
|
|
223
241
|
const session = state.reason === 'session';
|
|
224
242
|
if (zh) {
|
|
225
243
|
const when = session ? '(这个会话)' : until ? `(到 ${until})` : '(没有结束时间)';
|
|
226
244
|
const keep = kept ? 'sideby 已把你的问题记下,等用户回来看' : 'sideby 没能记下你的问题,请写进最终汇报';
|
|
227
|
-
|
|
245
|
+
const head = waited
|
|
246
|
+
? `${waited} 分钟没人回复你的问题:sideby 无人值守已开启${when},${keep}。这条不是用户的回复。`
|
|
247
|
+
: `没人能回答:sideby 无人值守已开启${when},${keep}。`;
|
|
248
|
+
return `${head}不要等回复,也不要再问。能撤回的选择按推荐的选项继续,一直做到完。删除、对外发送或发布、部署、付费等难撤回的操作不要做:跳过它,运行 \`sideby unattended defer "<一句话>"\` 记下,再做完其余的事。最后写一份最终汇报,列出你做的每个选择和记下的每件事,不提任何问题。`;
|
|
228
249
|
}
|
|
229
250
|
const when = session ? 'for this session' : until ? `until ${until}` : 'with no end set';
|
|
230
251
|
const keep = kept
|
|
231
252
|
? 'sideby kept your question for the user to look at later'
|
|
232
253
|
: 'sideby could not keep your question, so put it in your final report';
|
|
233
|
-
|
|
254
|
+
const head = waited
|
|
255
|
+
? `Nobody replied to your question for ${minutesText(waited)}: sideby's Unattended Mode is on ${when}, and ${keep}. This note is not the user's reply.`
|
|
256
|
+
: `Nobody is here to answer: sideby's Unattended Mode is on ${when}, and ${keep}.`;
|
|
257
|
+
return `${head} Do not wait for an answer and do not ask again. Where the choice can be undone, go on with the recommended option and carry on to the end. Do not do anything hard to undo (deleting, sending or posting anything outside, publishing, deploying, paying): skip it, record it with \`sideby unattended defer "<one sentence>"\`, and finish the rest. Then end with a final report that lists each choice you made and each item you recorded, without asking anything.`;
|
|
234
258
|
}
|
|
235
259
|
/** What a declined MCP form is kept as: the server's name and what it asked, never a field's value. */
|
|
236
260
|
export function elicitationText(v) {
|
|
@@ -323,12 +347,18 @@ export function permissionText(tool, input) {
|
|
|
323
347
|
}
|
|
324
348
|
return tool;
|
|
325
349
|
}
|
|
326
|
-
/**
|
|
327
|
-
|
|
350
|
+
/**
|
|
351
|
+
* What the model reads instead of the permission prompt Claude Code would have shown. `waited`: the prompt was on
|
|
352
|
+
* screen this many minutes with nobody answering (Answer Wait).
|
|
353
|
+
*/
|
|
354
|
+
export function permissionReason(state, now, kept, waited) {
|
|
328
355
|
const until = state.until ? clockText(Date.parse(state.until), now.getTime(), false) : undefined;
|
|
329
356
|
const when = state.reason === 'session' ? 'for this session' : until ? `until ${until}` : 'with no end set';
|
|
330
357
|
const keep = kept ? ' sideby kept this request for the user to look at later.' : '';
|
|
331
|
-
|
|
358
|
+
const head = waited
|
|
359
|
+
? `Not allowed: nobody confirmed this action in ${minutesText(waited)}, and sideby's Unattended Mode is on ${when}.`
|
|
360
|
+
: `Not allowed: Claude Code wanted a person to confirm this action, and nobody is here (sideby's Unattended Mode is on ${when}).`;
|
|
361
|
+
return `${head}${keep} Rewrite it so it needs no confirmation: literal paths, "\${VAR:?}" for variables in rm targets, plain bash syntax, and rm as a command of its own. Or skip it, record it with \`sideby unattended defer "<what and why>"\`, and go on with the rest.`;
|
|
332
362
|
}
|
|
333
363
|
/**
|
|
334
364
|
* What the user reads once in an Attended Session while Unattended Mode is on (ADR-0075), as a `systemMessage`: shown
|
|
@@ -340,8 +370,11 @@ export function attendedNotice(state, zh) {
|
|
|
340
370
|
return `sideby:你在,这个会话在你最后一条消息后 30 分钟内照常问你。${session ? '它是按无人值守启动的,30 分钟没人打字后恢复。' : '其他会话仍然无人值守。要全部关掉,运行 `sideby unattended off`。'}`;
|
|
341
371
|
return `sideby: you're here, so this session asks you as usual for 30 minutes after your last message. ${session ? 'It was started unattended, and goes back to that once nobody has typed for 30 minutes.' : 'Other sessions stay unattended. To turn Unattended Mode off everywhere, run `sideby unattended off`.'}`;
|
|
342
372
|
}
|
|
343
|
-
/**
|
|
344
|
-
|
|
373
|
+
/**
|
|
374
|
+
* What to do with this call: undefined allows it. Any error here allows it too (the caller catches it). A permission
|
|
375
|
+
* request (in Claude, also the ask tool's) that is not refused at once may first wait for a person (Answer Wait).
|
|
376
|
+
*/
|
|
377
|
+
async function decide(argv, env, input, now, deps) {
|
|
345
378
|
const [family = '', event = ''] = argv;
|
|
346
379
|
const askTool = ASK_TOOLS[family];
|
|
347
380
|
const permission = family === 'claude' && event === 'PermissionRequest';
|
|
@@ -359,10 +392,12 @@ async function decide(argv, env, input, now) {
|
|
|
359
392
|
if (sessionId)
|
|
360
393
|
await clearRetryStreak(paths.stateDir, sessionId).catch(() => { });
|
|
361
394
|
}
|
|
362
|
-
const { schedule } = await readUnattendedConfig(paths.configFile);
|
|
395
|
+
const { schedule, answerWait } = await readUnattendedConfig(paths.configFile);
|
|
363
396
|
const override = await readUnattendedOverride(paths.stateDir);
|
|
364
397
|
const state = unattendedState({ schedule, override, now, session: env[UNATTENDED_ENV] === '1' });
|
|
365
|
-
|
|
398
|
+
// Answer Wait: what Claude Code shows is watched while the mode is off too, since it may come on before anyone answers.
|
|
399
|
+
const watch = permission && answerWait !== null;
|
|
400
|
+
if (!state.on && !watch)
|
|
366
401
|
return undefined;
|
|
367
402
|
const raw = early ?? (await readInput(input));
|
|
368
403
|
const zh = prefersChinese(env);
|
|
@@ -429,8 +464,14 @@ async function decide(argv, env, input, now) {
|
|
|
429
464
|
const payload = parsePayload(raw);
|
|
430
465
|
if (!payload)
|
|
431
466
|
return undefined;
|
|
432
|
-
if (permission
|
|
433
|
-
|
|
467
|
+
if (permission) {
|
|
468
|
+
// Asked in front of someone (an Attended Session) or while the mode is off: shown, and watched while it waits.
|
|
469
|
+
const shown = state.on ? await attended(payload.sessionId, false) : {};
|
|
470
|
+
if (shown)
|
|
471
|
+
return watch ? answerAfterWait(payload, env, now.getTime(), deps) : undefined;
|
|
472
|
+
}
|
|
473
|
+
else if (payload.tool === askTool) {
|
|
474
|
+
const here = await attended(payload.sessionId, true);
|
|
434
475
|
if (here)
|
|
435
476
|
return here.answer;
|
|
436
477
|
}
|
|
@@ -479,6 +520,19 @@ export async function runUnattendedHook(argv, env, input, io, deps = {}) {
|
|
|
479
520
|
await notePrompt(env, input, deps).catch(() => { });
|
|
480
521
|
return 0;
|
|
481
522
|
}
|
|
523
|
+
if (argv[0] === 'claude' && argv[1] === 'StopWait') {
|
|
524
|
+
// In the background (`asyncRewake`): exit 2 wakes the idle session with the note on stderr.
|
|
525
|
+
try {
|
|
526
|
+
const wake = await wakeAfterWait(env, input, deps);
|
|
527
|
+
if (!wake)
|
|
528
|
+
return 0;
|
|
529
|
+
io.err.write(`${wake}\n`);
|
|
530
|
+
return 2;
|
|
531
|
+
}
|
|
532
|
+
catch {
|
|
533
|
+
return 0;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
482
536
|
if (argv[0] === 'claude' && argv[1] === 'StopFailure') {
|
|
483
537
|
try {
|
|
484
538
|
const wake = await retryAfterFailure(env, input, deps);
|
|
@@ -494,7 +548,7 @@ export async function runUnattendedHook(argv, env, input, io, deps = {}) {
|
|
|
494
548
|
let refusal;
|
|
495
549
|
const now = deps.now ? deps.now() : new Date();
|
|
496
550
|
try {
|
|
497
|
-
refusal = await decide(argv, env, input, now);
|
|
551
|
+
refusal = await decide(argv, env, input, now, deps);
|
|
498
552
|
}
|
|
499
553
|
catch {
|
|
500
554
|
return 0;
|
|
@@ -541,6 +595,194 @@ async function isOn(env, now, sessionId) {
|
|
|
541
595
|
now,
|
|
542
596
|
})).on;
|
|
543
597
|
}
|
|
598
|
+
/** Unattended Mode for the whole computer (or this `--unattended` session) at `at`, read fresh; an Attended Session counts as on. */
|
|
599
|
+
async function modeAt(env, at) {
|
|
600
|
+
const paths = resolvePaths(env);
|
|
601
|
+
const { schedule, answerWait } = await readUnattendedConfig(paths.configFile);
|
|
602
|
+
const override = await readUnattendedOverride(paths.stateDir);
|
|
603
|
+
return {
|
|
604
|
+
state: unattendedState({ schedule, override, now: at, session: env[UNATTENDED_ENV] === '1' }),
|
|
605
|
+
answerWait,
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
/** The clock, the wait and the Host, as Answer Wait's watches use them. */
|
|
609
|
+
function waitTools(deps) {
|
|
610
|
+
const clock = () => (deps.now ? deps.now() : new Date()).getTime();
|
|
611
|
+
const sleep = deps.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
|
|
612
|
+
const startPpid = process.ppid;
|
|
613
|
+
const parentGone = deps.parentGone ?? (() => process.ppid !== startPpid || process.ppid === 1);
|
|
614
|
+
return { clock, sleep, parentGone, pid: deps.hostPid ?? startPpid };
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Watches what the session shows (`watchScreen`), then keeps the Pending Decision only while it is still so: one last
|
|
618
|
+
* look just before keeping and again after, with the wait and the mode read afresh (a person may answer meanwhile, the
|
|
619
|
+
* mode go off, or the wait be made longer). When the dialog ended or the wait is now never, nothing is decided
|
|
620
|
+
* (undefined); when the longer wait has not passed or the mode is off, it goes on watching the same dialog. A decision
|
|
621
|
+
* kept before such a change is taken back. Otherwise what the hook answers with: when it went on (`at`), how long it
|
|
622
|
+
* waited, the mode then, and whether the decision was kept. What is left is the moment between the last look and the
|
|
623
|
+
* Host reading the answer: a person who answers then has their answer applied and a denial that comes after it
|
|
624
|
+
* changes nothing (ADR-0077); a wake-up is told it is not their reply.
|
|
625
|
+
*/
|
|
626
|
+
async function actAfterWait(opts) {
|
|
627
|
+
const { env, deps, sessionId } = opts;
|
|
628
|
+
const t = waitTools(deps);
|
|
629
|
+
const settings = async () => {
|
|
630
|
+
const m = await modeAt(env, new Date(t.clock()));
|
|
631
|
+
return { wait: m.answerWait, on: m.state.on };
|
|
632
|
+
};
|
|
633
|
+
const look = {
|
|
634
|
+
env,
|
|
635
|
+
pid: t.pid,
|
|
636
|
+
sessionId,
|
|
637
|
+
startedAt: opts.start,
|
|
638
|
+
clock: t.clock,
|
|
639
|
+
parentGone: t.parentGone,
|
|
640
|
+
settings,
|
|
641
|
+
...(opts.moved ? { moved: opts.moved } : {}),
|
|
642
|
+
};
|
|
643
|
+
const stateDir = resolvePaths(env).stateDir;
|
|
644
|
+
let mark;
|
|
645
|
+
for (;;) {
|
|
646
|
+
mark = await watchScreen({
|
|
647
|
+
...look,
|
|
648
|
+
expect: opts.expect,
|
|
649
|
+
sleep: t.sleep,
|
|
650
|
+
...(opts.shownBy !== undefined ? { shownBy: opts.shownBy } : {}),
|
|
651
|
+
...(mark ? { from: mark } : {}),
|
|
652
|
+
});
|
|
653
|
+
if (!mark)
|
|
654
|
+
return undefined;
|
|
655
|
+
await deps.beforeAct?.();
|
|
656
|
+
const first = await lastLook({ ...look, mark });
|
|
657
|
+
if (first === 'stop')
|
|
658
|
+
return undefined;
|
|
659
|
+
if (first === 'wait')
|
|
660
|
+
continue;
|
|
661
|
+
const at = new Date(t.clock());
|
|
662
|
+
const waited = waitedMinutes(opts.start, at.getTime());
|
|
663
|
+
const { state } = await modeAt(env, at);
|
|
664
|
+
let kept;
|
|
665
|
+
try {
|
|
666
|
+
kept = await addPendingDecision(stateDir, opts.keep(at, waited), at, { dedupe: true });
|
|
667
|
+
}
|
|
668
|
+
catch {
|
|
669
|
+
// Best effort: the reason then asks for it in the final report instead.
|
|
670
|
+
}
|
|
671
|
+
await deps.afterKeep?.();
|
|
672
|
+
const second = await lastLook({ ...look, mark });
|
|
673
|
+
if (second === 'act')
|
|
674
|
+
return { at, waited, state, kept: kept !== undefined };
|
|
675
|
+
if (kept)
|
|
676
|
+
await withdrawPendingDecision(stateDir, kept, at).catch(() => { });
|
|
677
|
+
if (second === 'stop')
|
|
678
|
+
return undefined;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Answer Wait for a question or a permission prompt Claude Code shows (spec §3.37 item 7, ADR-0077): watches the
|
|
683
|
+
* session record while the dialog stays on screen and, once it has waited `unattended.answerWait` minutes and
|
|
684
|
+
* Unattended Mode is on (counting an Attended Session as on: nobody answered), refuses it as the mode would, keeping a
|
|
685
|
+
* Pending Decision with how long it waited. Anything that says someone answered, or that it cannot tell, lets it be
|
|
686
|
+
* (undefined): the record does not show a dialog (a subagent's request, which Claude Code shows only after the hooks,
|
|
687
|
+
* or a session that shows none), the dialog ended or another took its place, the Host is gone, or the wait is now
|
|
688
|
+
* never; looked at once more just before and after keeping the Pending Decision (`actAfterWait`); a dialog put on screen
|
|
689
|
+
* after the hook began is another one (this one was answered meanwhile) and is never taken for it. It never answers
|
|
690
|
+
* "yes": the only decision it gives is a denial.
|
|
691
|
+
*/
|
|
692
|
+
async function answerAfterWait(payload, env, start, deps) {
|
|
693
|
+
// Claude Code runs a subagent's hooks before it shows the prompt: holding one would hide it from the person.
|
|
694
|
+
if (payload.agentId || !payload.sessionId)
|
|
695
|
+
return undefined;
|
|
696
|
+
const sessionId = payload.sessionId;
|
|
697
|
+
const account = text(env.SIDEBY_ACCOUNT, 256);
|
|
698
|
+
const where = {
|
|
699
|
+
family: 'claude',
|
|
700
|
+
...(account ? { account } : {}),
|
|
701
|
+
sessionId,
|
|
702
|
+
...(payload.cwd ? { cwd: payload.cwd } : {}),
|
|
703
|
+
};
|
|
704
|
+
const question = payload.tool === ASK_TOOLS.claude;
|
|
705
|
+
const done = await actAfterWait({
|
|
706
|
+
env,
|
|
707
|
+
deps,
|
|
708
|
+
sessionId,
|
|
709
|
+
expect: 'waiting',
|
|
710
|
+
start,
|
|
711
|
+
// The dialog this request put on screen was there before the hook began; one put up later is another dialog.
|
|
712
|
+
shownBy: start,
|
|
713
|
+
keep: (_at, waited) => question
|
|
714
|
+
? { kind: 'question', ...where, text: questionText(payload.input), waited }
|
|
715
|
+
: { kind: 'permission', ...where, text: permissionText(payload.tool, payload.input), waited },
|
|
716
|
+
});
|
|
717
|
+
if (!done)
|
|
718
|
+
return undefined;
|
|
719
|
+
const { at, waited, state, kept } = done;
|
|
720
|
+
const deny = (message) => ({
|
|
721
|
+
hookSpecificOutput: { hookEventName: 'PermissionRequest', decision: { behavior: 'deny', message } },
|
|
722
|
+
});
|
|
723
|
+
// Kept already (and checked after): the answer only says whether that worked.
|
|
724
|
+
return {
|
|
725
|
+
json: deny,
|
|
726
|
+
reason: () => question
|
|
727
|
+
? questionReason(state, at, prefersChinese(env), kept, waited)
|
|
728
|
+
: permissionReason(state, at, kept, waited),
|
|
729
|
+
};
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* Answer Wait for a turn that ended on a question written as text (spec §3.37 item 7, ADR-0077): Claude's second `Stop`
|
|
733
|
+
* entry, in the background (`asyncRewake`). When the session is not unattended right now (the mode is off, or it is an
|
|
734
|
+
* Attended Session: otherwise the first `Stop` entry already keeps the turn going) and the last message ends on a
|
|
735
|
+
* question, it watches the session record while the session waits for a prompt. Once nobody replied for
|
|
736
|
+
* `unattended.answerWait` minutes and the mode is on, it keeps the question as a Pending Decision and returns the note
|
|
737
|
+
* that wakes the session (exit 2). A new turn (a reply, a notification), a prompt someone typed after this `Stop` (the
|
|
738
|
+
* Attended Session's record, which also catches a reply whose turn ended before this hook first read the record), the
|
|
739
|
+
* Host gone, the wait set to never, or anything it cannot tell: undefined, nothing happens.
|
|
740
|
+
*/
|
|
741
|
+
async function wakeAfterWait(env, input, deps) {
|
|
742
|
+
const t = waitTools(deps);
|
|
743
|
+
const start = t.clock();
|
|
744
|
+
const v = parseObject(await readInput(input));
|
|
745
|
+
// Only a first Stop (`stop_hook_active` false) of the main session.
|
|
746
|
+
if (v?.stop_hook_active !== false || v.agent_id !== undefined)
|
|
747
|
+
return undefined;
|
|
748
|
+
const sessionId = text(v.session_id, 256);
|
|
749
|
+
const message = typeof v.last_assistant_message === 'string' ? v.last_assistant_message : '';
|
|
750
|
+
const question = sessionId ? endingQuestion(message) : undefined;
|
|
751
|
+
if (!sessionId || !question)
|
|
752
|
+
return undefined;
|
|
753
|
+
if ((await modeAt(env, new Date(start))).answerWait === null)
|
|
754
|
+
return undefined;
|
|
755
|
+
if (await isOn(env, new Date(start), sessionId))
|
|
756
|
+
return undefined;
|
|
757
|
+
const stateDir = resolvePaths(env).stateDir;
|
|
758
|
+
// Someone typed after this Stop: the question is answered, even when that turn already ended.
|
|
759
|
+
const moved = async () => {
|
|
760
|
+
const r = await readAttended(stateDir, sessionId, new Date(t.clock()));
|
|
761
|
+
return r !== undefined && Date.parse(r.at) > start;
|
|
762
|
+
};
|
|
763
|
+
const account = text(env.SIDEBY_ACCOUNT, 256);
|
|
764
|
+
const cwd = text(v.cwd);
|
|
765
|
+
const done = await actAfterWait({
|
|
766
|
+
env,
|
|
767
|
+
deps,
|
|
768
|
+
sessionId,
|
|
769
|
+
expect: 'idle',
|
|
770
|
+
start,
|
|
771
|
+
moved,
|
|
772
|
+
keep: (_at, waited) => ({
|
|
773
|
+
kind: 'question',
|
|
774
|
+
family: 'claude',
|
|
775
|
+
...(account ? { account } : {}),
|
|
776
|
+
sessionId,
|
|
777
|
+
...(cwd ? { cwd } : {}),
|
|
778
|
+
text: question,
|
|
779
|
+
waited,
|
|
780
|
+
}),
|
|
781
|
+
});
|
|
782
|
+
if (!done)
|
|
783
|
+
return undefined;
|
|
784
|
+
return stopReason(done.state, done.at, prefersChinese(env), done.kept, done.waited);
|
|
785
|
+
}
|
|
544
786
|
/** A prompt id as Claude Code writes it; anything else is not looked for. */
|
|
545
787
|
const PROMPT_ID = /^[A-Za-z0-9_.:-]{1,128}$/;
|
|
546
788
|
/**
|
package/package.json
CHANGED
package/schemas/config.json
CHANGED
|
@@ -500,6 +500,20 @@
|
|
|
500
500
|
"additionalProperties": false
|
|
501
501
|
},
|
|
502
502
|
"description": "Slots that turn Unattended Mode on and off by themselves, in this computer's time zone. Empty by default."
|
|
503
|
+
},
|
|
504
|
+
"answerWait": {
|
|
505
|
+
"anyOf": [
|
|
506
|
+
{
|
|
507
|
+
"type": "integer",
|
|
508
|
+
"minimum": 1,
|
|
509
|
+
"maximum": 120
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"type": "boolean",
|
|
513
|
+
"const": false
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
"description": "Answer Wait (ADR-0077): how many minutes a question or a permission prompt shown in a Claude session sideby started waits for a person. Once it has waited this long with nobody answering and Unattended Mode is on, the session goes on as Unattended Mode would: the question with the recommended choice where it can be undone, the permission prompt refused (never allowed); each is kept as a Pending Decision. A turn that ended on a question written as text goes on the same way. `false`: never, questions wait for you. Not set: 10 minutes."
|
|
503
517
|
}
|
|
504
518
|
},
|
|
505
519
|
"additionalProperties": false,
|
|
@@ -70,6 +70,11 @@
|
|
|
70
70
|
"type": "string",
|
|
71
71
|
"description": "The question and its options, the tool and what it was to do, or the deferred text; at most 4000 characters."
|
|
72
72
|
},
|
|
73
|
+
"waited": {
|
|
74
|
+
"type": "integer",
|
|
75
|
+
"minimum": 1,
|
|
76
|
+
"description": "Minutes the question or permission prompt was on screen with nobody answering before the session went on without an answer (Answer Wait, ADR-0077). Absent when it was never shown."
|
|
77
|
+
},
|
|
73
78
|
"doneAt": {
|
|
74
79
|
"type": "string",
|
|
75
80
|
"description": "When it was marked done; ISO."
|
|
@@ -72,6 +72,11 @@
|
|
|
72
72
|
"type": "string",
|
|
73
73
|
"description": "The question and its options, the tool and what it was to do, or the deferred text; at most 4000 characters."
|
|
74
74
|
},
|
|
75
|
+
"waited": {
|
|
76
|
+
"type": "integer",
|
|
77
|
+
"minimum": 1,
|
|
78
|
+
"description": "Minutes the question or permission prompt was on screen with nobody answering before the session went on without an answer (Answer Wait, ADR-0077). Absent when it was never shown."
|
|
79
|
+
},
|
|
75
80
|
"doneAt": {
|
|
76
81
|
"type": "string",
|
|
77
82
|
"description": "When it was marked done; ISO."
|
package/schemas/unattended.json
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"reason",
|
|
9
9
|
"configured",
|
|
10
10
|
"schedule",
|
|
11
|
+
"answerWait",
|
|
11
12
|
"pending",
|
|
12
13
|
"attended",
|
|
13
14
|
"coverage"
|
|
@@ -153,6 +154,19 @@
|
|
|
153
154
|
},
|
|
154
155
|
"description": "Config `unattended.schedule`, numbered from 1."
|
|
155
156
|
},
|
|
157
|
+
"answerWait": {
|
|
158
|
+
"anyOf": [
|
|
159
|
+
{
|
|
160
|
+
"type": "integer",
|
|
161
|
+
"minimum": 1,
|
|
162
|
+
"maximum": 120
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"type": "null"
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"description": "Answer Wait (ADR-0077): minutes a question or permission prompt shown in a Claude session sideby started waits for a person before, with Unattended Mode on, the session goes on without an answer. null: never. 10 when config `unattended.answerWait` is not set. Change it with `sideby unattended wait <minutes>|off`."
|
|
169
|
+
},
|
|
156
170
|
"pending": {
|
|
157
171
|
"type": "integer",
|
|
158
172
|
"description": "Open Pending Decisions (`sideby unattended pending`)."
|
|
@@ -256,7 +270,7 @@
|
|
|
256
270
|
},
|
|
257
271
|
"changed": {
|
|
258
272
|
"type": "boolean",
|
|
259
|
-
"description": "Set by on, off and
|
|
273
|
+
"description": "Set by on, off, schedule and wait changes: whether anything changed."
|
|
260
274
|
},
|
|
261
275
|
"undo": {
|
|
262
276
|
"type": "string",
|
|
@@ -325,5 +339,5 @@
|
|
|
325
339
|
"description": "Not the answer to the task: mention it briefly afterwards and offer to update."
|
|
326
340
|
}
|
|
327
341
|
},
|
|
328
|
-
"title": "sideby unattended [on|off|schedule …] --json"
|
|
342
|
+
"title": "sideby unattended [on|off|schedule …|wait …] --json"
|
|
329
343
|
}
|
package/skills/sideby/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: sideby
|
|
3
3
|
description: Use when the user runs, or wants to run, several AI coding accounts (Claude Code, Codex, Grok Build, pi) side by side. Covers installing sideby and setting up a new account ("install sideby", "set up another Claude account", "add cc008", "配置一个 cc00x", "再加一个 Codex 账号"), explaining what accounts share and what stays separate ("what do my accounts share?", "这些账号共享了什么"), showing which account a session is ("show [cc001] in the status line", "加上账号标识"), finding a past session of any account ("找一下我上周改登录页的那个会话"), telling another running session something, in any account ("告诉 cc002 ……", "给跑构建的那个会话发消息"; Claude Code's own SendMessage reaches only sessions of the same account), seeing accounts, quota and usage, moving on when one hits its 5-hour or weekly limit, moving the current task to another account ("用 cc008 继续", "交回 cc008"), adding a short command (alias) or a pick command that starts whichever account has the most quota ("加个 cc"), adding an API account from a vendor's docs ("加一个 DeepSeek API 账号"), supporting a new tool, and repairing drifted account directories (skills, hooks, rules or settings not shared, wrong symlinks, credential file permissions). Drives the `sideby` CLI with `--json`; the agent does every step except browser sign-in, filling in secrets and starting interactive sessions, which it hands to the user as one command (inside an Auto Handoff session, `sideby handoff ready --to` moves the task itself).
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.
|
|
5
|
+
version: "0.40.0"
|
|
6
6
|
requires:
|
|
7
7
|
bins: [sideby, node]
|
|
8
8
|
cliHelp: sideby --help
|
|
@@ -84,8 +84,9 @@ Account refs are `<family>:<name>`; a bare `<name>` works only when it is unique
|
|
|
84
84
|
| A Claude API account's gateway rejects requests after an Advisor change, or why sideby adds `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` to API accounts ("API 账号网关报错了", "为什么 API 账号多了这个变量") | `sideby advisor --json` (`apiBetasOff`, each group's `apiAccounts`), `sideby config get claude.apiBetasOff --json`; `sideby advisor undo` or `sideby config set claude.apiBetasOff false` after they agree | `references/panel.md` |
|
|
85
85
|
| Stop Claude and Codex when the network is wrong ("网络不对时别让 Claude 用", "代理断了就拦住", "only allow US and Japan", "开网络检查"), see where requests leave from now, or a session says it was blocked | `sideby network --json`, `sideby network check --json`, `sideby network allow <CC>... --json` and `sideby network on --json` (each exits 10 first; rerun with `--yes` after they agree) | `references/network.md` |
|
|
86
86
|
| Leave sessions running with nobody there ("挂机", "无人值守", "今晚自己跑完", "设个时间段别问我", "keep going while I sleep"), set a nightly Schedule, or see what was left for the user | `sideby unattended on [--until 08:00] --json` (run it yourself when they say they are leaving), `sideby unattended schedule preset weeknights --json`, `sideby unattended --json`, `sideby unattended pending --json`; inside a session refused a question: `sideby unattended defer "<one sentence>"` | `references/unattended.md` |
|
|
87
|
+
| How long a question waits before the session goes on without an answer ("问题没人回就自动按推荐继续", "问题等我 30 分钟", "别自动继续,一直等我", "how long does a question wait for me") | `sideby unattended wait --json` shows `answerWait`; `sideby unattended wait <1-120> --json` or `sideby unattended wait off --json` sets it. It acts only while Unattended Mode is on, and never answers "yes" | `references/unattended.md` |
|
|
87
88
|
| The user is back early and wants questions in one session ("我回来了,会话怎么还不问我", "为什么这个会话又开始问我", "I'm back, why doesn't it ask me"), or asks which sessions ask as usual | Tell them to type in that session: it asks as usual for 30 minutes after each message. `sideby unattended --json` lists them (`attended`); there is no command to set it. `sideby unattended off --json` turns it off everywhere | `references/unattended.md` |
|
|
88
|
-
| A session waits on background work and says nothing for a long time ("后台任务跑着时没动静", "等子任务时隔一阵告诉我进度", "tell me what it is waiting for every
|
|
89
|
+
| A session waits on background work and says nothing for a long time ("后台任务跑着时没动静", "等子任务时隔一阵告诉我进度", "tell me what it is waiting for every 30 minutes", "进度提醒"), or stop those updates ("别再报进度了", "turn off progress updates") | `sideby progress --json`, then `sideby progress on [--every <minutes>] --json` or `sideby progress off --json` (writes only sideby's config, no preview; relay that each update uses quota and that only Claude sessions started afterwards get it) | `references/progress.md` |
|
|
89
90
|
| See Claude quota, refresh it, or turn on live quota for Auto Handoff | `sideby quota claude --refresh --json` (no setup); `sideby quota setup claude` (exits 10) for Auto Handoff | `references/quota.md` |
|
|
90
91
|
| Update sideby or its skill ("is there a new version", "更新 sideby"), or an output has `_notice` | `sideby update --json` (exits 10 first) | `references/update.md` |
|
|
91
92
|
| See everything at once | `sideby ui` (local panel on `127.0.0.1:17420`; `--no-open` prints the address) | — |
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# Progress updates: a waiting session says what it waits for
|
|
2
2
|
|
|
3
|
-
Progress Reminders (spec §3.42, ADR-0076): while a Claude session sideby started waits on background work (subagents, background commands), the session is idle and the model cannot say anything, so the user sees silence. With progress updates on, sideby wakes such a session every
|
|
3
|
+
Progress Reminders (spec §3.42, ADR-0076): while a Claude session sideby started waits on background work (subagents, background commands), the session is idle and the model cannot say anything, so the user sees silence. With progress updates on, sideby wakes such a session every 30 minutes (or the interval the user picks), and the model tells the user in one or two sentences what it waits for, how long it has waited and whether there is new output, then ends its turn.
|
|
4
4
|
|
|
5
5
|
## Turn it on or off
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
sideby progress --json # { on, every?, defaultEvery, choices, families }
|
|
9
|
-
sideby progress on --json # every
|
|
9
|
+
sideby progress on --json # every 30 minutes (or keeps the interval it had)
|
|
10
10
|
sideby progress on --every 15 --json # 1 to 240 minutes
|
|
11
11
|
sideby progress off --json
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
It writes only sideby's config (`progress.every`), so there is no preview and no `--yes`; each change returns `undo`. Before turning it on for the user, tell them, in one line each:
|
|
15
|
-
- Each update is one model turn, which reads the whole conversation: it uses quota. That is why it is off by default.
|
|
15
|
+
- Each update is one model turn, which reads the whole conversation: it uses quota, and a longer interval uses less. That is why it is off by default.
|
|
16
16
|
- Claude sessions sideby starts from now on get it; a session already running needs a restart. Turning it off, or a new interval, reaches running sessions too.
|
|
17
17
|
- There are no updates while the session is unattended (Unattended Mode, unless the user typed there in the last 30 minutes), while a turn is running, or once the background work is done.
|
|
18
18
|
- Codex is not covered: no Codex hook can wake a waiting session. Grok, pi and sessions started without sideby are not covered either.
|
|
@@ -57,6 +57,20 @@ A Claude session the user types into asks as usual again for 30 minutes after ea
|
|
|
57
57
|
- Only a prompt the user typed counts: not a background task's notification, not a Message from `sideby send` or another session, not the prompt sideby put on the command line, and not your own tool calls. There is no command to set it, and you must not try to make your own session count: if the user wants questions everywhere, run `sideby unattended off --json`.
|
|
58
58
|
- Typing into a terminal by automation (tmux `send-keys`) looks like a person to Claude Code and counts for that one session. Sessions started before this sideby version, and Codex sessions, do not have it.
|
|
59
59
|
|
|
60
|
+
## If nobody answers: questions go on after a wait
|
|
61
|
+
|
|
62
|
+
A question or a permission prompt that a Claude session shows while someone is there (an Attended Session, or Unattended Mode off) waits for the user. Once it has waited the **Answer Wait** (10 minutes unless the user set another; ADR-0077) with nobody answering, and Unattended Mode is on, the session goes on as Unattended Mode would: the question is refused with the instruction to take the recommended option where it can be undone, and the permission prompt is answered "no", never "yes". A turn that ended on a question written as text is woken with the same instructions after the same wait. Each is kept as a Pending Decision with `waited` (minutes). While Unattended Mode is off it keeps waiting, and goes on once the mode comes on (a Slot that begins later, say). So "ask me while I'm here, don't get stuck when I'm not" needs only Unattended Mode on, or a Schedule.
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
sideby unattended wait --json # field answerWait: minutes, or null when it waits however long
|
|
66
|
+
sideby unattended wait 30 --json # 1 to 120 minutes
|
|
67
|
+
sideby unattended wait off --json # questions wait for the user however long
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Set it when the user asks ("问题没人回就自动按推荐继续", "问题等我 30 分钟再继续", "别自动继续,一直等我", "how long does a question wait for me"); each change prints its `undo`. It reaches sessions already running at their next look. Not covered: a background subagent's permission prompt (Claude Code shows it only after the hooks, so it waits for the user), Codex, Grok, pi, and sessions started before this sideby version (restart them).
|
|
71
|
+
|
|
72
|
+
When a refusal or a note in your session starts "No answer after 10 minutes", "Not allowed: nobody confirmed this action in 10 minutes" or "Nobody replied to your question for 10 minutes", that is this: nobody is answering, so do what the note says and do not ask the same thing again.
|
|
73
|
+
|
|
60
74
|
## When the user is back
|
|
61
75
|
|
|
62
76
|
```sh
|
|
@@ -65,6 +79,6 @@ sideby unattended pending --json # each question, refused permission or skipp
|
|
|
65
79
|
sideby unattended pending done <id> --json # or --all, once the user has dealt with them
|
|
66
80
|
```
|
|
67
81
|
|
|
68
|
-
Go through the open ones with the user (a `deferred` one that starts "The session stopped" is a session whose turn kept failing after three retries; a `permission` one names the tool, for Bash only the program and the model's description of the step, and `agentType` when a subagent asked; the whole command is in the session itself). A decision with a `sessionId` can be continued in its session: `sideby sessions copy <sessionId> --as resume` copies the command. Done ones are deleted 30 days later. A plugin can be told when a stretch ends through the `unattended.ended` event (`docs/guide/plugins.md`); sideby itself sends no notification.
|
|
82
|
+
Go through the open ones with the user (one with `waited` was on screen that many minutes before the session went on without an answer; a `deferred` one that starts "The session stopped" is a session whose turn kept failing after three retries; a `permission` one names the tool, for Bash only the program and the model's description of the step, and `agentType` when a subagent asked; the whole command is in the session itself). A decision with a `sessionId` can be continued in its session: `sideby sessions copy <sessionId> --as resume` copies the command. Done ones are deleted 30 days later. A plugin can be told when a stretch ends through the `unattended.ended` event (`docs/guide/plugins.md`); sideby itself sends no notification.
|
|
69
83
|
|
|
70
|
-
The same is on the Panel's **Unattended** tab (`sideby ui`): the status with **Turn on now**, the Schedule, and the Pending Decisions with **Done
|
|
84
|
+
The same is on the Panel's **Unattended** tab (`sideby ui`): the status with **Turn on now**, the Schedule, **If nobody answers** (the Answer Wait), and the Pending Decisions with **Done** (one that went on after a wait says "No answer for 10 min"). Point the user there when they prefer clicking.
|