audit-tools 0.32.11 → 0.32.13

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 (36) hide show
  1. package/dist/audit/quota/index.d.ts +8 -8
  2. package/dist/remediate/steps/dispatch.d.ts.map +1 -1
  3. package/dist/remediate/steps/dispatch.js +22 -16
  4. package/dist/remediate/steps/dispatch.js.map +1 -1
  5. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  6. package/dist/remediate/steps/nextStep.js +3 -3
  7. package/dist/remediate/steps/nextStep.js.map +1 -1
  8. package/dist/shared/data/model-statics.generated.json +18939 -0
  9. package/dist/shared/index.d.ts +2 -2
  10. package/dist/shared/index.d.ts.map +1 -1
  11. package/dist/shared/index.js +1 -1
  12. package/dist/shared/index.js.map +1 -1
  13. package/dist/shared/quota/capacity.d.ts +3 -3
  14. package/dist/shared/quota/hostSessionQuotaSource.d.ts +2 -3
  15. package/dist/shared/quota/hostSessionQuotaSource.d.ts.map +1 -1
  16. package/dist/shared/quota/hostSessionQuotaSource.js +2 -3
  17. package/dist/shared/quota/hostSessionQuotaSource.js.map +1 -1
  18. package/dist/shared/quota/limits.d.ts.map +1 -1
  19. package/dist/shared/quota/limits.js +27 -5
  20. package/dist/shared/quota/limits.js.map +1 -1
  21. package/dist/shared/quota/modelStatics.d.ts +24 -0
  22. package/dist/shared/quota/modelStatics.d.ts.map +1 -0
  23. package/dist/shared/quota/modelStatics.js +70 -0
  24. package/dist/shared/quota/modelStatics.js.map +1 -0
  25. package/dist/shared/quota/scheduler.d.ts.map +1 -1
  26. package/dist/shared/quota/scheduler.js +3 -2
  27. package/dist/shared/quota/scheduler.js.map +1 -1
  28. package/dist/shared/quota/types.d.ts +1 -1
  29. package/dist/shared/quota/types.d.ts.map +1 -1
  30. package/dist/shared/quota/types.js +1 -0
  31. package/dist/shared/quota/types.js.map +1 -1
  32. package/package.json +3 -2
  33. package/dist/shared/quota/rollingEngine.d.ts +0 -130
  34. package/dist/shared/quota/rollingEngine.d.ts.map +0 -1
  35. package/dist/shared/quota/rollingEngine.js +0 -153
  36. package/dist/shared/quota/rollingEngine.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "audit-tools",
3
- "version": "0.32.11",
3
+ "version": "0.32.13",
4
4
  "private": false,
5
5
  "license": "ISC",
6
6
  "description": "Portable hybrid code auditing + remediation orchestrators for arbitrary repositories.",
@@ -37,7 +37,7 @@
37
37
  ],
38
38
  "scripts": {
39
39
  "postinstall": "node scripts/postinstall.mjs",
40
- "build": "tsc -p tsconfig.json",
40
+ "build": "tsc -p tsconfig.json && node scripts/shared/copy-data-assets.mjs",
41
41
  "check": "tsc -p tsconfig.json --noEmit",
42
42
  "test:doc-contract": "vitest run tests/audit/release-contract.test.mjs tests/audit/priority-chain-doc-sync.test.mjs tests/audit/file-lock-doc-sync.test.mjs tests/audit/host-asset-renderer-drift.test.mjs",
43
43
  "test": "npm run build && vitest run",
@@ -53,6 +53,7 @@
53
53
  "smoke:linked-remediate-code": "node scripts/remediate/smoke-linked-remediate-code.mjs",
54
54
  "smoke:packaged-remediate-code": "node scripts/remediate/smoke-packaged-remediate-code.mjs",
55
55
  "update-languages": "node scripts/audit/update-languages.mjs",
56
+ "update-models": "node scripts/shared/update-models.mjs",
56
57
  "generate-schemas": "node scripts/audit/generate-schemas.mjs",
57
58
  "fixtures:auditor-contract": "node scripts/remediate/generate-auditor-contract-fixture.mjs",
58
59
  "release:patch:publish": "node scripts/release-and-publish.mjs patch",
@@ -1,130 +0,0 @@
1
- /**
2
- * Rolling engine — provider-pool-change semantics (drop + re-route).
3
- *
4
- * Manages a mutable active provider pool across a dispatch run. When a provider
5
- * signals quota exhaustion or disappears, the engine drops it from the active
6
- * routing set, re-queues any in-flight packets that had been assigned to it, and
7
- * re-routes those packets to the remaining active providers.
8
- *
9
- * NOTE: The empty-pool terminal (active_pools reaches zero → waiting_for_provider)
10
- * is NOT handled here — that is N-S09's responsibility. When dropProvider is
11
- * called on the last active pool it returns a state with active_pools: [] and
12
- * the caller's engine loop detects and handles the empty-pool condition.
13
- */
14
- import type { SessionConfig } from "../types/sessionConfig.js";
15
- import type { CapacityPool, PartialCompletionTerminal } from "./capacity.js";
16
- import type { FreshSessionProvider } from "../providers/types.js";
17
- import { computeDispatchCapacity } from "./capacity.js";
18
- /** Reason a provider was removed from the active pool. */
19
- export type ProviderPoolEventKind = "exhausted" | "unavailable";
20
- /**
21
- * A recorded pool-change event: a provider was removed from active routing.
22
- * - `exhausted`: quota/rate-limit exhaustion (detectRateLimitError returned a hit).
23
- * - `unavailable`: spawn failed with a non-retryable error.
24
- */
25
- export interface ProviderPoolEvent {
26
- kind: ProviderPoolEventKind;
27
- provider_id: string;
28
- timestamp: string;
29
- in_flight_count: number;
30
- requeued_count: number;
31
- }
32
- /**
33
- * An active pool entry: the capacity descriptor plus its provider instance.
34
- */
35
- export interface RollingEnginePoolEntry {
36
- pool: CapacityPool;
37
- provider: FreshSessionProvider;
38
- }
39
- /**
40
- * Input to the rolling engine: the set of pools available at dispatch start.
41
- */
42
- export type RollingEnginePool = RollingEnginePoolEntry[];
43
- /**
44
- * A packet token tracked by the rolling engine.
45
- * The engine is payload-agnostic; only the id and pool assignment matter here.
46
- */
47
- export interface EnginePacketToken {
48
- /** Stable unique id for this packet. */
49
- id: string;
50
- /** The pool_id this packet was assigned to (in-flight or pending). */
51
- assigned_pool_id: string;
52
- /** Estimated input tokens for this packet. */
53
- estimated_tokens: number;
54
- }
55
- /**
56
- * Mutable state managed by the rolling engine.
57
- *
58
- * - `active_pools`: providers currently eligible for dispatch.
59
- * - `exhausted_pools`: providers removed due to quota/unavailability.
60
- * - `in_flight_tokens`: packets currently dispatched and awaiting a result.
61
- * - `pending_tokens`: packets queued but not yet dispatched (includes requeued).
62
- * - `event_log`: ordered record of pool-change events.
63
- */
64
- export interface RollingEnginePoolState {
65
- active_pools: RollingEnginePoolEntry[];
66
- exhausted_pools: RollingEnginePoolEntry[];
67
- in_flight_tokens: EnginePacketToken[];
68
- pending_tokens: EnginePacketToken[];
69
- event_log: ProviderPoolEvent[];
70
- }
71
- /**
72
- * Pure function: remove a provider from the active routing set.
73
- *
74
- * Given the current engine state and a pool_id to drop:
75
- * 1. Moves the named pool from `active_pools` to `exhausted_pools`.
76
- * 2. Identifies all in-flight packets assigned to the dropped pool.
77
- * 3. Removes those packets from `in_flight_tokens`.
78
- * 4. Appends those packets to `pending_tokens` (re-queued for re-routing).
79
- * 5. Appends a `ProviderPoolEvent` to `event_log`.
80
- *
81
- * Returns a new `RollingEnginePoolState` — the input state is never mutated.
82
- *
83
- * When `active_pools` is already empty or the pool_id is not found in
84
- * `active_pools`, the state is returned unchanged (idempotent).
85
- *
86
- * When this call reduces `active_pools` to `[]`, the caller (N-S09's engine
87
- * loop) is responsible for detecting the empty-pool condition.
88
- */
89
- export declare function dropProvider(state: RollingEnginePoolState, pool_id: string, kind: ProviderPoolEventKind): RollingEnginePoolState;
90
- /** Result of {@link reroutePackets}. */
91
- export interface ReroutePacketsResult {
92
- state: RollingEnginePoolState;
93
- /** Dispatch allocation computed over the surviving active pools, or null. */
94
- allocation: ReturnType<typeof computeDispatchCapacity> | null;
95
- /**
96
- * Set when surplus pending packets could not be reassigned to any surviving
97
- * active pool — either because no active pool remains, or because pending
98
- * demand exceeds the survivors' combined slot capacity. The stranded packet
99
- * ids are surfaced here (and removed from `state.pending_tokens`) so the
100
- * caller routes them through its consumer-specific terminal handler. `null`
101
- * when every pending packet found a surviving active pool. (INV-QD-13)
102
- */
103
- terminal: PartialCompletionTerminal | null;
104
- }
105
- /**
106
- * Re-route pending packet tokens across the remaining active pools.
107
- *
108
- * The no-stranding guarantee (INV-QD-13 / SEAM-rolling-stranding): after ANY
109
- * `dropProvider` — including simultaneous multi-pool drops where pending demand
110
- * exceeds the survivors' slot capacity — this function leaves ZERO
111
- * `pending_tokens` whose `assigned_pool_id` points at a dropped/exhausted (i.e.
112
- * non-active) pool. Every pending packet is either reassigned to a pool still in
113
- * `active_pools`, or removed from `pending_tokens` and surfaced in
114
- * `terminal.stranded_ids`. `reroutePackets` is the SINGLE owner of this
115
- * guarantee; consumers (audit-cli-commands, remediate-steps-dispatch) only
116
- * consume `stranded_ids` and never implement their own reroute.
117
- *
118
- * Behaviour:
119
- * - No pending tokens → state unchanged, `allocation` and `terminal` null.
120
- * - `active_pools` empty but pending tokens exist → every pending packet is
121
- * stranded (state pending cleared) and an `empty_pool` terminal is returned.
122
- * - Otherwise → `computeDispatchCapacity` sizes the surviving pools; the largest
123
- * pending packets are assigned to the surviving pools up to their slot counts,
124
- * and any surplus that does not fit is stranded.
125
- *
126
- * Also returns the `DispatchCapacity` computed by `computeDispatchCapacity` so
127
- * callers can inspect the allocation without re-computing it.
128
- */
129
- export declare function reroutePackets(state: RollingEnginePoolState, sessionConfig: SessionConfig): ReroutePacketsResult;
130
- //# sourceMappingURL=rollingEngine.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rollingEngine.d.ts","sourceRoot":"","sources":["../../../src/shared/quota/rollingEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAA0B,MAAM,eAAe,CAAC;AAMhF,0DAA0D;AAC1D,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,aAAa,CAAC;AAEhE;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,oBAAoB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,EAAE,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,sEAAsE;IACtE,gBAAgB,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,sBAAsB,EAAE,CAAC;IACvC,eAAe,EAAE,sBAAsB,EAAE,CAAC;IAC1C,gBAAgB,EAAE,iBAAiB,EAAE,CAAC;IACtC,cAAc,EAAE,iBAAiB,EAAE,CAAC;IACpC,SAAS,EAAE,iBAAiB,EAAE,CAAC;CAChC;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,qBAAqB,GAC1B,sBAAsB,CAoDxB;AAMD,wCAAwC;AACxC,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,sBAAsB,CAAC;IAC9B,6EAA6E;IAC7E,UAAU,EAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,GAAG,IAAI,CAAC;IAC9D;;;;;;;OAOG;IACH,QAAQ,EAAE,yBAAyB,GAAG,IAAI,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,sBAAsB,EAC7B,aAAa,EAAE,aAAa,GAC3B,oBAAoB,CA0DtB"}
@@ -1,153 +0,0 @@
1
- /**
2
- * Rolling engine — provider-pool-change semantics (drop + re-route).
3
- *
4
- * Manages a mutable active provider pool across a dispatch run. When a provider
5
- * signals quota exhaustion or disappears, the engine drops it from the active
6
- * routing set, re-queues any in-flight packets that had been assigned to it, and
7
- * re-routes those packets to the remaining active providers.
8
- *
9
- * NOTE: The empty-pool terminal (active_pools reaches zero → waiting_for_provider)
10
- * is NOT handled here — that is N-S09's responsibility. When dropProvider is
11
- * called on the last active pool it returns a state with active_pools: [] and
12
- * the caller's engine loop detects and handles the empty-pool condition.
13
- */
14
- import { computeDispatchCapacity, buildEmptyPoolTerminal } from "./capacity.js";
15
- // ---------------------------------------------------------------------------
16
- // dropProvider
17
- // ---------------------------------------------------------------------------
18
- /**
19
- * Pure function: remove a provider from the active routing set.
20
- *
21
- * Given the current engine state and a pool_id to drop:
22
- * 1. Moves the named pool from `active_pools` to `exhausted_pools`.
23
- * 2. Identifies all in-flight packets assigned to the dropped pool.
24
- * 3. Removes those packets from `in_flight_tokens`.
25
- * 4. Appends those packets to `pending_tokens` (re-queued for re-routing).
26
- * 5. Appends a `ProviderPoolEvent` to `event_log`.
27
- *
28
- * Returns a new `RollingEnginePoolState` — the input state is never mutated.
29
- *
30
- * When `active_pools` is already empty or the pool_id is not found in
31
- * `active_pools`, the state is returned unchanged (idempotent).
32
- *
33
- * When this call reduces `active_pools` to `[]`, the caller (N-S09's engine
34
- * loop) is responsible for detecting the empty-pool condition.
35
- */
36
- export function dropProvider(state, pool_id, kind) {
37
- const poolIndex = state.active_pools.findIndex((e) => e.pool.id === pool_id);
38
- if (poolIndex === -1) {
39
- // Pool not in active set — idempotent, return unchanged.
40
- return state;
41
- }
42
- const dropped = state.active_pools[poolIndex];
43
- // Identify in-flight packets assigned to the dropped pool.
44
- const requeued = state.in_flight_tokens.filter((t) => t.assigned_pool_id === pool_id);
45
- const stillInFlight = state.in_flight_tokens.filter((t) => t.assigned_pool_id !== pool_id);
46
- const event = {
47
- kind,
48
- provider_id: pool_id,
49
- timestamp: new Date().toISOString(),
50
- in_flight_count: requeued.length,
51
- requeued_count: requeued.length,
52
- };
53
- // Structured observability for pool drops/rerouting (OBS-d81a55ab). Emitted on
54
- // its own line and wrapped so a logging failure can never abort a dispatch run.
55
- try {
56
- process.stderr.write(JSON.stringify({
57
- ts: event.timestamp,
58
- kind: "rolling_engine_drop_provider",
59
- provider_id: pool_id,
60
- drop_kind: kind,
61
- in_flight_count: event.in_flight_count,
62
- requeued_count: event.requeued_count,
63
- }) + "\n");
64
- }
65
- catch {
66
- // Observability must never abort a run.
67
- }
68
- return {
69
- active_pools: [
70
- ...state.active_pools.slice(0, poolIndex),
71
- ...state.active_pools.slice(poolIndex + 1),
72
- ],
73
- exhausted_pools: [...state.exhausted_pools, dropped],
74
- in_flight_tokens: stillInFlight,
75
- pending_tokens: [...state.pending_tokens, ...requeued],
76
- event_log: [...state.event_log, event],
77
- };
78
- }
79
- /**
80
- * Re-route pending packet tokens across the remaining active pools.
81
- *
82
- * The no-stranding guarantee (INV-QD-13 / SEAM-rolling-stranding): after ANY
83
- * `dropProvider` — including simultaneous multi-pool drops where pending demand
84
- * exceeds the survivors' slot capacity — this function leaves ZERO
85
- * `pending_tokens` whose `assigned_pool_id` points at a dropped/exhausted (i.e.
86
- * non-active) pool. Every pending packet is either reassigned to a pool still in
87
- * `active_pools`, or removed from `pending_tokens` and surfaced in
88
- * `terminal.stranded_ids`. `reroutePackets` is the SINGLE owner of this
89
- * guarantee; consumers (audit-cli-commands, remediate-steps-dispatch) only
90
- * consume `stranded_ids` and never implement their own reroute.
91
- *
92
- * Behaviour:
93
- * - No pending tokens → state unchanged, `allocation` and `terminal` null.
94
- * - `active_pools` empty but pending tokens exist → every pending packet is
95
- * stranded (state pending cleared) and an `empty_pool` terminal is returned.
96
- * - Otherwise → `computeDispatchCapacity` sizes the surviving pools; the largest
97
- * pending packets are assigned to the surviving pools up to their slot counts,
98
- * and any surplus that does not fit is stranded.
99
- *
100
- * Also returns the `DispatchCapacity` computed by `computeDispatchCapacity` so
101
- * callers can inspect the allocation without re-computing it.
102
- */
103
- export function reroutePackets(state, sessionConfig) {
104
- if (state.pending_tokens.length === 0) {
105
- return { state, allocation: null, terminal: null };
106
- }
107
- // No surviving pool: every pending packet is stranded. Clearing pending here
108
- // is what guarantees ZERO pending_tokens remain pointed at a dead pool.
109
- if (state.active_pools.length === 0) {
110
- const strandedIds = state.pending_tokens.map((t) => t.id);
111
- return {
112
- state: { ...state, pending_tokens: [] },
113
- allocation: null,
114
- terminal: buildEmptyPoolTerminal(strandedIds),
115
- };
116
- }
117
- const pendingItemTokens = state.pending_tokens.map((t) => t.estimated_tokens);
118
- const pools = state.active_pools.map((e) => e.pool);
119
- const activePoolIds = new Set(pools.map((p) => p.id));
120
- const allocation = computeDispatchCapacity({ pools, sessionConfig, pendingItemTokens });
121
- // Order pending packets largest-first so the survivors' slots carry the most
122
- // expensive work, mirroring computeDispatchCapacity's own descending layout.
123
- const ordered = [...state.pending_tokens].sort((a, b) => b.estimated_tokens - a.estimated_tokens);
124
- // Re-assign pending tokens to surviving pools based on slot counts.
125
- const reassigned = [];
126
- let tokenCursor = 0;
127
- for (const poolAlloc of allocation.pools) {
128
- // Defensive: never assign to a pool that is not in the active set.
129
- if (!activePoolIds.has(poolAlloc.pool_id))
130
- continue;
131
- const assignCount = Math.min(poolAlloc.slots, ordered.length - tokenCursor);
132
- for (let i = 0; i < assignCount; i++) {
133
- const original = ordered[tokenCursor + i];
134
- reassigned.push({ ...original, assigned_pool_id: poolAlloc.pool_id });
135
- }
136
- tokenCursor += assignCount;
137
- if (tokenCursor >= ordered.length)
138
- break;
139
- }
140
- // Any packet beyond the survivors' combined slot capacity cannot be placed on
141
- // an active pool. It MUST NOT stay assigned to a dropped/exhausted pool — it is
142
- // removed from pending_tokens and surfaced as stranded (INV-QD-13).
143
- const stranded = ordered.slice(tokenCursor);
144
- const terminal = stranded.length > 0
145
- ? buildEmptyPoolTerminal(stranded.map((t) => t.id))
146
- : null;
147
- return {
148
- state: { ...state, pending_tokens: reassigned },
149
- allocation,
150
- terminal,
151
- };
152
- }
153
- //# sourceMappingURL=rollingEngine.js.map
@@ -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