@lcv-ideas-software/cross-review 4.2.0 → 4.2.1

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 (38) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/NOTICE +1 -1
  3. package/README.md +104 -82
  4. package/SECURITY.md +18 -37
  5. package/dist/scripts/runtime-smoke.js.map +1 -1
  6. package/dist/scripts/smoke.js +23 -23
  7. package/dist/scripts/smoke.js.map +1 -1
  8. package/dist/src/core/caller-tokens.js +3 -2
  9. package/dist/src/core/caller-tokens.js.map +1 -1
  10. package/dist/src/core/config.d.ts +3 -3
  11. package/dist/src/core/config.js +6 -7
  12. package/dist/src/core/config.js.map +1 -1
  13. package/dist/src/core/file-config.d.ts +1 -1
  14. package/dist/src/core/orchestrator.d.ts +45 -45
  15. package/dist/src/core/orchestrator.js +12 -2
  16. package/dist/src/core/orchestrator.js.map +1 -1
  17. package/dist/src/core/relator-lottery.js +5 -1
  18. package/dist/src/core/relator-lottery.js.map +1 -1
  19. package/dist/src/core/session-store.d.ts +9 -9
  20. package/dist/src/core/session-store.js +2 -2
  21. package/dist/src/core/session-store.js.map +1 -1
  22. package/dist/src/core/types.d.ts +164 -164
  23. package/dist/src/dashboard/server.js +12 -8
  24. package/dist/src/dashboard/server.js.map +1 -1
  25. package/dist/src/mcp/server.d.ts +13 -13
  26. package/dist/src/mcp/server.js.map +1 -1
  27. package/dist/src/peers/base.d.ts +6 -6
  28. package/dist/src/peers/errors.js +11 -9
  29. package/dist/src/peers/errors.js.map +1 -1
  30. package/dist/src/peers/gemini.js +2 -2
  31. package/dist/src/peers/gemini.js.map +1 -1
  32. package/dist/src/peers/model-selection.js +1 -1
  33. package/dist/src/peers/model-selection.js.map +1 -1
  34. package/dist/src/peers/perplexity.js +5 -2
  35. package/dist/src/peers/perplexity.js.map +1 -1
  36. package/dist/src/peers/text.d.ts +3 -3
  37. package/docs/evidence-preflight.md +1 -1
  38. package/package.json +7 -7
@@ -10,9 +10,9 @@ export type SessionControlStatus = "running" | "cancel_requested" | "cancelled"
10
10
  export type DecisionQuality = "clean" | "format_warning" | "recovered" | "needs_operator_review" | "failed";
11
11
  export interface ModelCandidate {
12
12
  id: string;
13
- display_name?: string;
13
+ display_name?: string | undefined;
14
14
  source: "api" | "documented-priority" | "env-override";
15
- metadata?: Record<string, unknown>;
15
+ metadata?: Record<string, unknown> | undefined;
16
16
  }
17
17
  export interface ModelSelection {
18
18
  peer: PeerId;
@@ -23,35 +23,35 @@ export interface ModelSelection {
23
23
  confidence: Confidence;
24
24
  }
25
25
  export interface TokenUsage {
26
- input_tokens?: number;
27
- output_tokens?: number;
28
- total_tokens?: number;
29
- reasoning_tokens?: number;
30
- cache_read_tokens?: number;
31
- cache_write_tokens?: number;
32
- cache_provider_mode?: "auto" | "explicit" | "implicit" | "not_supported";
33
- cache_key_hash?: string;
34
- citation_tokens?: number;
35
- num_search_queries?: number;
36
- provider_reported_total_cost_usd?: number;
37
- search_performed?: boolean;
26
+ input_tokens?: number | undefined;
27
+ output_tokens?: number | undefined;
28
+ total_tokens?: number | undefined;
29
+ reasoning_tokens?: number | undefined;
30
+ cache_read_tokens?: number | undefined;
31
+ cache_write_tokens?: number | undefined;
32
+ cache_provider_mode?: "auto" | "explicit" | "implicit" | "not_supported" | undefined;
33
+ cache_key_hash?: string | undefined;
34
+ citation_tokens?: number | undefined;
35
+ num_search_queries?: number | undefined;
36
+ provider_reported_total_cost_usd?: number | undefined;
37
+ search_performed?: boolean | undefined;
38
38
  }
39
39
  export interface CostEstimate {
40
40
  currency: "USD";
41
- input_cost?: number;
42
- output_cost?: number;
43
- total_cost?: number;
41
+ input_cost?: number | undefined;
42
+ output_cost?: number | undefined;
43
+ total_cost?: number | undefined;
44
44
  estimated: boolean;
45
45
  source: "configured-rate" | "unknown-rate" | "stub";
46
- cache_savings_usd?: number;
47
- cache_savings_unknown?: boolean;
48
- cache_read_cost?: number;
49
- cache_write_cost?: number;
50
- tier_used?: "base" | "extended" | "promo" | "promo_extended";
51
- request_cost?: number;
52
- citation_tokens_cost?: number;
53
- deep_research_reasoning_tokens_cost?: number;
54
- search_queries_cost?: number;
46
+ cache_savings_usd?: number | undefined;
47
+ cache_savings_unknown?: boolean | undefined;
48
+ cache_read_cost?: number | undefined;
49
+ cache_write_cost?: number | undefined;
50
+ tier_used?: "base" | "extended" | "promo" | "promo_extended" | undefined;
51
+ request_cost?: number | undefined;
52
+ citation_tokens_cost?: number | undefined;
53
+ deep_research_reasoning_tokens_cost?: number | undefined;
54
+ search_queries_cost?: number | undefined;
55
55
  }
56
56
  export interface CacheManifestEntry {
57
57
  ts: string;
@@ -61,12 +61,12 @@ export interface CacheManifestEntry {
61
61
  model: string;
62
62
  cache_key_hash: string;
63
63
  cache_provider_mode: "auto" | "explicit" | "implicit" | "not_supported";
64
- read_tokens?: number;
65
- write_tokens?: number;
64
+ read_tokens?: number | undefined;
65
+ write_tokens?: number | undefined;
66
66
  hit: boolean;
67
67
  latency_ms: number;
68
- estimated_savings_usd?: number;
69
- savings_unknown?: boolean;
68
+ estimated_savings_usd?: number | undefined;
69
+ savings_unknown?: boolean | undefined;
70
70
  }
71
71
  export interface CacheManifest {
72
72
  session_id: string;
@@ -77,44 +77,44 @@ export interface CacheManifest {
77
77
  }
78
78
  export interface PeerStructuredStatus {
79
79
  status: ReviewStatus;
80
- summary?: string;
81
- confidence?: Confidence;
82
- evidence_sources?: string[];
83
- caller_requests?: string[];
84
- follow_ups?: string[];
80
+ summary?: string | undefined;
81
+ confidence?: Confidence | undefined;
82
+ evidence_sources?: string[] | undefined;
83
+ caller_requests?: string[] | undefined;
84
+ follow_ups?: string[] | undefined;
85
85
  }
86
86
  export interface PeerResult {
87
87
  peer: PeerId;
88
88
  provider: string;
89
89
  model: string;
90
- model_reported?: string;
91
- model_match?: boolean;
90
+ model_reported?: string | undefined;
91
+ model_match?: boolean | undefined;
92
92
  status: ReviewStatus | null;
93
93
  structured: PeerStructuredStatus | null;
94
94
  text: string;
95
95
  raw: unknown;
96
- usage?: TokenUsage;
97
- cost?: CostEstimate;
96
+ usage?: TokenUsage | undefined;
97
+ cost?: CostEstimate | undefined;
98
98
  latency_ms: number;
99
99
  attempts: number;
100
100
  parser_warnings: string[];
101
101
  decision_quality: DecisionQuality;
102
- fallback?: FallbackEvent;
102
+ fallback?: FallbackEvent | undefined;
103
103
  }
104
104
  export interface GenerationResult {
105
105
  peer: PeerId;
106
106
  provider: string;
107
107
  model: string;
108
- model_reported?: string;
109
- model_match?: boolean;
108
+ model_reported?: string | undefined;
109
+ model_match?: boolean | undefined;
110
110
  text: string;
111
111
  raw: unknown;
112
- usage?: TokenUsage;
113
- cost?: CostEstimate;
112
+ usage?: TokenUsage | undefined;
113
+ cost?: CostEstimate | undefined;
114
114
  latency_ms: number;
115
115
  attempts: number;
116
- fallback?: FallbackEvent;
117
- parser_warnings?: string[];
116
+ fallback?: FallbackEvent | undefined;
117
+ parser_warnings?: string[] | undefined;
118
118
  }
119
119
  export interface FallbackEvent {
120
120
  peer: PeerId;
@@ -127,19 +127,19 @@ export interface FallbackEvent {
127
127
  export interface PeerFailure {
128
128
  peer: PeerId;
129
129
  provider: string;
130
- model?: string;
130
+ model?: string | undefined;
131
131
  failure_class: "auth" | "rate_limit" | "prompt_flagged_by_moderation" | "silent_model_downgrade" | "provider_error" | "network" | "timeout" | "schema" | "unparseable_after_recovery" | "budget_exceeded" | "budget_preflight" | "cancelled" | "fallback_exhausted" | "format_recovery_exhausted" | "stream_buffer_overflow" | "unknown";
132
132
  message: string;
133
133
  retryable: boolean;
134
- recovery_hint?: "wait_and_retry" | "reformulate_and_retry" | "consult_docs_then_revise";
135
- reformulation_advice?: string;
136
- retry_after_ms?: number;
134
+ recovery_hint?: "wait_and_retry" | "reformulate_and_retry" | "consult_docs_then_revise" | undefined;
135
+ reformulation_advice?: string | undefined;
136
+ retry_after_ms?: number | undefined;
137
137
  attempts: number;
138
138
  latency_ms: number;
139
139
  docs_hint?: {
140
140
  parameter: string;
141
- docs_url?: string;
142
- };
141
+ docs_url?: string | undefined;
142
+ } | undefined;
143
143
  }
144
144
  export interface InFlightRound {
145
145
  round: number;
@@ -148,30 +148,30 @@ export interface InFlightRound {
148
148
  status: "running";
149
149
  }
150
150
  export interface ConvergenceScope {
151
- petitioner?: PeerId | "operator";
151
+ petitioner?: PeerId | "operator" | undefined;
152
152
  caller: PeerId | "operator";
153
- acting_peer?: PeerId | "operator";
153
+ acting_peer?: PeerId | "operator" | undefined;
154
154
  caller_status: ReviewStatus;
155
155
  expected_peers: PeerId[];
156
156
  reviewer_peers: PeerId[];
157
- lead_peer?: PeerId;
158
- lead_peer_role?: "relator_non_voting";
159
- voting_peers?: PeerId[];
160
- quorum_basis?: "all_non_lead_panel_peers_ready" | "all_panel_peers_ready";
161
- anti_self_review_exclusion_reason?: "lead_peer_authored_or_revised_artifact_under_review";
162
- skipped_peers?: PeerId[];
157
+ lead_peer?: PeerId | undefined;
158
+ lead_peer_role?: "relator_non_voting" | undefined;
159
+ voting_peers?: PeerId[] | undefined;
160
+ quorum_basis?: "all_non_lead_panel_peers_ready" | "all_panel_peers_ready" | undefined;
161
+ anti_self_review_exclusion_reason?: "lead_peer_authored_or_revised_artifact_under_review" | undefined;
162
+ skipped_peers?: PeerId[] | undefined;
163
163
  }
164
164
  export interface ConvergenceHealth {
165
165
  state: "idle" | "running" | "converged" | "blocked" | "stale";
166
166
  last_event_at: string;
167
167
  detail: string;
168
- idle_ms?: number;
168
+ idle_ms?: number | undefined;
169
169
  }
170
170
  export interface EvidenceAttachment {
171
171
  ts: string;
172
172
  label: string;
173
173
  path: string;
174
- content_type?: string;
174
+ content_type?: string | undefined;
175
175
  }
176
176
  export type EvidenceChecklistStatus = "open" | "addressed" | "not_resurfaced" | "satisfied" | "deferred" | "rejected";
177
177
  export interface EvidenceChecklistItem {
@@ -183,10 +183,10 @@ export interface EvidenceChecklistItem {
183
183
  ask: string;
184
184
  first_seen_at: string;
185
185
  last_seen_at: string;
186
- status?: EvidenceChecklistStatus;
187
- addressed_at_round?: number;
188
- address_method?: "resurfacing" | "judge";
189
- judge_rationale?: string;
186
+ status?: EvidenceChecklistStatus | undefined;
187
+ addressed_at_round?: number | undefined;
188
+ address_method?: "resurfacing" | "judge" | undefined;
189
+ judge_rationale?: string | undefined;
190
190
  }
191
191
  export interface EvidenceStatusHistoryEntry {
192
192
  ts: string;
@@ -194,8 +194,8 @@ export interface EvidenceStatusHistoryEntry {
194
194
  from: EvidenceChecklistStatus;
195
195
  to: EvidenceChecklistStatus;
196
196
  by: "runtime" | "operator";
197
- round?: number;
198
- note?: string;
197
+ round?: number | undefined;
198
+ note?: string | undefined;
199
199
  }
200
200
  export interface GenerationArtifact {
201
201
  ts: string;
@@ -203,9 +203,9 @@ export interface GenerationArtifact {
203
203
  label: string;
204
204
  peer: PeerId;
205
205
  path: string;
206
- usage?: TokenUsage;
207
- cost?: CostEstimate;
208
- latency_ms?: number;
206
+ usage?: TokenUsage | undefined;
207
+ cost?: CostEstimate | undefined;
208
+ latency_ms?: number | undefined;
209
209
  }
210
210
  export interface OperatorEscalation {
211
211
  ts: string;
@@ -214,9 +214,9 @@ export interface OperatorEscalation {
214
214
  }
215
215
  export interface SessionControl {
216
216
  status: SessionControlStatus;
217
- reason?: string;
218
- job_id?: string;
219
- requested_at?: string;
217
+ reason?: string | undefined;
218
+ job_id?: string | undefined;
219
+ requested_at?: string | undefined;
220
220
  updated_at: string;
221
221
  }
222
222
  export interface RuntimeCapabilities {
@@ -250,8 +250,8 @@ export interface EvidenceAskJudgment {
250
250
  confidence: Confidence;
251
251
  rationale: string;
252
252
  raw: unknown;
253
- usage?: TokenUsage;
254
- cost?: CostEstimate;
253
+ usage?: TokenUsage | undefined;
254
+ cost?: CostEstimate | undefined;
255
255
  latency_ms: number;
256
256
  attempts: number;
257
257
  parser_warnings: string[];
@@ -260,12 +260,12 @@ export interface PeerCallContext {
260
260
  session_id: string;
261
261
  round: number;
262
262
  task: string;
263
- signal?: AbortSignal;
264
- stream?: boolean;
265
- stream_tokens?: boolean;
263
+ signal?: AbortSignal | undefined;
264
+ stream?: boolean | undefined;
265
+ stream_tokens?: boolean | undefined;
266
266
  emit(event: RuntimeEvent): void;
267
- reasoning_effort_override?: ReasoningEffort;
268
- caller?: PeerId | "operator";
267
+ reasoning_effort_override?: ReasoningEffort | undefined;
268
+ caller?: PeerId | "operator" | undefined;
269
269
  }
270
270
  export interface PeerProbeResult {
271
271
  peer: PeerId;
@@ -274,18 +274,18 @@ export interface PeerProbeResult {
274
274
  available: boolean;
275
275
  auth_present: boolean;
276
276
  latency_ms: number;
277
- model_selection?: ModelSelection;
278
- message?: string;
277
+ model_selection?: ModelSelection | undefined;
278
+ message?: string | undefined;
279
279
  }
280
280
  export interface RuntimeEvent {
281
- seq?: number;
281
+ seq?: number | undefined;
282
282
  type: string;
283
- ts?: string;
284
- session_id?: string;
285
- round?: number;
286
- peer?: PeerId;
287
- message?: string;
288
- data?: Record<string, unknown>;
283
+ ts?: string | undefined;
284
+ session_id?: string | undefined;
285
+ round?: number | undefined;
286
+ peer?: PeerId | undefined;
287
+ message?: string | undefined;
288
+ data?: Record<string, unknown> | undefined;
289
289
  }
290
290
  export interface SessionEvent extends RuntimeEvent {
291
291
  seq: number;
@@ -296,24 +296,24 @@ export interface SessionMeta {
296
296
  created_at: string;
297
297
  updated_at: string;
298
298
  task: string;
299
- review_focus?: string;
299
+ review_focus?: string | undefined;
300
300
  caller: PeerId | "operator";
301
- outcome?: SessionOutcome;
302
- outcome_reason?: string;
301
+ outcome?: SessionOutcome | undefined;
302
+ outcome_reason?: string | undefined;
303
303
  capability_snapshot: PeerProbeResult[];
304
- in_flight?: InFlightRound;
305
- convergence_scope?: ConvergenceScope;
306
- convergence_health?: ConvergenceHealth;
304
+ in_flight?: InFlightRound | undefined;
305
+ convergence_scope?: ConvergenceScope | undefined;
306
+ convergence_health?: ConvergenceHealth | undefined;
307
307
  failed_attempts?: Array<PeerFailure & {
308
308
  round: number;
309
- }>;
310
- evidence_files?: EvidenceAttachment[];
311
- evidence_checklist?: EvidenceChecklistItem[];
312
- evidence_status_history?: EvidenceStatusHistoryEntry[];
313
- generation_files?: GenerationArtifact[];
314
- operator_escalations?: OperatorEscalation[];
315
- control?: SessionControl;
316
- fallback_events?: FallbackEvent[];
309
+ }> | undefined;
310
+ evidence_files?: EvidenceAttachment[] | undefined;
311
+ evidence_checklist?: EvidenceChecklistItem[] | undefined;
312
+ evidence_status_history?: EvidenceStatusHistoryEntry[] | undefined;
313
+ generation_files?: GenerationArtifact[] | undefined;
314
+ operator_escalations?: OperatorEscalation[] | undefined;
315
+ control?: SessionControl | undefined;
316
+ fallback_events?: FallbackEvent[] | undefined;
317
317
  rounds: ReviewRound[];
318
318
  totals: {
319
319
  usage: TokenUsage;
@@ -325,27 +325,27 @@ export interface SessionMeta {
325
325
  original_outcome: SessionOutcome | null;
326
326
  new_session_id: string;
327
327
  };
328
- contests_session_id?: string;
328
+ contests_session_id?: string | undefined;
329
329
  circular_state?: {
330
330
  rotation_order: PeerId[];
331
331
  consecutive_no_change_count: number;
332
332
  last_revision_round: number | null;
333
333
  };
334
- cost_ceiling_usd?: number | null;
335
- costs_per_round?: number[];
336
- budget_warning_emitted?: boolean;
337
- requested_max_cost_usd?: number | null;
338
- effective_cost_ceiling_usd?: number | null;
339
- cost_ceiling_source?: "call_arg" | "env_default" | "config_default";
340
- requested_max_rounds?: number | null;
341
- effective_max_rounds?: number | null;
334
+ cost_ceiling_usd?: number | null | undefined;
335
+ costs_per_round?: number[] | undefined;
336
+ budget_warning_emitted?: boolean | undefined;
337
+ requested_max_cost_usd?: number | null | undefined;
338
+ effective_cost_ceiling_usd?: number | null | undefined;
339
+ cost_ceiling_source?: "call_arg" | "env_default" | "config_default" | undefined;
340
+ requested_max_rounds?: number | null | undefined;
341
+ effective_max_rounds?: number | null | undefined;
342
342
  }
343
343
  export interface ReviewRound {
344
344
  round: number;
345
345
  started_at: string;
346
- completed_at?: string;
346
+ completed_at?: string | undefined;
347
347
  caller_status: ReviewStatus;
348
- draft_file?: string;
348
+ draft_file?: string | undefined;
349
349
  prompt_file: string;
350
350
  peers: PeerResult[];
351
351
  rejected: PeerFailure[];
@@ -354,10 +354,10 @@ export interface ReviewRound {
354
354
  export interface ConvergenceResult {
355
355
  converged: boolean;
356
356
  reason: string;
357
- latest_round_converged?: boolean;
358
- session_quorum_converged?: boolean;
359
- recovery_converged?: boolean;
360
- quorum_peers?: PeerId[];
357
+ latest_round_converged?: boolean | undefined;
358
+ session_quorum_converged?: boolean | undefined;
359
+ recovery_converged?: boolean | undefined;
360
+ quorum_peers?: PeerId[] | undefined;
361
361
  ready_peers: PeerId[];
362
362
  not_ready_peers: PeerId[];
363
363
  needs_evidence_peers: PeerId[];
@@ -379,9 +379,9 @@ export interface AppConfig {
379
379
  timeout_ms: number;
380
380
  };
381
381
  budget: {
382
- max_session_cost_usd?: number;
383
- until_stopped_max_cost_usd?: number;
384
- preflight_max_round_cost_usd?: number;
382
+ max_session_cost_usd?: number | undefined;
383
+ until_stopped_max_cost_usd?: number | undefined;
384
+ preflight_max_round_cost_usd?: number | undefined;
385
385
  require_rates_for_budget: boolean;
386
386
  default_max_rounds: number;
387
387
  circular_max_rotations: number;
@@ -404,35 +404,35 @@ export interface AppConfig {
404
404
  };
405
405
  models: Record<PeerId, string>;
406
406
  fallback_models: Partial<Record<PeerId, string[]>>;
407
- reasoning_effort: Partial<Record<PeerId, ReasoningEffort>>;
408
- model_selection: Partial<Record<PeerId, ModelSelection>>;
407
+ reasoning_effort: Partial<Record<PeerId, ReasoningEffort | undefined>>;
408
+ model_selection: Partial<Record<PeerId, ModelSelection | undefined>>;
409
409
  api_keys: Record<PeerId, string | undefined>;
410
410
  cost_rates: Partial<Record<PeerId, {
411
411
  input_per_million: number;
412
412
  output_per_million: number;
413
- input_extended_per_million?: number;
414
- output_extended_per_million?: number;
415
- cache_read_per_million?: number;
416
- cache_write_per_million?: number;
417
- cache_read_extended_per_million?: number;
418
- cache_write_extended_per_million?: number;
419
- promo_input_per_million?: number;
420
- promo_output_per_million?: number;
421
- promo_input_extended_per_million?: number;
422
- promo_output_extended_per_million?: number;
423
- promo_cache_read_per_million?: number;
424
- promo_cache_write_per_million?: number;
425
- promo_cache_read_extended_per_million?: number;
426
- promo_cache_write_extended_per_million?: number;
427
- promo_expires_at?: string;
428
- threshold_tokens?: number;
429
- request_fee_low_per_1000?: number;
430
- request_fee_medium_per_1000?: number;
431
- request_fee_high_per_1000?: number;
432
- citation_tokens_per_million?: number;
433
- deep_research_reasoning_tokens_per_million?: number;
434
- search_queries_per_1000?: number;
435
- }>>;
413
+ input_extended_per_million?: number | undefined;
414
+ output_extended_per_million?: number | undefined;
415
+ cache_read_per_million?: number | undefined;
416
+ cache_write_per_million?: number | undefined;
417
+ cache_read_extended_per_million?: number | undefined;
418
+ cache_write_extended_per_million?: number | undefined;
419
+ promo_input_per_million?: number | undefined;
420
+ promo_output_per_million?: number | undefined;
421
+ promo_input_extended_per_million?: number | undefined;
422
+ promo_output_extended_per_million?: number | undefined;
423
+ promo_cache_read_per_million?: number | undefined;
424
+ promo_cache_write_per_million?: number | undefined;
425
+ promo_cache_read_extended_per_million?: number | undefined;
426
+ promo_cache_write_extended_per_million?: number | undefined;
427
+ promo_expires_at?: string | undefined;
428
+ threshold_tokens?: number | undefined;
429
+ request_fee_low_per_1000?: number | undefined;
430
+ request_fee_medium_per_1000?: number | undefined;
431
+ request_fee_high_per_1000?: number | undefined;
432
+ citation_tokens_per_million?: number | undefined;
433
+ deep_research_reasoning_tokens_per_million?: number | undefined;
434
+ search_queries_per_1000?: number | undefined;
435
+ } | undefined>>;
436
436
  evidence_judge_autowire: EvidenceJudgeAutowireConfig;
437
437
  peer_enabled: Record<PeerId, boolean>;
438
438
  cache: {
@@ -501,9 +501,9 @@ export interface JudgmentPrecisionPeerStats {
501
501
  }
502
502
  export interface JudgmentPrecisionReport {
503
503
  generated_at: string;
504
- peer_filter?: PeerId;
505
- since_filter?: string;
506
- session_filter?: string;
504
+ peer_filter?: PeerId | undefined;
505
+ since_filter?: string | undefined;
506
+ session_filter?: string | undefined;
507
507
  decisions_total: number;
508
508
  decisions_with_ground_truth: number;
509
509
  decisions_skipped_no_ground_truth: number;
@@ -522,7 +522,7 @@ export interface ShadowJudgmentPeerStats {
522
522
  export interface RuntimeMetrics {
523
523
  generated_at: string;
524
524
  scope: "all" | "session";
525
- session_id?: string;
525
+ session_id?: string | undefined;
526
526
  sessions: {
527
527
  total: number;
528
528
  converged: number;
@@ -547,21 +547,21 @@ export interface RuntimeMetrics {
547
547
  }
548
548
  export interface SessionDoctorEntry {
549
549
  session_id: string;
550
- version?: string;
551
- caller?: PeerId | "operator";
552
- petitioner?: PeerId | "operator";
553
- lead_peer?: PeerId;
554
- outcome?: SessionOutcome;
555
- outcome_reason?: string;
556
- health_state?: ConvergenceHealth["state"];
557
- health_detail?: string;
550
+ version?: string | undefined;
551
+ caller?: PeerId | "operator" | undefined;
552
+ petitioner?: PeerId | "operator" | undefined;
553
+ lead_peer?: PeerId | undefined;
554
+ outcome?: SessionOutcome | undefined;
555
+ outcome_reason?: string | undefined;
556
+ health_state?: ConvergenceHealth["state"] | undefined;
557
+ health_detail?: string | undefined;
558
558
  rounds: number;
559
559
  updated_at: string;
560
- open_evidence_items?: number;
561
- grok_provider_errors?: number;
562
- event_read_error?: string;
563
- item_types?: Partial<Record<PeerId, number>>;
564
- chronic_blockers?: string[];
560
+ open_evidence_items?: number | undefined;
561
+ grok_provider_errors?: number | undefined;
562
+ event_read_error?: string | undefined;
563
+ item_types?: Partial<Record<PeerId, number>> | undefined;
564
+ chronic_blockers?: string[] | undefined;
565
565
  }
566
566
  export interface SessionDoctorReport {
567
567
  generated_at: string;
@@ -307,21 +307,25 @@ const server = http.createServer(async (request, response) => {
307
307
  return;
308
308
  }
309
309
  const sessionMatch = url.pathname.match(/^\/api\/sessions\/([a-f0-9-]{36})$/);
310
- if (sessionMatch) {
311
- sendJson(response, orchestrator.store.read(sessionMatch[1]));
310
+ const sessionMatchId = sessionMatch?.[1];
311
+ if (sessionMatchId) {
312
+ sendJson(response, orchestrator.store.read(sessionMatchId));
312
313
  return;
313
314
  }
314
315
  const eventsMatch = url.pathname.match(/^\/api\/sessions\/([a-f0-9-]{36})\/events$/);
315
- if (eventsMatch) {
316
+ const eventsSessionId = eventsMatch?.[1];
317
+ if (eventsSessionId) {
316
318
  const since = Number(url.searchParams.get("since_seq") ?? 0);
317
- sendJson(response, orchestrator.store.readEvents(eventsMatch[1], since));
319
+ sendJson(response, orchestrator.store.readEvents(eventsSessionId, since));
318
320
  return;
319
321
  }
320
322
  const reportMatch = url.pathname.match(/^\/api\/sessions\/([a-f0-9-]{36})\/report$/);
321
- if (reportMatch) {
322
- const session = orchestrator.store.read(reportMatch[1]);
323
- const markdown = sessionReportMarkdown(session, orchestrator.store.readEvents(reportMatch[1]));
324
- orchestrator.store.saveReport(reportMatch[1], markdown);
323
+ const reportSessionId = reportMatch?.[1];
324
+ if (reportSessionId) {
325
+ const sessionId = reportSessionId;
326
+ const session = orchestrator.store.read(sessionId);
327
+ const markdown = sessionReportMarkdown(session, orchestrator.store.readEvents(sessionId));
328
+ orchestrator.store.saveReport(sessionId, markdown);
325
329
  response.writeHead(200, {
326
330
  "content-type": "text/markdown; charset=utf-8",
327
331
  "cache-control": "no-store",
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/dashboard/server.ts"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;AAC5B,MAAM,QAAQ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,WAAW,EAAE,GAAG,EAAE;IACrD,OAAO,CAAC,GAAG,CAAC,4CAA4C,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC;AACnF,CAAC,CAAC,CAAC"}
@@ -20,23 +20,23 @@ export interface CallerIdentityResult {
20
20
  }
21
21
  export declare function verifyCallerIdentity(declaredCaller: PeerId | "operator", clientInfo: ClientInfo): CallerIdentityResult;
22
22
  export declare function lockCallerPeerSelection<T extends {
23
- peers?: PeerId[];
24
- lead_peer?: PeerId;
25
- caller?: PeerId | "operator";
26
- session_id?: string;
23
+ peers?: PeerId[] | undefined;
24
+ lead_peer?: PeerId | undefined;
25
+ caller?: PeerId | "operator" | undefined;
26
+ session_id?: string | undefined;
27
27
  }>(input: T, ctx: {
28
28
  site: "ask_peers" | "session_start_round" | "run_until_unanimous" | "session_start_unanimous";
29
29
  emit: (event: RuntimeEvent) => void;
30
- enabledPeers?: readonly PeerId[];
30
+ enabledPeers?: readonly PeerId[] | undefined;
31
31
  }): T;
32
32
  export declare function buildResponseNotices<T extends {
33
- peers?: PeerId[];
34
- lead_peer?: PeerId;
35
- caller?: PeerId | "operator";
33
+ peers?: PeerId[] | undefined;
34
+ lead_peer?: PeerId | undefined;
35
+ caller?: PeerId | "operator" | undefined;
36
36
  }>(originalInput: T, output: {
37
37
  session?: {
38
- convergence_scope?: ConvergenceScope;
39
- };
38
+ convergence_scope?: ConvergenceScope | undefined;
39
+ } | undefined;
40
40
  }): string[];
41
41
  type JobKind = "ask_peers" | "run_until_unanimous";
42
42
  export type JobStatus = {
@@ -45,9 +45,9 @@ export type JobStatus = {
45
45
  session_id: string;
46
46
  status: "running" | "completed" | "failed" | "cancelled";
47
47
  started_at: string;
48
- completed_at?: string;
49
- error?: string;
50
- result_summary?: Record<string, unknown>;
48
+ completed_at?: string | undefined;
49
+ error?: string | undefined;
50
+ result_summary?: Record<string, unknown> | undefined;
51
51
  };
52
52
  export declare function pruneCompletedJobs(jobs: Map<string, JobStatus>, maxCompleted?: number): void;
53
53
  export declare function main(): Promise<void>;