sideby 0.17.0 → 0.18.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.
Files changed (95) hide show
  1. package/README.md +3 -1
  2. package/ai-tasks.json +90 -0
  3. package/dist/build.json +1 -1
  4. package/dist/src/cli/commands.d.ts +9 -1
  5. package/dist/src/cli/commands.js +349 -14
  6. package/dist/src/cli/json-schemas.js +157 -18
  7. package/dist/src/cli/main.js +56 -7
  8. package/dist/src/core/after-install.d.ts +54 -0
  9. package/dist/src/core/after-install.js +78 -0
  10. package/dist/src/core/ask.d.ts +73 -1
  11. package/dist/src/core/ask.js +106 -6
  12. package/dist/src/core/autostart.d.ts +38 -8
  13. package/dist/src/core/autostart.js +85 -39
  14. package/dist/src/core/brand-mark.d.ts +49 -11
  15. package/dist/src/core/brand-mark.js +116 -38
  16. package/dist/src/core/config.d.ts +5 -0
  17. package/dist/src/core/config.js +11 -1
  18. package/dist/src/core/desktop-app.d.ts +1 -1
  19. package/dist/src/core/desktop-app.js +2 -2
  20. package/dist/src/core/edit-settings.d.ts +24 -0
  21. package/dist/src/core/edit-settings.js +97 -0
  22. package/dist/src/core/handoff-brief.d.ts +4 -2
  23. package/dist/src/core/handoff-brief.js +6 -1
  24. package/dist/src/core/handoff-chain.d.ts +24 -0
  25. package/dist/src/core/handoff-chain.js +2 -0
  26. package/dist/src/core/handoff-run.d.ts +4 -3
  27. package/dist/src/core/handoff-run.js +14 -9
  28. package/dist/src/core/launch.d.ts +2 -0
  29. package/dist/src/core/launch.js +14 -10
  30. package/dist/src/core/local-build.d.ts +12 -5
  31. package/dist/src/core/local-build.js +49 -31
  32. package/dist/src/core/lock.d.ts +30 -0
  33. package/dist/src/core/lock.js +143 -0
  34. package/dist/src/core/quota-levels.d.ts +6 -1
  35. package/dist/src/core/quota-levels.js +16 -5
  36. package/dist/src/core/task-spec.d.ts +95 -0
  37. package/dist/src/core/task-spec.js +209 -0
  38. package/dist/src/core/terminal.js +6 -1
  39. package/dist/src/core/update.d.ts +27 -16
  40. package/dist/src/core/update.js +67 -93
  41. package/dist/src/desktop/icon.js +12 -15
  42. package/dist/src/families/claude/ai-task.d.ts +8 -0
  43. package/dist/src/families/claude/ai-task.js +38 -0
  44. package/dist/src/families/claude/handoff-hook.js +4 -4
  45. package/dist/src/families/claude/index.js +3 -0
  46. package/dist/src/families/codex/handoff-hook.js +4 -4
  47. package/dist/src/families/codex/index.js +9 -0
  48. package/dist/src/families/grok/handoff-hook.js +4 -4
  49. package/dist/src/families/grok/index.js +1 -0
  50. package/dist/src/families/pi/index.js +1 -0
  51. package/dist/src/handoff/hook.js +51 -30
  52. package/dist/src/handoff/levels.d.ts +24 -0
  53. package/dist/src/handoff/levels.js +70 -0
  54. package/dist/src/handoff/messages.d.ts +6 -3
  55. package/dist/src/handoff/messages.js +20 -7
  56. package/dist/src/handoff/reader.d.ts +6 -3
  57. package/dist/src/menubar/agent.d.ts +3 -0
  58. package/dist/src/menubar/agent.js +21 -0
  59. package/dist/src/menubar/script.d.ts +8 -0
  60. package/dist/src/menubar/script.js +457 -0
  61. package/dist/src/menubar/snapshot.d.ts +115 -0
  62. package/dist/src/menubar/snapshot.js +255 -0
  63. package/dist/src/menubar/strings.d.ts +87 -0
  64. package/dist/src/menubar/strings.js +88 -0
  65. package/dist/src/panel/background.js +12 -19
  66. package/dist/src/panel/handler.d.ts +12 -0
  67. package/dist/src/panel/handler.js +80 -80
  68. package/dist/src/panel/i18n.d.ts +33 -0
  69. package/dist/src/panel/i18n.js +66 -0
  70. package/dist/src/panel/page-logic.d.ts +105 -0
  71. package/dist/src/panel/page-logic.js +170 -15
  72. package/dist/src/panel/page-script.js +238 -109
  73. package/dist/src/panel/page-styles.js +42 -13
  74. package/dist/src/panel/page.d.ts +7 -0
  75. package/dist/src/panel/page.js +5 -0
  76. package/dist/src/runtime.d.ts +9 -1
  77. package/dist/src/runtime.js +11 -3
  78. package/dist/src/types.d.ts +14 -0
  79. package/package.json +4 -3
  80. package/schemas/ask-choices.json +168 -0
  81. package/schemas/ask-print.json +87 -0
  82. package/schemas/config.json +17 -1
  83. package/schemas/edit.json +119 -0
  84. package/schemas/error.json +4 -0
  85. package/schemas/families.json +4 -0
  86. package/schemas/list.json +4 -0
  87. package/schemas/local.json +1 -1
  88. package/schemas/menubar-snapshot.json +646 -0
  89. package/schemas/menubar-start.json +112 -0
  90. package/schemas/menubar.json +165 -0
  91. package/skills/sideby/SKILL.md +6 -2
  92. package/skills/sideby/references/ai-tasks.md +10 -0
  93. package/skills/sideby/references/handoff.md +3 -1
  94. package/skills/sideby/references/panel.md +6 -0
  95. package/skills/sideby/references/update.md +1 -1
@@ -125,7 +125,7 @@ code, .mono { font-family: var(--mono); font-size: 0.92em; }
125
125
 
126
126
  /* Toolbar */
127
127
  .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
128
- .search { position: relative; flex: 1 1 240px; min-width: 0; display: block; }
128
+ .search { position: relative; flex: 1 1 160px; min-width: 120px; display: block; }
129
129
  .search-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
130
130
  .search .search-input { padding-left: 34px; padding-right: 34px; height: var(--ctl-h); }
131
131
  .kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 11px/16px var(--mono); color: var(--faint); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; pointer-events: none; }
@@ -236,6 +236,7 @@ code, .mono { font-family: var(--mono); font-size: 0.92em; }
236
236
  /* The arrow at a row's start opens and closes its details; so does a click anywhere else in the row. */
237
237
  .row-toggle { width: 28px; height: 28px; margin: -4px -6px -4px -8px; }
238
238
  .fold-hit { cursor: pointer; }
239
+ .fold-hit .row-detail { cursor: auto; }
239
240
  .fold-hit:hover .row-toggle { background: var(--hover); color: var(--text); }
240
241
  .row-toggle[aria-expanded=true] .chev { transform: rotate(90deg); }
241
242
  .row-toggle[aria-expanded=true]:not(:hover) { background: transparent; color: var(--muted); }
@@ -286,6 +287,9 @@ code, .mono { font-family: var(--mono); font-size: 0.92em; }
286
287
  .plan { text-transform: capitalize; }
287
288
  .row > .quota { grid-area: quota; }
288
289
  .row > .last { grid-area: last; }
290
+ .ident-meta { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
291
+ .ident-meta > :first-child { min-width: 0; }
292
+ .last-inline { display: none; }
289
293
  .row > .row-end { grid-area: more; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
290
294
  .row-run { width: 28px; height: 28px; color: var(--muted); }
291
295
  .row-run .ic { width: 15px; height: 15px; }
@@ -305,14 +309,15 @@ code, .mono { font-family: var(--mono); font-size: 0.92em; }
305
309
  .row-notes { grid-area: notes; display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
306
310
 
307
311
  /* Quota meters: percent and countdown over a bar colored by level (ok, warn at 60%, fail at 85% used). */
308
- .quota { display: grid; grid-template-columns: repeat(var(--qn), minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 4px; min-width: 0; }
312
+ .quota { display: grid; grid-template-columns: repeat(var(--qr, var(--qn)), minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 4px; min-width: 0; }
309
313
  .row > .quota { grid-template-columns: repeat(var(--qn), var(--q-w)); }
310
314
  .meter { min-width: 0; }
311
- .m-top { display: flex; align-items: baseline; gap: 6px; font-size: 12px; line-height: 1.35; white-space: nowrap; min-width: 0; }
315
+ /* The countdown never ends in an ellipsis: where the line is too short it wraps to a line of its own, at the right. */
316
+ .m-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: 12px; line-height: 1.35; white-space: nowrap; min-width: 0; }
312
317
  .m-label { color: var(--muted); font-weight: var(--strong-weight); }
313
318
  .m-pct { font-weight: var(--strong-weight); font-size: 13px; font-variant-numeric: tabular-nums; }
314
319
  .m-unit { color: var(--faint); font-weight: 400; font-size: 11.5px; }
315
- .m-reset { margin-left: auto; color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
320
+ .m-reset { margin-left: auto; color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
316
321
  .m-passed { color: var(--muted); }
317
322
  .m-none { color: var(--faint); }
318
323
  .bar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; margin-top: 5px; }
@@ -704,25 +709,36 @@ select:is(:hover, :focus) { --chevron: var(--text); }
704
709
  .checkup { margin-top: 8px; }
705
710
  .foot { margin-top: 28px; text-align: center; }
706
711
 
707
- @media (max-width: 1100px) {
712
+ /* The narrow-screen layouts hang on the root's data-width (page-logic.ts widthTier: up to 1100px medium, 760 narrow,
713
+ 560 phone) rather than on media queries, so the page script can change them once a sliding width settles, inside a
714
+ View Transition. :where() keeps each rule's specificity what it was inside a media query. */
715
+ :where(:root[data-width=medium], :root[data-width=narrow], :root[data-width=phone]) {
708
716
  .col-head { display: none; }
709
717
  .app-row { flex-wrap: wrap; }
710
718
  .app-actions { width: 100%; justify-content: flex-start; }
711
- .row { grid-template-columns: minmax(0, 1fr) auto var(--m-w); grid-template-areas: "id last more" "quota quota quota" "detail detail detail" "notes notes notes"; row-gap: 10px; }
719
+ /* No column titles here, so the last use sits right after the name and email, on the email's line, and the
720
+ menu stays on the name's line; the quota windows share the full width below. */
721
+ .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id more" "quota quota" "detail detail" "notes notes"; row-gap: 8px; }
712
722
  .row-detail { margin-left: 0; }
713
723
 
714
- .row > .quota { grid-template-columns: repeat(var(--qn), minmax(0, 1fr)); max-width: 560px; }
724
+ .row > .quota { grid-template-columns: repeat(var(--qr, var(--qn)), minmax(0, 1fr)); }
715
725
  .rows .m-label, .rows .m-unit, .rows .u-unit { display: inline; }
716
726
  .rows .usage { justify-content: flex-start; }
717
- .row > .last { justify-self: end; }
727
+ .row > .last { display: none; }
728
+ .last-inline { display: flex; flex: none; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; margin-top: 1px; }
729
+ .last-inline::before { content: "·"; color: var(--faint); }
730
+ .row > .row-end { align-self: start; margin-top: -2px; }
718
731
  }
719
- @media (max-width: 760px) {
732
+ :where(:root[data-width=narrow], :root[data-width=phone]) {
733
+ /* The toolbar stays one line: "New account" keeps its icon, its name moves to the tooltip and the label. */
734
+ .toolbar > .btn-primary { width: var(--ctl-h); padding: 0; justify-content: center; }
735
+ .toolbar > .btn-primary > span { display: none; }
720
736
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
721
737
  .stat:nth-child(3) { border-left: 0; }
722
738
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
723
739
  }
724
- @media (max-width: 560px) {
725
- :root { --gutter: 14px; }
740
+ :root[data-width=phone] { --gutter: 14px; }
741
+ :where(:root[data-width=phone]) {
726
742
  .top-in { padding: 16px var(--gutter) 0; }
727
743
  .header-bar .top-in { min-height: 0; padding: 12px var(--gutter); }
728
744
  .update-btn span { display: none; }
@@ -739,8 +755,13 @@ select:is(:hover, :focus) { --chevron: var(--text); }
739
755
  .search { flex-basis: 100%; }
740
756
  .tools { width: 100%; }
741
757
  .tools .tb-select { flex: 1 1 140px; min-width: 0; }
742
- .toolbar > .btn-primary { flex: 1; }
743
- .row { padding: 10px 12px; }
758
+ .toolbar > .btn-primary { flex: 1; width: auto; padding: 0 14px; }
759
+ .toolbar > .btn-primary > span { display: inline; }
760
+ /* A phone keeps the last use as a column of its own: the line under the name has no room for it. */
761
+ .row { padding: 10px 12px; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "id last more" "quota quota quota" "detail detail detail" "notes notes notes"; }
762
+ .row > .last { display: block; justify-self: end; }
763
+ .last-inline { display: none; }
764
+ .row > .row-end { align-self: center; margin-top: 0; }
744
765
  #accounts { --col-gap: 14px; }
745
766
  /* One window per line, so the reset time is never cut off. */
746
767
  .row > .quota { grid-template-columns: 1fr; row-gap: 10px; max-width: none; }
@@ -756,6 +777,14 @@ select:is(:hover, :focus) { --chevron: var(--text); }
756
777
  .panel { padding: 14px; }
757
778
  .dlg-head { padding: 14px 14px 2px; } .dlg-body { padding: 10px 14px 14px; } .dlg-foot { padding: 10px 14px; }
758
779
  }
780
+ /* A change of layout band runs as a short View Transition (page-script.ts followWidth): each block below moves and
781
+ resizes to its new place while its old and new look cross-fade; the rest of the page cross-fades as one. Same
782
+ length and ease as a Portal's sliding sidebar (.26s, quick start, soft landing), so both read as one move. */
783
+ ::view-transition-group(*) { animation-duration: .26s; animation-timing-function: cubic-bezier(.32, .72, 0, 1); }
784
+ /* Old and new looks keep their own size (pinned top left) instead of stretching to the moving box, so text never
785
+ grows or shrinks on the way. */
786
+ ::view-transition-old(*), ::view-transition-new(*) { animation-duration: .26s; height: 100%; object-fit: none; object-position: left top; }
787
+ .vt-width :is(.top-in, .summary, .stat, .section-head, .toolbar, .group-list, .group-head, .row) { view-transition-name: match-element; }
759
788
  @media (prefers-reduced-motion: reduce) {
760
789
  .sk, .spin, .is-spinning svg, .toast, .toast.bump, .view-in > *, .row.flash, .card.flash, .pulse { animation: none; }
761
790
  .bar > span, .chev, .row { transition: none; }
@@ -21,6 +21,13 @@ export interface PageOptions {
21
21
  lang?: 'auto' | 'en' | 'zh';
22
22
  /** createPanelHandler's `updates`: false hides everything about sideby updates. */
23
23
  updates?: boolean;
24
+ /**
25
+ * createPanelHandler's `ask`: with the bridge, inside a frame, AI Task entries post to the Portal and the page script
26
+ * hides the header button; opened on its own, the Panel keeps both.
27
+ */
28
+ ask?: {
29
+ bridge: 'postMessage';
30
+ };
24
31
  /** Config `panel` (spec §3.29): the theme and language saved for the Panel. */
25
32
  panel?: {
26
33
  theme?: string;
@@ -7,6 +7,7 @@ import { ALIAS_NAME, RESERVED_ALIASES } from '../core/config.js';
7
7
  import { QUOTA_FAIL_PERCENT, QUOTA_WARN_PERCENT, USAGE_DAYS } from '../core/quota-levels.js';
8
8
  import { SKILL_INSTALL } from '../core/skill-check.js';
9
9
  import { MESSAGES } from './i18n.js';
10
+ import { widthTier } from './page-logic.js';
10
11
  import { PAGE_SCRIPT } from './page-script.js';
11
12
  import { pageStyles } from './page-styles.js';
12
13
  import { resolveTheme } from './theme.js';
@@ -25,6 +26,8 @@ export function jsonForScript(value) {
25
26
  function attr(value) {
26
27
  return value.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;');
27
28
  }
29
+ // The layout band (page-logic.ts widthTier) is set in the head, so the first paint already has the narrow-screen
30
+ // layout; the page script then follows the width as it changes.
28
31
  const SKELETON_ROW = `<div class="sk-row"><span class="sk sk-badge"></span><span class="sk sk-title"></span><span class="sk sk-bar"></span><span class="sk sk-bar"></span></div>`;
29
32
  const SKELETON_STAT = `<div class="stat"><span class="sk sk-stat w70"></span></div>`;
30
33
  export function renderPage(opts) {
@@ -40,6 +43,7 @@ export function renderPage(opts) {
40
43
  local: opts.local ?? null,
41
44
  readOnly: Boolean(opts.readOnly),
42
45
  updates: opts.updates !== false,
46
+ ask: opts.ask ?? null,
43
47
  colorScheme: theme.colorScheme,
44
48
  lang,
45
49
  panel: opts.panel ?? {},
@@ -62,6 +66,7 @@ export function renderPage(opts) {
62
66
  <title>sideby</title>
63
67
  <link rel="icon" type="image/svg+xml" href="${attr(opts.basePath)}/favicon.svg?v=${FAVICON_VERSION}">
64
68
  <style${nonce}>${pageStyles(theme)}</style>
69
+ <script${nonce}>document.documentElement.dataset.width = (${widthTier})(window.innerWidth)</script>
65
70
  </head>
66
71
  <body${theme.header === 'bar' ? ' class="header-bar"' : ''}>
67
72
  <header class="top">
@@ -68,6 +68,8 @@ export interface FamilyInfo {
68
68
  plugin: string;
69
69
  /** The Family can estimate a Compaction Threshold (spec §3.18). */
70
70
  tuning: boolean;
71
+ /** The Host's settings file that `sideby edit` opens (spec §3.30), relative to the account directory. */
72
+ settingsFile?: string;
71
73
  }
72
74
  /** One Shared Item as `sideby families` reports it (spec §3.16). */
73
75
  export interface SharedItemInfo {
@@ -202,7 +204,13 @@ export interface Runtime {
202
204
  shellInitScript(shell: Shell): Promise<string>;
203
205
  /** Rewrites the configured `shellInitFile` of each shell (all configured ones by default). */
204
206
  writeShellInitFiles(shells?: readonly Shell[]): Promise<ShellInitWrite[]>;
205
- prepareLaunch(ref: string, userArgs: readonly string[], command: 'run' | 'login'): Promise<PreparedLaunch>;
207
+ /**
208
+ * `opts.aiTask`: the Launch is an AI Task's (spec §3.28), so the Family's `aiTaskArgs` removes every permission
209
+ * bypass from it (ADR-0031). `sideby run` never sets it.
210
+ */
211
+ prepareLaunch(ref: string, userArgs: readonly string[], command: 'run' | 'login', opts?: {
212
+ aiTask?: boolean;
213
+ }): Promise<PreparedLaunch>;
206
214
  /**
207
215
  * The Host and arguments `prepareLaunch` starts from, without reading the Secret File or running `launch.before`
208
216
  * hooks: what a preview may show before the user agrees to start anything.
@@ -4,6 +4,7 @@ import { addConfigAlias, aliasAccount, aliasArgs, aliasProblem, aliasRefs, editC
4
4
  import { createAccount } from './core/create.js';
5
5
  import { bindDesktopDeps, checkAppData } from './core/desktop-app.js';
6
6
  import { applyFixes, runDoctor } from './core/doctor.js';
7
+ import { hostSettingsFile } from './core/edit-settings.js';
7
8
  import { UserError } from './core/errors.js';
8
9
  import { planHandoff } from './core/handoff.js';
9
10
  import { handoffFindings } from './core/handoff-doctor.js';
@@ -271,6 +272,7 @@ export async function createRuntime(opts = {}) {
271
272
  ...(broken ? { brokenBin: broken } : {}),
272
273
  plugin: loaded.familyOwner.get(f.id) ?? 'unknown',
273
274
  tuning: Boolean(f.readTuning),
275
+ ...(hostSettingsFile(f) ? { settingsFile: hostSettingsFile(f) } : {}),
274
276
  };
275
277
  }));
276
278
  },
@@ -369,7 +371,7 @@ export async function createRuntime(opts = {}) {
369
371
  // of that Family keeps its skill warning.
370
372
  skillVersion: packageVersion(),
371
373
  // Desktop App data folders sideby made for an Account (spec §3.20).
372
- extraChecks: (a) => checkAppData(loaded.plugins, paths.home, a),
374
+ extraChecks: (a) => checkAppData(loaded.plugins, paths.home, a, Boolean(o.force)),
373
375
  };
374
376
  // Auto Handoff warnings (spec §3.17) join the general Findings; they never fail Doctor.
375
377
  const all = await accounts();
@@ -507,10 +509,16 @@ export async function createRuntime(opts = {}) {
507
509
  }
508
510
  return out;
509
511
  },
510
- async prepareLaunch(ref, userArgs, command) {
512
+ async prepareLaunch(ref, userArgs, command, opts = {}) {
511
513
  const all = await accounts();
512
514
  const inputs = launchInputs(ref, all, userArgs, command);
513
- return prepareLaunch({ ...inputs, label: launchLabel(ref, inputs.account, all), baseEnv: env, bus });
515
+ return prepareLaunch({
516
+ ...inputs,
517
+ ...(opts.aiTask ? { aiTask: true } : {}),
518
+ label: launchLabel(ref, inputs.account, all),
519
+ baseEnv: env,
520
+ bus,
521
+ });
514
522
  },
515
523
  async launchCommand(ref, userArgs, command) {
516
524
  const inputs = launchInputs(ref, await accounts(), userArgs, command);
@@ -80,7 +80,21 @@ export interface FamilyDef {
80
80
  * it read the images from the paths the prompt lists. Public contract, additive only.
81
81
  */
82
82
  imageArg?: string;
83
+ /**
84
+ * Makes a Launch safe for an AI Task (spec §3.28 "权限检查", ADR-0031): given every argument the Host would get
85
+ * (Family defaults, the Account's config arguments, the task's own), returns them without any argument that
86
+ * switches the Host's permission checks off, and may add the Host's own safe mode. Keep the other arguments in
87
+ * order, and return the same list when nothing needs to change. Only AI Tasks use it; `sideby run` never does.
88
+ * Public contract, additive only: a Family without it starts AI Tasks with the arguments unchanged.
89
+ */
90
+ aiTaskArgs?(args: readonly string[]): string[];
83
91
  sharedItems: SharedItemDef[];
92
+ /**
93
+ * The Host's own settings file, relative to the account directory (`settings.json`), which `sideby edit` opens in
94
+ * the user's editor (spec §3.30, ADR-0033). sideby never reads or writes it for this. Public contract, additive
95
+ * only: a Family without it offers no such file.
96
+ */
97
+ settingsFile?: string;
84
98
  /** Arguments for the Host's sign-in command, or null when sign-in happens inside the Host. */
85
99
  login: {
86
100
  args: string[] | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sideby",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "Run work, personal and API-key accounts at the same time, without their configs drifting apart.",
5
5
  "license": "MIT",
6
6
  "author": "Adonis0123 (https://github.com/Adonis0123)",
@@ -49,6 +49,7 @@
49
49
  "dist",
50
50
  "schemas",
51
51
  "skills",
52
+ "ai-tasks.json",
52
53
  "README.md",
53
54
  "README.zh-CN.md",
54
55
  "LICENSE"
@@ -75,10 +76,10 @@
75
76
  "devDependencies": {
76
77
  "@biomejs/biome": "2.5.15",
77
78
  "@types/node": "^22.18.0",
78
- "motion": "13.4.3",
79
+ "motion": "14.3.0",
79
80
  "typescript": "^7.0.2"
80
81
  },
81
82
  "packageManager": "pnpm@10.15.0",
82
83
  "readmeFilename": "README.md",
83
- "readme": "<p align=\"center\">\n <img alt=\"sideby: work, personal and API-key accounts, one terminal each, one shared config\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/banner.jpg\" width=\"880\">\n</p>\n\n<p align=\"center\">\n <b>Run work, personal and API-key accounts at the same time, without their configs drifting apart.</b><br>\n Each account is its own directory and its own terminal. Skills, hooks and settings stay linked to your main account. Claude Code, Codex, Grok Build and pi.\n</p>\n\n<p align=\"center\">\n <a href=\"https://www.npmjs.com/package/sideby\"><img alt=\"npm\" src=\"https://img.shields.io/npm/v/sideby\"></a>\n <a href=\"https://github.com/Adonis0123/sideby/actions/workflows/ci.yml\"><img alt=\"CI\" src=\"https://github.com/Adonis0123/sideby/actions/workflows/ci.yml/badge.svg\"></a>\n <img alt=\"Node 22.18+\" src=\"https://img.shields.io/badge/node-%E2%89%A522.18-339933\">\n <a href=\"LICENSE\"><img alt=\"MIT\" src=\"https://img.shields.io/badge/license-MIT-blue\"></a>\n</p>\n\n<p align=\"center\">English | <a href=\"README.zh-CN.md\">中文</a></p>\n\n## Quick start\n\nRequires Node 22.18+ and at least one Host CLI (Claude Code, Codex, Grok Build or pi) installed. AI agents: follow the setup steps in [`llms.txt`](llms.txt) (\"Set up sideby for a user\") instead.\n\n```sh\nnpm i -g sideby\nsideby new claude work # create ~/.claude-work, sharing ~/.claude's skills and hooks\nsideby login claude:work # sign in once\nsideby run work # Claude Code on the work account\nsideby quota setup claude --yes # Claude quota in the panel; undo: sideby quota teardown claude\nsideby ui --background # every account's quota at http://127.0.0.1:17420, still there after you close the terminal\n```\n\n`sideby app install` adds a Dock icon that opens the panel, and `sideby autostart on` has it ready each time you log in. `sideby update` installs a newer sideby when there is one; sideby says so after a command and in the panel. `sideby run claude:main` keeps using `~/.claude` in another terminal at the same time. Arguments after `--` go to the Host: `sideby run work -- --resume`. To try it without installing, run `npx sideby`.\n\n## Set up with your AI agent\n\nPaste this into Claude Code, Codex or any coding agent:\n\n```text\nInstall the sideby CLI (npm package `sideby`) and its agent skill, then set up a second Claude Code account for me.\nFollow \"Set up sideby for a user\" in https://raw.githubusercontent.com/Adonis0123/sideby/main/llms.txt\n```\n\nThe agent checks Node and your Host CLIs, installs sideby and the skill, creates the account, tells you what it shares with your main one and makes its short command work. You sign in once in your browser; the agent gives you that one command. Once the skill is installed, short requests work too: \"add another Claude account, cc008\", \"what do my Codex accounts share?\", \"which account still has quota?\".\n\n## What it looks like\n\nThe 25-second story: one account buried in tasks, then accounts side by side sharing one setup, and a task moving on when one runs out.\n\nhttps://github.com/user-attachments/assets/fd6138ae-499d-4055-b94f-25ef9ce74035\n\n<img alt=\"Two terminals: the personal account and the work account running at the same time, both linked to the main account's skills and settings, then the local quota panel, and at 95% Auto Handoff moving work's session to the next account\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/demo.gif\" width=\"1280\">\n\n<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel-dark.png\">\n <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel.png\">\n <img alt=\"sideby panel: every account's 5h and 7d quota, 7-day token usage and health in one page\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel.png\" width=\"1280\">\n</picture>\n\n## Why not just an alias?\n\n`CLAUDE_CONFIG_DIR` plus a shell alias already starts a second account. It does not keep skills and settings in one place, and it does not show quota for every account. [Does this break a provider's terms?](docs/guide/faq.md#terms)\n\n| | At the same time | Skills, hooks, settings | Quota and usage | Setup |\n|---|---|---|---|---|\n| `CLAUDE_CONFIG_DIR` and an alias | Yes. Each terminal exports the variable. | Each directory is its own copy. They drift unless you symlink by hand. | That session's status line | One alias per account |\n| [cc-switch](https://github.com/farion1231/cc-switch) | Enabling a provider writes the host's live config, so open sessions share that switch. | Plugin settings are copied across providers as a separate step. | The active provider, from its quota endpoint | Install the desktop app |\n| sideby | Yes. `sideby run` selects the directory for that process and leaves your shell alone. | Linked to the main account. `sideby doctor --fix` repairs copies. Sign-in and sessions stay separate. | Every account, from local files. Claude needs `quota setup`. | `npm i -g sideby`, then `sideby new` and sign in |\n\ncc-switch's docs describe that switch: it writes the live settings file ([README](https://github.com/farion1231/cc-switch#readme)). [#1105](https://github.com/farion1231/cc-switch/issues/1105) and [#2908](https://github.com/farion1231/cc-switch/issues/2908) ask for several sessions at once. [#1106](https://github.com/farion1231/cc-switch/issues/1106) is closed; the maintainer says Claude Code's \"open terminal\" can start one provider without changing the global config.\n\n## What else it does\n\n| You want to | Run | Guide |\n|---|---|---|\n| Hand a task to your own AI from the panel: set up an account, fix a problem, support a new tool | **Let AI do it** in the panel, or `sideby ask` | [Let AI do it](docs/guide/panel.md#let-ai-do-it) |\n| Have the panel ready in the background whenever you log in | **Settings › Startup** in the panel, or `sideby autostart on` | [Start at login](docs/guide/usage.md#start-at-login) |\n| Add an API key account (DeepSeek, a gateway, …) | `sideby new claude deepseek --api` | [API accounts](docs/guide/usage.md#api-accounts) |\n| Find and fix config drift between accounts | `sideby doctor --fix` | [Doctor](docs/guide/usage.md#doctor) |\n| See Claude quota (Codex needs no setup) | `sideby quota setup claude --yes` | [Claude quota](docs/guide/usage.md#claude-quota) |\n| Find the cheapest auto-compact size from your own sessions, and use it in one click | `sideby tune` (or the panel's Context tuning tab) | [Context tuning](docs/guide/usage.md#context-tuning) |\n| See each account's model and effort, and set them per account | `sideby model <account>` (or click the model in the panel) | [Model and effort](docs/guide/usage.md#model-and-effort) |\n| Choose whether Claude sessions connect to claude.ai by themselves (Remote Control), for every account at once | `sideby remote-control off` or `on` (or the panel's Settings) | [Remote Control](docs/guide/usage.md#remote-control) |\n| Pin the accounts you use most and put tools and accounts in your own order | `sideby pin claude:work`, `sideby order` (or the panel's Settings) | [Your own order](docs/guide/usage.md#your-own-order) |\n| Move on when an account hits its limit | `sideby next claude` | [Handoff](docs/guide/usage.md#when-an-account-hits-its-limit) |\n| Let a running task move to the next account by itself when quota runs low (off by default; see the risk) | `sideby handoff enable` (or the panel) | [Auto Handoff](docs/guide/usage.md#auto-handoff) |\n| Short commands such as `ccw` | `sideby alias add ccw claude:work` | [Shell functions](docs/guide/configuration.md#shell-functions) |\n| Reopen a session from Orca and the like in the account that holds it | `\"resumeRouting\": true` in config | [Resuming from other tools](docs/guide/configuration.md#resuming-from-other-tools) |\n| Open Claude Desktop or the Codex app as one account, several side by side (macOS) | `sideby desktop claude:work` (or the panel) | [Desktop apps](docs/guide/usage.md#desktop-apps) |\n| Keep several Grok Bot windows open, each signed in to its own account (macOS) | `sideby desktop grok-bot:002` (or the panel) | [Grok Bot windows](docs/guide/usage.md#grok-bot-windows) |\n| Open the panel from the Dock or app menu | `sideby app install` | [Panel app](docs/guide/panel.md#panel-app) |\n| Show the panel inside your own local page | `createPanelHandler()` | [Embed the panel](docs/guide/panel.md#embed-the-panel) |\n| Add a Host or a pre-launch check | a local plugin | [Plugins](docs/guide/plugins.md) |\n\n## Supported hosts\n\n| Host | Account directories | Sign-in | Quota | Usage (7 days) |\n|---|---|---|---|---|\n| Claude Code | `~/.claude`, `~/.claude-<name>` | `claude auth login` | ✓ after `quota setup claude` | ✓ |\n| Codex CLI | `~/.codex`, `~/.codex-<name>` | `codex login` | ✓ | ✓ |\n| Grok Build | `~/.grok`, `~/.grok-<name>` | `grok login` | weekly, asked from the `grok` CLI | no public source |\n| pi | `~/.pi/agent`, `~/.pi-<name>/agent` | `/login` inside pi | no public source | no public source |\n\nsideby starts the official binary on your `PATH` and never patches it. Tested versions and per-Host notes are in the [guide](docs/guide/usage.md#host-notes).\n\n## Platforms\n\nmacOS and Linux. CI runs the suite on `ubuntu-latest` and `macos-latest`, Node 22 and 24. **Windows is untested.** `sideby app` only installs a launcher on macOS and Linux. Linked items are symlinks, `sideby shell-init` prints bash and zsh functions, and the Claude quota wrapper runs `/bin/sh`.\n\n## Roadmap\n\n**Gemini CLI.** Gemini can point at another config directory with `GEMINI_CONFIG_DIR`. Older docs use `GEMINI_CLI_HOME`; current builds treat that name as deprecated, and exit on startup if it is set together with an exact directory override. A sideby family still needs a tested Gemini version, a login check that does not read tokens, and a list of which files to link or copy. That is more than a small patch, so it is not in this version.\n\n## Safe by design\n\n- It never edits a Host's global config to switch accounts. It moves a task to another account only when you turn on Auto Handoff, and never proxies requests or pools logins.\n- It never reads, prints or sends a credential value. Nothing about your accounts leaves your machine: the only request sideby makes on its own is a daily check of the npm registry for its newest version (off with `NO_UPDATE_NOTIFIER=1`; see [Updates](docs/guide/configuration.md#updates)).\n- `doctor --fix` never replaces a real file and never changes where a link points.\n\nDetails and the terms-of-service question are in the [FAQ](docs/guide/faq.md).\n\nUsage questions and ideas go in [Discussions](https://github.com/Adonis0123/sideby/discussions).\n\n## Docs\n\n- [Using sideby](docs/guide/usage.md): accounts, API accounts, Doctor, quota, Handoff, Host notes\n- [Commands](docs/guide/commands.md): every command, exit codes and `--json`\n- [Configuration](docs/guide/configuration.md): `config.json`, aliases, shell functions\n- [Panel](docs/guide/panel.md): the panel, panel app and embedding\n- [Plugins](docs/guide/plugins.md): write your own Family or launch hook\n- [FAQ](docs/guide/faq.md): terms of service, data locations, alternatives, uninstall\n- [Changelog](https://github.com/Adonis0123/sideby/releases)\n\n## For AI agents\n\n- [`llms.txt`](llms.txt): setup steps, commands, JSON contract and plugin API in one index. `sideby families --json` states what each Host's accounts share.\n- [`skills/sideby/SKILL.md`](skills/sideby/SKILL.md): one Agent Skill for seeing, repairing and creating accounts and for moving on when one hits its limit. Install with `npx skills add Adonis0123/sideby -g`; `sideby doctor` warns when the installed copy is for another sideby version.\n- [`AGENTS.md`](AGENTS.md): rules for agents working on this repository.\n\n## License\n\n[MIT](LICENSE)\n"
84
+ "readme": "<p align=\"center\">\n <img alt=\"sideby: work, personal and API-key accounts, one terminal each, one shared config\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/banner.jpg\" width=\"880\">\n</p>\n\n<p align=\"center\">\n <b>Run work, personal and API-key accounts at the same time, without their configs drifting apart.</b><br>\n Each account is its own directory and its own terminal. Skills, hooks and settings stay linked to your main account. Claude Code, Codex, Grok Build and pi.\n</p>\n\n<p align=\"center\">\n <a href=\"https://www.npmjs.com/package/sideby\"><img alt=\"npm\" src=\"https://img.shields.io/npm/v/sideby\"></a>\n <a href=\"https://github.com/Adonis0123/sideby/actions/workflows/ci.yml\"><img alt=\"CI\" src=\"https://github.com/Adonis0123/sideby/actions/workflows/ci.yml/badge.svg\"></a>\n <img alt=\"Node 22.18+\" src=\"https://img.shields.io/badge/node-%E2%89%A522.18-339933\">\n <a href=\"LICENSE\"><img alt=\"MIT\" src=\"https://img.shields.io/badge/license-MIT-blue\"></a>\n</p>\n\n<p align=\"center\">English | <a href=\"README.zh-CN.md\">中文</a></p>\n\n## Quick start\n\nRequires Node 22.18+ and at least one Host CLI (Claude Code, Codex, Grok Build or pi) installed. AI agents: follow the setup steps in [`llms.txt`](llms.txt) (\"Set up sideby for a user\") instead.\n\n```sh\nnpm i -g sideby\nsideby new claude work # create ~/.claude-work, sharing ~/.claude's skills and hooks\nsideby login claude:work # sign in once\nsideby run work # Claude Code on the work account\nsideby quota setup claude --yes # Claude quota in the panel; undo: sideby quota teardown claude\nsideby ui --background # every account's quota at http://127.0.0.1:17420, still there after you close the terminal\n```\n\n`sideby app install` adds a Dock icon that opens the panel, and `sideby autostart on` has it ready each time you log in. `sideby update` installs a newer sideby when there is one; sideby says so after a command and in the panel. `sideby run claude:main` keeps using `~/.claude` in another terminal at the same time. Arguments after `--` go to the Host: `sideby run work -- --resume`. To try it without installing, run `npx sideby`.\n\n## Set up with your AI agent\n\nPaste this into Claude Code, Codex or any coding agent:\n\n```text\nInstall the sideby CLI (npm package `sideby`) and its agent skill, then set up a second Claude Code account for me.\nFollow \"Set up sideby for a user\" in https://raw.githubusercontent.com/Adonis0123/sideby/main/llms.txt\n```\n\nThe agent checks Node and your Host CLIs, installs sideby and the skill, creates the account, tells you what it shares with your main one and makes its short command work. You sign in once in your browser; the agent gives you that one command. Once the skill is installed, short requests work too: \"add another Claude account, cc008\", \"what do my Codex accounts share?\", \"which account still has quota?\".\n\n## What it looks like\n\nThe 25-second story: one account buried in tasks, then accounts side by side sharing one setup, and a task moving on when one runs out.\n\nhttps://github.com/user-attachments/assets/d1d7e8dd-1df1-4881-ac88-e468c2dd4a1d\n\n<img alt=\"Two terminals: the personal account and the work account running at the same time, both linked to the main account's skills and settings, then the local quota panel, and at 95% Auto Handoff moving work's session to the next account\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/demo.gif\" width=\"1280\">\n\n<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel-dark.png\">\n <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel.png\">\n <img alt=\"sideby panel: every account's 5h and 7d quota, 7-day token usage and health in one page\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel.png\" width=\"1280\">\n</picture>\n\n## Why not just an alias?\n\n`CLAUDE_CONFIG_DIR` plus a shell alias already starts a second account. It does not keep skills and settings in one place, and it does not show quota for every account. [Does this break a provider's terms?](docs/guide/faq.md#terms)\n\n| | At the same time | Skills, hooks, settings | Quota and usage | Setup |\n|---|---|---|---|---|\n| `CLAUDE_CONFIG_DIR` and an alias | Yes. Each terminal exports the variable. | Each directory is its own copy. They drift unless you symlink by hand. | That session's status line | One alias per account |\n| [cc-switch](https://github.com/farion1231/cc-switch) | Enabling a provider writes the host's live config, so open sessions share that switch. | Plugin settings are copied across providers as a separate step. | The active provider, from its quota endpoint | Install the desktop app |\n| sideby | Yes. `sideby run` selects the directory for that process and leaves your shell alone. | Linked to the main account. `sideby doctor --fix` repairs copies. Sign-in and sessions stay separate. | Every account, from local files. Claude needs `quota setup`. | `npm i -g sideby`, then `sideby new` and sign in |\n\ncc-switch's docs describe that switch: it writes the live settings file ([README](https://github.com/farion1231/cc-switch#readme)). [#1105](https://github.com/farion1231/cc-switch/issues/1105) and [#2908](https://github.com/farion1231/cc-switch/issues/2908) ask for several sessions at once. [#1106](https://github.com/farion1231/cc-switch/issues/1106) is closed; the maintainer says Claude Code's \"open terminal\" can start one provider without changing the global config.\n\n## What else it does\n\n| You want to | Run | Guide |\n|---|---|---|\n| Hand a task to your own AI from the panel: set up an account, fix a problem, support a new tool | **Let AI do it** in the panel, or `sideby ask` | [Let AI do it](docs/guide/panel.md#let-ai-do-it) |\n| See quota at a glance in the macOS menu bar | **Settings › Startup** in the panel, or `sideby menubar on` | [Quota in the menu bar](docs/guide/usage.md#quota-in-the-menu-bar) |\n| Have the panel ready in the background whenever you log in | **Settings › Startup** in the panel, or `sideby autostart on` | [Start at login](docs/guide/usage.md#start-at-login) |\n| Add an API key account (DeepSeek, a gateway, …) | `sideby new claude deepseek --api` | [API accounts](docs/guide/usage.md#api-accounts) |\n| Find and fix config drift between accounts | `sideby doctor --fix` | [Doctor](docs/guide/usage.md#doctor) |\n| See Claude quota (Codex needs no setup) | `sideby quota setup claude --yes` | [Claude quota](docs/guide/usage.md#claude-quota) |\n| Find the cheapest auto-compact size from your own sessions, and use it in one click | `sideby tune` (or the panel's Context tuning tab) | [Context tuning](docs/guide/usage.md#context-tuning) |\n| See each account's model and effort, and set them per account | `sideby model <account>` (or click the model in the panel) | [Model and effort](docs/guide/usage.md#model-and-effort) |\n| Choose whether Claude sessions connect to claude.ai by themselves (Remote Control), for every account at once | `sideby remote-control off` or `on` (or the panel's Settings) | [Remote Control](docs/guide/usage.md#remote-control) |\n| Pin the accounts you use most and put tools and accounts in your own order | `sideby pin claude:work`, `sideby order` (or the panel's Settings) | [Your own order](docs/guide/usage.md#your-own-order) |\n| Move on when an account hits its limit | `sideby next claude` | [Handoff](docs/guide/usage.md#when-an-account-hits-its-limit) |\n| Let a running task move to the next account by itself when quota runs low (off by default; see the risk) | `sideby handoff enable` (or the panel) | [Auto Handoff](docs/guide/usage.md#auto-handoff) |\n| Short commands such as `ccw` | `sideby alias add ccw claude:work` | [Shell functions](docs/guide/configuration.md#shell-functions) |\n| Reopen a session from Orca and the like in the account that holds it | `\"resumeRouting\": true` in config | [Resuming from other tools](docs/guide/configuration.md#resuming-from-other-tools) |\n| Open Claude Desktop or the Codex app as one account, several side by side (macOS) | `sideby desktop claude:work` (or the panel) | [Desktop apps](docs/guide/usage.md#desktop-apps) |\n| Keep several Grok Bot windows open, each signed in to its own account (macOS) | `sideby desktop grok-bot:002` (or the panel) | [Grok Bot windows](docs/guide/usage.md#grok-bot-windows) |\n| Open the panel from the Dock or app menu | `sideby app install` | [Panel app](docs/guide/panel.md#panel-app) |\n| Show the panel inside your own local page | `createPanelHandler()` | [Embed the panel](docs/guide/panel.md#embed-the-panel) |\n| Add a Host or a pre-launch check | a local plugin | [Plugins](docs/guide/plugins.md) |\n\n## Supported hosts\n\n| Host | Account directories | Sign-in | Quota | Usage (7 days) |\n|---|---|---|---|---|\n| Claude Code | `~/.claude`, `~/.claude-<name>` | `claude auth login` | ✓ after `quota setup claude` | ✓ |\n| Codex CLI | `~/.codex`, `~/.codex-<name>` | `codex login` | ✓ | ✓ |\n| Grok Build | `~/.grok`, `~/.grok-<name>` | `grok login` | weekly, asked from the `grok` CLI | no public source |\n| pi | `~/.pi/agent`, `~/.pi-<name>/agent` | `/login` inside pi | no public source | no public source |\n\nsideby starts the official binary on your `PATH` and never patches it. Tested versions and per-Host notes are in the [guide](docs/guide/usage.md#host-notes).\n\n## Platforms\n\nmacOS and Linux. CI runs the suite on `ubuntu-latest` and `macos-latest`, Node 22 and 24. **Windows is untested.** `sideby app` only installs a launcher on macOS and Linux. Linked items are symlinks, `sideby shell-init` prints bash and zsh functions, and the Claude quota wrapper runs `/bin/sh`.\n\n## Roadmap\n\n**Gemini CLI.** Gemini can point at another config directory with `GEMINI_CONFIG_DIR`. Older docs use `GEMINI_CLI_HOME`; current builds treat that name as deprecated, and exit on startup if it is set together with an exact directory override. A sideby family still needs a tested Gemini version, a login check that does not read tokens, and a list of which files to link or copy. That is more than a small patch, so it is not in this version.\n\n## Safe by design\n\n- It never edits a Host's global config to switch accounts. It moves a task to another account only when you turn on Auto Handoff, and never proxies requests or pools logins.\n- It never reads, prints or sends a credential value. Nothing about your accounts leaves your machine: the only request sideby makes on its own is a daily check of the npm registry for its newest version (off with `NO_UPDATE_NOTIFIER=1`; see [Updates](docs/guide/configuration.md#updates)).\n- `doctor --fix` never replaces a real file and never changes where a link points.\n- The panel answers only on `127.0.0.1` and refuses web pages from other sites, but it trusts every user of this computer. On a shared Mac, do not leave it running in the background ([details](docs/guide/panel.md#who-can-reach-the-panel)).\n\nDetails and the terms-of-service question are in the [FAQ](docs/guide/faq.md).\n\nUsage questions and ideas go in [Discussions](https://github.com/Adonis0123/sideby/discussions).\n\n## Docs\n\n- [Using sideby](docs/guide/usage.md): accounts, API accounts, Doctor, quota, Handoff, Host notes\n- [Commands](docs/guide/commands.md): every command, exit codes and `--json`\n- [Configuration](docs/guide/configuration.md): `config.json`, aliases, shell functions\n- [Panel](docs/guide/panel.md): the panel, panel app and embedding\n- [Plugins](docs/guide/plugins.md): write your own Family or launch hook\n- [FAQ](docs/guide/faq.md): terms of service, data locations, alternatives, uninstall\n- [Changelog](https://github.com/Adonis0123/sideby/releases)\n\n## For AI agents\n\n- [`llms.txt`](llms.txt): setup steps, commands, JSON contract and plugin API in one index. `sideby families --json` states what each Host's accounts share.\n- [`skills/sideby/SKILL.md`](skills/sideby/SKILL.md): one Agent Skill for seeing, repairing and creating accounts and for moving on when one hits its limit. Install with `npx skills add Adonis0123/sideby -g`; `sideby doctor` warns when the installed copy is for another sideby version.\n- [`AGENTS.md`](AGENTS.md): rules for agents working on this repository.\n\n## License\n\n[MIT](LICENSE)\n"
84
85
  }
@@ -0,0 +1,168 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/ask-choices.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "account",
8
+ "accounts",
9
+ "terminal",
10
+ "terminals",
11
+ "reason",
12
+ "detail"
13
+ ],
14
+ "properties": {
15
+ "schemaVersion": {
16
+ "type": "number",
17
+ "const": 1
18
+ },
19
+ "account": {
20
+ "anyOf": [
21
+ {
22
+ "type": "string"
23
+ },
24
+ {
25
+ "type": "null"
26
+ }
27
+ ],
28
+ "description": "The Account an AI Task would use now; null when none can be picked (see `reason`)."
29
+ },
30
+ "accounts": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "object",
34
+ "required": [
35
+ "ref",
36
+ "label",
37
+ "signedIn"
38
+ ],
39
+ "properties": {
40
+ "ref": {
41
+ "type": "string"
42
+ },
43
+ "label": {
44
+ "type": "string",
45
+ "description": "What to show for it, as the Panel does."
46
+ },
47
+ "signedIn": {
48
+ "type": "boolean",
49
+ "description": "False for a Subscription Account that is signed out."
50
+ }
51
+ }
52
+ },
53
+ "description": "Signed-in Subscription Accounts, then API Accounts, then signed-out ones; each by ref."
54
+ },
55
+ "terminal": {
56
+ "type": "string",
57
+ "description": "The terminal a task opens: the preferred one, else the guess."
58
+ },
59
+ "terminals": {
60
+ "type": "array",
61
+ "items": {
62
+ "type": "object",
63
+ "required": [
64
+ "id",
65
+ "label"
66
+ ],
67
+ "properties": {
68
+ "id": {
69
+ "type": "string"
70
+ },
71
+ "label": {
72
+ "type": "string"
73
+ }
74
+ }
75
+ },
76
+ "description": "The supported terminals installed here."
77
+ },
78
+ "reason": {
79
+ "anyOf": [
80
+ {
81
+ "type": "string",
82
+ "enum": [
83
+ "no-accounts",
84
+ "none-signed-in",
85
+ "all-full"
86
+ ]
87
+ },
88
+ {
89
+ "type": "null"
90
+ }
91
+ ]
92
+ },
93
+ "detail": {
94
+ "anyOf": [
95
+ {
96
+ "type": "string",
97
+ "description": "What to do next, for a person."
98
+ },
99
+ {
100
+ "type": "null"
101
+ }
102
+ ]
103
+ },
104
+ "_notice": {
105
+ "type": "object",
106
+ "properties": {
107
+ "update": {
108
+ "type": "object",
109
+ "required": [
110
+ "current",
111
+ "latest",
112
+ "command",
113
+ "message"
114
+ ],
115
+ "properties": {
116
+ "current": {
117
+ "type": "string"
118
+ },
119
+ "latest": {
120
+ "type": "string"
121
+ },
122
+ "command": {
123
+ "type": "string",
124
+ "description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
125
+ },
126
+ "message": {
127
+ "type": "string"
128
+ }
129
+ }
130
+ },
131
+ "skill": {
132
+ "type": "object",
133
+ "required": [
134
+ "installed",
135
+ "current",
136
+ "command",
137
+ "message"
138
+ ],
139
+ "properties": {
140
+ "installed": {
141
+ "anyOf": [
142
+ {
143
+ "type": "string"
144
+ },
145
+ {
146
+ "type": "null"
147
+ }
148
+ ],
149
+ "description": "The skill's version; null when it has none."
150
+ },
151
+ "current": {
152
+ "type": "string"
153
+ },
154
+ "command": {
155
+ "type": "string",
156
+ "description": "`sideby update`, which updates the skill with sideby: run it after the user agrees; it shows the plan and exits 10, then --yes."
157
+ },
158
+ "message": {
159
+ "type": "string"
160
+ }
161
+ }
162
+ }
163
+ },
164
+ "description": "Not the answer to the task: mention it briefly afterwards and offer to update."
165
+ }
166
+ },
167
+ "title": "sideby ask --choices --json"
168
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/ask-print.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "prompt",
8
+ "removedSecrets"
9
+ ],
10
+ "properties": {
11
+ "schemaVersion": {
12
+ "type": "number",
13
+ "const": 1
14
+ },
15
+ "prompt": {
16
+ "type": "string",
17
+ "description": "The Task Prompt the Host would get, attachments section included."
18
+ },
19
+ "removedSecrets": {
20
+ "type": "boolean",
21
+ "description": "Whether key-shaped text was taken out of the prompt."
22
+ },
23
+ "_notice": {
24
+ "type": "object",
25
+ "properties": {
26
+ "update": {
27
+ "type": "object",
28
+ "required": [
29
+ "current",
30
+ "latest",
31
+ "command",
32
+ "message"
33
+ ],
34
+ "properties": {
35
+ "current": {
36
+ "type": "string"
37
+ },
38
+ "latest": {
39
+ "type": "string"
40
+ },
41
+ "command": {
42
+ "type": "string",
43
+ "description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
44
+ },
45
+ "message": {
46
+ "type": "string"
47
+ }
48
+ }
49
+ },
50
+ "skill": {
51
+ "type": "object",
52
+ "required": [
53
+ "installed",
54
+ "current",
55
+ "command",
56
+ "message"
57
+ ],
58
+ "properties": {
59
+ "installed": {
60
+ "anyOf": [
61
+ {
62
+ "type": "string"
63
+ },
64
+ {
65
+ "type": "null"
66
+ }
67
+ ],
68
+ "description": "The skill's version; null when it has none."
69
+ },
70
+ "current": {
71
+ "type": "string"
72
+ },
73
+ "command": {
74
+ "type": "string",
75
+ "description": "`sideby update`, which updates the skill with sideby: run it after the user agrees; it shows the plan and exits 10, then --yes."
76
+ },
77
+ "message": {
78
+ "type": "string"
79
+ }
80
+ }
81
+ }
82
+ },
83
+ "description": "Not the answer to the task: mention it briefly afterwards and offer to update."
84
+ }
85
+ },
86
+ "title": "sideby ask --spec - --print --json"
87
+ }
@@ -31,6 +31,18 @@
31
31
  "additionalProperties": false,
32
32
  "description": "How the Panel looks (spec §3.29)."
33
33
  },
34
+ "menubar": {
35
+ "type": "object",
36
+ "properties": {
37
+ "hotkey": {
38
+ "type": "string",
39
+ "pattern": "^(off|((ctrl|opt|cmd|shift)\\+)+[a-z0-9])$",
40
+ "description": "The shortcut that opens the menu bar item from anywhere, such as `opt+cmd+s` (default), or `off`."
41
+ }
42
+ },
43
+ "additionalProperties": false,
44
+ "description": "The Menu Bar Item on macOS (spec §3.31)."
45
+ },
34
46
  "terminal": {
35
47
  "type": "object",
36
48
  "properties": {
@@ -237,7 +249,11 @@
237
249
  "type": "integer",
238
250
  "minimum": 1,
239
251
  "maximum": 100,
240
- "description": "Quota Pressure at which the Handoff begins (default 95)."
252
+ "description": "Quota Pressure at which the Handoff begins (default 95). With `adaptive`, a window uses it until the run has measured a turn of it."
253
+ },
254
+ "adaptive": {
255
+ "type": "boolean",
256
+ "description": "Hand over by each window’s own pace: when it has less room left than 1.5 times its largest recent turn, between `prepareAt` and 99 (default true; ADR-0032). False uses `threshold` for every window."
241
257
  },
242
258
  "waitIfResetWithinMinutes": {
243
259
  "type": "integer",