sneakoscope 7.1.1 → 7.5.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 (629) hide show
  1. package/README.md +118 -4
  2. package/config/architecture-budgets.v1.json +1 -8
  3. package/crates/sks-core/Cargo.lock +225 -1
  4. package/crates/sks-core/Cargo.toml +8 -1
  5. package/crates/sks-core/src/main.rs +7 -1
  6. package/crates/sks-core/src/search/files.rs +114 -0
  7. package/crates/sks-core/src/search/mod.rs +274 -0
  8. package/crates/sks-core/src/search/text.rs +175 -0
  9. package/dist/bin/sks-dispatch.js +4 -3
  10. package/dist/cli/codex-app-command.js +1 -1
  11. package/dist/cli/command-manifest-lite.js +178 -6
  12. package/dist/cli/command-registry.js +41 -7
  13. package/dist/cli/help.js +30 -0
  14. package/dist/cli/install-helpers-codex-lb-config.js +9 -6
  15. package/dist/cli/install-helpers-codex-lb-selftest-chain.js +1 -1
  16. package/dist/cli/install-helpers-codex-lb-selftest.js +2 -1
  17. package/dist/cli/install-helpers-install-support.js +7 -17
  18. package/dist/cli/install-helpers.js +78 -59
  19. package/dist/cli/router.js +25 -4
  20. package/dist/commands/codex-app.js +13 -5
  21. package/dist/commands/doctor-profile.js +1 -1
  22. package/dist/commands/doctor.js +10 -2
  23. package/dist/commands/search.js +4 -0
  24. package/dist/config/skills-manifest.json +51 -79
  25. package/dist/core/agent-bridge/agent-manifest.js +22 -26
  26. package/dist/core/agent-bridge/host-capability-policy.js +109 -8
  27. package/dist/core/agent-bridge/host-capability-runtime.js +144 -27
  28. package/dist/core/agent-guidance/directive-registry.js +123 -0
  29. package/dist/core/agents/agent-effort-policy.js +45 -6
  30. package/dist/core/agents/agent-worker-pipeline.js +1 -3
  31. package/dist/core/agents/native-worker-backend-router.js +43 -19
  32. package/dist/core/auto-review.js +1 -3
  33. package/dist/core/code-structure.js +282 -19
  34. package/dist/core/codex/codex-config-guard.js +14 -4
  35. package/dist/core/codex/codex-config-toml.js +1 -3
  36. package/dist/core/codex-app/codex-agent-role-sync.js +1 -3
  37. package/dist/core/codex-app/codex-app-fast-ui-repair.js +14 -1
  38. package/dist/core/codex-app/codex-app-types.js +2 -3
  39. package/dist/core/codex-app/codex-desktop-routing-ownership.js +91 -0
  40. package/dist/core/codex-app/codex-hook-approval-probe.js +1 -3
  41. package/dist/core/codex-app/codex-hook-lifecycle.js +1 -3
  42. package/dist/core/codex-app/codex-init-deep.js +22 -10
  43. package/dist/core/codex-app/codex-model-catalog.js +23 -10
  44. package/dist/core/codex-app/codex-models-cache.js +160 -0
  45. package/dist/core/codex-app/desktop-routing-snapshot.js +233 -0
  46. package/dist/core/codex-app/glm-profile-installer.js +1 -3
  47. package/dist/core/codex-app/mcp-manager.js +1 -3
  48. package/dist/core/codex-app/menubar/constants.js +2 -0
  49. package/dist/core/codex-app/multi-provider-router-support.js +6 -10
  50. package/dist/core/codex-app/multi-provider-router.js +66 -4
  51. package/dist/core/codex-app/openrouter-activate.js +189 -26
  52. package/dist/core/codex-app/openrouter-base-instructions.js +1 -0
  53. package/dist/core/codex-app/openrouter-model-catalog.js +217 -0
  54. package/dist/core/codex-app/role-model-catalog-priority.js +61 -0
  55. package/dist/core/codex-app.js +35 -11
  56. package/dist/core/codex-compat/codex-hook-semantic-validator.js +1 -3
  57. package/dist/core/codex-lb/codex-lb-env.js +1 -3
  58. package/dist/core/codex-lb/codex-lb-tool-catalog.js +6 -1
  59. package/dist/core/codex-native/codex-native-feature-broker.js +2 -6
  60. package/dist/core/codex-native/codex-native-interop-policy.js +1 -3
  61. package/dist/core/codex-native/codex-native-reference-cache.js +1 -3
  62. package/dist/core/codex-native/codex-native-reference-source.js +1 -3
  63. package/dist/core/codex-native/codex-native-repair-transaction.js +1 -3
  64. package/dist/core/codex-native/core-skill-manifest.js +11 -7
  65. package/dist/core/codex-native/native-capability-repair-matrix.js +1 -3
  66. package/dist/core/codex-plugins/codex-plugin-repair.js +1 -3
  67. package/dist/core/codex-runtime/codex-desktop-config-policy.js +2 -4
  68. package/dist/core/commands/agent-bridge-command.js +24 -3
  69. package/dist/core/commands/image-ux-review-command.js +248 -61
  70. package/dist/core/commands/menubar-command.js +1 -1
  71. package/dist/core/commands/naruto-command.js +285 -21
  72. package/dist/core/commands/pipeline-command.js +5 -2
  73. package/dist/core/commands/ppt-command.js +2 -2
  74. package/dist/core/commands/release-command.js +63 -1
  75. package/dist/core/commands/remote-command.js +18 -0
  76. package/dist/core/commands/search-command.js +151 -0
  77. package/dist/core/commands/telegram-command.js +149 -9
  78. package/dist/core/commands/triwiki-command.js +11 -1
  79. package/dist/core/commands/triwiki-graph-command.js +160 -0
  80. package/dist/core/commands/uninstall-command.js +1 -1
  81. package/dist/core/commands/wiki-command.js +100 -20
  82. package/dist/core/config/secret-preservation.js +1 -3
  83. package/dist/core/context7-client.js +2 -1
  84. package/dist/core/db-review.js +704 -0
  85. package/dist/core/db-safety.js +17 -23
  86. package/dist/core/doctor/browser-use-repair.js +1 -3
  87. package/dist/core/doctor/codex-startup-config-repair.js +1 -3
  88. package/dist/core/doctor/computer-use-repair.js +1 -3
  89. package/dist/core/doctor/context7-mcp-repair.js +1 -3
  90. package/dist/core/doctor/current-project-guidance.js +1 -3
  91. package/dist/core/doctor/doctor-codex-startup-repair.js +1 -3
  92. package/dist/core/doctor/doctor-dirty-planner.js +2 -2
  93. package/dist/core/doctor/doctor-native-capability-repair.js +1 -3
  94. package/dist/core/doctor/doctor-transaction.js +1 -3
  95. package/dist/core/doctor/imagegen-repair.js +1 -3
  96. package/dist/core/doctor/legacy-global-hook-cleanup.js +1 -3
  97. package/dist/core/doctor/mcp-transport-collision-repair.js +1 -3
  98. package/dist/core/doctor/retired-managed-residue-private.js +1 -3
  99. package/dist/core/doctor/supabase-mcp-repair.js +1 -3
  100. package/dist/core/engineering-sanity-review.js +186 -0
  101. package/dist/core/errors/message.js +6 -0
  102. package/dist/core/evidence/evidence-schema.js +1 -3
  103. package/dist/core/feature-fixtures.js +1 -0
  104. package/dist/core/feature-registry.js +3 -5
  105. package/dist/core/fsx.js +20 -3
  106. package/dist/core/git-hygiene/shared-memory-publish.js +1 -3
  107. package/dist/core/git-hygiene/validators.js +1 -3
  108. package/dist/core/harness-guard.js +21 -3
  109. package/dist/core/hooks-runtime/codex-commit-hooks-selftest.js +82 -0
  110. package/dist/core/hooks-runtime/context-graph-freshness-preflight.js +113 -0
  111. package/dist/core/hooks-runtime/hook-context.js +2 -2
  112. package/dist/core/hooks-runtime/official-subagent-lifecycle.js +1 -1
  113. package/dist/core/hooks-runtime/tool-output-quarantine.js +1 -1
  114. package/dist/core/hooks-runtime.js +28 -86
  115. package/dist/core/image-ux-review/callout-extraction.js +6 -0
  116. package/dist/core/image-ux-review/imagegen-adapter.js +104 -72
  117. package/dist/core/image-ux-review/real-callout-extractor.js +7 -1
  118. package/dist/core/image-ux-review.js +185 -12
  119. package/dist/core/imagegen/codex-lb-imagegen-target.js +85 -0
  120. package/dist/core/imagegen/imagegen-capability.js +20 -13
  121. package/dist/core/imagegen/imagegen-evidence.js +32 -0
  122. package/dist/core/imagegen/require-imagegen.js +29 -5
  123. package/dist/core/init/skills.js +31 -21
  124. package/dist/core/init.js +4 -6
  125. package/dist/core/install/installed-package-smoke.js +157 -4
  126. package/dist/core/json/records.js +9 -0
  127. package/dist/core/json-schema-validator.js +1 -3
  128. package/dist/core/lean-engineering-policy.js +54 -0
  129. package/dist/core/loops/loop-continuation-enforcer.js +1 -3
  130. package/dist/core/mad-sks/sql-plane/mcp-executor.js +2 -1
  131. package/dist/core/mad-sks/sql-plane/policy.js +2 -1
  132. package/dist/core/managed-assets/managed-assets-manifest.js +4 -3
  133. package/dist/core/managed-path-safety.js +8 -10
  134. package/dist/core/mcp-config/backup.js +2 -4
  135. package/dist/core/mcp-config/codex-cli-adapter.js +1 -3
  136. package/dist/core/mcp-config/config-reader.js +4 -7
  137. package/dist/core/mcp-config/guarded-patch.js +1 -1
  138. package/dist/core/mcp-config/health-check.js +2 -1
  139. package/dist/core/mcp-config/mutation.js +1 -1
  140. package/dist/core/mcp-config/restore.js +1 -1
  141. package/dist/core/mcp-config/scope.js +3 -5
  142. package/dist/core/mcp-config/secret-policy.js +1 -3
  143. package/dist/core/migration/migration-transaction-journal.js +3 -3
  144. package/dist/core/naruto/context-graph-advisor-scope.js +242 -0
  145. package/dist/core/naruto/context-graph-advisor.js +0 -0
  146. package/dist/core/naruto/naruto-concurrency-governor.js +2 -2
  147. package/dist/core/perf/import-graph-budget.js +91 -1
  148. package/dist/core/pipeline/pipeline-plan-writer.js +1 -1
  149. package/dist/core/pipeline-internals/runtime-core.js +165 -23
  150. package/dist/core/pipeline-internals/runtime-gates.js +193 -4
  151. package/dist/core/pipeline.js +1 -1
  152. package/dist/core/policy/latest-version-guidance.js +113 -0
  153. package/dist/core/ppt-review/slide-imagegen-review.js +7 -7
  154. package/dist/core/ppt.js +11 -11
  155. package/dist/core/product-design-app-server.js +2 -1
  156. package/dist/core/proof/fake-real-proof-policy.js +1 -3
  157. package/dist/core/proof/root-cause-policy.js +1 -3
  158. package/dist/core/proof/validation.js +1 -3
  159. package/dist/core/provider/model-router.js +4 -0
  160. package/dist/core/provider/provider-context.js +1 -3
  161. package/dist/core/providers/openrouter/openrouter-account.js +1 -3
  162. package/dist/core/quality/helper-dedup.js +0 -0
  163. package/dist/core/recallpulse.js +1 -1
  164. package/dist/core/release/file-ownership.js +26 -17
  165. package/dist/core/release/gate-manifest.js +32 -1
  166. package/dist/core/release/macos-menubar-proof.js +2 -1
  167. package/dist/core/release/main-push-guard.js +5 -18
  168. package/dist/core/release/main-push-receipt.js +2 -44
  169. package/dist/core/release/npm-stage-contract.js +21 -0
  170. package/dist/core/release/package-size-budget.js +2 -2
  171. package/dist/core/release/release-gate-contract.js +7 -0
  172. package/dist/core/release/release-pack-receipt.js +1 -1
  173. package/dist/core/release/release-proof-io.js +33 -0
  174. package/dist/core/release/release-upgrade-baseline.js +9 -0
  175. package/dist/core/release/runtime-script-pack-closure.js +87 -2
  176. package/dist/core/release/stage-publish.js +221 -0
  177. package/dist/core/remote/machine-registry.js +1 -3
  178. package/dist/core/remote/owner-proof.js +1 -3
  179. package/dist/core/remote/protocol.js +1 -3
  180. package/dist/core/remote/readiness.js +1 -3
  181. package/dist/core/remote/session-index.js +1 -3
  182. package/dist/core/remote/worker.js +1 -3
  183. package/dist/core/responses-stream.js +197 -0
  184. package/dist/core/routes/design-policy.js +7 -2
  185. package/dist/core/routes/dollar-manifest-lite.js +1 -5
  186. package/dist/core/routes/evidence.js +1 -1
  187. package/dist/core/routes.js +19 -15
  188. package/dist/core/rust-accelerator.js +12 -2
  189. package/dist/core/safety/command-contract/contracts.js +2 -0
  190. package/dist/core/safety/command-contract/types.js +1 -1
  191. package/dist/core/safety/ssot-guard.js +1 -3
  192. package/dist/core/search/benchmark.js +358 -0
  193. package/dist/core/search/cache.js +65 -0
  194. package/dist/core/search/context-graph-seeds.js +205 -0
  195. package/dist/core/search/context.js +0 -0
  196. package/dist/core/search/doctor.js +74 -0
  197. package/dist/core/search/files.js +192 -0
  198. package/dist/core/search/index.js +5 -0
  199. package/dist/core/search/ipc.js +64 -0
  200. package/dist/core/search/provider.js +142 -0
  201. package/dist/core/search/rust-bridge.js +24 -0
  202. package/dist/core/search/structure.js +230 -0
  203. package/dist/core/search/symbol.js +272 -0
  204. package/dist/core/search/text.js +146 -0
  205. package/dist/core/search/types.js +22 -0
  206. package/dist/core/search/typescript-ls.js +215 -0
  207. package/dist/core/search-visibility/discovery.js +1 -3
  208. package/dist/core/skill-forge.js +1 -1
  209. package/dist/core/stop-gate/gate-evaluator.js +3 -3
  210. package/dist/core/stop-gate/stop-gate-check.js +1 -3
  211. package/dist/core/structured-output-adapter.js +62 -2
  212. package/dist/core/subagents/agent-catalog.js +56 -43
  213. package/dist/core/subagents/model-policy.js +17 -7
  214. package/dist/core/subagents/naruto-help-contract.js +2 -1
  215. package/dist/core/subagents/naruto-host-credentials.js +161 -0
  216. package/dist/core/subagents/naruto-proof-projection.js +2 -6
  217. package/dist/core/subagents/official-subagent-config.js +1 -3
  218. package/dist/core/subagents/official-subagent-preparation.js +42 -12
  219. package/dist/core/subagents/official-subagent-prompt.js +127 -20
  220. package/dist/core/subagents/official-subagent-runner.js +31 -13
  221. package/dist/core/subagents/role-model-preferences.js +33 -11
  222. package/dist/core/subagents/subagent-evidence.js +1 -3
  223. package/dist/core/subagents/thread-budget.js +1 -1
  224. package/dist/core/subagents/triwiki-attention.js +135 -127
  225. package/dist/core/telegram/bot-api.js +59 -4
  226. package/dist/core/telegram/config.js +4 -5
  227. package/dist/core/telegram/hub.js +3 -2
  228. package/dist/core/telegram/owner-lock.js +4 -6
  229. package/dist/core/telegram/runtime-projection.js +2 -3
  230. package/dist/core/telegram/setup.js +223 -73
  231. package/dist/core/text/regex.js +3 -0
  232. package/dist/core/text/strings.js +6 -0
  233. package/dist/core/triwiki/code-pack.js +12 -120
  234. package/dist/core/triwiki/context-graph/compiler/cache-key.js +277 -0
  235. package/dist/core/triwiki/context-graph/compiler/extract.js +104 -0
  236. package/dist/core/triwiki/context-graph/compiler/freshness.js +108 -0
  237. package/dist/core/triwiki/context-graph/compiler/index.js +237 -0
  238. package/dist/core/triwiki/context-graph/compiler/merge.js +0 -0
  239. package/dist/core/triwiki/context-graph/compiler/serialize.js +115 -0
  240. package/dist/core/triwiki/context-graph/contracts.js +236 -0
  241. package/dist/core/triwiki/context-graph/extractors/code/builders.js +150 -0
  242. package/dist/core/triwiki/context-graph/extractors/code/declarations.js +161 -0
  243. package/dist/core/triwiki/context-graph/extractors/code/index.js +265 -0
  244. package/dist/core/triwiki/context-graph/extractors/code/inventory.js +237 -0
  245. package/dist/core/triwiki/context-graph/extractors/code/module-graph.js +252 -0
  246. package/dist/core/triwiki/context-graph/extractors/code/modules.js +79 -0
  247. package/dist/core/triwiki/context-graph/extractors/code/references.js +184 -0
  248. package/dist/core/triwiki/context-graph/extractors/code/selection.js +100 -0
  249. package/dist/core/triwiki/context-graph/extractors/code/ts-config.js +161 -0
  250. package/dist/core/triwiki/context-graph/extractors/code/types.js +18 -0
  251. package/dist/core/triwiki/context-graph/extractors/evidence/claims.js +289 -0
  252. package/dist/core/triwiki/context-graph/extractors/evidence/index.js +54 -0
  253. package/dist/core/triwiki/context-graph/extractors/evidence/proof-index.js +213 -0
  254. package/dist/core/triwiki/context-graph/extractors/evidence/proofs.js +266 -0
  255. package/dist/core/triwiki/context-graph/extractors/evidence/redaction.js +177 -0
  256. package/dist/core/triwiki/context-graph/extractors/evidence/shared.js +0 -0
  257. package/dist/core/triwiki/context-graph/extractors/evidence/sources.js +154 -0
  258. package/dist/core/triwiki/context-graph/extractors/index.js +7 -0
  259. package/dist/core/triwiki/context-graph/extractors/topology/commands.js +207 -0
  260. package/dist/core/triwiki/context-graph/extractors/topology/gate-edges.js +201 -0
  261. package/dist/core/triwiki/context-graph/extractors/topology/gates.js +182 -0
  262. package/dist/core/triwiki/context-graph/extractors/topology/globs.js +124 -0
  263. package/dist/core/triwiki/context-graph/extractors/topology/index.js +92 -0
  264. package/dist/core/triwiki/context-graph/extractors/topology/routes.js +135 -0
  265. package/dist/core/triwiki/context-graph/extractors/topology/shared.js +215 -0
  266. package/dist/core/triwiki/context-graph/graph-index.js +143 -0
  267. package/dist/core/triwiki/context-graph/ids.js +0 -0
  268. package/dist/core/triwiki/context-graph/lint/index.js +0 -0
  269. package/dist/core/triwiki/context-graph/lint/rules.js +232 -0
  270. package/dist/core/triwiki/context-graph/lint/warnings.js +93 -0
  271. package/dist/core/triwiki/context-graph/paths.js +116 -0
  272. package/dist/core/triwiki/context-graph/profiles.js +78 -0
  273. package/dist/core/triwiki/context-graph/projections/anchors.js +91 -0
  274. package/dist/core/triwiki/context-graph/projections/attention.js +58 -0
  275. package/dist/core/triwiki/context-graph/projections/code-pack-workspace.js +62 -0
  276. package/dist/core/triwiki/context-graph/projections/code-pack.js +144 -0
  277. package/dist/core/triwiki/context-graph/projections/index.js +7 -0
  278. package/dist/core/triwiki/context-graph/projections/module-view.js +140 -0
  279. package/dist/core/triwiki/context-graph/projections/node-summary.js +118 -0
  280. package/dist/core/triwiki/context-graph/projections/pack-contract.js +6 -0
  281. package/dist/core/triwiki/context-graph/query/explain.js +0 -0
  282. package/dist/core/triwiki/context-graph/query/index.js +178 -0
  283. package/dist/core/triwiki/context-graph/query/load.js +116 -0
  284. package/dist/core/triwiki/context-graph/query/pack.js +117 -0
  285. package/dist/core/triwiki/context-graph/query/rank.js +142 -0
  286. package/dist/core/triwiki/context-graph/query/ranking-config.js +64 -0
  287. package/dist/core/triwiki/context-graph/query/seeds.js +241 -0
  288. package/dist/core/triwiki/context-graph/query/snapshot-cache.js +72 -0
  289. package/dist/core/triwiki/context-graph/query/traverse.js +154 -0
  290. package/dist/core/triwiki/context-graph/query-types.js +29 -0
  291. package/dist/core/triwiki/context-graph/store/compile-lock.js +21 -0
  292. package/dist/core/triwiki/context-graph/store/event-log.js +48 -0
  293. package/dist/core/triwiki/context-graph/store/fragment-cache.js +85 -0
  294. package/dist/core/triwiki/context-graph/store/graph-status.js +85 -0
  295. package/dist/core/triwiki/context-graph/store/snapshot-store.js +155 -0
  296. package/dist/core/triwiki/triwiki-proof-bank-index-repair.js +115 -0
  297. package/dist/core/triwiki/triwiki-proof-bank-index-store.js +290 -0
  298. package/dist/core/triwiki/triwiki-proof-bank-index.js +126 -0
  299. package/dist/core/triwiki/triwiki-proof-bank.js +7 -1
  300. package/dist/core/triwiki-wrongness/image-wrongness.js +1 -3
  301. package/dist/core/triwiki-wrongness/wrongness-ledger.js +1 -3
  302. package/dist/core/triwiki-wrongness/wrongness-proof-linker.js +1 -3
  303. package/dist/core/triwiki-wrongness/wrongness-retrieval.js +1 -3
  304. package/dist/core/triwiki-wrongness/wrongness-schema.js +1 -3
  305. package/dist/core/triwiki-wrongness/wrongness-trust-policy.js +1 -3
  306. package/dist/core/trust-kernel/completion-contract.js +1 -3
  307. package/dist/core/trust-kernel/route-contract.js +1 -3
  308. package/dist/core/update/update-migration-state.js +1 -3
  309. package/dist/core/update-check.js +7 -1
  310. package/dist/core/verification/context-graph-affected.js +271 -0
  311. package/dist/core/verification/diff-quality.js +3 -4
  312. package/dist/core/verification/impact-scan.js +36 -89
  313. package/dist/core/verification/mistake-rule-compiler.js +17 -4
  314. package/dist/core/version-manager.js +3 -20
  315. package/dist/core/version.js +1 -1
  316. package/dist/native/sks-menubar/Sources/ControlCenterWindowController.swift +22 -2
  317. package/dist/native/sks-menubar/Sources/ControlKit.swift +102 -0
  318. package/dist/native/sks-menubar/Sources/DiagnosticsViewController.swift +23 -11
  319. package/dist/native/sks-menubar/Sources/MCPServersViewController.swift +7 -3
  320. package/dist/native/sks-menubar/Sources/OperationCoordinator.swift +17 -1
  321. package/dist/native/sks-menubar/Sources/OverviewViewController.swift +22 -15
  322. package/dist/native/sks-menubar/Sources/ProcessClient.swift +14 -4
  323. package/dist/native/sks-menubar/Sources/ProvidersMultiProvider.swift +65 -12
  324. package/dist/native/sks-menubar/Sources/ProvidersOpenRouter.swift +154 -225
  325. package/dist/native/sks-menubar/Sources/ProvidersRoleModels.swift +252 -0
  326. package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +73 -70
  327. package/dist/native/sks-menubar/Sources/RemoteTelegramViewController.swift +16 -7
  328. package/dist/native/sks-menubar/Sources/SettingsViewController.swift +14 -5
  329. package/dist/native/sks-menubar/Sources/SidebarItem.swift +15 -1
  330. package/dist/native/sks-menubar/Sources/StatusItemController.swift +2 -2
  331. package/dist/native/sks-menubar/Sources/UpdatesViewController.swift +12 -11
  332. package/dist/scripts/agent-guidance-dedup-check.js +23 -0
  333. package/dist/scripts/agent-message-bus-reader-check.js +1 -1
  334. package/dist/scripts/all-feature-deep-completion-check.js +1 -1
  335. package/dist/scripts/appshots-thread-attachment-discovery-check.js +1 -1
  336. package/dist/scripts/architecture-guard-check.js +1 -2
  337. package/dist/scripts/certificate-sla-check.js +1 -1
  338. package/dist/scripts/cli-output-consistency-check.js +1 -1
  339. package/dist/scripts/codex-0-134-runner-truth-check.js +1 -1
  340. package/dist/scripts/codex-0138-capability-artifact-check.js +1 -1
  341. package/dist/scripts/codex-0138-capability-check.js +1 -1
  342. package/dist/scripts/codex-0138-doctor-check.js +1 -1
  343. package/dist/scripts/codex-0138-feature-probes-check.js +1 -1
  344. package/dist/scripts/codex-0144-app-server-v2-check.js +1 -1
  345. package/dist/scripts/codex-0144-binary-identity-check.js +1 -1
  346. package/dist/scripts/codex-0144-capability-check.js +1 -1
  347. package/dist/scripts/codex-0144-core-real-probes-check.js +1 -1
  348. package/dist/scripts/codex-0144-manifest-check.js +1 -1
  349. package/dist/scripts/codex-0144-policy-check.js +1 -1
  350. package/dist/scripts/codex-0144-thread-store-check.js +1 -1
  351. package/dist/scripts/codex-agent-role-rich-content-check.js +2 -2
  352. package/dist/scripts/codex-agent-role-sync-check.js +2 -2
  353. package/dist/scripts/codex-agent-type-routing-check.js +2 -2
  354. package/dist/scripts/codex-app-execution-profile-check.js +2 -2
  355. package/dist/scripts/codex-app-handoff-check.js +1 -1
  356. package/dist/scripts/codex-app-handoff-launch-check.js +1 -1
  357. package/dist/scripts/codex-control-tool-output-continuity-audit-check.js +1 -1
  358. package/dist/scripts/codex-lb-fast-ui-preservation-check.js +1 -3
  359. package/dist/scripts/codex-native-feature-broker-blackbox.js +2 -2
  360. package/dist/scripts/codex-native-feature-broker-check.js +2 -2
  361. package/dist/scripts/{sks-3-1-6-directive-check-lib.js → codex-native-gate-lib.js} +5 -5
  362. package/dist/scripts/codex-native-harness-compat-check.js +2 -2
  363. package/dist/scripts/codex-native-hook-lifecycle-proof-check.js +2 -2
  364. package/dist/scripts/codex-plugin-app-template-policy-check.js +1 -1
  365. package/dist/scripts/codex-sdk-backend-router-check.js +1 -1
  366. package/dist/scripts/codex-sdk-capability-check.js +1 -1
  367. package/dist/scripts/context-graph-check.js +191 -0
  368. package/dist/scripts/context7-evidence-dedupe-check.js +1 -1
  369. package/dist/scripts/core-skill-card-schema-check.js +1 -1
  370. package/dist/scripts/core-skill-deployment-snapshot-check.js +1 -1
  371. package/dist/scripts/core-skill-heldout-validation-check.js +1 -1
  372. package/dist/scripts/core-skill-no-inference-optimizer-check.js +1 -1
  373. package/dist/scripts/core-skill-patch-check.js +1 -1
  374. package/dist/scripts/core-skill-route-runtime-integration-check.js +1 -1
  375. package/dist/scripts/current-command-surface-check.js +1 -1
  376. package/dist/scripts/current-surface-update-e2e-check.js +4 -1
  377. package/dist/scripts/current-upgrade-matrix-check.js +1 -1
  378. package/dist/scripts/dfix-fixture-check.js +1 -1
  379. package/dist/scripts/dfix-patch-handoff-check.js +1 -1
  380. package/dist/scripts/dfix-verification-check.js +1 -1
  381. package/dist/scripts/dfix-verification-recommendation-check.js +1 -1
  382. package/dist/scripts/docs-truthfulness-check.js +16 -3
  383. package/dist/scripts/doctor-codex-app-harness-check.js +2 -2
  384. package/dist/scripts/evidence-flagship-coverage-check.js +1 -1
  385. package/dist/scripts/{sks-1-18-gate-lib.js → gate-lib.js} +1 -1
  386. package/dist/scripts/gate-policy-audit-check.js +4 -1
  387. package/dist/scripts/git-worktree-checkpoint-check.js +1 -1
  388. package/dist/scripts/git-worktree-cross-rebase-check.js +1 -1
  389. package/dist/scripts/git-worktree-diff-envelope-check.js +1 -1
  390. package/dist/scripts/git-worktree-dirty-lock-check.js +1 -1
  391. package/dist/scripts/git-worktree-dirty-main-detection-check.js +1 -1
  392. package/dist/scripts/git-worktree-integration-primary-check.js +1 -1
  393. package/dist/scripts/git-worktree-manifest-append-check.js +1 -1
  394. package/dist/scripts/git-worktree-untracked-diff-check.js +1 -1
  395. package/dist/scripts/harness-benchmark-check.js +1 -1
  396. package/dist/scripts/helper-dedup-check.js +61 -0
  397. package/dist/scripts/hook-latency-budget-check.js +1 -1
  398. package/dist/scripts/image-artifact-path-contract-check.js +1 -1
  399. package/dist/scripts/imagegen-real-smoke-check.js +2 -5
  400. package/dist/scripts/installed-package-smoke-check.js +5 -2
  401. package/dist/scripts/latest-version-guidance-check.js +74 -0
  402. package/dist/scripts/legacy-gate-inventory-check.js +1 -1
  403. package/dist/scripts/legacy-gate-purge-check.js +1 -1
  404. package/dist/scripts/legacy-strong-inventory-check.js +1 -1
  405. package/dist/scripts/lib/codex-sdk-gate-lib.js +1 -1
  406. package/dist/scripts/mad-sks-launch-sql-plane-boundary-check.js +1 -1
  407. package/dist/scripts/mad-sks-sql-plane-capability-check.js +1 -1
  408. package/dist/scripts/mad-sks-sql-plane-lifecycle-hook-decision-check.js +1 -1
  409. package/dist/scripts/mad-sks-sql-plane-result-lifecycle-check.js +1 -1
  410. package/dist/scripts/managed-config-merge-check.js +1 -1
  411. package/dist/scripts/mcp-plugin-inventory-check.js +1 -1
  412. package/dist/scripts/model-call-concurrency-check.js +1 -1
  413. package/dist/scripts/mutation-callsite-coverage-check.js +1 -1
  414. package/dist/scripts/naruto-ssot-gate-aliases-check.js +1 -1
  415. package/dist/scripts/naruto-ssot-pipeline-default-check.js +1 -1
  416. package/dist/scripts/naruto-ssot-route-normalization-check.js +1 -1
  417. package/dist/scripts/naruto-ssot-routing-check.js +1 -1
  418. package/dist/scripts/naruto-worktree-coding-blackbox.js +1 -1
  419. package/dist/scripts/native-capability-repair-matrix-check.js +1 -1
  420. package/dist/scripts/native-image-generation-repair-check.js +1 -1
  421. package/dist/scripts/official-subagent-workflow-check.js +3 -3
  422. package/dist/scripts/package-published-contract-check.js +37 -4
  423. package/dist/scripts/packlist-performance-check.js +17 -1
  424. package/dist/scripts/pipeline-codex-native-doctor-mad-routing-real-blackbox.js +1 -3
  425. package/dist/scripts/ppt-real-export-adapter-check.js +1 -1
  426. package/dist/scripts/ppt-real-imagegen-wiring-check.js +1 -1
  427. package/dist/scripts/ppt-reexport-rereview-check.js +1 -1
  428. package/dist/scripts/prepublish-fast-check.js +1 -1
  429. package/dist/scripts/probe-memoization-check.js +2 -2
  430. package/dist/scripts/prompt-placeholder-guard-check.js +1 -1
  431. package/dist/scripts/qa-loop-app-handoff-capability-check.js +1 -1
  432. package/dist/scripts/qa-loop-app-handoff-check.js +1 -1
  433. package/dist/scripts/qa-loop-app-handoff-cli-check.js +1 -1
  434. package/dist/scripts/qa-loop-app-handoff-confirmation-check.js +1 -1
  435. package/dist/scripts/qa-loop-app-handoff-gate-lifecycle-check.js +1 -1
  436. package/dist/scripts/qa-loop-app-handoff-launch-check.js +1 -1
  437. package/dist/scripts/qa-loop-app-handoff-status-lifecycle-check.js +1 -1
  438. package/dist/scripts/qa-loop-budget-policy-check.js +1 -1
  439. package/dist/scripts/qa-loop-effort-escalation-check.js +1 -1
  440. package/dist/scripts/qa-loop-execution-profile-routing-check.js +2 -2
  441. package/dist/scripts/qa-loop-image-path-exposure-check.js +1 -1
  442. package/dist/scripts/qa-loop-image-path-prompt-injection-check.js +1 -1
  443. package/dist/scripts/{sks-1-12-real-execution-check-lib.js → real-execution-check-lib.js} +1 -1
  444. package/dist/scripts/release-affected-selector-check.js +1 -1
  445. package/dist/scripts/release-aggressive-resource-governor-check.js +1 -1
  446. package/dist/scripts/release-cache-glob-hashing-check.js +1 -1
  447. package/dist/scripts/release-cache-input-classifier-check.js +1 -1
  448. package/dist/scripts/release-cache-neutralization-report-check.js +1 -1
  449. package/dist/scripts/release-cache-version-neutral-fixture-check.js +1 -1
  450. package/dist/scripts/release-dynamic-presets-check.js +2 -2
  451. package/dist/scripts/release-full-parallelism-blackbox.js +1 -1
  452. package/dist/scripts/release-gate-batch-runner-check.js +1 -1
  453. package/dist/scripts/release-gate-budget-check.js +1 -1
  454. package/dist/scripts/release-gate-dag-runner-check.js +1 -1
  455. package/dist/scripts/release-latency-slo-check.js +1 -1
  456. package/dist/scripts/release-metadata-check.js +273 -2
  457. package/dist/scripts/release-parallel-speed-budget-check.js +1 -1
  458. package/dist/scripts/release-proof-truth-check.js +1 -1
  459. package/dist/scripts/release-provenance-check.js +1 -1
  460. package/dist/scripts/release-runtime-truth-matrix-check.js +1 -1
  461. package/dist/scripts/research-blueprint-densifier-check.js +1 -1
  462. package/dist/scripts/research-claim-builder-check.js +1 -1
  463. package/dist/scripts/research-complete-package-fixture-check.js +1 -1
  464. package/dist/scripts/research-execution-profile-routing-check.js +2 -2
  465. package/dist/scripts/research-final-reviewer-blackbox.js +1 -1
  466. package/dist/scripts/{sks-3-1-4-directive-check-lib.js → runtime-domain-gate-lib.js} +2 -2
  467. package/dist/scripts/runtime-proof-summary-check.js +1 -1
  468. package/dist/scripts/runtime-script-pack-closure-check.js +7 -1
  469. package/dist/scripts/scheduler-batch-dispatch-check.js +1 -1
  470. package/dist/scripts/scheduler-parallel-proof-consistency-check.js +1 -1
  471. package/dist/scripts/scheduler-utilization-integral-check.js +1 -1
  472. package/dist/scripts/search-visibility-gate-lib.js +1 -1
  473. package/dist/scripts/secret-preservation-check.js +1 -1
  474. package/dist/scripts/seo-geo-geo-disambiguation-check.js +1 -1
  475. package/dist/scripts/seo-geo-skill-rich-content-check.js +1 -1
  476. package/dist/scripts/side-effect-runtime-report-check.js +1 -1
  477. package/dist/scripts/{sks-3-1-8-check-lib.js → skill-fixture-check-lib.js} +1 -1
  478. package/dist/scripts/skill-name-canonicalizer-check.js +1 -1
  479. package/dist/scripts/skills-manifest-continuity-check.js +1 -1
  480. package/dist/scripts/sks-uninstall-regression-check.js +1 -1
  481. package/dist/scripts/sksd-daemon-check.js +1 -1
  482. package/dist/scripts/super-search-provider-interface-check.js +1 -1
  483. package/dist/scripts/triwiki-cache-key-check.js +1 -1
  484. package/dist/scripts/triwiki-proof-bank-blackbox.js +2 -2
  485. package/dist/scripts/triwiki-proof-bank-check.js +1 -1
  486. package/dist/scripts/triwiki-proof-card-check.js +1 -1
  487. package/dist/scripts/type-surface-codex-app-check.js +2 -2
  488. package/dist/scripts/{sks-3-1-5-directive-check-lib.js → typed-routing-gate-lib.js} +2 -2
  489. package/dist/scripts/ultra-router-auto-router-check.js +1 -1
  490. package/dist/scripts/ux-review-extract-wires-real-extractor-check.js +1 -1
  491. package/dist/scripts/ux-review-imagegen-blackbox-check.js +25 -1
  492. package/dist/scripts/ux-review-patch-diff-recheck-check.js +1 -1
  493. package/dist/scripts/ux-review-run-wires-imagegen-check.js +18 -3
  494. package/package.json +6 -8
  495. package/release-gates.v2.json +240 -11
  496. package/runtime-required-scripts.json +137 -22
  497. package/schemas/triwiki/context-graph.schema.json +119 -0
  498. package/config/bench-baseline.json +0 -7
  499. package/dist/core/codex-app/sks-menubar.js +0 -1
  500. package/dist/core/release/release-closure-contract.js +0 -30
  501. package/dist/core/release/release-closure-helpers.js +0 -293
  502. package/dist/core/release/release-closure-validation.js +0 -284
  503. package/dist/core/release/release-closure.js +0 -163
  504. package/dist/core/triwiki/code-index-scanner.js +0 -309
  505. package/dist/scripts/build-dist.js +0 -124
  506. package/dist/scripts/build-once-runner-check.js +0 -6
  507. package/dist/scripts/canonical-test-runner.js +0 -234
  508. package/dist/scripts/changelog-check.js +0 -45
  509. package/dist/scripts/check-architecture.js +0 -295
  510. package/dist/scripts/check-cli-entrypoint.js +0 -41
  511. package/dist/scripts/check-command-module-budget.js +0 -77
  512. package/dist/scripts/check-feature-quality.js +0 -51
  513. package/dist/scripts/check-legacy-free.js +0 -64
  514. package/dist/scripts/check-pipeline-budget.js +0 -49
  515. package/dist/scripts/check-pipeline-runtime.js +0 -16
  516. package/dist/scripts/check-publish-tag.js +0 -56
  517. package/dist/scripts/check-route-modularity.js +0 -72
  518. package/dist/scripts/codex-0140-capability-check.js +0 -14
  519. package/dist/scripts/codex-0140-feature-probes-check.js +0 -23
  520. package/dist/scripts/codex-permission-profiles-check.js +0 -34
  521. package/dist/scripts/codex-project-config-policy-splitter-check.js +0 -49
  522. package/dist/scripts/competitor-scorecard-check.js +0 -24
  523. package/dist/scripts/core-skill-no-drift-check.js +0 -23
  524. package/dist/scripts/db-route-materialization-check.js +0 -32
  525. package/dist/scripts/doctor-context7-mcp-repair-blackbox.js +0 -15
  526. package/dist/scripts/doctor-fastpath-check.js +0 -25
  527. package/dist/scripts/doctor-fix-production-blackbox.js +0 -35
  528. package/dist/scripts/doctor-idempotence-check.js +0 -6
  529. package/dist/scripts/doctor-ops-semantics-check.js +0 -83
  530. package/dist/scripts/doctor-startup-config-repair-blackbox.js +0 -18
  531. package/dist/scripts/doctor-supabase-mcp-repair-blackbox.js +0 -13
  532. package/dist/scripts/ensure-bin-executable.js +0 -16
  533. package/dist/scripts/fsx-hotpath-check.js +0 -9
  534. package/dist/scripts/high-risk-contracts-check.js +0 -183
  535. package/dist/scripts/hook-latency-quantum-check.js +0 -120
  536. package/dist/scripts/import-graph-budget-check.js +0 -9
  537. package/dist/scripts/mcp-tool-naming-parity-check.js +0 -14
  538. package/dist/scripts/naruto-codex-e2e-check.js +0 -105
  539. package/dist/scripts/naruto-write-e2e-check.js +0 -31
  540. package/dist/scripts/native-capability-postcheck-check.js +0 -16
  541. package/dist/scripts/ops-diagnostics-bundle-check.js +0 -11
  542. package/dist/scripts/parallel-production-smoke-check.js +0 -20
  543. package/dist/scripts/perf-budget-check.js +0 -12
  544. package/dist/scripts/postinstall-global-doctor-blackbox.js +0 -10
  545. package/dist/scripts/project-skill-dedupe-blackbox.js +0 -62
  546. package/dist/scripts/release-dag-full-coverage-check.js +0 -98
  547. package/dist/scripts/release-dist-freshness-check.js +0 -6
  548. package/dist/scripts/release-file-ownership-check.js +0 -35
  549. package/dist/scripts/release-gate-script-parity-check.js +0 -148
  550. package/dist/scripts/release-macos-menubar-proof.js +0 -202
  551. package/dist/scripts/release-main-push-guard.js +0 -37
  552. package/dist/scripts/release-main-push-receipt.js +0 -43
  553. package/dist/scripts/release-metadata-1-19-check.js +0 -257
  554. package/dist/scripts/release-version-truth-check.js +0 -138
  555. package/dist/scripts/retention-apply-smoke-check.js +0 -19
  556. package/dist/scripts/retention-budget-check.js +0 -6
  557. package/dist/scripts/retention-dry-run-check.js +0 -8
  558. package/dist/scripts/rollback-recovery-smoke-check.js +0 -70
  559. package/dist/scripts/route-intent-regression-check.js +0 -42
  560. package/dist/scripts/runtime-current-terminal-check.js +0 -108
  561. package/dist/scripts/runtime-dist-parity-check.js +0 -76
  562. package/dist/scripts/runtime-no-src-mjs-check.js +0 -30
  563. package/dist/scripts/runtime-ts-rust-boundary-check.js +0 -58
  564. package/dist/scripts/runtime-ts-source-of-truth-check.js +0 -53
  565. package/dist/scripts/secret-preservation-guard-check.js +0 -36
  566. package/dist/scripts/seo-marketing-truthfulness-check.js +0 -98
  567. package/dist/scripts/seo-metadata-sync-check.js +0 -60
  568. package/dist/scripts/sizecheck.js +0 -148
  569. package/dist/scripts/sks-menubar-install-check.js +0 -333
  570. package/dist/scripts/supabase-secret-preservation-blackbox.js +0 -28
  571. package/dist/scripts/super-search-live-smoke-check.js +0 -115
  572. package/dist/scripts/super-search-local-http-smoke-check.js +0 -16
  573. package/dist/scripts/super-search-offline-contract-check.js +0 -43
  574. package/dist/scripts/update-fastpath-check.js +0 -28
  575. package/dist/scripts/update-preserves-supabase-keys-blackbox.js +0 -26
  576. package/dist/scripts/upgrade-migration-matrix-check.js +0 -351
  577. package/dist/scripts/write-build-manifest.js +0 -70
  578. package/dist/scripts/zellij-capability-check.js +0 -13
  579. package/dist/scripts/zellij-developer-controls-check.js +0 -16
  580. package/dist/scripts/zellij-doctor-readiness-check.js +0 -49
  581. package/dist/scripts/zellij-dynamic-pane-lifecycle-check.js +0 -19
  582. package/dist/scripts/zellij-fake-adapter-check.js +0 -31
  583. package/dist/scripts/zellij-first-slot-down-stack-check.js +0 -20
  584. package/dist/scripts/zellij-first-slot-down-stack-real-check.js +0 -348
  585. package/dist/scripts/zellij-homebrew-policy-check.js +0 -3
  586. package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -21
  587. package/dist/scripts/zellij-lane-renderer-check.js +0 -78
  588. package/dist/scripts/zellij-launch-command-truth-check.js +0 -62
  589. package/dist/scripts/zellij-layout-valid-check.js +0 -120
  590. package/dist/scripts/zellij-pane-creation-lock-metrics-check.js +0 -10
  591. package/dist/scripts/zellij-pane-lock-concurrency-blackbox.js +0 -78
  592. package/dist/scripts/zellij-pane-lock-does-not-block-worker-check.js +0 -12
  593. package/dist/scripts/zellij-pane-lock-open-worker-integration-blackbox.js +0 -134
  594. package/dist/scripts/zellij-qa-app-handoff-status-check.js +0 -7
  595. package/dist/scripts/zellij-right-column-geometry-proof.js +0 -158
  596. package/dist/scripts/zellij-right-column-headless-overflow-check.js +0 -20
  597. package/dist/scripts/zellij-right-column-manager-check.js +0 -24
  598. package/dist/scripts/zellij-self-heal-check.js +0 -3
  599. package/dist/scripts/zellij-self-heal-dry-run-check.js +0 -3
  600. package/dist/scripts/zellij-self-heal-status-contract-check.js +0 -3
  601. package/dist/scripts/zellij-self-heal-typed-blackbox.js +0 -3
  602. package/dist/scripts/zellij-slot-column-anchor-check.js +0 -65
  603. package/dist/scripts/zellij-slot-column-anchor-telemetry-check.js +0 -8
  604. package/dist/scripts/zellij-slot-only-ui-check.js +0 -29
  605. package/dist/scripts/zellij-slot-pane-renderer-check.js +0 -149
  606. package/dist/scripts/zellij-slot-pane-stale-detection-check.js +0 -65
  607. package/dist/scripts/zellij-slot-pane-telemetry-renderer-check.js +0 -11
  608. package/dist/scripts/zellij-slot-renderer-proof-semantics-check.js +0 -58
  609. package/dist/scripts/zellij-slot-telemetry-check.js +0 -38
  610. package/dist/scripts/zellij-slot-telemetry-incremental-check.js +0 -46
  611. package/dist/scripts/zellij-slot-telemetry-live-flush-check.js +0 -55
  612. package/dist/scripts/zellij-slot-telemetry-performance-check.js +0 -32
  613. package/dist/scripts/zellij-slot-telemetry-real-blackbox.js +0 -19
  614. package/dist/scripts/zellij-slot-telemetry-renderer-check.js +0 -11
  615. package/dist/scripts/zellij-slot-telemetry-runtime-check.js +0 -23
  616. package/dist/scripts/zellij-spawn-on-demand-layout-check.js +0 -45
  617. package/dist/scripts/zellij-stacked-capability-routing-check.js +0 -9
  618. package/dist/scripts/zellij-stacked-fallback-integration-blackbox.js +0 -78
  619. package/dist/scripts/zellij-stacked-version-matrix-check.js +0 -29
  620. package/dist/scripts/zellij-stacked-version-parser-check.js +0 -19
  621. package/dist/scripts/zellij-ui-design-check.js +0 -92
  622. package/dist/scripts/zellij-update-missing-self-heal-check.js +0 -3
  623. package/dist/scripts/zellij-update-prompt-matrix-check.js +0 -16
  624. package/dist/scripts/zellij-update-prompt-mode-check.js +0 -18
  625. package/dist/scripts/zellij-update-prompt-safety-check.js +0 -8
  626. package/dist/scripts/zellij-worker-pane-manager-check.js +0 -108
  627. package/dist/scripts/zellij-worker-pane-manager-single-owner-check.js +0 -47
  628. package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -199
  629. /package/dist/scripts/{sks-1-11-gate-lib.js → sks-cli-gate-lib.js} +0 -0
package/README.md CHANGED
@@ -22,7 +22,9 @@ Proof-first orchestration for Codex CLI, ChatGPT Desktop, AI coding agents, mult
22
22
  Sneakoscope Codex (`sks`) is an open-source trust layer for Codex CLI and ChatGPT Desktop. It coordinates bounded AI coding agents, records machine-verifiable evidence, preserves project memory, and blocks release claims that are not supported by current tests or artifacts. Search visibility outcomes are measured separately; SKS does not promise rankings or traffic.
23
23
  <!-- END SKS SEARCH VISIBILITY MARKETING -->
24
24
 
25
- Current release: **SKS 7.1.1**, with the package preferred Codex channel at **CLI 0.145.0**. SKS stays version-agnostic: older hosts keep working where capabilities allow, while Menu Bar / Center induce updates to the preferred latest. It resolves managed SKS skills from the authoritative global install, preserves a runnable Naruto child slot when `max_threads=2`, and keeps current-version Menu Bar repair transactional so stamped generations remain verifiable. Naruto uses stable opt-in multi-agent V2 when the host exposes it. See [CHANGELOG.md](CHANGELOG.md).
25
+ This README documents package **SKS 7.5.0** its own identity, read from `package.json` and verified by the release gate, not advice about what to install.
26
+
27
+ Use the official latest stable SKS and Codex CLI releases. SKS stays version-agnostic: older hosts keep working where capabilities allow, while Menu Bar / Center induce updates to the latest stable build. Run `sks update-check` for what is installed and read the capability report for what is actually supported — feature availability is decided by capability probes, not by a version number printed in a document. It resolves managed SKS skills from the authoritative global install, preserves a runnable Naruto child slot when `max_threads=2`, and keeps Menu Bar repair transactional so stamped generations remain verifiable. Naruto uses stable opt-in multi-agent V2 when the host exposes it. Local code search is mode-separated (`sks search files|text|structure|symbol|context`); `context` is answered by the compiled TriWiki Context Graph with evidence paths rather than lexical guessing — see [docs/architecture/context-graph.md](docs/architecture/context-graph.md) and [docs/architecture/search-engine-target.md](docs/architecture/search-engine-target.md). See [CHANGELOG.md](CHANGELOG.md).
26
28
 
27
29
  ## What 7.0.0 Ships
28
30
 
@@ -45,8 +47,15 @@ That installs or repairs SKS, runs `sks doctor --fix`, and prepares the Codex Ap
45
47
 
46
48
  For package-managed installs:
47
49
 
50
+ The npm lifecycle is non-mutating outside the installed package by default:
51
+ it restores only the package-local build stamp and prints the explicit setup
52
+ commands. To intentionally run the legacy bootstrap during installation, set
53
+ `SKS_POSTINSTALL_BOOTSTRAP=1`; `SKS_POSTINSTALL_NO_BOOTSTRAP=1` remains the
54
+ stronger safety override.
55
+
48
56
  ```sh
49
57
  npm i -g sneakoscope
58
+ sks bootstrap --yes
50
59
  sks doctor --fix
51
60
  ```
52
61
 
@@ -56,10 +65,12 @@ The SKS menu bar shows the installed Codex CLI version and latest known version.
56
65
 
57
66
  ### Telegram remote coding on this Mac
58
67
 
59
- Open **SKS Center → Remote & Telegram**, create a private bot with BotFather, send `/start` to that bot from the Telegram account you want to pair, then choose **Connect Bot & Register Coding Session…** and paste the token. SKS verifies the bot, stores the token only in macOS Keychain, pairs only that private chat/user, and registers one dedicated session bound to the current project. Choose **Start Hub**, then send ordinary text to the bot. On the first real message, the Hub creates the Codex thread and starts its first turn in the same App Server connection so the thread is durably resumable; later messages resume that exact thread and return the final response to Telegram.
68
+ Open **SKS Center → Remote & Telegram**, create a bot with BotFather, send `/start` to that bot from the Telegram account you want to pair, then choose **Connect Bot & Register Coding Session…** and paste the token. SKS verifies the bot, stores the token only in macOS Keychain, pairs only that private chat/user, and registers one dedicated session bound to the current project. Choose **Start Hub**, then send ordinary text to the bot. On the first real message, the Hub creates the Codex thread and starts its first turn in the same App Server connection so the thread is durably resumable; later messages resume that exact thread and return the final response to Telegram.
60
69
 
61
70
  The Hub runs as a user LaunchAgent and uses `caffeinate -i` while the logged-in Mac is available. The Mac still needs to remain powered on, logged in, awake, and network-connected; closing the lid or logging out can stop access. Telegram input has no arbitrary shell path, runs with approvals disabled and network access disabled inside the Codex workspace sandbox, and cannot target an unpaired chat or another project.
62
71
 
72
+ SKS Center is the menu bar companion: install it with `sks menubar install`, then click the SKS icon in the macOS menu bar and choose **Open SKS Control Center…**. Every GUI step above has a CLI equivalent (`sks telegram setup --bot-token-stdin`, `sks telegram hub start`, `sks telegram status`). The hub uses long polling, so a bot with an existing webhook must have that webhook removed before the hub can start; SKS fails closed with `telegram_webhook_conflict` and never clears it automatically. See **[docs/telegram-and-center.md](docs/telegram-and-center.md)** for the complete BotFather setup, optional command menu and privacy-mode guidance, secure token rotation, verification, and troubleshooting.
73
+
63
74
  ## The Front Door
64
75
 
65
76
  | Command | What it does |
@@ -82,10 +93,113 @@ Gates are task-profile aware: greetings and answer-only turns create no mission
82
93
 
83
94
  Every installed Codex hook runs one common Naruto decision gate. The gate records `none`, `generic_naruto`, or `route_owned`: Answer, DFix, Wiki, Computer Use, Goal, and simple Git/control turns stay lightweight; ordinary non-trivial work defaults to two independent official subagents; critical work spanning at least three risk domains may use three. Research, AutoResearch, and QA-Loop retain their own exact orchestration contracts instead of receiving a second generic fan-out. Explicit `--agents N` remains authoritative.
84
95
 
85
- SKS installs twenty-five narrow project custom agents, including native AppKit, toolchain, protocol, runtime-reliability, TriWiki-evidence, long-context, Computer Use, Browser/Chrome, and image-generation specialists. Delegation prompts inject at most the three roles recommended for the current goal rather than serializing the full catalog, so expanding role coverage does not serialize the full inventory into every prompt. TriWiki context is also bounded and query-aware: ordinary work receives up to four trust/hydration anchors and complex, parallel, or high-risk work receives up to six, with source hydration required before relying on lower-trust hints. In CLI Zellij mode, the right side is a live observability surface rather than a static lane reservation: one monitor plus one viewport by default (maximum three) shows official thread role/model, redacted live phase/task/file updates from rollout-compatible Codex 0.144.1+ sessions while the current release baseline remains 0.145.0, plus `running`, `verifying`, and trustworthy parent-verdict completion/failure states. Rollout activity is display-only and never completion proof.
96
+ SKS installs twenty-five narrow project custom agents, including native AppKit, toolchain, protocol, runtime-reliability, TriWiki-evidence, long-context, Computer Use, Browser/Chrome, and image-generation specialists. Delegation prompts inject at most the three roles recommended for the current goal rather than serializing the full catalog, so expanding role coverage does not serialize the full inventory into every prompt. TriWiki context is also bounded and query-aware: ordinary work receives up to four trust/hydration anchors and complex, parallel, or high-risk work receives up to six, with source hydration required before relying on lower-trust hints. In CLI Zellij mode, the right side is a live observability surface rather than a static lane reservation: one monitor plus one viewport by default (maximum three) shows official thread role/model, redacted live phase/task/file updates from rollout-compatible Codex sessions on the official latest stable CLI, plus `running`, `verifying`, and trustworthy parent-verdict completion/failure states. Rollout activity is display-only and never completion proof.
86
97
 
87
98
  Official subagent requests use `--agents`; removed scheduler, pool, backend, and model flags fail closed.
88
99
 
100
+ ## Embedding SKS In Another Agent System
101
+
102
+ By default SKS owns the credential: it pins `model_provider="openai"` and `forced_login_method="chatgpt"`, so an operator's interactive ChatGPT session authenticates the run and it cannot drift onto another provider unnoticed.
103
+
104
+ That default is wrong for an unattended host. An orchestrator that already holds and rotates a customer's OpenAI-compatible credential — a local codex-lb endpoint, OpenRouter, any `env_key` provider block — cannot log in interactively on every node, and forcing `chatgpt` makes Codex treat an `auth_mode="apikey"` session as a hard logout and delete `auth.json`. **Host mode** hands that decision back.
105
+
106
+ ```sh
107
+ sks naruto run "task" \
108
+ --auth-mode=host \
109
+ --model-provider=codex-lb \
110
+ --provider-env-key=CODEX_LB_API_KEY
111
+ ```
112
+
113
+ | Surface | Flag | Environment | Effect |
114
+ | --- | --- | --- | --- |
115
+ | Who authenticates | `--auth-mode=host` | `SKS_NARUTO_AUTH_MODE=host` | SKS injects neither `model_provider` nor `forced_login_method`; Codex uses your `config.toml` provider block |
116
+ | Which provider block | `--model-provider=<name>` | `SKS_NARUTO_MODEL_PROVIDER` | Names a `[model_providers.<name>]` block. Host mode only |
117
+ | Which credential variable | `--provider-env-key=<NAME>` | `SKS_NARUTO_PROVIDER_ENV_KEY` | Forwards exactly that variable to the child so the block's `env_key` resolves. Host mode only |
118
+ | Release the login only | `--no-forced-login-method` | `SKS_NARUTO_FORCED_LOGIN_METHOD=none` | Keeps the SKS provider, drops the forced ChatGPT login |
119
+ | Parent model / effort | `--parent-model`, `--parent-effort` | `SKS_NARUTO_PARENT_MODEL`, `SKS_NARUTO_PARENT_EFFORT` | Overrides the built-in parent policy |
120
+ | Subagent model / effort | `--subagent-model`, `--subagent-effort` | `SKS_NARUTO_SUBAGENT_MODEL`, `SKS_NARUTO_SUBAGENT_EFFORT` | Overrides the default subagent policy |
121
+
122
+ Guarantees this contract makes:
123
+
124
+ - **SKS never reads, stores, forwards to a third party, or logs your credential.** It forwards one named environment variable to the Codex child and records only that variable's *name* in receipts. Values of secret-shaped variables are redacted from captured output.
125
+ - **A malformed value blocks the run.** An unknown auth mode, a provider name with a space, an effort tier that is not `minimal|low|medium|high|max`, or a `--provider-env-key` that is absent from the environment all fail before mission state is written. SKS never quietly falls back to its own credential — that surprise is the failure mode this contract exists to prevent.
126
+ - **Mixed configurations are refused.** Naming a provider while SKS still forces a ChatGPT login would authenticate one way and bill another, so it is a blocker rather than a silent precedence rule.
127
+ - **The default is unchanged.** Managed mode still pins the ChatGPT login, and the real-credential smoke gate still proves it.
128
+
129
+ ### Designing an adapter that wraps SKS without fighting it
130
+
131
+ The rule that keeps an adapter conflict-free: **let SKS own the mission, the evidence, and the gates; let the host own the credential, the model policy, and the workspace.** Cross that line — by patching `dist/`, writing `.sneakoscope/` yourself, or re-implementing the gate DAG — and every SKS update breaks you.
132
+
133
+ ```ts
134
+ // acas/adapters/sks.ts — one process boundary, no dist patching.
135
+ import { execFile } from 'node:child_process'
136
+ import { promisify } from 'node:util'
137
+
138
+ const run = promisify(execFile)
139
+
140
+ export interface SksMissionRequest {
141
+ workspace: string // host owns the checkout
142
+ task: string
143
+ agents?: number
144
+ tenant: {
145
+ providerBlock: string // [model_providers.<name>] the host wrote into config.toml
146
+ credentialEnvKey: string // env var the block's env_key points at
147
+ credential: string // held by the host; never persisted by SKS
148
+ parentModel?: string
149
+ subagentModel?: string
150
+ }
151
+ }
152
+
153
+ export async function runSksMission(request: SksMissionRequest) {
154
+ const { stdout } = await run('sks', [
155
+ 'naruto', 'run', request.task,
156
+ '--json',
157
+ ...(request.agents ? ['--agents', String(request.agents)] : []),
158
+ // Host owns authentication and model policy.
159
+ '--auth-mode=host',
160
+ `--model-provider=${request.tenant.providerBlock}`,
161
+ `--provider-env-key=${request.tenant.credentialEnvKey}`,
162
+ ...(request.tenant.parentModel ? [`--parent-model=${request.tenant.parentModel}`] : []),
163
+ ...(request.tenant.subagentModel ? [`--subagent-model=${request.tenant.subagentModel}`] : [])
164
+ ], {
165
+ cwd: request.workspace,
166
+ env: {
167
+ ...process.env,
168
+ // The one variable the provider block resolves. Scope it to this call
169
+ // rather than exporting it process-wide.
170
+ [request.tenant.credentialEnvKey]: request.tenant.credential
171
+ },
172
+ maxBuffer: 64 * 1024 * 1024
173
+ })
174
+ // SKS answers with its own result schema; treat it as the source of truth for
175
+ // status and evidence rather than re-deriving success from stdout text.
176
+ return JSON.parse(stdout)
177
+ }
178
+ ```
179
+
180
+ Then read the outcome through SKS's own surfaces instead of inferring it:
181
+
182
+ ```sh
183
+ sks naruto proof --json # completion proof, blockers, evidence links
184
+ sks triwiki graph-status --fast --json # is the compiled graph usable right now (no git, no spawn)
185
+ sks search context "..." --json # evidence-backed context with reason paths
186
+ ```
187
+
188
+ `graph-status --fast` is the probe to poll from a host loop: it reads the stored
189
+ artifacts only, so it costs no subprocess, and it reports which staleness reasons
190
+ it could not evaluate rather than returning a `fresh` that means less than it
191
+ looks. Drop `--fast` when you want the full git-aware verdict.
192
+
193
+ Adapter rules that keep updates safe:
194
+
195
+ 1. **One process boundary.** Shell out to the `sks` CLI with `--json`. Do not import SKS internals; they are not a published API and they move.
196
+ 2. **Never patch `dist/`.** A local patch is overwritten by every install and is asserted against by release gates. If a behaviour you need is missing, it belongs behind a flag like the ones above.
197
+ 3. **Host owns the workspace, SKS owns `.sneakoscope/`.** Write your own state anywhere else; treat `.sneakoscope/` as SKS-owned and read-only from outside.
198
+ 4. **Pass credentials per invocation, not per machine.** A per-call `env` entry keeps one tenant's key out of another tenant's run.
199
+ 5. **Let the gates fail.** A blocked mission with blockers is a correct answer. Do not retry it with safety flags off, and do not treat `--trusted-project` as a default — it is an operator decision about a reviewed checkout.
200
+ 6. **Do not pin a version in your own docs or error strings.** Ask for the official latest stable release and read the capability report; SKS enforces this on itself with the `latest-version:guidance` gate.
201
+ 7. **Parallelism advice is advisory.** `sks naruto` decides its own wave shape; if you plan slices yourself, check them against the graph advisory rather than assuming disjointness.
202
+
89
203
  ## Why Not Just An LLM Reviewer?
90
204
 
91
205
  | Question | Oracle-style LLM review | SKS gate/review |
@@ -113,7 +227,7 @@ It shows the current quickstart flow: one-line install, `$sks-plan`, `sks review
113
227
  - Project memory: `sks memory build`
114
228
  - Codebase index/pack for LLM context: `sks wiki refresh --code`, `sks wiki validate --json` (code-pack freshness)
115
229
  - Native capability repair: `sks doctor --fix` (imagegen/Computer Use/Browser Use), `.sneakoscope/reports/native-capability-readiness.json`
116
- - codex-lb continuity: `sks codex-lb status --json` verifies the selected proxy's unauthenticated `/health` `X-App-Version`. Tool-heavy continuation requires codex-lb `1.21.0-beta.3` or later; older or unverified deployments block setup, doctor, and launch instead of silently falling back.
230
+ - codex-lb continuity: `sks codex-lb status --json` verifies the selected proxy's unauthenticated `/health` `X-App-Version`. Tool-heavy continuation requires a codex-lb deployment that reports the capability; use the official latest stable release. Older or unverified deployments block setup, doctor, and launch instead of silently falling back.
117
231
  - Agent bridge for any agent system: `sks mcp-server`, `sks agent-bridge setup`, `SKS_AGENT_MODE=1` — see [docs/AGENT-BRIDGE.md](docs/AGENT-BRIDGE.md)
118
232
  - Release gates: `npm run release:check:affected` for ordinary change-aware verification and `npm run release:check:confidence` for the final local confidence pass.
119
233
  - Release preparation: typecheck, one clean build, focused tests, affected/confidence gates, then `npm publish --dry-run --json --registry https://registry.npmjs.org/ --tag latest --access public`. The dry-run does not publish; authorization remains a separate maintainer workflow.
@@ -25,12 +25,6 @@
25
25
  "max_lines": 500,
26
26
  "new_file_max_lines": 500
27
27
  },
28
- {
29
- "id": "menubar-facade",
30
- "match": "^src/core/codex-app/sks-menubar\\.ts$",
31
- "max_lines": 80,
32
- "new_file_max_lines": 80
33
- },
34
28
  {
35
29
  "id": "menubar-typescript",
36
30
  "match": "^src/core/codex-app/menubar/.*\\.ts$",
@@ -63,8 +57,7 @@
63
57
  "file",
64
58
  "reason",
65
59
  "policy",
66
- "baseline_lines",
67
- "expires_version"
60
+ "baseline_lines"
68
61
  ]
69
62
  }
70
63
  }
@@ -2,18 +2,174 @@
2
2
  # It is not intended for manual editing.
3
3
  version = 4
4
4
 
5
+ [[package]]
6
+ name = "aho-corasick"
7
+ version = "1.1.4"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
10
+ dependencies = [
11
+ "memchr",
12
+ ]
13
+
14
+ [[package]]
15
+ name = "bstr"
16
+ version = "1.13.0"
17
+ source = "registry+https://github.com/rust-lang/crates.io-index"
18
+ checksum = "1f7dc094d718f2e1c1559ad110e27eeaae14a5465d3d56dd6dbd793079fbd530"
19
+ dependencies = [
20
+ "memchr",
21
+ "regex-automata",
22
+ "serde_core",
23
+ ]
24
+
25
+ [[package]]
26
+ name = "cfg-if"
27
+ version = "1.0.4"
28
+ source = "registry+https://github.com/rust-lang/crates.io-index"
29
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
30
+
31
+ [[package]]
32
+ name = "crossbeam-deque"
33
+ version = "0.8.7"
34
+ source = "registry+https://github.com/rust-lang/crates.io-index"
35
+ checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb"
36
+ dependencies = [
37
+ "crossbeam-epoch",
38
+ "crossbeam-utils",
39
+ ]
40
+
41
+ [[package]]
42
+ name = "crossbeam-epoch"
43
+ version = "0.9.20"
44
+ source = "registry+https://github.com/rust-lang/crates.io-index"
45
+ checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f"
46
+ dependencies = [
47
+ "crossbeam-utils",
48
+ ]
49
+
50
+ [[package]]
51
+ name = "crossbeam-utils"
52
+ version = "0.8.22"
53
+ source = "registry+https://github.com/rust-lang/crates.io-index"
54
+ checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17"
55
+
56
+ [[package]]
57
+ name = "encoding_rs"
58
+ version = "0.8.35"
59
+ source = "registry+https://github.com/rust-lang/crates.io-index"
60
+ checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
61
+ dependencies = [
62
+ "cfg-if",
63
+ ]
64
+
65
+ [[package]]
66
+ name = "encoding_rs_io"
67
+ version = "0.1.7"
68
+ source = "registry+https://github.com/rust-lang/crates.io-index"
69
+ checksum = "1cc3c5651fb62ab8aa3103998dade57efdd028544bd300516baa31840c252a83"
70
+ dependencies = [
71
+ "encoding_rs",
72
+ ]
73
+
74
+ [[package]]
75
+ name = "globset"
76
+ version = "0.4.19"
77
+ source = "registry+https://github.com/rust-lang/crates.io-index"
78
+ checksum = "e47d37d2ae4464254884b60ab7071be2b876a9c35b696bd018ddcc76847309cd"
79
+ dependencies = [
80
+ "aho-corasick",
81
+ "bstr",
82
+ "log",
83
+ "regex-automata",
84
+ "regex-syntax",
85
+ ]
86
+
87
+ [[package]]
88
+ name = "grep-matcher"
89
+ version = "0.1.9"
90
+ source = "registry+https://github.com/rust-lang/crates.io-index"
91
+ checksum = "f9417543f4870fc8f1c8e1af870afae2431007626d9e703fce6471c468d33847"
92
+ dependencies = [
93
+ "memchr",
94
+ ]
95
+
96
+ [[package]]
97
+ name = "grep-regex"
98
+ version = "0.1.14"
99
+ source = "registry+https://github.com/rust-lang/crates.io-index"
100
+ checksum = "0ce0c256c3ad82bcc07b812c15a45ec1d398122e8e15124f96695234db7112ef"
101
+ dependencies = [
102
+ "bstr",
103
+ "grep-matcher",
104
+ "log",
105
+ "regex-automata",
106
+ "regex-syntax",
107
+ ]
108
+
109
+ [[package]]
110
+ name = "grep-searcher"
111
+ version = "0.1.17"
112
+ source = "registry+https://github.com/rust-lang/crates.io-index"
113
+ checksum = "72348823a0eafc4bc2e9051064f28b5b42cc100b571b3a35d67918d711efcbc6"
114
+ dependencies = [
115
+ "bstr",
116
+ "encoding_rs",
117
+ "encoding_rs_io",
118
+ "grep-matcher",
119
+ "log",
120
+ "memchr",
121
+ "memmap2",
122
+ ]
123
+
124
+ [[package]]
125
+ name = "ignore"
126
+ version = "0.4.31"
127
+ source = "registry+https://github.com/rust-lang/crates.io-index"
128
+ checksum = "7f8a7b8211e695a1d0cd91cace480d4d0bd57667ab10277cc412c5f7f4884f83"
129
+ dependencies = [
130
+ "crossbeam-deque",
131
+ "globset",
132
+ "log",
133
+ "memchr",
134
+ "regex-automata",
135
+ "same-file",
136
+ "walkdir",
137
+ "winapi-util",
138
+ ]
139
+
5
140
  [[package]]
6
141
  name = "itoa"
7
142
  version = "1.0.18"
8
143
  source = "registry+https://github.com/rust-lang/crates.io-index"
9
144
  checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
10
145
 
146
+ [[package]]
147
+ name = "libc"
148
+ version = "0.2.189"
149
+ source = "registry+https://github.com/rust-lang/crates.io-index"
150
+ checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
151
+
152
+ [[package]]
153
+ name = "log"
154
+ version = "0.4.33"
155
+ source = "registry+https://github.com/rust-lang/crates.io-index"
156
+ checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
157
+
11
158
  [[package]]
12
159
  name = "memchr"
13
160
  version = "2.8.0"
14
161
  source = "registry+https://github.com/rust-lang/crates.io-index"
15
162
  checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
16
163
 
164
+ [[package]]
165
+ name = "memmap2"
166
+ version = "0.9.11"
167
+ source = "registry+https://github.com/rust-lang/crates.io-index"
168
+ checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0"
169
+ dependencies = [
170
+ "libc",
171
+ ]
172
+
17
173
  [[package]]
18
174
  name = "proc-macro2"
19
175
  version = "1.0.106"
@@ -32,6 +188,32 @@ dependencies = [
32
188
  "proc-macro2",
33
189
  ]
34
190
 
191
+ [[package]]
192
+ name = "regex-automata"
193
+ version = "0.4.16"
194
+ source = "registry+https://github.com/rust-lang/crates.io-index"
195
+ checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad"
196
+ dependencies = [
197
+ "aho-corasick",
198
+ "memchr",
199
+ "regex-syntax",
200
+ ]
201
+
202
+ [[package]]
203
+ name = "regex-syntax"
204
+ version = "0.8.11"
205
+ source = "registry+https://github.com/rust-lang/crates.io-index"
206
+ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
207
+
208
+ [[package]]
209
+ name = "same-file"
210
+ version = "1.0.6"
211
+ source = "registry+https://github.com/rust-lang/crates.io-index"
212
+ checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
213
+ dependencies = [
214
+ "winapi-util",
215
+ ]
216
+
35
217
  [[package]]
36
218
  name = "serde"
37
219
  version = "1.0.228"
@@ -39,6 +221,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
39
221
  checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
40
222
  dependencies = [
41
223
  "serde_core",
224
+ "serde_derive",
42
225
  ]
43
226
 
44
227
  [[package]]
@@ -76,8 +259,15 @@ dependencies = [
76
259
 
77
260
  [[package]]
78
261
  name = "sks-core"
79
- version = "7.1.1"
262
+ version = "7.5.0"
80
263
  dependencies = [
264
+ "globset",
265
+ "grep-matcher",
266
+ "grep-regex",
267
+ "grep-searcher",
268
+ "ignore",
269
+ "memmap2",
270
+ "serde",
81
271
  "serde_json",
82
272
  ]
83
273
 
@@ -98,6 +288,40 @@ version = "1.0.24"
98
288
  source = "registry+https://github.com/rust-lang/crates.io-index"
99
289
  checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
100
290
 
291
+ [[package]]
292
+ name = "walkdir"
293
+ version = "2.5.0"
294
+ source = "registry+https://github.com/rust-lang/crates.io-index"
295
+ checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
296
+ dependencies = [
297
+ "same-file",
298
+ "winapi-util",
299
+ ]
300
+
301
+ [[package]]
302
+ name = "winapi-util"
303
+ version = "0.1.11"
304
+ source = "registry+https://github.com/rust-lang/crates.io-index"
305
+ checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
306
+ dependencies = [
307
+ "windows-sys",
308
+ ]
309
+
310
+ [[package]]
311
+ name = "windows-link"
312
+ version = "0.2.1"
313
+ source = "registry+https://github.com/rust-lang/crates.io-index"
314
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
315
+
316
+ [[package]]
317
+ name = "windows-sys"
318
+ version = "0.61.2"
319
+ source = "registry+https://github.com/rust-lang/crates.io-index"
320
+ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
321
+ dependencies = [
322
+ "windows-link",
323
+ ]
324
+
101
325
  [[package]]
102
326
  name = "zmij"
103
327
  version = "1.0.21"
@@ -1,10 +1,17 @@
1
1
  [package]
2
2
  name = "sks-core"
3
- version = "7.1.1"
3
+ version = "7.5.0"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]
7
+ serde = { version = "1", features = ["derive"] }
7
8
  serde_json = "1"
9
+ ignore = "0.4"
10
+ grep-regex = "0.1"
11
+ grep-searcher = "0.1"
12
+ grep-matcher = "0.1"
13
+ globset = "0.4"
14
+ memmap2 = "0.9"
8
15
 
9
16
  [[bin]]
10
17
  name = "sks-rs"
@@ -1,3 +1,5 @@
1
+ mod search;
2
+
1
3
  use std::fs::File;
2
4
  use std::io::{self, Read, Seek, SeekFrom};
3
5
 
@@ -5,6 +7,10 @@ fn main() {
5
7
  let mut args = std::env::args().skip(1);
6
8
  match args.next().as_deref() {
7
9
  Some("--version") => println!("sks-rs {}", env!("CARGO_PKG_VERSION")),
10
+ Some("search") => {
11
+ let rest: Vec<String> = args.collect();
12
+ std::process::exit(search::run(&rest));
13
+ }
8
14
  Some("compact-info") => {
9
15
  let mut input = String::new();
10
16
  let _ = io::stdin().read_to_string(&mut input);
@@ -75,7 +81,7 @@ fn main() {
75
81
  }
76
82
  }
77
83
  _ => {
78
- eprintln!("sks-rs optional accelerator. Commands: --version, compact-info, jsonl-tail, secret-scan, evidence-secret-scan, image-hash, image-voxel-index, voxel-validate, image-voxel-validate-fast");
84
+ eprintln!("sks-rs optional accelerator. Commands: --version, search files|text|batch, compact-info, jsonl-tail, secret-scan, evidence-secret-scan, image-hash, image-voxel-index, voxel-validate, image-voxel-validate-fast");
79
85
  std::process::exit(2);
80
86
  }
81
87
  }
@@ -0,0 +1,114 @@
1
+ use super::{bump_skip, base_ok, LimitsOut, SearchMatch, SearchRequest, SearchResponse};
2
+ use globset::{Glob, GlobSetBuilder};
3
+ use ignore::WalkBuilder;
4
+ use std::path::Path;
5
+ use std::time::Instant;
6
+
7
+ pub fn search_files(req: SearchRequest, limits: LimitsOut, started: Instant) -> SearchResponse {
8
+ let mut resp = base_ok("files", "ignore", limits.clone(), started);
9
+ let root = Path::new(&req.root);
10
+ if !root.exists() {
11
+ resp.ok = false;
12
+ resp.errors.push("root_missing".to_string());
13
+ resp.duration_ms = started.elapsed().as_millis() as u64;
14
+ return resp;
15
+ }
16
+
17
+ let include = build_globset(req.include.as_deref().unwrap_or(&[]));
18
+ let exclude = build_globset(req.exclude.as_deref().unwrap_or(&[]));
19
+ let query = req
20
+ .query
21
+ .as_deref()
22
+ .or(req.pattern.as_deref())
23
+ .unwrap_or("")
24
+ .to_lowercase();
25
+
26
+ let mut walker = WalkBuilder::new(root);
27
+ walker
28
+ .hidden(true)
29
+ .git_ignore(true)
30
+ .git_global(true)
31
+ .git_exclude(true)
32
+ .follow_links(false)
33
+ .max_depth(Some(40))
34
+ .filter_entry(|entry| {
35
+ let name = entry.file_name().to_string_lossy();
36
+ name != ".git" && name != "node_modules" && name != "dist" && name != "target"
37
+ });
38
+
39
+ let mut paths: Vec<String> = Vec::new();
40
+ for entry in walker.build() {
41
+ if paths.len() >= resp.limits.max_files {
42
+ resp.truncated = true;
43
+ break;
44
+ }
45
+ if started.elapsed().as_millis() as u64 > resp.limits.timeout_ms {
46
+ resp.timeout = true;
47
+ resp.truncated = true;
48
+ break;
49
+ }
50
+ let entry = match entry {
51
+ Ok(e) => e,
52
+ Err(_) => {
53
+ bump_skip(&mut resp.skipped, "walk_error");
54
+ continue;
55
+ }
56
+ };
57
+ if entry.file_type().map(|t| t.is_dir()).unwrap_or(false) {
58
+ continue;
59
+ }
60
+ let abs = entry.path();
61
+ let rel = match abs.strip_prefix(root) {
62
+ Ok(p) => p.to_string_lossy().replace('\\', "/"),
63
+ Err(_) => continue,
64
+ };
65
+ resp.scanned.files += 1;
66
+ if let Some(set) = &exclude {
67
+ if set.is_match(&rel) {
68
+ bump_skip(&mut resp.skipped, "exclude");
69
+ continue;
70
+ }
71
+ }
72
+ if let Some(set) = &include {
73
+ if !set.is_match(&rel) {
74
+ bump_skip(&mut resp.skipped, "include");
75
+ continue;
76
+ }
77
+ }
78
+ if !query.is_empty() && !rel.to_lowercase().contains(&query) {
79
+ continue;
80
+ }
81
+ paths.push(rel);
82
+ }
83
+ paths.sort();
84
+ if paths.len() > resp.limits.max_matches {
85
+ paths.truncate(resp.limits.max_matches);
86
+ resp.truncated = true;
87
+ }
88
+ resp.matches = paths
89
+ .into_iter()
90
+ .map(|path| SearchMatch {
91
+ path,
92
+ line: None,
93
+ column: None,
94
+ text: None,
95
+ confidence: "file_path".to_string(),
96
+ })
97
+ .collect();
98
+ resp.confidence = "file_path".to_string();
99
+ resp.duration_ms = started.elapsed().as_millis() as u64;
100
+ resp
101
+ }
102
+
103
+ fn build_globset(patterns: &[String]) -> Option<globset::GlobSet> {
104
+ if patterns.is_empty() {
105
+ return None;
106
+ }
107
+ let mut builder = GlobSetBuilder::new();
108
+ for p in patterns {
109
+ if let Ok(g) = Glob::new(p) {
110
+ builder.add(g);
111
+ }
112
+ }
113
+ builder.build().ok()
114
+ }