instar 1.3.834 → 1.3.835
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/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +102 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/core/CredentialIdentityRepairPlan.d.ts +42 -0
- package/dist/core/CredentialIdentityRepairPlan.d.ts.map +1 -0
- package/dist/core/CredentialIdentityRepairPlan.js +82 -0
- package/dist/core/CredentialIdentityRepairPlan.js.map +1 -0
- package/dist/core/CredentialLocationLedger.d.ts +2 -1
- package/dist/core/CredentialLocationLedger.d.ts.map +1 -1
- package/dist/core/CredentialLocationLedger.js +15 -4
- package/dist/core/CredentialLocationLedger.js.map +1 -1
- package/dist/core/CredentialSwapExecutor.d.ts +6 -0
- package/dist/core/CredentialSwapExecutor.d.ts.map +1 -1
- package/dist/core/CredentialSwapExecutor.js +102 -0
- package/dist/core/CredentialSwapExecutor.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +14 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/QuotaPoller.d.ts +31 -0
- package/dist/core/QuotaPoller.d.ts.map +1 -1
- package/dist/core/QuotaPoller.js +106 -10
- package/dist/core/QuotaPoller.js.map +1 -1
- package/dist/core/SubscriptionPool.d.ts +19 -0
- package/dist/core/SubscriptionPool.d.ts.map +1 -1
- package/dist/core/SubscriptionPool.js +12 -2
- package/dist/core/SubscriptionPool.js.map +1 -1
- package/dist/core/WriteDomainRegistry.d.ts.map +1 -1
- package/dist/core/WriteDomainRegistry.js +14 -0
- package/dist/core/WriteDomainRegistry.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +1 -0
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/routes.d.ts +19 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +24 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +63 -63
- package/src/scaffold/templates.ts +1 -0
- package/upgrades/1.3.835.md +25 -0
- package/upgrades/eli16/subscription-pool-identity-repair.md +27 -0
- package/upgrades/side-effects/subscription-pool-identity-repair.md +129 -0
|
@@ -5346,6 +5346,7 @@ Rule: I do not state that work landed inside another agent's state unless I have
|
|
|
5346
5346
|
- **Continuity guarantee** — a long session that hits its account's quota resumes on another eligible account (conversation preserved via \`--resume\`), never dies. Manual lever: \`POST /subscription-pool/swap\` \`{"sessionName":"...","exhaustedAccountId":"..."}\`. Auto-swap on rate-limit ships OFF (opt-in via \`subscriptionPool.autoSwapOnRateLimit\` — it moves a live session, real authority).
|
|
5347
5347
|
- **Pre-limit (proactive) swap** — beyond the reactive swap above, I can move a session OFF an account BEFORE it walls, at a lag-aware measured threshold (default 80% — the polled reading trails real usage, so the swap completes with margin). It also covers the UNTAGGED interactive session (resolves its account from the default login), so the session you talk to doesn't wedge at the wall. Opt-in via \`subscriptionPool.proactiveSwap.enabled\` (same authority as auto-swap, earlier trigger). Status: \`GET /subscription-pool/proactive-swap\`; run a pass now: \`POST /subscription-pool/proactive-swap/check\`.
|
|
5348
5348
|
- **Anti-thrash brakes + in-flight work protection on swaps** — the proactive swap carries brakes so it can never ping-pong sessions between hot accounts: when EVERY account is hot it STAYS PUT (\`all-hot\` refusal), a just-swapped session dwells ~45 min before it can be moved again (restart-safe via \`state/swap-ledger.jsonl\`), and a swap only executes onto a target that is MATERIALLY cooler on a fresh quota reading. A session mid-turn or carrying live subagents is never killed by an optimization — the swap DEFERS until the work lands (a forced/reactive kill carries a mitigation note enumerating interrupted subagents + re-injecting the last unanswered message). Brakes ship dry-run first (\`subscriptionPool.proactiveSwap.antiThrash.dryRun\`); the work gate's \`subscriptionPool.swapContinuity.enabled\` is restart-required. "Why didn't my session swap?" → \`GET /subscription-pool/proactive-swap\` \`brakes\`/\`deferrals\` blocks name the refusal; "why did my refresh get a session-busy error?" → the work gate refused to kill in-flight work — wait, or re-issue with \`force:true\`.
|
|
5349
|
+
- **Credential identity drift is self-healing safety state** — quota follows the account proven by the live token, never a stale slot label. \`GET /subscription-pool\` exposes \`identityDrifted\` + credential-free evidence; drifted slots are excluded from capacity and every swap target. Repair is planned/audited through the existing staged credential-swap machinery, with a live identity pre-flight before every swap; uncertainty quarantines. A login absent from this machine becomes an owner re-login commitment with enrollment links (Claude logins are never copied across machines).
|
|
5349
5350
|
- **Enroll a new account from your phone** — \`POST /subscription-pool/enroll\` \`{"id","label","provider","framework","configHome"}\` starts a login and returns a public code/URL (never a token); \`GET /subscription-pool/pending-logins\` is the surface; expired codes are auto-reissued. Mark done with \`POST /subscription-pool/enroll/:id/complete\`, or safely abandon a stuck login with \`POST /subscription-pool/enroll/:id/cancel\`.
|
|
5350
5351
|
- **Dashboard**: the **Subscriptions tab** shows live quota bars (5h + weekly + reset countdown), status, and the Pending Logins panel — share the dashboard URL + PIN.
|
|
5351
5352
|
- **When to use** (PROACTIVE): "how much quota is left across my accounts?" / "am I about to hit a limit?" → \`GET /subscription-pool\`; the user wants to add another subscription → drive the enrollment wizard (never ask them to paste a token); a long job is at risk of a quota wall → the continuity guarantee + \`/swap\` keep it alive. Single-account pools are a no-op.
|
|
@@ -5386,6 +5387,19 @@ Rule: I do not state that work landed inside another agent's state unless I have
|
|
|
5386
5387
|
result.upgraded.push('CLAUDE.md: added Subscription Pool anti-thrash brakes + work-gate bullet');
|
|
5387
5388
|
}
|
|
5388
5389
|
}
|
|
5390
|
+
// Tier-0 credential identity-drift awareness for existing agents. Fresh
|
|
5391
|
+
// templates carry the same bullet above; this content-sniffed insertion is
|
|
5392
|
+
// Migration Parity and never rewrites operator-customized surrounding text.
|
|
5393
|
+
if (content.includes('Subscription Pool (multi-account quota') &&
|
|
5394
|
+
!content.includes('Credential identity drift is self-healing safety state')) {
|
|
5395
|
+
const driftBullet = '\n- **Credential identity drift is self-healing safety state** — quota follows the account proven by the live token, never a stale slot label. `GET /subscription-pool` exposes `identityDrifted` + credential-free evidence; drifted slots are excluded from capacity and every swap target. Repair is planned/audited through the existing staged credential-swap machinery, with a live identity pre-flight before every swap; uncertainty quarantines. A login absent from this machine becomes an owner re-login commitment with enrollment links (Claude logins are never copied across machines).';
|
|
5396
|
+
const heading = '## Subscription Pool (multi-account quota + seamless continuation)';
|
|
5397
|
+
if (content.includes(heading)) {
|
|
5398
|
+
content = content.replace(heading, heading + driftBullet);
|
|
5399
|
+
patched = true;
|
|
5400
|
+
result.upgraded.push('CLAUDE.md: added credential identity-drift self-healing awareness');
|
|
5401
|
+
}
|
|
5402
|
+
}
|
|
5389
5403
|
// WS5.1 pool-scope read awareness. Existing agents that ALREADY carry the
|
|
5390
5404
|
// Subscription Pool section won't get the new bullet from the section-install
|
|
5391
5405
|
// guard above. Patch it in idempotently: insert the pool-scope bullet right
|