instar 1.3.785 → 1.3.786

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instar",
3
- "version": "1.3.785",
3
+ "version": "1.3.786",
4
4
  "description": "Coherence infrastructure for self-evolving AI agents — on the Claude Code or Codex subscription you already have.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -50,6 +50,23 @@ const ROOT = path.resolve(__dirname, '..');
50
50
  * parser we KNOW consumes untrusted terminal text and bit us (the code=t bug).
51
51
  */
52
52
  export const SCRAPE_PARSERS = [
53
+ // routing-control-room-spend PR 4 (CMT-1929, operator directive 2026-07-07): the
54
+ // web-verify pricing-page parsers consume UNTRUSTED marketing HTML from the two
55
+ // doors without machine-readable price APIs — load-bearing for the observed
56
+ // price cache (parse drift would feed the promote-me hints garbage; the
57
+ // plausibility clamp is the second barrier).
58
+ {
59
+ parserSymbol: 'parseGroqPricingHtml',
60
+ fixtureSlug: 'pricing-page-groq',
61
+ testFile: 'tests/unit/routing-price-web-verify.test.ts',
62
+ testName: 'parses the REAL groq.com/pricing table bytes',
63
+ },
64
+ {
65
+ parserSymbol: 'parseGooglePricingHtml',
66
+ fixtureSlug: 'pricing-page-google',
67
+ testFile: 'tests/unit/routing-price-web-verify.test.ts',
68
+ testName: 'parses the REAL ai.google.dev/pricing flash-lite card bytes (PAID text rate, never audio/free)',
69
+ },
53
70
  {
54
71
  parserSymbol: 'FrameworkLoginDriver.parseArtifact',
55
72
  fixtureSlug: 'claude-url-code-paste',
@@ -154,6 +154,115 @@ async function fetchOpenRouterModels(timeoutMs = 8000) {
154
154
  }
155
155
  }
156
156
 
157
+ /**
158
+ * Web-verify (FD-8, operator-directed schedule 2026-07-07): DETERMINISTIC
159
+ * extraction from the providers' OFFICIAL pricing pages — the two doors whose
160
+ * prices are published on web pages only (Groq, Google). CONSERVATIVE by
161
+ * construction: any ambiguity yields NO point (an unknown price refuses rather
162
+ * than guesses); every candidate still passes isSanePoint + the plausibility
163
+ * clamp before the forward-only merge. No LLM, no metered spend — the fetch is
164
+ * free; any future LLM-assisted extraction stays manual + budget-capped.
165
+ */
166
+
167
+ /** Strip tags to a pipe-delimited text stream (the page-shape the fixtures pin). */
168
+ function stripHtml(html) {
169
+ return String(html ?? '').replace(/<[^>]+>/g, '|').replace(/\s+/g, ' ');
170
+ }
171
+
172
+ /** Groq page model labels for the tracked ids (the table names models in marketing case). */
173
+ const GROQ_LABELS = { 'openai/gpt-oss-120b': /GPT OSS 120B/i };
174
+
175
+ /** parseGroqPricingHtml — the groq.com/pricing table rows (fixture: pricing-page-groq). */
176
+ export function parseGroqPricingHtml(html, nowMs) {
177
+ const points = [];
178
+ const rows = String(html ?? '').split(/<tr>/i);
179
+ for (const [modelId, label] of Object.entries(GROQ_LABELS)) {
180
+ if (!TRACKED['groq-api'].includes(modelId)) continue;
181
+ const row = rows.find((r) => label.test(stripHtml(r)));
182
+ if (!row) continue; // model row absent → refuse (page reshaped)
183
+ const txt = stripHtml(row);
184
+ const input = /Input Token Price[^$]*\$([0-9]+(?:\.[0-9]+)?)/i.exec(txt);
185
+ const output = /Output Token Price[^$]*\$([0-9]+(?:\.[0-9]+)?)/i.exec(txt);
186
+ if (!input || !output) continue; // shape drifted → refuse, never guess
187
+ points.push({
188
+ door: 'groq-api',
189
+ modelId: canonical(modelId),
190
+ inPerMtok: Number(input[1]),
191
+ outPerMtok: Number(output[1]),
192
+ effectiveAt: dayAlignedIso(nowMs),
193
+ recordedAt: new Date(nowMs).toISOString(),
194
+ source: 'groq-pricing-page',
195
+ corrects: null,
196
+ });
197
+ }
198
+ return points;
199
+ }
200
+
201
+ /** parseGooglePricingHtml — the ai.google.dev/pricing model card (fixture: pricing-page-google). */
202
+ export function parseGooglePricingHtml(html, nowMs) {
203
+ const points = [];
204
+ const txt = stripHtml(html);
205
+ for (const modelId of TRACKED['gemini-api']) {
206
+ const at = txt.indexOf(canonical(modelId));
207
+ if (at < 0) continue;
208
+ const card = txt.slice(at, at + 2500);
209
+ // The PAID text rate only: "$X (text ..." — never the audio rate, never the free tier.
210
+ const input = /Input price[^$]*\$([0-9]+(?:\.[0-9]+)?) \(text/i.exec(card);
211
+ // Output: the first plain dollar figure after the label (thinking tokens included per the page).
212
+ const output = /Output price[^$]*\$([0-9]+(?:\.[0-9]+)?)/i.exec(card);
213
+ if (!input || !output) continue; // shape drifted → refuse, never guess
214
+ points.push({
215
+ door: 'gemini-api',
216
+ modelId: canonical(modelId),
217
+ inPerMtok: Number(input[1]),
218
+ outPerMtok: Number(output[1]),
219
+ effectiveAt: dayAlignedIso(nowMs),
220
+ recordedAt: new Date(nowMs).toISOString(),
221
+ source: 'google-pricing-page',
222
+ corrects: null,
223
+ });
224
+ }
225
+ return points;
226
+ }
227
+
228
+ /**
229
+ * Plausibility clamp vs the canonical manifest (parser-drift protection): an
230
+ * extracted price wildly off the reviewed one (>10x either way on either axis)
231
+ * is REFUSED — a reshaped marketing page must never flood the observed cache.
232
+ * No canonical point → the clamp passes (a brand-new door has no baseline).
233
+ */
234
+ export function plausibleVsCanonical(point, manifest) {
235
+ const pts = (manifest?.points ?? []).filter(
236
+ (p) => p.door === point.door && canonical(p.modelId) === canonical(point.modelId),
237
+ );
238
+ if (pts.length === 0) return true;
239
+ const newest = pts[pts.length - 1];
240
+ const ok = (a, b) => !(a > 0 && b > 0) || (a / b <= 10 && b / a <= 10);
241
+ return ok(point.inPerMtok, newest.inPerMtok) && ok(point.outPerMtok, newest.outPerMtok);
242
+ }
243
+
244
+ /**
245
+ * Read the CALLER-SUPPLIED plausibility baseline (`--plausibility-baseline <path>`)
246
+ * for the clamp. The prober itself is structurally BASELINE-BLIND: it never names
247
+ * any reviewed price file in its own source (S2-2 — this script is observed-cache-
248
+ * only; the reviewed baseline's location is the CALLER's knowledge, see spec
249
+ * Layer 1 / FD-8). Absent/corrupt/unset → null → the clamp passes (no baseline).
250
+ */
251
+ function readBaseline(p) {
252
+ if (!p) return null;
253
+ try {
254
+ return JSON.parse(fs.readFileSync(p, 'utf-8'));
255
+ } catch {
256
+ return null;
257
+ }
258
+ }
259
+
260
+ async function fetchText(url) {
261
+ const res = await fetch(url, { signal: AbortSignal.timeout(20_000), redirect: 'follow' });
262
+ if (!res.ok) throw new Error(`HTTP ${res.status} from ${url}`);
263
+ return res.text();
264
+ }
265
+
157
266
  function parseArgs(argv) {
158
267
  const args = { scope: 'free-probes', budgetUsd: 0, dryRun: false, out: null, projectDir: process.cwd(), stateDir: null };
159
268
  for (let i = 0; i < argv.length; i++) {
@@ -164,6 +273,7 @@ function parseArgs(argv) {
164
273
  else if (a === '--out') args.out = argv[++i];
165
274
  else if (a === '--project-dir') args.projectDir = argv[++i];
166
275
  else if (a === '--state-dir') args.stateDir = argv[++i];
276
+ else if (a === '--plausibility-baseline') args.plausibilityBaseline = argv[++i];
167
277
  }
168
278
  return args;
169
279
  }
@@ -174,8 +284,11 @@ async function main() {
174
284
  const outPath = args.out ?? path.join(stateDir, 'routing-prices.observed.json');
175
285
  const now = Date.now();
176
286
 
177
- if (args.scope !== 'free-probes' && !(args.budgetUsd > 0)) {
178
- // Metered / web-verify probes are MANUAL-ONLY + budget-capped (FD-8). No budget → refuse.
287
+ if (args.scope !== 'free-probes' && args.scope !== '+web-verify' && !(args.budgetUsd > 0)) {
288
+ // Metered probes are MANUAL-ONLY + budget-capped (FD-8). No budget → refuse.
289
+ // '+web-verify' is exempt: its DETERMINISTIC page fetch spends nothing (no
290
+ // LLM, no metered key) — any future LLM-assisted extraction stays behind a
291
+ // positive budget (fail-closed at 0 for that path).
179
292
  console.error(`[routing-price-refresh] scope '${args.scope}' requires a positive --budget-usd (metered probes are manual-only, budget-fail-closed). Refusing.`);
180
293
  process.exit(2);
181
294
  return;
@@ -192,8 +305,37 @@ async function main() {
192
305
  } catch (err) {
193
306
  notes.push(`openrouter-api: probe failed (${err?.message ?? err}) — skipped, no data written for this door`);
194
307
  }
195
- // gemini-api / groq-api need a key → out of the free scope. Honestly reported, never guessed.
196
- notes.push('gemini-api, groq-api: need an API key → not in free-probe scope (manual metered probe only)');
308
+ if (args.scope === '+web-verify') {
309
+ // Web-verify (operator-directed schedule): DETERMINISTIC extraction from the
310
+ // OFFICIAL pricing pages of the doors without machine-readable price APIs.
311
+ // Conservative fail-closed parsers + the plausibility clamp vs canonical;
312
+ // an unparseable page yields an honest note, never a guessed price.
313
+ const manifest = readBaseline(args.plausibilityBaseline);
314
+ const pages = [
315
+ { door: 'groq-api', url: 'https://groq.com/pricing', parse: parseGroqPricingHtml },
316
+ { door: 'gemini-api', url: 'https://ai.google.dev/pricing', parse: parseGooglePricingHtml },
317
+ ];
318
+ for (const page of pages) {
319
+ try {
320
+ const html = await fetchText(page.url);
321
+ const pts = page.parse(html, now).filter((pt) => {
322
+ if (!isSanePoint(pt)) return false;
323
+ if (!plausibleVsCanonical(pt, manifest)) {
324
+ notes.push(`${page.door}: extracted price for ${pt.modelId} REFUSED by the plausibility clamp (>10x off the reviewed price — likely a reshaped page)`);
325
+ return false;
326
+ }
327
+ return true;
328
+ });
329
+ candidates.push(...pts);
330
+ notes.push(`${page.door}: ${pts.length} price(s) extracted from the official pricing page${pts.length === 0 ? ' (page shape not confidently parseable — refused, never guessed)' : ''}`);
331
+ } catch (err) {
332
+ notes.push(`${page.door}: pricing-page fetch failed (${err?.message ?? err}) — skipped, no data written for this door`);
333
+ }
334
+ }
335
+ } else {
336
+ // gemini-api / groq-api need a key → out of the free scope. Honestly reported, never guessed.
337
+ notes.push('gemini-api, groq-api: need an API key → not in free-probe scope (manual metered probe / scheduled web-verify)');
338
+ }
197
339
 
198
340
  const existing = readObserved(outPath);
199
341
  const { points, added } = mergeForwardOnly(existing, candidates);
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$schema": "./builtin-manifest.schema.json",
3
3
  "schemaVersion": 1,
4
- "generatedAt": "2026-07-08T18:34:50.090Z",
5
- "instarVersion": "1.3.785",
4
+ "generatedAt": "2026-07-08T21:14:02.877Z",
5
+ "instarVersion": "1.3.786",
6
6
  "entryCount": 202,
7
7
  "entries": {
8
8
  "hook:session-start": {
@@ -418,7 +418,7 @@
418
418
  "type": "route-group",
419
419
  "domain": "monitoring",
420
420
  "sourcePath": "src/server/routes.ts",
421
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
421
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
422
422
  "since": "2025-01-01"
423
423
  },
424
424
  "route-group:agents": {
@@ -426,7 +426,7 @@
426
426
  "type": "route-group",
427
427
  "domain": "sessions",
428
428
  "sourcePath": "src/server/routes.ts",
429
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
429
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
430
430
  "since": "2025-01-01"
431
431
  },
432
432
  "route-group:backups": {
@@ -434,7 +434,7 @@
434
434
  "type": "route-group",
435
435
  "domain": "operations",
436
436
  "sourcePath": "src/server/routes.ts",
437
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
437
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
438
438
  "since": "2025-01-01"
439
439
  },
440
440
  "route-group:git": {
@@ -442,7 +442,7 @@
442
442
  "type": "route-group",
443
443
  "domain": "coordination",
444
444
  "sourcePath": "src/server/routes.ts",
445
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
445
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
446
446
  "since": "2025-01-01"
447
447
  },
448
448
  "route-group:memory": {
@@ -450,7 +450,7 @@
450
450
  "type": "route-group",
451
451
  "domain": "memory",
452
452
  "sourcePath": "src/server/routes.ts",
453
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
453
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
454
454
  "since": "2025-01-01"
455
455
  },
456
456
  "route-group:semantic": {
@@ -458,7 +458,7 @@
458
458
  "type": "route-group",
459
459
  "domain": "memory",
460
460
  "sourcePath": "src/server/routes.ts",
461
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
461
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
462
462
  "since": "2025-01-01"
463
463
  },
464
464
  "route-group:status": {
@@ -466,7 +466,7 @@
466
466
  "type": "route-group",
467
467
  "domain": "monitoring",
468
468
  "sourcePath": "src/server/routes.ts",
469
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
469
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
470
470
  "since": "2025-01-01"
471
471
  },
472
472
  "route-group:capabilities": {
@@ -474,7 +474,7 @@
474
474
  "type": "route-group",
475
475
  "domain": "mapping",
476
476
  "sourcePath": "src/server/routes.ts",
477
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
477
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
478
478
  "since": "2025-01-01"
479
479
  },
480
480
  "route-group:project-map": {
@@ -482,7 +482,7 @@
482
482
  "type": "route-group",
483
483
  "domain": "mapping",
484
484
  "sourcePath": "src/server/routes.ts",
485
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
485
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
486
486
  "since": "2025-01-01"
487
487
  },
488
488
  "route-group:coherence": {
@@ -490,7 +490,7 @@
490
490
  "type": "route-group",
491
491
  "domain": "coherence",
492
492
  "sourcePath": "src/server/routes.ts",
493
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
493
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
494
494
  "since": "2025-01-01"
495
495
  },
496
496
  "route-group:topic-bindings": {
@@ -498,7 +498,7 @@
498
498
  "type": "route-group",
499
499
  "domain": "sessions",
500
500
  "sourcePath": "src/server/routes.ts",
501
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
501
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
502
502
  "since": "2025-01-01"
503
503
  },
504
504
  "route-group:context": {
@@ -506,7 +506,7 @@
506
506
  "type": "route-group",
507
507
  "domain": "context",
508
508
  "sourcePath": "src/server/routes.ts",
509
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
509
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
510
510
  "since": "2025-01-01"
511
511
  },
512
512
  "route-group:scope-coherence": {
@@ -514,7 +514,7 @@
514
514
  "type": "route-group",
515
515
  "domain": "coherence",
516
516
  "sourcePath": "src/server/routes.ts",
517
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
517
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
518
518
  "since": "2025-01-01"
519
519
  },
520
520
  "route-group:canonical-state": {
@@ -522,7 +522,7 @@
522
522
  "type": "route-group",
523
523
  "domain": "state",
524
524
  "sourcePath": "src/server/routes.ts",
525
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
525
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
526
526
  "since": "2025-01-01"
527
527
  },
528
528
  "route-group:ci": {
@@ -530,7 +530,7 @@
530
530
  "type": "route-group",
531
531
  "domain": "monitoring",
532
532
  "sourcePath": "src/server/routes.ts",
533
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
533
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
534
534
  "since": "2025-01-01"
535
535
  },
536
536
  "route-group:sessions": {
@@ -538,7 +538,7 @@
538
538
  "type": "route-group",
539
539
  "domain": "sessions",
540
540
  "sourcePath": "src/server/routes.ts",
541
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
541
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
542
542
  "since": "2025-01-01"
543
543
  },
544
544
  "route-group:jobs": {
@@ -546,7 +546,7 @@
546
546
  "type": "route-group",
547
547
  "domain": "scheduling",
548
548
  "sourcePath": "src/server/routes.ts",
549
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
549
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
550
550
  "since": "2025-01-01"
551
551
  },
552
552
  "route-group:skip-ledger": {
@@ -554,7 +554,7 @@
554
554
  "type": "route-group",
555
555
  "domain": "scheduling",
556
556
  "sourcePath": "src/server/routes.ts",
557
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
557
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
558
558
  "since": "2025-01-01"
559
559
  },
560
560
  "route-group:telegram": {
@@ -562,7 +562,7 @@
562
562
  "type": "route-group",
563
563
  "domain": "communication",
564
564
  "sourcePath": "src/server/routes.ts",
565
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
565
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
566
566
  "since": "2025-01-01"
567
567
  },
568
568
  "route-group:attention": {
@@ -570,7 +570,7 @@
570
570
  "type": "route-group",
571
571
  "domain": "communication",
572
572
  "sourcePath": "src/server/routes.ts",
573
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
573
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
574
574
  "since": "2025-01-01"
575
575
  },
576
576
  "route-group:relationships": {
@@ -578,7 +578,7 @@
578
578
  "type": "route-group",
579
579
  "domain": "relationships",
580
580
  "sourcePath": "src/server/routes.ts",
581
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
581
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
582
582
  "since": "2025-01-01"
583
583
  },
584
584
  "route-group:feedback": {
@@ -586,7 +586,7 @@
586
586
  "type": "route-group",
587
587
  "domain": "feedback",
588
588
  "sourcePath": "src/server/routes.ts",
589
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
589
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
590
590
  "since": "2025-01-01"
591
591
  },
592
592
  "route-group:updates": {
@@ -594,7 +594,7 @@
594
594
  "type": "route-group",
595
595
  "domain": "updates",
596
596
  "sourcePath": "src/server/routes.ts",
597
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
597
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
598
598
  "since": "2025-01-01"
599
599
  },
600
600
  "route-group:dispatches": {
@@ -602,7 +602,7 @@
602
602
  "type": "route-group",
603
603
  "domain": "dispatches",
604
604
  "sourcePath": "src/server/routes.ts",
605
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
605
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
606
606
  "since": "2025-01-01"
607
607
  },
608
608
  "route-group:quota": {
@@ -610,7 +610,7 @@
610
610
  "type": "route-group",
611
611
  "domain": "monitoring",
612
612
  "sourcePath": "src/server/routes.ts",
613
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
613
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
614
614
  "since": "2025-01-01"
615
615
  },
616
616
  "route-group:publishing": {
@@ -618,7 +618,7 @@
618
618
  "type": "route-group",
619
619
  "domain": "publishing",
620
620
  "sourcePath": "src/server/routes.ts",
621
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
621
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
622
622
  "since": "2025-01-01"
623
623
  },
624
624
  "route-group:private-views": {
@@ -626,7 +626,7 @@
626
626
  "type": "route-group",
627
627
  "domain": "publishing",
628
628
  "sourcePath": "src/server/routes.ts",
629
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
629
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
630
630
  "since": "2025-01-01"
631
631
  },
632
632
  "route-group:tunnel": {
@@ -634,7 +634,7 @@
634
634
  "type": "route-group",
635
635
  "domain": "networking",
636
636
  "sourcePath": "src/server/routes.ts",
637
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
637
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
638
638
  "since": "2025-01-01"
639
639
  },
640
640
  "route-group:events": {
@@ -642,7 +642,7 @@
642
642
  "type": "route-group",
643
643
  "domain": "networking",
644
644
  "sourcePath": "src/server/routes.ts",
645
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
645
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
646
646
  "since": "2025-01-01"
647
647
  },
648
648
  "route-group:evolution": {
@@ -650,7 +650,7 @@
650
650
  "type": "route-group",
651
651
  "domain": "evolution",
652
652
  "sourcePath": "src/server/routes.ts",
653
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
653
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
654
654
  "since": "2025-01-01"
655
655
  },
656
656
  "route-group:watchdog": {
@@ -658,7 +658,7 @@
658
658
  "type": "route-group",
659
659
  "domain": "monitoring",
660
660
  "sourcePath": "src/server/routes.ts",
661
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
661
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
662
662
  "since": "2025-01-01"
663
663
  },
664
664
  "route-group:topic-memory": {
@@ -666,7 +666,7 @@
666
666
  "type": "route-group",
667
667
  "domain": "memory",
668
668
  "sourcePath": "src/server/routes.ts",
669
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
669
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
670
670
  "since": "2025-01-01"
671
671
  },
672
672
  "route-group:state-sync": {
@@ -674,7 +674,7 @@
674
674
  "type": "route-group",
675
675
  "domain": "coordination",
676
676
  "sourcePath": "src/server/routes.ts",
677
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
677
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
678
678
  "since": "2025-01-01"
679
679
  },
680
680
  "route-group:intent": {
@@ -682,7 +682,7 @@
682
682
  "type": "route-group",
683
683
  "domain": "intent",
684
684
  "sourcePath": "src/server/routes.ts",
685
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
685
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
686
686
  "since": "2025-01-01"
687
687
  },
688
688
  "route-group:triage": {
@@ -690,7 +690,7 @@
690
690
  "type": "route-group",
691
691
  "domain": "safety",
692
692
  "sourcePath": "src/server/routes.ts",
693
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
693
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
694
694
  "since": "2025-01-01"
695
695
  },
696
696
  "route-group:operations": {
@@ -698,7 +698,7 @@
698
698
  "type": "route-group",
699
699
  "domain": "safety",
700
700
  "sourcePath": "src/server/routes.ts",
701
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
701
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
702
702
  "since": "2025-01-01"
703
703
  },
704
704
  "route-group:sentinel": {
@@ -706,7 +706,7 @@
706
706
  "type": "route-group",
707
707
  "domain": "safety",
708
708
  "sourcePath": "src/server/routes.ts",
709
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
709
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
710
710
  "since": "2025-01-01"
711
711
  },
712
712
  "route-group:trust": {
@@ -714,7 +714,7 @@
714
714
  "type": "route-group",
715
715
  "domain": "safety",
716
716
  "sourcePath": "src/server/routes.ts",
717
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
717
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
718
718
  "since": "2025-01-01"
719
719
  },
720
720
  "route-group:monitoring": {
@@ -722,7 +722,7 @@
722
722
  "type": "route-group",
723
723
  "domain": "monitoring",
724
724
  "sourcePath": "src/server/routes.ts",
725
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
725
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
726
726
  "since": "2025-01-01"
727
727
  },
728
728
  "route-group:commitments": {
@@ -730,7 +730,7 @@
730
730
  "type": "route-group",
731
731
  "domain": "commitments",
732
732
  "sourcePath": "src/server/routes.ts",
733
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
733
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
734
734
  "since": "2025-01-01"
735
735
  },
736
736
  "route-group:episodes": {
@@ -738,7 +738,7 @@
738
738
  "type": "route-group",
739
739
  "domain": "memory",
740
740
  "sourcePath": "src/server/routes.ts",
741
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
741
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
742
742
  "since": "2025-01-01"
743
743
  },
744
744
  "route-group:messages": {
@@ -746,7 +746,7 @@
746
746
  "type": "route-group",
747
747
  "domain": "coordination",
748
748
  "sourcePath": "src/server/routes.ts",
749
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
749
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
750
750
  "since": "2025-01-01"
751
751
  },
752
752
  "route-group:system-reviews": {
@@ -754,7 +754,7 @@
754
754
  "type": "route-group",
755
755
  "domain": "monitoring",
756
756
  "sourcePath": "src/server/routes.ts",
757
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
757
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
758
758
  "since": "2025-01-01"
759
759
  },
760
760
  "route-group:machine-mesh": {
@@ -770,7 +770,7 @@
770
770
  "type": "route-group",
771
771
  "domain": "security",
772
772
  "sourcePath": "src/server/routes.ts",
773
- "contentHash": "9ea6be3f5d36afcdd1ee3fbc4fd2fa65810ad55196fff7d21d9d068cabf26e75",
773
+ "contentHash": "6dd6ca2f8912d7e60e3210bb2db055b72b3c1cbb816598cff9d6a00c43413606",
774
774
  "since": "2025-01-01"
775
775
  },
776
776
  "cli:init": {
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: Routing Price Web-Verify
3
+ description: "The SCHEDULED web-research price check (operator directive 2026-07-07; docs/specs/routing-control-room-spend-alerts.md FD-8 web-verify): for the metered doors whose prices are published on OFFICIAL WEB PAGES only (Groq, Google), the deterministic prober fetches groq.com/pricing + ai.google.dev/pricing and extracts the tracked models' per-Mtok prices with CONSERVATIVE fail-closed parsers (fixture-realness-tested; a reshaped page refuses, never guesses) plus a plausibility clamp vs the reviewed canonical price (>10x off → refused). Extracted points are OBSERVATIONS written forward-only, UTC-day-aligned, into the MACHINE-LOCAL observed cache ONLY — structurally never the canonical manifest; an observed price never becomes official without the operator's PIN promotion. The fetch is FREE (no LLM, no metered key) — any future LLM-assisted extraction stays manual + budget-capped. Drift between observed and canonical surfaces via the Spend tab promote hint and the observed-drift alert. Ships OFF by default (enabled:false). perMachineIndependent — the observed cache is machine-local."
4
+ schedule: "0 6 * * 2"
5
+ priority: low
6
+ expectedDurationMinutes: 5
7
+ model: haiku
8
+ supervision: tier1
9
+ enabled: false
10
+ perMachineIndependent: true
11
+ tags:
12
+ - cat:maintenance
13
+ - role:worker
14
+ - exec:prompt
15
+ gate: curl -sf http://localhost:${INSTAR_PORT:-4042}/health >/dev/null 2>&1
16
+ toolAllowlist: ["Bash"]
17
+ unrestrictedTools: false
18
+ mcpAccess: none
19
+ ---
20
+ Run one routing-price web-verify pass. This job only INVOKES the deterministic prober and sanity-checks that it produced a well-formed result — the prober owns 100% of the network I/O, the conservative page parsing, the plausibility clamp, the forward-only day-alignment, and the observed-cache write. You have Bash ONLY — no Edit/Write tool. Do NOT try to edit any source file, and NEVER touch `scripts/routing-prices.manifest.json` (the canonical manifest is human/PIN-reviewed only; the prober is structurally forbidden from writing it).
21
+
22
+ 1. **Prober-presence gate.** Confirm the prober ships in this tree; if absent, exit cleanly (nothing to do):
23
+ `test -f scripts/routing-price-refresh.mjs`
24
+
25
+ 2. **Run the deterministic prober at the web-verify scope (official pricing pages; zero metered spend — the fetch is free and no LLM is involved):**
26
+ `node scripts/routing-price-refresh.mjs --scope +web-verify --plausibility-baseline scripts/routing-prices.manifest.json`
27
+
28
+ (The `--plausibility-baseline` path is READ-ONLY input for the >10x sanity clamp — the prober's own source is structurally baseline-blind (S2-2) and can never write that file; you pass its location, the prober only compares against it.)
29
+
30
+ 3. **Tier-1 supervision (your job) — sanity-check the run, do NOT re-surface anything yourself.** Confirm the prober printed a well-formed JSON result (`added`, `totalObserved`, `notes`). A note saying a page was "not confidently parseable — refused, never guessed" or "REFUSED by the plausibility clamp" is a HEALTHY fail-closed outcome, not an error. The observed cache is REPORTING-ONLY; a real price drift surfaces in the Routing Spend dashboard tab's promote hint and the observed-drift alert, never as an edit here.
31
+
32
+ 4. Exit. The observed cache is machine-local and forward-only; the canonical manifest is never touched by this job.