sideby 0.35.1 → 0.35.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/build.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"20261102T095419-2a750b"}
|
|
@@ -705,6 +705,22 @@ export declare function askBridge(boot: {
|
|
|
705
705
|
origin: string;
|
|
706
706
|
};
|
|
707
707
|
}): boolean;
|
|
708
|
+
/**
|
|
709
|
+
* Whether a `message` event asks the Panel to read its state again (ADR-0006, 2026-11-02 amendment): the Portal around
|
|
710
|
+
* it changed something the Panel shows (its own Unattended switch, say) and posted
|
|
711
|
+
* `{ type: 'local-tools:refresh', version: 1 }`. Only the frame's own parent at the Panel's own origin counts; a Panel
|
|
712
|
+
* opened on its own has no parent to listen to. The message only triggers a read, never a change.
|
|
713
|
+
*/
|
|
714
|
+
export declare function portalRefresh(event: {
|
|
715
|
+
source: unknown;
|
|
716
|
+
origin: string;
|
|
717
|
+
data: unknown;
|
|
718
|
+
}, win: {
|
|
719
|
+
parent: unknown;
|
|
720
|
+
location: {
|
|
721
|
+
origin: string;
|
|
722
|
+
};
|
|
723
|
+
}): boolean;
|
|
708
724
|
/**
|
|
709
725
|
* The "Attached files" section of a Task Prompt (spec §3.28 "附件"), in `lang` (`zh`, otherwise English): one line
|
|
710
726
|
* per file with its absolute path and kind, plus how to look at a video. Empty without files. `heading` goes before
|
|
@@ -1252,6 +1252,20 @@ export function askBridge(boot, opts, win) {
|
|
|
1252
1252
|
}, win.location.origin);
|
|
1253
1253
|
return true;
|
|
1254
1254
|
}
|
|
1255
|
+
/**
|
|
1256
|
+
* Whether a `message` event asks the Panel to read its state again (ADR-0006, 2026-11-02 amendment): the Portal around
|
|
1257
|
+
* it changed something the Panel shows (its own Unattended switch, say) and posted
|
|
1258
|
+
* `{ type: 'local-tools:refresh', version: 1 }`. Only the frame's own parent at the Panel's own origin counts; a Panel
|
|
1259
|
+
* opened on its own has no parent to listen to. The message only triggers a read, never a change.
|
|
1260
|
+
*/
|
|
1261
|
+
export function portalRefresh(event, win) {
|
|
1262
|
+
if (!win.parent || win.parent === win || event.source !== win.parent)
|
|
1263
|
+
return false;
|
|
1264
|
+
if (event.origin !== win.location.origin)
|
|
1265
|
+
return false;
|
|
1266
|
+
const d = event.data;
|
|
1267
|
+
return Boolean(d && typeof d === 'object' && d.type === 'local-tools:refresh' && d.version === 1);
|
|
1268
|
+
}
|
|
1255
1269
|
/**
|
|
1256
1270
|
* The "Attached files" section of a Task Prompt (spec §3.28 "附件"), in `lang` (`zh`, otherwise English): one line
|
|
1257
1271
|
* per file with its absolute path and kind, plus how to look at a video. Empty without files. `heading` goes before
|
|
@@ -5,12 +5,13 @@ import { groupsToAccept } from '../core/inbound.js';
|
|
|
5
5
|
import { quotaIsStale } from '../core/quota-levels.js';
|
|
6
6
|
import { remoteControlTodo } from '../core/remote-control.js';
|
|
7
7
|
import { catalogMatchLevel, catalogNorm, searchCatalog } from '../core/search-catalog.js';
|
|
8
|
-
import { accountTitle, aiTaskAccounts, aliasArgsOf, aliasIssue, aliasPrefix, askBridge, askBridged, askCopy, attentionReasons, attentionWhy, autostartNote, bindingWindow, cacheHitRate, canLeaveLocal, categoryOrder, codeSwapOutcome, dotsKeepKeyboard, enableOutcome, fileSize, fixPrompt, foldSkips, foldToolCalls, formatDuration, handoffChangeOf, handoffHintAccount, handoffTaskFacts, hiddenIn, highlightParts, histFilters, historyEmpty, historyWhen, hotkeyFromKey, hotkeyPressKind, inDisplayOrder, loginClusters, loginKey, longWindow, maskEmail, matchesQuery, mdBlocks, mdInline, menuPlacement, mergeDaily, mergeUsage, messageChip, messageNews, messageToCheck, networkTaskFacts, newAccountDir, nextReset, orderedAliases, panelFixes, panelHint, panelLang, panelMigration, panelPrefs, passedWindow, pinnedIn, quotaAskable, quotaHighLevel, quotaPressure, radioStep, reloadForBuild, remoteControlSummary, reorder, resetWhen, rowBadge, runCodeSwap, saveHandoffChange, sendBlock, sendFileProblem, sendResultView, sessionAge, sessionLabelParts, sessionRowShape, shortCwd, shortSessionLabel, sortAccounts, sortMenu, sortSessions, steadyOrder, stripSecrets, suggestAlias, suggestName, switchFailure, tailInView, taskFindings, uaDayRuns, uaGroupPending, uaOnChoices, uaParseClock, uaPickTime, uaSameSlot, uaShouldRead, uaSlotNight, uaStatusParts, uaStepClock, uaToggleDay, uaWaitingCount, uaWhen, updatedAge, vendorAlias, widthFollower, widthTier, windowState, withPinned, } from './page-logic.js';
|
|
8
|
+
import { accountTitle, aiTaskAccounts, aliasArgsOf, aliasIssue, aliasPrefix, askBridge, askBridged, askCopy, attentionReasons, attentionWhy, autostartNote, bindingWindow, cacheHitRate, canLeaveLocal, categoryOrder, codeSwapOutcome, dotsKeepKeyboard, enableOutcome, fileSize, fixPrompt, foldSkips, foldToolCalls, formatDuration, handoffChangeOf, handoffHintAccount, handoffTaskFacts, hiddenIn, highlightParts, histFilters, historyEmpty, historyWhen, hotkeyFromKey, hotkeyPressKind, inDisplayOrder, loginClusters, loginKey, longWindow, maskEmail, matchesQuery, mdBlocks, mdInline, menuPlacement, mergeDaily, mergeUsage, messageChip, messageNews, messageToCheck, networkTaskFacts, newAccountDir, nextReset, orderedAliases, panelFixes, panelHint, panelLang, panelMigration, panelPrefs, passedWindow, pinnedIn, portalRefresh, quotaAskable, quotaHighLevel, quotaPressure, radioStep, reloadForBuild, remoteControlSummary, reorder, resetWhen, rowBadge, runCodeSwap, saveHandoffChange, sendBlock, sendFileProblem, sendResultView, sessionAge, sessionLabelParts, sessionRowShape, shortCwd, shortSessionLabel, sortAccounts, sortMenu, sortSessions, steadyOrder, stripSecrets, suggestAlias, suggestName, switchFailure, tailInView, taskFindings, uaDayRuns, uaGroupPending, uaOnChoices, uaParseClock, uaPickTime, uaSameSlot, uaShouldRead, uaSlotNight, uaStatusParts, uaStepClock, uaToggleDay, uaWaitingCount, uaWhen, updatedAge, vendorAlias, widthFollower, widthTier, windowState, withPinned, } from './page-logic.js';
|
|
9
9
|
// The component library's dropdown menu, copied by the brand repo's add script (--html into ui/); do not edit it.
|
|
10
10
|
import { CHECK, menuItem, menuScript } from './ui/dropdown-menu/dropdown-menu.html.js';
|
|
11
11
|
import { cn, esc } from './ui/lib/cn.js';
|
|
12
12
|
const LOGIC = [
|
|
13
13
|
quotaIsStale,
|
|
14
|
+
portalRefresh,
|
|
14
15
|
catalogNorm,
|
|
15
16
|
catalogMatchLevel,
|
|
16
17
|
searchCatalog,
|
|
@@ -9057,6 +9058,14 @@ const MAIN = String.raw `
|
|
|
9057
9058
|
setInterval(tick, 1000)
|
|
9058
9059
|
document.addEventListener('visibilitychange', wake)
|
|
9059
9060
|
window.addEventListener('focus', wake)
|
|
9061
|
+
// A Portal that changed something the Panel shows says so (ADR-0006): read the state now instead of at the next
|
|
9062
|
+
// round, and the Unattended page its list too, so the Portal's switch and this page never disagree for long.
|
|
9063
|
+
window.addEventListener('message', (e) => {
|
|
9064
|
+
if (!portalRefresh(e, window)) return
|
|
9065
|
+
ua.nextAt = 0
|
|
9066
|
+
ua.at = 0
|
|
9067
|
+
if (S.state && !conn.lost) load({ silent: true })
|
|
9068
|
+
})
|
|
9060
9069
|
`;
|
|
9061
9070
|
/** The page script: the tested helpers, then the page logic, in one strict-mode function. */
|
|
9062
9071
|
export const PAGE_SCRIPT = `(() => {\n 'use strict'\n${LOGIC}\n${MENU_LIB}\n${MAIN}\n${menuScript}\n})()\n`;
|
package/package.json
CHANGED
package/skills/sideby/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: sideby
|
|
3
3
|
description: Use when the user runs, or wants to run, several AI coding accounts (Claude Code, Codex, Grok Build, pi) side by side. Covers installing sideby and setting up a new account ("install sideby", "set up another Claude account", "add cc008", "配置一个 cc00x", "再加一个 Codex 账号"), explaining what accounts share and what stays separate ("what do my accounts share?", "这些账号共享了什么"), showing which account a session is ("show [cc001] in the status line", "加上账号标识"), finding a past session of any account ("找一下我上周改登录页的那个会话"), telling another running session something, in any account ("告诉 cc002 ……", "给跑构建的那个会话发消息"; Claude Code's own SendMessage reaches only sessions of the same account), seeing accounts, quota and usage, moving on when one hits its 5-hour or weekly limit, moving the current task to another account ("用 cc008 继续", "交回 cc008"), adding a short command (alias) or a pick command that starts whichever account has the most quota ("加个 cc"), adding an API account from a vendor's docs ("加一个 DeepSeek API 账号"), supporting a new tool, and repairing drifted account directories (skills, hooks, rules or settings not shared, wrong symlinks, credential file permissions). Drives the `sideby` CLI with `--json`; the agent does every step except browser sign-in, filling in secrets and starting interactive sessions, which it hands to the user as one command (inside an Auto Handoff session, `sideby handoff ready --to` moves the task itself).
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.35.
|
|
5
|
+
version: "0.35.2"
|
|
6
6
|
requires:
|
|
7
7
|
bins: [sideby, node]
|
|
8
8
|
cliHelp: sideby --help
|