@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.
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,71 @@
1
+ /**
2
+ * A2: the WIDENED reactive rotation predicate (W5.4 + the structural branch).
3
+ *
4
+ * Two independent ways an attempt becomes rotation-eligible:
5
+ *
6
+ * 1. TYPED fast path (W5.4 canon, unchanged): the attempt saw a TYPED vendor
7
+ * rate-limit signal. Deliberately NOT hardened against thinking/tool
8
+ * activity — the canon guard is no-deliverable/no-mutation, not
9
+ * no-progress.
10
+ *
11
+ * 2. STRUCTURAL branch (owner decision 7=A): the attempt ended in a TERMINAL,
12
+ * non-transient death BEFORE the agent demonstrably did any work. This
13
+ * deliberately covers ANY pre-progress non-transient death — an invalid
14
+ * flag, a missing binary, an untyped vendor refusal — bounded by the
15
+ * profile pool size, and is NEVER narrowed by error-text matching.
16
+ * Transient-retryable deaths are excluded: the transient machinery retries
17
+ * them on the SAME profile first (rotation never fires on a plain
18
+ * transient).
19
+ *
20
+ * Both branches require an empty deliverable and no observed workspace
21
+ * mutation — a partially-acted attempt never silently reruns under another
22
+ * credential.
23
+ */
24
+ import type { AttemptOutputMarkers } from "./attemptOutputMarkers.js";
25
+ /** Typed evidence one native try presents to the rotation predicate. */
26
+ export interface RotationEvidence {
27
+ /** A TYPED vendor rate-limit signal was observed this try (W5.4). */
28
+ sawTypedLimit: boolean;
29
+ /** No POLICY-ACCEPTED answer material (`acceptedTryOutput`: an errored try's
30
+ * mid-stream narration — e.g. a vendor refusal arriving as MESSAGE prose —
31
+ * never counts, for ANY adapter) and (candidate lane) no workspace diff. */
32
+ deliverableEmpty: boolean;
33
+ /** A workspace mutation was OBSERVED: a non-empty diff (candidate lane) or
34
+ * any typed file_change event (both lanes — the read-only lane has no
35
+ * workspace diff, so disclosed file changes are its only mutation truth). */
36
+ mutationObserved: boolean;
37
+ /** The try ended in a terminal error that is NOT transient-retryable (the
38
+ * transient machinery owns same-profile retries for the retryable class). */
39
+ terminalNonTransientDeath: boolean;
40
+ /** The agent demonstrably started working (attemptOutputMarkers policy:
41
+ * thinking/tool/file/patch/compaction — deliberately NOT message/error). */
42
+ sawAgentProgress: boolean;
43
+ }
44
+ /**
45
+ * `rotation_retry_eligible`: the one predicate both lanes and both branches
46
+ * read. Optional fields default CONSERVATIVELY (absent evidence never widens
47
+ * eligibility), so the frozen truth-table pins keep their meaning.
48
+ */
49
+ export declare function rotationRetryEligible(input: {
50
+ sawTypedLimit: boolean;
51
+ deliverableEmpty: boolean;
52
+ mutationObserved?: boolean;
53
+ terminalNonTransientDeath?: boolean;
54
+ sawAgentProgress?: boolean;
55
+ }): boolean;
56
+ /**
57
+ * Fold one native try's lane-local facts + the attempt's typed output markers
58
+ * into RotationEvidence. `attemptErrored` / `sawRetryable` come from the
59
+ * lane's per-try failure state; `workspaceDiffNonEmpty` exists only in the
60
+ * candidate lane (the read-only lane omits it and relies on file_change
61
+ * markers alone).
62
+ */
63
+ export declare function reactiveRotationEvidence(args: {
64
+ markers: AttemptOutputMarkers;
65
+ sawTypedLimit: boolean;
66
+ sawRetryable: boolean;
67
+ attemptErrored: boolean;
68
+ deliverableEmpty: boolean;
69
+ workspaceDiffNonEmpty?: boolean;
70
+ }): RotationEvidence;
71
+ //# sourceMappingURL=rotation-predicate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rotation-predicate.d.ts","sourceRoot":"","sources":["../src/rotation-predicate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,wEAAwE;AACxE,MAAM,WAAW,gBAAgB;IAC/B,qEAAqE;IACrE,aAAa,EAAE,OAAO,CAAC;IACvB;;gFAE4E;IAC5E,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;iFAE6E;IAC7E,gBAAgB,EAAE,OAAO,CAAC;IAC1B;iFAC6E;IAC7E,yBAAyB,EAAE,OAAO,CAAC;IACnC;gFAC4E;IAC5E,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,GAAG,OAAO,CAIV;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC7C,OAAO,EAAE,oBAAoB,CAAC;IAC9B,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC,GAAG,gBAAgB,CAQnB"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * `rotation_retry_eligible`: the one predicate both lanes and both branches
3
+ * read. Optional fields default CONSERVATIVELY (absent evidence never widens
4
+ * eligibility), so the frozen truth-table pins keep their meaning.
5
+ */
6
+ export function rotationRetryEligible(input) {
7
+ if (!input.deliverableEmpty || input.mutationObserved === true)
8
+ return false;
9
+ if (input.sawTypedLimit)
10
+ return true;
11
+ return input.terminalNonTransientDeath === true && input.sawAgentProgress !== true;
12
+ }
13
+ /**
14
+ * Fold one native try's lane-local facts + the attempt's typed output markers
15
+ * into RotationEvidence. `attemptErrored` / `sawRetryable` come from the
16
+ * lane's per-try failure state; `workspaceDiffNonEmpty` exists only in the
17
+ * candidate lane (the read-only lane omits it and relies on file_change
18
+ * markers alone).
19
+ */
20
+ export function reactiveRotationEvidence(args) {
21
+ return {
22
+ sawTypedLimit: args.sawTypedLimit,
23
+ deliverableEmpty: args.deliverableEmpty,
24
+ mutationObserved: (args.workspaceDiffNonEmpty ?? false) || args.markers.fileChanges > 0,
25
+ terminalNonTransientDeath: args.attemptErrored && !args.sawRetryable,
26
+ sawAgentProgress: args.markers.sawAgentProgress,
27
+ };
28
+ }
29
+ //# sourceMappingURL=rotation-predicate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rotation-predicate.js","sourceRoot":"","sources":["../src/rotation-predicate.ts"],"names":[],"mappings":"AA6CA;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAMrC;IACC,IAAI,CAAC,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,gBAAgB,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC7E,IAAI,KAAK,CAAC,aAAa;QAAE,OAAO,IAAI,CAAC;IACrC,OAAO,KAAK,CAAC,yBAAyB,KAAK,IAAI,IAAI,KAAK,CAAC,gBAAgB,KAAK,IAAI,CAAC;AACrF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAOxC;IACC,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;QACvC,gBAAgB,EAAE,CAAC,IAAI,CAAC,qBAAqB,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,GAAG,CAAC;QACvF,yBAAyB,EAAE,IAAI,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,YAAY;QACpE,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB;KAChD,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudexor/orchestrator",
3
- "version": "3.4.2",
3
+ "version": "3.6.0",
4
4
  "license": "MIT",
5
5
  "description": "Hub that composes all subsystems and implements the three canonical intents (ask, plan, agent) with their strategy flags (ask deep-scan, plan solo/council, agent best-of-N race, attempt caps, until-clean, create, delegate).",
6
6
  "type": "module",
@@ -17,24 +17,24 @@
17
17
  ],
18
18
  "dependencies": {
19
19
  "ajv": "^8.20.0",
20
- "@claudexor/arbitration": "3.4.2",
21
- "@claudexor/budget": "3.4.2",
22
- "@claudexor/config": "3.4.2",
23
- "@claudexor/context": "3.4.2",
24
- "@claudexor/artifact-store": "3.4.2",
25
- "@claudexor/core": "3.4.2",
26
- "@claudexor/delivery": "3.4.2",
27
- "@claudexor/event-log": "3.4.2",
28
- "@claudexor/gateway": "3.4.2",
29
- "@claudexor/policy": "3.4.2",
30
- "@claudexor/review": "3.4.2",
31
- "@claudexor/schema": "3.4.2",
32
- "@claudexor/synthesis": "3.4.2",
33
- "@claudexor/util": "3.4.2",
34
- "@claudexor/workspace": "3.4.2"
20
+ "@claudexor/arbitration": "3.6.0",
21
+ "@claudexor/artifact-store": "3.6.0",
22
+ "@claudexor/budget": "3.6.0",
23
+ "@claudexor/config": "3.6.0",
24
+ "@claudexor/context": "3.6.0",
25
+ "@claudexor/core": "3.6.0",
26
+ "@claudexor/delivery": "3.6.0",
27
+ "@claudexor/event-log": "3.6.0",
28
+ "@claudexor/gateway": "3.6.0",
29
+ "@claudexor/policy": "3.6.0",
30
+ "@claudexor/review": "3.6.0",
31
+ "@claudexor/schema": "3.6.0",
32
+ "@claudexor/synthesis": "3.6.0",
33
+ "@claudexor/util": "3.6.0",
34
+ "@claudexor/workspace": "3.6.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@claudexor/harness-fake": "3.4.2"
37
+ "@claudexor/harness-fake": "3.6.0"
38
38
  },
39
39
  "repository": {
40
40
  "type": "git",