@claudexor/orchestrator 3.8.0 → 3.8.2

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 (60) hide show
  1. package/dist/account-pool.d.ts +1 -0
  2. package/dist/account-pool.d.ts.map +1 -1
  3. package/dist/account-pool.js +2 -0
  4. package/dist/account-pool.js.map +1 -1
  5. package/dist/account-resolution.d.ts +2 -0
  6. package/dist/account-resolution.d.ts.map +1 -1
  7. package/dist/account-resolution.js +32 -12
  8. package/dist/account-resolution.js.map +1 -1
  9. package/dist/candidateEvidence.d.ts +3 -3
  10. package/dist/candidateEvidence.d.ts.map +1 -1
  11. package/dist/candidateOutputs.d.ts +2 -2
  12. package/dist/candidateOutputs.d.ts.map +1 -1
  13. package/dist/candidateOutputs.js +11 -6
  14. package/dist/candidateOutputs.js.map +1 -1
  15. package/dist/contract-gates.d.ts +4 -4
  16. package/dist/contract-gates.d.ts.map +1 -1
  17. package/dist/contract-gates.js +2 -0
  18. package/dist/contract-gates.js.map +1 -1
  19. package/dist/credential-profiles.d.ts +12 -1
  20. package/dist/credential-profiles.d.ts.map +1 -1
  21. package/dist/credential-profiles.js +13 -3
  22. package/dist/credential-profiles.js.map +1 -1
  23. package/dist/delegatedHome.d.ts +21 -69
  24. package/dist/delegatedHome.d.ts.map +1 -1
  25. package/dist/delegatedHome.js +29 -85
  26. package/dist/delegatedHome.js.map +1 -1
  27. package/dist/diffReview.d.ts +2 -1
  28. package/dist/diffReview.d.ts.map +1 -1
  29. package/dist/diffReview.js +14 -2
  30. package/dist/diffReview.js.map +1 -1
  31. package/dist/orchestrator-credentials.d.ts +13 -2
  32. package/dist/orchestrator-credentials.d.ts.map +1 -1
  33. package/dist/orchestrator-credentials.js +64 -3
  34. package/dist/orchestrator-credentials.js.map +1 -1
  35. package/dist/orchestrator.d.ts +5 -6
  36. package/dist/orchestrator.d.ts.map +1 -1
  37. package/dist/orchestrator.js +204 -211
  38. package/dist/orchestrator.js.map +1 -1
  39. package/dist/planRun.d.ts +5 -5
  40. package/dist/planRun.d.ts.map +1 -1
  41. package/dist/planRun.js.map +1 -1
  42. package/dist/plannerAttempt.d.ts +2 -2
  43. package/dist/plannerAttempt.d.ts.map +1 -1
  44. package/dist/requestRequirements.d.ts +3 -15
  45. package/dist/requestRequirements.d.ts.map +1 -1
  46. package/dist/requestRequirements.js +11 -21
  47. package/dist/requestRequirements.js.map +1 -1
  48. package/dist/reviewerPanel.d.ts +9 -1
  49. package/dist/reviewerPanel.d.ts.map +1 -1
  50. package/dist/reviewerPanel.js +276 -133
  51. package/dist/reviewerPanel.js.map +1 -1
  52. package/dist/runAdmission.d.ts +29 -0
  53. package/dist/runAdmission.d.ts.map +1 -0
  54. package/dist/runAdmission.js +63 -0
  55. package/dist/runAdmission.js.map +1 -0
  56. package/dist/task-contract-builder.d.ts +2 -2
  57. package/dist/task-contract-builder.d.ts.map +1 -1
  58. package/dist/task-contract-builder.js +5 -6
  59. package/dist/task-contract-builder.js.map +1 -1
  60. package/package.json +17 -17
@@ -1,5 +1,4 @@
1
- import type { ConfinementHost } from "@claudexor/core";
2
- import type { AccessProfile, HarnessConfinement, WorkspaceEnvelope } from "@claudexor/schema";
1
+ import type { AccessProfile, RecordedAppliedAttemptFacts as HistoricalAppliedAttemptFacts, WorkspaceEnvelope } from "@claudexor/schema";
3
2
  import type { WorkspaceManager } from "@claudexor/workspace";
4
3
  /** What one attempt's harness HOME actually resolved to, and whether it is scoped. */
5
4
  export interface ScopedHarnessHome {
@@ -9,78 +8,35 @@ export interface ScopedHarnessHome {
9
8
  isolated: boolean;
10
9
  /** The scoped home directory, or null when the attempt inherits the operator's. */
11
10
  homeDir: string | null;
12
- /** The APPLIED OS boundary, or null when this attempt runs without one. */
13
- confinement: HarnessConfinement | null;
14
- /**
15
- * Why this attempt got NO boundary, when it asked for one and the host had
16
- * none. Null both when a boundary WAS applied and when none was ever asked
17
- * for — an ordinary run is not "unconfined", it is out of scope, and the
18
- * terminal gate below depends on being able to tell those apart.
19
- */
20
- confinementUnavailableReason: string | null;
11
+ /** Why no additional outer boundary applies; null for ordinary/non-mutating runs. */
12
+ outerBoundaryUnavailableReason: string | null;
21
13
  }
22
14
  /** Access profiles under which the harness can modify the filesystem. */
23
15
  export declare function isMutatingAccess(access: AccessProfile): boolean;
24
16
  /**
25
- * Whether this run's lanes should be told to stand their own sandbox down.
26
- *
27
- * Only a delegated run asks for an engine-provided boundary, and only a host
28
- * that can actually provide one earns the trade. Telling a harness to drop its
29
- * native sandbox where Claudexor will NOT replace it is a pure loss — strictly
30
- * worse than never having asked — so the two conditions are one expression
31
- * rather than a flag the caller passes and a check nobody makes.
32
- */
33
- export declare function externallyConfinedLane(delegated: boolean, host?: ConfinementHost): boolean;
34
- /** Roots the confinement is drawn against; overridable so tests never touch the real home. */
35
- export interface ConfinementRoots {
36
- operatorHome: string;
37
- runtimeRoot: string;
38
- nativeStateRoot: string;
39
- }
40
- export declare function defaultConfinementRoots(): ConfinementRoots;
41
- /**
42
- * Decide the harness HOME and the OS boundary one attempt runs under.
17
+ * Decide the harness HOME one attempt runs under.
43
18
  *
44
19
  * Unchanged for ordinary runs: an ISOLATED envelope gets the envelope's scoped
45
20
  * home, while an IN-PLACE attempt deliberately inherits the operator's native
46
21
  * environment so a harness whose native session store hangs off `$HOME` can
47
22
  * resume its vendor conversation.
48
23
  *
49
- * A DELEGATED run (`execution.delegated`) is scoped either way, and that is a
50
- * BEHAVIORAL CHANGE against that deliberate design live + agent is exactly
51
- * the configuration a delegated mutating subagent uses. It is taken knowingly:
52
- * the caller is a machine orchestrator that owns the workspace, and the
53
- * operator's real `$HOME` holds material no delegated harness may read, above
54
- * all `~/.claudexor/v3/daemon/token`, which grants the entire control API.
55
- *
56
- * THE SCOPED HOME IS NOT THE BOUNDARY. It redirects `~`-relative lookups and
57
- * nothing more; the token above is one absolute path away, and a live probe
58
- * read it out of an ordinary `workspace_write` agent run. So a delegated
59
- * MUTATING attempt additionally gets an OS-ENFORCED boundary
60
- * (`applyConfinement`), verified against a path it denies before the harness is
61
- * spawned. A delegated READ-ONLY attempt keeps the harness's own read-only
62
- * enforcement instead: confinement stands that enforcement down (macOS refuses
63
- * nested sandboxes), which would be a net loss where there is no shell to
64
- * confine.
65
- *
66
- * WHERE THE HOST HAS NO BOUNDARY the attempt still runs, and says so: the
67
- * reason travels onto the attempt record, into the child's prompt and into the
68
- * caller's result. A delegated run that refused on every platform Claudexor has
69
- * not implemented a mechanism for would be a macOS-only feature wearing a
70
- * general name.
24
+ * A DELEGATED run (`execution.delegated`) is scoped either way. The scoped HOME
25
+ * redirects native state and profile selection; it is deliberately not called
26
+ * a filesystem boundary. Mutating delegated attempts disclose that Claudexor
27
+ * adds no outer OS boundary and leave the selected harness's native access mode
28
+ * in effect.
71
29
  *
72
30
  * THE COST of the scoped home, stated plainly: an in-place delegated attempt
73
31
  * CANNOT resume a native vendor session whose store lives under the real `$HOME`
74
32
  * — cursor (`~/.cursor`) and opencode (XDG data under `$HOME`) lose resume.
75
33
  * codex and claude keep it: their native session stores are Claudexor-owned
76
- * directories that the adapter re-points on top of this env and that the
77
- * confinement carves back out, and the macOS login Keychain is reached through
34
+ * directories that the adapter re-points on top of this env, and the macOS login Keychain is reached through
78
35
  * the declared scoped-home bridge (INV-067), so subscription auth is unaffected.
79
36
  *
80
- * Never degrades silently: a delegated attempt whose scoped home is not on disk,
81
- * or whose boundary cannot be applied and proven, refuses.
37
+ * Never degrades silently: a delegated attempt whose scoped home is not on disk refuses.
82
38
  */
83
- export declare function scopedHarnessHome(wsm: WorkspaceManager, envelope: WorkspaceEnvelope, inPlaceEnvelope: boolean, delegated: boolean, access?: AccessProfile, roots?: ConfinementRoots, host?: ConfinementHost): ScopedHarnessHome;
39
+ export declare function scopedHarnessHome(wsm: WorkspaceManager, envelope: WorkspaceEnvelope, inPlaceEnvelope: boolean, delegated: boolean, access?: AccessProfile): ScopedHarnessHome;
84
40
  /**
85
41
  * What the CHILD is told, when it is running without an OS boundary.
86
42
  *
@@ -90,19 +46,19 @@ export declare function scopedHarnessHome(wsm: WorkspaceManager, envelope: Works
90
46
  * fact, so it is stated to the model in plain words rather than left in an
91
47
  * artifact it never reads.
92
48
  */
93
- export declare function confinementNotice(home: ScopedHarnessHome | null | undefined): string | null;
49
+ export declare function outerBoundaryNotice(home: ScopedHarnessHome | null | undefined): string | null;
94
50
  /**
95
51
  * What an attempt's harness process ACTUALLY ran under.
96
52
  *
97
53
  * One shape, written by the success path and the failure path alike. An attempt
98
54
  * that spawned a harness and then died still ran a process, and the caller of a
99
55
  * delegated run still needs to know what that process could reach — "it failed"
100
- * is not an answer to "was it confined".
56
+ * is not an answer to "what outer-boundary evidence applied".
101
57
  */
102
58
  export interface AppliedAttemptFacts {
103
59
  /**
104
60
  * ABSENT when the attempt died before its home was decided (`wsm.create` or
105
- * `applyConfinement` threw). A literal `false` is a POSITIVE claim — this
61
+ * home selection failed). A literal `false` is a POSITIVE claim — this
106
62
  * child ran in the operator's own HOME — and an attempt that never reached
107
63
  * the decision made no such claim. Absence keeps it a gap in the record,
108
64
  * which is what `appliedEvidenceComplete` already refuses on.
@@ -134,28 +90,24 @@ export interface AppliedAttemptFacts {
134
90
  */
135
91
  export declare function appliedAttemptFacts(home: ScopedHarnessHome | null | undefined, access: AccessProfile, credentialProfileId: string | null): AppliedAttemptFacts;
136
92
  /**
137
- * Whether an attempt's record is auditable for a delegated MUTATING run.
93
+ * Whether an attempt's record is auditable for a delegated mutating run.
138
94
  *
139
95
  * The distinction this predicate exists to draw: evidence that is MISSING is
140
96
  * still a reason to refuse — an attempt that cannot say what it ran under is
141
97
  * indistinguishable from one that ran unconfined behind a green terminal.
142
- * Evidence that honestly says "no boundary here, and here is why" is COMPLETE;
143
- * the absence of a boundary is a fact about the host, not a gap in the record,
144
- * and refusing on it would make a delegated mutating run impossible wherever
145
- * Claudexor has not implemented a mechanism.
98
+ * Evidence that honestly says "no additional boundary, by design" is complete.
146
99
  *
147
100
  * A named mechanism is a claim, and only `verified_denied_path` discharges it —
148
101
  * so a record carrying the name without the proof is NOT complete, and neither
149
102
  * is one that claims a boundary and a reason for its absence at the same time.
150
103
  */
151
- export declare function appliedEvidenceComplete(facts: AppliedAttemptFacts | null | undefined): boolean;
104
+ export declare function appliedEvidenceComplete(facts: AppliedAttemptFacts | HistoricalAppliedAttemptFacts | null | undefined): boolean;
152
105
  /**
153
- * The terminal gate, shared by every lane that assembles attempts.
106
+ * The terminal evidence gate, shared by every lane that assembles attempts.
154
107
  *
155
108
  * A delegated MUTATING run may only reach a terminal when EVERY attempt it ran
156
- * can state what it ran under. One lane checking and its twin not is how a
157
- * mutating child ends up unconfined behind a green run, so the rule lives here
158
- * and both callers spend it.
109
+ * can state what it ran under, including the deliberate absence of an outer
110
+ * boundary, so the rule lives here and both callers spend it.
159
111
  */
160
112
  export declare function assertDelegatedEvidence(delegated: boolean, access: AccessProfile, attempts: readonly {
161
113
  attemptId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"delegatedHome.d.ts","sourceRoot":"","sources":["../src/delegatedHome.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAOvD,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG9F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,sFAAsF;AACtF,MAAM,WAAW,iBAAiB;IAChC,sGAAsG;IACtG,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,wFAAwF;IACxF,QAAQ,EAAE,OAAO,CAAC;IAClB,mFAAmF;IACnF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,2EAA2E;IAC3E,WAAW,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACvC;;;;;OAKG;IACH,4BAA4B,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7C;AAED,yE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idenceIncompleteError, DelegatedHomeUnavailableError, } from "@claudexor/core";
3
- import { confinementBoundaryProven } from "@claudexor/schema";
4
- import { claudexorOwnedRoot, nativeHarnessStateRoot, userHomeDir } from "@claudexor/util";
2
+ import { DelegatedEvidenceIncompleteError, DelegatedHomeUnavailableError } from "@claudexor/core";
3
+ import { confinementBoundaryProven, DELIBERATE_NO_OUTER_BOUNDARY_REASON } from "@claudexor/schema";
5
4
  /** Access profiles under which the harness can modify the filesystem. */
6
5
  export function isMutatingAccess(access) {
7
6
  return access !== "readonly";
8
7
  }
9
8
  /**
10
- * Whether this run's lanes should be told to stand their own sandbox down.
11
- *
12
- * Only a delegated run asks for an engine-provided boundary, and only a host
13
- * that can actually provide one earns the trade. Telling a harness to drop its
14
- * native sandbox where Claudexor will NOT replace it is a pure loss — strictly
15
- * worse than never having asked — so the two conditions are one expression
16
- * rather than a flag the caller passes and a check nobody makes.
17
- */
18
- export function externallyConfinedLane(delegated, host) {
19
- return delegated && confinementBoundaryAvailable(host).available;
20
- }
21
- export function defaultConfinementRoots() {
22
- return {
23
- operatorHome: userHomeDir(),
24
- runtimeRoot: claudexorOwnedRoot(),
25
- nativeStateRoot: nativeHarnessStateRoot(),
26
- };
27
- }
28
- /**
29
- * Decide the harness HOME and the OS boundary one attempt runs under.
9
+ * Decide the harness HOME one attempt runs under.
30
10
  *
31
11
  * Unchanged for ordinary runs: an ISOLATED envelope gets the envelope's scoped
32
12
  * home, while an IN-PLACE attempt deliberately inherits the operator's native
33
13
  * environment so a harness whose native session store hangs off `$HOME` can
34
14
  * resume its vendor conversation.
35
15
  *
36
- * A DELEGATED run (`execution.delegated`) is scoped either way, and that is a
37
- * BEHAVIORAL CHANGE against that deliberate design live + agent is exactly
38
- * the configuration a delegated mutating subagent uses. It is taken knowingly:
39
- * the caller is a machine orchestrator that owns the workspace, and the
40
- * operator's real `$HOME` holds material no delegated harness may read, above
41
- * all `~/.claudexor/v3/daemon/token`, which grants the entire control API.
42
- *
43
- * THE SCOPED HOME IS NOT THE BOUNDARY. It redirects `~`-relative lookups and
44
- * nothing more; the token above is one absolute path away, and a live probe
45
- * read it out of an ordinary `workspace_write` agent run. So a delegated
46
- * MUTATING attempt additionally gets an OS-ENFORCED boundary
47
- * (`applyConfinement`), verified against a path it denies before the harness is
48
- * spawned. A delegated READ-ONLY attempt keeps the harness's own read-only
49
- * enforcement instead: confinement stands that enforcement down (macOS refuses
50
- * nested sandboxes), which would be a net loss where there is no shell to
51
- * confine.
52
- *
53
- * WHERE THE HOST HAS NO BOUNDARY the attempt still runs, and says so: the
54
- * reason travels onto the attempt record, into the child's prompt and into the
55
- * caller's result. A delegated run that refused on every platform Claudexor has
56
- * not implemented a mechanism for would be a macOS-only feature wearing a
57
- * general name.
16
+ * A DELEGATED run (`execution.delegated`) is scoped either way. The scoped HOME
17
+ * redirects native state and profile selection; it is deliberately not called
18
+ * a filesystem boundary. Mutating delegated attempts disclose that Claudexor
19
+ * adds no outer OS boundary and leave the selected harness's native access mode
20
+ * in effect.
58
21
  *
59
22
  * THE COST of the scoped home, stated plainly: an in-place delegated attempt
60
23
  * CANNOT resume a native vendor session whose store lives under the real `$HOME`
61
24
  * — cursor (`~/.cursor`) and opencode (XDG data under `$HOME`) lose resume.
62
25
  * codex and claude keep it: their native session stores are Claudexor-owned
63
- * directories that the adapter re-points on top of this env and that the
64
- * confinement carves back out, and the macOS login Keychain is reached through
26
+ * directories that the adapter re-points on top of this env, and the macOS login Keychain is reached through
65
27
  * the declared scoped-home bridge (INV-067), so subscription auth is unaffected.
66
28
  *
67
- * Never degrades silently: a delegated attempt whose scoped home is not on disk,
68
- * or whose boundary cannot be applied and proven, refuses.
29
+ * Never degrades silently: a delegated attempt whose scoped home is not on disk refuses.
69
30
  */
70
- export function scopedHarnessHome(wsm, envelope, inPlaceEnvelope, delegated, access = "workspace_write", roots = defaultConfinementRoots(), host) {
31
+ export function scopedHarnessHome(wsm, envelope, inPlaceEnvelope, delegated, access = "workspace_write") {
71
32
  if (inPlaceEnvelope && !delegated) {
72
33
  return {
73
34
  isolated: false,
74
35
  homeDir: null,
75
- confinement: null,
76
- confinementUnavailableReason: null,
36
+ outerBoundaryUnavailableReason: null,
77
37
  };
78
38
  }
79
39
  const env = wsm.envFor(envelope);
80
40
  const homeDir = env["HOME"];
81
41
  if (delegated && (!homeDir || !existsSync(homeDir))) {
82
- throw new DelegatedHomeUnavailableError(`delegated run cannot be confined: the scoped harness home for attempt ${envelope.attempt_id} is missing (${homeDir || "unset"})`);
42
+ throw new DelegatedHomeUnavailableError(`delegated run cannot start: the scoped harness home for attempt ${envelope.attempt_id} is missing (${homeDir || "unset"})`);
83
43
  }
84
- const outcome = delegated && isMutatingAccess(access)
85
- ? applyConfinement({
86
- operatorHome: roots.operatorHome,
87
- runtimeRoot: roots.runtimeRoot,
88
- nativeStateRoot: roots.nativeStateRoot,
89
- scopedHome: homeDir,
90
- worktree: envelope.worktree_path,
91
- }, host)
92
- : { confinement: null, unavailableReason: null };
93
44
  return {
94
45
  env,
95
46
  isolated: true,
96
47
  homeDir: homeDir ?? null,
97
- confinement: outcome.confinement,
98
- confinementUnavailableReason: outcome.unavailableReason,
48
+ outerBoundaryUnavailableReason: delegated && isMutatingAccess(access) ? DELIBERATE_NO_OUTER_BOUNDARY_REASON : null,
99
49
  };
100
50
  }
101
51
  /**
@@ -107,16 +57,14 @@ export function scopedHarnessHome(wsm, envelope, inPlaceEnvelope, delegated, acc
107
57
  * fact, so it is stated to the model in plain words rather than left in an
108
58
  * artifact it never reads.
109
59
  */
110
- export function confinementNotice(home) {
111
- const reason = home?.confinementUnavailableReason;
60
+ export function outerBoundaryNotice(home) {
61
+ const reason = home?.outerBoundaryUnavailableReason;
112
62
  if (!reason)
113
63
  return null;
114
64
  return [
115
- "Engine disclosure — NO OS-ENFORCED BOUNDARY: this delegated run was asked to put your",
116
- `process inside a kernel-enforced filesystem boundary and could not: ${reason}.`,
117
- "Nothing outside this notice stops you from reading or writing any path this user account",
118
- "can reach. Confine yourself to the worktree you were given and the HOME you were given,",
119
- "and do not read the operator's credential stores or Claudexor's own runtime directory.",
65
+ `Engine disclosure: ${reason}`,
66
+ "The scoped HOME selects native state and credentials; it is not containment. Stay within",
67
+ "the execution workspace and do not access unrelated operator or Claudexor state.",
120
68
  ].join("\n");
121
69
  }
122
70
  /**
@@ -132,22 +80,19 @@ export function appliedAttemptFacts(home, access, credentialProfileId) {
132
80
  harness_home_dir: home?.homeDir ?? null,
133
81
  access_applied: access,
134
82
  credential_profile_applied: credentialProfileId,
135
- confinement_mechanism: home?.confinement?.mechanism ?? null,
136
- confinement_profile_digest: home?.confinement?.profile_digest ?? null,
137
- confinement_verified_denied_path: home?.confinement?.verified_denied_path ?? null,
138
- confinement_unavailable_reason: home?.confinementUnavailableReason ?? null,
83
+ confinement_mechanism: null,
84
+ confinement_profile_digest: null,
85
+ confinement_verified_denied_path: null,
86
+ confinement_unavailable_reason: home?.outerBoundaryUnavailableReason ?? null,
139
87
  };
140
88
  }
141
89
  /**
142
- * Whether an attempt's record is auditable for a delegated MUTATING run.
90
+ * Whether an attempt's record is auditable for a delegated mutating run.
143
91
  *
144
92
  * The distinction this predicate exists to draw: evidence that is MISSING is
145
93
  * still a reason to refuse — an attempt that cannot say what it ran under is
146
94
  * indistinguishable from one that ran unconfined behind a green terminal.
147
- * Evidence that honestly says "no boundary here, and here is why" is COMPLETE;
148
- * the absence of a boundary is a fact about the host, not a gap in the record,
149
- * and refusing on it would make a delegated mutating run impossible wherever
150
- * Claudexor has not implemented a mechanism.
95
+ * Evidence that honestly says "no additional boundary, by design" is complete.
151
96
  *
152
97
  * A named mechanism is a claim, and only `verified_denied_path` discharges it —
153
98
  * so a record carrying the name without the proof is NOT complete, and neither
@@ -162,12 +107,11 @@ export function appliedEvidenceComplete(facts) {
162
107
  return Boolean(facts.confinement_unavailable_reason);
163
108
  }
164
109
  /**
165
- * The terminal gate, shared by every lane that assembles attempts.
110
+ * The terminal evidence gate, shared by every lane that assembles attempts.
166
111
  *
167
112
  * A delegated MUTATING run may only reach a terminal when EVERY attempt it ran
168
- * can state what it ran under. One lane checking and its twin not is how a
169
- * mutating child ends up unconfined behind a green run, so the rule lives here
170
- * and both callers spend it.
113
+ * can state what it ran under, including the deliberate absence of an outer
114
+ * boundary, so the rule lives here and both callers spend it.
171
115
  */
172
116
  export function assertDelegatedEvidence(delegated, access, attempts) {
173
117
  if (!delegated || !isMutatingAccess(access))
@@ -175,6 +119,6 @@ export function assertDelegatedEvidence(delegated, access, attempts) {
175
119
  const unauditable = attempts.filter((attempt) => !appliedEvidenceComplete(attempt.applied));
176
120
  if (unauditable.length === 0)
177
121
  return;
178
- throw new DelegatedEvidenceIncompleteError(`delegated mutating run cannot terminalize: ${unauditable.length} attempt(s) state neither a proven confinement nor a reason there was none (${unauditable.map((attempt) => attempt.attemptId).join(", ")})`);
122
+ throw new DelegatedEvidenceIncompleteError(`delegated mutating run cannot terminalize: ${unauditable.length} attempt(s) state neither a historical proven boundary nor the deliberate no-outer-boundary reason (${unauditable.map((attempt) => attempt.attemptId).join(", ")})`);
179
123
  }
180
124
  //# sourceMappingURL=delegatedHome.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"delegatedHome.js","sourceRoot":"","sources":["../src/delegatedHome.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EACL,gBAAgB,EAChB,4BAA4B,EAC5B,gCAAgC,EAChC,6BAA6B,GAC9B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAsB1F,yEAAyE;AACzE,MAAM,UAAU,gBAAgB,CAAC,MAAqB;IACpD,OAAO,MAAM,KAAK,UAAU,CAAC;AAC/B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CAAC,SAAkB,EAA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OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CACrO,CAAC;AACJ,CAAC"}
@@ -38,10 +38,11 @@ export interface DiffReviewResult {
38
38
  reviewCashUsd: number;
39
39
  reviewValuationUsd: number;
40
40
  reviewUnknownUsd: number;
41
+ ignoredSettings: string[];
41
42
  artifactsDir: string;
42
43
  }
43
44
  export interface DiffReviewDeps {
44
- resolveReviewers: (repoRoot: string, authPreference?: AuthPreference) => Promise<ReviewerSpec[]>;
45
+ resolveReviewers: (repoRoot: string, authPreference?: AuthPreference, onIgnoredSetting?: (detail: string) => void) => Promise<ReviewerSpec[]>;
45
46
  reviewScoped: (input: Omit<Parameters<typeof reviewCandidate>[0], "env">) => ReturnType<typeof reviewCandidate>;
46
47
  execRootOf: (repoRoot: string) => string;
47
48
  envInheritance: (repoRoot: string) => "mirror_native" | "clean";
@@ -1 +1 @@
1
- {"version":3,"file":"diffReview.d.ts","sourceRoot":"","sources":["../src/diffReview.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvF,OAAO,EAAsB,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIhG,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;+EAG2E;IAC3E,UAAU,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAClC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EA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AAC;IACtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,gBAAgB,EAAE,CAChB,QAAQ,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE,cAAc,EAC/B,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,KACxC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAC7B,YAAY,EAAE,CACZ,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KACtD,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;IACxC,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,eAAe,GAAG,OAAO,CAAC;CACjE;AAED,wBAAsB,aAAa,CACjC,KAAK,EAAE,eAAe,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAuG3B"}
@@ -10,7 +10,7 @@ import { isAbsolute, join, relative, resolve, sep } from "node:path";
10
10
  import { HarnessUnavailableError, runCapture, runCaptureRaw } from "@claudexor/core";
11
11
  import { revalidateFindings } from "@claudexor/review";
12
12
  import { verifySealedEvidencePacket, writeEvidencePacket } from "@claudexor/context";
13
- import { containsSecretLikeToken, redactSecrets } from "@claudexor/util";
13
+ import { containsSecretLikeToken, ensureDir, redactSecrets, writeJson } from "@claudexor/util";
14
14
  export async function runDiffReview(input, deps) {
15
15
  if (input.frozen && input.diff !== undefined) {
16
16
  throw new Error("reviewDiff: frozen review consumes DIFF.patch from the sealed packet");
@@ -36,7 +36,12 @@ export async function runDiffReview(input, deps) {
36
36
  throw new Error(`reviewDiff: ${label} contains a secret-like token; refusing review (remove the secret first)`);
37
37
  }
38
38
  }
39
- const reviewers = await deps.resolveReviewers(input.repoRoot, input.authPreference);
39
+ const ignoredSettings = [];
40
+ const reviewers = await deps.resolveReviewers(input.repoRoot, input.authPreference, (detail) => {
41
+ if (!ignoredSettings.includes(detail))
42
+ ignoredSettings.push(detail);
43
+ input.onReviewerEvent?.({ type: "review.preflight", ignored_settings: [detail] });
44
+ });
40
45
  if (reviewers.length === 0) {
41
46
  throw new HarnessUnavailableError("no eligible reviewers (doctor-OK, review-capable) are available");
42
47
  }
@@ -78,6 +83,12 @@ export async function runDiffReview(input, deps) {
78
83
  ? (event) => input.onReviewerEvent?.({ ...event })
79
84
  : undefined,
80
85
  });
86
+ if (ignoredSettings.length > 0) {
87
+ ensureDir(artifactsDir);
88
+ writeJson(join(artifactsDir, "ignored-settings.json"), {
89
+ ignored_settings: ignoredSettings,
90
+ });
91
+ }
81
92
  if (input.frozen) {
82
93
  await verifyFrozenReviewPacket(input.repoRoot, input.frozen, false);
83
94
  }
@@ -95,6 +106,7 @@ export async function runDiffReview(input, deps) {
95
106
  reviewCashUsd: result.reviewCashUsd,
96
107
  reviewValuationUsd: result.reviewValuationUsd,
97
108
  reviewUnknownUsd: result.reviewUnknownUsd,
109
+ ignoredSettings,
98
110
  artifactsDir,
99
111
  };
100
112
  }
@@ -1 +1 @@
1
- {"version":3,"file":"diffReview.js","sourceRoot":"","sources":["../src/diffReview.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAErE,OAAO,EAAE,uBAAuB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAA2C,MAAM,mBAAmB,CAAC;AAChG,OAAO,EAAE,0BAA0B,EAAE,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G,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CACvF,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC;AACvB,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY,EAAE,SAAiB;IAC/C,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACvC,OAAO,IAAI,KAAK,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;AAC7F,CAAC"}
@@ -7,13 +7,23 @@
7
7
  * (account-resolution.ts). No run/lane state lives here — only per-decision
8
8
  * reads over the host's config and deps.
9
9
  */
10
- import type { CredentialProfile, CredentialUnusableObservation, HarnessRunSpec, QuotaAbsence, QuotaSnapshot } from "@claudexor/schema";
10
+ import type { AuthPreference, CredentialProfile, CredentialUnusableObservation, HarnessRunSpec, QuotaAbsence, QuotaSnapshot } from "@claudexor/schema";
11
11
  import type { loadConfig } from "@claudexor/config";
12
12
  import type { AdapterRegistry, HarnessAdapter } from "@claudexor/core";
13
13
  import type { EventLog } from "@claudexor/event-log";
14
14
  import { type ProfilePolicy, type VendorQuotaObservations } from "./credential-profiles.js";
15
15
  import type { TransientFailureObservation } from "./transientClassify.js";
16
16
  import type { RunInput } from "./orchestrator.js";
17
+ /** Model-first reviewer account resolution input, without a fabricated RunInput. */
18
+ export interface ReviewerProfileResolutionInput {
19
+ repoRoot: string;
20
+ harnessId: string;
21
+ model: string | null;
22
+ authPreference: AuthPreference;
23
+ credentialProfileId: string | null;
24
+ excludedProfileIds?: ReadonlySet<string>;
25
+ }
26
+ export declare function reviewerProfileResolver(credentials: OrchestratorCredentials, repoRoot: string): (input: Omit<ReviewerProfileResolutionInput, "repoRoot">) => Promise<CredentialProfile | null>;
17
27
  /** The slice of the Orchestrator this cluster reads; accessor functions so the
18
28
  * host can defer to deps assigned after this field initializes. */
19
29
  export interface CredentialResolutionHost {
@@ -87,7 +97,8 @@ export declare class OrchestratorCredentials {
87
97
  expires_at: string;
88
98
  }[];
89
99
  };
90
- /** Thin wrapper over the ONE account-resolution owner (account-resolution.ts). */
100
+ /** Resolve one reviewer slot through the ordinary account-pool owner. */
101
+ preflightReviewerProfile(input: ReviewerProfileResolutionInput): Promise<CredentialProfile | null>;
91
102
  preflightProfile(input: RunInput, harnessId: string, model: string | null, log: EventLog | undefined, defaultRoute: "local_session" | "api_key" | null): Promise<CredentialProfile | null>;
92
103
  }
93
104
  //# sourceMappingURL=orchestrator-credentials.d.ts.map
@@ -1 +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;AAEvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGrD,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD;mEACmE;AACnE,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;IACxD,QAAQ,IAAI,eAAe,CAAC;IAC5B,cAAc,IAAI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EACjB,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,GAAG,iBAAiB,CAAC,GAAG,IAAI,EACzE,QAAQ,GAAE,WAAW,CAAC,MAAM,CAAa,EACzC,KAAK,GAAE,MAAM,GAAG,IAAW,GAC1B,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAa9B;IAED;4EACwE;IACxE,oBAAoB,CAClB,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,cAAc,EACpB,UAAU,EAAE,SAAS,2BAA2B,EAAE;QAGhD,mBAAmB;QASnB,YAAY;;;;;;;;;;MAEf;IAED,yEAAyE;IACnE,wBAAwB,CAC5B,KAAK,EAAE,8BAA8B,GACpC,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAuEnC;IAEK,gBAAgB,CACpB,KAAK,EAAE,QAAQ,EACf,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,GAAG,EAAE,QAAQ,GAAG,SAAS,EACzB,YAAY,EAAE,eAAe,GAAG,SAAS,GAAG,IAAI,GAC/C,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CA6BnC;CACF"}
@@ -1,7 +1,10 @@
1
- import { credentialProfilePolicyProblem, credentialProfilePolicyState } from "@claudexor/core";
1
+ import { HarnessUnavailableError, credentialProfilePolicyProblem, credentialProfilePolicyState, } from "@claudexor/core";
2
2
  import { PoolRouteFlags, resolveAccountForRun } from "./account-resolution.js";
3
3
  import { currentSubjectProber, readyProfilesForRotation } from "./credential-differential.js";
4
- import { resolveCredentialProfile, } from "./credential-profiles.js";
4
+ import { resolveCredentialProfile, probeCredentialProfileStatus, profileStatusAdmits, vendorVerifiedProfileStatus, } from "./credential-profiles.js";
5
+ export function reviewerProfileResolver(credentials, repoRoot) {
6
+ return (input) => credentials.preflightReviewerProfile({ repoRoot, ...input });
7
+ }
5
8
  /**
6
9
  * INV-137: a mid-attempt credential rotation must move the spec's LANE home
7
10
  * with it. The lane env is keyed by the RESOLVED profile, so a rotated spec
@@ -131,7 +134,65 @@ export class OrchestratorCredentials {
131
134
  liveUnusable: this.host.credentialUnusable(),
132
135
  };
133
136
  }
134
- /** Thin wrapper over the ONE account-resolution owner (account-resolution.ts). */
137
+ /** Resolve one reviewer slot through the ordinary account-pool owner. */
138
+ async preflightReviewerProfile(input) {
139
+ const adapter = this.host.registry().get(input.harnessId);
140
+ const registry = this.host.config(input.repoRoot)?.global.credential_profiles ?? [];
141
+ const profileCardinality = credentialProfilePolicyState({ adapter, registry });
142
+ if (profileCardinality.ambiguous)
143
+ throw credentialProfilePolicyProblem(profileCardinality, "credential_profile_ambiguous");
144
+ let pinnedProfile = null;
145
+ if (input.credentialProfileId) {
146
+ try {
147
+ pinnedProfile = resolveCredentialProfile(registry, input.credentialProfileId, input.harnessId);
148
+ }
149
+ catch (error) {
150
+ throw new HarnessUnavailableError(error instanceof Error ? error.message : String(error));
151
+ }
152
+ }
153
+ if (input.credentialProfileId && !pinnedProfile) {
154
+ throw new HarnessUnavailableError(`reviewer credential profile "${input.credentialProfileId}" is unknown, disabled, or belongs to another harness (${input.harnessId})`);
155
+ }
156
+ const quota = this.vendorQuotaObservations();
157
+ // The reviewer preflight must prove an explicit pin before any model
158
+ // inventory call. The ordinary resolver intentionally keeps this probe
159
+ // optional for legacy run admission; this caller opts into the stricter
160
+ // reviewer contract without changing ordinary runs.
161
+ if (pinnedProfile) {
162
+ const status = vendorVerifiedProfileStatus(await probeCredentialProfileStatus(pinnedProfile, adapter?.probeCredentialProfile?.bind(adapter)), quota);
163
+ if (!profileStatusAdmits(pinnedProfile, status)) {
164
+ throw new HarnessUnavailableError(`reviewer credential profile "${pinnedProfile.profile_id}" (${input.harnessId}) is not ready: ${status.detail ?? `${status.availability}/${status.verification}`}`);
165
+ }
166
+ }
167
+ const defaultRoute = input.authPreference === "api_key"
168
+ ? "api_key"
169
+ : input.authPreference === "subscription"
170
+ ? "local_session"
171
+ : null;
172
+ return resolveAccountForRun({
173
+ harnessId: input.harnessId,
174
+ registry,
175
+ policy: this.profilePolicy(input.repoRoot, input.harnessId),
176
+ profileCardinality,
177
+ snapshots: this.host.quotaSnapshots(),
178
+ quota,
179
+ unusable: this.host.credentialUnusable(),
180
+ probe: adapter?.probeCredentialProfile?.bind(adapter),
181
+ pinnedProfile,
182
+ excludedProfileIds: input.excludedProfileIds,
183
+ boundProfileId: null,
184
+ threadId: null,
185
+ model: input.model,
186
+ defaultRoute,
187
+ nativeCredentialsDisabled: this.nativeCredentialsDisabled(input.repoRoot, input.harnessId),
188
+ authPreference: input.authPreference,
189
+ // Reviewer resolution has no ordinary RunInput identity to retain. The
190
+ // selected profile is returned directly; explicit api_key remains in the
191
+ // auth preference and therefore needs no pool flag.
192
+ notePoolApiKeyRoute: () => { },
193
+ emit: () => { },
194
+ });
195
+ }
135
196
  async preflightProfile(input, harnessId, model, log, defaultRoute) {
136
197
  const adapter = this.host.registry().get(harnessId);
137
198
  const registry = this.host.config(input.repoRoot)?.global.credential_profiles ?? [];