@claudexor/orchestrator 3.5.0 → 3.6.0

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.
Files changed (57) hide show
  1. package/dist/account-pool.d.ts +62 -0
  2. package/dist/account-pool.d.ts.map +1 -0
  3. package/dist/account-pool.js +103 -0
  4. package/dist/account-pool.js.map +1 -0
  5. package/dist/account-resolution.d.ts +85 -0
  6. package/dist/account-resolution.d.ts.map +1 -0
  7. package/dist/account-resolution.js +320 -0
  8. package/dist/account-resolution.js.map +1 -0
  9. package/dist/attemptOutputMarkers.d.ts +30 -0
  10. package/dist/attemptOutputMarkers.d.ts.map +1 -0
  11. package/dist/attemptOutputMarkers.js +31 -0
  12. package/dist/attemptOutputMarkers.js.map +1 -0
  13. package/dist/attemptTelemetry.d.ts +5 -4
  14. package/dist/attemptTelemetry.d.ts.map +1 -1
  15. package/dist/attemptTelemetry.js +4 -2
  16. package/dist/attemptTelemetry.js.map +1 -1
  17. package/dist/credential-cooldown.d.ts +131 -0
  18. package/dist/credential-cooldown.d.ts.map +1 -0
  19. package/dist/credential-cooldown.js +169 -0
  20. package/dist/credential-cooldown.js.map +1 -0
  21. package/dist/credential-differential.d.ts +81 -0
  22. package/dist/credential-differential.d.ts.map +1 -0
  23. package/dist/credential-differential.js +110 -0
  24. package/dist/credential-differential.js.map +1 -0
  25. package/dist/credential-preflight.d.ts +36 -0
  26. package/dist/credential-preflight.d.ts.map +1 -0
  27. package/dist/credential-preflight.js +78 -0
  28. package/dist/credential-preflight.js.map +1 -0
  29. package/dist/credential-profile-rotation.d.ts +80 -54
  30. package/dist/credential-profile-rotation.d.ts.map +1 -1
  31. package/dist/credential-profile-rotation.js +191 -163
  32. package/dist/credential-profile-rotation.js.map +1 -1
  33. package/dist/credential-profiles.d.ts +3 -49
  34. package/dist/credential-profiles.d.ts.map +1 -1
  35. package/dist/credential-profiles.js +2 -46
  36. package/dist/credential-profiles.js.map +1 -1
  37. package/dist/index.d.ts +2 -1
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +2 -1
  40. package/dist/index.js.map +1 -1
  41. package/dist/laneStreamEvents.d.ts +54 -0
  42. package/dist/laneStreamEvents.d.ts.map +1 -0
  43. package/dist/laneStreamEvents.js +81 -0
  44. package/dist/laneStreamEvents.js.map +1 -0
  45. package/dist/orchestrator-credentials.d.ts +93 -0
  46. package/dist/orchestrator-credentials.d.ts.map +1 -0
  47. package/dist/orchestrator-credentials.js +156 -0
  48. package/dist/orchestrator-credentials.js.map +1 -0
  49. package/dist/orchestrator.d.ts +17 -30
  50. package/dist/orchestrator.d.ts.map +1 -1
  51. package/dist/orchestrator.js +278 -324
  52. package/dist/orchestrator.js.map +1 -1
  53. package/dist/rotation-predicate.d.ts +71 -0
  54. package/dist/rotation-predicate.d.ts.map +1 -0
  55. package/dist/rotation-predicate.js +29 -0
  56. package/dist/rotation-predicate.js.map +1 -0
  57. package/package.json +17 -17
@@ -0,0 +1,110 @@
1
+ import { liveUnusableFor } from "./credential-cooldown.js";
2
+ import { staticRotationCandidates } from "./credential-profile-rotation.js";
3
+ import { probeCredentialProfileStatus, profileStatusAdmits, vendorVerifiedProfileStatus, } from "./credential-profiles.js";
4
+ /** Bounded per-code TTLs (clearing contract, half one: self-expiry). A vendor
5
+ * 401/403 is high-confidence and worth hours; an entitlement/probe verdict can
6
+ * be model- or configuration-shaped, so it self-heals within the hour even if
7
+ * nothing clears it earlier. The ledger clamps every write to 24h max. */
8
+ const UNUSABLE_TTL_MS = {
9
+ auth_revoked: 6 * 60 * 60_000,
10
+ capability_refused: 60 * 60_000,
11
+ verification_failed: 60 * 60_000,
12
+ };
13
+ function observation(args, code, source, model, detail) {
14
+ return {
15
+ harness_id: args.harnessId,
16
+ profile_id: args.profileId,
17
+ model,
18
+ code,
19
+ source,
20
+ detail,
21
+ observed_at: args.now.toISOString(),
22
+ expires_at: new Date(args.now.getTime() + UNUSABLE_TTL_MS[code]).toISOString(),
23
+ };
24
+ }
25
+ /**
26
+ * The differential verdict for ONE subject, from evidence that already exists.
27
+ * Returns a typed observation ONLY when the evidence distinguishes a dead
28
+ * credential from spent quota; "quota spent" and "inconclusive" both return
29
+ * null (rotation's cooldown/limit machinery already owns those).
30
+ */
31
+ export async function differentialSubjectVerdict(args) {
32
+ const profileId = args.profile?.profile_id ?? null;
33
+ const ctx = { harnessId: args.harnessId, profileId, now: args.now ?? new Date() };
34
+ // 1. The attempt's own stream: a typed NON-RETRYABLE auth/entitlement
35
+ // refusal the vendor just sent under this exact credential. An auth
36
+ // rejection condemns the credential for every model; an entitlement refusal
37
+ // may be model-scoped, so it condemns only the model this attempt ran.
38
+ const refusal = args.transients.find((t) => !t.retryable && (t.category === "auth_failed" || t.category === "capability_refused"));
39
+ if (refusal) {
40
+ return observation(ctx, refusal.category === "auth_failed" ? "auth_revoked" : "capability_refused", "attempt_stream", refusal.category === "auth_failed" ? null : args.model, refusal.adapterCode);
41
+ }
42
+ // 2. The quota poller's last authenticated vendor contact: a typed
43
+ // `auth_revoked` absence means the vendor rejected this subject's own token.
44
+ const revoked = args.quota.absences.find((a) => a.subject.harness === args.harnessId &&
45
+ (a.subject.subject_id ?? null) === profileId &&
46
+ a.reason === "auth_revoked");
47
+ if (revoked)
48
+ return observation(ctx, "auth_revoked", "vendor_poller", null, revoked.detail);
49
+ // 3. The local doctor probe (pinned profiles only — the default subject has
50
+ // no per-profile probe surface): a FAILED verification, vendor overlay
51
+ // included, is a dead-credential fact the quota path cannot see.
52
+ if (args.profile && args.probe) {
53
+ const status = vendorVerifiedProfileStatus(await probeCredentialProfileStatus(args.profile, args.probe), args.quota);
54
+ if (status.verification === "failed") {
55
+ return observation(ctx, "verification_failed", "local_probe", null, status.detail ?? null);
56
+ }
57
+ }
58
+ return null;
59
+ }
60
+ /**
61
+ * Factory for the SIBLING probe `rotateSpecOnTypedLimit` fires next to its
62
+ * candidate-readiness probe (grok amendment: the current subject is
63
+ * structurally excluded from `staticRotationCandidates`, so it gets its own
64
+ * call, never a seat in the candidate list). Records the observation through
65
+ * the caller's sink when one is configured; the rotation module owns the run
66
+ * event.
67
+ */
68
+ export function currentSubjectProber(args) {
69
+ return async () => {
70
+ const verdict = await differentialSubjectVerdict(args);
71
+ if (verdict) {
72
+ try {
73
+ args.record?.(verdict);
74
+ }
75
+ catch {
76
+ /* the evidence sink must never fail the rotation decision */
77
+ }
78
+ }
79
+ return verdict;
80
+ };
81
+ }
82
+ /**
83
+ * Fresh profile readiness for one rotation decision epoch (hoisted from the
84
+ * orchestrator so the composition lives beside the probe it siblings).
85
+ * Accounts uses the same probe wrapper + vendor overlay + admission predicate
86
+ * when projecting next_up. A LIVE `credential_unusable` observation refuses a
87
+ * candidate at this SAME composition point (A7): rotating INTO a profile we
88
+ * observed dead would spend a whole attempt to rediscover the refusal.
89
+ */
90
+ export async function readyProfilesForRotation(args) {
91
+ const profiles = staticRotationCandidates({
92
+ registry: args.registry,
93
+ harnessId: args.harnessId,
94
+ policy: args.policy,
95
+ current: args.current,
96
+ excluded: args.excluded ?? new Set(),
97
+ });
98
+ const entries = await Promise.all(profiles.map(async (profile) => ({
99
+ profile,
100
+ // Rotating INTO a profile the vendor has already rejected would spend a
101
+ // whole attempt to rediscover the 401 the poller reported a minute ago.
102
+ status: vendorVerifiedProfileStatus(await probeCredentialProfileStatus(profile, args.probe), args.quota),
103
+ })));
104
+ return new Set(entries
105
+ .filter(({ profile, status }) => profileStatusAdmits(profile, status) &&
106
+ liveUnusableFor(args.unusable ?? [], args.harnessId, profile.profile_id, args.model) ===
107
+ null)
108
+ .map(({ profile }) => profile.profile_id));
109
+ }
110
+ //# sourceMappingURL=credential-differential.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-differential.js","sourceRoot":"","sources":["../src/credential-differential.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAsB,MAAM,kCAAkC,CAAC;AAChG,OAAO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OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC;YAClF,IAAI,CACT;SACA,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAC5C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * PRE-SPAWN credential preflight of the LEGACY default subject (W5.4
3
+ * `profile_headroom_preflight` + A4 live blocks + A5 pool-exhausted split),
4
+ * split from `credential-profile-rotation` so each file stays under the
5
+ * complexity cap. Under the unified account model (INV-135) this module
6
+ * serves ONLY harnesses with no registered subscription rows (unmigrated
7
+ * stores): pinned runs refuse strictly in the account-resolution owner
8
+ * (D-U6 — a pin never rotates), and unpinned runs of migrated harnesses
9
+ * route through the quota-aware account pool. Re-exported through
10
+ * `credential-profiles` like its siblings.
11
+ */
12
+ import type { CredentialProfile, CredentialUnusableObservation, QuotaSnapshot } from "@claudexor/schema";
13
+ import { type EmitFn, type ProfilePolicy } from "./credential-profile-rotation.js";
14
+ /**
15
+ * Default-subject start selection (INV-135, owner scope "auto-balance"): when
16
+ * NO profile is pinned, the EFFECTIVE action is `rotate` (explicit, or `auto`
17
+ * on a subscription route — A6), and the DEFAULT store's own fresh quota
18
+ * window is at/over the headroom bound, pick the first eligible SUBSCRIPTION
19
+ * profile instead of spawning into a near-certain vendor limit. Explicit
20
+ * `fail`/`ask` keep the pre-A6 default-user behavior untouched (strict
21
+ * refusal is the PINNED lane's business, owned by account-resolution —
22
+ * throwing here on a bare breach would brick every default user at 90%
23
+ * quota). Unknown or stale usage never rotates.
24
+ */
25
+ export declare function preflightDefaultSubject(args: {
26
+ harnessId: string;
27
+ policy: ProfilePolicy;
28
+ registry: readonly CredentialProfile[];
29
+ snapshots: readonly QuotaSnapshot[];
30
+ readyProfileIds: ReadonlySet<string>;
31
+ defaultRoute: "local_session" | "api_key" | null;
32
+ unusable?: readonly CredentialUnusableObservation[];
33
+ model?: string | null;
34
+ emit: EmitFn;
35
+ }): CredentialProfile | null;
36
+ //# sourceMappingURL=credential-preflight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-preflight.d.ts","sourceRoot":"","sources":["../src/credential-preflight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EACV,iBAAiB,EACjB,6BAA6B,EAC7B,aAAa,EACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAKL,KAAK,MAAM,EACX,KAAK,aAAa,EACnB,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACvC,SAAS,EAAE,SAAS,aAAa,EAAE,CAAC;IACpC,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,YAAY,EAAE,eAAe,GAAG,SAAS,GAAG,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,SAAS,6BAA6B,EAAE,CAAC;IACpD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,iBAAiB,GAAG,IAAI,CA6E3B"}
@@ -0,0 +1,78 @@
1
+ import { credentialPoolExhausted, profileQuotaBlock } from "./credential-cooldown.js";
2
+ import { effectiveLimitAction, emitRotationExhausted, nextEligibleProfile, profileHeadroomBreach, } from "./credential-profile-rotation.js";
3
+ /**
4
+ * Default-subject start selection (INV-135, owner scope "auto-balance"): when
5
+ * NO profile is pinned, the EFFECTIVE action is `rotate` (explicit, or `auto`
6
+ * on a subscription route — A6), and the DEFAULT store's own fresh quota
7
+ * window is at/over the headroom bound, pick the first eligible SUBSCRIPTION
8
+ * profile instead of spawning into a near-certain vendor limit. Explicit
9
+ * `fail`/`ask` keep the pre-A6 default-user behavior untouched (strict
10
+ * refusal is the PINNED lane's business, owned by account-resolution —
11
+ * throwing here on a bare breach would brick every default user at 90%
12
+ * quota). Unknown or stale usage never rotates.
13
+ */
14
+ export function preflightDefaultSubject(args) {
15
+ const { harnessId, policy, registry, snapshots, readyProfileIds, defaultRoute, model, emit } = args;
16
+ // A6: `auto` resolves by the DEFAULT subject's route — a subscription
17
+ // default rotates, a metered or unknown default keeps today's behavior.
18
+ const action = effectiveLimitAction(policy, defaultRoute);
19
+ if (action !== "rotate" || defaultRoute !== "local_session")
20
+ return null;
21
+ const breach = profileHeadroomBreach(snapshots, harnessId, null, policy.headroom_threshold, model);
22
+ // Same A4 cooldown reader as the pinned lane: the default subject's own
23
+ // observed live block (reactive cooldown / spent window) rotates too. The
24
+ // guard above pins `defaultRoute === "local_session"`, so the block is read
25
+ // for the SUBSCRIPTION default subject only.
26
+ const block = breach ? null : profileQuotaBlock(snapshots, harnessId, null, defaultRoute, model);
27
+ if (!breach && !block)
28
+ return null;
29
+ emit("route.profile.headroom_exceeded", {
30
+ harness_id: harnessId,
31
+ profile_id: null,
32
+ action,
33
+ constraint_id: breach?.constraint_id ?? block?.constraint_id ?? null,
34
+ used_ratio: breach?.used_ratio ?? null,
35
+ threshold: policy.headroom_threshold,
36
+ resets_at: breach?.resets_at ?? block?.resets_at ?? null,
37
+ });
38
+ const next = nextEligibleProfile(registry, harnessId, policy, null, snapshots, readyProfileIds, new Set(), model);
39
+ if (!next) {
40
+ const candidates = emitRotationExhausted({
41
+ current: null,
42
+ harnessId,
43
+ policy,
44
+ registry,
45
+ snapshots,
46
+ readyProfileIds,
47
+ unusable: args.unusable,
48
+ model,
49
+ reason: "profile_headroom_preflight",
50
+ emit,
51
+ });
52
+ // Same A5 preflight split as the pinned lane: the DEFAULT subject's own
53
+ // observed live block with no eligible alternative refuses typed before
54
+ // spawn; a bare headroom breach proceeds (not proven spent).
55
+ const hard = block ?? profileQuotaBlock(snapshots, harnessId, null, defaultRoute, model);
56
+ if (hard) {
57
+ throw credentialPoolExhausted({
58
+ harnessId,
59
+ profileId: null,
60
+ reason: "profile_headroom_preflight",
61
+ candidates,
62
+ subjectLimit: { resets_at: hard.resets_at },
63
+ });
64
+ }
65
+ return null;
66
+ }
67
+ emit("route.profile.rotated", {
68
+ harness_id: harnessId,
69
+ from_profile_id: null,
70
+ to_profile_id: next.profile_id,
71
+ reason: "profile_headroom_preflight",
72
+ constraint_id: breach?.constraint_id ?? block?.constraint_id ?? null,
73
+ used_ratio: breach?.used_ratio ?? null,
74
+ resets_at: breach?.resets_at ?? block?.resets_at ?? null,
75
+ });
76
+ return next;
77
+ }
78
+ //# sourceMappingURL=credential-preflight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-preflight.js","sourceRoot":"","sources":["../src/credential-preflight.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,GAGtB,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAUvC;IACC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,GAC1F,IAAI,CAAC;IACP,sEAAsE;IACtE,wEAAwE;IACxE,MAAM,MAAM,GAAG,oBAAoB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC1D,IAAI,MAAM,KAAK,QAAQ,IAAI,YAAY,KAAK,eAAe;QAAE,OAAO,IAAI,CAAC;IACzE,MAAM,MAAM,GAAG,qBAAqB,CAClC,SAAS,EACT,SAAS,EACT,IAAI,EACJ,MAAM,CAAC,kBAAkB,EACzB,KAAK,CACN,CAAC;IACF,wEAAwE;IACxE,0EAA0E;IAC1E,4EAA4E;IAC5E,6CAA6C;IAC7C,MAAM,KAAK,GAAG,MAAM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AAY,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE;aAC5C,CAAC,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC,uBAAuB,EAAE;QAC5B,UAAU,EAAE,SAAS;QACrB,eAAe,EAAE,IAAI;QACrB,aAAa,EAAE,IAAI,CAAC,UAAU;QAC9B,MAAM,EAAE,4BAA4B;QACpC,aAAa,EAAE,MAAM,EAAE,aAAa,IAAI,KAAK,EAAE,aAAa,IAAI,IAAI;QACpE,UAAU,EAAE,MAAM,EAAE,UAAU,IAAI,IAAI;QACtC,SAAS,EAAE,MAAM,EAAE,SAAS,IAAI,KAAK,EAAE,SAAS,IAAI,IAAI;KACzD,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,9 +1,32 @@
1
- import type { CredentialProfile, HarnessRunSpec, QuotaSnapshot } from "@claudexor/schema";
1
+ import type { CredentialProfile, CredentialUnusableObservation, HarnessRunSpec, QuotaSnapshot } from "@claudexor/schema";
2
+ import { type PoolExhaustionCandidate } from "./credential-cooldown.js";
3
+ import type { AttemptOutputMarkers } from "./attemptOutputMarkers.js";
4
+ import { type RotationEvidence } from "./rotation-predicate.js";
5
+ export { rotationRetryEligible, type RotationEvidence } from "./rotation-predicate.js";
2
6
  export interface ProfilePolicy {
3
- limit_action: "fail" | "ask" | "rotate";
7
+ limit_action: "auto" | "fail" | "ask" | "rotate";
4
8
  rotation_eligible: string[];
5
9
  headroom_threshold: number;
6
10
  }
11
+ /** The typed auth route of the subject a limit decision is about: a pinned
12
+ * profile's credential kind, or the default subject's pre-spawn route
13
+ * estimate. `null` = honestly unknown (an unresolved default route). */
14
+ export type SubjectRoute = "local_session" | "api_key" | null;
15
+ /** The route of a limit decision's subject: a pinned profile decides by its
16
+ * own credential kind; the default subject decides by the caller's route
17
+ * estimate. ONE owner, so every consumer classifies the subject alike. */
18
+ export declare function limitSubjectRoute(profile: Pick<CredentialProfile, "credential_kind"> | null, defaultRoute?: SubjectRoute): SubjectRoute;
19
+ /**
20
+ * THE effective-policy resolver (A6, owner decision 1=A): the stored default
21
+ * `auto` resolves BY CREDENTIAL KIND — `rotate` for subscription
22
+ * (`local_session`) subjects, `fail` for metered API-key or unknown routes —
23
+ * while explicitly persisted `fail`/`ask`/`rotate` pass through untouched
24
+ * (3=A: a stored value is never reinterpreted, only ABSENT changed meaning).
25
+ * Every `limit_action` comparison in the engine and every projection
26
+ * (`next_up`, Accounts) resolves through this one function, so admission and
27
+ * display can never disagree about what `auto` does (INV-135).
28
+ */
29
+ export declare function effectiveLimitAction(policy: Pick<ProfilePolicy, "limit_action">, route: SubjectRoute): "fail" | "ask" | "rotate";
7
30
  /** Typed quota evidence for a profile over its headroom bound (provenance). */
8
31
  export interface HeadroomBreach {
9
32
  constraint_id: string;
@@ -43,58 +66,27 @@ export declare function profileHeadroomBreach(snapshots: readonly QuotaSnapshot[
43
66
  * subscription entitlement, bypassing a finite cash cap.
44
67
  */
45
68
  export declare function nextEligibleProfile(registry: readonly CredentialProfile[], harnessId: string, policy: ProfilePolicy, current: Pick<CredentialProfile, "profile_id" | "credential_kind"> | null, snapshots: readonly QuotaSnapshot[], readyProfileIds: ReadonlySet<string>, excluded?: ReadonlySet<string>, model?: string | null): CredentialProfile | null;
46
- /**
47
- * `rotation_retry_eligible` (sol #30): a failover retry is allowed ONLY when
48
- * the attempt saw a TYPED vendor limit AND produced no deliverable and no
49
- * workspace mutation — a partially-acted attempt never silently reruns.
50
- */
51
- export declare function rotationRetryEligible(input: {
52
- sawTypedLimit: boolean;
53
- deliverableEmpty: boolean;
54
- }): boolean;
55
- type EmitFn = (type: "route.profile.headroom_exceeded" | "route.profile.rotated" | "route.profile.rotation_exhausted", payload: Record<string, unknown>) => void;
56
- /**
57
- * `profile_headroom_preflight` (W5.4): BEFORE spawn, the selected profile's
58
- * freshest quota windows are checked against the policy threshold. A breach
59
- * is always a typed event; `rotate` swaps to the next eligible profile with
60
- * provenance, `ask`/`fail` proceed on the selected profile — the runtime
61
- * `vendor_limit_rejected` evidence stays the terminating truth.
62
- */
63
- export declare function preflightCredentialProfile(args: {
64
- profile: CredentialProfile;
65
- harnessId: string;
66
- policy: ProfilePolicy;
67
- registry: readonly CredentialProfile[];
68
- snapshots: readonly QuotaSnapshot[];
69
- readyProfileIds: ReadonlySet<string>;
70
- model?: string | null;
71
- emit: EmitFn;
72
- }): CredentialProfile;
73
- /**
74
- * Default-subject start selection (INV-135, owner scope "auto-balance"): when
75
- * NO profile is pinned, the policy is `rotate`, and the DEFAULT store's own
76
- * fresh quota window is at/over the headroom bound, pick the first eligible
77
- * SUBSCRIPTION profile instead of spawning into a near-certain vendor limit.
78
- * Strictly opt-in: `fail`/`ask` keep today's default-user behavior untouched
79
- * (the profile engine's fail action governs PINNED profiles only — throwing
80
- * here would brick every default user at 90% quota). Unknown or stale usage
81
- * never rotates.
82
- */
83
- export declare function preflightDefaultSubject(args: {
69
+ export type EmitFn = (type: "route.profile.headroom_exceeded" | "route.profile.rotated" | "route.profile.rotation_exhausted" | "route.profile.credential_unusable", payload: Record<string, unknown>) => void;
70
+ export declare function emitRotationExhausted(args: {
71
+ current: Pick<CredentialProfile, "profile_id" | "credential_kind"> | null;
84
72
  harnessId: string;
85
73
  policy: ProfilePolicy;
86
74
  registry: readonly CredentialProfile[];
87
75
  snapshots: readonly QuotaSnapshot[];
88
76
  readyProfileIds: ReadonlySet<string>;
89
- defaultRoute: "local_session" | "api_key" | null;
77
+ excluded?: ReadonlySet<string>;
78
+ unusable?: readonly CredentialUnusableObservation[];
79
+ attemptId?: string;
90
80
  model?: string | null;
81
+ reason: "profile_headroom_preflight" | "vendor_limit_rejected" | "structural_pre_progress_failure";
91
82
  emit: EmitFn;
92
- }): CredentialProfile | null;
83
+ }): PoolExhaustionCandidate[];
93
84
  /**
94
- * Reactive failover plan (`vendor_limit_rejected`, W5.4): rotation fires ONLY
95
- * on the typed predicate under a `rotate` policy, marks the current profile
96
- * tried (at most once per attempt each), and returns the next target with
97
- * provenance already emitted — or null when the attempt must fail as-is.
85
+ * Reactive failover plan (`vendor_limit_rejected` / structural, W5.4 + A2):
86
+ * rotation fires ONLY on the typed evidence predicate under a `rotate`
87
+ * policy, marks the current profile tried (at most once per attempt each),
88
+ * and returns the next target with provenance already emitted — or null when
89
+ * the attempt must fail as-is.
98
90
  * `currentProfile: null` is the DEFAULT subject: allowed ONLY when the caller
99
91
  * proves the attempt's pre-spawn route was vendor_native (a metered default
100
92
  * hitting a limit is a budget fact, not a subscription to fail over from).
@@ -109,19 +101,31 @@ export declare function planReactiveRotation(args: {
109
101
  snapshots: readonly QuotaSnapshot[];
110
102
  readyProfileIds: ReadonlySet<string>;
111
103
  triedProfiles: Set<string>;
112
- sawTypedLimit: boolean;
113
- deliverableEmpty: boolean;
104
+ evidence: RotationEvidence;
114
105
  lastLimit: {
115
106
  retryDelayMs: number | null;
116
107
  resetsAt: string | null;
117
108
  } | null;
109
+ unusable?: readonly CredentialUnusableObservation[];
118
110
  model?: string | null;
119
111
  emit: EmitFn;
120
112
  }): CredentialProfile | null;
121
113
  /**
122
- * Shared reactive-failover step for BOTH lanes: given the attempt's typed
123
- * evidence, plan a rotation and rebuild the spec on a NEW vendor session
124
- * under the next profile or return null when the attempt must fail as-is.
114
+ * Shared reactive-failover step for BOTH lanes: fold the try's lane-local
115
+ * facts + output markers into the typed rotation evidence, probe candidate
116
+ * readiness ONLY when the predicate could actually fire (the probe spends
117
+ * seconds), then plan a rotation and rebuild the spec on a NEW vendor session
118
+ * under the next profile. `null` = the failure was never rotation's business
119
+ * (fail as-is: transient machinery, plain errors), or the pool ran out with
120
+ * NO credential evidence anywhere (the evidence gate below) so the attempt
121
+ * keeps its true failure. `{ poolExhausted }` = the
122
+ * failure WAS rotation-eligible under a `rotate` policy, the pool has
123
+ * nowhere left to go, and the decision carries credential evidence — the
124
+ * attempt must terminalize on this typed refusal
125
+ * BEFORE the transient gate can burn same-profile retries on the
126
+ * already-refused subject (A5 ordering: a typed vendor limit classifies as
127
+ * retryable-transient, so falling through would retry the spent credential).
128
+ * Callers invoke this only after the try ended in a terminal error.
125
129
  */
126
130
  export declare function rotateSpecOnTypedLimit(args: {
127
131
  spec: HarnessRunSpec;
@@ -130,10 +134,27 @@ export declare function rotateSpecOnTypedLimit(args: {
130
134
  policy: ProfilePolicy;
131
135
  registry: readonly CredentialProfile[];
132
136
  snapshots: readonly QuotaSnapshot[];
133
- readyProfileIds: ReadonlySet<string>;
137
+ /** Fresh candidate-readiness probe (readyProfileIdsForRotation); called at
138
+ * most once, and only for an eligible try under a `rotate` policy. */
139
+ probeReadyProfiles: () => Promise<ReadonlySet<string>>;
140
+ /** A7 SIBLING probe of the CURRENT/triggering subject (never a candidate —
141
+ * `staticRotationCandidates` excludes the current identity structurally):
142
+ * existing poller/stream/doctor evidence only, never a spawned mini-run.
143
+ * Fires exactly when the candidate probe fires; a typed verdict is emitted,
144
+ * recorded, and carried into the pool terminal's provenance. */
145
+ probeCurrentSubject?: () => Promise<CredentialUnusableObservation | null>;
146
+ /** Live typed `credential_unusable` observations for this decision epoch —
147
+ * candidates they condemn are refused with a typed reason. */
148
+ liveUnusable?: readonly CredentialUnusableObservation[];
134
149
  triedProfiles: Set<string>;
150
+ markers: AttemptOutputMarkers;
135
151
  sawTypedLimit: boolean;
152
+ sawRetryable: boolean;
153
+ attemptErrored: boolean;
136
154
  deliverableEmpty: boolean;
155
+ /** Candidate lane only: the workspace diff is non-empty. The read-only lane
156
+ * omits it — file_change markers are its only mutation truth. */
157
+ workspaceDiffNonEmpty?: boolean;
137
158
  lastLimit: {
138
159
  retryDelayMs: number | null;
139
160
  resetsAt: string | null;
@@ -143,6 +164,11 @@ export declare function rotateSpecOnTypedLimit(args: {
143
164
  /** Pre-spawn route estimate for a profile-less spec: default-subject
144
165
  * rotation is allowed ONLY off a vendor_native attempt. */
145
166
  defaultRouteWasVendorNative?: boolean;
146
- }): HarnessRunSpec | null;
147
- export {};
167
+ /** D-U6 (unified account model): an EXPLICIT pin is strict — a typed vendor
168
+ * limit fails the attempt with its evidence, never a silent rotation onto a
169
+ * sibling account. Pool-selected rows (unpinned runs) still rotate. */
170
+ pinned?: boolean;
171
+ }): Promise<HarnessRunSpec | {
172
+ poolExhausted: Error;
173
+ } | null>;
148
174
  //# sourceMappingURL=credential-profile-rotation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"credential-profile-rotation.d.ts","sourceRoot":"","sources":["../src/credential-profile-rotation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAI1F,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IACxC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,+EAA+E;AAC/E,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC7C,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,iBAAiB,CAAC,GAAG,IAAI,CAAC;IAC1E,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAChC,GAAG,iBAAiB,EAAE,CAsBtB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,SAAS,aAAa,EAAE,EACnC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS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