@claudexor/orchestrator 3.4.2 → 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.
- package/dist/account-pool.d.ts +62 -0
- package/dist/account-pool.d.ts.map +1 -0
- package/dist/account-pool.js +103 -0
- package/dist/account-pool.js.map +1 -0
- package/dist/account-resolution.d.ts +85 -0
- package/dist/account-resolution.d.ts.map +1 -0
- package/dist/account-resolution.js +320 -0
- package/dist/account-resolution.js.map +1 -0
- package/dist/attemptOutputMarkers.d.ts +30 -0
- package/dist/attemptOutputMarkers.d.ts.map +1 -0
- package/dist/attemptOutputMarkers.js +31 -0
- package/dist/attemptOutputMarkers.js.map +1 -0
- package/dist/attemptTelemetry.d.ts +5 -4
- package/dist/attemptTelemetry.d.ts.map +1 -1
- package/dist/attemptTelemetry.js +4 -2
- package/dist/attemptTelemetry.js.map +1 -1
- package/dist/credential-cooldown.d.ts +131 -0
- package/dist/credential-cooldown.d.ts.map +1 -0
- package/dist/credential-cooldown.js +169 -0
- package/dist/credential-cooldown.js.map +1 -0
- package/dist/credential-differential.d.ts +81 -0
- package/dist/credential-differential.d.ts.map +1 -0
- package/dist/credential-differential.js +110 -0
- package/dist/credential-differential.js.map +1 -0
- package/dist/credential-preflight.d.ts +36 -0
- package/dist/credential-preflight.d.ts.map +1 -0
- package/dist/credential-preflight.js +78 -0
- package/dist/credential-preflight.js.map +1 -0
- package/dist/credential-profile-rotation.d.ts +80 -54
- package/dist/credential-profile-rotation.d.ts.map +1 -1
- package/dist/credential-profile-rotation.js +191 -163
- package/dist/credential-profile-rotation.js.map +1 -1
- package/dist/credential-profiles.d.ts +3 -49
- package/dist/credential-profiles.d.ts.map +1 -1
- package/dist/credential-profiles.js +2 -46
- package/dist/credential-profiles.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/laneStreamEvents.d.ts +54 -0
- package/dist/laneStreamEvents.d.ts.map +1 -0
- package/dist/laneStreamEvents.js +81 -0
- package/dist/laneStreamEvents.js.map +1 -0
- package/dist/orchestrator-credentials.d.ts +93 -0
- package/dist/orchestrator-credentials.d.ts.map +1 -0
- package/dist/orchestrator-credentials.js +156 -0
- package/dist/orchestrator-credentials.js.map +1 -0
- package/dist/orchestrator.d.ts +17 -30
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +278 -324
- package/dist/orchestrator.js.map +1 -1
- package/dist/rotation-predicate.d.ts +71 -0
- package/dist/rotation-predicate.d.ts.map +1 -0
- package/dist/rotation-predicate.js +29 -0
- package/dist/rotation-predicate.js.map +1 -0
- package/package.json +17 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-profiles.js","sourceRoot":"","sources":["../src/credential-profiles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credential-profiles.js","sourceRoot":"","sources":["../src/credential-profiles.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,uBAAuB,IAAI,6BAA6B,EACxD,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,GAEzB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CACtC,QAAsC,EACtC,MAAc,EACd,SAAiB;IAEjB,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,MAAM,IAAI,CAAC,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC;IAC1F,IAAI,CAAC,KAAK,EAA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CAAC,OAAO,EAAE,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AAChG,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CACvC,KASa,EACb,SAAiB,EACjB,EAAgB;IAEhB,IAAI,CAAC,KAAK,EAAE,iBAAiB,IAAI,EAAE,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO;IAC/D,MAAM,GAAG,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,mBAAmB,CAAC,CAAC;IAC9C,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9C,IAAI,CAAC;YACH,KAAK,CAAC,iBAAiB,CACrB,SAAS,EACT,GAAG,EACH,EAAE,CAAC,cAAc,IAAI,IAAI,EACzB,EAAE,CAAC,qBAAqB,IAAI,IAAI,CACjC,CAAC;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,6CAA6C;QAC/C,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export * from "./orchestrator.js";
|
|
|
2
2
|
export * from "./requestRequirements.js";
|
|
3
3
|
export * from "./delegationBudgetAuthority.js";
|
|
4
4
|
export * from "./routing-failure.js";
|
|
5
|
-
export {
|
|
5
|
+
export { effectiveAuthPreference, probeCredentialProfileStatus, profileStatusAdmits, vendorVerifiedProfileStatus, } from "./credential-profiles.js";
|
|
6
|
+
export { selectFromAccountPool } from "./account-pool.js";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,5 +2,6 @@ export * from "./orchestrator.js";
|
|
|
2
2
|
export * from "./requestRequirements.js";
|
|
3
3
|
export * from "./delegationBudgetAuthority.js";
|
|
4
4
|
export * from "./routing-failure.js";
|
|
5
|
-
export {
|
|
5
|
+
export { effectiveAuthPreference, probeCredentialProfileStatus, profileStatusAdmits, vendorVerifiedProfileStatus, } from "./credential-profiles.js";
|
|
6
|
+
export { selectFromAccountPool } from "./account-pool.js";
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-stream disclosure helpers shared VERBATIM by the candidate and
|
|
3
|
+
* read-only lanes. One owner for these event payload shapes: the two lanes
|
|
4
|
+
* used to spell out identical bodies, and a drifted field name in one of them
|
|
5
|
+
* would have split the consumers' view of the same machinery.
|
|
6
|
+
*/
|
|
7
|
+
import type { RunEventType } from "@claudexor/schema";
|
|
8
|
+
import { type TransientRetryPolicy } from "./runSupport.js";
|
|
9
|
+
import type { AttemptTelemetry } from "./attemptTelemetry.js";
|
|
10
|
+
type Emit = (type: RunEventType, payload: Record<string, unknown>) => void;
|
|
11
|
+
/** Live plan checklist: forward the adapter's typed plan progress as a run
|
|
12
|
+
* event (LAST WINS; the UI renders the latest). No-op without plan_progress. */
|
|
13
|
+
export declare function emitPlanProgress(emit: Emit, harnessId: string, attemptId: string, ev: {
|
|
14
|
+
plan_progress?: {
|
|
15
|
+
items: unknown;
|
|
16
|
+
} | null;
|
|
17
|
+
}): void;
|
|
18
|
+
/** W-C4 flood guard (review sol #10): a per-character delta stream would
|
|
19
|
+
* otherwise persist/SSE one journal event PER CHUNK without bound. Delta
|
|
20
|
+
* messages are DISPLAY-only (the complete message still follows and carries
|
|
21
|
+
* the authoritative text), so past a per-attempt budget further deltas are
|
|
22
|
+
* DROPPED (`true`) and the cutoff disclosed ONCE — the final answer is
|
|
23
|
+
* unaffected. */
|
|
24
|
+
export declare function dropDeltaPastBudget(ev: {
|
|
25
|
+
type: string;
|
|
26
|
+
payload?: Record<string, unknown> | null;
|
|
27
|
+
}, state: {
|
|
28
|
+
count: number;
|
|
29
|
+
disclosed: boolean;
|
|
30
|
+
}, max: number, emit: Emit, harnessId: string, attemptId: string): boolean;
|
|
31
|
+
/** Discloses one scheduled same-profile transient retry (`detected` +
|
|
32
|
+
* `retry_scheduled`) and returns the backoff delay the caller must sleep. */
|
|
33
|
+
export declare function emitTransientRetryPlan(emit: Emit, harnessId: string, attemptId: string, transient: {
|
|
34
|
+
kind: string;
|
|
35
|
+
category: string;
|
|
36
|
+
retryDelayMs: number | null;
|
|
37
|
+
} | null, nativeTry: number, policy: TransientRetryPolicy): number;
|
|
38
|
+
/** Read-only lanes burn quota too: fold one usage event's spend into the
|
|
39
|
+
* attempt's running cost and disclose it as a `budget.observation`. */
|
|
40
|
+
export declare function observeReadonlySpend(ev: {
|
|
41
|
+
type: string;
|
|
42
|
+
usage?: {
|
|
43
|
+
cost_usd?: number | null;
|
|
44
|
+
estimated?: boolean | null;
|
|
45
|
+
} | null;
|
|
46
|
+
}, emit: Emit, harnessId: string, attemptId: string): {
|
|
47
|
+
costUsd: number;
|
|
48
|
+
estimated: boolean;
|
|
49
|
+
};
|
|
50
|
+
/** The transient machinery's terminal disclosure for an attempt that still
|
|
51
|
+
* ended errored; silent when no transient failure was ever classified. */
|
|
52
|
+
export declare function emitTransientExhausted(emit: Emit, harnessId: string, attemptId: string, telemetry: AttemptTelemetry, retries: number): void;
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=laneStreamEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"laneStreamEvents.d.ts","sourceRoot":"","sources":["../src/laneStreamEvents.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAyB,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,KAAK,IAAI,GAAG,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;AAE3E;gFACgF;AAChF,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EAC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ACpC,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,gBAAgB,EAC3B,OAAO,EAAE,MAAM,GACd,IAAI,CAQN"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { transientRetryDelayMs } from "./runSupport.js";
|
|
2
|
+
/** Live plan checklist: forward the adapter's typed plan progress as a run
|
|
3
|
+
* event (LAST WINS; the UI renders the latest). No-op without plan_progress. */
|
|
4
|
+
export function emitPlanProgress(emit, harnessId, attemptId, ev) {
|
|
5
|
+
if (!ev.plan_progress)
|
|
6
|
+
return;
|
|
7
|
+
emit("plan.progress", {
|
|
8
|
+
attempt_id: attemptId,
|
|
9
|
+
harness_id: harnessId,
|
|
10
|
+
items: ev.plan_progress.items,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
/** W-C4 flood guard (review sol #10): a per-character delta stream would
|
|
14
|
+
* otherwise persist/SSE one journal event PER CHUNK without bound. Delta
|
|
15
|
+
* messages are DISPLAY-only (the complete message still follows and carries
|
|
16
|
+
* the authoritative text), so past a per-attempt budget further deltas are
|
|
17
|
+
* DROPPED (`true`) and the cutoff disclosed ONCE — the final answer is
|
|
18
|
+
* unaffected. */
|
|
19
|
+
export function dropDeltaPastBudget(ev, state, max, emit, harnessId, attemptId) {
|
|
20
|
+
if (ev.type !== "message" || ev.payload?.["delta"] !== true)
|
|
21
|
+
return false;
|
|
22
|
+
state.count += 1;
|
|
23
|
+
if (state.count <= max)
|
|
24
|
+
return false;
|
|
25
|
+
if (!state.disclosed) {
|
|
26
|
+
state.disclosed = true;
|
|
27
|
+
emit("harness.event", {
|
|
28
|
+
harness_id: harnessId,
|
|
29
|
+
attempt_id: attemptId,
|
|
30
|
+
type: "status",
|
|
31
|
+
title: `live delta stream capped at ${max} chunks; the complete message still lands`,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
/** Discloses one scheduled same-profile transient retry (`detected` +
|
|
37
|
+
* `retry_scheduled`) and returns the backoff delay the caller must sleep. */
|
|
38
|
+
export function emitTransientRetryPlan(emit, harnessId, attemptId, transient, nativeTry, policy) {
|
|
39
|
+
const delayMs = transientRetryDelayMs(transient?.retryDelayMs ?? null, policy, nativeTry);
|
|
40
|
+
emit("route.transient.detected", {
|
|
41
|
+
harness_id: harnessId,
|
|
42
|
+
attempt_id: attemptId,
|
|
43
|
+
kind: transient?.kind ?? "unknown",
|
|
44
|
+
category: transient?.category ?? "unknown_harness_error",
|
|
45
|
+
native_try: nativeTry + 1,
|
|
46
|
+
});
|
|
47
|
+
emit("route.transient.retry_scheduled", {
|
|
48
|
+
harness_id: harnessId,
|
|
49
|
+
attempt_id: attemptId,
|
|
50
|
+
retry: nativeTry + 1,
|
|
51
|
+
delay_ms: delayMs,
|
|
52
|
+
});
|
|
53
|
+
return delayMs;
|
|
54
|
+
}
|
|
55
|
+
/** Read-only lanes burn quota too: fold one usage event's spend into the
|
|
56
|
+
* attempt's running cost and disclose it as a `budget.observation`. */
|
|
57
|
+
export function observeReadonlySpend(ev, emit, harnessId, attemptId) {
|
|
58
|
+
if (ev.type !== "usage" || !ev.usage?.cost_usd)
|
|
59
|
+
return { costUsd: 0, estimated: false };
|
|
60
|
+
emit("budget.observation", {
|
|
61
|
+
harness_id: harnessId,
|
|
62
|
+
attempt_id: attemptId,
|
|
63
|
+
kind: "spend",
|
|
64
|
+
usd: ev.usage.cost_usd,
|
|
65
|
+
estimated: ev.usage.estimated === true,
|
|
66
|
+
});
|
|
67
|
+
return { costUsd: ev.usage.cost_usd, estimated: ev.usage.estimated === true };
|
|
68
|
+
}
|
|
69
|
+
/** The transient machinery's terminal disclosure for an attempt that still
|
|
70
|
+
* ended errored; silent when no transient failure was ever classified. */
|
|
71
|
+
export function emitTransientExhausted(emit, harnessId, attemptId, telemetry, retries) {
|
|
72
|
+
if (telemetry.transientFailures.length === 0)
|
|
73
|
+
return;
|
|
74
|
+
emit("route.transient.exhausted", {
|
|
75
|
+
harness_id: harnessId,
|
|
76
|
+
attempt_id: attemptId,
|
|
77
|
+
category: telemetry.transientFailures.at(-1)?.category ?? "unknown_harness_error",
|
|
78
|
+
retries,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=laneStreamEvents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"laneStreamEvents.js","sourceRoot":"","sources":["../src/laneStreamEvents.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,qBAAqB,EAA6B,MAAM,iBAAiB,CAAC;AAKnF;gFACgF;AAChF,MAAM,UAAU,gBAAgB,CAC9B,IAAU,EACV,SAAiB,EACjB,SAAiB,EACjB,EAAiD;IAEjD,IAAI,CAAC,EAAE,CAAC,aAAa;QAAE,OAAO;IAC9B,IAAI,CAAC,eAAe,EAAE;QACpB,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,SAAS;QACrB,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK;KAC9B,CAAC,CAAC;AACL,CAAC;AAED;;;;;iBAKiB;AACjB,MAAM,UAAU,mBAAmB,CACjC,EAA8D,EAC9D,KAA4C,EAC5C,GAAW,EACX,IAAU,EACV,SAAiB,EACjB,SAAiB;IAEjB,IAAI,EAAE,CAAC,IAAI,KAAK,SAAS,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC1E,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC;IACjB,IAAI,KAAK,CAAC,KAAK,IAAI,GAAG;QAAE,OAAO,KAAK,CAAC;IACrC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;QACrB,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,eAAe,EAAE;YACpB,UAAU,EAAE,SAAS;YACrB,UAAU,EAAE,SAAS;YACrB,IAAI,EAAE,QAAQ;YACd,K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;IACH,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,KAAK,IAAI,EAAE,CAAC;AAChF,CAAC;AAED;0EAC0E;AAC1E,MAAM,UAAU,sBAAsB,CACpC,IAAU,EACV,SAAiB,EACjB,SAAiB,EACjB,SAA2B,EAC3B,OAAe;IAEf,IAAI,SAAS,CAAC,iBAAiB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IACrD,IAAI,CAAC,2BAA2B,EAAE;QAChC,UAAU,EAAE,SAAS;QACrB,UAAU,EAAE,SAAS;QACrB,QAAQ,EAAE,SAAS,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,IAAI,uBAAuB;QACjF,OAAO;KACR,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The orchestrator's credential-resolution cluster (INV-135 unified account
|
|
3
|
+
* model), split from the orchestrator god-file to a smaller owner (complexity
|
|
4
|
+
* ratchet): the strict-pin resolver, the per-run paid-route flags, the
|
|
5
|
+
* A7-aware rotation-readiness epoch, the sibling differential-probe wiring,
|
|
6
|
+
* and the thin wrapper over the ONE account-resolution owner
|
|
7
|
+
* (account-resolution.ts). No run/lane state lives here — only per-decision
|
|
8
|
+
* reads over the host's config and deps.
|
|
9
|
+
*/
|
|
10
|
+
import type { CredentialProfile, CredentialUnusableObservation, HarnessRunSpec, QuotaAbsence, QuotaSnapshot } from "@claudexor/schema";
|
|
11
|
+
import type { loadConfig } from "@claudexor/config";
|
|
12
|
+
import type { AdapterRegistry, HarnessAdapter } from "@claudexor/core";
|
|
13
|
+
import type { EventLog } from "@claudexor/event-log";
|
|
14
|
+
import { type ProfilePolicy, type VendorQuotaObservations } from "./credential-profiles.js";
|
|
15
|
+
import type { TransientFailureObservation } from "./transientClassify.js";
|
|
16
|
+
import type { RunInput } from "./orchestrator.js";
|
|
17
|
+
/** The slice of the Orchestrator this cluster reads; accessor functions so the
|
|
18
|
+
* host can defer to deps assigned after this field initializes. */
|
|
19
|
+
export interface CredentialResolutionHost {
|
|
20
|
+
config(repoRoot: string): ReturnType<typeof loadConfig>;
|
|
21
|
+
registry(): AdapterRegistry;
|
|
22
|
+
quotaSnapshots(): readonly QuotaSnapshot[];
|
|
23
|
+
quotaAbsences(): readonly QuotaAbsence[];
|
|
24
|
+
credentialUnusable(): readonly CredentialUnusableObservation[];
|
|
25
|
+
recordCredentialUnusable(obs: CredentialUnusableObservation): void;
|
|
26
|
+
authPreferenceForHarness(repoRoot: string, harnessId: string, runPreference: RunInput["authPreference"]): NonNullable<RunInput["authPreference"]>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* INV-137: a mid-attempt credential rotation must move the spec's LANE home
|
|
30
|
+
* with it. The lane env is keyed by the RESOLVED profile, so a rotated spec
|
|
31
|
+
* that kept the pre-rotation env would write the rotated row's native session
|
|
32
|
+
* into the PREVIOUS row's lane store while the session record points at the
|
|
33
|
+
* rotated row — the next turn then provisions a fresh lane for that row and
|
|
34
|
+
* its `--resume` silently starts over. Only a spec that actually RUNS in a
|
|
35
|
+
* lane home is re-keyed: an isolated envelope keeps its disposable scoped
|
|
36
|
+
* home (sessions are never retained there), and an in-place agent turn keeps
|
|
37
|
+
* the native environment (adapters derive per-row state homes from the
|
|
38
|
+
* resolved profile itself).
|
|
39
|
+
*/
|
|
40
|
+
export declare function rotatedSpecInLaneHome(previous: HarnessRunSpec, rotated: HarnessRunSpec,
|
|
41
|
+
/** The caller's lane-env resolver, keyed by the resolved account (null =
|
|
42
|
+
* this run has no lane home — non-thread one-shots). */
|
|
43
|
+
laneEnvFor: (resolvedProfileId: string | null) => Record<string, string> | null,
|
|
44
|
+
/** The spec build's pin fallback key (the run's requested profile id). */
|
|
45
|
+
requestedProfileId: string | null): HarnessRunSpec;
|
|
46
|
+
export declare class OrchestratorCredentials {
|
|
47
|
+
private readonly host;
|
|
48
|
+
/** Q3=A explicit paid-route flags, keyed per run input (see PoolRouteFlags). */
|
|
49
|
+
private readonly poolApiKeyRoutes;
|
|
50
|
+
constructor(host: CredentialResolutionHost);
|
|
51
|
+
/** The EXPLICIT pin (INV-135): strict. Null = unpinned (preflightProfile). */
|
|
52
|
+
effectiveProfileId(input: RunInput, _harnessId: string): string | null;
|
|
53
|
+
poolApiKeyRoute(input: RunInput, harnessId: string): boolean;
|
|
54
|
+
/** Whether the native/CLI login is EXCLUDED from this harness's credential
|
|
55
|
+
* ladder (INV-135). When excluded, a harness with no effective profile has
|
|
56
|
+
* nothing routable and must refuse — never silently fall back into it. */
|
|
57
|
+
nativeCredentialsDisabled(repoRoot: string, harnessId: string): boolean;
|
|
58
|
+
resolveCredentialProfile(input: RunInput, harnessId: string): CredentialProfile | null;
|
|
59
|
+
/** The typed effective auth route for a SELECTED credential profile
|
|
60
|
+
* (round-18 #2): adapters execute strictly by credential_kind, so routing,
|
|
61
|
+
* billing classification, model truth, and quota lookup must share this
|
|
62
|
+
* one fact — never the default store's sources or a previous default-route
|
|
63
|
+
* metric. null = no profile selected or it does not resolve here. */
|
|
64
|
+
profileAuthRoute(input: RunInput, harnessId: string): "local_session" | "api_key" | null;
|
|
65
|
+
profilePolicy(repoRoot: string, harnessId: string): ProfilePolicy;
|
|
66
|
+
/** The quota poller's authenticated vendor evidence for THIS decision epoch,
|
|
67
|
+
* read once so every profile in the epoch is judged against one observation
|
|
68
|
+
* set. This is what makes profile readiness at admission mean the same thing
|
|
69
|
+
* it means on the Accounts card (INV-135 honesty). */
|
|
70
|
+
vendorQuotaObservations(): VendorQuotaObservations;
|
|
71
|
+
/** Fresh profile readiness for one rotation decision epoch (composition in
|
|
72
|
+
* `readyProfilesForRotation`): probe wrapper + vendor overlay + admission
|
|
73
|
+
* predicate + the A7 live-observation refusal. */
|
|
74
|
+
readyProfileIdsForRotation(input: RunInput, harnessId: string, current: Pick<CredentialProfile, "profile_id" | "credential_kind"> | null, excluded?: ReadonlySet<string>, model?: string | null): Promise<ReadonlySet<string>>;
|
|
75
|
+
/** A7 wiring for one reactive rotation decision: the sibling differential
|
|
76
|
+
* prober of the CURRENT subject plus this epoch's live observations. */
|
|
77
|
+
rotationObservations(adapter: HarnessAdapter, spec: HarnessRunSpec, transients: readonly TransientFailureObservation[]): {
|
|
78
|
+
probeCurrentSubject: () => Promise<CredentialUnusableObservation | null>;
|
|
79
|
+
liveUnusable: readonly {
|
|
80
|
+
harness_id: string;
|
|
81
|
+
profile_id: string | null;
|
|
82
|
+
model: string | null;
|
|
83
|
+
code: "auth_revoked" | "capability_refused" | "verification_failed";
|
|
84
|
+
source: "attempt_stream" | "local_probe" | "vendor_poller";
|
|
85
|
+
detail: string | null;
|
|
86
|
+
observed_at: string;
|
|
87
|
+
expires_at: string;
|
|
88
|
+
}[];
|
|
89
|
+
};
|
|
90
|
+
/** Thin wrapper over the ONE account-resolution owner (account-resolution.ts). */
|
|
91
|
+
preflightProfile(input: RunInput, harnessId: string, model: string | null, log: EventLog | undefined, defaultRoute: "local_session" | "api_key" | null): Promise<CredentialProfile | null>;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=orchestrator-credentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator-credentials.d.ts","sourceRoot":"","sources":["../src/orchestrator-credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EACV,iBAAiB,EACjB,6BAA6B,EAC7B,cAAc,EACd,YAAY,EACZ,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGrD,OAAO,EAEL,KAAK,aAAa,EAClB,K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I,CAAC,CAwBnC;CACF"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { PoolRouteFlags, resolveAccountForRun } from "./account-resolution.js";
|
|
2
|
+
import { currentSubjectProber, readyProfilesForRotation } from "./credential-differential.js";
|
|
3
|
+
import { resolveCredentialProfile, } from "./credential-profiles.js";
|
|
4
|
+
/**
|
|
5
|
+
* INV-137: a mid-attempt credential rotation must move the spec's LANE home
|
|
6
|
+
* with it. The lane env is keyed by the RESOLVED profile, so a rotated spec
|
|
7
|
+
* that kept the pre-rotation env would write the rotated row's native session
|
|
8
|
+
* into the PREVIOUS row's lane store while the session record points at the
|
|
9
|
+
* rotated row — the next turn then provisions a fresh lane for that row and
|
|
10
|
+
* its `--resume` silently starts over. Only a spec that actually RUNS in a
|
|
11
|
+
* lane home is re-keyed: an isolated envelope keeps its disposable scoped
|
|
12
|
+
* home (sessions are never retained there), and an in-place agent turn keeps
|
|
13
|
+
* the native environment (adapters derive per-row state homes from the
|
|
14
|
+
* resolved profile itself).
|
|
15
|
+
*/
|
|
16
|
+
export function rotatedSpecInLaneHome(previous, rotated,
|
|
17
|
+
/** The caller's lane-env resolver, keyed by the resolved account (null =
|
|
18
|
+
* this run has no lane home — non-thread one-shots). */
|
|
19
|
+
laneEnvFor,
|
|
20
|
+
/** The spec build's pin fallback key (the run's requested profile id). */
|
|
21
|
+
requestedProfileId) {
|
|
22
|
+
// The same key the spec build used (record and resume share one home).
|
|
23
|
+
const previousLane = laneEnvFor(previous.credential_profile?.profile_id ?? requestedProfileId);
|
|
24
|
+
if (!previousLane || previous.env?.["HOME"] !== previousLane["HOME"])
|
|
25
|
+
return rotated;
|
|
26
|
+
const rotatedLane = laneEnvFor(rotated.credential_profile?.profile_id ?? null);
|
|
27
|
+
return rotatedLane ? { ...rotated, env: rotatedLane } : rotated;
|
|
28
|
+
}
|
|
29
|
+
export class OrchestratorCredentials {
|
|
30
|
+
host;
|
|
31
|
+
/** Q3=A explicit paid-route flags, keyed per run input (see PoolRouteFlags). */
|
|
32
|
+
poolApiKeyRoutes = new PoolRouteFlags();
|
|
33
|
+
constructor(host) {
|
|
34
|
+
this.host = host;
|
|
35
|
+
}
|
|
36
|
+
/** The EXPLICIT pin (INV-135): strict. Null = unpinned (preflightProfile). */
|
|
37
|
+
effectiveProfileId(input, _harnessId) {
|
|
38
|
+
return input.credentialProfileId ?? null;
|
|
39
|
+
}
|
|
40
|
+
poolApiKeyRoute(input, harnessId) {
|
|
41
|
+
return this.poolApiKeyRoutes.has(input, harnessId);
|
|
42
|
+
}
|
|
43
|
+
/** Whether the native/CLI login is EXCLUDED from this harness's credential
|
|
44
|
+
* ladder (INV-135). When excluded, a harness with no effective profile has
|
|
45
|
+
* nothing routable and must refuse — never silently fall back into it. */
|
|
46
|
+
nativeCredentialsDisabled(repoRoot, harnessId) {
|
|
47
|
+
return (this.host.config(repoRoot)?.global.harnesses?.[harnessId]?.native_credentials_enabled ===
|
|
48
|
+
false);
|
|
49
|
+
}
|
|
50
|
+
resolveCredentialProfile(input, harnessId) {
|
|
51
|
+
const explicit = input.credentialProfileId ?? null;
|
|
52
|
+
const wanted = this.effectiveProfileId(input, harnessId);
|
|
53
|
+
if (!wanted)
|
|
54
|
+
return null;
|
|
55
|
+
const registry = this.host.config(input.repoRoot)?.global.credential_profiles ?? [];
|
|
56
|
+
try {
|
|
57
|
+
return resolveCredentialProfile(registry, wanted, harnessId);
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
// With Active removed, `wanted` is always the explicit pin; keep the
|
|
61
|
+
// fail-closed guard so any future non-pin source still refuses loudly.
|
|
62
|
+
if (!explicit) {
|
|
63
|
+
throw new Error(`harness "${harnessId}" credential profile "${wanted}" is unusable: ${err instanceof Error ? err.message : String(err)}`);
|
|
64
|
+
}
|
|
65
|
+
throw err;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/** The typed effective auth route for a SELECTED credential profile
|
|
69
|
+
* (round-18 #2): adapters execute strictly by credential_kind, so routing,
|
|
70
|
+
* billing classification, model truth, and quota lookup must share this
|
|
71
|
+
* one fact — never the default store's sources or a previous default-route
|
|
72
|
+
* metric. null = no profile selected or it does not resolve here. */
|
|
73
|
+
profileAuthRoute(input, harnessId) {
|
|
74
|
+
try {
|
|
75
|
+
const profile = this.resolveCredentialProfile(input, harnessId);
|
|
76
|
+
if (!profile)
|
|
77
|
+
return null;
|
|
78
|
+
return profile.credential_kind === "api_key" ? "api_key" : "local_session";
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
profilePolicy(repoRoot, harnessId) {
|
|
85
|
+
const policy = this.host.config(repoRoot)?.global.harnesses?.[harnessId]?.profile_policy;
|
|
86
|
+
// A6: an ABSENT policy means `auto` (kind-aware: rotate for subscription
|
|
87
|
+
// subjects, fail for metered) — resolved later by effectiveLimitAction.
|
|
88
|
+
return policy ?? { limit_action: "auto", rotation_eligible: [], headroom_threshold: 0.9 };
|
|
89
|
+
}
|
|
90
|
+
/** The quota poller's authenticated vendor evidence for THIS decision epoch,
|
|
91
|
+
* read once so every profile in the epoch is judged against one observation
|
|
92
|
+
* set. This is what makes profile readiness at admission mean the same thing
|
|
93
|
+
* it means on the Accounts card (INV-135 honesty). */
|
|
94
|
+
vendorQuotaObservations() {
|
|
95
|
+
return {
|
|
96
|
+
snapshots: this.host.quotaSnapshots(),
|
|
97
|
+
absences: this.host.quotaAbsences(),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/** Fresh profile readiness for one rotation decision epoch (composition in
|
|
101
|
+
* `readyProfilesForRotation`): probe wrapper + vendor overlay + admission
|
|
102
|
+
* predicate + the A7 live-observation refusal. */
|
|
103
|
+
async readyProfileIdsForRotation(input, harnessId, current, excluded = new Set(), model = null) {
|
|
104
|
+
const adapter = this.host.registry().get(harnessId);
|
|
105
|
+
return readyProfilesForRotation({
|
|
106
|
+
registry: this.host.config(input.repoRoot)?.global.credential_profiles ?? [],
|
|
107
|
+
harnessId,
|
|
108
|
+
policy: this.profilePolicy(input.repoRoot, harnessId),
|
|
109
|
+
current,
|
|
110
|
+
excluded,
|
|
111
|
+
probe: adapter?.probeCredentialProfile?.bind(adapter),
|
|
112
|
+
quota: this.vendorQuotaObservations(),
|
|
113
|
+
unusable: this.host.credentialUnusable(),
|
|
114
|
+
model,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/** A7 wiring for one reactive rotation decision: the sibling differential
|
|
118
|
+
* prober of the CURRENT subject plus this epoch's live observations. */
|
|
119
|
+
rotationObservations(adapter, spec, transients) {
|
|
120
|
+
return {
|
|
121
|
+
probeCurrentSubject: currentSubjectProber({
|
|
122
|
+
harnessId: adapter.id,
|
|
123
|
+
profile: spec.credential_profile ?? null,
|
|
124
|
+
model: spec.model_hint ?? null,
|
|
125
|
+
quota: this.vendorQuotaObservations(),
|
|
126
|
+
transients,
|
|
127
|
+
probe: adapter.probeCredentialProfile?.bind(adapter),
|
|
128
|
+
record: (obs) => this.host.recordCredentialUnusable(obs),
|
|
129
|
+
}),
|
|
130
|
+
liveUnusable: this.host.credentialUnusable(),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/** Thin wrapper over the ONE account-resolution owner (account-resolution.ts). */
|
|
134
|
+
async preflightProfile(input, harnessId, model, log, defaultRoute) {
|
|
135
|
+
const adapter = this.host.registry().get(harnessId);
|
|
136
|
+
return resolveAccountForRun({
|
|
137
|
+
harnessId,
|
|
138
|
+
registry: this.host.config(input.repoRoot)?.global.credential_profiles ?? [],
|
|
139
|
+
policy: this.profilePolicy(input.repoRoot, harnessId),
|
|
140
|
+
snapshots: this.host.quotaSnapshots(),
|
|
141
|
+
quota: this.vendorQuotaObservations(),
|
|
142
|
+
unusable: this.host.credentialUnusable(),
|
|
143
|
+
probe: adapter?.probeCredentialProfile?.bind(adapter),
|
|
144
|
+
pinnedProfile: this.resolveCredentialProfile(input, harnessId),
|
|
145
|
+
boundProfileId: input.threadAccountBindings?.[harnessId] ?? null,
|
|
146
|
+
threadId: input.threadId ?? null,
|
|
147
|
+
model,
|
|
148
|
+
defaultRoute,
|
|
149
|
+
nativeCredentialsDisabled: this.nativeCredentialsDisabled(input.repoRoot, harnessId),
|
|
150
|
+
authPreference: this.host.authPreferenceForHarness(input.repoRoot, harnessId, input.authPreference),
|
|
151
|
+
notePoolApiKeyRoute: () => this.poolApiKeyRoutes.note(input, harnessId),
|
|
152
|
+
emit: (type, payload) => log?.emit(type, payload),
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=orchestrator-credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator-credentials.js","sourceRoot":"","sources":["../src/orchestrator-credentials.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAC9F,OAAO,EACL,wBAAwB,GAGzB,MAAM,0BAA0B,CAAC;AAoBlC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,qBAAqB,CACnC,QAAwB,EACxB,OAAuB;AACvB;wDACwD;AACxD,UAA+E;AAC/E,0EAA0E;AAC1E,kBAAiC;IAEjC,uEAAuE;IACvE,MAAM,YAAY,GAAG,UAAU,CAAC,QAAQ,CAAC,kBAAkB,EAAE,UAAU,IAAI,kBAAkB,CAAC,CAAC;IAC/F,IAAI,CAAC,YAAY,IAAI,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,YAAY,CAAC,MAAM,CAAC;QAAE,OAAO,OAAO,CAAC;IACrF,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,kBAAkB,EAAE,UAAU,IAAI,IAAI,CAAC,CAAC;IAC/E,OAAO,WAAW,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE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O,CAAC;SAClD,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/dist/orchestrator.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AccessProfile, Attachment, ControlReviewerPanelEntry, EffortHint, HarnessCapabilities, KnownModelEntry, ExternalContextPolicy, HarnessEvent, InteractionHandlerResult, InteractionRequest, ModeKind, PaidBudget, QuotaAbsence, QuotaSnapshot, RoutingGoal, ProtectedPathApproval, RequestRequirementResolution, RunEvent, RunLifecycle, RunOutcomeFacts, TestCommandInvocation, ProviderFamily, CredentialProfile, ImplementationTransport, WebPolicySupport } from "@claudexor/schema";
|
|
1
|
+
import type { AccessProfile, Attachment, ControlReviewerPanelEntry, EffortHint, HarnessCapabilities, KnownModelEntry, ExternalContextPolicy, HarnessEvent, InteractionHandlerResult, InteractionRequest, ModeKind, PaidBudget, CredentialUnusableObservation, QuotaAbsence, QuotaSnapshot, RoutingGoal, ProtectedPathApproval, RequestRequirementResolution, RunEvent, RunLifecycle, RunOutcomeFacts, TestCommandInvocation, ProviderFamily, CredentialProfile, ImplementationTransport, WebPolicySupport } from "@claudexor/schema";
|
|
2
2
|
import { type PlannerAttemptArgs, type PlannerAttemptOutcome } from "./plannerAttempt.js";
|
|
3
3
|
export type { PlannerAttemptArgs, PlannerAttemptOutcome } from "./plannerAttempt.js";
|
|
4
4
|
import { type ExtraMcpServer } from "@claudexor/schema";
|
|
@@ -25,6 +25,16 @@ export interface OrchestratorDeps {
|
|
|
25
25
|
quotaAbsences?: () => readonly QuotaAbsence[];
|
|
26
26
|
/** Persist typed live quota/cooldown events into that same projection. */
|
|
27
27
|
quotaEventSink?: (harnessId: string, event: HarnessEvent) => void;
|
|
28
|
+
/** Live typed `credential_unusable` observations (A7): dead-credential
|
|
29
|
+
* evidence rotation must not rediscover by spending attempts. */
|
|
30
|
+
credentialUnusable?: () => readonly CredentialUnusableObservation[];
|
|
31
|
+
/** Evidence sink for a fresh differential-probe verdict (A7). */
|
|
32
|
+
recordCredentialUnusable?: (obs: CredentialUnusableObservation) => void;
|
|
33
|
+
/** Typed per-harness run refusal while that harness's unified-accounts
|
|
34
|
+
* migration is incomplete (crash between phases; INV-137). Null = not blocked. */
|
|
35
|
+
accountsMigrationGate?: (harnessId: string) => {
|
|
36
|
+
reason: string;
|
|
37
|
+
} | null;
|
|
28
38
|
/** Ordered explicit reviewer panel. Unlike legacy per-family overrides this
|
|
29
39
|
* preserves duplicate harness entries, so one provider can review through
|
|
30
40
|
* multiple requested models in a single panel pass. */
|
|
@@ -173,6 +183,10 @@ export interface RunInput {
|
|
|
173
183
|
/** Explicit credential profile for this turn (INV-135): resolved once per
|
|
174
184
|
* routed harness; unknown/disabled/mismatched ids refuse, never default. */
|
|
175
185
|
credentialProfileId?: string | null;
|
|
186
|
+
/** The thread's durable per-harness account bindings (D-U1 order 2),
|
|
187
|
+
* daemon-derived from the thread's own lane evidence; supplied only for
|
|
188
|
+
* unpinned thread turns — an explicit pin always wins. */
|
|
189
|
+
threadAccountBindings?: Record<string, string>;
|
|
176
190
|
/**
|
|
177
191
|
* Native CLI session ids to resume, keyed by harness id (the thread's vendor
|
|
178
192
|
* session cache). A routed harness with an entry continues its own native
|
|
@@ -421,35 +435,8 @@ export declare class Orchestrator {
|
|
|
421
435
|
* `resumeMap` lookup uses (INV-135), so record and resume land in one home.
|
|
422
436
|
*/
|
|
423
437
|
private laneHomeEnvFor;
|
|
424
|
-
/**
|
|
425
|
-
|
|
426
|
-
* authority): an explicit per-run/per-thread pin wins; else null — POOL AUTO,
|
|
427
|
-
* the native/CLI login default subject (enabled profiles route only by
|
|
428
|
-
* explicit pin or quota rotation, never as a silent Active default).
|
|
429
|
-
*/
|
|
430
|
-
private effectiveProfileId;
|
|
431
|
-
/** Whether the native/CLI login is EXCLUDED from this harness's credential
|
|
432
|
-
* ladder (INV-135). When excluded, a harness with no effective profile has
|
|
433
|
-
* nothing routable and must refuse — never silently fall back into it. */
|
|
434
|
-
private nativeCredentialsDisabled;
|
|
435
|
-
private resolveCredentialProfile;
|
|
436
|
-
/** The typed effective auth route for a SELECTED credential profile
|
|
437
|
-
* (round-18 #2): adapters execute strictly by credential_kind, so routing,
|
|
438
|
-
* billing classification, model truth, and quota lookup must share this
|
|
439
|
-
* one fact — never the default store's sources or a previous default-route
|
|
440
|
-
* metric. null = no profile selected or it does not resolve here. */
|
|
441
|
-
private profileAuthRoute;
|
|
442
|
-
private profilePolicy;
|
|
443
|
-
/** The quota poller's authenticated vendor evidence for THIS decision epoch,
|
|
444
|
-
* read once so every profile in the epoch is judged against one observation
|
|
445
|
-
* set. This is what makes profile readiness at admission mean the same thing
|
|
446
|
-
* it means on the Accounts card (INV-135 honesty). */
|
|
447
|
-
private vendorQuotaObservations;
|
|
448
|
-
/** Fresh profile readiness for one rotation decision epoch. Accounts uses
|
|
449
|
-
* the same probe wrapper + vendor overlay + admission predicate when
|
|
450
|
-
* projecting next_up. */
|
|
451
|
-
private readyProfileIdsForRotation;
|
|
452
|
-
private preflightProfile;
|
|
438
|
+
/** Credential-resolution cluster (INV-135), split to orchestrator-credentials.ts. */
|
|
439
|
+
private readonly credentials;
|
|
453
440
|
/**
|
|
454
441
|
* Resolve candidate adapters: explicit `--harness`, else available real harnesses, then
|
|
455
442
|
* **capability-gate** to those that can actually produce work for `intent` (e.g. a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../src/orchestrator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../src/orchestrator.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EACV,aAAa,EAKb,UAAU,EACV,yBAAyB,EACzB,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,YAAY,EAEZ,wBAAwB,EACxB,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,6BAA6B,EAC7B,YAAY,EACZ,aAAa,EACb,WAAW,EACX,qBAAqB,EA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