instar 1.3.549 → 1.3.551

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.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgCH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAS3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AAuBjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAiH7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAsBtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC1C,OAAO,CAUT;AAyID,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAm3CD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,cAAc,EAAE,cAAc,EAC9B,YAAY,CAAC,EAAE,YAAY,EAC3B,WAAW,CAAC,EAAE,WAAW,EACzB,WAAW,CAAC,EAAE,WAAW,EACzB,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,EAGvE,UAAU,CAAC,EAAE,MAAM,OAAO,8BAA8B,EAAE,WAAW,GAAG,IAAI,EAK5E,qBAAqB,CAAC,EAAE,MAAM,OAAO,gCAAgC,EAAE,kBAAkB,GAAG,IAAI,EAKhG,mBAAmB,CAAC,EAAE,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AE,WAAW,EACzB,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,EAGvE,UAAU,CAAC,EAAE,MAAM,OAAO,8BAA8B,EAAE,WAAW,GAAG,IAAI,EAK5E,qBAAqB,CAAC,EAAE,MAAM,OAAO,gCAAgC,EAAE,kBAAkB,GAAG,IAAI,EAKhG,mBAAmB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,GACpD,IAAI,CA8eN;AA2lBD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAotbtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;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"}
@@ -8762,21 +8762,26 @@ export async function startServer(options) {
8762
8762
  // (dev-gate-resolved AND the §2.10 env-token gate), and the executor's own dryRun keeps it a
8763
8763
  // dry-run dogfood on a dev agent (full decision loop + audit, ZERO writes) until dryRun:false.
8764
8764
  const { CredentialRebalancer } = await import('../core/CredentialRebalancer.js');
8765
- const { mapSlots: credMapSlots, mapAccounts: credMapAccounts, resolveRebalancerConfig: credResolveBalancerConfig } = await import('../core/CredentialRebalancerSnapshot.js');
8765
+ const { mapSlots: credMapSlots, mapAccounts: credMapAccounts, resolveRebalancerConfig: credResolveBalancerConfig, computeBusynessBySlot: credComputeBusyness } = await import('../core/CredentialRebalancerSnapshot.js');
8766
8766
  const CRED_DEFAULT_SLOT = '~/.claude';
8767
8767
  const credentialRebalancer = new CredentialRebalancer({
8768
8768
  // Same gate as the location gate: dev-gate-resolved AND not env-token-refused.
8769
8769
  isEnabled: () => resolveDevAgentGate(config.subscriptionPool?.credentialRepointing?.enabled, config) &&
8770
8770
  !credentialEnvTokenGate.evaluate().refused,
8771
8771
  isDryRun: () => config.subscriptionPool?.credentialRepointing?.dryRun !== false,
8772
- listSlots: () => credMapSlots(credentialLocationLedger.getAssignments(), { defaultSlot: CRED_DEFAULT_SLOT }),
8772
+ // Busyness = count of RUNNING claude-code sessions per slot (the drain "busiest slot"
8773
+ // signal), resolved from the live session list through the ledger's account→slot map.
8774
+ listSlots: () => credMapSlots(credentialLocationLedger.getAssignments(), {
8775
+ defaultSlot: CRED_DEFAULT_SLOT,
8776
+ busynessBySlot: credComputeBusyness(state.listSessions(), (accountId) => credentialLocationLedger.slotOf(accountId), CRED_DEFAULT_SLOT),
8777
+ }),
8773
8778
  listAccounts: () => credMapAccounts(subscriptionPool.list(), Date.now()),
8774
8779
  resolveConfig: () => credResolveBalancerConfig({
8775
8780
  ...(config.subscriptionPool?.credentialRepointing?.balancer ?? {}),
8776
8781
  slotCount: credentialLocationLedger.getAssignments().length,
8777
- // Dry-run dogfood defaults: keep the account currently in ~/.claude as the desired
8778
- // default (objective-0 keeps it alive). An explicit operator default-account config +
8779
- // tmux-activity busyness for the drain target are refinements <!-- tracked: 20905 -->.
8782
+ // Dry-run dogfood default: keep the account currently in ~/.claude as the desired
8783
+ // default (objective-0 keeps it alive). An explicit operator default-account config
8784
+ // is a refinement <!-- tracked: 20905 -->.
8780
8785
  desiredDefaultAccountId: credentialLocationLedger.tenantOf(CRED_DEFAULT_SLOT) ?? null,
8781
8786
  }),
8782
8787
  swap: async (a, b) => {