sideby 0.32.2 → 0.33.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/assets/brand/sai-painted-1024.png +0 -0
- package/assets/brand/sai-painted-128.png +0 -0
- package/assets/brand/sai-painted-256.png +0 -0
- package/assets/brand/sai-painted-64.png +0 -0
- package/dist/build.json +1 -1
- package/dist/src/cli/commands.js +57 -14
- package/dist/src/cli/format.js +3 -1
- package/dist/src/cli/json-schemas.js +30 -5
- package/dist/src/cli/main.js +9 -4
- package/dist/src/core/brand-mark.d.ts +18 -115
- package/dist/src/core/brand-mark.js +43 -174
- package/dist/src/core/messages.d.ts +17 -5
- package/dist/src/core/messages.js +38 -15
- package/dist/src/core/quota-fetch.js +9 -2
- package/dist/src/desktop/icon.d.ts +13 -1
- package/dist/src/desktop/icon.js +153 -285
- package/dist/src/families/claude/deliver.js +9 -1
- package/dist/src/families/claude/messaging.d.ts +7 -1
- package/dist/src/families/claude/messaging.js +10 -2
- package/dist/src/families/codex/deliver.d.ts +10 -1
- package/dist/src/families/codex/deliver.js +24 -2
- package/dist/src/families/messaging.d.ts +6 -1
- package/dist/src/menubar/script.d.ts +5 -0
- package/dist/src/menubar/script.js +111 -25
- package/dist/src/menubar/snapshot.d.ts +25 -5
- package/dist/src/menubar/snapshot.js +114 -26
- package/dist/src/menubar/strings.d.ts +22 -6
- package/dist/src/menubar/strings.js +22 -6
- package/dist/src/panel/handler.d.ts +2 -2
- package/dist/src/panel/handler.js +8 -2
- package/dist/src/panel/i18n.d.ts +5 -0
- package/dist/src/panel/i18n.js +14 -4
- package/dist/src/panel/page-logic.d.ts +25 -4
- package/dist/src/panel/page-logic.js +122 -10
- package/dist/src/panel/page-script.js +39 -8
- package/dist/src/panel/page-styles.js +5 -5
- package/dist/src/panel/page.js +2 -2
- package/dist/src/panel/theme.d.ts +4 -1
- package/dist/src/runtime.d.ts +3 -1
- package/dist/src/runtime.js +1 -1
- package/package.json +2 -1
- package/schemas/menubar-snapshot.json +102 -2
- package/schemas/messages.json +6 -2
- package/schemas/send.json +6 -2
- package/skills/sideby/SKILL.md +1 -1
- package/skills/sideby/references/panel.md +1 -1
- package/skills/sideby/references/sessions.md +6 -3
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/build.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"20261031T154831-0045dd"}
|
package/dist/src/cli/commands.js
CHANGED
|
@@ -19,13 +19,15 @@ import { installHint, runHost } from '../core/launch.js';
|
|
|
19
19
|
import { loginAfterLine, loginBeforeLine } from '../core/login-check.js';
|
|
20
20
|
import { accountModel, setAccountModel } from '../core/model-choice.js';
|
|
21
21
|
import { resolvePaths, tildify } from '../core/paths.js';
|
|
22
|
+
import { quotaCheckOff } from '../core/quota-fetch.js';
|
|
22
23
|
import { takeoverLimits, USAGE_DAYS } from '../core/quota-levels.js';
|
|
24
|
+
import { quotaStoreFile, readQuotaStore } from '../core/quota-store.js';
|
|
23
25
|
import { groupsToUndo, remoteControlNothingToDo, remoteControlTodo, } from '../core/remote-control.js';
|
|
24
26
|
import { SEARCH_CATALOG, searchCatalog } from '../core/search-catalog.js';
|
|
25
27
|
import { SHELLS } from '../core/shell-init.js';
|
|
26
28
|
import { clockText, daysText } from '../core/unattended-state.js';
|
|
27
29
|
import { MODEL_NAME } from '../families/shared/model-args.js';
|
|
28
|
-
import { AI_TASK_KINDS, hiddenIn, inDisplayOrder, pinnedIn, suggestAlias, suggestName, withPinned, } from '../panel/page-logic.js';
|
|
30
|
+
import { AI_TASK_KINDS, hiddenIn, inDisplayOrder, pinnedIn, resetWhen, suggestAlias, suggestName, withPinned, } from '../panel/page-logic.js';
|
|
29
31
|
import { createRuntime, UnknownFamilyError } from '../runtime.js';
|
|
30
32
|
import { UsageError } from './args.js';
|
|
31
33
|
import { c, clock, compactNumber, quotaText, table, truncate, tuningLines, usageText } from './format.js';
|
|
@@ -576,7 +578,7 @@ async function runPick(rt, name, args, io, opts = {}) {
|
|
|
576
578
|
if (choice.ref === null) {
|
|
577
579
|
const now = rt.readContext().now;
|
|
578
580
|
const why = choice.earliestReset
|
|
579
|
-
? `every signed-in ${family} account has used up its quota; ${choice.earliestReset.ref} is back
|
|
581
|
+
? `every signed-in ${family} account has used up its quota; ${choice.earliestReset.ref} is back ${resetWhen(choice.earliestReset.at, now.getTime(), 'en')}`
|
|
580
582
|
: `no ${family} account can be used now`;
|
|
581
583
|
const signIn = choice.signIn.length
|
|
582
584
|
? `; sign in with \`sideby login ${choice.signIn.join('` or `sideby login ')}\``
|
|
@@ -650,10 +652,10 @@ export async function cmdNext(a, io) {
|
|
|
650
652
|
return includeApi ? 'API account, pay per use' : 'left out; add --include-api to use it';
|
|
651
653
|
if (low(e)) {
|
|
652
654
|
const over = `past its limit: ${closest(e)} (limits ${limits.short}% for 5-hour, ${limits.long}% for weekly windows)`;
|
|
653
|
-
return e.resetsAt ? `${over}
|
|
655
|
+
return e.resetsAt ? `${over}; resets ${resetWhen(e.resetsAt, now.getTime(), 'en')}` : over;
|
|
654
656
|
}
|
|
655
657
|
if (e.state === 'full')
|
|
656
|
-
return e.resetsAt ? `used up; back
|
|
658
|
+
return e.resetsAt ? `used up; back ${resetWhen(e.resetsAt, now.getTime(), 'en')}` : 'used up';
|
|
657
659
|
return `signed out; sign in with \`sideby login ${e.ref}\``;
|
|
658
660
|
};
|
|
659
661
|
const mark = { ready: c.green, unknown: c.yellow, api: c.cyan, full: c.red, 'logged-out': c.dim };
|
|
@@ -669,7 +671,7 @@ export async function cmdNext(a, io) {
|
|
|
669
671
|
const out = plan.accounts.filter((e) => e.state === 'logged-out').map((e) => `sideby login ${e.ref}`);
|
|
670
672
|
const apiLeft = !includeApi && plan.accounts.some((e) => e.state === 'api');
|
|
671
673
|
const why = plan.earliestReset
|
|
672
|
-
? `every signed-in ${family} account has used up its quota; ${plan.earliestReset.ref} is back
|
|
674
|
+
? `every signed-in ${family} account has used up its quota; ${plan.earliestReset.ref} is back ${resetWhen(plan.earliestReset.at, now.getTime(), 'en')}`
|
|
673
675
|
: `no ${family} account can be used now`;
|
|
674
676
|
const same = plan.accounts.filter((e) => e.sameLoginAs).map((e) => e.ref);
|
|
675
677
|
const sameNote = same.length ? `; ${same.join(', ')} share the quota of ${plan.from}` : '';
|
|
@@ -2649,8 +2651,12 @@ async function lastLocalUse(rt, list) {
|
|
|
2649
2651
|
const newest = Math.max(...times.filter(Number.isFinite));
|
|
2650
2652
|
return Number.isFinite(newest) ? new Date(newest).toISOString() : undefined;
|
|
2651
2653
|
}
|
|
2652
|
-
/**
|
|
2653
|
-
|
|
2654
|
+
/**
|
|
2655
|
+
* What the Menu Bar Item lists (spec §3.31): each Family's accounts in Display Order, with its Handoff ranking. `fetch`
|
|
2656
|
+
* `never` reads only the kept answers (the script's cache-only snapshots during a refresh). With `since` (when a manual
|
|
2657
|
+
* refresh started, ms), each account that refresh asks says whether its answer is still to come or failed.
|
|
2658
|
+
*/
|
|
2659
|
+
async function menubarFamilies(rt, o = {}) {
|
|
2654
2660
|
// Hidden Families and Accounts (spec §3.25) stay out of the menu and its percent; a Same Login is hidden whole.
|
|
2655
2661
|
const display = rt.displayOrder();
|
|
2656
2662
|
const every = displayOrdered(await rt.accounts(), rt);
|
|
@@ -2661,13 +2667,26 @@ async function menubarFamilies(rt) {
|
|
|
2661
2667
|
const ids = [...new Set(accounts.map((x) => x.family))];
|
|
2662
2668
|
return Promise.all(ids.map(async (id) => {
|
|
2663
2669
|
const f = rt.families.get(id);
|
|
2664
|
-
const plan = f.readQuota || f.fetchQuota ? await rt.handoff(id).catch(() => null) : null;
|
|
2670
|
+
const plan = f.readQuota || f.fetchQuota ? await rt.handoff(id, { fetch: o.fetch }).catch(() => null) : null;
|
|
2665
2671
|
const now = rt.readContext().now.getTime();
|
|
2672
|
+
// Whether the refresh asks this Family at all: the same rule as `refreshQuota` and `ownQuota`.
|
|
2673
|
+
const asks = o.since !== undefined && Boolean(f.fetchQuota) && !quotaCheckOff(f.id, rt.config, rt.env);
|
|
2666
2674
|
const list = await Promise.all(accounts
|
|
2667
2675
|
.filter((x) => x.family === id)
|
|
2668
2676
|
.map(async (x) => {
|
|
2669
|
-
const quota = await rt.quota(x);
|
|
2677
|
+
const quota = await rt.quota(x, { fetch: o.fetch });
|
|
2670
2678
|
const sameLogin = await rt.sameLogin(x);
|
|
2679
|
+
const login = x.kind === 'api' ? 'not-needed' : (await rt.status(x)).login;
|
|
2680
|
+
let refresh;
|
|
2681
|
+
if (asks && x.kind === 'subscription' && login !== 'logged-out') {
|
|
2682
|
+
const kept = await readQuotaStore(quotaStoreFile(rt.paths.stateDir, x.family, x.name));
|
|
2683
|
+
const attempted = kept ? Date.parse(kept.attemptedAt) : Number.NaN;
|
|
2684
|
+
// The refresh's own snapshot has nothing left waiting: an answer it could not keep counts as failed.
|
|
2685
|
+
if (!(attempted >= o.since))
|
|
2686
|
+
refresh = o.final ? 'failed' : 'waiting';
|
|
2687
|
+
else if (kept?.error)
|
|
2688
|
+
refresh = 'failed';
|
|
2689
|
+
}
|
|
2671
2690
|
// Usage is read only for a reading over an hour old, to tell whether this computer used the login since.
|
|
2672
2691
|
const old = quota.status === 'ok' && now - Date.parse(quota.observedAt) > 3600_000;
|
|
2673
2692
|
const lastUseAt = old
|
|
@@ -2677,9 +2696,10 @@ async function menubarFamilies(rt) {
|
|
|
2677
2696
|
ref: x.ref,
|
|
2678
2697
|
name: x.name,
|
|
2679
2698
|
kind: x.kind,
|
|
2680
|
-
login
|
|
2699
|
+
login,
|
|
2681
2700
|
quota,
|
|
2682
2701
|
sameLogin,
|
|
2702
|
+
...(refresh ? { refresh } : {}),
|
|
2683
2703
|
...(lastUseAt ? { lastUseAt } : {}),
|
|
2684
2704
|
};
|
|
2685
2705
|
}));
|
|
@@ -2703,10 +2723,15 @@ export async function cmdMenubar(a, io) {
|
|
|
2703
2723
|
if (action === 'snapshot') {
|
|
2704
2724
|
const reported = a.flags.get('hotkey');
|
|
2705
2725
|
const icon = a.flags.get('icon');
|
|
2726
|
+
const sinceFlag = a.flags.get('refreshing-since');
|
|
2727
|
+
const since = sinceFlag === undefined ? undefined : Date.parse(sinceFlag);
|
|
2728
|
+
const cached = a.flags.has('cached');
|
|
2706
2729
|
if (extra !== undefined ||
|
|
2730
|
+
(cached && a.flags.has('refresh')) ||
|
|
2731
|
+
(since !== undefined && (!cached || !Number.isFinite(since))) ||
|
|
2707
2732
|
(reported !== undefined && reported !== 'ok' && reported !== 'taken') ||
|
|
2708
2733
|
(icon !== undefined && icon !== 'visible' && icon !== 'hidden'))
|
|
2709
|
-
throw new UsageError('usage: sideby menubar snapshot [--refresh] [--lang en|zh] [--hotkey ok|taken [--hotkey-label <label>]] [--icon visible|hidden] [--json]');
|
|
2734
|
+
throw new UsageError('usage: sideby menubar snapshot [--refresh | --cached [--refreshing-since <ISO time>]] [--lang en|zh] [--hotkey ok|taken [--hotkey-label <label>]] [--icon visible|hidden] [--json]');
|
|
2710
2735
|
const { menubarHotkey, menubarLang, menubarSnapshot } = await import('../menubar/snapshot.js');
|
|
2711
2736
|
const rt = await createRuntime();
|
|
2712
2737
|
const hotkey = menubarHotkey(rt.config.menubar?.hotkey);
|
|
@@ -2732,9 +2757,15 @@ export async function cmdMenubar(a, io) {
|
|
|
2732
2757
|
}).catch(() => { });
|
|
2733
2758
|
}
|
|
2734
2759
|
const lang = menubarLang(rt.config.panel?.language, a.flags.get('lang') ?? rt.env.LANG);
|
|
2735
|
-
|
|
2760
|
+
// A refresh asks every account now; its own snapshot then marks the ones whose answer failed. A cache-only snapshot
|
|
2761
|
+
// (`--cached`, which the menu bar script runs every 2 s during a refresh) never asks a Host.
|
|
2762
|
+
let refreshedSince;
|
|
2763
|
+
if (a.flags.has('refresh')) {
|
|
2764
|
+
refreshedSince = Date.now();
|
|
2736
2765
|
await rt.refreshQuota();
|
|
2737
|
-
|
|
2766
|
+
}
|
|
2767
|
+
const families = await menubarFamilies(rt, cached ? { fetch: 'never', since } : { since: refreshedSince, final: true });
|
|
2768
|
+
const snap = menubarSnapshot(families, rt.readContext().now, lang, hotkey);
|
|
2738
2769
|
if (wantJson)
|
|
2739
2770
|
json(io, snap);
|
|
2740
2771
|
else {
|
|
@@ -3537,6 +3568,12 @@ export async function cmdSend(a, io) {
|
|
|
3537
3568
|
if (r.needsApproval)
|
|
3538
3569
|
io.out(` To receive messages without approving each one: ${c.bold('sideby messages inbound accept')}`);
|
|
3539
3570
|
}
|
|
3571
|
+
else if (r.status === 'unknown') {
|
|
3572
|
+
// Not copied: it may already be there, and a paste on top would deliver it twice (ADR-0065).
|
|
3573
|
+
io.out(`${c.yellow('●')} sideby could not confirm that ${c.bold(r.to)} got message ${r.id}`);
|
|
3574
|
+
// The note says why, and ends with the same advice.
|
|
3575
|
+
io.out(` ${r.note ?? UNCONFIRMED_ADVICE}`);
|
|
3576
|
+
}
|
|
3540
3577
|
else {
|
|
3541
3578
|
io.out(`${c.yellow('●')} kept message ${r.id} for ${c.bold(r.to)}; it needs a paste`);
|
|
3542
3579
|
if (r.note)
|
|
@@ -3552,7 +3589,9 @@ const MESSAGE_STATUS = {
|
|
|
3552
3589
|
delivered: 'delivered',
|
|
3553
3590
|
read: 'read',
|
|
3554
3591
|
'paste-needed': 'needs paste',
|
|
3592
|
+
unknown: 'Not confirmed',
|
|
3555
3593
|
};
|
|
3594
|
+
const UNCONFIRMED_ADVICE = 'It may still show up: look at that session before you send it again.';
|
|
3556
3595
|
/**
|
|
3557
3596
|
* `sideby messages [--to <account|session>] [--limit <n>]`: the Messages sideby kept and how far each got;
|
|
3558
3597
|
* `sideby messages inbound [accept|undo] [--yes]`: whether Claude sessions show them at once.
|
|
@@ -3586,7 +3625,7 @@ export async function cmdMessages(a, io, runtime) {
|
|
|
3586
3625
|
const rows = list.map((m) => [
|
|
3587
3626
|
clock(m.sentAt, now),
|
|
3588
3627
|
c.bold(m.to),
|
|
3589
|
-
m.status === 'paste-needed'
|
|
3628
|
+
m.status === 'paste-needed' || m.status === 'unknown'
|
|
3590
3629
|
? c.yellow(MESSAGE_STATUS[m.status])
|
|
3591
3630
|
: m.needsApproval
|
|
3592
3631
|
? c.yellow('waits for approval')
|
|
@@ -3603,6 +3642,10 @@ export async function cmdMessages(a, io, runtime) {
|
|
|
3603
3642
|
io.out(`${c.yellow('Paste this line into')} ${c.bold(m.to)}${m.note ? c.dim(` (${m.note})`) : ''}:`);
|
|
3604
3643
|
io.out(` ${m.pasteText}`);
|
|
3605
3644
|
}
|
|
3645
|
+
if (list.some((m) => m.status === 'unknown')) {
|
|
3646
|
+
io.out('');
|
|
3647
|
+
io.out(`${c.yellow('Some messages are not confirmed:')} sideby could not tell if they arrived. ${UNCONFIRMED_ADVICE}`);
|
|
3648
|
+
}
|
|
3606
3649
|
if (list.some((m) => m.needsApproval)) {
|
|
3607
3650
|
io.out('');
|
|
3608
3651
|
io.out(`${c.yellow('Some messages wait for approval')} in the target's terminal and are dropped after about 5 minutes. To receive them directly: ${c.bold('sideby messages inbound accept')}`);
|
package/dist/src/cli/format.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { windowLevel } from '../core/quota-levels.js';
|
|
2
2
|
import { MIN_CALLS } from '../core/tuning.js';
|
|
3
|
+
import { resetWhen } from '../panel/page-logic.js';
|
|
3
4
|
const useColor = () => !process.env.NO_COLOR && Boolean(process.stdout.isTTY);
|
|
4
5
|
const paint = (code) => (s) => (useColor() ? `\x1b[${code}m${s}\x1b[0m` : s);
|
|
5
6
|
export const c = {
|
|
@@ -91,7 +92,8 @@ function windowText(w, now) {
|
|
|
91
92
|
// Each window by its own levels: a weekly window warns at 85% and turns red at 95% (spec §3.26).
|
|
92
93
|
const level = windowLevel({ ...w, usedPercent: pct });
|
|
93
94
|
const color = level === 'fail' ? c.red : level === 'warn' ? c.yellow : c.green;
|
|
94
|
-
|
|
95
|
+
// The same words as the menu bar and the Panel (spec §3.31): a countdown under a day, then tomorrow, a weekday, a date.
|
|
96
|
+
return `${label} ${color(`${pct}%`)} ${c.dim(`resets ${resetWhen(w.resetsAt, now.getTime(), 'en')}`)}`;
|
|
95
97
|
}
|
|
96
98
|
export const QUOTA_REASON = {
|
|
97
99
|
'not-enabled': 'off',
|
|
@@ -400,9 +400,24 @@ const Overview = Type.Object({
|
|
|
400
400
|
});
|
|
401
401
|
const MenubarLevel = Type.Union(['ok', 'warn', 'fail', 'none'].map((k) => Type.Literal(k)));
|
|
402
402
|
const MenubarBar = Type.Union([
|
|
403
|
-
Type.Object({
|
|
403
|
+
Type.Object({
|
|
404
|
+
label: Str,
|
|
405
|
+
percent: Type.Number(),
|
|
406
|
+
level: MenubarLevel,
|
|
407
|
+
passed: Type.Optional(Type.Literal(true, {
|
|
408
|
+
description: 'The window is past its reset time and no newer reading has come: drawn grey with `–`, its level `none`.',
|
|
409
|
+
})),
|
|
410
|
+
}),
|
|
404
411
|
Type.Null(),
|
|
405
412
|
]);
|
|
413
|
+
const ResetParts = {
|
|
414
|
+
resetLabel: Type.String({
|
|
415
|
+
description: 'The window of `reset` as the column headers name it (`5h`, `7d`); empty when the cell names none.',
|
|
416
|
+
}),
|
|
417
|
+
resetTime: Type.String({
|
|
418
|
+
description: 'When it resets (`in 4h 20m`, `tomorrow 4:59 PM`, `Wed 4:59 PM`, `Nov 11, 4:59 PM`), or what the cell says instead: every window is past its reset, refreshing, or refresh failed.',
|
|
419
|
+
}),
|
|
420
|
+
};
|
|
406
421
|
const MenubarRow = Type.Object({
|
|
407
422
|
ref: Str,
|
|
408
423
|
label: Str,
|
|
@@ -422,6 +437,7 @@ const MenubarRow = Type.Object({
|
|
|
422
437
|
label: Str,
|
|
423
438
|
bars: Type.Union([Type.Tuple([MenubarBar, MenubarBar]), Type.Null()]),
|
|
424
439
|
reset: Str,
|
|
440
|
+
...ResetParts,
|
|
425
441
|
tip: Str,
|
|
426
442
|
})),
|
|
427
443
|
Type.Null(),
|
|
@@ -429,8 +445,15 @@ const MenubarRow = Type.Object({
|
|
|
429
445
|
description: "A Host whose every limit covers one model group: a line per group under the account, each with its own bars; the account's `bars` are then null.",
|
|
430
446
|
}),
|
|
431
447
|
reset: Type.String({
|
|
432
|
-
description: 'Which window resets and
|
|
448
|
+
description: 'Which window resets and when, such as `7d · tomorrow 4:59 PM`: the window closest to its own red level (85% for 5 hours, 95% for longer windows); `resetLabel` and `resetTime` joined. Empty when nothing is used.',
|
|
433
449
|
}),
|
|
450
|
+
...ResetParts,
|
|
451
|
+
refreshing: Type.Optional(Type.Literal(true, {
|
|
452
|
+
description: 'A manual refresh is asking the Host for this account and has no answer yet (`--refreshing-since`).',
|
|
453
|
+
})),
|
|
454
|
+
refreshFailed: Type.Optional(Type.Literal(true, {
|
|
455
|
+
description: 'This refresh asked the Host for this account and the answer failed.',
|
|
456
|
+
})),
|
|
434
457
|
note: Type.String({
|
|
435
458
|
description: 'A no-quota explanation, or an old-reading warning beside the bars.',
|
|
436
459
|
}),
|
|
@@ -443,13 +466,15 @@ const MessageReceipt = Type.Object({
|
|
|
443
466
|
toSessionId: Str,
|
|
444
467
|
toAccount: Type.String({ description: 'The account ref that holds the target session.' }),
|
|
445
468
|
from: Type.Optional(Type.String({ description: 'The Session Label of the session that sent it, when sideby could tell.' })),
|
|
446
|
-
status: Type.Union(['stored', 'delivered', 'read', 'paste-needed'].map((k) => Type.Literal(k)), {
|
|
447
|
-
description: "stored: kept as a file only; delivered: the host's own channel took it; read: it shows in the target's record; paste-needed: the user pastes pasteText into the target.",
|
|
469
|
+
status: Type.Union(['stored', 'delivered', 'read', 'paste-needed', 'unknown'].map((k) => Type.Literal(k)), {
|
|
470
|
+
description: "stored: kept as a file only; delivered: the host's own channel took it; read: it shows in the target's record; paste-needed: the user pastes pasteText into the target; unknown: the channel was given it but never confirmed it (ADR-0065), so it may still arrive: check the target before sending or pasting again. unknown becomes read when the id shows in the target's record and never changes by itself otherwise.",
|
|
448
471
|
}),
|
|
449
472
|
file: Type.String({ description: "The Message file (mode 600) in sideby's state folder." }),
|
|
450
473
|
attachments: Type.Array(Str, { description: 'Screenshots copied next to the Message file.' }),
|
|
451
474
|
pasteText: Type.String({ description: 'One line that tells the target AI to read the Message file.' }),
|
|
452
|
-
note: Type.Optional(Type.String({
|
|
475
|
+
note: Type.Optional(Type.String({
|
|
476
|
+
description: 'Why a paste is needed, that the target must approve it (bypass mode), or why the delivery could not be confirmed.',
|
|
477
|
+
})),
|
|
453
478
|
needsApproval: Type.Optional(Type.Boolean({
|
|
454
479
|
description: 'true while a delivered Message waits for the user to approve it in the target terminal (ADR-0045); dropped once it is read, and after 6 minutes unread the status becomes paste-needed.',
|
|
455
480
|
})),
|
package/dist/src/cli/main.js
CHANGED
|
@@ -178,19 +178,21 @@ yet: sideby copies one line to the clipboard ("Read the message sideby kept for
|
|
|
178
178
|
tab to paste it into. A Claude session in bypass permission mode holds the message until you approve it in its
|
|
179
179
|
terminal (about 5 minutes); \`sideby messages inbound accept\` makes it show them at once.
|
|
180
180
|
Screenshots: PNG, JPEG, GIF or WebP, up to 20 MB each. Run it inside a session and the message names that session as
|
|
181
|
-
the sender
|
|
181
|
+
the sender and ends with a Reply line the other AI can answer with. "Not confirmed" means sideby handed it over but
|
|
182
|
+
could not tell whether it arrived: look at that session before you send it again. --lang chooses the language of the line to paste (default: your locale).
|
|
182
183
|
|
|
183
184
|
Examples:
|
|
184
185
|
sideby send cc002 "the tests pass now, go ahead and release"
|
|
185
186
|
sideby send 61230c3d "this is the error I see" --image ~/Desktop/shot.png
|
|
186
187
|
sideby send codex:team "read the plan in docs/plan.md" --json
|
|
187
|
-
Exit: 0 delivered or kept for pasting; 1 no such running session, several to choose from, or a screenshot sideby
|
|
188
|
+
Exit: 0 delivered, not confirmed, or kept for pasting; 1 no such running session, several to choose from, or a screenshot sideby
|
|
188
189
|
refuses; 2 malformed command line.`,
|
|
189
190
|
messages: `sideby messages [--to <account|session>] [--limit <n>] [--json]
|
|
190
191
|
sideby messages inbound [accept|undo] [--yes] [--json]
|
|
191
192
|
|
|
192
193
|
List the messages you sent with \`sideby send\`, newest first: to which session, and how far each got (delivered,
|
|
193
|
-
read once it shows in the target's record, or
|
|
194
|
+
read once it shows in the target's record, needs paste, or Not confirmed: it may still show up, so check the session
|
|
195
|
+
before you send it again).
|
|
194
196
|
|
|
195
197
|
inbound shows, for each Claude account, its crossSessionInbound setting: accept shows a message from another session
|
|
196
198
|
at once; hold, or no setting in a session in bypass permission mode, waits for you to approve it and drops it after
|
|
@@ -437,7 +439,10 @@ const COMMANDS = {
|
|
|
437
439
|
key: { flags: ['json'], valued: ['var'] },
|
|
438
440
|
try: { flags: ['json', 'yes'], valued: ['model'] },
|
|
439
441
|
autostart: { flags: ['json', 'yes', 'refresh'] },
|
|
440
|
-
menubar: {
|
|
442
|
+
menubar: {
|
|
443
|
+
flags: ['json', 'yes', 'refresh', 'cached'],
|
|
444
|
+
valued: ['lang', 'hotkey', 'hotkey-label', 'icon', 'refreshing-since'],
|
|
445
|
+
},
|
|
441
446
|
config: { flags: ['json', 'yes'] },
|
|
442
447
|
theme: { flags: ['json', 'yes', 'undo'], valued: ['id', 'out'] },
|
|
443
448
|
list: { flags: ['json', 'all'] },
|
|
@@ -1,119 +1,22 @@
|
|
|
1
|
-
/**
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
cx: number;
|
|
16
|
-
cy: number;
|
|
17
|
-
rx: number;
|
|
18
|
-
ry: number;
|
|
19
|
-
fill: 'ink' | 'light';
|
|
20
|
-
}
|
|
21
|
-
/** The body both buddies share, back to front: feet, arms, body; then the eyes. No forehead `>`: that belongs to Nika. */
|
|
22
|
-
export declare const BUDDY: {
|
|
23
|
-
paths: readonly BuddyPath[];
|
|
24
|
-
eyes: readonly BuddyDot[];
|
|
25
|
-
};
|
|
26
|
-
/** What one buddy wears and how it smiles: `behind` the body, its `mouth`, and `above` the face. */
|
|
27
|
-
export interface BuddyProps {
|
|
28
|
-
behind: readonly BuddyPath[];
|
|
29
|
-
mouth: BuddyPath;
|
|
30
|
-
above: readonly BuddyPath[];
|
|
31
|
-
}
|
|
32
|
-
/** Sai (blue): a red cape behind the shoulders, a gold crown with a red jewel, a small smile. */
|
|
33
|
-
export declare const SAI: BuddyProps;
|
|
34
|
-
/** Bai (amber): a green spare battery on its back, a bent antenna with a ball, an open laugh. */
|
|
35
|
-
export declare const BAI: BuddyProps;
|
|
36
|
-
/** The eye highlights sit towards where the buddy looks: `1` right, `-1` left. */
|
|
37
|
-
export declare function highlights(look: 1 | -1): BuddyDot[];
|
|
38
|
-
export interface BuddyColors {
|
|
39
|
-
body: string;
|
|
40
|
-
shade: string;
|
|
41
|
-
}
|
|
42
|
-
export declare const MARK_COLORS: {
|
|
43
|
-
readonly blue: {
|
|
44
|
-
readonly body: '#3f8fc4';
|
|
45
|
-
readonly shade: '#29658e';
|
|
46
|
-
};
|
|
47
|
-
readonly amber: {
|
|
48
|
-
readonly body: '#f2b35e';
|
|
49
|
-
readonly shade: '#c98a35';
|
|
50
|
-
};
|
|
51
|
-
readonly ink: '#1e2a44';
|
|
52
|
-
readonly light: '#f6f0e5';
|
|
53
|
-
};
|
|
54
|
-
export interface PlacedBuddy {
|
|
55
|
-
colors: BuddyColors;
|
|
56
|
-
props: BuddyProps;
|
|
57
|
-
/** Where the buddy looks (and which way its eye highlights sit). */
|
|
58
|
-
look: 1 | -1;
|
|
59
|
-
/** Mirror the props left to right, so what is worn on the back stays behind a buddy that turns the other way. */
|
|
60
|
-
mirror?: boolean;
|
|
61
|
-
/** 64-unit grid → mark units: translate by (x, y), then scale. */
|
|
62
|
-
x: number;
|
|
63
|
-
y: number;
|
|
64
|
-
scale: number;
|
|
65
|
-
}
|
|
66
|
-
/** The two buddies in mark units, back first. The blue one in front is the one a Portal's `logoColor` recolours. */
|
|
67
|
-
export declare const MARK: {
|
|
68
|
-
line: number;
|
|
69
|
-
placedLine: number;
|
|
70
|
-
back: PlacedBuddy;
|
|
71
|
-
front: PlacedBuddy;
|
|
72
|
-
};
|
|
73
|
-
/** The square the pair is drawn in, in mark units (the Panel's 40 px tile and the app icon tile). */
|
|
74
|
-
export declare const MARK_VIEWBOX: {
|
|
75
|
-
readonly x: -2.5;
|
|
76
|
-
readonly y: 3;
|
|
77
|
-
readonly size: 69;
|
|
78
|
-
};
|
|
79
|
-
/** Path data mirrored on the 64-unit grid (x → 64 − x); absolute M, L, H, Q, C, Z only. */
|
|
80
|
-
export declare function mirrorPath(d: string): string;
|
|
81
|
-
/** One shape of a placed buddy with its colours resolved; `fill` undefined inherits the surrounding fill. */
|
|
82
|
-
export interface BuddyShape {
|
|
83
|
-
d: string;
|
|
84
|
-
fill: string | undefined;
|
|
85
|
-
stroke: string;
|
|
86
|
-
width?: number;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* One buddy's shapes, back to front: the props behind, the body, the mouth, the eyes, the props above.
|
|
90
|
-
* `bodyFill`: `undefined` keeps the buddy's body colour, `null` leaves the body unfilled so it inherits.
|
|
91
|
-
*/
|
|
92
|
-
export declare function buddyShapes(b: PlacedBuddy, bodyFill?: string | null): {
|
|
93
|
-
paths: BuddyShape[];
|
|
94
|
-
above: BuddyShape[];
|
|
95
|
-
dots: BuddyDot[];
|
|
96
|
-
};
|
|
97
|
-
/** One placed buddy as SVG, drawn inside a group that sets the ink outline (`MARK_OUTLINE`). */
|
|
98
|
-
export declare function buddySvg(b: PlacedBuddy, line: number, bodyFill?: string | null): string;
|
|
99
|
-
export declare const MARK_OUTLINE: string;
|
|
100
|
-
/**
|
|
101
|
-
* The mark as SVG children (no outer <svg>). With `front` omitted the blue buddy's body has no fill of its own, so it
|
|
102
|
-
* takes the surrounding `fill` (the Panel's `--logo-fg`, which Portals set with `logoColor`); everything else is fixed.
|
|
103
|
-
*/
|
|
104
|
-
export declare function markSvgBody(front?: string): string;
|
|
105
|
-
/** The Panel's header logo: the mark sized for its 40 px tile. */
|
|
106
|
-
export declare const MARK_SVG: string;
|
|
107
|
-
/** `<basePath>/icon.svg`: the whole mark on a transparent square, for a Portal's tab or menu (ADR-0006 amendment). */
|
|
1
|
+
/** The sizes painted, in pixels; `assets/brand/sai-painted-<size>.png`. */
|
|
2
|
+
export declare const MARK_SIZES: readonly [64, 128, 256, 1024];
|
|
3
|
+
export type MarkSize = (typeof MARK_SIZES)[number];
|
|
4
|
+
/** The painting at `size` as PNG bytes, from `assets/brand/` (two levels above src/, three above dist/src/). */
|
|
5
|
+
export declare function markPng(size: MarkSize): Buffer;
|
|
6
|
+
/** The painting at `size` as a `data:` URI. */
|
|
7
|
+
export declare const markDataUri: (size: MarkSize) => string;
|
|
8
|
+
/** The light tile behind the mark: the Panel's `--logo-bg` default and the app icon's tile. */
|
|
9
|
+
export declare const MARK_TILE = "#e5f2fb";
|
|
10
|
+
/** How much of its tile the painting fills on each side: 3 of 40 px in the Panel header. */
|
|
11
|
+
export declare const MARK_INSET: number;
|
|
12
|
+
/** The Panel's header logo: the painting for its 40 px tile (sharp at 3x). The page's CSP allows `data:` images. */
|
|
13
|
+
export declare const MARK_IMG: string;
|
|
14
|
+
/** `<basePath>/icon.svg`: the mark on a transparent square, for a Portal's tab or menu (ADR-0006 amendment). */
|
|
108
15
|
export declare const ICON_SVG: string;
|
|
109
|
-
/**
|
|
110
|
-
* `<basePath>/favicon.svg`: the small cut for sizes below about 24 px, for a 16 pt browser tab (ADR-0022): Sai alone
|
|
111
|
-
* on a 32 grid at half scale, his body, eyes, cape and crown; no feet, arms or mouth. The same cut as the tab icons
|
|
112
|
-
* of the brand design sheet.
|
|
113
|
-
*/
|
|
16
|
+
/** `<basePath>/favicon.svg`: the same painting at the size a 16 to 32 px browser tab needs. */
|
|
114
17
|
export declare const FAVICON_SVG: string;
|
|
115
18
|
/**
|
|
116
|
-
* The Menu Bar Item's icon (spec §3.31)
|
|
117
|
-
* in light and dark mode
|
|
19
|
+
* The Menu Bar Item's icon (spec §3.31) and its card's, as base64 PNG: Sai in colour, drawn at 18 pt and 30 pt. It
|
|
20
|
+
* keeps its colours in light and dark mode; the painting's dark outline keeps it visible on both.
|
|
118
21
|
*/
|
|
119
|
-
export declare const
|
|
22
|
+
export declare const MENUBAR_ICON_PNG: string;
|