sideby 0.41.1 → 0.41.3
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 +163 -32
- package/dist/src/cli/json-schemas.js +41 -4
- package/dist/src/cli/main.js +17 -6
- package/dist/src/core/cli-commands.js +1 -1
- package/dist/src/core/config.d.ts +16 -0
- package/dist/src/core/config.js +262 -42
- package/dist/src/core/history-project.d.ts +14 -0
- package/dist/src/core/history-project.js +42 -12
- package/dist/src/core/history.d.ts +4 -6
- package/dist/src/core/history.js +5 -15
- package/dist/src/core/local-build.d.ts +12 -0
- package/dist/src/core/local-build.js +32 -0
- package/dist/src/core/search-catalog.js +27 -0
- package/dist/src/core/unattended-followup.d.ts +62 -0
- package/dist/src/core/unattended-followup.js +205 -0
- package/dist/src/core/unattended-pending.d.ts +11 -3
- package/dist/src/core/unattended-pending.js +34 -8
- package/dist/src/families/claude/history.js +9 -1
- package/dist/src/families/claude/index.js +1 -0
- package/dist/src/families/history.d.ts +22 -2
- package/dist/src/families/history.js +55 -0
- package/dist/src/handoff/messages.js +1 -1
- package/dist/src/panel/handler.d.ts +11 -4
- package/dist/src/panel/handler.js +50 -25
- package/dist/src/panel/i18n.d.ts +23 -1
- package/dist/src/panel/i18n.js +48 -4
- package/dist/src/panel/page-logic.d.ts +53 -0
- package/dist/src/panel/page-logic.js +96 -0
- package/dist/src/panel/page-script.js +140 -36
- package/dist/src/panel/page-styles.js +17 -0
- package/dist/src/unattended/hook.d.ts +10 -5
- package/dist/src/unattended/hook.js +17 -12
- package/package.json +1 -1
- package/schemas/unattended-pending.json +156 -56
- package/skills/sideby/SKILL.md +2 -1
- package/skills/sideby/references/diagnose.md +1 -0
- package/skills/sideby/references/handoff.md +1 -1
- package/skills/sideby/references/panel.md +1 -1
- package/skills/sideby/references/unattended.md +16 -5
package/dist/build.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"20261120T032753-91cea3"}
|
package/dist/src/cli/commands.js
CHANGED
|
@@ -7,7 +7,7 @@ import { ADVISOR_UNLOCK_VAR, advisorGroupsToUndo, advisorNothingToDo, advisorPla
|
|
|
7
7
|
import { listAppProfiles, openAppProfile, parseProfileRef, removeAppProfile } from '../core/app-profiles.js';
|
|
8
8
|
import { browserReport, openInBrowser, openVendorPage, setBrowserChoice, setBrowserSignIns, } from '../core/browser-profiles.js';
|
|
9
9
|
import { CLI_COMMANDS, COMMAND_GROUPS, commonCommands } from '../core/cli-commands.js';
|
|
10
|
-
import { aiTaskPermissions, aliasAccount, aliasArgs, aliasRefs, EDITORS, editConfigAskPermissions, editConfigUpdate, loadConfig, } from '../core/config.js';
|
|
10
|
+
import { aiTaskPermissions, aliasAccount, aliasArgs, aliasRefs, EDITORS, editConfigAskPermissions, editConfigUpdate, loadConfig, readConfig, unknownConfigKeyNote, } from '../core/config.js';
|
|
11
11
|
import { openDesktopApp, withDesktopApps } from '../core/desktop-app.js';
|
|
12
12
|
import { EDITOR_APPS, editSettings, isEditor } from '../core/edit-settings.js';
|
|
13
13
|
import { UserError } from '../core/errors.js';
|
|
@@ -32,7 +32,7 @@ import { MODEL_NAME } from '../families/shared/model-args.js';
|
|
|
32
32
|
import { AI_TASK_KINDS, hiddenIn, inDisplayOrder, pinnedIn, resetWhen, suggestAlias, suggestName, vendorAlias, withPinned, } from '../panel/page-logic.js';
|
|
33
33
|
import { createRuntime, UnknownFamilyError } from '../runtime.js';
|
|
34
34
|
import { UsageError } from './args.js';
|
|
35
|
-
import { c, clock, compactNumber, quotaText, table, truncate, tuningLines, usageText } from './format.js';
|
|
35
|
+
import { ago, c, clock, compactNumber, quotaText, table, truncate, tuningLines, usageText } from './format.js';
|
|
36
36
|
/** Runs `fn` while a record under the state directory says a Host runs (also for `login`), so an Auto Update waits (spec §3.23). */
|
|
37
37
|
async function whileRunning(rt, fn) {
|
|
38
38
|
const { markRunning } = await import('../core/update.js');
|
|
@@ -426,8 +426,21 @@ export async function cmdList(a, io) {
|
|
|
426
426
|
io.err(c.yellow(`${s.ref}: ${p}`));
|
|
427
427
|
for (const e of rt.pluginErrors)
|
|
428
428
|
io.err(c.yellow(`plugin ${e.where}: ${e.message}`));
|
|
429
|
+
for (const note of await unknownConfigNotes(rt.paths.configFile))
|
|
430
|
+
io.err(c.yellow(`sideby: ${note}`));
|
|
429
431
|
return 0;
|
|
430
432
|
}
|
|
433
|
+
/**
|
|
434
|
+
* One line per config key this sideby does not know (ADR-0080), for the commands a person reads: `sideby list` and
|
|
435
|
+
* `sideby doctor`. Never from hooks or `--json` output on stdout.
|
|
436
|
+
*/
|
|
437
|
+
async function unknownConfigNotes(file) {
|
|
438
|
+
const read = await readConfig(file).catch(() => null);
|
|
439
|
+
if (!read?.unknownKeys.length)
|
|
440
|
+
return [];
|
|
441
|
+
const { packageVersion } = await import('../core/version.js');
|
|
442
|
+
return read.unknownKeys.map((k) => unknownConfigKeyNote(k, packageVersion()));
|
|
443
|
+
}
|
|
431
444
|
/**
|
|
432
445
|
* `new --next` and `new --vendor`: the name (the next one of the Family with `--next`), and a short command from the
|
|
433
446
|
* same helpers the Panel uses (spec §3.16). A Subscription Account follows the pattern of the Family's aliases
|
|
@@ -796,6 +809,8 @@ export async function cmdDoctor(a, io) {
|
|
|
796
809
|
const home = rt.paths.home;
|
|
797
810
|
for (const f of report.fixes)
|
|
798
811
|
io.out(`${f.ok ? c.green('fixed') : c.red('not fixed')} ${f.account} ${f.item}: ${f.message}`);
|
|
812
|
+
for (const note of await unknownConfigNotes(rt.paths.configFile))
|
|
813
|
+
io.out(`${c.yellow('!')} ${note}`);
|
|
799
814
|
for (const f of report.general)
|
|
800
815
|
io.out(`${f.level === 'fail' ? c.red('✗') : c.yellow('!')} ${tilde(f.message, home)}${f.hint ? c.dim(` — ${f.hint}`) : ''}`);
|
|
801
816
|
for (const acc of report.accounts) {
|
|
@@ -5139,56 +5154,172 @@ export async function cmdUnattended(a, io) {
|
|
|
5139
5154
|
return show(change, change.changed ? said : `It was already set. ${said}`);
|
|
5140
5155
|
}
|
|
5141
5156
|
if (sub === 'pending') {
|
|
5142
|
-
const { listPendingDecisions, markPendingDone } = await import('../core/unattended-pending.js');
|
|
5157
|
+
const { findPendingDecision, listPendingDecisions, markPendingDone, reopenPendingDecisions } = await import('../core/unattended-pending.js');
|
|
5158
|
+
const { pendingOverview, pendingProjectsNamed } = await import('../core/unattended-followup.js');
|
|
5159
|
+
const { uaGroupByProject } = await import('../panel/page-logic.js');
|
|
5143
5160
|
const [action, ...args] = rest;
|
|
5161
|
+
const overview = async (all) => pendingOverview({
|
|
5162
|
+
decisions: await listPendingDecisions(paths.stateDir, { all, now: now() }),
|
|
5163
|
+
accounts: await rt.accounts(),
|
|
5164
|
+
stateDir: paths.stateDir,
|
|
5165
|
+
});
|
|
5166
|
+
// `--project <name>`: one Project, as `sideby history --project` reads a name; an unknown or unclear one names
|
|
5167
|
+
// the choices.
|
|
5168
|
+
const projectFlag = a.flags.get('project');
|
|
5169
|
+
if (a.flags.has('project') && (typeof projectFlag !== 'string' || !projectFlag.trim()))
|
|
5170
|
+
throw new UsageError('--project takes a project name, such as --project shop (`sideby unattended pending` shows them)');
|
|
5171
|
+
const projectOf = async (o) => {
|
|
5172
|
+
if (typeof projectFlag !== 'string')
|
|
5173
|
+
return undefined;
|
|
5174
|
+
const hit = await pendingProjectsNamed(o.projects, projectFlag, paths.home);
|
|
5175
|
+
const choices = o.projects
|
|
5176
|
+
.filter((p) => p.project)
|
|
5177
|
+
.map((p) => p.projectName)
|
|
5178
|
+
.join(', ');
|
|
5179
|
+
if (hit.length === 1)
|
|
5180
|
+
return hit[0];
|
|
5181
|
+
throw new UsageError(hit.length
|
|
5182
|
+
? `"${projectFlag}" names ${hit.length} projects (${hit.map((p) => tildify(p, paths.home)).join(', ')}); give more of its path`
|
|
5183
|
+
: `no project named "${projectFlag}" has a Pending Decision${choices ? `; the projects are: ${choices}` : ''}`);
|
|
5184
|
+
};
|
|
5185
|
+
// `--ids a,b`: whole ids, as `sideby unattended pending` prints them.
|
|
5186
|
+
const idList = () => {
|
|
5187
|
+
if (!a.flags.has('ids'))
|
|
5188
|
+
return undefined;
|
|
5189
|
+
const v = a.flags.get('ids');
|
|
5190
|
+
const list = typeof v === 'string'
|
|
5191
|
+
? [
|
|
5192
|
+
...new Set(v
|
|
5193
|
+
.split(',')
|
|
5194
|
+
.map((x) => x.trim())
|
|
5195
|
+
.filter(Boolean)),
|
|
5196
|
+
]
|
|
5197
|
+
: [];
|
|
5198
|
+
if (!list.length)
|
|
5199
|
+
throw new UsageError('--ids takes ids separated by commas, such as --ids <id>,<id> (`sideby unattended pending` shows them)');
|
|
5200
|
+
return list;
|
|
5201
|
+
};
|
|
5202
|
+
// What is still open afterwards: the full list for --json, else only how many (no session record is read).
|
|
5203
|
+
const left = async (key, ids) => {
|
|
5204
|
+
if (asJson) {
|
|
5205
|
+
const o = await overview(false);
|
|
5206
|
+
json(io, { [key]: ids, pending: o.rows, projects: o.projects });
|
|
5207
|
+
return undefined;
|
|
5208
|
+
}
|
|
5209
|
+
return (await listPendingDecisions(paths.stateDir, { now: now() })).length;
|
|
5210
|
+
};
|
|
5144
5211
|
if (action === 'done') {
|
|
5145
|
-
allow('all');
|
|
5212
|
+
allow('all', 'replied', 'project', 'ids');
|
|
5146
5213
|
const all = a.flags.has('all');
|
|
5147
|
-
|
|
5148
|
-
|
|
5214
|
+
const replied = a.flags.has('replied');
|
|
5215
|
+
const byProject = a.flags.has('project');
|
|
5216
|
+
const ids = idList();
|
|
5217
|
+
const usage = 'usage: sideby unattended pending done <id> | --ids <a,b> | --all | --replied [--project <name>] | --project <name> (ids and projects are in `sideby unattended pending`)';
|
|
5218
|
+
const ways = [all, args.length > 0, ids !== undefined, replied || byProject].filter(Boolean).length;
|
|
5219
|
+
if (ways !== 1 || args.length > 1)
|
|
5220
|
+
throw new UsageError(usage);
|
|
5149
5221
|
let done;
|
|
5222
|
+
let picked = ids;
|
|
5223
|
+
if (replied || byProject) {
|
|
5224
|
+
const o = await overview(false);
|
|
5225
|
+
const project = await projectOf(o);
|
|
5226
|
+
picked = o.rows
|
|
5227
|
+
.filter((r) => (!replied || r.state === 'replied') && (project === undefined || r.project === project))
|
|
5228
|
+
.map((r) => r.id);
|
|
5229
|
+
}
|
|
5150
5230
|
try {
|
|
5151
|
-
done =
|
|
5231
|
+
done =
|
|
5232
|
+
picked === undefined
|
|
5233
|
+
? await markPendingDone(paths.stateDir, all ? 'all' : args[0], now())
|
|
5234
|
+
: await markPendingDone(paths.stateDir, picked, now());
|
|
5152
5235
|
}
|
|
5153
5236
|
catch (err) {
|
|
5154
5237
|
throw new UserError(err.message, { code: 'no-pending' });
|
|
5155
5238
|
}
|
|
5156
|
-
const
|
|
5157
|
-
if (
|
|
5158
|
-
|
|
5239
|
+
const open = await left('done', done.map((d) => d.id));
|
|
5240
|
+
if (open === undefined)
|
|
5241
|
+
return 0;
|
|
5242
|
+
if (!done.length)
|
|
5243
|
+
io.out(picked === undefined
|
|
5244
|
+
? `Nothing to mark: it is done already. ${open} still open.`
|
|
5245
|
+
: ids
|
|
5246
|
+
? `Nothing to mark: those are done already. ${open} still open.`
|
|
5247
|
+
: `Nothing to mark: ${replied ? 'you wrote in the session after none of the open ones' : 'no open decision'}${byProject ? ' in that project' : ''}. ${open} still open.`);
|
|
5159
5248
|
else
|
|
5160
|
-
io.out(`${c.green('✓')} marked ${done.length === 1 ? '1 decision' : `${done.length} decisions`} done; ${
|
|
5249
|
+
io.out(`${c.green('✓')} marked ${done.length === 1 ? '1 decision' : `${done.length} decisions`} done; ${open} still open. Marked one by mistake? \`sideby unattended pending reopen <id>\` puts it back.`);
|
|
5161
5250
|
return 0;
|
|
5162
5251
|
}
|
|
5163
|
-
|
|
5252
|
+
if (action === 'reopen') {
|
|
5253
|
+
allow('ids');
|
|
5254
|
+
const ids = idList();
|
|
5255
|
+
if ([args.length > 0, ids !== undefined].filter(Boolean).length !== 1 || args.length > 1)
|
|
5256
|
+
throw new UsageError('usage: sideby unattended pending reopen <id> | --ids <a,b> (`sideby unattended pending --all` lists the done ones too)');
|
|
5257
|
+
let reopened;
|
|
5258
|
+
try {
|
|
5259
|
+
// One id may be a start of it, as with `done`; it is whole when nothing else starts the same way.
|
|
5260
|
+
const one = args[0] && (await findPendingDecision(paths.stateDir, args[0]))?.id;
|
|
5261
|
+
reopened = await reopenPendingDecisions(paths.stateDir, ids ?? [one || args[0]]);
|
|
5262
|
+
}
|
|
5263
|
+
catch (err) {
|
|
5264
|
+
throw new UserError(err.message, { code: 'no-pending' });
|
|
5265
|
+
}
|
|
5266
|
+
const open = await left('reopened', reopened.map((d) => d.id));
|
|
5267
|
+
if (open === undefined)
|
|
5268
|
+
return 0;
|
|
5269
|
+
io.out(reopened.length
|
|
5270
|
+
? `${c.green('✓')} reopened ${reopened.length === 1 ? '1 decision' : `${reopened.length} decisions`}; ${open} open.`
|
|
5271
|
+
: `Nothing to reopen: ${ids && ids.length > 1 ? 'none of them is' : 'it is not'} marked done. ${open} open.`);
|
|
5272
|
+
return 0;
|
|
5273
|
+
}
|
|
5274
|
+
allow('all', 'project');
|
|
5164
5275
|
if (action !== undefined)
|
|
5165
|
-
throw new UsageError('usage: sideby unattended pending [--all] | pending done <id
|
|
5166
|
-
const
|
|
5276
|
+
throw new UsageError('usage: sideby unattended pending [--all] [--project <name>] | pending done <id> | --ids <a,b> | --all | --replied [--project <name>] | --project <name> | pending reopen <id> | --ids <a,b>');
|
|
5277
|
+
const o = await overview(a.flags.has('all'));
|
|
5278
|
+
const project = await projectOf(o);
|
|
5279
|
+
const rows = project === undefined ? o.rows : o.rows.filter((r) => r.project === project);
|
|
5280
|
+
const projects = project === undefined ? o.projects : o.projects.filter((p) => p.project === project);
|
|
5167
5281
|
if (asJson) {
|
|
5168
|
-
json(io, { pending });
|
|
5282
|
+
json(io, { pending: rows, projects });
|
|
5169
5283
|
return 0;
|
|
5170
5284
|
}
|
|
5171
|
-
if (!
|
|
5285
|
+
if (!rows.length) {
|
|
5172
5286
|
io.out('Nothing is waiting for you.');
|
|
5173
5287
|
return 0;
|
|
5174
5288
|
}
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5289
|
+
const counts = (g) => [
|
|
5290
|
+
g.open ? `${g.open} untouched` : '',
|
|
5291
|
+
g.replied ? `${g.replied} you wrote in afterwards` : '',
|
|
5292
|
+
g.done ? `${g.done} done` : '',
|
|
5293
|
+
]
|
|
5294
|
+
.filter(Boolean)
|
|
5295
|
+
.join(' · ');
|
|
5296
|
+
for (const g of uaGroupByProject(rows)) {
|
|
5297
|
+
io.out(`${c.bold(g.project ? g.name : 'Other (no folder)')} ${c.dim(counts(g))}`);
|
|
5298
|
+
// Within a Project: what nobody touched first, then what was replied to, then the done ones.
|
|
5299
|
+
const items = g.sessions.flatMap((s) => s.items);
|
|
5300
|
+
const rank = (r) => (r.state === 'open' ? 0 : r.state === 'replied' ? 1 : 2);
|
|
5301
|
+
for (const d of [...items].sort((x, y) => rank(x) - rank(y) || Date.parse(x.at) - Date.parse(y.at))) {
|
|
5302
|
+
const where = [
|
|
5303
|
+
d.account ?? d.family,
|
|
5304
|
+
d.kind === 'question' ? 'question' : d.kind === 'permission' ? 'needed your OK' : 'left undone',
|
|
5305
|
+
d.waited ? `no answer for ${d.waited} min` : '',
|
|
5306
|
+
d.agentType ? `subagent ${d.agentType}` : '',
|
|
5307
|
+
d.state === 'replied' && d.repliedAt
|
|
5308
|
+
? `you wrote in the session afterwards (${ago(d.repliedAt, now())})`
|
|
5309
|
+
: '',
|
|
5310
|
+
d.replyCheck === 'no-record' ? 'its session record is gone' : '',
|
|
5311
|
+
d.state === 'done' ? 'done' : '',
|
|
5312
|
+
]
|
|
5313
|
+
.filter(Boolean)
|
|
5314
|
+
.join(' · ');
|
|
5315
|
+
io.out(` ${c.bold(d.id)} ${clock2(d.at, now())} ${c.dim(where)}`);
|
|
5316
|
+
for (const line of d.text.split('\n'))
|
|
5317
|
+
io.out(` ${line}`);
|
|
5318
|
+
if (d.sessionId)
|
|
5319
|
+
io.out(c.dim(` session ${d.sessionId}${d.cwd ? ` in ${tildify(d.cwd, paths.home)}` : ''}`));
|
|
5320
|
+
}
|
|
5190
5321
|
}
|
|
5191
|
-
io.out(c.dim('Mark one done
|
|
5322
|
+
io.out(c.dim(`${rows.some((r) => r.state === 'replied') ? '"You wrote in the session afterwards" only says you typed there later, not that it was finished. ' : ''}Mark one done once you have checked it: \`sideby unattended pending done <id>\` (several: \`--ids <a,b>\`); \`reopen <id>\` puts back one marked by mistake.`));
|
|
5192
5323
|
return 0;
|
|
5193
5324
|
}
|
|
5194
5325
|
if (sub === 'defer') {
|
|
@@ -30,6 +30,33 @@ const PendingDecision = Type.Object({
|
|
|
30
30
|
})),
|
|
31
31
|
doneAt: Type.Optional(Type.String({ description: 'When it was marked done; ISO.' })),
|
|
32
32
|
});
|
|
33
|
+
/** One Pending Decision as `sideby unattended pending` lists it: with its Project, state and reply (ADR-0078). */
|
|
34
|
+
const PendingRow = Type.Intersect([
|
|
35
|
+
PendingDecision,
|
|
36
|
+
Type.Object({
|
|
37
|
+
project: Type.String({
|
|
38
|
+
description: 'The Project: the git repository of its folder (a worktree counts as its main repository; a folder that is gone counts as the repository of the nearest folder still there), else the folder itself; "" when it has no folder.',
|
|
39
|
+
}),
|
|
40
|
+
projectName: Type.String({
|
|
41
|
+
description: 'The Project\'s short name, as Session History shows it; "" when it has no folder.',
|
|
42
|
+
}),
|
|
43
|
+
state: Type.Union([Type.Literal('open'), Type.Literal('replied'), Type.Literal('done')], {
|
|
44
|
+
description: 'done: marked done; replied: not marked, and the user typed in its session after it was kept (that does not tell whether it was finished); open: not marked, and nothing typed after it.',
|
|
45
|
+
}),
|
|
46
|
+
repliedAt: Type.Optional(Type.String({ description: 'With `replied`: when the user first typed in the session after it; ISO.' })),
|
|
47
|
+
replyCheck: Type.Optional(Type.Union([Type.Literal('no-record'), Type.Literal('unsupported')], {
|
|
48
|
+
description: 'Why sideby could not tell whether the user typed in the session afterwards: its session record is gone, or sideby reads no session records of this Family. Only on an open one with a session id.',
|
|
49
|
+
})),
|
|
50
|
+
}),
|
|
51
|
+
]);
|
|
52
|
+
/** One Project's counts in `sideby unattended pending` (ADR-0078). */
|
|
53
|
+
const PendingProject = Type.Object({
|
|
54
|
+
project: Type.String({ description: 'The Project, as in each row; "" for those without a folder.' }),
|
|
55
|
+
projectName: Type.String({ description: 'Its short name; "" for those without a folder.' }),
|
|
56
|
+
open: Type.Integer({ description: 'Open ones nobody typed after.' }),
|
|
57
|
+
replied: Type.Integer({ description: 'Open ones the user typed in their session after.' }),
|
|
58
|
+
done: Type.Integer({ description: 'Done ones (only with --all).' }),
|
|
59
|
+
});
|
|
33
60
|
/** The menu bar shortcut (`sideby menubar hotkey`, spec §3.31). */
|
|
34
61
|
const hotkeyProps = {
|
|
35
62
|
keys: Type.String({
|
|
@@ -1514,11 +1541,21 @@ export const OUTPUT_SCHEMAS = {
|
|
|
1514
1541
|
}, { title: 'sideby unattended [on|off|schedule …|wait …] --json' }),
|
|
1515
1542
|
'unattended-pending': Type.Object({
|
|
1516
1543
|
schemaVersion: Version,
|
|
1517
|
-
pending: Type.Array(
|
|
1518
|
-
description:
|
|
1544
|
+
pending: Type.Array(PendingRow, {
|
|
1545
|
+
description: "Open Pending Decisions, oldest first; with --all the done ones too; with --project only that Project's.",
|
|
1546
|
+
}),
|
|
1547
|
+
projects: Type.Array(PendingProject, {
|
|
1548
|
+
description: 'Each Project with a listed one, as the Panel orders them: those with an open one first (the newest open one first), then the rest by their newest one, the one without a folder last.',
|
|
1519
1549
|
}),
|
|
1520
|
-
done: Type.Optional(Type.Array(Str, {
|
|
1521
|
-
|
|
1550
|
+
done: Type.Optional(Type.Array(Str, {
|
|
1551
|
+
description: '`pending done`: the ids this call marked done (not ones done already).',
|
|
1552
|
+
})),
|
|
1553
|
+
reopened: Type.Optional(Type.Array(Str, {
|
|
1554
|
+
description: '`pending reopen`: the ids this call opened again (not ones open already).',
|
|
1555
|
+
})),
|
|
1556
|
+
}, {
|
|
1557
|
+
title: 'sideby unattended pending [--project <name>] [done <id>|--ids|--all|--replied] [reopen <id>|--ids] --json',
|
|
1558
|
+
}),
|
|
1522
1559
|
'unattended-defer': Type.Object({ schemaVersion: Version, decision: PendingDecision }, { title: 'sideby unattended defer "<text>" --json' }),
|
|
1523
1560
|
progress: Type.Object({
|
|
1524
1561
|
schemaVersion: Version,
|
package/dist/src/cli/main.js
CHANGED
|
@@ -346,14 +346,16 @@ no country allowed; 2 malformed command line.`,
|
|
|
346
346
|
sideby unattended schedule [add --days <days> --from HH:MM --to HH:MM [--name <name>] [--at <n>]] [--json]
|
|
347
347
|
sideby unattended schedule remove <n> | preset weeknights [--json]
|
|
348
348
|
sideby unattended wait [<minutes>|off] [--json]
|
|
349
|
-
sideby unattended pending [--all] [--json]
|
|
350
|
-
sideby unattended pending done <id> | --all [--json]
|
|
349
|
+
sideby unattended pending [--all] [--project <name>] [--json]
|
|
350
|
+
sideby unattended pending done <id> | --ids <a,b> | --all | --replied [--project <name>] | --project <name> [--json]
|
|
351
|
+
sideby unattended pending reopen <id> | --ids <a,b> [--json]
|
|
351
352
|
sideby unattended defer "<text>" [--json]
|
|
352
353
|
|
|
353
354
|
Unattended Mode: nobody is at the computer, so sessions sideby starts never stop to wait for a person. While it is on,
|
|
354
355
|
a Claude or Codex session sideby started is not allowed to ask a question: the model takes the recommended option
|
|
355
|
-
where it can be undone, and skips anything hard to undo (deleting, sending, publishing, deploying, paying)
|
|
356
|
-
|
|
356
|
+
where it can be undone, and skips anything hard to undo (deleting, sending, publishing, deploying, paying) unless
|
|
357
|
+
your own rules or project docs give standing permission for that kind of action. Each question it could not ask, and
|
|
358
|
+
each thing it skipped (\`defer\`), is kept as a Pending Decision for when you are back.
|
|
357
359
|
In Claude sessions, a permission prompt Claude Code is about to show (a command it wants a person to confirm, also in
|
|
358
360
|
a subagent) is answered with "no" and how to do it without one, and kept as a Pending Decision too. A Claude turn
|
|
359
361
|
that failed for a passing reason (an overloaded server, a dropped connection, a rate limit that is not a used-up
|
|
@@ -376,6 +378,13 @@ written into the account folders). Codex runs the hooks once you trust both \`un
|
|
|
376
378
|
Grok, pi, desktop apps and sessions started without sideby are not covered. Pending Decisions stay on this computer;
|
|
377
379
|
\`pending done\` marks them done, and they are deleted 30 days later. \`defer\` keeps a line from inside a session ("deploy left for the user").
|
|
378
380
|
|
|
381
|
+
\`pending\` lists them by project (the repository of the folder the session worked in; a worktree counts as its
|
|
382
|
+
repository), untouched ones first. "You wrote in the session afterwards" means you typed in that session after it
|
|
383
|
+
was kept, read from the session's own record (Claude and Codex); it does not tell whether that finished it, so look
|
|
384
|
+
at each one before marking it done. \`done <id>\` or \`--ids <a,b>\` marks the ones you checked; \`--replied\` marks
|
|
385
|
+
every one you wrote in afterwards, \`--project <name>\` keeps to one project, and \`done --project <name>\` marks a
|
|
386
|
+
whole project. \`reopen\` puts back one marked done by mistake.
|
|
387
|
+
|
|
379
388
|
--days takes mon…sun, ranges and lists: mon-fri, sat,sun, fri-mon, weekdays, daily. Each change prints its undo.
|
|
380
389
|
|
|
381
390
|
Examples:
|
|
@@ -384,6 +393,8 @@ Examples:
|
|
|
384
393
|
sideby unattended schedule add --days sat,sun --from 01:00 --to 09:00 --name "Weekend nights"
|
|
385
394
|
sideby unattended wait 30
|
|
386
395
|
sideby unattended pending
|
|
396
|
+
sideby unattended pending --project shop
|
|
397
|
+
sideby unattended pending reopen <id>
|
|
387
398
|
sideby unattended defer "deleting the old branch is left for the user"
|
|
388
399
|
Exit: 0 shown or done; 1 no such Slot or Pending Decision; 2 a time or option it does not take (the message says
|
|
389
400
|
which to use).`,
|
|
@@ -529,8 +540,8 @@ const COMMANDS = {
|
|
|
529
540
|
next: { flags: ['dry-run', 'include-api', 'json', 'ignore-network', 'unattended'] },
|
|
530
541
|
network: { flags: ['json', 'yes'] },
|
|
531
542
|
unattended: {
|
|
532
|
-
flags: ['json', 'all', 'slot-end'],
|
|
533
|
-
valued: ['for', 'until', 'days', 'from', 'to', 'name', 'at'],
|
|
543
|
+
flags: ['json', 'all', 'slot-end', 'replied'],
|
|
544
|
+
valued: ['for', 'until', 'days', 'from', 'to', 'name', 'at', 'project', 'ids'],
|
|
534
545
|
},
|
|
535
546
|
progress: { flags: ['json'], valued: ['every'] },
|
|
536
547
|
trust: { flags: ['json', 'yes'], valued: ['dir'] },
|
|
@@ -586,7 +586,7 @@ export const CLI_COMMANDS = [
|
|
|
586
586
|
id: 'unattended',
|
|
587
587
|
group: 'health',
|
|
588
588
|
usage: 'sideby unattended [on|off]',
|
|
589
|
-
help: 'nobody is here: sessions sideby starts do not stop to ask; on takes --for 4h, --until 07:30 or --slot-end (schedule add|remove|preset weeknights, pending [done <id>|--all], defer "<text>"); run --unattended for one session',
|
|
589
|
+
help: 'nobody is here: sessions sideby starts do not stop to ask; on takes --for 4h, --until 07:30 or --slot-end (schedule add|remove|preset weeknights, pending [--project <name>] [done <id>|--ids|--all|--replied] [reopen <id>], defer "<text>"); run --unattended for one session',
|
|
590
590
|
summary: { en: 'Nobody is here: sessions do not stop to ask', zh: '无人值守:会话不停下来问你' },
|
|
591
591
|
example: 'sideby unattended on --until 07:30',
|
|
592
592
|
feature: 'page.unattended',
|
|
@@ -161,6 +161,22 @@ export type Config = Static<typeof ConfigSchema>;
|
|
|
161
161
|
export declare function handoffSettings(config: Config): HandoffSettings;
|
|
162
162
|
export declare class ConfigError extends UserError {
|
|
163
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* What `sideby list` and `sideby doctor` say about a key this sideby does not know (ADR-0080): why it is there and
|
|
166
|
+
* what to do. Never printed by `loadConfig`, which hooks and `--json` commands use too.
|
|
167
|
+
*/
|
|
168
|
+
export declare function unknownConfigKeyNote(key: string, version: string): string;
|
|
169
|
+
export interface ConfigRead {
|
|
170
|
+
config: Config;
|
|
171
|
+
/** Keys in the file this sideby does not know, as dot paths (`claude.someKey`); left out of `config`. */
|
|
172
|
+
unknownKeys: string[];
|
|
173
|
+
}
|
|
174
|
+
/** `loadConfig`, and also the keys in the file this sideby does not know. */
|
|
175
|
+
export declare function readConfig(file: string): Promise<ConfigRead>;
|
|
176
|
+
/**
|
|
177
|
+
* Reads the config file; a missing file is `{}`. Keys this sideby does not know are left out and not an error
|
|
178
|
+
* (`readConfig` lists them); a known key with a wrong value is. Prints nothing.
|
|
179
|
+
*/
|
|
164
180
|
export declare function loadConfig(file: string): Promise<Config>;
|
|
165
181
|
export type HandoffConfig = NonNullable<Config['handoff']>;
|
|
166
182
|
/**
|