sneakoscope 1.14.0 → 1.14.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 (77) hide show
  1. package/README.md +1 -1
  2. package/crates/sks-core/Cargo.lock +1 -1
  3. package/crates/sks-core/Cargo.toml +1 -1
  4. package/crates/sks-core/src/main.rs +1 -1
  5. package/dist/bin/sks.js +1 -1
  6. package/dist/build-manifest.json +5 -1
  7. package/dist/cli/feature-commands.js +37 -2
  8. package/dist/commands/image-ux-review.d.ts +61 -3
  9. package/dist/core/codex-hooks/codex-hook-official-hash-oracle.d.ts +19 -0
  10. package/dist/core/codex-hooks/codex-hook-official-hash-oracle.js +96 -0
  11. package/dist/core/codex-hooks/codex-hook-official-parity.d.ts +80 -0
  12. package/dist/core/codex-hooks/codex-hook-official-parity.js +37 -5
  13. package/dist/core/commands/image-ux-review-command.d.ts +61 -3
  14. package/dist/core/commands/image-ux-review-command.js +21 -9
  15. package/dist/core/commands/scouts-command.js +90 -6
  16. package/dist/core/evidence/flagship-proof-graph-validator.d.ts +11 -0
  17. package/dist/core/evidence/flagship-proof-graph-validator.js +215 -0
  18. package/dist/core/feature-fixture-runner.d.ts +3 -0
  19. package/dist/core/feature-fixture-runner.js +12 -2
  20. package/dist/core/feature-fixtures.js +1 -1
  21. package/dist/core/feature-registry.js +6 -1
  22. package/dist/core/fsx.d.ts +1 -1
  23. package/dist/core/fsx.js +1 -1
  24. package/dist/core/image-ux-review/imagegen-adapter.js +28 -32
  25. package/dist/core/image-ux-review.d.ts +67 -5
  26. package/dist/core/image-ux-review.js +327 -37
  27. package/dist/core/imagegen/imagegen-capability.js +82 -6
  28. package/dist/core/init.js +1 -1
  29. package/dist/core/pipeline-internals/runtime-gates.js +49 -14
  30. package/dist/core/ppt-review/index.js +2 -0
  31. package/dist/core/ppt-review/slide-exporter.js +2 -2
  32. package/dist/core/proof/auto-finalize.d.ts +1 -1
  33. package/dist/core/proof/auto-finalize.js +14 -3
  34. package/dist/core/proof/evidence-collector.d.ts +3 -0
  35. package/dist/core/proof/route-adapter.d.ts +8 -0
  36. package/dist/core/proof/route-finalizer.d.ts +9 -1
  37. package/dist/core/proof/route-finalizer.js +9 -4
  38. package/dist/core/proof/route-proof-gate.js +2 -1
  39. package/dist/core/proof/selftest-proof-fixtures.d.ts +8 -0
  40. package/dist/core/routes.d.ts +1 -1
  41. package/dist/core/routes.js +2 -2
  42. package/dist/core/scouts/engines/codex-app-subagent-engine.d.ts +11 -2
  43. package/dist/core/scouts/engines/codex-app-subagent-engine.js +21 -7
  44. package/dist/core/scouts/engines/codex-exec-parallel-engine.d.ts +23 -1
  45. package/dist/core/scouts/engines/codex-exec-parallel-engine.js +54 -7
  46. package/dist/core/scouts/engines/scout-engine-base.d.ts +15 -2
  47. package/dist/core/scouts/engines/scout-engine-base.js +51 -7
  48. package/dist/core/scouts/engines/scout-engine-detect.js +18 -0
  49. package/dist/core/scouts/engines/scout-engine-policy.d.ts +2 -1
  50. package/dist/core/scouts/engines/scout-engine-policy.js +7 -3
  51. package/dist/core/scouts/engines/tmux-lane-engine.d.ts +4 -1
  52. package/dist/core/scouts/engines/tmux-lane-engine.js +30 -7
  53. package/dist/core/scouts/scout-consensus.d.ts +6 -2
  54. package/dist/core/scouts/scout-consensus.js +39 -14
  55. package/dist/core/scouts/scout-gate.d.ts +1 -0
  56. package/dist/core/scouts/scout-gate.js +25 -5
  57. package/dist/core/scouts/scout-output-parser.d.ts +2 -2
  58. package/dist/core/scouts/scout-output-parser.js +77 -8
  59. package/dist/core/scouts/scout-proof-evidence.d.ts +11 -0
  60. package/dist/core/scouts/scout-proof-evidence.js +25 -0
  61. package/dist/core/scouts/scout-readonly-guard.d.ts +41 -0
  62. package/dist/core/scouts/scout-readonly-guard.js +93 -3
  63. package/dist/core/scouts/scout-runner.d.ts +49 -5
  64. package/dist/core/scouts/scout-runner.js +213 -57
  65. package/dist/core/scouts/scout-schema.d.ts +4 -2
  66. package/dist/core/scouts/scout-schema.js +8 -2
  67. package/dist/core/triwiki-wrongness/wrongness-proof-linker.d.ts +6 -1
  68. package/dist/core/triwiki-wrongness/wrongness-proof-linker.js +14 -8
  69. package/dist/core/triwiki-wrongness/wrongness-trust-policy.js +9 -2
  70. package/dist/core/trust-kernel/completion-contract.js +9 -1
  71. package/dist/core/trust-kernel/trust-report.d.ts +16 -0
  72. package/dist/core/trust-kernel/trust-report.js +4 -1
  73. package/dist/core/version.d.ts +1 -1
  74. package/dist/core/version.js +1 -1
  75. package/dist/vendor/openai-codex/latest/hooks/snapshot-metadata.json +1 -1
  76. package/package.json +20 -5
  77. package/schemas/codex/scout-result.schema.json +163 -6
package/README.md CHANGED
@@ -10,7 +10,7 @@ SKS does not try to clone every other harness. It focuses on one thing: making C
10
10
 
11
11
  ## Current Release
12
12
 
13
- SKS **1.14.0** focuses on Codex hook trust parity and real imagegen route hardening: hooks now prefer managed installs when official hashes are unavailable, `trust-doctor --actual` reports real config state, and UX/PPT image routes validate gpt-image-2 requests before generation while fake blackbox checks stay explicitly mock-like.
13
+ SKS **1.14.1** is an extreme stabilization release for hook trust, real imagegen smoke checks, PPT E2E review evidence, Codex 0.133 compatibility, and Scout multi-session intake. Scout runs now carry `engine_run_id`, `scout_session_id`, output-schema metadata, isolated benchmark artifacts, read-only guard v2 evidence, and speedup-claim caps for mock/static paths.
14
14
 
15
15
  ```bash
16
16
  sks features complete --json
@@ -76,7 +76,7 @@ dependencies = [
76
76
 
77
77
  [[package]]
78
78
  name = "sks-core"
79
- version = "1.14.0"
79
+ version = "1.14.1"
80
80
  dependencies = [
81
81
  "serde_json",
82
82
  ]
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sks-core"
3
- version = "1.14.0"
3
+ version = "1.14.1"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]
@@ -4,7 +4,7 @@ use std::io::{self, Read, Seek, SeekFrom};
4
4
  fn main() {
5
5
  let mut args = std::env::args().skip(1);
6
6
  match args.next().as_deref() {
7
- Some("--version") => println!("sks-rs 1.14.0"),
7
+ Some("--version") => println!("sks-rs 1.14.1"),
8
8
  Some("compact-info") => {
9
9
  let mut input = String::new();
10
10
  let _ = io::stdin().read_to_string(&mut input);
package/dist/bin/sks.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const FAST_PACKAGE_VERSION = '1.14.0';
2
+ const FAST_PACKAGE_VERSION = '1.14.1';
3
3
  const args = process.argv.slice(2);
4
4
  try {
5
5
  if (args[0] === '--version' || args[0] === '-v' || args[0] === 'version') {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schema": "sks.dist-build.v2",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "typescript": true,
5
5
  "mjs_runtime_files": 0,
6
6
  "files": [
@@ -226,6 +226,8 @@
226
226
  "core/codex-hooks/codex-hook-hash.js",
227
227
  "core/codex-hooks/codex-hook-managed-install.d.ts",
228
228
  "core/codex-hooks/codex-hook-managed-install.js",
229
+ "core/codex-hooks/codex-hook-official-hash-oracle.d.ts",
230
+ "core/codex-hooks/codex-hook-official-hash-oracle.js",
229
231
  "core/codex-hooks/codex-hook-official-parity.d.ts",
230
232
  "core/codex-hooks/codex-hook-official-parity.js",
231
233
  "core/codex-hooks/codex-hook-state-writer.d.ts",
@@ -370,6 +372,8 @@
370
372
  "core/evidence/evidence-schema.js",
371
373
  "core/evidence/evidence-store.d.ts",
372
374
  "core/evidence/evidence-store.js",
375
+ "core/evidence/flagship-proof-graph-validator.d.ts",
376
+ "core/evidence/flagship-proof-graph-validator.js",
373
377
  "core/feature-fixture-runner.d.ts",
374
378
  "core/feature-fixture-runner.js",
375
379
  "core/feature-fixtures.d.ts",
@@ -151,6 +151,41 @@ export async function hooksCommand(sub = 'explain', args = []) {
151
151
  process.exitCode = 1;
152
152
  return;
153
153
  }
154
+ if (action === 'repair') {
155
+ if (flag(args, '--trusted')) {
156
+ const parity = await writeCodexHookOfficialParityReport(root);
157
+ if (!parity.official_hash_available) {
158
+ const blocked = {
159
+ schema: 'sks.codex-hooks-repair.v1',
160
+ ok: false,
161
+ mode: 'trusted',
162
+ status: 'blocked',
163
+ blocker: 'official_hash_oracle_unavailable',
164
+ next_command: 'sks hooks repair --managed --json',
165
+ parity
166
+ };
167
+ if (flag(args, '--json'))
168
+ return console.log(JSON.stringify(blocked, null, 2));
169
+ console.log('Hooks trusted repair blocked: official hash oracle unavailable. Run `sks hooks repair --managed --json`.');
170
+ process.exitCode = 1;
171
+ return;
172
+ }
173
+ }
174
+ const report = await installManagedCodexHooks(root);
175
+ const result = {
176
+ ...report,
177
+ schema: 'sks.codex-hooks-repair.v1',
178
+ mode: 'managed',
179
+ next_command: 'sks hooks trust-doctor --actual --json',
180
+ actions: ['requirements_toml_managed_install_default']
181
+ };
182
+ if (flag(args, '--json'))
183
+ return console.log(JSON.stringify(result, null, 2));
184
+ console.log(`Hooks managed repair: ${report.ok ? 'ok' : 'blocked'}`);
185
+ if (!report.ok)
186
+ process.exitCode = 1;
187
+ return;
188
+ }
154
189
  if (action === 'install') {
155
190
  const report = flag(args, '--managed')
156
191
  ? await installManagedCodexHooks(root)
@@ -162,7 +197,7 @@ export async function hooksCommand(sub = 'explain', args = []) {
162
197
  process.exitCode = 1;
163
198
  return;
164
199
  }
165
- if (action === 'actual-parity' || action === 'official-parity') {
200
+ if (action === 'actual-parity' || action === 'official-parity' || (action === 'parity' && flag(args, '--official'))) {
166
201
  const report = await writeCodexHookOfficialParityReport(root);
167
202
  if (flag(args, '--json'))
168
203
  return console.log(JSON.stringify(report, null, 2));
@@ -220,7 +255,7 @@ export async function hooksCommand(sub = 'explain', args = []) {
220
255
  return;
221
256
  }
222
257
  if (action !== 'explain') {
223
- console.error('Usage: sks hooks explain|status|doctor|trust-report|trust-state|trust-doctor|trust-fix|install|actual-parity|official-parity|replay <fixture.json>|codex-schema|codex-validate|warning-check|replay-codex-fixtures [--json]');
258
+ console.error('Usage: sks hooks explain|status|doctor|trust-report|trust-state|trust-doctor|trust-fix|install|repair|actual-parity|official-parity|parity --official|replay <fixture.json>|codex-schema|codex-validate|warning-check|replay-codex-fixtures [--json]');
224
259
  process.exitCode = 1;
225
260
  return;
226
261
  }
@@ -49,7 +49,8 @@ export declare function run(command: any, args?: any): Promise<void | {
49
49
  privacy: string;
50
50
  };
51
51
  image_generation_review: {
52
- required_for_gate: boolean;
52
+ required_for_gate: string;
53
+ missing_generated_image_closeout: string;
53
54
  model: string;
54
55
  preferred_surface: string;
55
56
  codex_app_imagegen_doc: string;
@@ -122,12 +123,17 @@ export declare function run(command: any, args?: any): Promise<void | {
122
123
  gpt_image_2_model_doc: string;
123
124
  };
124
125
  required: boolean;
126
+ required_for_full_verification: boolean;
127
+ reference_closeout_allowed_when_unavailable: boolean;
125
128
  generated_review_images: any;
126
129
  planned_reviews: any;
127
130
  generated_count: any;
128
131
  real_generated_count: any;
129
132
  required_count: any;
130
133
  text_only_count: any;
134
+ generated_image_file_evidence_checked: boolean;
135
+ evidence_verified: boolean;
136
+ reference_closeout_eligible: boolean;
131
137
  blockers: string[];
132
138
  passed: boolean;
133
139
  imagegen_blocker: {
@@ -260,6 +266,7 @@ export declare function run(command: any, args?: any): Promise<void | {
260
266
  }[];
261
267
  stopped: boolean;
262
268
  stop_reason: string;
269
+ reference_only: boolean;
263
270
  passed: boolean;
264
271
  };
265
272
  output_schema: import("../core/codex-exec-output-schema.js").CodexExecResumeOutputSchemaAvailability | {
@@ -267,8 +274,24 @@ export declare function run(command: any, args?: any): Promise<void | {
267
274
  status: string;
268
275
  warnings: any[];
269
276
  };
277
+ honest_mode_evidence: {
278
+ schema: string;
279
+ ok: boolean;
280
+ artifact: string;
281
+ validation: {
282
+ schema: any;
283
+ ok: boolean;
284
+ errors: any;
285
+ warnings: any;
286
+ checked_at: string;
287
+ };
288
+ };
270
289
  gate: {
271
- passed: boolean;
290
+ passed: any;
291
+ status: string;
292
+ verified_level: string;
293
+ full_review_passed: boolean;
294
+ reference_only: any;
272
295
  schema: string;
273
296
  schema_version: number;
274
297
  created_at: string;
@@ -282,15 +305,26 @@ export declare function run(command: any, args?: any): Promise<void | {
282
305
  p0_p1_zero_after_fix: boolean;
283
306
  fix_loop_executed_or_not_needed: boolean;
284
307
  changed_screens_rechecked: boolean;
308
+ image_voxel_reference_anchor_created: boolean;
285
309
  image_voxel_relations_created: boolean;
286
310
  wrongness_checked: boolean;
287
311
  honest_mode_complete: boolean;
288
312
  required_artifacts: string[];
289
313
  blockers: any[];
314
+ full_verification_blockers: any[];
315
+ reference_closeout: {
316
+ eligible: any;
317
+ reason: string | null;
318
+ cap: string;
319
+ cannot_claim: string[];
320
+ };
321
+ source_reference_evidence: any;
322
+ honest_mode_evidence: any;
290
323
  verification_caps: {
291
324
  text_only_review: string;
292
325
  mock_fixture: string;
293
326
  codex_less_than_0_132_fallback: string;
327
+ missing_generated_image_reference_closeout: string;
294
328
  };
295
329
  notes: string[];
296
330
  };
@@ -397,7 +431,11 @@ export declare function run(command: any, args?: any): Promise<void | {
397
431
  contract_hash: any;
398
432
  };
399
433
  gate: {
400
- passed: boolean;
434
+ passed: any;
435
+ status: string;
436
+ verified_level: string;
437
+ full_review_passed: boolean;
438
+ reference_only: any;
401
439
  schema: string;
402
440
  schema_version: number;
403
441
  created_at: string;
@@ -411,15 +449,26 @@ export declare function run(command: any, args?: any): Promise<void | {
411
449
  p0_p1_zero_after_fix: boolean;
412
450
  fix_loop_executed_or_not_needed: boolean;
413
451
  changed_screens_rechecked: boolean;
452
+ image_voxel_reference_anchor_created: boolean;
414
453
  image_voxel_relations_created: boolean;
415
454
  wrongness_checked: boolean;
416
455
  honest_mode_complete: boolean;
417
456
  required_artifacts: string[];
418
457
  blockers: any[];
458
+ full_verification_blockers: any[];
459
+ reference_closeout: {
460
+ eligible: any;
461
+ reason: string | null;
462
+ cap: string;
463
+ cannot_claim: string[];
464
+ };
465
+ source_reference_evidence: any;
466
+ honest_mode_evidence: any;
419
467
  verification_caps: {
420
468
  text_only_review: string;
421
469
  mock_fixture: string;
422
470
  codex_less_than_0_132_fallback: string;
471
+ missing_generated_image_reference_closeout: string;
423
472
  };
424
473
  notes: string[];
425
474
  };
@@ -466,6 +515,15 @@ export declare function run(command: any, args?: any): Promise<void | {
466
515
  blockers: string[];
467
516
  passed: boolean;
468
517
  };
518
+ } | {
519
+ schema: string;
520
+ ok: boolean;
521
+ mission_id: any;
522
+ status: any;
523
+ verified_level: any;
524
+ reference_only: boolean;
525
+ blockers: any;
526
+ next_action: string;
469
527
  } | {
470
528
  schema: string;
471
529
  ok: boolean;
@@ -0,0 +1,19 @@
1
+ import { type CodexHookEventName } from '../codex-compat/codex-hook-events.js';
2
+ import { type CodexCommandHookIdentity } from './codex-hook-hash.js';
3
+ export declare const CODEX_HOOK_HASH_ORACLE_SCHEMA = "sks.codex-hook-hash-oracle.v1";
4
+ export type CodexHookHashOracleMode = 'cli' | 'rust-helper' | 'golden-fixture' | 'unavailable';
5
+ export interface CodexHookHashOracleResult {
6
+ schema: typeof CODEX_HOOK_HASH_ORACLE_SCHEMA;
7
+ ok: boolean;
8
+ mode: CodexHookHashOracleMode;
9
+ event_name: CodexHookEventName | null;
10
+ official_hash_available: boolean;
11
+ official_hash_proven: boolean;
12
+ official_hash: string | null;
13
+ sks_computed_hash: string | null;
14
+ source: string | null;
15
+ blocker: string | null;
16
+ generated_at: string;
17
+ }
18
+ export declare function resolveCodexHookHashOracle(root: string, identity: CodexCommandHookIdentity, opts?: any): Promise<CodexHookHashOracleResult>;
19
+ //# sourceMappingURL=codex-hook-official-hash-oracle.d.ts.map
@@ -0,0 +1,96 @@
1
+ import path from 'node:path';
2
+ import { exists, nowIso, readJson, runProcess, which } from '../fsx.js';
3
+ import {} from '../codex-compat/codex-hook-events.js';
4
+ import { codexCommandHookCurrentHash } from './codex-hook-hash.js';
5
+ export const CODEX_HOOK_HASH_ORACLE_SCHEMA = 'sks.codex-hook-hash-oracle.v1';
6
+ export async function resolveCodexHookHashOracle(root, identity, opts = {}) {
7
+ const sksHash = codexCommandHookCurrentHash(identity);
8
+ const cli = await readCliOracle(identity, opts).catch((err) => unavailable(identity, sksHash, `cli_oracle_failed:${errorMessage(err)}`));
9
+ if (cli.mode === 'cli' && cli.official_hash_available)
10
+ return cli;
11
+ const rust = await readRustOracle(root, identity, opts).catch((err) => unavailable(identity, sksHash, `rust_oracle_failed:${errorMessage(err)}`));
12
+ if (rust.mode === 'rust-helper' && rust.official_hash_available)
13
+ return rust;
14
+ const fixture = await readGoldenFixtureOracle(root, identity, opts).catch((err) => unavailable(identity, sksHash, `golden_fixture_failed:${errorMessage(err)}`));
15
+ if (fixture.mode === 'golden-fixture' && fixture.official_hash_available)
16
+ return fixture;
17
+ return unavailable(identity, sksHash, cli.blocker || rust.blocker || fixture.blocker || 'official_hash_oracle_unavailable');
18
+ }
19
+ async function readCliOracle(identity, opts = {}) {
20
+ const codexBin = opts.codexBin || await which('codex').catch(() => null);
21
+ const sksHash = codexCommandHookCurrentHash(identity);
22
+ if (!codexBin)
23
+ return unavailable(identity, sksHash, 'codex_binary_missing');
24
+ const run = await runProcess(codexBin, ['hooks', 'hash', '--json'], {
25
+ input: `${JSON.stringify(identity)}\n`,
26
+ timeoutMs: 5000,
27
+ maxOutputBytes: 64 * 1024
28
+ }).catch((err) => ({ code: 1, stdout: '', stderr: errorMessage(err) }));
29
+ if (run.code !== 0)
30
+ return unavailable(identity, sksHash, 'codex_hooks_hash_json_unavailable');
31
+ const parsed = JSON.parse(run.stdout || '{}');
32
+ const officialHash = parsed.official_hash || parsed.hash || parsed.current_hash || null;
33
+ return oracleResult('cli', identity, sksHash, officialHash, `${codexBin} hooks hash --json`);
34
+ }
35
+ async function readRustOracle(root, identity, opts = {}) {
36
+ const sksRs = opts.rustHelper || await which('sks-rs').catch(() => null);
37
+ const sksHash = codexCommandHookCurrentHash(identity);
38
+ if (!sksRs)
39
+ return unavailable(identity, sksHash, 'rust_helper_missing');
40
+ const run = await runProcess(sksRs, ['codex-hook-hash', '--json'], {
41
+ cwd: root,
42
+ input: `${JSON.stringify(identity)}\n`,
43
+ timeoutMs: 5000,
44
+ maxOutputBytes: 64 * 1024
45
+ }).catch((err) => ({ code: 1, stdout: '', stderr: errorMessage(err) }));
46
+ if (run.code !== 0)
47
+ return unavailable(identity, sksHash, 'rust_helper_hash_unavailable');
48
+ const parsed = JSON.parse(run.stdout || '{}');
49
+ const officialHash = parsed.official_hash || parsed.hash || null;
50
+ return oracleResult('rust-helper', identity, sksHash, officialHash, `${sksRs} codex-hook-hash --json`);
51
+ }
52
+ async function readGoldenFixtureOracle(root, identity, opts = {}) {
53
+ const fixturePath = opts.fixturePath || path.join(root, 'test', 'fixtures', 'codex-hooks', 'official-hash-oracle.json');
54
+ const sksHash = codexCommandHookCurrentHash(identity);
55
+ if (!(await exists(fixturePath)))
56
+ return unavailable(identity, sksHash, 'golden_fixture_missing');
57
+ const fixture = await readJson(fixturePath, {});
58
+ const rows = Array.isArray(fixture?.entries) ? fixture.entries : [];
59
+ const match = rows.find((row) => row.event_name === identity.event && String(row.command || '') === String(identity.command || '') && String(row.matcher || '') === String(identity.matcher || ''));
60
+ const officialHash = match?.official_hash || match?.hash || null;
61
+ return oracleResult('golden-fixture', identity, sksHash, officialHash, fixturePath);
62
+ }
63
+ function oracleResult(mode, identity, sksHash, officialHash, source) {
64
+ return {
65
+ schema: CODEX_HOOK_HASH_ORACLE_SCHEMA,
66
+ ok: Boolean(officialHash) && officialHash === sksHash,
67
+ mode,
68
+ event_name: identity.event,
69
+ official_hash_available: Boolean(officialHash),
70
+ official_hash_proven: Boolean(officialHash) && officialHash === sksHash,
71
+ official_hash: officialHash,
72
+ sks_computed_hash: sksHash,
73
+ source,
74
+ blocker: officialHash ? (officialHash === sksHash ? null : 'official_hash_mismatch') : 'official_hash_missing',
75
+ generated_at: nowIso()
76
+ };
77
+ }
78
+ function unavailable(identity, sksHash, blocker) {
79
+ return {
80
+ schema: CODEX_HOOK_HASH_ORACLE_SCHEMA,
81
+ ok: true,
82
+ mode: 'unavailable',
83
+ event_name: identity.event || null,
84
+ official_hash_available: false,
85
+ official_hash_proven: false,
86
+ official_hash: null,
87
+ sks_computed_hash: sksHash,
88
+ source: null,
89
+ blocker,
90
+ generated_at: nowIso()
91
+ };
92
+ }
93
+ function errorMessage(err) {
94
+ return err instanceof Error ? err.message : String(err);
95
+ }
96
+ //# sourceMappingURL=codex-hook-official-hash-oracle.js.map
@@ -4,6 +4,11 @@ export declare function codexHookOfficialParityReport(root: string, opts?: any):
4
4
  status: string;
5
5
  created_at: string;
6
6
  root: string;
7
+ oracle_mode: import("./codex-hook-official-hash-oracle.js").CodexHookHashOracleMode;
8
+ official_hash_available: boolean;
9
+ official_hash_proven: boolean;
10
+ managed_policy_used: boolean;
11
+ unmanaged_trusted_hash_writer_enabled: boolean;
7
12
  codex: {
8
13
  available: boolean;
9
14
  version: string | null;
@@ -13,8 +18,10 @@ export declare function codexHookOfficialParityReport(root: string, opts?: any):
13
18
  };
14
19
  policy: {
15
20
  official_hash_available: boolean;
21
+ official_hash_proven: boolean;
16
22
  managed_only_enforced: boolean;
17
23
  sks_trusted_hash_fallback_allowed: boolean;
24
+ unmanaged_trusted_hash_writer_enabled: boolean;
18
25
  trusted_hash_writer_policy: string;
19
26
  };
20
27
  counts: {
@@ -37,6 +44,7 @@ export declare function codexHookOfficialParityReport(root: string, opts?: any):
37
44
  async_false_required: boolean;
38
45
  }[];
39
46
  };
47
+ oracle_rows: import("./codex-hook-official-hash-oracle.js").CodexHookHashOracleResult[];
40
48
  entries: {
41
49
  key: string;
42
50
  source_path: string;
@@ -47,6 +55,9 @@ export declare function codexHookOfficialParityReport(root: string, opts?: any):
47
55
  matcher: string | null;
48
56
  current_hash_by_sks: string;
49
57
  current_hash_by_codex: any;
58
+ official_oracle_mode: import("./codex-hook-official-hash-oracle.js").CodexHookHashOracleMode;
59
+ official_hash_available: boolean;
60
+ official_hash_proven: boolean;
50
61
  trusted_hash: string | null;
51
62
  sks_trust_status: import("./codex-hook-trust-state.js").CodexHookTrustStatus;
52
63
  codex_trust_status: any;
@@ -63,12 +74,41 @@ export declare function codexHookOfficialParityReport(root: string, opts?: any):
63
74
  matcher: string | null;
64
75
  current_hash_by_sks: string;
65
76
  current_hash_by_codex: any;
77
+ official_oracle_mode: import("./codex-hook-official-hash-oracle.js").CodexHookHashOracleMode;
78
+ official_hash_available: boolean;
79
+ official_hash_proven: boolean;
66
80
  trusted_hash: string | null;
67
81
  sks_trust_status: import("./codex-hook-trust-state.js").CodexHookTrustStatus;
68
82
  codex_trust_status: any;
69
83
  hash_match: boolean | null;
70
84
  parity_source: string;
71
85
  }[];
86
+ trust_status_mismatches: {
87
+ key: string;
88
+ source_path: string;
89
+ source_format: any;
90
+ managed: boolean;
91
+ event: "PreToolUse" | "PermissionRequest" | "PostToolUse" | "PreCompact" | "PostCompact" | "SessionStart" | "UserPromptSubmit" | "SubagentStart" | "SubagentStop" | "Stop";
92
+ command: string;
93
+ matcher: string | null;
94
+ current_hash_by_sks: string;
95
+ current_hash_by_codex: any;
96
+ official_oracle_mode: import("./codex-hook-official-hash-oracle.js").CodexHookHashOracleMode;
97
+ official_hash_available: boolean;
98
+ official_hash_proven: boolean;
99
+ trusted_hash: string | null;
100
+ sks_trust_status: import("./codex-hook-trust-state.js").CodexHookTrustStatus;
101
+ codex_trust_status: any;
102
+ hash_match: boolean | null;
103
+ parity_source: string;
104
+ }[];
105
+ coverage: {
106
+ plugin_source: string;
107
+ requirements_toml: string;
108
+ config_toml_inline_hooks: string;
109
+ hooks_json: string;
110
+ managed_dir: string;
111
+ };
72
112
  blockers: string[];
73
113
  }>;
74
114
  export declare function writeCodexHookOfficialParityReport(root: string, opts?: any): Promise<{
@@ -78,6 +118,11 @@ export declare function writeCodexHookOfficialParityReport(root: string, opts?:
78
118
  status: string;
79
119
  created_at: string;
80
120
  root: string;
121
+ oracle_mode: import("./codex-hook-official-hash-oracle.js").CodexHookHashOracleMode;
122
+ official_hash_available: boolean;
123
+ official_hash_proven: boolean;
124
+ managed_policy_used: boolean;
125
+ unmanaged_trusted_hash_writer_enabled: boolean;
81
126
  codex: {
82
127
  available: boolean;
83
128
  version: string | null;
@@ -87,8 +132,10 @@ export declare function writeCodexHookOfficialParityReport(root: string, opts?:
87
132
  };
88
133
  policy: {
89
134
  official_hash_available: boolean;
135
+ official_hash_proven: boolean;
90
136
  managed_only_enforced: boolean;
91
137
  sks_trusted_hash_fallback_allowed: boolean;
138
+ unmanaged_trusted_hash_writer_enabled: boolean;
92
139
  trusted_hash_writer_policy: string;
93
140
  };
94
141
  counts: {
@@ -111,6 +158,7 @@ export declare function writeCodexHookOfficialParityReport(root: string, opts?:
111
158
  async_false_required: boolean;
112
159
  }[];
113
160
  };
161
+ oracle_rows: import("./codex-hook-official-hash-oracle.js").CodexHookHashOracleResult[];
114
162
  entries: {
115
163
  key: string;
116
164
  source_path: string;
@@ -121,6 +169,9 @@ export declare function writeCodexHookOfficialParityReport(root: string, opts?:
121
169
  matcher: string | null;
122
170
  current_hash_by_sks: string;
123
171
  current_hash_by_codex: any;
172
+ official_oracle_mode: import("./codex-hook-official-hash-oracle.js").CodexHookHashOracleMode;
173
+ official_hash_available: boolean;
174
+ official_hash_proven: boolean;
124
175
  trusted_hash: string | null;
125
176
  sks_trust_status: import("./codex-hook-trust-state.js").CodexHookTrustStatus;
126
177
  codex_trust_status: any;
@@ -137,12 +188,41 @@ export declare function writeCodexHookOfficialParityReport(root: string, opts?:
137
188
  matcher: string | null;
138
189
  current_hash_by_sks: string;
139
190
  current_hash_by_codex: any;
191
+ official_oracle_mode: import("./codex-hook-official-hash-oracle.js").CodexHookHashOracleMode;
192
+ official_hash_available: boolean;
193
+ official_hash_proven: boolean;
140
194
  trusted_hash: string | null;
141
195
  sks_trust_status: import("./codex-hook-trust-state.js").CodexHookTrustStatus;
142
196
  codex_trust_status: any;
143
197
  hash_match: boolean | null;
144
198
  parity_source: string;
145
199
  }[];
200
+ trust_status_mismatches: {
201
+ key: string;
202
+ source_path: string;
203
+ source_format: any;
204
+ managed: boolean;
205
+ event: "PreToolUse" | "PermissionRequest" | "PostToolUse" | "PreCompact" | "PostCompact" | "SessionStart" | "UserPromptSubmit" | "SubagentStart" | "SubagentStop" | "Stop";
206
+ command: string;
207
+ matcher: string | null;
208
+ current_hash_by_sks: string;
209
+ current_hash_by_codex: any;
210
+ official_oracle_mode: import("./codex-hook-official-hash-oracle.js").CodexHookHashOracleMode;
211
+ official_hash_available: boolean;
212
+ official_hash_proven: boolean;
213
+ trusted_hash: string | null;
214
+ sks_trust_status: import("./codex-hook-trust-state.js").CodexHookTrustStatus;
215
+ codex_trust_status: any;
216
+ hash_match: boolean | null;
217
+ parity_source: string;
218
+ }[];
219
+ coverage: {
220
+ plugin_source: string;
221
+ requirements_toml: string;
222
+ config_toml_inline_hooks: string;
223
+ hooks_json: string;
224
+ managed_dir: string;
225
+ };
146
226
  blockers: string[];
147
227
  }>;
148
228
  //# sourceMappingURL=codex-hook-official-parity.d.ts.map
@@ -2,12 +2,23 @@ import path from 'node:path';
2
2
  import { ensureDir, nowIso, runProcess, which, writeJsonAtomic } from '../fsx.js';
3
3
  import { readCodexHookActualState } from './codex-hook-actual-discovery.js';
4
4
  import { CODEX_HOOK_EVENTS } from '../codex-compat/codex-hook-events.js';
5
+ import { resolveCodexHookHashOracle } from './codex-hook-official-hash-oracle.js';
5
6
  export async function codexHookOfficialParityReport(root, opts = {}) {
6
7
  const actual = await readCodexHookActualState(root);
7
8
  const codex = await tryReadCodexHookList(opts);
8
- const entries = actual.entries.map((entry) => {
9
+ const oracleRows = await Promise.all(actual.entries.map((entry) => resolveCodexHookHashOracle(root, {
10
+ event: entry.event,
11
+ matcher: entry.matcher,
12
+ command: entry.command,
13
+ timeout: entry.timeout,
14
+ async: entry.async,
15
+ statusMessage: entry.statusMessage || null,
16
+ commandWindows: entry.commandWindows || null
17
+ }, opts)));
18
+ const entries = actual.entries.map((entry, index) => {
9
19
  const codexEntry = findCodexEntry(codex.entries, entry);
10
- const codexHash = codexEntry?.current_hash || codexEntry?.hash || null;
20
+ const oracle = oracleRows[index];
21
+ const codexHash = codexEntry?.current_hash || codexEntry?.hash || oracle?.official_hash || null;
11
22
  return {
12
23
  key: entry.key,
13
24
  source_path: entry.source_path,
@@ -18,6 +29,9 @@ export async function codexHookOfficialParityReport(root, opts = {}) {
18
29
  matcher: entry.matcher,
19
30
  current_hash_by_sks: entry.current_hash,
20
31
  current_hash_by_codex: codexHash,
32
+ official_oracle_mode: oracle?.mode || 'unavailable',
33
+ official_hash_available: oracle?.official_hash_available === true || Boolean(codexHash),
34
+ official_hash_proven: oracle?.official_hash_proven === true || (Boolean(codexHash) && codexHash === entry.current_hash),
21
35
  trusted_hash: entry.trusted_hash,
22
36
  sks_trust_status: entry.trust_status,
23
37
  codex_trust_status: codexEntry?.trust_status || (codex.available ? 'unknown' : 'integration_optional'),
@@ -27,14 +41,21 @@ export async function codexHookOfficialParityReport(root, opts = {}) {
27
41
  });
28
42
  const mismatches = entries.filter((entry) => entry.hash_match === false);
29
43
  const fixtureParity = buildVendoredFixtureParity();
30
- const officialHashAvailable = codex.available && entries.some((entry) => entry.current_hash_by_codex);
44
+ const officialHashAvailable = entries.some((entry) => entry.official_hash_available);
45
+ const officialHashProven = entries.length > 0 && entries.every((entry) => entry.official_hash_proven || entry.managed);
46
+ const oracleMode = oracleRows.find((row) => row.mode !== 'unavailable')?.mode || (codex.available ? 'cli' : 'unavailable');
31
47
  const managedOnlyEnforced = actual.managed_dirs.length > 0 || entries.every((entry) => entry.managed === true);
32
48
  return {
33
- schema: 'sks.codex-hook-official-parity.v1',
49
+ schema: 'sks.codex-hook-official-parity.v2',
34
50
  ok: mismatches.length === 0 && fixtureParity.ok && (officialHashAvailable || managedOnlyEnforced || entries.length === 0),
35
51
  status: officialHashAvailable ? 'official_hash_parity_checked' : 'integration_optional_managed_policy',
36
52
  created_at: nowIso(),
37
53
  root,
54
+ oracle_mode: oracleMode,
55
+ official_hash_available: officialHashAvailable,
56
+ official_hash_proven: officialHashProven,
57
+ managed_policy_used: !officialHashAvailable,
58
+ unmanaged_trusted_hash_writer_enabled: officialHashAvailable,
38
59
  codex: {
39
60
  available: codex.available,
40
61
  version: codex.version,
@@ -44,8 +65,10 @@ export async function codexHookOfficialParityReport(root, opts = {}) {
44
65
  },
45
66
  policy: {
46
67
  official_hash_available: officialHashAvailable,
68
+ official_hash_proven: officialHashProven,
47
69
  managed_only_enforced: managedOnlyEnforced,
48
70
  sks_trusted_hash_fallback_allowed: false,
71
+ unmanaged_trusted_hash_writer_enabled: officialHashAvailable,
49
72
  trusted_hash_writer_policy: 'managed_install_required_when_official_hash_is_unavailable'
50
73
  },
51
74
  counts: {
@@ -55,8 +78,17 @@ export async function codexHookOfficialParityReport(root, opts = {}) {
55
78
  codex_hashes_seen: entries.filter((entry) => entry.current_hash_by_codex).length
56
79
  },
57
80
  fixture_parity: fixtureParity,
81
+ oracle_rows: oracleRows,
58
82
  entries,
59
83
  mismatches,
84
+ trust_status_mismatches: entries.filter((entry) => entry.codex_trust_status !== 'integration_optional' && entry.codex_trust_status !== 'unknown' && entry.codex_trust_status !== entry.sks_trust_status),
85
+ coverage: {
86
+ plugin_source: actual.warnings.some((warning) => String(warning).includes('plugin_source_not_available')) ? 'warning' : 'not_detected_or_not_required',
87
+ requirements_toml: actual.sources.some((source) => source.source_format === 'requirements_toml' && source.exists) ? 'covered' : 'absent',
88
+ config_toml_inline_hooks: actual.sources.some((source) => source.source_format === 'config_toml' && source.inline_hooks) ? 'covered' : 'absent',
89
+ hooks_json: actual.sources.some((source) => source.source_format === 'hooks_json' && source.exists) ? 'covered' : 'absent',
90
+ managed_dir: actual.managed_dirs.length ? 'covered' : 'absent'
91
+ },
60
92
  blockers: [
61
93
  ...(mismatches.length ? ['codex_hook_hash_mismatch'] : []),
62
94
  ...actual.blockers
@@ -65,7 +97,7 @@ export async function codexHookOfficialParityReport(root, opts = {}) {
65
97
  }
66
98
  export async function writeCodexHookOfficialParityReport(root, opts = {}) {
67
99
  const report = await codexHookOfficialParityReport(root, opts);
68
- const out = opts.outputPath || path.join(root, '.sneakoscope', 'reports', 'codex-hook-parity-1.14.0.json');
100
+ const out = opts.outputPath || path.join(root, '.sneakoscope', 'reports', 'codex-hook-parity-1.14.1.json');
69
101
  await ensureDir(path.dirname(out));
70
102
  await writeJsonAtomic(out, report);
71
103
  return { ...report, path: out };