sideby 0.20.0 → 0.22.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/README.md +1 -0
- package/dist/build.json +1 -1
- package/dist/src/cli/commands.js +115 -10
- package/dist/src/cli/format.js +3 -2
- package/dist/src/cli/json-schemas.js +81 -46
- package/dist/src/cli/main.js +6 -3
- package/dist/src/core/accounts.d.ts +6 -1
- package/dist/src/core/accounts.js +16 -3
- package/dist/src/core/ask.d.ts +2 -1
- package/dist/src/core/ask.js +6 -3
- package/dist/src/core/claude-settings-file.d.ts +57 -0
- package/dist/src/core/claude-settings-file.js +104 -2
- package/dist/src/core/config.d.ts +29 -15
- package/dist/src/core/config.js +40 -2
- package/dist/src/core/create.js +4 -1
- package/dist/src/core/desktop-app.js +5 -1
- package/dist/src/core/handoff-overview.d.ts +4 -1
- package/dist/src/core/handoff-overview.js +3 -2
- package/dist/src/core/handoff-rules.d.ts +34 -0
- package/dist/src/core/handoff-rules.js +115 -0
- package/dist/src/core/handoff-select.js +45 -28
- package/dist/src/core/handoff-status.d.ts +37 -7
- package/dist/src/core/handoff-status.js +95 -19
- package/dist/src/core/handoff.d.ts +4 -1
- package/dist/src/core/handoff.js +8 -5
- package/dist/src/core/inbound.d.ts +11 -3
- package/dist/src/core/inbound.js +26 -74
- package/dist/src/core/launch.js +6 -4
- package/dist/src/core/quota-levels.d.ts +6 -0
- package/dist/src/core/quota-levels.js +8 -0
- package/dist/src/core/remote-control.d.ts +10 -12
- package/dist/src/core/remote-control.js +29 -86
- package/dist/src/core/tuning-apply.js +12 -20
- package/dist/src/families/agy/index.d.ts +8 -0
- package/dist/src/families/agy/index.js +53 -0
- package/dist/src/families/agy/quota.d.ts +9 -0
- package/dist/src/families/agy/quota.js +110 -0
- package/dist/src/families/index.js +7 -0
- package/dist/src/families/logos.d.ts +10 -0
- package/dist/src/families/logos.js +12 -1
- package/dist/src/menubar/script.js +26 -3
- package/dist/src/menubar/snapshot.d.ts +23 -6
- package/dist/src/menubar/snapshot.js +126 -39
- package/dist/src/menubar/strings.d.ts +12 -2
- package/dist/src/menubar/strings.js +12 -2
- package/dist/src/panel/handler.d.ts +2 -1
- package/dist/src/panel/handler.js +81 -45
- package/dist/src/panel/i18n.d.ts +58 -7
- package/dist/src/panel/i18n.js +158 -56
- package/dist/src/panel/page-logic.d.ts +52 -19
- package/dist/src/panel/page-logic.js +47 -7
- package/dist/src/panel/page-script.js +333 -115
- package/dist/src/panel/page-styles.js +112 -21
- package/dist/src/panel/page.js +3 -3
- package/dist/src/plugins/check.js +27 -13
- package/dist/src/plugins/loader.d.ts +11 -0
- package/dist/src/plugins/loader.js +47 -1
- package/dist/src/runtime.d.ts +5 -2
- package/dist/src/runtime.js +12 -5
- package/dist/src/types.d.ts +35 -5
- package/package.json +2 -2
- package/schemas/config.json +16 -1
- package/schemas/families.json +8 -5
- package/schemas/handoff-disable.json +22 -0
- package/schemas/handoff-enable.json +22 -0
- package/schemas/handoff-rules.json +302 -0
- package/schemas/handoff-status.json +26 -0
- package/schemas/list.json +5 -0
- package/schemas/menubar-snapshot.json +309 -2
- package/skills/sideby/SKILL.md +3 -2
- package/skills/sideby/references/accounts.md +1 -0
- package/skills/sideby/references/handoff.md +7 -3
- package/skills/sideby/references/quota.md +2 -0
|
@@ -546,15 +546,44 @@ a.btn:hover { text-decoration: none; }
|
|
|
546
546
|
.rc-row { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; display: grid; gap: 2px; }
|
|
547
547
|
.rc-row code { word-break: break-all; }
|
|
548
548
|
.banner-actions { display: flex; gap: 8px; flex: none; }
|
|
549
|
-
.hp-
|
|
549
|
+
.hp-rules { list-style: none; margin: 0; padding: 0; counter-reset: hp-rule; display: flex; flex-direction: column; }
|
|
550
|
+
.hp-rules > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
|
|
551
|
+
.hp-rules > li:last-child { border-bottom: 0; }
|
|
552
|
+
.hp-rule-text::before { counter-increment: hp-rule; content: counter(hp-rule) '. '; color: var(--muted); font-variant-numeric: tabular-nums; }
|
|
553
|
+
.hp-rule-ctl { display: flex; align-items: center; gap: 8px; justify-self: end; }
|
|
554
|
+
.hp-rule-ctl:empty { display: none; }
|
|
555
|
+
.hp-rule-below { grid-column: 1 / -1; margin-top: 8px; }
|
|
556
|
+
.hp-rule-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
|
557
|
+
.hp-rules .seg { height: var(--ctl-h-sm); }
|
|
558
|
+
.hp-rules .seg-btn[aria-pressed=true] { background: var(--accent-soft); color: var(--accent); }
|
|
559
|
+
.hp-on-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
|
|
560
|
+
.hp-on-row > p { margin: 0; }
|
|
561
|
+
.hp-ai-order { margin: 0; }
|
|
562
|
+
.hp-ai-order li .title-logo { min-width: 150px; }
|
|
563
|
+
.ah-cross { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 12px; }
|
|
564
|
+
.ah-fam > summary { cursor: pointer; }
|
|
550
565
|
.hp-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
|
|
551
566
|
.hp-steps li { display: flex; gap: 8px; }
|
|
552
567
|
.hp-steps li::before { content: '•'; color: var(--muted); }
|
|
553
568
|
.hp-steps li > div { flex: 1; min-width: 0; }
|
|
554
569
|
.hp-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
|
|
555
|
-
.hp-rows li { display:
|
|
570
|
+
.hp-rows li { display: grid; grid-template-columns: minmax(0, 16rem) 7rem minmax(0, 1fr); align-items: center; column-gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--border); }
|
|
556
571
|
.hp-rows li:last-child { border-bottom: 0; }
|
|
572
|
+
.hp-rows .num { font-variant-numeric: tabular-nums; }
|
|
573
|
+
.hp-rows li > .num { text-align: end; }
|
|
574
|
+
.hp-recent li { grid-template-columns: minmax(0, 1fr) max-content minmax(0, 12rem); }
|
|
575
|
+
.hp-recent li > .num { white-space: nowrap; }
|
|
557
576
|
#handoff-page > * + * { margin-top: 12px; }
|
|
577
|
+
#handoff-page > h3 { margin-top: 28px; }
|
|
578
|
+
#handoff-page > h3 + * { margin-top: 8px; }
|
|
579
|
+
:where(:root[data-width=narrow], :root[data-width=phone]) {
|
|
580
|
+
.hp-rows li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
|
|
581
|
+
.hp-rows li > :last-child { grid-column: 1 / -1; }
|
|
582
|
+
.hp-rules > li { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
|
|
583
|
+
.hp-rule-ctl { justify-self: start; }
|
|
584
|
+
.hp-rule-sub { justify-content: flex-start; }
|
|
585
|
+
.hp-rows li > .num { text-align: start; }
|
|
586
|
+
}
|
|
558
587
|
/* Sessions page (spec §3.32): one row per Live Session; a Session that needs the user gets the warning tint. */
|
|
559
588
|
#sessions-page > * + * { margin-top: 12px; }
|
|
560
589
|
.sess-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 11px 10px 11px 16px; border-top: 1px solid var(--border); transition: background-color .15s; }
|
|
@@ -989,24 +1018,20 @@ select:is(:hover, :focus) { --chevron: var(--text); }
|
|
|
989
1018
|
.hist-group { display: flex; flex-direction: column; gap: 4px; }
|
|
990
1019
|
.hist-group + .hist-group { margin-top: 10px; }
|
|
991
1020
|
.hist-group.is-folded + .hist-group.is-folded { margin-top: 0; }
|
|
992
|
-
.hist-ghead { display: flex; align-items: center; min-width: 0; }
|
|
1021
|
+
.hist-ghead { display: flex; align-items: center; min-width: 0; padding-left: 14px; }
|
|
993
1022
|
.hist-gtoggle { max-width: 100%; padding: 3px 8px 3px 2px; font-size: var(--small); font-weight: var(--strong-weight); }
|
|
994
1023
|
.hist-gtitle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
995
1024
|
.hist-gtoggle .spin { width: 12px; height: 12px; }
|
|
996
1025
|
.hist-catgrp { display: flex; flex-direction: column; margin-top: 6px; }
|
|
997
|
-
.hist-cathead {
|
|
998
|
-
.hist-cathead > .hist-proj
|
|
999
|
-
.hist-
|
|
1000
|
-
.hist-
|
|
1001
|
-
.hist-catfold:focus-visible { outline: var(--focus-outline); outline-offset: 1px; box-shadow: var(--focus-ring); }
|
|
1002
|
-
.hist-catfold .chev { width: 12px; height: 12px; color: inherit; }
|
|
1003
|
-
.hist-catfold[aria-expanded=true] .chev { transform: rotate(90deg); }
|
|
1026
|
+
.hist-cathead { display: flex; align-items: center; min-width: 0; }
|
|
1027
|
+
.hist-cathead > .hist-proj { padding-left: 6px; }
|
|
1028
|
+
.hist-cathead .chev { flex: none; width: 12px; height: 12px; }
|
|
1029
|
+
.hist-cathead [aria-expanded=true] .chev { transform: rotate(90deg); }
|
|
1004
1030
|
/* The rows fold by easing the grid row from its content to nothing, so nothing below jumps. */
|
|
1005
1031
|
.hist-catbody { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .18s ease, opacity .18s ease; }
|
|
1006
1032
|
.hist-catbody > .hist-catps { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 1px; padding-top: 1px; }
|
|
1007
1033
|
.hist-catgrp.is-folded .hist-catbody { grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows .18s ease, opacity .18s ease, visibility 0s .18s; }
|
|
1008
1034
|
.hist-cat { color: var(--text); font-weight: var(--strong-weight); }
|
|
1009
|
-
.hist-cat-none { display: flex; align-items: center; gap: 6px; width: 100%; padding: 5px 10px; font-size: var(--small); color: var(--muted); }
|
|
1010
1035
|
.hist-catps .hist-proj { padding-left: 24px; }
|
|
1011
1036
|
.hist-check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--small); color: var(--muted); cursor: pointer; white-space: nowrap; }
|
|
1012
1037
|
.hist-check input { margin: 0; accent-color: var(--accent); }
|
|
@@ -1018,7 +1043,7 @@ select:is(:hover, :focus) { --chevron: var(--text); }
|
|
|
1018
1043
|
/* Inner scroll boxes get a thin bar in the theme's colours; the side list shows it only while the pointer is on it. */
|
|
1019
1044
|
:is(.hist-side, .hv-msgs, .diff, .dlg-body, .menu) { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
|
|
1020
1045
|
.hist-side:not(:hover, :focus-within) { scrollbar-color: transparent transparent; }
|
|
1021
|
-
.hist-side-h { margin: 0 0 2px 10px; font-size:
|
|
1046
|
+
.hist-side-h { margin: 0 0 2px 10px; font-size: var(--small); font-weight: 400; color: var(--muted); }
|
|
1022
1047
|
.hist-projs { display: flex; flex-direction: column; gap: 1px; }
|
|
1023
1048
|
.hist-proj { display: flex; align-items: center; gap: 6px; width: 100%; padding: 5px 10px; border: 0; border-radius: var(--ctl-radius); background: transparent; color: var(--muted); font: inherit; font-size: var(--small); text-align: left; cursor: pointer; transition: background-color .12s, color .12s; }
|
|
1024
1049
|
.hist-proj:hover { background: var(--hover); color: var(--text); }
|
|
@@ -1060,7 +1085,7 @@ select:is(:hover, :focus) { --chevron: var(--text); }
|
|
|
1060
1085
|
.hist-mi-wrap { display: flex; flex-wrap: wrap; align-items: center; row-gap: 2px; margin-left: -14px; }
|
|
1061
1086
|
.hist-mi { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; }
|
|
1062
1087
|
.hist-mi::before { content: '·'; flex: none; width: 14px; text-align: center; opacity: .7; }
|
|
1063
|
-
.hist-meta b { color: var(--text); font-weight:
|
|
1088
|
+
.hist-meta b { color: var(--text); font-weight: 500; }
|
|
1064
1089
|
.hist-pname, .hist-branch { min-width: 0; max-width: 18em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1065
1090
|
.hist-age { white-space: nowrap; }
|
|
1066
1091
|
.hist-snip { color: var(--muted); font-size: var(--small); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
|
|
@@ -1118,15 +1143,14 @@ select:is(:hover, :focus) { --chevron: var(--text); }
|
|
|
1118
1143
|
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-grid { grid-template-columns: minmax(0, 1fr); }
|
|
1119
1144
|
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-side { position: static; max-height: none; flex-direction: row; align-items: center; overflow-x: auto; }
|
|
1120
1145
|
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-side-h { display: none; }
|
|
1121
|
-
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-projs { flex-direction: row; gap: 4px; }
|
|
1146
|
+
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-projs { flex-direction: row; align-items: center; gap: 4px; }
|
|
1147
|
+
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-catbody > .hist-catps { flex-direction: row; overflow: visible; }
|
|
1122
1148
|
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-proj { width: auto; flex: none; max-width: 16em; }
|
|
1123
1149
|
:where(:root[data-width=narrow], :root[data-width=phone]) :is(.hist-catgrp, .hist-catps) { flex-direction: row; display: flex; gap: 4px; margin-top: 0; }
|
|
1124
|
-
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-cat-none { display: none; }
|
|
1125
1150
|
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-catps .hist-proj { padding-left: 10px; }
|
|
1126
|
-
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-
|
|
1127
|
-
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-
|
|
1128
|
-
|
|
1129
|
-
/* Without the arrow a folded category could not be opened again, so a narrow screen shows every category open. */
|
|
1151
|
+
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-cathead { display: none; }
|
|
1152
|
+
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-catbody { display: contents; }
|
|
1153
|
+
/* Without its heading a folded category could not be opened again, so a narrow screen shows every category open. */
|
|
1130
1154
|
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-catgrp.is-folded .hist-catbody { opacity: 1; visibility: visible; }
|
|
1131
1155
|
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-row { grid-template-columns: auto minmax(0, 1fr); row-gap: 8px; }
|
|
1132
1156
|
:where(:root[data-width=narrow], :root[data-width=phone]) .hist-row .sess-actions { grid-column: 2; }
|
|
@@ -1159,9 +1183,76 @@ select:is(:hover, :focus) { --chevron: var(--text); }
|
|
|
1159
1183
|
.dialog.dialog-top { margin-top: min(12vh, 96px); max-height: calc(100vh - min(12vh, 96px) - 24px); }
|
|
1160
1184
|
.dialog:not([open]) { opacity: 0; transform: translateY(4px) scale(.985); pointer-events: none; }
|
|
1161
1185
|
.dialog:not([open])::backdrop { opacity: 0; }
|
|
1186
|
+
/* Page tabs (2026-10-21): underline tabs across the content width, as GitHub and Vercel draw them. The selected page
|
|
1187
|
+
is in full text color with its mark in the accent and a 2px accent line under it; the others are muted. Each label
|
|
1188
|
+
reserves its bold width, so picking a tab never moves the ones after it. */
|
|
1189
|
+
.pages { margin: 2px 0 22px; }
|
|
1190
|
+
.tabs { display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
|
|
1191
|
+
.tab { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 7px; flex: none; height: 44px; padding: 0 12px; border: 0; background: none; color: var(--muted); font: inherit; font-size: var(--font-size); font-weight: 500; white-space: nowrap; cursor: pointer; transition: color .12s; }
|
|
1192
|
+
.tab::before { content: ""; position: absolute; inset: 6px 2px 7px; z-index: -1; border-radius: var(--ctl-radius); background: var(--hover); opacity: 0; transition: opacity .12s; }
|
|
1193
|
+
.tab:hover { color: var(--text); }
|
|
1194
|
+
.tab:hover::before { opacity: 1; }
|
|
1195
|
+
.tab .ic { width: 16px; height: 16px; color: var(--faint); transition: color .12s; }
|
|
1196
|
+
.tab:hover .ic { color: var(--muted); }
|
|
1197
|
+
.tab-label { display: inline-grid; }
|
|
1198
|
+
.tab-label::after { content: attr(data-label); height: 0; overflow: hidden; visibility: hidden; font-weight: var(--strong-weight); }
|
|
1199
|
+
.tab[aria-selected=true] { color: var(--text); font-weight: var(--strong-weight); }
|
|
1200
|
+
.tab[aria-selected=true] .ic { color: var(--accent); }
|
|
1201
|
+
.tab[aria-selected=true]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); animation: tab-line .22s cubic-bezier(.16, 1, .3, 1); }
|
|
1202
|
+
@keyframes tab-line { from { opacity: 0; transform: scaleX(.3); } }
|
|
1203
|
+
.tab:focus-visible { outline: var(--focus-outline); outline-offset: -5px; border-radius: var(--ctl-radius); }
|
|
1204
|
+
.tab-count { min-width: 20px; padding: 0 6px; border-radius: var(--chip-radius); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); color: var(--muted); font-size: 11.5px; font-weight: 500; line-height: 18px; text-align: center; }
|
|
1205
|
+
.tab[aria-selected=true] .tab-count { background: var(--accent-soft); box-shadow: none; color: var(--accent); }
|
|
1206
|
+
.tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok-bar); box-shadow: 0 0 0 3px var(--ok-soft); }
|
|
1207
|
+
.tab .seg-badge { margin-left: 0; }
|
|
1208
|
+
.tab .spin { width: 16px; height: 16px; }
|
|
1209
|
+
|
|
1210
|
+
/* Pages other than Accounts open the same way: a title with its actions on the right, one line saying what the page
|
|
1211
|
+
is for, then the content in surfaces. A section inside a page has a small heading with more room above than below. */
|
|
1212
|
+
.page > .section-head { margin-bottom: 4px; min-height: var(--ctl-h); }
|
|
1213
|
+
.page > .section-head h2 { font-size: 18px; letter-spacing: -0.015em; }
|
|
1214
|
+
.page > .section-head + p { margin-bottom: 18px; max-width: 860px; color: var(--muted); font-size: 13px; line-height: 1.6; }
|
|
1215
|
+
.page-sec { margin: 28px 0 10px; font-size: 13.5px; font-weight: var(--heading-weight); color: var(--text); }
|
|
1216
|
+
.page-sec-head { display: flex; flex-direction: column; gap: 2px; margin: 28px 0 10px; }
|
|
1217
|
+
.page-sec-head .page-sec { margin: 0; }
|
|
1218
|
+
|
|
1219
|
+
/* Auto Handoff's status card: its mark, on or off in words, what that means, and the one action that changes it. On,
|
|
1220
|
+
it takes a green edge and tint, so the state reads before the words. */
|
|
1221
|
+
.hp-status { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: background-color .2s, border-color .2s; }
|
|
1222
|
+
.hp-status-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); color: var(--muted); }
|
|
1223
|
+
.hp-status-ic .ic { width: 20px; height: 20px; }
|
|
1224
|
+
.hp-status-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
|
|
1225
|
+
.hp-status-text b { font-size: var(--large); font-weight: var(--heading-weight); }
|
|
1226
|
+
.hp-status-text p { font-size: 13px; line-height: 1.55; }
|
|
1227
|
+
.hp-status.is-on { border-color: color-mix(in srgb, var(--ok-bar) 40%, var(--border)); background: color-mix(in srgb, var(--ok-soft) 55%, var(--surface)); }
|
|
1228
|
+
.hp-status.is-on .hp-status-ic { background: var(--ok-soft); box-shadow: none; color: var(--ok); }
|
|
1229
|
+
.hp-status + :not(.page-sec-head, .page-sec) { margin-top: 12px; }
|
|
1230
|
+
.page .hp-rules, .page .hp-rows { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
|
|
1231
|
+
.page .hp-rules > li { padding: 12px 16px; min-height: 52px; }
|
|
1232
|
+
.page .hp-rows li { padding: 11px 16px; }
|
|
1233
|
+
.hp-rule-text::before { color: var(--faint); }
|
|
1234
|
+
:where(:root[data-width=narrow], :root[data-width=phone]) .hp-status { grid-template-columns: auto minmax(0, 1fr); }
|
|
1235
|
+
:where(:root[data-width=narrow], :root[data-width=phone]) .hp-status > .btn { grid-column: 1 / -1; justify-self: start; }
|
|
1236
|
+
|
|
1237
|
+
/* Context tuning on its page: one surface per settings file. Now, the suggestion and what it saves are one strip like
|
|
1238
|
+
the Accounts summary; the per-account details sit in the card's foot. */
|
|
1239
|
+
.tg-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
1240
|
+
.tg-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface-2); border: 1px solid var(--border); border-radius: calc(var(--radius) - 4px); overflow: hidden; }
|
|
1241
|
+
.tg-stat { min-width: 0; padding: 12px 16px; border-left: 1px solid var(--border); }
|
|
1242
|
+
.tg-stat:first-child { border-left: 0; }
|
|
1243
|
+
.tg-stats .tune-num { font-size: 24px; font-weight: var(--heading-weight); letter-spacing: -0.02em; line-height: 1.35; white-space: nowrap; }
|
|
1244
|
+
#tuning-page .tune-acct { gap: 0; margin: 0 0 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
|
|
1245
|
+
#tuning-page .tune-group { gap: 12px; padding: 18px 20px; border: 0; border-radius: 0; }
|
|
1246
|
+
#tuning-page .tune-acct > .tune-details { margin: 0; padding: 11px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
|
|
1247
|
+
#tuning-page .tune-acct > .tune-details:first-child { border-top: 0; }
|
|
1248
|
+
#tuning-page .tune-acct > .tune-details[open] > summary { margin-bottom: 6px; }
|
|
1249
|
+
:where(:root[data-width=phone]) .tg-stats { grid-auto-flow: row; }
|
|
1250
|
+
:where(:root[data-width=phone]) .tg-stat { border-left: 0; border-top: 1px solid var(--border); }
|
|
1251
|
+
:where(:root[data-width=phone]) .tg-stat:first-child { border-top: 0; }
|
|
1252
|
+
|
|
1162
1253
|
@media (prefers-reduced-motion: reduce) {
|
|
1163
|
-
.sk, .spin, .is-spinning svg, .toast, .toast.bump, .toast.toast-out, .view-in > *, .set-pane.view-in, .row.flash, .sess-row.flash, .sess-msg, .seg-badge, .card.flash, .pulse, .sess-busy .sess-dot, .menu, .menu.float-out, .dialog[open], .dialog[open]::backdrop, .enter, .fade-in, .hist-list.swap-in, .tip-body, .tip-float, .row-run.is-done .ic { animation: none; }
|
|
1164
|
-
.bar > span, .chev, .row, .sess-row, .sess-copy, .hist-row, .hist-cont, .hist-proj, .hist-
|
|
1254
|
+
.sk, .spin, .is-spinning svg, .toast, .toast.bump, .toast.toast-out, .view-in > *, .set-pane.view-in, .row.flash, .sess-row.flash, .sess-msg, .seg-badge, .card.flash, .pulse, .sess-busy .sess-dot, .menu, .menu.float-out, .dialog[open], .dialog[open]::backdrop, .enter, .fade-in, .hist-list.swap-in, .tip-body, .tip-float, .row-run.is-done .ic, .tab[aria-selected=true]::after { animation: none; }
|
|
1255
|
+
.bar > span, .chev, .row, .sess-row, .sess-copy, .hist-row, .hist-cont, .hist-proj, .hist-catbody, .hist-opt, .hist-list, .icon-btn, .seg-btn, .menu-item, .set-tab, .link-btn, .tag-btn, .email-btn, .btn, .chip-btn, .set-link .ic, .dialog, .dialog[open], .dialog::backdrop, .tab, .tab::before, .tab .ic, .hp-status { transition: none; }
|
|
1165
1256
|
:is(.btn, .icon-btn, .seg-btn, .set-tab, .chip-btn):active:not(:disabled), .set-link:hover .ic, .dialog:not([open]) { transform: none; }
|
|
1166
1257
|
}
|
|
1167
1258
|
`;
|
package/dist/src/panel/page.js
CHANGED
|
@@ -95,9 +95,9 @@ export function renderPage(opts) {
|
|
|
95
95
|
<div id="banners"></div>
|
|
96
96
|
<nav id="pages" class="pages" role="tablist" hidden></nav>
|
|
97
97
|
<section id="summary" class="summary" aria-busy="true">${SKELETON_STAT.repeat(4)}</section>
|
|
98
|
-
<section id="handoff-page" class="block" aria-labelledby="h-handoff" hidden></section>
|
|
99
|
-
<section id="tuning-page" class="block" aria-labelledby="h-tuning" hidden></section>
|
|
100
|
-
<section id="sessions-page" class="block" aria-labelledby="h-sessions" hidden></section>
|
|
98
|
+
<section id="handoff-page" class="block page" aria-labelledby="h-handoff" hidden></section>
|
|
99
|
+
<section id="tuning-page" class="block page" aria-labelledby="h-tuning" hidden></section>
|
|
100
|
+
<section id="sessions-page" class="block page" aria-labelledby="h-sessions" hidden></section>
|
|
101
101
|
<section id="accounts-page" class="block" aria-labelledby="h-accounts">
|
|
102
102
|
<div class="section-head acct-head"><h2 id="h-accounts"><span data-i18n="acct.title">Accounts</span><span id="acct-count" class="muted small"></span></h2><span id="updated" class="muted small" role="status">Loading…</span></div>
|
|
103
103
|
<div id="toolbar" class="toolbar" hidden></div>
|
|
@@ -19,7 +19,7 @@ import { fakeHost, withFakeHome } from '../../testing/index.js';
|
|
|
19
19
|
import { SHARE_MODES } from '../core/share-mode-names.js';
|
|
20
20
|
import { BUILTIN_PLUGINS } from '../families/index.js';
|
|
21
21
|
import { createRuntime } from '../runtime.js';
|
|
22
|
-
import { checkTrustedTree, logoProblem, websiteProblem, } from './loader.js';
|
|
22
|
+
import { checkTrustedTree, logoProblem, mainOnlyProblem, websiteProblem, } from './loader.js';
|
|
23
23
|
import { FAMILY_ID_RE, TODO_MARK } from './scaffold.js';
|
|
24
24
|
/** Name of the Account the check creates next to the Main Account in its throwaway HOME. */
|
|
25
25
|
const CHECK_ACCOUNT = 'check';
|
|
@@ -300,7 +300,14 @@ export function defProblems(raw) {
|
|
|
300
300
|
field('bin', 'bin must be the executable name, without a folder', 'Set `bin` to the command the Host installs on PATH.');
|
|
301
301
|
if (!nonEmpty(def.installUrl) || !/^https?:\/\/\S+$/.test(def.installUrl))
|
|
302
302
|
field('installUrl', 'installUrl must be an http(s) link', "Set `installUrl` to the Host's official install page.");
|
|
303
|
-
|
|
303
|
+
const mainOnly = def.mainOnly !== undefined;
|
|
304
|
+
const shape = mainOnlyProblem(def);
|
|
305
|
+
if (shape)
|
|
306
|
+
field('mainOnly', shape, 'Leave out `mainOnly` when the Host has a variable that moves its config directory; set `mainOnly: true` and leave out `selectVar` and `layout.account` only when it has none (ADR-0047).');
|
|
307
|
+
else if (mainOnly) {
|
|
308
|
+
// A Main-only Family has neither field to check.
|
|
309
|
+
}
|
|
310
|
+
else if (!nonEmpty(def.selectVar))
|
|
304
311
|
out.push({
|
|
305
312
|
code: 'select-var.missing',
|
|
306
313
|
message: `${at}: selectVar is missing, so every Account would share one config directory`,
|
|
@@ -313,9 +320,10 @@ export function defProblems(raw) {
|
|
|
313
320
|
const account = layout.account;
|
|
314
321
|
if (!nonEmpty(main) || !isRelativeInside(main))
|
|
315
322
|
field('layout', 'layout.main must be a path relative to HOME, without ".."', 'Set `layout.main` such as ".mytool".');
|
|
316
|
-
if (!
|
|
317
|
-
!
|
|
318
|
-
|
|
323
|
+
if (!mainOnly &&
|
|
324
|
+
(!nonEmpty(account) ||
|
|
325
|
+
!isRelativeInside(account) ||
|
|
326
|
+
!account.split('/')[0].includes('<name>')))
|
|
319
327
|
field('layout', 'layout.account must be relative to HOME, without "..", with <name> in its first segment', 'Set `layout.account` such as ".mytool-<name>".');
|
|
320
328
|
for (const key of ['hijackVars', 'apiVars']) {
|
|
321
329
|
const v = def[key];
|
|
@@ -400,15 +408,17 @@ async function round(h, builtins, id, problems) {
|
|
|
400
408
|
return false;
|
|
401
409
|
}
|
|
402
410
|
};
|
|
403
|
-
const layoutOk = defProblems(def).every((p) => p.code !== 'field.layout' && p.code !== 'field.bin');
|
|
411
|
+
const layoutOk = defProblems(def).every((p) => p.code !== 'field.layout' && p.code !== 'field.bin' && p.code !== 'field.mainOnly');
|
|
404
412
|
if (!layoutOk)
|
|
405
413
|
return;
|
|
406
414
|
await fakeHost(h, def.bin);
|
|
407
415
|
await h.mkdir(def.layout.main);
|
|
408
416
|
for (const item of def.sharedItems)
|
|
409
417
|
await seed(h, def, item.path, item);
|
|
410
|
-
|
|
411
|
-
|
|
418
|
+
// A Main-only Family (ADR-0047) has only its Main Account to find.
|
|
419
|
+
const accountDir = def.layout.account?.replace('<name>', CHECK_ACCOUNT);
|
|
420
|
+
if (accountDir)
|
|
421
|
+
await h.mkdir(accountDir);
|
|
412
422
|
let refs = [];
|
|
413
423
|
const found = await step('round.discover', 'finding Accounts', async () => {
|
|
414
424
|
const all = await rt.accounts();
|
|
@@ -420,18 +430,22 @@ async function round(h, builtins, id, problems) {
|
|
|
420
430
|
}
|
|
421
431
|
});
|
|
422
432
|
const ref = `${id}:${CHECK_ACCOUNT}`;
|
|
423
|
-
if (found && (!refs.includes(`${id}:main`) || !refs.includes(ref)))
|
|
433
|
+
if (found && (!refs.includes(`${id}:main`) || (accountDir && !refs.includes(ref))))
|
|
424
434
|
problems.push({
|
|
425
435
|
code: 'round.discover',
|
|
426
|
-
message:
|
|
436
|
+
message: accountDir
|
|
437
|
+
? `family ${id}: sideby found ${refs.join(', ') || 'no Accounts'} in ~/${def.layout.main} and ~/${accountDir}, not both`
|
|
438
|
+
: `family ${id}: sideby found no Main Account in ~/${def.layout.main}`,
|
|
427
439
|
fix: 'Check `layout` and `markers`: an Account directory counts when it holds proxy.env, a marker, or nothing at all.',
|
|
428
440
|
});
|
|
429
|
-
if (refs.includes(ref))
|
|
441
|
+
if (accountDir && def.selectVar && refs.includes(ref)) {
|
|
442
|
+
const selectVar = def.selectVar;
|
|
430
443
|
await step('round.launch', 'preparing a launch', async () => {
|
|
431
444
|
const launch = await rt.prepareLaunch(ref, [], 'run');
|
|
432
|
-
if (launch.env[
|
|
433
|
-
throw new Error(`${
|
|
445
|
+
if (launch.env[selectVar] !== h.path(accountDir))
|
|
446
|
+
throw new Error(`${selectVar} does not point at the Account directory`);
|
|
434
447
|
});
|
|
448
|
+
}
|
|
435
449
|
await step('round.doctor', 'doctor', async () => {
|
|
436
450
|
await rt.doctor({ target: id, persist: false });
|
|
437
451
|
});
|
|
@@ -63,3 +63,14 @@ export declare function loadPlugins(opts: {
|
|
|
63
63
|
userPluginsDir: string;
|
|
64
64
|
home: string;
|
|
65
65
|
}): Promise<LoadResult>;
|
|
66
|
+
/**
|
|
67
|
+
* What is wrong with how a FamilyDef says where its Accounts live (ADR-0047): either `selectVar` and `layout.account`
|
|
68
|
+
* both set, or `mainOnly: true` with both left out. undefined when it is right.
|
|
69
|
+
*/
|
|
70
|
+
export declare function mainOnlyProblem(def: {
|
|
71
|
+
mainOnly?: unknown;
|
|
72
|
+
selectVar?: unknown;
|
|
73
|
+
layout?: {
|
|
74
|
+
account?: unknown;
|
|
75
|
+
} | unknown;
|
|
76
|
+
}): string | undefined;
|
|
@@ -58,7 +58,7 @@ export const MAX_LOGO_PATH = 20_000;
|
|
|
58
58
|
export function logoProblem(logo) {
|
|
59
59
|
if (typeof logo !== 'object' || logo === null || Array.isArray(logo))
|
|
60
60
|
return 'logo must be an object';
|
|
61
|
-
const { path, color, title, fillRule } = logo;
|
|
61
|
+
const { path, color, title, fillRule, gradients } = logo;
|
|
62
62
|
if (typeof path !== 'string' || !path.trim())
|
|
63
63
|
return 'logo.path must be a non-empty string';
|
|
64
64
|
if (path.length > MAX_LOGO_PATH)
|
|
@@ -71,8 +71,26 @@ export function logoProblem(logo) {
|
|
|
71
71
|
return 'logo.title must be a string of at most 80 characters';
|
|
72
72
|
if (fillRule !== undefined && fillRule !== 'nonzero' && fillRule !== 'evenodd')
|
|
73
73
|
return 'logo.fillRule must be "nonzero" or "evenodd"';
|
|
74
|
+
if (gradients !== undefined) {
|
|
75
|
+
if (!Array.isArray(gradients) || gradients.length > MAX_LOGO_GRADIENTS)
|
|
76
|
+
return `logo.gradients must be a list of at most ${MAX_LOGO_GRADIENTS} washes`;
|
|
77
|
+
for (const g of gradients) {
|
|
78
|
+
const { from, to, color: c } = (g ?? {});
|
|
79
|
+
if (!isLogoPoint(from) || !isLogoPoint(to))
|
|
80
|
+
return 'each of logo.gradients needs `from` and `to` points such as [12, 2], numbers from -24 to 48';
|
|
81
|
+
if (typeof c !== 'string' || !LOGO_COLOR_RE.test(c))
|
|
82
|
+
return 'each of logo.gradients needs a hex `color` such as #3186FF';
|
|
83
|
+
}
|
|
84
|
+
}
|
|
74
85
|
return null;
|
|
75
86
|
}
|
|
87
|
+
const MAX_LOGO_GRADIENTS = 4;
|
|
88
|
+
/** A point of a logo wash: two plain numbers near the 24x24 view box, so it reaches markup as nothing else. */
|
|
89
|
+
function isLogoPoint(p) {
|
|
90
|
+
return (Array.isArray(p) &&
|
|
91
|
+
p.length === 2 &&
|
|
92
|
+
p.every((n) => typeof n === 'number' && Number.isFinite(n) && n >= -24 && n <= 48));
|
|
93
|
+
}
|
|
76
94
|
// The url reaches `open` and, on WSL, `cmd.exe /c start`, so it holds no character a shell gives meaning to.
|
|
77
95
|
const WEBSITE_URL_RE = /^https:\/\/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+(?:\/[A-Za-z0-9._~/-]*)?$/;
|
|
78
96
|
const WEBSITE_ORIGIN_RE = /^https:\/\/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$/;
|
|
@@ -108,6 +126,15 @@ function cleanLogo(logo) {
|
|
|
108
126
|
...(logo.color ? { color: logo.color } : {}),
|
|
109
127
|
...(logo.title ? { title: logo.title } : {}),
|
|
110
128
|
...(logo.fillRule ? { fillRule: logo.fillRule } : {}),
|
|
129
|
+
...(logo.gradients?.length
|
|
130
|
+
? {
|
|
131
|
+
gradients: logo.gradients.map((g) => ({
|
|
132
|
+
from: [g.from[0], g.from[1]],
|
|
133
|
+
to: [g.to[0], g.to[1]],
|
|
134
|
+
color: g.color,
|
|
135
|
+
})),
|
|
136
|
+
}
|
|
137
|
+
: {}),
|
|
111
138
|
};
|
|
112
139
|
}
|
|
113
140
|
function settingsFor(config, name, manifest) {
|
|
@@ -150,6 +177,9 @@ async function register(plugin, bus, result, source, settings) {
|
|
|
150
177
|
throw new Error(`family ${def.id} is already provided by ${owner}`);
|
|
151
178
|
if (stagedFamilies.some((f) => f.id === def.id))
|
|
152
179
|
throw new Error(`family ${def.id} is registered twice`);
|
|
180
|
+
const shape = mainOnlyProblem(def);
|
|
181
|
+
if (shape)
|
|
182
|
+
throw new Error(`family ${def.id}: ${shape}`);
|
|
153
183
|
// A bad logo or website costs only that field: the Family still loads.
|
|
154
184
|
let clean = def;
|
|
155
185
|
if (def.logo !== undefined) {
|
|
@@ -313,3 +343,19 @@ export async function loadPlugins(opts) {
|
|
|
313
343
|
}
|
|
314
344
|
return result;
|
|
315
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* What is wrong with how a FamilyDef says where its Accounts live (ADR-0047): either `selectVar` and `layout.account`
|
|
348
|
+
* both set, or `mainOnly: true` with both left out. undefined when it is right.
|
|
349
|
+
*/
|
|
350
|
+
export function mainOnlyProblem(def) {
|
|
351
|
+
const layout = (typeof def.layout === 'object' && def.layout !== null ? def.layout : {});
|
|
352
|
+
const hasSelect = def.selectVar !== undefined;
|
|
353
|
+
const hasAccount = layout.account !== undefined;
|
|
354
|
+
if (def.mainOnly === undefined)
|
|
355
|
+
return undefined;
|
|
356
|
+
if (def.mainOnly !== true)
|
|
357
|
+
return 'mainOnly must be true or left out';
|
|
358
|
+
if (hasSelect || hasAccount)
|
|
359
|
+
return 'a Main-only Family (mainOnly: true) must leave out selectVar and layout.account';
|
|
360
|
+
return undefined;
|
|
361
|
+
}
|
package/dist/src/runtime.d.ts
CHANGED
|
@@ -79,6 +79,8 @@ export interface FamilyInfo {
|
|
|
79
79
|
tuning: boolean;
|
|
80
80
|
/** The Host's settings file that `sideby edit` opens (spec §3.30), relative to the account directory. */
|
|
81
81
|
settingsFile?: string;
|
|
82
|
+
/** Set only for a Main-only Family: sideby knows only its Main Account and creates no other (ADR-0047). */
|
|
83
|
+
mainOnly?: true;
|
|
82
84
|
}
|
|
83
85
|
/** One Shared Item as `sideby families` reports it (spec §3.16). */
|
|
84
86
|
export interface SharedItemInfo {
|
|
@@ -98,9 +100,10 @@ export interface FamilyDetail extends FamilyInfo {
|
|
|
98
100
|
/** Relative to HOME: `{ main: '.claude', account: '.claude-<name>' }`. */
|
|
99
101
|
layout: {
|
|
100
102
|
main: string;
|
|
101
|
-
account
|
|
103
|
+
account?: string;
|
|
102
104
|
};
|
|
103
|
-
|
|
105
|
+
/** Left out for a Main-only Family (ADR-0047). */
|
|
106
|
+
selectVar?: string;
|
|
104
107
|
/** `args` is null when sign-in happens inside the Host. */
|
|
105
108
|
login: {
|
|
106
109
|
args: string[] | null;
|
package/dist/src/runtime.js
CHANGED
|
@@ -18,6 +18,7 @@ import { resolvePaths } from './core/paths.js';
|
|
|
18
18
|
import { choosePick, suggestPickName } from './core/pick-commands.js';
|
|
19
19
|
import { categoryReader } from './core/project-categories.js';
|
|
20
20
|
import { fetchedQuota, quotaCheckOff, shownQuota } from './core/quota-fetch.js';
|
|
21
|
+
import { takeoverLimit } from './core/quota-levels.js';
|
|
21
22
|
import { remoteControlGroups, turnRemoteControlOff, turnRemoteControlOn, undoRemoteControlOff, } from './core/remote-control.js';
|
|
22
23
|
import { findResumeRoute } from './core/resume.js';
|
|
23
24
|
import { SAME_LOGIN_FAMILIES, sameLoginGroups, sharedQuota } from './core/same-login.js';
|
|
@@ -283,6 +284,7 @@ export async function createRuntime(opts = {}) {
|
|
|
283
284
|
plugin: loaded.familyOwner.get(f.id) ?? 'unknown',
|
|
284
285
|
tuning: Boolean(f.readTuning),
|
|
285
286
|
...(hostSettingsFile(f) ? { settingsFile: hostSettingsFile(f) } : {}),
|
|
287
|
+
...(f.mainOnly ? { mainOnly: true } : {}),
|
|
286
288
|
};
|
|
287
289
|
}));
|
|
288
290
|
},
|
|
@@ -293,8 +295,8 @@ export async function createRuntime(opts = {}) {
|
|
|
293
295
|
const fromConfig = new Set(config.extraSharedItems?.[f.id] ?? []);
|
|
294
296
|
return {
|
|
295
297
|
...info.get(f.id),
|
|
296
|
-
layout: { main: f.layout.main, account: f.layout.account },
|
|
297
|
-
selectVar: f.selectVar,
|
|
298
|
+
layout: { main: f.layout.main, ...(f.layout.account ? { account: f.layout.account } : {}) },
|
|
299
|
+
...(f.selectVar ? { selectVar: f.selectVar } : {}),
|
|
298
300
|
login: { args: f.login.args ? [...f.login.args] : null, hint: f.login.hint },
|
|
299
301
|
quota: Boolean(f.readQuota || f.fetchQuota),
|
|
300
302
|
usage: Boolean(f.readUsage),
|
|
@@ -595,7 +597,10 @@ export async function createRuntime(opts = {}) {
|
|
|
595
597
|
// Routing helps only a Family that can route and has somewhere else to route to (spec §3.15).
|
|
596
598
|
const routes = config.resumeRouting
|
|
597
599
|
? [...families.values()]
|
|
598
|
-
.filter((f) => f.
|
|
600
|
+
.filter((f) => f.selectVar &&
|
|
601
|
+
f.resumedSession &&
|
|
602
|
+
f.sessionWrittenAt &&
|
|
603
|
+
list.some((a) => a.family === f.id && !a.isMain))
|
|
599
604
|
.map((f) => ({ family: f.id, bin: f.bin, selectVar: f.selectVar }))
|
|
600
605
|
: [];
|
|
601
606
|
return shellInitScript(list, { ...config.aliases, ...config.pickCommands }, routes);
|
|
@@ -645,7 +650,7 @@ export async function createRuntime(opts = {}) {
|
|
|
645
650
|
throw new UserError(`${family.title} sessions cannot be routed; start an account yourself with \`sideby run <account> -- …\``);
|
|
646
651
|
const host = { family, bin: family.bin, args: [...userArgs], env };
|
|
647
652
|
// A select variable already set means an Account was chosen on purpose: run the Host as it is.
|
|
648
|
-
if (env[family.selectVar])
|
|
653
|
+
if (family.selectVar && env[family.selectVar])
|
|
649
654
|
return { launch: host };
|
|
650
655
|
const route = await findResumeRoute(family, await accounts(), userArgs);
|
|
651
656
|
const id = route.sessionId ? { sessionId: route.sessionId } : {};
|
|
@@ -836,7 +841,9 @@ export async function createRuntime(opts = {}) {
|
|
|
836
841
|
// The current Account: the one sideby started this process from, when it belongs to this Family.
|
|
837
842
|
const current = env.SIDEBY_ACCOUNT;
|
|
838
843
|
const from = current && list.some((a) => a.ref === current) ? current : undefined;
|
|
839
|
-
|
|
844
|
+
// The Takeover Limit follows the user's Handoff Threshold, so `sideby next` and Auto Handoff agree on "full".
|
|
845
|
+
const fullAt = takeoverLimit(handoffSettings(config).threshold);
|
|
846
|
+
return planHandoff(f.id, candidates, readContext().now, { ...o, fullAt, ...(from ? { from } : {}) });
|
|
840
847
|
},
|
|
841
848
|
handoffSettings: () => handoffSettings(config),
|
|
842
849
|
async handoffDecision(origin, used, opts = {}) {
|
package/dist/src/types.d.ts
CHANGED
|
@@ -17,8 +17,11 @@ export interface SharedItemDef {
|
|
|
17
17
|
export interface FamilyLayout {
|
|
18
18
|
/** Main Account directory relative to HOME, for example `.claude` or `.pi/agent`. */
|
|
19
19
|
main: string;
|
|
20
|
-
/**
|
|
21
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Other Accounts relative to HOME, with `<name>` in the first path segment: `.claude-<name>`, `.pi-<name>/agent`.
|
|
22
|
+
* Left out only by a Main-only Family (`mainOnly: true`, ADR-0047).
|
|
23
|
+
*/
|
|
24
|
+
account?: string;
|
|
22
25
|
}
|
|
23
26
|
export type LoginState = 'logged-in' | 'logged-out' | 'unknown';
|
|
24
27
|
/**
|
|
@@ -33,6 +36,18 @@ export interface FamilyLogo {
|
|
|
33
36
|
/** Name of the mark for tooltips; defaults to the Family title. */
|
|
34
37
|
title?: string;
|
|
35
38
|
fillRule?: 'nonzero' | 'evenodd';
|
|
39
|
+
/**
|
|
40
|
+
* Colour washes painted over the mark, in order, for a multicoloured mark (at most 4). Each fades in a straight line
|
|
41
|
+
* from `color` at `from` to transparent at `to`, in the 24x24 view box. `color` is then the base under them.
|
|
42
|
+
*/
|
|
43
|
+
gradients?: FamilyLogoGradient[];
|
|
44
|
+
}
|
|
45
|
+
/** One colour wash of a FamilyLogo: `color` at `from`, fading to transparent at `to`. */
|
|
46
|
+
export interface FamilyLogoGradient {
|
|
47
|
+
from: [number, number];
|
|
48
|
+
to: [number, number];
|
|
49
|
+
/** Hex colour such as `#3186FF`. */
|
|
50
|
+
color: string;
|
|
36
51
|
}
|
|
37
52
|
/**
|
|
38
53
|
* A Family's vendor website, for Browser Sign-ins (spec §3.24, ADR-0043): "Open in browser" opens `url` in a Chrome
|
|
@@ -139,8 +154,17 @@ export interface FamilyDef {
|
|
|
139
154
|
installUrl: string;
|
|
140
155
|
/** The Host's official one-line install command, shown before `installUrl`; sideby never runs it. */
|
|
141
156
|
installCommand?: string;
|
|
142
|
-
/**
|
|
143
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Environment variable that selects the Account directory. Not set for the Main Account. Left out only by a
|
|
159
|
+
* Main-only Family (`mainOnly: true`).
|
|
160
|
+
*/
|
|
161
|
+
selectVar?: string;
|
|
162
|
+
/**
|
|
163
|
+
* The Host offers no way to run a second Account apart from the first (no variable that moves its configuration
|
|
164
|
+
* directory, or a login kept in one fixed place): sideby knows only its Main Account and refuses to create others
|
|
165
|
+
* (ADR-0047). Set it with `selectVar` and `layout.account` both left out; any other combination is rejected.
|
|
166
|
+
*/
|
|
167
|
+
mainOnly?: true;
|
|
144
168
|
layout: FamilyLayout;
|
|
145
169
|
/**
|
|
146
170
|
* Entries that prove a directory is this Family's Account (besides a Secret File or an empty directory).
|
|
@@ -175,6 +199,12 @@ export interface FamilyDef {
|
|
|
175
199
|
* it read the images from the paths the prompt lists. Public contract, additive only.
|
|
176
200
|
*/
|
|
177
201
|
imageArg?: string;
|
|
202
|
+
/**
|
|
203
|
+
* The Host option that starts an interactive session with a first prompt, for a Host that refuses the prompt as a
|
|
204
|
+
* positional argument (Antigravity CLI: `--prompt-interactive`). An AI Task then passes `<promptArg>=<prompt>` in
|
|
205
|
+
* place of the positional prompt. Public contract, additive only.
|
|
206
|
+
*/
|
|
207
|
+
promptArg?: string;
|
|
178
208
|
/**
|
|
179
209
|
* Makes a Launch safe for an AI Task (spec §3.28 "权限检查", ADR-0031): given every argument the Host would get
|
|
180
210
|
* (Family defaults, the Account's config arguments, the task's own), returns them without any argument that
|
|
@@ -372,7 +402,7 @@ export interface QuotaFetchContext extends ReadContext {
|
|
|
372
402
|
signal: AbortSignal;
|
|
373
403
|
/**
|
|
374
404
|
* The environment the Host gets at Launch, before the Secret File and Plugin hooks: sideby's own, Hijack Variables
|
|
375
|
-
* cleared, the Family's `selectVar` set for every Account but the Main Account. Run the Host with this one.
|
|
405
|
+
* cleared, the Family's `selectVar` (if any) set for every Account but the Main Account. Run the Host with this one.
|
|
376
406
|
*/
|
|
377
407
|
hostEnv: Env;
|
|
378
408
|
}
|