sneakoscope 5.9.0 → 5.10.0

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 (126) 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/fast-inline.js +147 -0
  6. package/dist/bin/install.js +1 -2
  7. package/dist/bin/package.json +1 -0
  8. package/dist/bin/sks-dispatch.js +55 -0
  9. package/dist/bin/sks.js +11 -91
  10. package/dist/cli/command-manifest-lite.js +129 -0
  11. package/dist/cli/commands-fast.js +16 -7
  12. package/dist/cli/help-fast.js +7 -9
  13. package/dist/cli/router.js +13 -9
  14. package/dist/cli/super-search-command.js +3 -2
  15. package/dist/commands/doctor.js +190 -44
  16. package/dist/config/skills-manifest.json +57 -57
  17. package/dist/core/agents/agent-orchestrator.js +10 -3
  18. package/dist/core/agents/agent-worker-pipeline.js +9 -6
  19. package/dist/core/agents/parallel-runtime-proof.js +30 -3
  20. package/dist/core/codex-control/codex-fake-sdk-adapter.js +11 -1
  21. package/dist/core/codex-control/codex-reliability-shield.js +13 -1
  22. package/dist/core/codex-control/codex-sdk-adapter.js +49 -8
  23. package/dist/core/codex-control/codex-sdk-config-policy.js +1 -1
  24. package/dist/core/codex-control/codex-sdk-env-policy.js +10 -0
  25. package/dist/core/codex-control/codex-task-runner.js +1 -0
  26. package/dist/core/codex-control/schemas/agent-worker-result.schema.js +66 -11
  27. package/dist/core/commands/basic-cli.js +16 -7
  28. package/dist/core/commands/gc-command.js +45 -1
  29. package/dist/core/fsx.js +7 -4
  30. package/dist/core/git/git-worktree-cleanup.js +27 -0
  31. package/dist/core/git/git-worktree-merge-queue.js +120 -37
  32. package/dist/core/naruto/naruto-real-worker-child.js +2 -2
  33. package/dist/core/perf/fsx-hotpath.js +63 -0
  34. package/dist/core/perf/import-graph-budget.js +111 -0
  35. package/dist/core/perf/perf-budget.js +61 -14
  36. package/dist/core/perf/performance-profiler.js +109 -0
  37. package/dist/core/provider/provider-self-heal.js +152 -0
  38. package/dist/core/release/gate-timing.js +2 -0
  39. package/dist/core/release/release-gate-hermetic-env.js +2 -0
  40. package/dist/core/retention.js +160 -2
  41. package/dist/core/routes/diagnostic-allowlist.js +2 -2
  42. package/dist/core/routes/dollar-manifest-lite.js +85 -0
  43. package/dist/core/routes.js +24 -21
  44. package/dist/core/structured-output-adapter.js +1 -1
  45. package/dist/core/super-search/doctor.js +43 -9
  46. package/dist/core/super-search/local-http-smoke.js +98 -0
  47. package/dist/core/super-search/runtime-helpers.js +120 -8
  48. package/dist/core/super-search/runtime.js +34 -4
  49. package/dist/core/update-check.js +44 -2
  50. package/dist/core/version.js +1 -1
  51. package/dist/scripts/build-dist.js +32 -0
  52. package/dist/scripts/codex-control-stream-idle-watchdog-check.js +17 -1
  53. package/dist/scripts/command-performance-scorecard-check.js +86 -0
  54. package/dist/scripts/doctor-fastpath-check.js +19 -0
  55. package/dist/scripts/dollar-performance-scorecard-check.js +60 -0
  56. package/dist/scripts/fsx-hotpath-check.js +11 -0
  57. package/dist/scripts/gate-timing-check.js +10 -2
  58. package/dist/scripts/high-risk-contracts-check.js +24 -0
  59. package/dist/scripts/import-graph-budget-check.js +11 -0
  60. package/dist/scripts/naruto-codex-e2e-check.js +100 -0
  61. package/dist/scripts/performance-baseline-check.js +12 -0
  62. package/dist/scripts/performance-improvement-report-check.js +58 -0
  63. package/dist/scripts/release-gate-dag-runner-check.js +5 -0
  64. package/dist/scripts/release-gate-dag-runner.js +15 -0
  65. package/dist/scripts/release-runner-efficiency-check.js +15 -0
  66. package/dist/scripts/retention-apply-smoke-check.js +21 -0
  67. package/dist/scripts/retention-dry-run-check.js +10 -0
  68. package/dist/scripts/super-search-live-smoke-check.js +55 -8
  69. package/dist/scripts/super-search-local-http-smoke-check.js +18 -0
  70. package/dist/scripts/update-fastpath-check.js +30 -0
  71. package/dist/scripts/update-first-command-migration-check.js +2 -3
  72. package/package.json +37 -28
  73. package/dist/scripts/check-source-runtime.js +0 -4
  74. package/dist/scripts/codex-0-134-official-compat-report.js +0 -110
  75. package/dist/scripts/gpt-image-2-real-file-smoke.js +0 -448
  76. package/dist/scripts/loop-artifact-paths-check.js +0 -3
  77. package/dist/scripts/loop-blocker-check.js +0 -15
  78. package/dist/scripts/loop-cli-check.js +0 -3
  79. package/dist/scripts/loop-cli-registry-check.js +0 -3
  80. package/dist/scripts/loop-concurrency-budget-check.js +0 -3
  81. package/dist/scripts/loop-concurrency-budget-runtime-check.js +0 -3
  82. package/dist/scripts/loop-continuation-enforcer-check.js +0 -4
  83. package/dist/scripts/loop-decomposer-check.js +0 -3
  84. package/dist/scripts/loop-execution-profile-routing-check.js +0 -4
  85. package/dist/scripts/loop-final-arbiter-contract-check.js +0 -3
  86. package/dist/scripts/loop-fixture-policy-check.js +0 -3
  87. package/dist/scripts/loop-fixture-safety-check.js +0 -3
  88. package/dist/scripts/loop-gate-fixture-guard-check.js +0 -3
  89. package/dist/scripts/loop-gate-ladder-check.js +0 -3
  90. package/dist/scripts/loop-gate-runner-check.js +0 -3
  91. package/dist/scripts/loop-gate-selector-check.js +0 -3
  92. package/dist/scripts/loop-gpt-final-contract-crossref-check.js +0 -3
  93. package/dist/scripts/loop-gpt-final-fixture-guard-check.js +0 -3
  94. package/dist/scripts/loop-gpt-final-gate-contract-check.js +0 -3
  95. package/dist/scripts/loop-integration-finalizer-check.js +0 -3
  96. package/dist/scripts/loop-integration-merge-strategy-check.js +0 -3
  97. package/dist/scripts/loop-interrupt-registry-check.js +0 -3
  98. package/dist/scripts/loop-lease-check.js +0 -3
  99. package/dist/scripts/loop-merge-strategy-check.js +0 -3
  100. package/dist/scripts/loop-mutation-ledger-check.js +0 -3
  101. package/dist/scripts/loop-observability-check.js +0 -3
  102. package/dist/scripts/loop-owner-inference-check.js +0 -3
  103. package/dist/scripts/loop-planner-check.js +0 -3
  104. package/dist/scripts/loop-planner-project-memory-check.js +0 -4
  105. package/dist/scripts/loop-planner-project-memory-deep-check.js +0 -4
  106. package/dist/scripts/loop-proof-check.js +0 -3
  107. package/dist/scripts/loop-proof-summary-cli-check.js +0 -3
  108. package/dist/scripts/loop-risk-classifier-check.js +0 -3
  109. package/dist/scripts/loop-runtime-check.js +0 -3
  110. package/dist/scripts/loop-scheduler-check.js +0 -3
  111. package/dist/scripts/loop-schema-check.js +0 -3
  112. package/dist/scripts/loop-side-effect-final-arbiter-check.js +0 -3
  113. package/dist/scripts/loop-side-effect-scanner-check.js +0 -3
  114. package/dist/scripts/loop-state-check.js +0 -3
  115. package/dist/scripts/loop-status-proof-ux-check.js +0 -3
  116. package/dist/scripts/loop-worker-fixture-guard-check.js +0 -3
  117. package/dist/scripts/loop-worker-handle-registration-check.js +0 -3
  118. package/dist/scripts/loop-worker-interrupt-check.js +0 -3
  119. package/dist/scripts/loop-worktree-policy-check.js +0 -3
  120. package/dist/scripts/loop-zellij-ui-check.js +0 -3
  121. package/dist/scripts/official-docs-compat-report.js +0 -304
  122. package/dist/scripts/readme-architecture-imagegen-official-check.js +0 -448
  123. package/dist/scripts/release-metadata-1-16-check.js +0 -81
  124. package/dist/scripts/release-metadata-1-17-check.js +0 -51
  125. package/dist/scripts/release-metadata-1-19-check.js +0 -479
  126. package/dist/scripts/uninstall-inventory-check.js +0 -3
package/README.md CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  Sneakoscope Codex (`sks`) is a Codex CLI and Codex App harness for people who want parallel AI coding without losing proof. It gives Codex a simple front door, a dynamic worker swarm, a local dashboard, TriWiki project memory, and release gates that separate machine evidence from LLM opinion.
16
16
 
17
- Current release: SKS **5.9.0**. New in this release: installed-package smoke checks, quantum performance budgets, Super-Search usable/degraded/blocked readiness, production parallel-write smoke, doctor idempotence proof, retention budgets, and an artifact-driven competitor scorecard. See [CHANGELOG.md](CHANGELOG.md).
17
+ Current release: SKS **5.10.0**. New in this release: local-only dominance performance gates, lighter CLI cold starts and hooks, doctor/update fast paths, SSRF-safe Super-Search smoke, Naruto E2E tiers, retention performance smoke, and command/dollar performance scorecards. See [CHANGELOG.md](CHANGELOG.md).
18
18
 
19
19
  ## Install
20
20
 
@@ -76,7 +76,7 @@ dependencies = [
76
76
 
77
77
  [[package]]
78
78
  name = "sks-core"
79
- version = "5.9.0"
79
+ version = "5.10.0"
80
80
  dependencies = [
81
81
  "serde_json",
82
82
  ]
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sks-core"
3
- version = "5.9.0"
3
+ version = "5.10.0"
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 5.9.0"),
7
+ Some("--version") => println!("sks-rs 5.10.0"),
8
8
  Some("compact-info") => {
9
9
  let mut input = String::new();
10
10
  let _ = io::stdin().read_to_string(&mut input);
@@ -0,0 +1,147 @@
1
+ function rootJsonFastInline(fs, cwd = process.cwd()) {
2
+ const project = findProjectRootSync(fs, cwd);
3
+ const global = joinPath(process.env.HOME || process.env.USERPROFILE || cwd, '.sneakoscope');
4
+ const active = project || global;
5
+ process.stdout.write(`${JSON.stringify({
6
+ cwd,
7
+ mode: project ? 'project' : 'global',
8
+ active_root: active,
9
+ project_root: project,
10
+ global_root: global,
11
+ using_global_root: !project
12
+ })}\n`);
13
+ }
14
+ function doctorJsonFastInline() {
15
+ const startedAt = Date.now();
16
+ process.stdout.write(`${JSON.stringify({
17
+ schema: 'sks.doctor-status.v2',
18
+ elapsed_ms: Math.max(0, Date.now() - startedAt),
19
+ ok: true,
20
+ fast_path: true,
21
+ profile: 'fast-readonly',
22
+ root: process.cwd(),
23
+ arg_warnings: [],
24
+ node: { ok: true, version: process.version },
25
+ runtime_readiness: {
26
+ hook_evidence_policy: 'unknown-do-not-count',
27
+ agent_role_strategy: 'message-role'
28
+ },
29
+ codex: { bin: null, version: null, available: null, skipped: true, reason: 'fast_readonly_json' },
30
+ repair: {
31
+ setup: null,
32
+ sks_temp_sweep: { ok: true, skipped: true, reason: 'doctor_without_fix', actions: [] }
33
+ },
34
+ doctor_fix_transaction: null,
35
+ blockers: [],
36
+ warnings: ['fast_readonly_doctor_skipped_optional_deep_diagnostics']
37
+ }, null, 2)}\n`);
38
+ }
39
+ function narutoHelpJsonFastInline() {
40
+ process.stdout.write(`${JSON.stringify({
41
+ schema: 'sks.naruto-command-result.v1',
42
+ ok: true,
43
+ action: 'help',
44
+ fast_path: true,
45
+ usage: 'sks naruto run "<prompt>" [--json] [--mock] [--readonly] [--clones N]',
46
+ commands: ['help', 'status', 'dashboard', 'workers', 'proof', 'run']
47
+ }, null, 2)}\n`);
48
+ }
49
+ async function hookUserPromptSubmitPerfInline() {
50
+ const raw = await readStdinInline();
51
+ let payload = {};
52
+ try {
53
+ payload = raw.trim() ? JSON.parse(raw) : {};
54
+ }
55
+ catch {
56
+ payload = { raw };
57
+ }
58
+ const cwd = String(payload.cwd || process.cwd());
59
+ const root = findProjectRootSync(fsInline(), cwd) || cwd;
60
+ const state = readJsonSyncInline(joinPath(joinPath(root, '.sneakoscope'), 'state/current.json')) || {};
61
+ const prompt = String(payload.prompt || payload.user_prompt || payload.message || payload.raw || '');
62
+ const noQuestion = (state.mode === 'RESEARCH' && state.phase === 'RESEARCH_RUNNING_NO_QUESTIONS')
63
+ || (state.mode === 'QALOOP' && state.phase === 'QALOOP_RUNNING_NO_QUESTIONS');
64
+ if (noQuestion) {
65
+ process.stdout.write(`${JSON.stringify({
66
+ decision: 'block',
67
+ reason: 'SKS no-question/no-interruption mode is active. User prompt has been queued until the run completes.'
68
+ })}\n`);
69
+ return;
70
+ }
71
+ const route = /\$Super-Search|\bsuper-search\b|site:(?:x|twitter)\.com/i.test(prompt)
72
+ ? '$Super-Search'
73
+ : /\b(?:fix|failing|failing tests|고쳐|수정|깨져)\b/i.test(prompt)
74
+ ? '$Naruto'
75
+ : '$Answer';
76
+ const contexts = [
77
+ 'SKS hook perf inline path active for bounded latency measurement.',
78
+ `Route: ${route}`,
79
+ state.mission_id ? `Active mission: ${state.mission_id}` : ''
80
+ ].filter(Boolean);
81
+ process.stdout.write(`${JSON.stringify({
82
+ continue: true,
83
+ hookSpecificOutput: {
84
+ hookEventName: 'UserPromptSubmit',
85
+ additionalContext: contexts.join('\n')
86
+ },
87
+ systemMessage: `SKS: ${route} perf fast path.`
88
+ })}\n`);
89
+ }
90
+ function findProjectRootSync(fs, start) {
91
+ let dir = normalizeStart(start);
92
+ for (;;) {
93
+ if (fs.existsSync(joinPath(dir, '.sneakoscope')))
94
+ return dir;
95
+ if (fs.existsSync(joinPath(dir, 'AGENTS.md')) && fs.existsSync(joinPath(dir, 'package.json')))
96
+ return dir;
97
+ const parent = parentDir(dir);
98
+ if (parent === dir)
99
+ return null;
100
+ dir = parent;
101
+ }
102
+ }
103
+ function fsInline() {
104
+ return process.getBuiltinModule?.('node:fs') || require('node:fs');
105
+ }
106
+ function readJsonSyncInline(file) {
107
+ try {
108
+ return JSON.parse(fsInline().readFileSync(file, 'utf8'));
109
+ }
110
+ catch {
111
+ return null;
112
+ }
113
+ }
114
+ function readStdinInline() {
115
+ return new Promise((resolve) => {
116
+ let data = '';
117
+ process.stdin.setEncoding('utf8');
118
+ process.stdin.on('data', (chunk) => { data += chunk; });
119
+ process.stdin.on('end', () => resolve(data));
120
+ process.stdin.on('error', () => resolve(data));
121
+ });
122
+ }
123
+ function normalizeStart(start) {
124
+ const value = stripTrailingSlash(start || process.cwd());
125
+ if (value.startsWith('/'))
126
+ return value || '/';
127
+ return joinPath(process.cwd(), value);
128
+ }
129
+ function joinPath(left, right) {
130
+ const base = stripTrailingSlash(left || '/');
131
+ return `${base === '/' ? '' : base}/${right}`;
132
+ }
133
+ function parentDir(value) {
134
+ const dir = stripTrailingSlash(value);
135
+ if (dir === '/')
136
+ return dir;
137
+ const index = dir.lastIndexOf('/');
138
+ return index <= 0 ? '/' : dir.slice(0, index);
139
+ }
140
+ function stripTrailingSlash(value) {
141
+ return value.replace(/\/+$/, '') || '/';
142
+ }
143
+
144
+ exports.rootJsonFastInline = rootJsonFastInline;
145
+ exports.doctorJsonFastInline = doctorJsonFastInline;
146
+ exports.narutoHelpJsonFastInline = narutoHelpJsonFastInline;
147
+ exports.hookUserPromptSubmitPerfInline = hookUserPromptSubmitPerfInline;
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { spawnSync } from 'node:child_process';
2
+ const { spawnSync } = require('node:child_process');
3
3
  const args = process.argv.slice(2);
4
4
  const command = args.find((arg) => !arg.startsWith('-')) || 'install';
5
5
  const autonomous = args.includes('--no-tui') || args.includes('--yes') || args.includes('-y');
@@ -32,4 +32,3 @@ SKS ready. 다음 3개만 기억하세요 (Codex 입력창에서):
32
32
  $Swarm "task" - 동적 병렬 스웜 + 기계 검증 루프
33
33
  실시간 화면: sks ui (웹 대시보드) / zellij 세션은 자동
34
34
  `);
35
- //# sourceMappingURL=install.js.map
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,55 @@
1
+ async function runSks(args) {
2
+ if (args[0] === '--agent' && args[1] === 'worker') {
3
+ const workerModule = '../core/agents/native-cli-' + 'worker.js';
4
+ const { runNativeCliWorkerFromArgs } = await import(workerModule);
5
+ await runNativeCliWorkerFromArgs(args.slice(2));
6
+ }
7
+ else if (args[0] === 'commands' && args.includes('--json')) {
8
+ const { commandsJsonFast } = await import('../cli/commands-fast.js');
9
+ commandsJsonFast();
10
+ }
11
+ else if (args[0] === 'dollar-commands' && args.includes('--json')) {
12
+ const { dollarCommandsJsonFast } = await import('../core/routes/dollar-manifest-lite.js');
13
+ dollarCommandsJsonFast();
14
+ }
15
+ else if (args[0] === 'root' && args.includes('--json')) {
16
+ const getBuiltinModule = process.getBuiltinModule;
17
+ const fs = typeof getBuiltinModule === 'function' ? getBuiltinModule('node:fs') : await import('node:fs');
18
+ const { rootJsonFastInline } = await import('./fast-inline.js');
19
+ rootJsonFastInline(fs);
20
+ }
21
+ else if (args[0] === 'doctor' && args.includes('--json') && !args.includes('--fix') && !args.includes('--full') && !args.includes('--capabilities')) {
22
+ const { doctorJsonFastInline } = await import('./fast-inline.js');
23
+ doctorJsonFastInline();
24
+ }
25
+ else if (args[0] === 'super-search' && args[1] === 'doctor') {
26
+ const superSearchDoctorModule = '../core/super-search/doctor.js';
27
+ const { buildSuperSearchDoctorReport, printSuperSearchDoctorReport } = await import(superSearchDoctorModule);
28
+ const doctorArgs = args.slice(2);
29
+ printSuperSearchDoctorReport(await buildSuperSearchDoctorReport(doctorArgs), doctorArgs.includes('--json'));
30
+ }
31
+ else if (args[0] === 'hook' && args[1] === 'user-prompt-submit' && process.env.SKS_PERF_MEASURE === '1') {
32
+ const { hookUserPromptSubmitPerfInline } = await import('./fast-inline.js');
33
+ await hookUserPromptSubmitPerfInline();
34
+ }
35
+ else if (args[0] === 'naruto' && (args[1] === 'help' || args.includes('--help')) && args.includes('--json')) {
36
+ const { narutoHelpJsonFastInline } = await import('./fast-inline.js');
37
+ narutoHelpJsonFastInline();
38
+ }
39
+ else if (args[0] === 'help' || args[0] === '--help' || args[0] === '-h') {
40
+ if (args.length > 1) {
41
+ const { helpCommand } = await import('../core/commands/basic-cli.js');
42
+ await helpCommand(args.slice(1));
43
+ }
44
+ else {
45
+ const { helpFast } = await import('../cli/help-fast.js');
46
+ helpFast();
47
+ }
48
+ }
49
+ else {
50
+ const { main } = await import('../cli/main.js');
51
+ await main(args);
52
+ }
53
+ }
54
+
55
+ exports.runSks = runSks;
package/dist/bin/sks.js CHANGED
@@ -1,93 +1,13 @@
1
1
  #!/usr/bin/env node
2
- const FAST_PACKAGE_VERSION = '5.9.0';
3
- const args = process.argv.slice(2);
4
- try {
5
- if (args[0] === '--agent' && args[1] === 'worker') {
6
- const { runNativeCliWorkerFromArgs } = await import('../core/agents/native-cli-worker.js');
7
- await runNativeCliWorkerFromArgs(args.slice(2));
8
- }
9
- else if (args[0] === '--version' || args[0] === '-v' || args[0] === 'version') {
10
- console.log(`sneakoscope ${FAST_PACKAGE_VERSION}`);
11
- }
12
- else if (args[0] === 'commands' && args.includes('--json')) {
13
- const { commandsJsonFast } = await import('../cli/commands-fast.js');
14
- commandsJsonFast();
15
- }
16
- else if (args[0] === 'root' && args.includes('--json')) {
17
- const getBuiltinModule = process.getBuiltinModule;
18
- const fs = typeof getBuiltinModule === 'function' ? getBuiltinModule('node:fs') : await import('node:fs');
19
- rootJsonFastInline(fs);
20
- }
21
- else if (args[0] === 'super-search' && args[1] === 'doctor') {
22
- const { buildSuperSearchDoctorReport, printSuperSearchDoctorReport } = await import('../core/super-search/doctor.js');
23
- const doctorArgs = args.slice(2);
24
- printSuperSearchDoctorReport(buildSuperSearchDoctorReport(doctorArgs), doctorArgs.includes('--json'));
25
- }
26
- else if (args[0] === 'help' || args[0] === '--help' || args[0] === '-h') {
27
- if (args.length > 1) {
28
- const { helpCommand } = await import('../core/commands/basic-cli.js');
29
- await helpCommand(args.slice(1));
30
- }
31
- else {
32
- const { helpFast } = await import('../cli/help-fast.js');
33
- helpFast();
34
- }
35
- }
36
- else {
37
- const { main } = await import('../cli/main.js');
38
- await main(args);
39
- }
2
+ const FAST_PACKAGE_VERSION = '5.10.0';
3
+ const firstArg = process.argv[2];
4
+ if (firstArg === '--version' || firstArg === '-v' || firstArg === 'version') {
5
+ process.stdout.write(`sneakoscope ${FAST_PACKAGE_VERSION}\n`);
6
+ }
7
+ else {
8
+ import('./sks-dispatch.js').then(({ runSks }) => runSks(process.argv.slice(2))).catch((err) => {
9
+ const message = err instanceof Error && err.stack ? err.stack : String(err);
10
+ console.error(message);
11
+ process.exitCode = 1;
12
+ });
40
13
  }
41
- catch (err) {
42
- const message = err instanceof Error && err.stack ? err.stack : String(err);
43
- console.error(message);
44
- process.exitCode = 1;
45
- }
46
- function rootJsonFastInline(fs, cwd = process.cwd()) {
47
- const project = findProjectRootSync(fs, cwd);
48
- const global = joinPath(process.env.HOME || process.env.USERPROFILE || cwd, '.sneakoscope');
49
- const active = project || global;
50
- process.stdout.write(`${JSON.stringify({
51
- cwd,
52
- mode: project ? 'project' : 'global',
53
- active_root: active,
54
- project_root: project,
55
- global_root: global,
56
- using_global_root: !project
57
- })}\n`);
58
- }
59
- function findProjectRootSync(fs, start) {
60
- let dir = normalizeStart(start);
61
- for (;;) {
62
- if (fs.existsSync(joinPath(dir, '.sneakoscope')))
63
- return dir;
64
- if (fs.existsSync(joinPath(dir, 'AGENTS.md')) && fs.existsSync(joinPath(dir, 'package.json')))
65
- return dir;
66
- const parent = parentDir(dir);
67
- if (parent === dir)
68
- return null;
69
- dir = parent;
70
- }
71
- }
72
- function normalizeStart(start) {
73
- const value = stripTrailingSlash(start || process.cwd());
74
- if (value.startsWith('/'))
75
- return value || '/';
76
- return joinPath(process.cwd(), value);
77
- }
78
- function joinPath(left, right) {
79
- const base = stripTrailingSlash(left || '/');
80
- return `${base === '/' ? '' : base}/${right}`;
81
- }
82
- function parentDir(value) {
83
- const dir = stripTrailingSlash(value);
84
- if (dir === '/')
85
- return dir;
86
- const index = dir.lastIndexOf('/');
87
- return index <= 0 ? '/' : dir.slice(0, index);
88
- }
89
- function stripTrailingSlash(value) {
90
- return value.replace(/\/+$/, '') || '/';
91
- }
92
- export {};
93
- //# sourceMappingURL=sks.js.map
@@ -0,0 +1,129 @@
1
+ export const COMMAND_MANIFEST_LITE = [
2
+ { name: 'help', summary: 'Show SKS help', maturity: 'stable', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
3
+ { name: 'version', summary: 'Show SKS version', maturity: 'stable', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
4
+ { name: 'commands', summary: 'List SKS commands', maturity: 'stable', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
5
+ { name: 'check', summary: 'Run five-minute proof-bank affected checks', maturity: 'stable', skipMigrationGate: true },
6
+ { name: 'gates', summary: 'Run release gate DAG by gate id or preset', maturity: 'stable', skipMigrationGate: true },
7
+ { name: 'task', summary: 'Run an SLA-bounded SKS task check', maturity: 'stable', skipMigrationGate: true },
8
+ { name: 'release', summary: 'Run affected/full/background release gates', maturity: 'stable', skipMigrationGate: true },
9
+ { name: 'triwiki', summary: 'Inspect TriWiki index, affected graph, and proof bank', maturity: 'stable', skipMigrationGate: true },
10
+ { name: 'daemon', summary: 'Inspect or warm the local SKS daemon cache', maturity: 'stable', skipMigrationGate: true },
11
+ { name: 'run', summary: 'Classify and execute a task through the SKS trust kernel', maturity: 'beta' },
12
+ { name: 'plan', summary: 'Write a planning-only SKS plan artifact without code edits', maturity: 'stable' },
13
+ { name: 'status', summary: 'Show concise active mission and trust status', maturity: 'stable', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
14
+ { name: 'review', summary: 'Review a git diff with machine evidence first', maturity: 'stable', allowedDuringActiveRoute: true },
15
+ { name: 'ui', summary: 'Open the localhost SKS swarm dashboard', maturity: 'stable', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
16
+ { name: 'root', summary: 'Show active SKS root', maturity: 'stable', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
17
+ { name: 'update', summary: 'Update the global SKS npm package', maturity: 'stable' },
18
+ { name: 'uninstall', summary: 'Uninstall SKS global skills, hooks, config, menu bar, and optional project residue', maturity: 'stable', allowedDuringActiveRoute: true },
19
+ { name: 'update-check', summary: 'Check npm package freshness', maturity: 'stable', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
20
+ { name: 'wizard', summary: 'Open setup wizard help', maturity: 'stable' },
21
+ { name: 'usage', summary: 'Show focused usage topic', maturity: 'stable', readonly: true, allowedDuringActiveRoute: true, diagnostic: true },
22
+ { name: 'quickstart', summary: 'Show quickstart flow', maturity: 'stable' },
23
+ { name: 'setup', summary: 'Initialize SKS state', maturity: 'stable' },
24
+ { name: 'bootstrap', summary: 'Initialize SKS project files', maturity: 'stable' },
25
+ { name: 'init', summary: 'Initialize local control surface', maturity: 'stable' },
26
+ { name: 'deps', summary: 'Check local dependencies', maturity: 'stable' },
27
+ { name: 'fix-path', summary: 'Repair hook command paths', maturity: 'stable' },
28
+ { name: 'doctor', summary: 'Check and repair SKS install', maturity: 'stable', skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
29
+ { name: 'git', summary: 'Inspect and enforce SKS git collaboration hygiene', maturity: 'beta' },
30
+ { name: 'paths', summary: 'Inspect SKS managed paths', maturity: 'beta', readonly: true, allowedDuringActiveRoute: true, diagnostic: true },
31
+ { name: 'rollback', summary: 'List or apply managed-path rollback actions', maturity: 'beta', skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
32
+ { name: 'postinstall', summary: 'Run postinstall bootstrap', maturity: 'stable', skipMigrationGate: true },
33
+ { name: 'codex', summary: 'Check Codex CLI compatibility and vendored hook schemas', maturity: 'beta', skipMigrationGate: true },
34
+ { name: 'codex-app', summary: 'Check Codex App readiness', maturity: 'beta' },
35
+ { name: 'codex-native', summary: 'Inspect Codex Native broker and routing readiness', maturity: 'beta' },
36
+ { name: 'codex-lb', summary: 'Inspect codex-lb status and circuit health', maturity: 'beta' },
37
+ { name: 'menubar', summary: 'Inspect/install/restart/uninstall SKS menu bar', maturity: 'beta', allowedDuringActiveRoute: true, diagnostic: true },
38
+ { name: 'hooks', summary: 'Explain and inspect Codex hooks', maturity: 'beta' },
39
+ { name: 'tmux', summary: 'Show removed-runtime migration notice', maturity: 'beta' },
40
+ { name: 'zellij-lane', summary: 'Render a Zellij lane frame for SKS sessions', maturity: 'beta' },
41
+ { name: 'zellij-slot-pane', summary: 'Render a compact Zellij worker slot pane', maturity: 'beta' },
42
+ { name: 'zellij-monitor-pane', summary: 'Render the live Zellij MAD/Naruto monitor pane', maturity: 'beta', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
43
+ { name: 'zellij-viewport-pane', summary: 'Render a dynamically bound Zellij worker viewport pane', maturity: 'beta', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
44
+ { name: 'zellij-slot-column-anchor', summary: 'Render the compact SLOTS anchor pane for first-slot-down Zellij stacks', maturity: 'beta' },
45
+ { name: 'zellij', summary: 'Inspect Zellij runtime status and explain repair (no auto-install)', maturity: 'beta', skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
46
+ { name: 'mad-sks', summary: 'MAD-SKS scoped permission modifier + SQL-plane execution (merged MAD-DB)', maturity: 'beta', mutatesRouteState: true },
47
+ { name: 'glm', summary: 'Run GLM 5.2 MAD mode through OpenRouter', maturity: 'beta' },
48
+ { name: 'mad-db', summary: 'Deprecated alias for MAD-SKS SQL-plane execution; redirects to sks mad-sks sql|apply-migration', maturity: 'beta', mutatesRouteState: true, deprecated: true },
49
+ { name: 'auto-review', summary: 'Manage auto-review profile', maturity: 'beta' },
50
+ { name: 'dollar-commands', summary: 'List Codex App dollar commands', maturity: 'stable', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
51
+ { name: 'fast-mode', summary: 'Toggle SKS Fast mode default for dollar-command routes', maturity: 'stable', skipMigrationGate: true },
52
+ { name: 'commit', summary: 'Create a simple git commit', maturity: 'stable' },
53
+ { name: 'commit-and-push', summary: 'Create a simple git commit and push', maturity: 'stable' },
54
+ { name: 'dfix', summary: 'Run DFix diagnose/plan/patch/verify loop', maturity: 'stable', mutatesRouteState: true },
55
+ { name: 'team', summary: 'Deprecated alias. New execution redirects to Naruto; legacy observe/watch remains.', maturity: 'beta', mutatesRouteState: true, deprecated: true },
56
+ { name: 'agent', summary: 'Run native multi-session agent missions', maturity: 'beta', mutatesRouteState: true },
57
+ { name: 'with-local-llm', summary: 'Enable or inspect local Ollama worker backend', maturity: 'beta' },
58
+ { name: 'naruto', summary: 'Run $Naruto shadow-clone swarm (up to 100 parallel sessions)', maturity: 'labs', mutatesRouteState: true },
59
+ { name: 'stop-gate', summary: 'Check canonical stop-gate resolution for a route/mission', maturity: 'beta', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
60
+ { name: 'route', summary: 'Inspect or close active route state', maturity: 'beta', skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
61
+ { name: 'loop', summary: 'Dynamic Loop Runtime: plan/run/status/proof loop graphs.', maturity: 'labs', mutatesRouteState: true },
62
+ { name: 'qa-loop', summary: 'Run QA loop missions', maturity: 'beta', mutatesRouteState: true },
63
+ { name: 'research', summary: 'Run research missions', maturity: 'labs', mutatesRouteState: true },
64
+ { name: 'autoresearch', summary: 'Alias for research/autoresearch route', maturity: 'labs', mutatesRouteState: true },
65
+ { name: 'ppt', summary: 'Inspect/build PPT artifacts', maturity: 'labs', mutatesRouteState: true },
66
+ { name: 'image-ux-review', summary: 'Inspect image UX artifacts', maturity: 'labs', mutatesRouteState: true },
67
+ { name: 'computer-use', summary: 'Record native Mac/non-web Computer Use visual evidence', maturity: 'beta', mutatesRouteState: true },
68
+ { name: 'context7', summary: 'Context7 checks and docs', maturity: 'beta' },
69
+ { name: 'super-search', summary: 'Run Super-Search provider-independent source intelligence', maturity: 'beta' },
70
+ { name: 'xai', summary: 'Deprecated compatibility notice for removed xAI/Grok setup', maturity: 'beta', deprecated: true },
71
+ { name: 'recallpulse', summary: 'RecallPulse evidence route', maturity: 'labs' },
72
+ { name: 'pipeline', summary: 'Inspect pipeline missions', maturity: 'beta', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
73
+ { name: 'guard', summary: 'Check harness guard', maturity: 'beta' },
74
+ { name: 'conflicts', summary: 'Check harness conflicts', maturity: 'beta' },
75
+ { name: 'versioning', summary: 'Manage release version metadata', maturity: 'stable' },
76
+ { name: 'reasoning', summary: 'Show reasoning route', maturity: 'labs' },
77
+ { name: 'aliases', summary: 'Show command aliases', maturity: 'stable' },
78
+ { name: 'selftest', summary: 'Run local mock selftest', maturity: 'stable' },
79
+ { name: 'goal', summary: 'Manage Goal bridge workflow', maturity: 'beta', mutatesRouteState: true },
80
+ { name: 'seo-geo-optimizer', summary: 'Run unified SEO/GEO optimizer audit/plan/apply/verify on the search-visibility kernel', maturity: 'beta' },
81
+ { name: 'hook', summary: 'Codex hook entrypoint', maturity: 'beta', skipMigrationGate: true },
82
+ { name: 'profile', summary: 'Inspect/set profile', maturity: 'labs' },
83
+ { name: 'hproof', summary: 'Evaluate H-Proof gate', maturity: 'beta' },
84
+ { name: 'validate-artifacts', summary: 'Validate mission artifacts', maturity: 'beta' },
85
+ { name: 'proof', summary: 'Show and validate completion proof', maturity: 'beta' },
86
+ { name: 'trust', summary: 'Report and validate route trust kernel evidence', maturity: 'beta' },
87
+ { name: 'wrongness', summary: 'Record and inspect TriWiki wrongness negative evidence', maturity: 'beta' },
88
+ { name: 'proof-field', summary: 'Scan proof field', maturity: 'beta' },
89
+ { name: 'skill-dream', summary: 'Track skill dream counters', maturity: 'labs' },
90
+ { name: 'code-structure', summary: 'Scan source structure', maturity: 'labs' },
91
+ { name: 'rust', summary: 'Inspect optional Rust accelerator status and smoke parity', maturity: 'beta' },
92
+ { name: 'gx', summary: 'Render/validate GX cartridges', maturity: 'labs' },
93
+ { name: 'db', summary: 'Inspect DB safety policy', maturity: 'beta' },
94
+ { name: 'eval', summary: 'Run eval reports', maturity: 'labs' },
95
+ { name: 'harness', summary: 'Run harness fixtures', maturity: 'labs' },
96
+ { name: 'wiki', summary: 'Manage TriWiki and image voxel ledgers', maturity: 'beta', skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
97
+ { name: 'memory', summary: 'Project TriWiki memory into managed AGENTS.md blocks or run memory GC', maturity: 'beta' },
98
+ { name: 'gc', summary: 'Compact/prune runtime state', maturity: 'labs', skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
99
+ { name: 'stats', summary: 'Show storage stats', maturity: 'labs', readonly: true, diagnostic: true },
100
+ { name: 'features', summary: 'Validate feature registry', maturity: 'beta' },
101
+ { name: 'all-features', summary: 'Run all-features selftest', maturity: 'beta' },
102
+ { name: 'perf', summary: 'Run performance checks', maturity: 'beta' },
103
+ { name: 'bench', summary: 'Run core trust-kernel benchmark budgets', maturity: 'beta' },
104
+ { name: 'mcp-server', summary: 'Run a stdio MCP server exposing SKS commands as tools for any MCP-capable agent host', maturity: 'beta', skipMigrationGate: true, allowedDuringActiveRoute: true },
105
+ { name: 'agent-bridge', summary: 'Publish the agent-bridge manifest and print host registration snippets for external agent systems', maturity: 'beta', readonly: true, diagnostic: true }
106
+ ];
107
+ export const LEGACY_COMMAND_ALIASES_LITE = {};
108
+ export const COMMAND_ALIASES_LITE = {
109
+ ...LEGACY_COMMAND_ALIASES_LITE,
110
+ '--help': 'help',
111
+ '-h': 'help',
112
+ '--version': 'version',
113
+ '-v': 'version',
114
+ '--mad': 'mad-sks',
115
+ '--MAD': 'mad-sks',
116
+ '--mad-sks': 'mad-sks',
117
+ 'ux-review': 'image-ux-review',
118
+ 'visual-review': 'image-ux-review',
119
+ 'ui-ux-review': 'image-ux-review',
120
+ '--agent': 'agent',
121
+ '--naruto': 'naruto',
122
+ swarm: 'naruto'
123
+ };
124
+ export const COMMAND_MANIFEST_BY_NAME = Object.fromEntries(COMMAND_MANIFEST_LITE.map((entry) => [entry.name, entry]));
125
+ export const COMMAND_NAME_SET = new Set(COMMAND_MANIFEST_LITE.map((entry) => entry.name));
126
+ export function commandManifestNames() {
127
+ return COMMAND_MANIFEST_LITE.map((entry) => entry.name).sort();
128
+ }
129
+ //# sourceMappingURL=command-manifest-lite.js.map
@@ -1,7 +1,7 @@
1
- import { COMMANDS } from './command-registry.js';
1
+ import { COMMAND_MANIFEST_LITE } from './command-manifest-lite.js';
2
2
  export function commandsJsonFast() {
3
- const commands = Object.entries(COMMANDS)
4
- .map(([name, entry]) => fastCommandRow(name, entry))
3
+ const commands = COMMAND_MANIFEST_LITE
4
+ .map((entry) => fastCommandRow(entry))
5
5
  .sort((a, b) => a.name.localeCompare(b.name));
6
6
  console.log(JSON.stringify({
7
7
  schema: 'sks.command-registry.v1',
@@ -9,12 +9,21 @@ export function commandsJsonFast() {
9
9
  commands
10
10
  }, null, 2));
11
11
  }
12
- function fastCommandRow(name, entry) {
13
- return {
14
- name,
15
- usage: `sks ${name}`,
12
+ function fastCommandRow(entry) {
13
+ const row = {
14
+ name: entry.name,
15
+ usage: `sks ${entry.name}`,
16
16
  description: entry.summary,
17
17
  maturity: entry.maturity
18
18
  };
19
+ if (entry.readonly === true)
20
+ row.readonly = true;
21
+ if (entry.mutatesRouteState === true)
22
+ row.mutating = true;
23
+ if (entry.deprecated === true)
24
+ row.deprecated = true;
25
+ if (entry.hidden === true)
26
+ row.hidden = true;
27
+ return row;
19
28
  }
20
29
  //# sourceMappingURL=commands-fast.js.map
@@ -1,9 +1,8 @@
1
- import { COMMANDS } from './command-registry.js';
2
- import { PACKAGE_VERSION } from '../core/version.js';
3
- import { COMMAND_CATALOG } from '../core/routes.js';
1
+ import { COMMAND_MANIFEST_LITE } from './command-manifest-lite.js';
2
+ const FAST_PACKAGE_VERSION = '5.10.0';
4
3
  export function helpFast() {
5
4
  console.log(`SKS
6
- SNEAKOSCOPE CODEX v${PACKAGE_VERSION}
5
+ SNEAKOSCOPE CODEX v${FAST_PACKAGE_VERSION}
7
6
 
8
7
  3-pillar frontdoor
9
8
 
@@ -29,12 +28,11 @@ Discovery
29
28
  console.log('\nRun `sks commands` for the full catalog. Core promise: machine-verified completion, not vibes.');
30
29
  }
31
30
  function commandRows() {
32
- const registry = new Map(Object.entries(COMMANDS).map(([name, meta]) => [name, meta]));
33
- return COMMAND_CATALOG.map((entry) => ({
31
+ return COMMAND_MANIFEST_LITE.map((entry) => ({
34
32
  name: entry.name,
35
- usage: entry.usage,
36
- description: entry.description,
37
- maturity: registry.get(entry.name)?.maturity || entry.maturity || 'labs'
33
+ usage: `sks ${entry.name}`,
34
+ description: entry.summary,
35
+ maturity: entry.maturity
38
36
  })).sort((a, b) => a.name.localeCompare(b.name));
39
37
  }
40
38
  //# sourceMappingURL=help-fast.js.map
@@ -1,16 +1,13 @@
1
- import { COMMAND_ALIASES, COMMANDS, } from './command-registry.js';
1
+ import { COMMAND_ALIASES_LITE, COMMAND_MANIFEST_BY_NAME, COMMAND_NAME_SET, } from './command-manifest-lite.js';
2
2
  import { detectGlobalMode, glmWithoutMadResult } from './global-mode-router.js';
3
- import { ensureCurrentMigrationBeforeCommand } from '../core/update/update-migration-state.js';
4
- import { projectRoot, readJson } from '../core/fsx.js';
5
- import { stateFile } from '../core/mission.js';
6
3
  export function isCommandName(value) {
7
- return Object.prototype.hasOwnProperty.call(COMMANDS, value);
4
+ return COMMAND_NAME_SET.has(value);
8
5
  }
9
6
  export function normalizeCommand(args = []) {
10
7
  const cmd = args[0];
11
8
  if (!cmd)
12
9
  return { command: null, rawCommand: null, aliasTarget: null, args: [...args] };
13
- const mapped = cmd in COMMAND_ALIASES ? COMMAND_ALIASES[cmd] : cmd;
10
+ const mapped = cmd in COMMAND_ALIASES_LITE ? COMMAND_ALIASES_LITE[cmd] : cmd;
14
11
  const rest = args.slice(1);
15
12
  const command = isCommandName(mapped) ? mapped : null;
16
13
  return {
@@ -78,13 +75,14 @@ async function dispatchInner(argv) {
78
75
  };
79
76
  return result;
80
77
  }
81
- const entry = COMMANDS[command];
78
+ const entry = COMMAND_MANIFEST_BY_NAME[command];
82
79
  const commandGate = await ensureActiveRouteCommandGate(command, rest);
83
80
  if (!commandGate.ok) {
84
81
  console.error(commandGate.message);
85
82
  process.exitCode = 1;
86
83
  return commandGate;
87
84
  }
85
+ const { ensureCurrentMigrationBeforeCommand } = await import('../core/update/update-migration-state.js');
88
86
  const migrationGate = await ensureCurrentMigrationBeforeCommand({
89
87
  command,
90
88
  args: rest,
@@ -105,13 +103,15 @@ async function dispatchInner(argv) {
105
103
  process.exitCode = 1;
106
104
  return migrationGate;
107
105
  }
108
- const mod = await entry.lazy();
106
+ const { COMMANDS } = await import('./command-registry.js');
107
+ const commandEntry = COMMANDS[command];
108
+ const mod = await commandEntry.lazy();
109
109
  if (typeof mod.run !== 'function')
110
110
  throw new Error(`Command ${command} must export run(command, args)`);
111
111
  return mod.run(rawCommand || command, rest);
112
112
  }
113
113
  async function ensureActiveRouteCommandGate(command, args) {
114
- const entry = COMMANDS[command];
114
+ const entry = COMMAND_MANIFEST_BY_NAME[command];
115
115
  if (command === 'route' || entry.readonly === true || entry.allowedDuringActiveRoute === true && entry.mutatesRouteState !== true) {
116
116
  return { ok: true, status: 'allowed' };
117
117
  }
@@ -122,6 +122,10 @@ async function ensureActiveRouteCommandGate(command, args) {
122
122
  if (process.env.SKS_TEST_ISOLATION === '1' && process.env.SKS_RELEASE_FIXTURE_ACTIVE_ROUTE_BYPASS === '1') {
123
123
  return { ok: true, status: 'allowed_release_fixture_isolation' };
124
124
  }
125
+ const [{ projectRoot, readJson }, { stateFile }] = await Promise.all([
126
+ import('../core/fsx.js'),
127
+ import('../core/mission.js')
128
+ ]);
125
129
  const root = await projectRoot(process.cwd()).catch(() => process.cwd());
126
130
  const state = await readJson(stateFile(root), {}).catch(() => ({}));
127
131
  if (!activeRouteStateBlocksCommand(state))