audit-tools 0.30.4 → 0.30.6

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 (82) hide show
  1. package/dist/audit/cli/dispatch/packetPrompt.d.ts.map +1 -1
  2. package/dist/audit/cli/dispatch/packetPrompt.js +9 -0
  3. package/dist/audit/cli/dispatch/packetPrompt.js.map +1 -1
  4. package/dist/audit/contracts/schemaEnforcedEmit.d.ts +75 -0
  5. package/dist/audit/contracts/schemaEnforcedEmit.d.ts.map +1 -0
  6. package/dist/audit/contracts/schemaEnforcedEmit.js +131 -0
  7. package/dist/audit/contracts/schemaEnforcedEmit.js.map +1 -0
  8. package/dist/audit/contracts/wrapperResponse.d.ts +6 -6
  9. package/dist/audit/extractors/analyzers/acquisitionEngine.d.ts +140 -0
  10. package/dist/audit/extractors/analyzers/acquisitionEngine.d.ts.map +1 -0
  11. package/dist/audit/extractors/analyzers/acquisitionEngine.js +262 -0
  12. package/dist/audit/extractors/analyzers/acquisitionEngine.js.map +1 -0
  13. package/dist/audit/extractors/analyzers/registry.d.ts +2 -0
  14. package/dist/audit/extractors/analyzers/registry.d.ts.map +1 -1
  15. package/dist/audit/extractors/analyzers/registry.js +5 -0
  16. package/dist/audit/extractors/analyzers/registry.js.map +1 -1
  17. package/dist/audit/extractors/gitHistory.d.ts +46 -0
  18. package/dist/audit/extractors/gitHistory.d.ts.map +1 -0
  19. package/dist/audit/extractors/gitHistory.js +97 -0
  20. package/dist/audit/extractors/gitHistory.js.map +1 -0
  21. package/dist/audit/extractors/graph.d.ts +19 -1
  22. package/dist/audit/extractors/graph.d.ts.map +1 -1
  23. package/dist/audit/extractors/graph.js +31 -0
  24. package/dist/audit/extractors/graph.js.map +1 -1
  25. package/dist/audit/extractors/risk.d.ts +16 -0
  26. package/dist/audit/extractors/risk.d.ts.map +1 -1
  27. package/dist/audit/extractors/risk.js +28 -0
  28. package/dist/audit/extractors/risk.js.map +1 -1
  29. package/dist/audit/io/artifacts.d.ts +3 -1
  30. package/dist/audit/io/artifacts.d.ts.map +1 -1
  31. package/dist/audit/io/artifacts.js +1 -0
  32. package/dist/audit/io/artifacts.js.map +1 -1
  33. package/dist/audit/orchestrator/artifactMetadata.d.ts.map +1 -1
  34. package/dist/audit/orchestrator/artifactMetadata.js +24 -3
  35. package/dist/audit/orchestrator/artifactMetadata.js.map +1 -1
  36. package/dist/audit/orchestrator/dependencyMap.d.ts +7 -0
  37. package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
  38. package/dist/audit/orchestrator/dependencyMap.js +7 -2
  39. package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
  40. package/dist/audit/orchestrator/resultBaseline.d.ts +54 -0
  41. package/dist/audit/orchestrator/resultBaseline.d.ts.map +1 -1
  42. package/dist/audit/orchestrator/resultBaseline.js +59 -0
  43. package/dist/audit/orchestrator/resultBaseline.js.map +1 -1
  44. package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
  45. package/dist/audit/orchestrator/staleness.js +25 -1
  46. package/dist/audit/orchestrator/staleness.js.map +1 -1
  47. package/dist/audit/orchestrator/state.d.ts.map +1 -1
  48. package/dist/audit/orchestrator/state.js +2 -1
  49. package/dist/audit/orchestrator/state.js.map +1 -1
  50. package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
  51. package/dist/audit/orchestrator/synthesisExecutors.js +3 -2
  52. package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
  53. package/dist/audit/quota/index.d.ts +20 -20
  54. package/dist/audit/types/artifactMetadata.d.ts +25 -0
  55. package/dist/audit/types/artifactMetadata.d.ts.map +1 -1
  56. package/dist/audit/types/artifactMetadata.js +10 -1
  57. package/dist/audit/types/artifactMetadata.js.map +1 -1
  58. package/dist/shared/git.d.ts +41 -0
  59. package/dist/shared/git.d.ts.map +1 -1
  60. package/dist/shared/git.js +119 -0
  61. package/dist/shared/git.js.map +1 -1
  62. package/dist/shared/index.d.ts +6 -3
  63. package/dist/shared/index.d.ts.map +1 -1
  64. package/dist/shared/index.js +3 -2
  65. package/dist/shared/index.js.map +1 -1
  66. package/dist/shared/providers/providerFactory.d.ts +16 -1
  67. package/dist/shared/providers/providerFactory.d.ts.map +1 -1
  68. package/dist/shared/providers/providerFactory.js +43 -0
  69. package/dist/shared/providers/providerFactory.js.map +1 -1
  70. package/dist/shared/providers/types.d.ts +40 -0
  71. package/dist/shared/providers/types.d.ts.map +1 -1
  72. package/dist/shared/quota/capacity.d.ts +8 -8
  73. package/dist/shared/quota/types.d.ts +4 -4
  74. package/dist/shared/repair/brokeredDispatch.d.ts +147 -0
  75. package/dist/shared/repair/brokeredDispatch.d.ts.map +1 -0
  76. package/dist/shared/repair/brokeredDispatch.js +220 -0
  77. package/dist/shared/repair/brokeredDispatch.js.map +1 -0
  78. package/dist/shared/repair/index.d.ts +2 -0
  79. package/dist/shared/repair/index.d.ts.map +1 -1
  80. package/dist/shared/repair/index.js +1 -0
  81. package/dist/shared/repair/index.js.map +1 -1
  82. package/package.json +1 -1
@@ -0,0 +1,220 @@
1
+ import { scheduleWave } from '../quota/scheduler.js';
2
+ import { DEFAULT_FIRST_CONTACT_CONCURRENCY } from '../quota/scheduler.js';
3
+ import { estimateTokensFromBytes, ESTIMATED_PROMPT_OVERHEAD_TOKENS } from '../tokens.js';
4
+ import { resolveContextBudget } from '../tokens.js';
5
+ import { getQuotaStatePath, readQuotaState, writeQuotaState } from '../quota/state.js';
6
+ import { withFileLock } from '../quota/fileLock.js';
7
+ /**
8
+ * Deterministic-local per-slot token estimate: byte-derived estimate plus a
9
+ * fixed prompt overhead. Never an API token-count call (token estimates stay
10
+ * local + deterministic — see ~/.claude policy).
11
+ */
12
+ export function estimateSlotTokens(slot) {
13
+ return estimateTokensFromBytes(slot.payloadBytes) + ESTIMATED_PROMPT_OVERHEAD_TOKENS;
14
+ }
15
+ /**
16
+ * Classify whether a host is "capable" — i.e. it advertises real concurrency
17
+ * head-room ABOVE the conservative cold-start (first-contact) floor. On first
18
+ * contact, with no learned evidence and no reported host ceiling, a host sits AT
19
+ * the floor and is NOT yet capable; once it reports an active-subagent ceiling
20
+ * (or learned evidence lifts the cap) above the floor, it is. Single-sourced
21
+ * here so both halves classify identically off the SAME floor.
22
+ */
23
+ export function classifyCapableHost(input) {
24
+ const floor = Math.max(1, input.sessionConfig.quota?.first_contact_concurrency ?? DEFAULT_FIRST_CONTACT_CONCURRENCY);
25
+ const reported = input.hostConcurrencyLimit?.active_subagents ?? null;
26
+ if (reported != null && reported > floor)
27
+ return true;
28
+ // Learned evidence (any recorded safe bucket) lifts the host off the floor.
29
+ const buckets = input.quotaStateEntry?.buckets ?? {};
30
+ for (const key of Object.keys(buckets)) {
31
+ const c = Number(key);
32
+ if (Number.isFinite(c) && c > floor)
33
+ return true;
34
+ }
35
+ return false;
36
+ }
37
+ /**
38
+ * The over-budget gate: an admitted wave's estimated tokens must fit the pool's
39
+ * usable context budget (resolved window − reserved output, safety-scaled). A
40
+ * single slot that alone exceeds the budget is refused (admitted === 0) rather
41
+ * than dispatched to certain truncation.
42
+ */
43
+ function fitWaveToBudget(slots, maxConcurrent, limits) {
44
+ const budget = resolveContextBudget({
45
+ contextTokens: limits.context_tokens,
46
+ reservedOutputTokens: limits.output_tokens,
47
+ });
48
+ const cap = Math.max(0, Math.min(maxConcurrent, slots.length));
49
+ const admitted = [];
50
+ let total = 0;
51
+ for (let i = 0; i < cap; i++) {
52
+ const slotTokens = estimateSlotTokens(slots[i]);
53
+ if (total + slotTokens > budget)
54
+ break;
55
+ admitted.push(slots[i]);
56
+ total += slotTokens;
57
+ }
58
+ // Refused-over-budget: even the highest-priority single slot cannot fit.
59
+ const refused = admitted.length === 0 && slots.length > 0;
60
+ return { admittedSlots: admitted, estimatedTokens: total, refused };
61
+ }
62
+ /**
63
+ * Pool key for the broker's cooldown registry: `provider/<model|*>`, the same
64
+ * `provider/<model>` convention the quota state file uses. Single-sourced here so
65
+ * a cooldown persisted on one decision is read back on the next for the SAME
66
+ * provider+model pool (inv-5 → inv-6).
67
+ */
68
+ function brokerPoolKey(providerName, hostModel) {
69
+ return `${providerName}/${hostModel && hostModel.length > 0 ? hostModel : '*'}`;
70
+ }
71
+ /** Whether an ISO cooldown timestamp is still in the future relative to now. */
72
+ function cooldownActive(cooldownUntil) {
73
+ if (!cooldownUntil)
74
+ return false;
75
+ const t = new Date(cooldownUntil).getTime();
76
+ return Number.isFinite(t) && t > Date.now();
77
+ }
78
+ /**
79
+ * Fire-and-forget durable persistence of a pool cooldown to the on-disk quota
80
+ * state, guarded by the same shared file lock the quota subsystem uses. This is
81
+ * intentionally NOT awaited by `broker()` so the broker keeps its synchronous
82
+ * signature (inv-5 must not turn `broker()` into a Promise — a sibling sync test
83
+ * reads `result.estimatedWaveTokens` synchronously). The in-memory registry below
84
+ * is the authoritative in-process readback; this write makes the cooldown survive
85
+ * across processes. Any failure (no state dir configured, unreadable state) is
86
+ * swallowed: persistence is best-effort and must never reject unhandled.
87
+ */
88
+ function persistPoolCooldownBestEffort(poolKey, cooldownUntil) {
89
+ let lockPath;
90
+ try {
91
+ lockPath = getQuotaStatePath() + '.lock';
92
+ }
93
+ catch {
94
+ // Quota state dir not configured (e.g. unit context) → nothing to persist to.
95
+ return;
96
+ }
97
+ void withFileLock(lockPath, async () => {
98
+ const state = await readQuotaState();
99
+ const existing = state.entries[poolKey];
100
+ const entry = existing ?? {
101
+ updated_at: new Date().toISOString(),
102
+ buckets: {},
103
+ cooldown_until: null,
104
+ last_429_at: null,
105
+ };
106
+ // Keep the later of any already-persisted cooldown and this one.
107
+ const prior = entry.cooldown_until ? new Date(entry.cooldown_until).getTime() : 0;
108
+ const next = new Date(cooldownUntil).getTime();
109
+ if (!Number.isFinite(prior) || next > prior) {
110
+ entry.cooldown_until = cooldownUntil;
111
+ }
112
+ entry.updated_at = new Date().toISOString();
113
+ state.entries[poolKey] = entry;
114
+ await writeQuotaState(state);
115
+ }).catch(() => {
116
+ // Best-effort: durability failure must not surface from a sync decision.
117
+ });
118
+ }
119
+ /**
120
+ * Create the concrete broker. The single gated chokepoint: it sizes the wave
121
+ * through the shared `scheduleWave` (one wave-scheduling authority), enforces the
122
+ * over-budget refusal, surfaces the persisted cooldown, classifies the host off
123
+ * the cold-start floor, and passes raw completions straight through to O3.
124
+ *
125
+ * inv-5/inv-6 cooldown persistence: when a real-time snapshot drives the schedule
126
+ * into cooldown (remaining_pct<CRITICAL → throttle to 1 + cooldown_until), the
127
+ * broker records that cooldown — synchronously in an in-process per-pool registry
128
+ * AND best-effort to durable quota state — WITHIN the same decision. A later
129
+ * decision with a transiently-null snapshot reads the registered cooldown back
130
+ * (merged into the effective quota-state entry) so `scheduleWave`'s existing
131
+ * active-cooldown path keeps the wave throttled to 1. All of this happens without
132
+ * making `broker()` asynchronous.
133
+ */
134
+ export function createBrokeredRepairDispatch() {
135
+ // In-process, synchronous cooldown registry keyed by `provider/<model|*>`. This
136
+ // is the authoritative readback inside one broker instance; disk persistence is
137
+ // an additional best-effort durability layer (see persistPoolCooldownBestEffort).
138
+ const cooldownRegistry = new Map();
139
+ return {
140
+ broker(input) {
141
+ const poolKey = brokerPoolKey(input.providerName, input.hostModel ?? null);
142
+ // inv-6: fold any registered (previously persisted) cooldown into the
143
+ // effective quota-state entry so scheduleWave's active-cooldown path keeps
144
+ // the wave at 1 even when this decision's snapshot is transiently null.
145
+ const registered = cooldownRegistry.get(poolKey) ?? null;
146
+ let effectiveQuotaStateEntry = input.quotaStateEntry ?? null;
147
+ if (cooldownActive(registered)) {
148
+ const suppliedActive = cooldownActive(effectiveQuotaStateEntry?.cooldown_until);
149
+ const supplied = suppliedActive ? effectiveQuotaStateEntry.cooldown_until : null;
150
+ const merged = supplied && new Date(supplied).getTime() >= new Date(registered).getTime()
151
+ ? supplied
152
+ : registered;
153
+ effectiveQuotaStateEntry = effectiveQuotaStateEntry
154
+ ? { ...effectiveQuotaStateEntry, cooldown_until: merged }
155
+ : {
156
+ updated_at: new Date().toISOString(),
157
+ buckets: {},
158
+ cooldown_until: merged,
159
+ last_429_at: null,
160
+ };
161
+ }
162
+ else if (registered) {
163
+ // Registered cooldown has expired → drop it so it cannot linger.
164
+ cooldownRegistry.delete(poolKey);
165
+ }
166
+ const estimatedSlotTokens = input.slots.map(estimateSlotTokens);
167
+ const schedule = scheduleWave({
168
+ providerName: input.providerName,
169
+ sessionConfig: input.sessionConfig,
170
+ hostModel: input.hostModel,
171
+ requestedConcurrency: Math.max(1, input.slots.length),
172
+ estimatedSlotTokens,
173
+ quotaStateEntry: effectiveQuotaStateEntry,
174
+ hostConcurrencyLimit: input.hostConcurrencyLimit ?? null,
175
+ quotaSourceSnapshot: input.quotaSourceSnapshot ?? null,
176
+ discoveredLimits: input.discoveredLimits ?? null,
177
+ });
178
+ // inv-5: persist the cooldown surfaced by THIS decision — synchronously into
179
+ // the in-process registry (authoritative readback) and best-effort to disk —
180
+ // so a subsequent null-snapshot decision stays throttled.
181
+ if (cooldownActive(schedule.cooldown_until)) {
182
+ cooldownRegistry.set(poolKey, schedule.cooldown_until);
183
+ persistPoolCooldownBestEffort(poolKey, schedule.cooldown_until);
184
+ }
185
+ const capableHost = classifyCapableHost({
186
+ sessionConfig: input.sessionConfig,
187
+ hostConcurrencyLimit: input.hostConcurrencyLimit ?? null,
188
+ quotaStateEntry: input.quotaStateEntry ?? null,
189
+ });
190
+ const { admittedSlots, estimatedTokens, refused } = fitWaveToBudget(input.slots, schedule.max_concurrent, schedule.resolved_limits);
191
+ let admission;
192
+ if (refused) {
193
+ admission = 'refused_over_budget';
194
+ }
195
+ else if (schedule.cooldown_until && admittedSlots.length === 0) {
196
+ admission = 'cooldown';
197
+ }
198
+ else {
199
+ admission = 'admitted';
200
+ }
201
+ return {
202
+ admitted: admittedSlots.length,
203
+ admission,
204
+ admittedSlotIds: admittedSlots.map((s) => s.slotId),
205
+ estimatedWaveTokens: estimatedTokens,
206
+ cooldownUntil: schedule.cooldown_until,
207
+ bindingCap: schedule.binding_cap ?? 'none',
208
+ capableHost,
209
+ schedule,
210
+ };
211
+ },
212
+ awaitNextCompletion(completion) {
213
+ // The broker holds NO artifact-tree lock and does NO validation — O3's
214
+ // single canonical validator is the only authority. Pass the raw result
215
+ // straight through (broker-handle edge: O3<->F4).
216
+ return completion;
217
+ },
218
+ };
219
+ }
220
+ //# sourceMappingURL=brokeredDispatch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brokeredDispatch.js","sourceRoot":"","sources":["../../../src/shared/repair/brokeredDispatch.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,gCAAgC,EAAE,MAAM,cAAc,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AA8FpD;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAA0B;IAC3D,OAAO,uBAAuB,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,gCAAgC,CAAC;AACvF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAInC;IACC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CACpB,CAAC,EACD,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,yBAAyB,IAAI,iCAAiC,CAC1F,CAAC;IACF,MAAM,QAAQ,GAAG,KAAK,CAAC,oBAAoB,EAAE,gBAAgB,IAAI,IAAI,CAAC;IACtE,IAAI,QAAQ,IAAI,IAAI,IAAI,QAAQ,GAAG,KAAK;QAAE,OAAO,IAAI,CAAC;IACtD,4EAA4E;IAC5E,MAAM,OAAO,GAAG,KAAK,CAAC,eAAe,EAAE,OAAO,IAAI,EAAE,CAAC;IACrD,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
  export type { RepairValidationError, RepairValidationResult, RepairCoercion, RepairCoercionResult, RepairPatcher, RepairContract, RepairStatus, RepairStage, RepairRedispatch, RepairOutcome, RunEmitValidateRepairOptions, } from './emitValidateRepair.js';
7
7
  export { runEmitValidateRepair } from './emitValidateRepair.js';
8
+ export type { BrokeredDispatchSlot, BrokerAdmission, BrokeredDispatchDecision, BrokeredCompletion, BrokerDispatchInput, BrokeredRepairDispatch, } from './brokeredDispatch.js';
9
+ export { createBrokeredRepairDispatch, estimateSlotTokens, classifyCapableHost, } from './brokeredDispatch.js';
8
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/repair/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EACV,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/repair/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EACV,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,4BAA4B,EAC5B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export { runEmitValidateRepair } from './emitValidateRepair.js';
2
+ export { createBrokeredRepairDispatch, estimateSlotTokens, classifyCapableHost, } from './brokeredDispatch.js';
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/repair/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/repair/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAWhE,OAAO,EACL,4BAA4B,EAC5B,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "audit-tools",
3
- "version": "0.30.4",
3
+ "version": "0.30.6",
4
4
  "private": false,
5
5
  "description": "Portable hybrid code auditing + remediation orchestrators for arbitrary repositories.",
6
6
  "type": "module",