instar 1.3.1237 → 1.3.1238
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/dashboard/index.html +4 -0
- package/dashboard/subscriptions.js +18 -6
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +14 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/core/EnrollmentWizard.d.ts +8 -2
- package/dist/core/EnrollmentWizard.d.ts.map +1 -1
- package/dist/core/EnrollmentWizard.js +77 -18
- package/dist/core/EnrollmentWizard.js.map +1 -1
- package/dist/core/PendingLoginStore.d.ts +13 -0
- package/dist/core/PendingLoginStore.d.ts.map +1 -1
- package/dist/core/PendingLoginStore.js +20 -0
- package/dist/core/PendingLoginStore.js.map +1 -1
- package/dist/data/standards-guard-index.json +2 -2
- package/dist/data/standards-guard-index.meta.json +3 -3
- package/dist/data/standards-registry.md +37 -37
- package/dist/data/standards-registry.meta.json +2 -2
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +20 -10
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +46 -46
- package/src/data/standards-guard-index.json +2 -2
- package/src/data/standards-guard-index.meta.json +3 -3
- package/src/data/standards-registry.md +37 -37
- package/src/data/standards-registry.meta.json +2 -2
- package/upgrades/1.3.1238.md +26 -0
- package/upgrades/side-effects/subscription-relogin-completion-witness.md +125 -0
package/dashboard/index.html
CHANGED
|
@@ -9857,6 +9857,10 @@
|
|
|
9857
9857
|
__subController = __subModule.createController({
|
|
9858
9858
|
doc: document, els, fetchImpl,
|
|
9859
9859
|
getOperatorSessionToken: () => operatorSessionToken,
|
|
9860
|
+
requestUnlock: () => {
|
|
9861
|
+
document.getElementById('authOverlay').style.display = 'flex';
|
|
9862
|
+
document.getElementById('pinInput').focus();
|
|
9863
|
+
},
|
|
9860
9864
|
});
|
|
9861
9865
|
}
|
|
9862
9866
|
__subController.start();
|
|
@@ -1045,6 +1045,7 @@ export function createController(opts) {
|
|
|
1045
1045
|
schedule = (fn, ms) => setTimeout(fn, ms),
|
|
1046
1046
|
cancel = (id) => clearTimeout(id),
|
|
1047
1047
|
getOperatorSessionToken = () => '',
|
|
1048
|
+
requestUnlock = () => {},
|
|
1048
1049
|
} = opts;
|
|
1049
1050
|
|
|
1050
1051
|
// matrixTransient: client-side last-attempt state per `${accountId}::${machineId}` cell (FD6 —
|
|
@@ -1139,7 +1140,11 @@ export function createController(opts) {
|
|
|
1139
1140
|
const profileId = els.profileProvision.querySelector('[aria-label="Profile name"]')?.value?.trim() || '';
|
|
1140
1141
|
const loginMethod = els.profileProvision.querySelector('[aria-label="Sign-in method"]')?.value || 'session-cookie';
|
|
1141
1142
|
const status = els.profileProvision.querySelector('.sub-profile-status');
|
|
1142
|
-
if (!proof) {
|
|
1143
|
+
if (!proof) {
|
|
1144
|
+
requestUnlock();
|
|
1145
|
+
status.textContent = 'Enter your dashboard PIN, then retry.';
|
|
1146
|
+
return;
|
|
1147
|
+
}
|
|
1143
1148
|
if (!identity || !profileId) { status.textContent = 'Enter the Google account and a profile name.'; return; }
|
|
1144
1149
|
button.setAttribute('disabled', 'disabled');
|
|
1145
1150
|
status.textContent = 'Preparing the private profile…';
|
|
@@ -1152,8 +1157,9 @@ export function createController(opts) {
|
|
|
1152
1157
|
});
|
|
1153
1158
|
const body = await response.json().catch(() => ({}));
|
|
1154
1159
|
if (!response.ok) {
|
|
1160
|
+
if (response.status === 401) requestUnlock();
|
|
1155
1161
|
status.textContent = response.status === 401
|
|
1156
|
-
? '
|
|
1162
|
+
? 'Enter your dashboard PIN, then retry.'
|
|
1157
1163
|
: `Couldn’t create the profile: ${body.error || 'try again'}`;
|
|
1158
1164
|
button.removeAttribute('disabled');
|
|
1159
1165
|
return;
|
|
@@ -1336,7 +1342,8 @@ export function createController(opts) {
|
|
|
1336
1342
|
if (!['approve', 'cancel', 'retry'].includes(action) || !episodeId) return;
|
|
1337
1343
|
const proof = getOperatorSessionToken();
|
|
1338
1344
|
if (!proof) {
|
|
1339
|
-
|
|
1345
|
+
requestUnlock();
|
|
1346
|
+
button.textContent = 'Enter PIN, then try again';
|
|
1340
1347
|
return;
|
|
1341
1348
|
}
|
|
1342
1349
|
button.setAttribute('disabled', 'disabled');
|
|
@@ -1352,7 +1359,8 @@ export function createController(opts) {
|
|
|
1352
1359
|
body: '{}',
|
|
1353
1360
|
});
|
|
1354
1361
|
if (!response.ok) {
|
|
1355
|
-
|
|
1362
|
+
if (response.status === 401) requestUnlock();
|
|
1363
|
+
button.textContent = response.status === 401 ? 'Enter PIN, then try again' : 'Couldn’t start — try again';
|
|
1356
1364
|
button.removeAttribute('disabled');
|
|
1357
1365
|
return;
|
|
1358
1366
|
}
|
|
@@ -1540,7 +1548,8 @@ export function createController(opts) {
|
|
|
1540
1548
|
return;
|
|
1541
1549
|
}
|
|
1542
1550
|
if (!proof) {
|
|
1543
|
-
|
|
1551
|
+
requestUnlock();
|
|
1552
|
+
setCellStatus(cell, 'Enter your dashboard PIN, then tap Repair sign-in once.');
|
|
1544
1553
|
return;
|
|
1545
1554
|
}
|
|
1546
1555
|
btn.setAttribute('disabled', 'disabled');
|
|
@@ -1554,7 +1563,10 @@ export function createController(opts) {
|
|
|
1554
1563
|
});
|
|
1555
1564
|
const body = await response.json().catch(() => ({}));
|
|
1556
1565
|
if (!response.ok) {
|
|
1557
|
-
|
|
1566
|
+
if (response.status === 401) requestUnlock();
|
|
1567
|
+
setCellStatus(cell, response.status === 401
|
|
1568
|
+
? 'Enter your dashboard PIN, then tap Repair sign-in once.'
|
|
1569
|
+
: body.error || 'Couldn’t start the repair — try again.');
|
|
1558
1570
|
btn.removeAttribute('disabled');
|
|
1559
1571
|
return;
|
|
1560
1572
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../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/commands/server.js
CHANGED
|
@@ -9,6 +9,7 @@ import { bindUnknownProducerTelegramSender, sendDeterministicTelegramNotice } fr
|
|
|
9
9
|
* topic message → find/spawn session → inject message → session replies via [telegram:N]
|
|
10
10
|
*/
|
|
11
11
|
import { execFile, execFileSync } from 'node:child_process';
|
|
12
|
+
import { createHmac } from 'node:crypto';
|
|
12
13
|
import fs from 'node:fs';
|
|
13
14
|
import os from 'node:os';
|
|
14
15
|
import path from 'node:path';
|
|
@@ -13542,6 +13543,19 @@ export async function startServer(options) {
|
|
|
13542
13543
|
return null;
|
|
13543
13544
|
}
|
|
13544
13545
|
},
|
|
13546
|
+
// Claude's `.claude.json` is a settings file and commonly predates a
|
|
13547
|
+
// repair, so its mere existence can never prove this login completed.
|
|
13548
|
+
// Capture an HMAC revision of the machine-local keychain blob before the
|
|
13549
|
+
// artifact is issued and require that revision to change. The auth bytes
|
|
13550
|
+
// never leave memory; only the keyed digest enters pending state.
|
|
13551
|
+
authRevisionWitness: async (login) => {
|
|
13552
|
+
if (login.framework !== 'claude-code' || !login.configHome)
|
|
13553
|
+
return null;
|
|
13554
|
+
const raw = await defaultKeychainExec.readService(credSwapService(login.configHome));
|
|
13555
|
+
if (!raw)
|
|
13556
|
+
return null;
|
|
13557
|
+
return createHmac('sha256', config.authToken ?? '').update(raw).digest('hex');
|
|
13558
|
+
},
|
|
13545
13559
|
driveLogin: new FrameworkLoginDriver({
|
|
13546
13560
|
// Capture with `tmux capture-pane -J` so a hard-WRAPPED verification URL is
|
|
13547
13561
|
// joined back into one line (the 2026-06-18 "code=t" truncation bug). Falls
|
|
@@ -13610,7 +13624,6 @@ export async function startServer(options) {
|
|
|
13610
13624
|
.catch(() => { });
|
|
13611
13625
|
enrollmentWizard
|
|
13612
13626
|
.sweepFollowMeCompletions({
|
|
13613
|
-
credentialReady: (l) => !!l.configHome && fs.existsSync(path.join(l.configHome, '.claude.json')),
|
|
13614
13627
|
onValidated: (login, email) => {
|
|
13615
13628
|
// Upsert (D5): a re-auth of an EXISTING pool account updates it back to
|
|
13616
13629
|
// active; only a genuinely-new account is added (add() refuses dup ids).
|