instar 1.3.1165 → 1.3.1166
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 +38 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/core/CodexAccountHealth.d.ts +89 -0
- package/dist/core/CodexAccountHealth.d.ts.map +1 -0
- package/dist/core/CodexAccountHealth.js +121 -0
- package/dist/core/CodexAccountHealth.js.map +1 -0
- package/dist/core/CodexCliIntelligenceProvider.d.ts +62 -0
- package/dist/core/CodexCliIntelligenceProvider.d.ts.map +1 -1
- package/dist/core/CodexCliIntelligenceProvider.js +78 -9
- package/dist/core/CodexCliIntelligenceProvider.js.map +1 -1
- package/dist/core/CompositeCredentialIdentityOracle.d.ts +51 -0
- package/dist/core/CompositeCredentialIdentityOracle.d.ts.map +1 -0
- package/dist/core/CompositeCredentialIdentityOracle.js +71 -0
- package/dist/core/CompositeCredentialIdentityOracle.js.map +1 -0
- package/dist/core/IntelligenceRouter.d.ts +20 -0
- package/dist/core/IntelligenceRouter.d.ts.map +1 -1
- package/dist/core/IntelligenceRouter.js +72 -5
- package/dist/core/IntelligenceRouter.js.map +1 -1
- package/dist/core/ProactiveSwapMonitor.d.ts +39 -1
- package/dist/core/ProactiveSwapMonitor.d.ts.map +1 -1
- package/dist/core/ProactiveSwapMonitor.js +66 -8
- package/dist/core/ProactiveSwapMonitor.js.map +1 -1
- package/dist/core/QuotaAwareScheduler.d.ts +2 -2
- package/dist/core/QuotaAwareScheduler.d.ts.map +1 -1
- package/dist/core/SubscriptionPool.d.ts +41 -0
- package/dist/core/SubscriptionPool.d.ts.map +1 -1
- package/dist/core/SubscriptionPool.js +56 -0
- package/dist/core/SubscriptionPool.js.map +1 -1
- package/dist/core/SwapAntiThrash.d.ts +2 -2
- package/dist/core/SwapAntiThrash.d.ts.map +1 -1
- package/dist/core/SwapLedger.d.ts +1 -1
- package/dist/core/SwapLedger.d.ts.map +1 -1
- package/dist/core/types.d.ts +15 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/data/standards-guard-index.json +1 -1
- package/dist/data/standards-guard-index.meta.json +2 -2
- package/dist/data/standards-registry.meta.json +1 -1
- package/dist/providers/adapters/openai-codex/codexSlotIdentity.d.ts +56 -0
- package/dist/providers/adapters/openai-codex/codexSlotIdentity.d.ts.map +1 -0
- package/dist/providers/adapters/openai-codex/codexSlotIdentity.js +115 -0
- package/dist/providers/adapters/openai-codex/codexSlotIdentity.js.map +1 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +20 -4
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/scripts/lint-no-direct-llm-http.js +9 -0
- package/src/data/builtin-manifest.json +46 -46
- package/src/data/standards-guard-index.json +1 -1
- package/src/data/standards-guard-index.meta.json +2 -2
- package/src/data/standards-registry.meta.json +1 -1
- package/upgrades/1.3.1166.md +121 -0
- package/upgrades/side-effects/codex-pool-latency-swap.md +369 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgFH,OAAO,EAAE,cAAc,EAAwD,MAAM,2BAA2B,CAAC;AAUjH,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AA0BjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAgI7D,OAAO,KAAK,EAAW,oBAAoB,EAAe,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAgFtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAA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A;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
|
package/dist/commands/server.js
CHANGED
|
@@ -5691,6 +5691,12 @@ export async function startServer(options) {
|
|
|
5691
5691
|
// opt-in flag that older versions accepted), we warn loudly and proceed with the
|
|
5692
5692
|
// subscription path.
|
|
5693
5693
|
let sharedIntelligence;
|
|
5694
|
+
// Late binding for the router's sibling-account failure tail. The router is built here;
|
|
5695
|
+
// the pool is built much later in boot (behind a dynamic import, to keep it off the boot
|
|
5696
|
+
// path). The resolver is only ever called at failure time, so binding it when the pool
|
|
5697
|
+
// appears is both correct and a smaller change than reordering boot — and it keeps the
|
|
5698
|
+
// module lazy. Null until then ⇒ no siblings ⇒ the shipped tail, unchanged.
|
|
5699
|
+
let siblingAccountResolver = null;
|
|
5694
5700
|
const staleApiProvider = config.intelligenceProvider === 'anthropic-api';
|
|
5695
5701
|
let intelligenceSource = 'none';
|
|
5696
5702
|
let resolvedFramework = 'claude-code';
|
|
@@ -6127,6 +6133,22 @@ export async function startServer(options) {
|
|
|
6127
6133
|
enabled: config.intelligence?.nonGatingFailureSwap?.enabled ?? true,
|
|
6128
6134
|
maxAttempts: config.intelligence?.nonGatingFailureSwap?.maxAttempts,
|
|
6129
6135
|
},
|
|
6136
|
+
// SIBLING-ACCOUNT failure tail: before the tail changes DOOR (whose last position
|
|
6137
|
+
// is claude-code — the main subscription this door exists to protect), try the
|
|
6138
|
+
// same door on another enrolled account of the same framework.
|
|
6139
|
+
//
|
|
6140
|
+
// Late-bound on purpose: the pool is constructed much later in boot, and this is
|
|
6141
|
+
// only ever called at failure time, so reading it lazily is both correct and the
|
|
6142
|
+
// smallest possible change to boot order.
|
|
6143
|
+
//
|
|
6144
|
+
// Eligibility lives HERE, not in the router: the pool owns account state. Only
|
|
6145
|
+
// `active` accounts qualify — a rate-limited or warming sibling is a known-bad
|
|
6146
|
+
// attempt against a gating deadline. Bounded to ONE sibling: the tail exists to
|
|
6147
|
+
// find an answer quickly, not to walk an entire pool while a gate waits.
|
|
6148
|
+
resolveSiblingAccounts: (framework, failedAccountId) =>
|
|
6149
|
+
// Null until the pool is built (or on an agent that never builds one) ⇒ no
|
|
6150
|
+
// siblings ⇒ the shipped tail runs exactly as before.
|
|
6151
|
+
siblingAccountResolver?.(framework, failedAccountId) ?? [],
|
|
6130
6152
|
// The dedicated queue for the DEFERRABLE queue rung (§3b.3); undefined when the rung is
|
|
6131
6153
|
// dark ⇒ the rung is a no-op (a deferrable call falls straight to its heuristic, as before).
|
|
6132
6154
|
llmQueue: degradationLadderQueue,
|
|
@@ -12284,8 +12306,23 @@ export async function startServer(options) {
|
|
|
12284
12306
|
// Subscription & Auth Standard). Always instantiated; ships DARK because an
|
|
12285
12307
|
// empty pool is a pure no-op (no background loop, no cost) until an operator
|
|
12286
12308
|
// enrolls an account. Stores each account's login LOCATION, never tokens.
|
|
12287
|
-
const { SubscriptionPool, requiresOwnerRelogin } = await import('../core/SubscriptionPool.js');
|
|
12309
|
+
const { SubscriptionPool, requiresOwnerRelogin, eligibleSiblingAccounts } = await import('../core/SubscriptionPool.js');
|
|
12288
12310
|
const subscriptionPool = new SubscriptionPool({ stateDir: config.stateDir });
|
|
12311
|
+
// Arm the already-built router's sibling-account failure tail. Read live (not a
|
|
12312
|
+
// snapshot) so an account enrolled, rate-limited or disabled later is reflected on the
|
|
12313
|
+
// next failure. Until this line runs the router's resolver sees null and returns no
|
|
12314
|
+
// siblings, so a failure during boot walks exactly the tail it always did.
|
|
12315
|
+
siblingAccountResolver = (framework, failedAccountId) => eligibleSiblingAccounts(subscriptionPool.list(), framework, failedAccountId, {
|
|
12316
|
+
// Internal calls run on the AMBIENT login today, so `failedAccountId` is almost
|
|
12317
|
+
// always null and the id-based self-exclusion cannot fire. The ambient home is
|
|
12318
|
+
// how we identify which enrolled account actually ran. Same derivation the
|
|
12319
|
+
// Threadline codex bootstrap already uses (empirically verified against a live
|
|
12320
|
+
// ~/.codex). Non-codex doors have no equivalent, so they pass undefined and the
|
|
12321
|
+
// resolver refuses rather than guesses.
|
|
12322
|
+
ambientConfigHome: framework === 'codex-cli'
|
|
12323
|
+
? process.env['CODEX_HOME'] || path.join(os.homedir(), '.codex')
|
|
12324
|
+
: null,
|
|
12325
|
+
});
|
|
12289
12326
|
if (subscriptionPool.size() > 0) {
|
|
12290
12327
|
console.log(pc.green(` Subscription pool: ${subscriptionPool.size()} account(s) registered`));
|
|
12291
12328
|
}
|