sneakoscope 4.6.1 → 4.6.3

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 (34) hide show
  1. package/README.md +23 -167
  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/cli/command-registry.js +2 -1
  7. package/dist/cli/{ultra-search-command.js → insane-search-command.js} +17 -13
  8. package/dist/cli/xai-command.js +6 -6
  9. package/dist/commands/doctor.js +3 -1
  10. package/dist/core/commands/run-command.js +9 -5
  11. package/dist/core/db-safety.js +2 -2
  12. package/dist/core/doctor/global-sks-install-cleanup.js +73 -9
  13. package/dist/core/feature-fixtures.js +3 -0
  14. package/dist/core/fsx.js +1 -1
  15. package/dist/core/init.js +2 -1
  16. package/dist/core/mad-db/mad-db-coordinator.js +17 -8
  17. package/dist/core/mad-db/mad-db-executor.js +59 -7
  18. package/dist/core/mad-db/mad-db-policy-resolver.js +38 -1
  19. package/dist/core/mad-db/mad-db-policy.js +4 -3
  20. package/dist/core/mad-db/mad-db-runtime-profile.js +11 -2
  21. package/dist/core/mad-db/mad-db-target.js +31 -0
  22. package/dist/core/release-parallel-full-coverage.js +1 -1
  23. package/dist/core/routes.js +15 -14
  24. package/dist/core/update-check.js +11 -1
  25. package/dist/core/version.js +1 -1
  26. package/dist/scripts/mad-db-direct-apply-migration-hook-check.js +24 -1
  27. package/dist/scripts/mad-db-skill-policy-snapshot-check.js +4 -0
  28. package/dist/scripts/mad-db-supabase-transport-diagnostics-check.js +47 -0
  29. package/dist/scripts/release-metadata-1-19-check.js +1 -1
  30. package/dist/scripts/release-parallel-check.js +2 -2
  31. package/dist/scripts/release-parallel-full-coverage-check.js +1 -1
  32. package/dist/scripts/release-readiness-report.js +1 -1
  33. package/dist/scripts/ultra-search-provider-interface-check.js +1 -1
  34. package/package.json +5 -3
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs/promises';
3
+ import os from 'node:os';
4
+ import path from 'node:path';
5
+ import { createMission } from '../core/mission.js';
6
+ import { classifyMadDbError, madDbRetryGuidance, summarizeMadDbError } from '../core/mad-db/mad-db-executor.js';
7
+ import { createMadDbRuntimeProfile, madDbMcpUrl } from '../core/mad-db/mad-db-runtime-profile.js';
8
+ import { resolveMadDbTarget } from '../core/mad-db/mad-db-target.js';
9
+ import { assertGate, emitGate } from './sks-1-18-gate-lib.js';
10
+ const timeoutSummary = summarizeMadDbError(new Error('failed to connect to postgres: dial tcp 1.2.3.4:6543: i/o timeout token=secret-token'));
11
+ assertGate(classifyMadDbError(timeoutSummary) === 'supabase_sql_plane_timeout', 'timeout errors must be classified as SQL-plane timeout', { timeoutSummary });
12
+ assertGate(!timeoutSummary.includes('secret-token'), 'error summary must redact token query values', { timeoutSummary });
13
+ assertGate(madDbRetryGuidance('supabase_sql_plane_timeout').includes('--db-url'), 'timeout guidance should mention explicit db-url fallback evidence from Supabase CLI docs');
14
+ const readOnlyKind = classifyMadDbError('MCP server denied apply_migration because this connection is read only');
15
+ assertGate(readOnlyKind === 'supabase_mcp_read_only_transport', 'read-only transport errors must be separated from SQL-plane connectivity', { readOnlyKind });
16
+ const root = await fs.mkdtemp(path.join(os.tmpdir(), 'sks-mad-db-transport-'));
17
+ await fs.mkdir(path.join(root, '.codex'), { recursive: true });
18
+ await fs.writeFile(path.join(root, '.codex', 'config.toml'), '[mcp_servers.supabase]\nurl = "https://mcp.supabase.com/mcp?project_ref=localref&read_only=true&features=database,docs"\n', 'utf8');
19
+ const target = await resolveMadDbTarget(root, {
20
+ args: ['--project-ref', 'explicitref', '--mcp-url', 'https://mcp.supabase.com/mcp?features=docs']
21
+ });
22
+ assertGate(target.blockers.length === 0, 'explicit trusted MCP URL without read_only should be accepted', target);
23
+ assertGate(target.mcp_url?.includes('project_ref=explicitref'), 'explicit MCP URL should inherit project_ref when omitted', target);
24
+ assertGate(target.mcp_url?.includes('features=database'), 'explicit MCP URL should force database feature for MadDB SQL-plane execution', target);
25
+ assertGate(!target.mcp_url?.includes('read_only=true'), 'active MadDB explicit MCP URL must not remain read-only', target);
26
+ const conflict = await resolveMadDbTarget(root, {
27
+ args: ['--project-ref', 'explicitref', '--mcp-url', 'https://mcp.supabase.com/mcp?read_only=true']
28
+ });
29
+ assertGate(conflict.blockers.includes('mad_db_mcp_url_read_only_conflict'), 'read-only explicit MCP URL must be rejected in active MadDB', conflict);
30
+ const mission = await createMission(root, { mode: 'mad-db', prompt: 'transport diagnostics fixture' });
31
+ const profile = await createMadDbRuntimeProfile({
32
+ root,
33
+ missionId: mission.id,
34
+ cycleId: 'cycle-fixture',
35
+ projectRef: 'explicitref',
36
+ runtimeSessionId: 'session-fixture',
37
+ mcpUrl: target.mcp_url
38
+ });
39
+ assertGate(profile.server_url_source === 'explicit_mcp_url', 'runtime profile must record explicit MCP URL source', profile);
40
+ assertGate(profile.server_url === target.mcp_url, 'runtime profile must use normalized explicit MCP URL', { profile, target });
41
+ assertGate(madDbMcpUrl('abc123') === 'https://mcp.supabase.com/mcp?project_ref=abc123&features=database', 'generated MCP URL should stay project scoped and database-feature scoped');
42
+ emitGate('mad-db:supabase-transport-diagnostics', {
43
+ timeout_kind: classifyMadDbError(timeoutSummary),
44
+ read_only_kind: readOnlyKind,
45
+ mcp_url_source: profile.server_url_source
46
+ });
47
+ //# sourceMappingURL=mad-db-supabase-transport-diagnostics-check.js.map
@@ -97,7 +97,7 @@ const requiredScripts = [
97
97
  'agent:janitor',
98
98
  'agent:multi-project-isolation',
99
99
  'verification:parallel-engine',
100
- 'ultra-search:provider-interface',
100
+ 'insane-search:provider-interface',
101
101
  'source-intelligence:policy',
102
102
  'source-intelligence:all-modes',
103
103
  'codex-web:adapter',
@@ -34,9 +34,9 @@ const tasks = [
34
34
  task('agent:janitor', 'npm run agent:janitor --silent', { dependencies: ['build'] }),
35
35
  task('agent:multi-project-isolation', 'npm run agent:multi-project-isolation --silent', { dependencies: ['build'] }),
36
36
  task('verification:parallel-engine', 'npm run verification:parallel-engine --silent', { dependencies: ['build'] }),
37
- task('ultra-search:provider-interface', 'npm run ultra-search:provider-interface --silent', { dependencies: ['build'] }),
37
+ task('insane-search:provider-interface', 'npm run insane-search:provider-interface --silent', { dependencies: ['build'] }),
38
38
  task('source-intelligence:policy', 'npm run source-intelligence:policy --silent', { dependencies: ['build'] }),
39
- task('source-intelligence:all-modes', 'npm run source-intelligence:all-modes --silent', { dependencies: ['build', 'source-intelligence:policy', 'ultra-search:provider-interface', 'codex-web:adapter'] }),
39
+ task('source-intelligence:all-modes', 'npm run source-intelligence:all-modes --silent', { dependencies: ['build', 'source-intelligence:policy', 'insane-search:provider-interface', 'codex-web:adapter'] }),
40
40
  task('codex-web:adapter', 'npm run codex-web:adapter --silent', { dependencies: ['build'] }),
41
41
  task('seo:cli-blackbox', 'npm run seo:cli-blackbox --silent', { dependencies: ['build'] }),
42
42
  task('seo:audit-fixture', 'npm run seo:audit-fixture --silent', { dependencies: ['build'] }),
@@ -6,7 +6,7 @@ import { assertGate, emitGate, importDist, packageScripts, root } from './sks-1-
6
6
  const mod = await importDist('core/release-parallel-full-coverage.js');
7
7
  const pkgScripts = packageScripts();
8
8
  const parallelSource = fs.readFileSync(path.join(root, 'src/scripts/release-parallel-check.ts'), 'utf8');
9
- const current = [...new Set(Object.keys(pkgScripts).filter((name) => parallelSource.includes(name)).concat(Object.keys(pkgScripts).filter((name) => /^ultra-search|^source-intelligence|^codex-web|^goal-mode|^agent:main-no-scout|^agent:worker-scout-limited|^agent:background-terminals|^agent:zellij-runtime|^agent:visual-consistency|^release:parallel-full-coverage|^priority:full-closure/.test(name))))];
9
+ const current = [...new Set(Object.keys(pkgScripts).filter((name) => parallelSource.includes(name)).concat(Object.keys(pkgScripts).filter((name) => /^insane-search|^ultra-search|^source-intelligence|^codex-web|^goal-mode|^agent:main-no-scout|^agent:worker-scout-limited|^agent:background-terminals|^agent:zellij-runtime|^agent:visual-consistency|^release:parallel-full-coverage|^priority:full-closure/.test(name))))];
10
10
  const report = mod.evaluateReleaseParallelFullCoverage(current);
11
11
  assertGate(report.ok === true, 'release parallel DAG must preserve previous gates and include 1.18 gates', report);
12
12
  emitGate('release:parallel-full-coverage', { previous_gate_count: report.previous_gate_count, current_gate_count: report.current_gate_count });
@@ -103,7 +103,7 @@ const checks = {
103
103
  computer_use_live_evidence: scriptContains('release:check', 'computer-use:live-evidence'),
104
104
  docs_truthfulness: scriptContains('release:check', 'docs:truthfulness'),
105
105
  release_readiness: scriptContains('release:check:parallel', 'release:readiness'),
106
- ultra_search_provider_interface: scriptContains('release:check:parallel', 'ultra-search:provider-interface'),
106
+ insane_search_provider_interface: scriptContains('release:check:parallel', 'insane-search:provider-interface'),
107
107
  source_intelligence_policy: scriptContains('release:check:parallel', 'source-intelligence:policy'),
108
108
  source_intelligence_all_modes: scriptContains('release:check:parallel', 'source-intelligence:all-modes'),
109
109
  codex_web_adapter: scriptContains('release:check:parallel', 'codex-web:adapter'),
@@ -18,7 +18,7 @@ assertGate(result.proof.provider_independent === true, 'UltraSearch proof must b
18
18
  assertGate(result.proof.xai_runtime_dependency === false, 'UltraSearch must not require xAI runtime', result.proof);
19
19
  assertGate(result.sources.some((source) => source.acquisition_verdict === 'verified_content'), 'UltraSearch must normalize verified source evidence', result.sources);
20
20
  assertGate(result.convergence.schema === 'sks.ultra-search-convergence.v1', 'UltraSearch convergence artifact must be typed', result.convergence);
21
- emitGate('ultra-search:provider-interface', {
21
+ emitGate('insane-search:provider-interface', {
22
22
  mode: result.mode,
23
23
  sources: result.sources.length,
24
24
  verified: result.proof.verified_source_count,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sneakoscope",
3
3
  "displayName": "ㅅㅋㅅ",
4
- "version": "4.6.1",
4
+ "version": "4.6.3",
5
5
  "description": "Sneakoscope Codex: fast proof-first Codex trust layer with image-based Voxel TriWiki.",
6
6
  "type": "module",
7
7
  "homepage": "https://github.com/mandarange/Sneakoscope-Codex#readme",
@@ -496,7 +496,8 @@
496
496
  "mcp:readonly-runtime-scheduler": "node ./dist/scripts/mcp-readonly-runtime-scheduler-check.js",
497
497
  "codex:0.134-runner-truth": "node ./dist/scripts/codex-0-134-runner-truth-check.js",
498
498
  "source-intelligence:policy": "node ./dist/scripts/source-intelligence-policy-check.js",
499
- "ultra-search:provider-interface": "node ./dist/scripts/ultra-search-provider-interface-check.js",
499
+ "insane-search:provider-interface": "node ./dist/scripts/ultra-search-provider-interface-check.js",
500
+ "ultra-search:provider-interface": "npm run insane-search:provider-interface --silent",
500
501
  "context7:evidence-dedupe": "node ./dist/scripts/context7-evidence-dedupe-check.js",
501
502
  "source-intelligence:codex-history-search": "node ./dist/scripts/codex-history-search-check.js",
502
503
  "source-intelligence:all-modes": "node ./dist/scripts/source-intelligence-all-modes-check.js",
@@ -744,6 +745,7 @@
744
745
  "mad-db:runtime-profile": "node ./dist/scripts/mad-db-runtime-profile-lifecycle-check.js",
745
746
  "mad-db:skill-policy": "node ./dist/scripts/mad-db-skill-policy-snapshot-check.js",
746
747
  "mad-db:policy-v2": "node ./dist/scripts/mad-db-policy-v2-check.js",
748
+ "mad-db:supabase-transport-diagnostics": "node ./dist/scripts/mad-db-supabase-transport-diagnostics-check.js",
747
749
  "release:speed-summary": "node ./dist/scripts/release-speed-summary-check.js",
748
750
  "release:speed-summary:check": "node ./dist/scripts/release-speed-summary-check.js",
749
751
  "naruto:ssot-routing": "node ./dist/scripts/naruto-ssot-routing-check.js",
@@ -777,7 +779,7 @@
777
779
  "mad-db:lifecycle-hook-decision": "node ./dist/scripts/mad-db-lifecycle-hook-decision-check.js",
778
780
  "mad-db:mcp-result-lifecycle": "node ./dist/scripts/mad-db-mcp-result-lifecycle-check.js",
779
781
  "mad-db:operation-lifecycle-blackbox": "node ./dist/scripts/mad-db-operation-lifecycle-blackbox.js",
780
- "mad-db:unit": "npm run mad-db:capability && npm run mad-db:command && npm run mad-db:mad-command && npm run mad-db:priority-resolver && npm run mad-db:ledger && npm run mad-db:one-cycle-consumption && npm run mad-db:safety-conflict-matrix && npm run mad-db:one-cycle-bounded && npm run mad-db:operation-lifecycle-ledger && npm run mad-db:route-identity && npm run mad-db:hook-idempotency && npm run mad-db:direct-apply-migration-hook && npm run mad-db:parallel-lifecycle && npm run mad-db:runtime-profile && npm run mad-db:skill-policy && npm run mad-db:policy-v2 && npm run mad-db:lifecycle-hook-decision && npm run mad-db:mcp-result-lifecycle && npm run mad-db:operation-lifecycle-blackbox",
782
+ "mad-db:unit": "npm run mad-db:capability && npm run mad-db:command && npm run mad-db:mad-command && npm run mad-db:priority-resolver && npm run mad-db:ledger && npm run mad-db:one-cycle-consumption && npm run mad-db:safety-conflict-matrix && npm run mad-db:one-cycle-bounded && npm run mad-db:operation-lifecycle-ledger && npm run mad-db:route-identity && npm run mad-db:hook-idempotency && npm run mad-db:direct-apply-migration-hook && npm run mad-db:parallel-lifecycle && npm run mad-db:runtime-profile && npm run mad-db:skill-policy && npm run mad-db:policy-v2 && npm run mad-db:supabase-transport-diagnostics && npm run mad-db:lifecycle-hook-decision && npm run mad-db:mcp-result-lifecycle && npm run mad-db:operation-lifecycle-blackbox",
781
783
  "mad-db:real-e2e": "node ./dist/scripts/mad-db-real-supabase-e2e.js --require-real",
782
784
  "mad-db:all": "npm run build && npm run mad-db:unit",
783
785
  "mad-db:release": "npm run mad-db:all && npm run mad-db:real-e2e",