nexus-prime 7.9.33 → 7.9.34

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 (808) hide show
  1. package/README.md +1 -0
  2. package/dist/binary-shim.js +33 -0
  3. package/dist/install/binary-channel.js +213 -0
  4. package/package.json +7 -98
  5. package/dist/adapters/admin/authoring.d.ts +0 -14
  6. package/dist/adapters/admin/authoring.js +0 -116
  7. package/dist/adapters/admin/control.d.ts +0 -39
  8. package/dist/adapters/admin/control.js +0 -41
  9. package/dist/adapters/admin/index.d.ts +0 -38
  10. package/dist/adapters/admin/index.js +0 -39
  11. package/dist/adapters/admin/types.d.ts +0 -45
  12. package/dist/adapters/admin/types.js +0 -8
  13. package/dist/adapters/cli/index.d.ts +0 -12
  14. package/dist/adapters/cli/index.js +0 -12
  15. package/dist/adapters/hooks/context.d.ts +0 -27
  16. package/dist/adapters/hooks/context.js +0 -28
  17. package/dist/adapters/hooks/execution.d.ts +0 -14
  18. package/dist/adapters/hooks/execution.js +0 -21
  19. package/dist/adapters/hooks/health.d.ts +0 -12
  20. package/dist/adapters/hooks/health.js +0 -14
  21. package/dist/adapters/hooks/index.d.ts +0 -83
  22. package/dist/adapters/hooks/index.js +0 -118
  23. package/dist/adapters/hooks/memory.d.ts +0 -32
  24. package/dist/adapters/hooks/memory.js +0 -23
  25. package/dist/adapters/hooks/types.d.ts +0 -34
  26. package/dist/adapters/hooks/types.js +0 -23
  27. package/dist/adapters/mcp/index.d.ts +0 -12
  28. package/dist/adapters/mcp/index.js +0 -12
  29. package/dist/adapters/shared/formatters/branded-response.d.ts +0 -13
  30. package/dist/adapters/shared/formatters/branded-response.js +0 -12
  31. package/dist/adapters/shared/formatters/bullets.d.ts +0 -7
  32. package/dist/adapters/shared/formatters/bullets.js +0 -9
  33. package/dist/adapters/shared/formatters/index.d.ts +0 -12
  34. package/dist/adapters/shared/formatters/index.js +0 -11
  35. package/dist/adapters/shared/formatters/json-details.d.ts +0 -7
  36. package/dist/adapters/shared/formatters/json-details.js +0 -9
  37. package/dist/adapters/shared/formatters/response-envelope.d.ts +0 -20
  38. package/dist/adapters/shared/formatters/response-envelope.js +0 -37
  39. package/dist/adapters/shared/index.d.ts +0 -8
  40. package/dist/adapters/shared/index.js +0 -8
  41. package/dist/adapters/shared/types.d.ts +0 -40
  42. package/dist/adapters/shared/types.js +0 -10
  43. package/dist/agents/adapters/ide-compat.d.ts +0 -33
  44. package/dist/agents/adapters/ide-compat.js +0 -249
  45. package/dist/agents/adapters/mcp/async-gate.d.ts +0 -103
  46. package/dist/agents/adapters/mcp/async-gate.js +0 -212
  47. package/dist/agents/adapters/mcp/circuit.d.ts +0 -40
  48. package/dist/agents/adapters/mcp/circuit.js +0 -135
  49. package/dist/agents/adapters/mcp/definitions.d.ts +0 -9
  50. package/dist/agents/adapters/mcp/definitions.js +0 -1159
  51. package/dist/agents/adapters/mcp/dispatch.d.ts +0 -25
  52. package/dist/agents/adapters/mcp/dispatch.js +0 -428
  53. package/dist/agents/adapters/mcp/envelope.d.ts +0 -51
  54. package/dist/agents/adapters/mcp/envelope.js +0 -113
  55. package/dist/agents/adapters/mcp/handlers/discovery.d.ts +0 -14
  56. package/dist/agents/adapters/mcp/handlers/discovery.js +0 -255
  57. package/dist/agents/adapters/mcp/handlers/governance.d.ts +0 -14
  58. package/dist/agents/adapters/mcp/handlers/governance.js +0 -313
  59. package/dist/agents/adapters/mcp/handlers/kernel-execution.d.ts +0 -26
  60. package/dist/agents/adapters/mcp/handlers/kernel-execution.js +0 -98
  61. package/dist/agents/adapters/mcp/handlers/memory.d.ts +0 -15
  62. package/dist/agents/adapters/mcp/handlers/memory.js +0 -527
  63. package/dist/agents/adapters/mcp/handlers/misc.d.ts +0 -14
  64. package/dist/agents/adapters/mcp/handlers/misc.js +0 -413
  65. package/dist/agents/adapters/mcp/handlers/orchestration.d.ts +0 -16
  66. package/dist/agents/adapters/mcp/handlers/orchestration.js +0 -1242
  67. package/dist/agents/adapters/mcp/handlers/runtime.d.ts +0 -15
  68. package/dist/agents/adapters/mcp/handlers/runtime.js +0 -374
  69. package/dist/agents/adapters/mcp/handlers/workforce.d.ts +0 -25
  70. package/dist/agents/adapters/mcp/handlers/workforce.js +0 -170
  71. package/dist/agents/adapters/mcp/helpers.d.ts +0 -68
  72. package/dist/agents/adapters/mcp/helpers.js +0 -211
  73. package/dist/agents/adapters/mcp/runHandler.d.ts +0 -29
  74. package/dist/agents/adapters/mcp/runHandler.js +0 -162
  75. package/dist/agents/adapters/mcp/stdio-buffer.d.ts +0 -6
  76. package/dist/agents/adapters/mcp/stdio-buffer.js +0 -55
  77. package/dist/agents/adapters/mcp/tool-health.d.ts +0 -17
  78. package/dist/agents/adapters/mcp/tool-health.js +0 -57
  79. package/dist/agents/adapters/mcp/types.d.ts +0 -141
  80. package/dist/agents/adapters/mcp/types.js +0 -281
  81. package/dist/agents/adapters/mcp/util/detect-caller.d.ts +0 -22
  82. package/dist/agents/adapters/mcp/util/detect-caller.js +0 -141
  83. package/dist/agents/adapters/mcp/util/require-runtime.d.ts +0 -24
  84. package/dist/agents/adapters/mcp/util/require-runtime.js +0 -28
  85. package/dist/agents/adapters/mcp/util/token-engine.d.ts +0 -2
  86. package/dist/agents/adapters/mcp/util/token-engine.js +0 -7
  87. package/dist/agents/adapters/mcp/util/walk.d.ts +0 -26
  88. package/dist/agents/adapters/mcp/util/walk.js +0 -92
  89. package/dist/agents/adapters/mcp/watchdog.d.ts +0 -14
  90. package/dist/agents/adapters/mcp/watchdog.js +0 -70
  91. package/dist/agents/adapters/mcp.d.ts +0 -91
  92. package/dist/agents/adapters/mcp.js +0 -1267
  93. package/dist/agents/adapters.d.ts +0 -73
  94. package/dist/agents/adapters.js +0 -207
  95. package/dist/agents/coordinator.d.ts +0 -75
  96. package/dist/agents/coordinator.js +0 -403
  97. package/dist/agents/core/types.d.ts +0 -156
  98. package/dist/agents/core/types.js +0 -4
  99. package/dist/agents/learner.d.ts +0 -33
  100. package/dist/agents/learner.js +0 -122
  101. package/dist/architects/blueprints/instantiate.d.ts +0 -11
  102. package/dist/architects/blueprints/instantiate.js +0 -65
  103. package/dist/architects/bootstrap.d.ts +0 -14
  104. package/dist/architects/bootstrap.js +0 -348
  105. package/dist/architects/config.d.ts +0 -7
  106. package/dist/architects/config.js +0 -21
  107. package/dist/architects/construction-locks/manager.d.ts +0 -17
  108. package/dist/architects/construction-locks/manager.js +0 -90
  109. package/dist/architects/convergence/queue.d.ts +0 -3
  110. package/dist/architects/convergence/queue.js +0 -82
  111. package/dist/architects/db/client.d.ts +0 -25
  112. package/dist/architects/db/client.js +0 -95
  113. package/dist/architects/db/schema.d.ts +0 -3
  114. package/dist/architects/db/schema.js +0 -160
  115. package/dist/architects/dispatch/governor.d.ts +0 -17
  116. package/dist/architects/dispatch/governor.js +0 -50
  117. package/dist/architects/errors.d.ts +0 -3
  118. package/dist/architects/errors.js +0 -6
  119. package/dist/architects/index.d.ts +0 -4
  120. package/dist/architects/index.js +0 -4
  121. package/dist/architects/mcp-tools.d.ts +0 -250
  122. package/dist/architects/mcp-tools.js +0 -156
  123. package/dist/architects/relay/inbox.d.ts +0 -6
  124. package/dist/architects/relay/inbox.js +0 -14
  125. package/dist/architects/relay/messenger.d.ts +0 -9
  126. package/dist/architects/relay/messenger.js +0 -44
  127. package/dist/architects/sentinel/patrol.d.ts +0 -34
  128. package/dist/architects/sentinel/patrol.js +0 -88
  129. package/dist/architects/types.d.ts +0 -144
  130. package/dist/architects/types.js +0 -1
  131. package/dist/architects/ward/supervisor.d.ts +0 -24
  132. package/dist/architects/ward/supervisor.js +0 -60
  133. package/dist/architects/worklist/crud.d.ts +0 -60
  134. package/dist/architects/worklist/crud.js +0 -261
  135. package/dist/architects/worklist/dependency-resolver.d.ts +0 -2
  136. package/dist/architects/worklist/dependency-resolver.js +0 -23
  137. package/dist/build-assets.d.ts +0 -1
  138. package/dist/build-assets.js +0 -39
  139. package/dist/channels/gateway.d.ts +0 -75
  140. package/dist/channels/gateway.js +0 -94
  141. package/dist/cli/cleanup.d.ts +0 -25
  142. package/dist/cli/cleanup.js +0 -135
  143. package/dist/cli/doctor-storage.d.ts +0 -38
  144. package/dist/cli/doctor-storage.js +0 -146
  145. package/dist/cli/hook.d.ts +0 -38
  146. package/dist/cli/hook.js +0 -292
  147. package/dist/cli/install-wizard.d.ts +0 -69
  148. package/dist/cli/install-wizard.js +0 -568
  149. package/dist/cli/interactive-setup.d.ts +0 -34
  150. package/dist/cli/interactive-setup.js +0 -163
  151. package/dist/cli/kernel-exec.d.ts +0 -18
  152. package/dist/cli/kernel-exec.js +0 -57
  153. package/dist/cli/orchestrate-stream.d.ts +0 -8
  154. package/dist/cli/orchestrate-stream.js +0 -305
  155. package/dist/cli/reset.d.ts +0 -30
  156. package/dist/cli/reset.js +0 -101
  157. package/dist/cli/uninstall.d.ts +0 -41
  158. package/dist/cli/uninstall.js +0 -167
  159. package/dist/cli/watch.d.ts +0 -10
  160. package/dist/cli/watch.js +0 -117
  161. package/dist/cli-setup.d.ts +0 -3
  162. package/dist/cli-setup.js +0 -159
  163. package/dist/cli.d.ts +0 -5
  164. package/dist/cli.js +0 -2291
  165. package/dist/config.d.ts +0 -73
  166. package/dist/config.js +0 -72
  167. package/dist/core/evolution.d.ts +0 -121
  168. package/dist/core/evolution.js +0 -318
  169. package/dist/core/optimize.d.ts +0 -99
  170. package/dist/core/optimize.js +0 -258
  171. package/dist/core/types.d.ts +0 -159
  172. package/dist/core/types.js +0 -4
  173. package/dist/core/wave.d.ts +0 -54
  174. package/dist/core/wave.js +0 -118
  175. package/dist/daemon/client.d.ts +0 -43
  176. package/dist/daemon/client.js +0 -243
  177. package/dist/daemon/lock.d.ts +0 -48
  178. package/dist/daemon/lock.js +0 -206
  179. package/dist/daemon/preflight.d.ts +0 -23
  180. package/dist/daemon/preflight.js +0 -121
  181. package/dist/daemon/proxy.d.ts +0 -5
  182. package/dist/daemon/proxy.js +0 -66
  183. package/dist/daemon/server.d.ts +0 -38
  184. package/dist/daemon/server.js +0 -460
  185. package/dist/daemon/supervisor.d.ts +0 -57
  186. package/dist/daemon/supervisor.js +0 -151
  187. package/dist/dashboard/app/api.js +0 -172
  188. package/dist/dashboard/app/index.html +0 -354
  189. package/dist/dashboard/app/main.js +0 -443
  190. package/dist/dashboard/app/router.js +0 -56
  191. package/dist/dashboard/app/sse.js +0 -137
  192. package/dist/dashboard/app/state.js +0 -142
  193. package/dist/dashboard/app/styles/animation.css +0 -118
  194. package/dist/dashboard/app/styles/board.css +0 -795
  195. package/dist/dashboard/app/styles/context-log.css +0 -318
  196. package/dist/dashboard/app/styles/governance.css +0 -214
  197. package/dist/dashboard/app/styles/learning.css +0 -204
  198. package/dist/dashboard/app/styles/memory.css +0 -441
  199. package/dist/dashboard/app/styles/runtime.css +0 -491
  200. package/dist/dashboard/app/styles/shell.css +0 -194
  201. package/dist/dashboard/app/styles/tokens.css +0 -150
  202. package/dist/dashboard/app/styles/trust.css +0 -356
  203. package/dist/dashboard/app/styles/workforce.css +0 -464
  204. package/dist/dashboard/app/views/board.js +0 -1349
  205. package/dist/dashboard/app/views/context-log.js +0 -310
  206. package/dist/dashboard/app/views/federation.js +0 -216
  207. package/dist/dashboard/app/views/governance.js +0 -340
  208. package/dist/dashboard/app/views/knowledge.js +0 -348
  209. package/dist/dashboard/app/views/learning.js +0 -240
  210. package/dist/dashboard/app/views/license.js +0 -403
  211. package/dist/dashboard/app/views/memory.js +0 -920
  212. package/dist/dashboard/app/views/repo.js +0 -652
  213. package/dist/dashboard/app/views/runtime.js +0 -734
  214. package/dist/dashboard/app/views/trust.js +0 -341
  215. package/dist/dashboard/app/views/workforce.js +0 -1159
  216. package/dist/dashboard/app/vocabulary.js +0 -68
  217. package/dist/dashboard/app/widgets/card.js +0 -31
  218. package/dist/dashboard/app/widgets/command-bar.js +0 -58
  219. package/dist/dashboard/app/widgets/drawer.js +0 -60
  220. package/dist/dashboard/app/widgets/error-banner.js +0 -83
  221. package/dist/dashboard/app/widgets/heartbeat.js +0 -75
  222. package/dist/dashboard/app/widgets/pyramid.js +0 -95
  223. package/dist/dashboard/app/widgets/runtime-badge.js +0 -41
  224. package/dist/dashboard/app/widgets/sparkline.js +0 -57
  225. package/dist/dashboard/contract.d.ts +0 -10
  226. package/dist/dashboard/contract.js +0 -48
  227. package/dist/dashboard/routes/architects.d.ts +0 -2
  228. package/dist/dashboard/routes/architects.js +0 -54
  229. package/dist/dashboard/routes/assets.d.ts +0 -2
  230. package/dist/dashboard/routes/assets.js +0 -224
  231. package/dist/dashboard/routes/authoring.d.ts +0 -2
  232. package/dist/dashboard/routes/authoring.js +0 -57
  233. package/dist/dashboard/routes/events.d.ts +0 -2
  234. package/dist/dashboard/routes/events.js +0 -298
  235. package/dist/dashboard/routes/governance.d.ts +0 -2
  236. package/dist/dashboard/routes/governance.js +0 -441
  237. package/dist/dashboard/routes/graph.d.ts +0 -2
  238. package/dist/dashboard/routes/graph.js +0 -487
  239. package/dist/dashboard/routes/health.d.ts +0 -2
  240. package/dist/dashboard/routes/health.js +0 -51
  241. package/dist/dashboard/routes/learning.d.ts +0 -2
  242. package/dist/dashboard/routes/learning.js +0 -213
  243. package/dist/dashboard/routes/license.d.ts +0 -2
  244. package/dist/dashboard/routes/license.js +0 -84
  245. package/dist/dashboard/routes/memory.d.ts +0 -2
  246. package/dist/dashboard/routes/memory.js +0 -331
  247. package/dist/dashboard/routes/run-artifacts.d.ts +0 -5
  248. package/dist/dashboard/routes/run-artifacts.js +0 -107
  249. package/dist/dashboard/routes/runtime.d.ts +0 -2
  250. package/dist/dashboard/routes/runtime.js +0 -591
  251. package/dist/dashboard/routes/summary.d.ts +0 -2
  252. package/dist/dashboard/routes/summary.js +0 -20
  253. package/dist/dashboard/routes/surfaces.d.ts +0 -2
  254. package/dist/dashboard/routes/surfaces.js +0 -27
  255. package/dist/dashboard/routes/workforce.d.ts +0 -43
  256. package/dist/dashboard/routes/workforce.js +0 -332
  257. package/dist/dashboard/selectors/assets-selector.d.ts +0 -3
  258. package/dist/dashboard/selectors/assets-selector.js +0 -41
  259. package/dist/dashboard/selectors/memory-selector.d.ts +0 -2
  260. package/dist/dashboard/selectors/memory-selector.js +0 -34
  261. package/dist/dashboard/selectors/operate-selector.d.ts +0 -2
  262. package/dist/dashboard/selectors/operate-selector.js +0 -345
  263. package/dist/dashboard/selectors/runs-selector.d.ts +0 -2
  264. package/dist/dashboard/selectors/runs-selector.js +0 -29
  265. package/dist/dashboard/selectors/summary-selector.d.ts +0 -18
  266. package/dist/dashboard/selectors/summary-selector.js +0 -104
  267. package/dist/dashboard/selectors/trust-selector.d.ts +0 -2
  268. package/dist/dashboard/selectors/trust-selector.js +0 -56
  269. package/dist/dashboard/serializers/memory-serializer.d.ts +0 -4
  270. package/dist/dashboard/serializers/memory-serializer.js +0 -21
  271. package/dist/dashboard/serializers/proof-serializer.d.ts +0 -3
  272. package/dist/dashboard/serializers/proof-serializer.js +0 -33
  273. package/dist/dashboard/serializers/run-serializer.d.ts +0 -8
  274. package/dist/dashboard/serializers/run-serializer.js +0 -31
  275. package/dist/dashboard/server.d.ts +0 -93
  276. package/dist/dashboard/server.js +0 -1635
  277. package/dist/dashboard/stream/sse-broker.d.ts +0 -20
  278. package/dist/dashboard/stream/sse-broker.js +0 -423
  279. package/dist/dashboard/types.d.ts +0 -349
  280. package/dist/dashboard/types.js +0 -1
  281. package/dist/dashboard/welcome.html +0 -685
  282. package/dist/engines/attention-stream.d.ts +0 -90
  283. package/dist/engines/attention-stream.js +0 -192
  284. package/dist/engines/automation-runtime.d.ts +0 -114
  285. package/dist/engines/automation-runtime.js +0 -601
  286. package/dist/engines/benchmark-extended.d.ts +0 -83
  287. package/dist/engines/benchmark-extended.js +0 -416
  288. package/dist/engines/benchmark.d.ts +0 -75
  289. package/dist/engines/benchmark.js +0 -166
  290. package/dist/engines/bootstrap/bootstrap-deep.d.ts +0 -47
  291. package/dist/engines/bootstrap/bootstrap-deep.js +0 -57
  292. package/dist/engines/bootstrap/bootstrap-fast.d.ts +0 -54
  293. package/dist/engines/bootstrap/bootstrap-fast.js +0 -69
  294. package/dist/engines/bootstrap/bootstrap-registry.d.ts +0 -37
  295. package/dist/engines/bootstrap/bootstrap-registry.js +0 -94
  296. package/dist/engines/bootstrap/index.d.ts +0 -15
  297. package/dist/engines/bootstrap/index.js +0 -11
  298. package/dist/engines/bootstrap/run-prepare.d.ts +0 -43
  299. package/dist/engines/bootstrap/run-prepare.js +0 -36
  300. package/dist/engines/bootstrap/types.d.ts +0 -167
  301. package/dist/engines/bootstrap/types.js +0 -13
  302. package/dist/engines/byzantine-consensus.d.ts +0 -103
  303. package/dist/engines/byzantine-consensus.js +0 -222
  304. package/dist/engines/cache-manager.d.ts +0 -74
  305. package/dist/engines/cache-manager.js +0 -199
  306. package/dist/engines/client-bootstrap.d.ts +0 -77
  307. package/dist/engines/client-bootstrap.js +0 -1112
  308. package/dist/engines/client-registry.d.ts +0 -86
  309. package/dist/engines/client-registry.js +0 -631
  310. package/dist/engines/code-review-graph-client.d.ts +0 -64
  311. package/dist/engines/code-review-graph-client.js +0 -388
  312. package/dist/engines/compaction-sentinel.d.ts +0 -20
  313. package/dist/engines/compaction-sentinel.js +0 -63
  314. package/dist/engines/context/index.d.ts +0 -13
  315. package/dist/engines/context/index.js +0 -13
  316. package/dist/engines/context-assembler.d.ts +0 -103
  317. package/dist/engines/context-assembler.js +0 -379
  318. package/dist/engines/context-compressor.d.ts +0 -31
  319. package/dist/engines/context-compressor.js +0 -131
  320. package/dist/engines/context-discovery.d.ts +0 -67
  321. package/dist/engines/context-discovery.js +0 -209
  322. package/dist/engines/context.d.ts +0 -49
  323. package/dist/engines/context.js +0 -98
  324. package/dist/engines/darwin-journal.d.ts +0 -43
  325. package/dist/engines/darwin-journal.js +0 -80
  326. package/dist/engines/darwin-loop.d.ts +0 -55
  327. package/dist/engines/darwin-loop.js +0 -231
  328. package/dist/engines/data/specialist-profiles.json +0 -1
  329. package/dist/engines/data/specialists.json +0 -1
  330. package/dist/engines/dispatch/context-pack.d.ts +0 -35
  331. package/dist/engines/dispatch/context-pack.js +0 -33
  332. package/dist/engines/dispatch/event-mapper.d.ts +0 -9
  333. package/dist/engines/dispatch/event-mapper.js +0 -81
  334. package/dist/engines/dispatch/push-dispatch.d.ts +0 -50
  335. package/dist/engines/dispatch/push-dispatch.js +0 -177
  336. package/dist/engines/embedder.d.ts +0 -95
  337. package/dist/engines/embedder.js +0 -484
  338. package/dist/engines/entanglement.d.ts +0 -98
  339. package/dist/engines/entanglement.js +0 -237
  340. package/dist/engines/entity-extractor.d.ts +0 -41
  341. package/dist/engines/entity-extractor.js +0 -120
  342. package/dist/engines/event-bus.d.ts +0 -934
  343. package/dist/engines/event-bus.js +0 -271
  344. package/dist/engines/execution-presets.d.ts +0 -32
  345. package/dist/engines/execution-presets.js +0 -125
  346. package/dist/engines/feature-registry.d.ts +0 -20
  347. package/dist/engines/feature-registry.js +0 -161
  348. package/dist/engines/federation.d.ts +0 -65
  349. package/dist/engines/federation.js +0 -194
  350. package/dist/engines/generated-specialist-loader.d.ts +0 -19
  351. package/dist/engines/generated-specialist-loader.js +0 -61
  352. package/dist/engines/generated-specialist-profiles.d.ts +0 -24
  353. package/dist/engines/generated-specialist-profiles.js +0 -5
  354. package/dist/engines/generated-specialists.d.ts +0 -14
  355. package/dist/engines/generated-specialists.js +0 -5
  356. package/dist/engines/github-bridge.d.ts +0 -49
  357. package/dist/engines/github-bridge.js +0 -327
  358. package/dist/engines/governance-boundary.d.ts +0 -40
  359. package/dist/engines/governance-boundary.js +0 -78
  360. package/dist/engines/graph-memory.d.ts +0 -127
  361. package/dist/engines/graph-memory.js +0 -392
  362. package/dist/engines/graph-traversal.d.ts +0 -65
  363. package/dist/engines/graph-traversal.js +0 -248
  364. package/dist/engines/gstack-bridge.d.ts +0 -61
  365. package/dist/engines/gstack-bridge.js +0 -209
  366. package/dist/engines/guardrails-bridge.d.ts +0 -66
  367. package/dist/engines/guardrails-bridge.js +0 -277
  368. package/dist/engines/hilbert-space.d.ts +0 -74
  369. package/dist/engines/hilbert-space.js +0 -189
  370. package/dist/engines/hook-runtime.d.ts +0 -75
  371. package/dist/engines/hook-runtime.js +0 -363
  372. package/dist/engines/hybrid-retriever.d.ts +0 -46
  373. package/dist/engines/hybrid-retriever.js +0 -177
  374. package/dist/engines/index.d.ts +0 -73
  375. package/dist/engines/index.js +0 -57
  376. package/dist/engines/install-registry.d.ts +0 -10
  377. package/dist/engines/install-registry.js +0 -64
  378. package/dist/engines/instruction-gateway.d.ts +0 -222
  379. package/dist/engines/instruction-gateway.js +0 -794
  380. package/dist/engines/knowledge/index.d.ts +0 -13
  381. package/dist/engines/knowledge/index.js +0 -13
  382. package/dist/engines/knowledge-fabric.d.ts +0 -208
  383. package/dist/engines/knowledge-fabric.js +0 -684
  384. package/dist/engines/kv-bridge.d.ts +0 -114
  385. package/dist/engines/kv-bridge.js +0 -301
  386. package/dist/engines/learning/index.d.ts +0 -17
  387. package/dist/engines/learning/index.js +0 -17
  388. package/dist/engines/learning-compiler.d.ts +0 -31
  389. package/dist/engines/learning-compiler.js +0 -50
  390. package/dist/engines/learning-network.d.ts +0 -150
  391. package/dist/engines/learning-network.js +0 -452
  392. package/dist/engines/lifecycle/index.d.ts +0 -13
  393. package/dist/engines/lifecycle/index.js +0 -13
  394. package/dist/engines/lifecycle-policy.d.ts +0 -37
  395. package/dist/engines/lifecycle-policy.js +0 -82
  396. package/dist/engines/lifetime-tokens.d.ts +0 -13
  397. package/dist/engines/lifetime-tokens.js +0 -36
  398. package/dist/engines/machine-efficiency/governor.d.ts +0 -69
  399. package/dist/engines/machine-efficiency/governor.js +0 -179
  400. package/dist/engines/machine-efficiency/index.d.ts +0 -7
  401. package/dist/engines/machine-efficiency/index.js +0 -6
  402. package/dist/engines/machine-efficiency/pressure-detector.d.ts +0 -19
  403. package/dist/engines/machine-efficiency/pressure-detector.js +0 -98
  404. package/dist/engines/machine-efficiency/types.d.ts +0 -36
  405. package/dist/engines/machine-efficiency/types.js +0 -19
  406. package/dist/engines/mcp-entrypoint.d.ts +0 -12
  407. package/dist/engines/mcp-entrypoint.js +0 -79
  408. package/dist/engines/memory/entropy-decay.d.ts +0 -19
  409. package/dist/engines/memory/entropy-decay.js +0 -19
  410. package/dist/engines/memory/index.d.ts +0 -16
  411. package/dist/engines/memory/index.js +0 -18
  412. package/dist/engines/memory/recall.d.ts +0 -8
  413. package/dist/engines/memory/recall.js +0 -36
  414. package/dist/engines/memory/schema.d.ts +0 -21
  415. package/dist/engines/memory/schema.js +0 -127
  416. package/dist/engines/memory/store.d.ts +0 -18
  417. package/dist/engines/memory/store.js +0 -86
  418. package/dist/engines/memory/tier-promotion.d.ts +0 -21
  419. package/dist/engines/memory/tier-promotion.js +0 -14
  420. package/dist/engines/memory/types.d.ts +0 -427
  421. package/dist/engines/memory/types.js +0 -47
  422. package/dist/engines/memory-background.d.ts +0 -15
  423. package/dist/engines/memory-background.js +0 -62
  424. package/dist/engines/memory-bridge.d.ts +0 -68
  425. package/dist/engines/memory-bridge.js +0 -216
  426. package/dist/engines/memory-classes.d.ts +0 -35
  427. package/dist/engines/memory-classes.js +0 -55
  428. package/dist/engines/memory-consolidator.d.ts +0 -40
  429. package/dist/engines/memory-consolidator.js +0 -157
  430. package/dist/engines/memory-control-plane.d.ts +0 -89
  431. package/dist/engines/memory-control-plane.js +0 -271
  432. package/dist/engines/memory-extractor.d.ts +0 -34
  433. package/dist/engines/memory-extractor.js +0 -163
  434. package/dist/engines/memory-fingerprint.d.ts +0 -6
  435. package/dist/engines/memory-fingerprint.js +0 -21
  436. package/dist/engines/memory-promotion.d.ts +0 -33
  437. package/dist/engines/memory-promotion.js +0 -70
  438. package/dist/engines/memory.d.ts +0 -389
  439. package/dist/engines/memory.js +0 -4129
  440. package/dist/engines/meta-learner.d.ts +0 -86
  441. package/dist/engines/meta-learner.js +0 -213
  442. package/dist/engines/middleware-pipeline.d.ts +0 -42
  443. package/dist/engines/middleware-pipeline.js +0 -140
  444. package/dist/engines/model-pricing.d.ts +0 -74
  445. package/dist/engines/model-pricing.js +0 -438
  446. package/dist/engines/monitoring/index.d.ts +0 -13
  447. package/dist/engines/monitoring/index.js +0 -13
  448. package/dist/engines/networking/index.d.ts +0 -13
  449. package/dist/engines/networking/index.js +0 -13
  450. package/dist/engines/nexus-brand.d.ts +0 -66
  451. package/dist/engines/nexus-brand.js +0 -214
  452. package/dist/engines/nexus-layer.d.ts +0 -32
  453. package/dist/engines/nexus-layer.js +0 -91
  454. package/dist/engines/nexus-proof.d.ts +0 -26
  455. package/dist/engines/nexus-proof.js +0 -118
  456. package/dist/engines/nexus-signature.d.ts +0 -33
  457. package/dist/engines/nexus-signature.js +0 -127
  458. package/dist/engines/nexusnet-relay.d.ts +0 -51
  459. package/dist/engines/nexusnet-relay.js +0 -134
  460. package/dist/engines/ngram-index.d.ts +0 -176
  461. package/dist/engines/ngram-index.js +0 -817
  462. package/dist/engines/nxl/index.d.ts +0 -12
  463. package/dist/engines/nxl/index.js +0 -12
  464. package/dist/engines/nxl-interpreter.d.ts +0 -59
  465. package/dist/engines/nxl-interpreter.js +0 -163
  466. package/dist/engines/operative-journal.d.ts +0 -32
  467. package/dist/engines/operative-journal.js +0 -84
  468. package/dist/engines/orchestration/index.d.ts +0 -16
  469. package/dist/engines/orchestration/index.js +0 -16
  470. package/dist/engines/orchestrator/decision-spine.d.ts +0 -288
  471. package/dist/engines/orchestrator/decision-spine.js +0 -1059
  472. package/dist/engines/orchestrator/funnel.d.ts +0 -49
  473. package/dist/engines/orchestrator/funnel.js +0 -89
  474. package/dist/engines/orchestrator/run-management.d.ts +0 -114
  475. package/dist/engines/orchestrator/run-management.js +0 -372
  476. package/dist/engines/orchestrator/scoring.d.ts +0 -46
  477. package/dist/engines/orchestrator/scoring.js +0 -534
  478. package/dist/engines/orchestrator/selection-policy.d.ts +0 -39
  479. package/dist/engines/orchestrator/selection-policy.js +0 -32
  480. package/dist/engines/orchestrator/store.d.ts +0 -44
  481. package/dist/engines/orchestrator/store.js +0 -153
  482. package/dist/engines/orchestrator/types.d.ts +0 -275
  483. package/dist/engines/orchestrator/types.js +0 -74
  484. package/dist/engines/orchestrator.d.ts +0 -213
  485. package/dist/engines/orchestrator.js +0 -3077
  486. package/dist/engines/pattern-codebook.d.ts +0 -66
  487. package/dist/engines/pattern-codebook.js +0 -168
  488. package/dist/engines/pattern-registry.d.ts +0 -47
  489. package/dist/engines/pattern-registry.js +0 -281
  490. package/dist/engines/peer-connectors.d.ts +0 -51
  491. package/dist/engines/peer-connectors.js +0 -153
  492. package/dist/engines/perf-history.d.ts +0 -33
  493. package/dist/engines/perf-history.js +0 -93
  494. package/dist/engines/pod-network.d.ts +0 -74
  495. package/dist/engines/pod-network.js +0 -216
  496. package/dist/engines/priors/file-priors.d.ts +0 -29
  497. package/dist/engines/priors/file-priors.js +0 -53
  498. package/dist/engines/priors/selector-precedence.d.ts +0 -32
  499. package/dist/engines/priors/selector-precedence.js +0 -47
  500. package/dist/engines/priors/topology-priors.d.ts +0 -19
  501. package/dist/engines/priors/topology-priors.js +0 -36
  502. package/dist/engines/priors/verifier-priors.d.ts +0 -17
  503. package/dist/engines/priors/verifier-priors.js +0 -34
  504. package/dist/engines/priors/workflow-priors.d.ts +0 -17
  505. package/dist/engines/priors/workflow-priors.js +0 -28
  506. package/dist/engines/proofs/index.d.ts +0 -10
  507. package/dist/engines/proofs/index.js +0 -8
  508. package/dist/engines/proofs/proof-builder.d.ts +0 -68
  509. package/dist/engines/proofs/proof-builder.js +0 -65
  510. package/dist/engines/proofs/proof-store.d.ts +0 -26
  511. package/dist/engines/proofs/proof-store.js +0 -115
  512. package/dist/engines/proofs/types.d.ts +0 -79
  513. package/dist/engines/proofs/types.js +0 -8
  514. package/dist/engines/providers/index.d.ts +0 -5
  515. package/dist/engines/providers/index.js +0 -4
  516. package/dist/engines/providers/registry.d.ts +0 -45
  517. package/dist/engines/providers/registry.js +0 -111
  518. package/dist/engines/providers/types.d.ts +0 -40
  519. package/dist/engines/providers/types.js +0 -5
  520. package/dist/engines/rag-collections.d.ts +0 -107
  521. package/dist/engines/rag-collections.js +0 -407
  522. package/dist/engines/repo-tree.d.ts +0 -17
  523. package/dist/engines/repo-tree.js +0 -56
  524. package/dist/engines/research/index.d.ts +0 -15
  525. package/dist/engines/research/index.js +0 -15
  526. package/dist/engines/runtime/index.d.ts +0 -20
  527. package/dist/engines/runtime/index.js +0 -22
  528. package/dist/engines/runtime-assets.d.ts +0 -86
  529. package/dist/engines/runtime-assets.js +0 -828
  530. package/dist/engines/runtime-backends.d.ts +0 -129
  531. package/dist/engines/runtime-backends.js +0 -277
  532. package/dist/engines/runtime-health.d.ts +0 -92
  533. package/dist/engines/runtime-health.js +0 -138
  534. package/dist/engines/runtime-hygiene.d.ts +0 -24
  535. package/dist/engines/runtime-hygiene.js +0 -198
  536. package/dist/engines/runtime-registry.d.ts +0 -366
  537. package/dist/engines/runtime-registry.js +0 -165
  538. package/dist/engines/runtime-supervisor.d.ts +0 -31
  539. package/dist/engines/runtime-supervisor.js +0 -136
  540. package/dist/engines/schema/integrity.d.ts +0 -23
  541. package/dist/engines/schema/integrity.js +0 -111
  542. package/dist/engines/schema/migrate.d.ts +0 -27
  543. package/dist/engines/schema/migrate.js +0 -90
  544. package/dist/engines/search/index.d.ts +0 -18
  545. package/dist/engines/search/index.js +0 -18
  546. package/dist/engines/security/index.d.ts +0 -12
  547. package/dist/engines/security/index.js +0 -12
  548. package/dist/engines/security-shield.d.ts +0 -55
  549. package/dist/engines/security-shield.js +0 -166
  550. package/dist/engines/self-summarizer.d.ts +0 -83
  551. package/dist/engines/self-summarizer.js +0 -200
  552. package/dist/engines/semantic-ranking.d.ts +0 -26
  553. package/dist/engines/semantic-ranking.js +0 -82
  554. package/dist/engines/session/index.d.ts +0 -15
  555. package/dist/engines/session/index.js +0 -15
  556. package/dist/engines/session-dna.d.ts +0 -113
  557. package/dist/engines/session-dna.js +0 -516
  558. package/dist/engines/simulation-sandbox.d.ts +0 -86
  559. package/dist/engines/simulation-sandbox.js +0 -220
  560. package/dist/engines/skill-card.d.ts +0 -44
  561. package/dist/engines/skill-card.js +0 -80
  562. package/dist/engines/skill-learner.d.ts +0 -19
  563. package/dist/engines/skill-learner.js +0 -101
  564. package/dist/engines/skill-runtime.d.ts +0 -117
  565. package/dist/engines/skill-runtime.js +0 -580
  566. package/dist/engines/skills/index.d.ts +0 -10
  567. package/dist/engines/skills/index.js +0 -10
  568. package/dist/engines/specialist-cost-estimator.d.ts +0 -21
  569. package/dist/engines/specialist-cost-estimator.js +0 -88
  570. package/dist/engines/specialist-roster.d.ts +0 -116
  571. package/dist/engines/specialist-roster.js +0 -576
  572. package/dist/engines/specialists/index.d.ts +0 -13
  573. package/dist/engines/specialists/index.js +0 -13
  574. package/dist/engines/task-planner.d.ts +0 -26
  575. package/dist/engines/task-planner.js +0 -173
  576. package/dist/engines/telemetry-remote.d.ts +0 -122
  577. package/dist/engines/telemetry-remote.js +0 -648
  578. package/dist/engines/telemetry.d.ts +0 -28
  579. package/dist/engines/telemetry.js +0 -79
  580. package/dist/engines/tiered-context.d.ts +0 -17
  581. package/dist/engines/tiered-context.js +0 -65
  582. package/dist/engines/token-analytics.d.ts +0 -53
  583. package/dist/engines/token-analytics.js +0 -106
  584. package/dist/engines/token-optimizer.d.ts +0 -36
  585. package/dist/engines/token-optimizer.js +0 -74
  586. package/dist/engines/token-supremacy.d.ts +0 -132
  587. package/dist/engines/token-supremacy.js +0 -701
  588. package/dist/engines/tokens/index.d.ts +0 -12
  589. package/dist/engines/tokens/index.js +0 -12
  590. package/dist/engines/user-workflow-trace.d.ts +0 -47
  591. package/dist/engines/user-workflow-trace.js +0 -281
  592. package/dist/engines/util/p-limit.d.ts +0 -10
  593. package/dist/engines/util/p-limit.js +0 -23
  594. package/dist/engines/work-ledger.d.ts +0 -35
  595. package/dist/engines/work-ledger.js +0 -92
  596. package/dist/engines/workflow-runtime.d.ts +0 -86
  597. package/dist/engines/workflow-runtime.js +0 -355
  598. package/dist/engines/workspace-resolver.d.ts +0 -53
  599. package/dist/engines/workspace-resolver.js +0 -375
  600. package/dist/engines/worktree-health.d.ts +0 -26
  601. package/dist/engines/worktree-health.js +0 -264
  602. package/dist/index.d.ts +0 -295
  603. package/dist/index.js +0 -1234
  604. package/dist/install/claude-code-hooks.d.ts +0 -33
  605. package/dist/install/claude-code-hooks.js +0 -100
  606. package/dist/install/fs-purge.d.ts +0 -65
  607. package/dist/install/fs-purge.js +0 -304
  608. package/dist/install/manifest.d.ts +0 -65
  609. package/dist/install/manifest.js +0 -150
  610. package/dist/install/process-cleanup.d.ts +0 -21
  611. package/dist/install/process-cleanup.js +0 -198
  612. package/dist/install/registration.d.ts +0 -41
  613. package/dist/install/registration.js +0 -258
  614. package/dist/install/state-locator.d.ts +0 -43
  615. package/dist/install/state-locator.js +0 -148
  616. package/dist/invokers/aider.d.ts +0 -20
  617. package/dist/invokers/aider.js +0 -160
  618. package/dist/invokers/base.d.ts +0 -27
  619. package/dist/invokers/base.js +0 -113
  620. package/dist/invokers/claude-code.d.ts +0 -22
  621. package/dist/invokers/claude-code.js +0 -188
  622. package/dist/invokers/codex.d.ts +0 -21
  623. package/dist/invokers/codex.js +0 -148
  624. package/dist/invokers/cursor.d.ts +0 -27
  625. package/dist/invokers/cursor.js +0 -184
  626. package/dist/invokers/registry.d.ts +0 -30
  627. package/dist/invokers/registry.js +0 -79
  628. package/dist/invokers/types.d.ts +0 -129
  629. package/dist/invokers/types.js +0 -8
  630. package/dist/kernel/context/contracts.d.ts +0 -12
  631. package/dist/kernel/context/contracts.js +0 -9
  632. package/dist/kernel/context/index.d.ts +0 -25
  633. package/dist/kernel/context/index.js +0 -44
  634. package/dist/kernel/context/service.d.ts +0 -73
  635. package/dist/kernel/context/service.js +0 -183
  636. package/dist/kernel/context/types.d.ts +0 -69
  637. package/dist/kernel/context/types.js +0 -11
  638. package/dist/kernel/execution/contracts.d.ts +0 -21
  639. package/dist/kernel/execution/contracts.js +0 -10
  640. package/dist/kernel/execution/index.d.ts +0 -13
  641. package/dist/kernel/execution/index.js +0 -9
  642. package/dist/kernel/execution/ledger.d.ts +0 -32
  643. package/dist/kernel/execution/ledger.js +0 -96
  644. package/dist/kernel/execution/service.d.ts +0 -79
  645. package/dist/kernel/execution/service.js +0 -629
  646. package/dist/kernel/execution/types.d.ts +0 -131
  647. package/dist/kernel/execution/types.js +0 -13
  648. package/dist/kernel/index.d.ts +0 -54
  649. package/dist/kernel/index.js +0 -63
  650. package/dist/kernel/runtime/backend.d.ts +0 -20
  651. package/dist/kernel/runtime/backend.js +0 -55
  652. package/dist/kernel/runtime/contracts.d.ts +0 -35
  653. package/dist/kernel/runtime/contracts.js +0 -12
  654. package/dist/kernel/runtime/index.d.ts +0 -10
  655. package/dist/kernel/runtime/index.js +0 -8
  656. package/dist/kernel/runtime/types.d.ts +0 -44
  657. package/dist/kernel/runtime/types.js +0 -8
  658. package/dist/licensing/caps.d.ts +0 -6
  659. package/dist/licensing/caps.js +0 -44
  660. package/dist/licensing/enforcement.d.ts +0 -8
  661. package/dist/licensing/enforcement.js +0 -145
  662. package/dist/licensing/index.d.ts +0 -9
  663. package/dist/licensing/index.js +0 -8
  664. package/dist/licensing/license-manager.d.ts +0 -30
  665. package/dist/licensing/license-manager.js +0 -397
  666. package/dist/licensing/license-sync.d.ts +0 -17
  667. package/dist/licensing/license-sync.js +0 -70
  668. package/dist/licensing/pcu-meter.d.ts +0 -49
  669. package/dist/licensing/pcu-meter.js +0 -117
  670. package/dist/licensing/tool-tiers.d.ts +0 -18
  671. package/dist/licensing/tool-tiers.js +0 -109
  672. package/dist/licensing/types.d.ts +0 -58
  673. package/dist/licensing/types.js +0 -4
  674. package/dist/licensing/upgrade-prompts.d.ts +0 -26
  675. package/dist/licensing/upgrade-prompts.js +0 -112
  676. package/dist/licensing/web-auth.d.ts +0 -33
  677. package/dist/licensing/web-auth.js +0 -119
  678. package/dist/migrations/architects/v001_baseline.sql +0 -4
  679. package/dist/migrations/memory/v001_baseline.sql +0 -4
  680. package/dist/migrations/synapse/v001_baseline.sql +0 -4
  681. package/dist/nexus-prime.d.ts +0 -14
  682. package/dist/nexus-prime.js +0 -14
  683. package/dist/nxl/codec.d.ts +0 -22
  684. package/dist/nxl/codec.js +0 -199
  685. package/dist/nxl/index.d.ts +0 -12
  686. package/dist/nxl/index.js +0 -10
  687. package/dist/phantom/context/context-assembler-runtime.d.ts +0 -18
  688. package/dist/phantom/context/context-assembler-runtime.js +0 -30
  689. package/dist/phantom/execution/execution-coordinator.d.ts +0 -22
  690. package/dist/phantom/execution/execution-coordinator.js +0 -49
  691. package/dist/phantom/index.d.ts +0 -146
  692. package/dist/phantom/index.js +0 -317
  693. package/dist/phantom/merge-oracle.d.ts +0 -34
  694. package/dist/phantom/merge-oracle.js +0 -186
  695. package/dist/phantom/mutation/mutation-engine.d.ts +0 -40
  696. package/dist/phantom/mutation/mutation-engine.js +0 -50
  697. package/dist/phantom/phase4-orchestrator.d.ts +0 -13
  698. package/dist/phantom/phase4-orchestrator.js +0 -485
  699. package/dist/phantom/projection/run-projector.d.ts +0 -26
  700. package/dist/phantom/projection/run-projector.js +0 -44
  701. package/dist/phantom/runtime/diff-preview.d.ts +0 -9
  702. package/dist/phantom/runtime/diff-preview.js +0 -84
  703. package/dist/phantom/runtime/ghost-pass.d.ts +0 -5
  704. package/dist/phantom/runtime/ghost-pass.js +0 -7
  705. package/dist/phantom/runtime/index.d.ts +0 -5
  706. package/dist/phantom/runtime/index.js +0 -5
  707. package/dist/phantom/runtime/worker.d.ts +0 -57
  708. package/dist/phantom/runtime/worker.js +0 -193
  709. package/dist/phantom/runtime/worktree.d.ts +0 -74
  710. package/dist/phantom/runtime/worktree.js +0 -253
  711. package/dist/phantom/runtime.d.ts +0 -642
  712. package/dist/phantom/runtime.js +0 -3653
  713. package/dist/phantom/topology/worker-topology-planner.d.ts +0 -17
  714. package/dist/phantom/topology/worker-topology-planner.js +0 -30
  715. package/dist/phantom/types/execution.d.ts +0 -69
  716. package/dist/phantom/types/execution.js +0 -7
  717. package/dist/phantom/types/proofs.d.ts +0 -7
  718. package/dist/phantom/types/proofs.js +0 -6
  719. package/dist/phantom/verification/verification-engine.d.ts +0 -19
  720. package/dist/phantom/verification/verification-engine.js +0 -79
  721. package/dist/postinstall/cleanup.d.ts +0 -16
  722. package/dist/postinstall/cleanup.js +0 -85
  723. package/dist/postinstall-bootstrap.d.ts +0 -1
  724. package/dist/postinstall-bootstrap.js +0 -174
  725. package/dist/postinstall-runner.d.ts +0 -1
  726. package/dist/postinstall-runner.js +0 -18
  727. package/dist/synapse/approvals/gate.d.ts +0 -17
  728. package/dist/synapse/approvals/gate.js +0 -67
  729. package/dist/synapse/bootstrap.d.ts +0 -36
  730. package/dist/synapse/bootstrap.js +0 -341
  731. package/dist/synapse/budgets/enforcer.d.ts +0 -2
  732. package/dist/synapse/budgets/enforcer.js +0 -31
  733. package/dist/synapse/compaction/standdown.d.ts +0 -3
  734. package/dist/synapse/compaction/standdown.js +0 -40
  735. package/dist/synapse/config.d.ts +0 -16
  736. package/dist/synapse/config.js +0 -36
  737. package/dist/synapse/coordination/safe-publish.d.ts +0 -7
  738. package/dist/synapse/coordination/safe-publish.js +0 -23
  739. package/dist/synapse/db/client.d.ts +0 -26
  740. package/dist/synapse/db/client.js +0 -96
  741. package/dist/synapse/db/schema.d.ts +0 -3
  742. package/dist/synapse/db/schema.js +0 -176
  743. package/dist/synapse/echo/query.d.ts +0 -3
  744. package/dist/synapse/echo/query.js +0 -30
  745. package/dist/synapse/errors.d.ts +0 -9
  746. package/dist/synapse/errors.js +0 -18
  747. package/dist/synapse/field-reports/builder.d.ts +0 -3
  748. package/dist/synapse/field-reports/builder.js +0 -29
  749. package/dist/synapse/field-reports/ledger.d.ts +0 -6
  750. package/dist/synapse/field-reports/ledger.js +0 -87
  751. package/dist/synapse/field-reports/restorer.d.ts +0 -5
  752. package/dist/synapse/field-reports/restorer.js +0 -98
  753. package/dist/synapse/index.d.ts +0 -5
  754. package/dist/synapse/index.js +0 -4
  755. package/dist/synapse/mandate/asset-matcher.d.ts +0 -9
  756. package/dist/synapse/mandate/asset-matcher.js +0 -49
  757. package/dist/synapse/mandate/intent-parser.d.ts +0 -2
  758. package/dist/synapse/mandate/intent-parser.js +0 -47
  759. package/dist/synapse/mandate/pipeline.d.ts +0 -5
  760. package/dist/synapse/mandate/pipeline.js +0 -222
  761. package/dist/synapse/mcp-tools.d.ts +0 -532
  762. package/dist/synapse/mcp-tools.js +0 -279
  763. package/dist/synapse/missions/crud.d.ts +0 -18
  764. package/dist/synapse/missions/crud.js +0 -104
  765. package/dist/synapse/operatives/crud.d.ts +0 -14
  766. package/dist/synapse/operatives/crud.js +0 -96
  767. package/dist/synapse/operatives/state-machine.d.ts +0 -2
  768. package/dist/synapse/operatives/state-machine.js +0 -28
  769. package/dist/synapse/sorties/runner.d.ts +0 -4
  770. package/dist/synapse/sorties/runner.js +0 -294
  771. package/dist/synapse/sorties/scheduler.d.ts +0 -3
  772. package/dist/synapse/sorties/scheduler.js +0 -29
  773. package/dist/synapse/types.d.ts +0 -235
  774. package/dist/synapse/types.js +0 -1
  775. package/dist/synapse/watchdog/patrol.d.ts +0 -3
  776. package/dist/synapse/watchdog/patrol.js +0 -41
  777. package/dist/utils/ascii-art.d.ts +0 -25
  778. package/dist/utils/ascii-art.js +0 -173
  779. package/dist/utils/ascii-card.d.ts +0 -23
  780. package/dist/utils/ascii-card.js +0 -23
  781. package/dist/utils/exec-async.d.ts +0 -3
  782. package/dist/utils/exec-async.js +0 -4
  783. package/dist/verify-guardrails.d.ts +0 -1
  784. package/dist/verify-guardrails.js +0 -47
  785. package/dist/verify-pod-sync.d.ts +0 -1
  786. package/dist/verify-pod-sync.js +0 -40
  787. package/dist/verify-substrate.d.ts +0 -1
  788. package/dist/verify-substrate.js +0 -40
  789. package/dist/verify-token-scoring.d.ts +0 -1
  790. package/dist/verify-token-scoring.js +0 -39
  791. package/dist/workforce/claim-lock.d.ts +0 -16
  792. package/dist/workforce/claim-lock.js +0 -86
  793. package/dist/workforce/dag.d.ts +0 -20
  794. package/dist/workforce/dag.js +0 -90
  795. package/dist/workforce/db/client.d.ts +0 -22
  796. package/dist/workforce/db/client.js +0 -69
  797. package/dist/workforce/db/schema.d.ts +0 -9
  798. package/dist/workforce/db/schema.js +0 -117
  799. package/dist/workforce/index.d.ts +0 -55
  800. package/dist/workforce/index.js +0 -72
  801. package/dist/workforce/jobs.d.ts +0 -20
  802. package/dist/workforce/jobs.js +0 -135
  803. package/dist/workforce/kanban-view.d.ts +0 -7
  804. package/dist/workforce/kanban-view.js +0 -60
  805. package/dist/workforce/types.d.ts +0 -91
  806. package/dist/workforce/types.js +0 -9
  807. package/dist/workforce/workers.d.ts +0 -14
  808. package/dist/workforce/workers.js +0 -89
package/README.md CHANGED
@@ -446,6 +446,7 @@ Nexus Prime was designed privacy-first, because the code on your machine is your
446
446
  - 🏠 **100% local.** All data lives on your disk, in your home directory.
447
447
  - 🚫 **No cloud sync.** Your code, your memory, your logs — never uploaded.
448
448
  - 🔐 **Bounded local trial.** You can run locally for 15 days without signing up; a license is required after the trial expires.
449
+ - 🧱 **Binary-first release path.** The current NPM package remains intact, and a prepared shim lane can turn NPM into a signed-binary downloader once binary artifacts are published and verified.
449
450
  - 📊 **Telemetry is opt-in.** Off by default. When on, only aggregate, anonymous event counts are sent — never source code, never memory contents.
450
451
  - 🗑️ **Uninstall is clean.** Everything lives in one directory you can delete.
451
452
 
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from 'node:child_process';
3
+ import { defaultManifestUrl, installBinaryFromChannel, readPackageVersion, } from './install/binary-channel.js';
4
+ async function main() {
5
+ const args = process.argv.slice(2);
6
+ const installOnly = args.includes('--install-only');
7
+ const forwardedArgs = args.filter((arg) => arg !== '--install-only');
8
+ const version = readPackageVersion();
9
+ const channel = process.env.NEXUS_BINARY_CHANNEL ?? 'stable';
10
+ const result = await installBinaryFromChannel({
11
+ version,
12
+ channel,
13
+ manifestUrl: process.env.NEXUS_BINARY_MANIFEST_URL ?? defaultManifestUrl(version, channel),
14
+ });
15
+ if (installOnly) {
16
+ const verb = result.downloaded ? 'installed' : 'verified';
17
+ console.log(`[nexus-prime] binary ${verb}: ${result.binaryPath}`);
18
+ return;
19
+ }
20
+ const child = spawnSync(result.binaryPath, forwardedArgs, {
21
+ stdio: 'inherit',
22
+ env: process.env,
23
+ });
24
+ if (child.error)
25
+ throw child.error;
26
+ process.exit(typeof child.status === 'number' ? child.status : 1);
27
+ }
28
+ main().catch((error) => {
29
+ const message = error instanceof Error ? error.message : String(error);
30
+ console.error(`[nexus-prime] binary channel unavailable: ${message}`);
31
+ console.error('[nexus-prime] Set NEXUS_BINARY_MANIFEST_URL or install the full npm package until binary releases are configured.');
32
+ process.exit(1);
33
+ });
@@ -0,0 +1,213 @@
1
+ import * as crypto from 'node:crypto';
2
+ import * as fs from 'node:fs';
3
+ import * as os from 'node:os';
4
+ import * as path from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+ const DEFAULT_BINARY_BASE_URL = 'https://releases.nexus-prime.cfd/nexus-prime';
7
+ const LICENSE_ENV_KEYS = ['NEXUS_PRIME_LICENSE_KEY', 'NEXUS_LICENSE_KEY'];
8
+ export function detectBinaryPlatform(platform = process.platform, arch = process.arch) {
9
+ const normalizedArch = arch === 'x64' || arch === 'arm64' ? arch : '';
10
+ if (!normalizedArch)
11
+ throw new Error(`Unsupported Nexus Prime binary architecture: ${arch}`);
12
+ if (platform === 'darwin' || platform === 'linux' || platform === 'win32') {
13
+ return `${platform}-${normalizedArch}`;
14
+ }
15
+ throw new Error(`Unsupported Nexus Prime binary platform: ${platform}`);
16
+ }
17
+ export function defaultBinaryRoot() {
18
+ return process.env.NEXUS_BINARY_ROOT
19
+ ? path.resolve(process.env.NEXUS_BINARY_ROOT)
20
+ : path.join(os.homedir(), '.nexus-prime', 'bin');
21
+ }
22
+ export function defaultLicenseFile() {
23
+ return process.env.NEXUS_LICENSE_FILE
24
+ ? path.resolve(process.env.NEXUS_LICENSE_FILE)
25
+ : path.join(os.homedir(), '.nexus-prime', 'license.key');
26
+ }
27
+ export function defaultInstallIdFile() {
28
+ return process.env.NEXUS_INSTALL_ID_FILE
29
+ ? path.resolve(process.env.NEXUS_INSTALL_ID_FILE)
30
+ : path.join(os.homedir(), '.nexus-prime', 'install-id');
31
+ }
32
+ export function defaultManifestUrl(version, channel = 'stable') {
33
+ if (process.env.NEXUS_BINARY_MANIFEST_URL)
34
+ return process.env.NEXUS_BINARY_MANIFEST_URL;
35
+ const base = (process.env.NEXUS_BINARY_BASE_URL || DEFAULT_BINARY_BASE_URL).replace(/\/+$/u, '');
36
+ return `${base}/${encodeURIComponent(version)}/${encodeURIComponent(channel)}/manifest.json`;
37
+ }
38
+ export function binaryNameForPlatform(platform) {
39
+ return platform.startsWith('win32') ? 'nexus-prime.exe' : 'nexus-prime';
40
+ }
41
+ export function readBinaryLicenseKey(licenseFile = defaultLicenseFile()) {
42
+ for (const key of LICENSE_ENV_KEYS) {
43
+ const value = process.env[key]?.trim();
44
+ if (value)
45
+ return value;
46
+ }
47
+ try {
48
+ if (!fs.existsSync(licenseFile))
49
+ return undefined;
50
+ const value = fs.readFileSync(licenseFile, 'utf8').trim();
51
+ return value || undefined;
52
+ }
53
+ catch {
54
+ return undefined;
55
+ }
56
+ }
57
+ export function readOrCreateInstallId(installIdFile = defaultInstallIdFile()) {
58
+ try {
59
+ if (fs.existsSync(installIdFile)) {
60
+ const existing = fs.readFileSync(installIdFile, 'utf8').trim();
61
+ if (existing)
62
+ return existing;
63
+ }
64
+ const installId = crypto.randomUUID();
65
+ fs.mkdirSync(path.dirname(installIdFile), { recursive: true });
66
+ fs.writeFileSync(installIdFile, `${installId}\n`, { mode: 0o600 });
67
+ return installId;
68
+ }
69
+ catch {
70
+ return undefined;
71
+ }
72
+ }
73
+ export function buildBinaryRequestHeaders(context = {}) {
74
+ const headers = {
75
+ 'accept': 'application/json, application/octet-stream',
76
+ 'x-nexus-client': 'npm-binary-shim',
77
+ };
78
+ if (context.version)
79
+ headers['x-nexus-package-version'] = context.version;
80
+ if (context.channel)
81
+ headers['x-nexus-channel'] = context.channel;
82
+ if (context.platform)
83
+ headers['x-nexus-platform'] = context.platform;
84
+ if (context.installId)
85
+ headers['x-nexus-install-id'] = context.installId;
86
+ if (context.licenseKey)
87
+ headers.authorization = `Bearer ${context.licenseKey}`;
88
+ return headers;
89
+ }
90
+ export function installedBinaryPath(input) {
91
+ return path.join(input.binaryRoot ?? defaultBinaryRoot(), input.version, input.platform, input.executableName ?? binaryNameForPlatform(input.platform));
92
+ }
93
+ export function readPackageVersion(fallback = '0.0.0') {
94
+ try {
95
+ const here = path.dirname(fileURLToPath(import.meta.url));
96
+ const candidates = [
97
+ path.join(here, '..', '..', 'package.json'),
98
+ path.join(here, '..', 'package.json'),
99
+ path.join(process.cwd(), 'package.json'),
100
+ ];
101
+ for (const candidate of candidates) {
102
+ if (!fs.existsSync(candidate))
103
+ continue;
104
+ const pkg = JSON.parse(fs.readFileSync(candidate, 'utf8'));
105
+ if (pkg.version)
106
+ return pkg.version;
107
+ }
108
+ }
109
+ catch {
110
+ // Keep shim startup resilient.
111
+ }
112
+ return fallback;
113
+ }
114
+ export async function fetchBinaryManifest(manifestUrl, context = {}) {
115
+ const raw = await readUrlText(manifestUrl, context);
116
+ const manifest = JSON.parse(raw);
117
+ if (manifest.schemaVersion !== 1 || manifest.product !== 'nexus-prime') {
118
+ throw new Error('Invalid Nexus Prime binary manifest');
119
+ }
120
+ return manifest;
121
+ }
122
+ export async function installBinaryFromChannel(options = {}) {
123
+ const version = options.version ?? readPackageVersion();
124
+ const channel = options.channel ?? process.env.NEXUS_BINARY_CHANNEL ?? 'stable';
125
+ const platform = detectBinaryPlatform(options.platform, options.arch);
126
+ const manifestUrl = options.manifestUrl ?? defaultManifestUrl(version, channel);
127
+ const context = {
128
+ version,
129
+ channel,
130
+ platform,
131
+ licenseKey: options.licenseKey ?? readBinaryLicenseKey(options.licenseFile),
132
+ installId: options.installId ?? readOrCreateInstallId(options.installIdFile),
133
+ };
134
+ const manifest = await fetchBinaryManifest(manifestUrl, context);
135
+ if (manifest.version !== version) {
136
+ throw new Error(`Binary manifest version mismatch: package=${version} manifest=${manifest.version}`);
137
+ }
138
+ const artifact = manifest.artifacts[platform];
139
+ if (!artifact)
140
+ throw new Error(`No Nexus Prime binary artifact for ${platform}`);
141
+ const binaryPath = installedBinaryPath({
142
+ binaryRoot: options.binaryRoot,
143
+ version,
144
+ platform,
145
+ executableName: artifact.executableName,
146
+ });
147
+ if (!options.force && fs.existsSync(binaryPath)) {
148
+ const current = await sha256File(binaryPath);
149
+ if (current === artifact.sha256.toLowerCase()) {
150
+ return { platform, binaryPath, version, downloaded: false, manifestUrl };
151
+ }
152
+ }
153
+ fs.mkdirSync(path.dirname(binaryPath), { recursive: true });
154
+ const tmpPath = `${binaryPath}.download`;
155
+ await downloadUrlToFile(artifact.url, tmpPath, context);
156
+ const actualSha = await sha256File(tmpPath);
157
+ if (actualSha !== artifact.sha256.toLowerCase()) {
158
+ fs.rmSync(tmpPath, { force: true });
159
+ throw new Error(`Binary checksum mismatch for ${platform}: expected ${artifact.sha256}, got ${actualSha}`);
160
+ }
161
+ if (typeof artifact.size === 'number') {
162
+ const stat = fs.statSync(tmpPath);
163
+ if (stat.size !== artifact.size) {
164
+ fs.rmSync(tmpPath, { force: true });
165
+ throw new Error(`Binary size mismatch for ${platform}: expected ${artifact.size}, got ${stat.size}`);
166
+ }
167
+ }
168
+ fs.renameSync(tmpPath, binaryPath);
169
+ if (!platform.startsWith('win32'))
170
+ fs.chmodSync(binaryPath, 0o755);
171
+ return { platform, binaryPath, version, downloaded: true, manifestUrl };
172
+ }
173
+ export async function sha256File(filePath) {
174
+ return new Promise((resolve, reject) => {
175
+ const hash = crypto.createHash('sha256');
176
+ const stream = fs.createReadStream(filePath);
177
+ stream.on('data', (chunk) => hash.update(chunk));
178
+ stream.on('error', reject);
179
+ stream.on('end', () => resolve(hash.digest('hex')));
180
+ });
181
+ }
182
+ export function redactUrlForLog(url) {
183
+ try {
184
+ const parsed = new URL(url);
185
+ parsed.search = '';
186
+ parsed.hash = '';
187
+ return parsed.toString();
188
+ }
189
+ catch {
190
+ return url.replace(/[?#].*$/u, '');
191
+ }
192
+ }
193
+ async function readUrlText(url, context) {
194
+ if (url.startsWith('file://')) {
195
+ return fs.readFileSync(fileURLToPath(url), 'utf8');
196
+ }
197
+ const response = await fetch(url, { headers: buildBinaryRequestHeaders(context) });
198
+ if (!response.ok)
199
+ throw new Error(`Failed to fetch ${redactUrlForLog(url)}: HTTP ${response.status}`);
200
+ return response.text();
201
+ }
202
+ async function downloadUrlToFile(url, destination, context) {
203
+ if (url.startsWith('file://')) {
204
+ fs.copyFileSync(fileURLToPath(url), destination);
205
+ return;
206
+ }
207
+ const response = await fetch(url, { headers: buildBinaryRequestHeaders(context) });
208
+ if (!response.ok || !response.body) {
209
+ throw new Error(`Failed to download ${redactUrlForLog(url)}: HTTP ${response.status}`);
210
+ }
211
+ const bytes = Buffer.from(await response.arrayBuffer());
212
+ fs.writeFileSync(destination, bytes);
213
+ }
package/package.json CHANGED
@@ -1,116 +1,25 @@
1
1
  {
2
2
  "name": "nexus-prime",
3
- "version": "7.9.33",
4
- "description": "Local-first MCP control plane for coding agents with bootstrap-orchestrate execution, memory fabric, token budgeting, and worktree-backed swarms",
3
+ "version": "7.9.34",
4
+ "description": "Local-first MCP control plane for coding agents with bootstrap-orchestrate execution, memory fabric, token budgeting, and worktree-backed swarms (binary installer shim)",
5
5
  "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "import": "./dist/index.js",
11
- "types": "./dist/index.d.ts"
12
- },
13
- "./hooks": {
14
- "import": "./dist/adapters/hooks/index.js",
15
- "types": "./dist/adapters/hooks/index.d.ts"
16
- },
17
- "./admin": {
18
- "import": "./dist/adapters/admin/index.js",
19
- "types": "./dist/adapters/admin/index.d.ts"
20
- }
6
+ "bin": {
7
+ "nexus-prime": "dist/binary-shim.js"
21
8
  },
22
9
  "files": [
23
10
  "dist",
24
11
  "README.md",
25
12
  "LICENSE"
26
13
  ],
14
+ "scripts": {
15
+ "postinstall": "node dist/binary-shim.js --install-only"
16
+ },
27
17
  "repository": {
28
18
  "type": "git",
29
19
  "url": "git+https://github.com/sir-ad/nexus-prime.git"
30
20
  },
31
21
  "homepage": "https://nexus-prime.cfd/",
32
- "bin": {
33
- "nexus-prime": "dist/cli.js"
34
- },
35
- "scripts": {
36
- "prepare": "git config core.hooksPath .hooks || true",
37
- "nexus:dev": "node dev-orchestrator.mjs",
38
- "generate:competitive-landscape": "tsx scripts/generate-competitive-landscape.ts",
39
- "generate:readme-catalog": "tsx scripts/generate-readme-runtime-catalog.ts",
40
- "clean": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"",
41
- "prebuild": "npm run clean",
42
- "prepush": "tsx scripts/check-file-sizes.ts && tsx scripts/perf-bench.ts",
43
- "size-check": "tsx scripts/check-file-sizes.ts",
44
- "build": "tsc && node dist/build-assets.js",
45
- "postinstall": "node -e \"const fs=require('fs');const p='dist/postinstall-runner.js';if(fs.existsSync(p)){import('./'+p).catch(e=>{console.error('[nexus-prime] postinstall bootstrap skipped:',e&&e.message?e.message:e);});}\"",
46
- "dev": "tsc --watch",
47
- "start": "node dist/cli.js start",
48
- "init": "node dist/cli.js init",
49
- "test:public": "tsx test/public-surface.test.ts",
50
- "test:synapse": "tsx src/synapse/__tests__/run.ts",
51
- "test:architects": "tsx src/architects/__tests__/run.ts",
52
- "test": "npm run build && tsx test/basic.test.ts && tsx test/memory.test.ts && tsx test/memory-regressions.test.ts && tsx test/memory-bridge.test.ts && tsx test/automation-runtime.test.ts && tsx test/session-dna-search.test.ts && tsx test/channel-gateway.test.ts && tsx test/semantic-ranking.test.ts && tsx test/storage-maintenance.test.ts && tsx test/ngram-index.test.ts && tsx test/security-shield.test.ts && tsx test/compaction-sentinel.test.ts && tsx test/context-compressor.test.ts && tsx test/embedder.test.ts && tsx test/skill-learner.test.ts && tsx test/skill-distribution.test.ts && tsx test/darwin-integration.test.ts && tsx test/github-bridge.test.ts && tsx test/telemetry-remote.test.ts && tsx test/orchestrator-engine.test.ts && tsx test/phase9.test.ts && tsx test/work-ledger.test.ts && tsx src/verify-token-scoring.ts && tsx test/phantom.test.ts && tsx test/rag-collections.test.ts && tsx test/dashboard.test.ts && tsx test/docs.test.ts && tsx test/competitive-landscape.test.ts && tsx test/runtime-upgrade-path.test.ts && tsx test/runtime-setup.test.ts && tsx test/control-plane-integration.test.ts && tsx test/runtime-timeout.test.ts && tsx test/mcp-dashboard-contract.test.ts && tsx test/dashboard-surfaces.test.ts && tsx test/startup-and-runtime-regressions.test.ts && tsx test/mcp-readiness-truth.test.ts && tsx test/mcp-stdio-session.test.ts && tsx test/kernel-context.test.ts && tsx test/kernel-execution.test.ts && tsx test/kernel-runtime.test.ts && tsx test/adapter-boundary.test.ts && tsx test/mcp-deprecation.test.ts && tsx test/dashboard-mutations.test.ts && tsx test/dashboard-agent-control.test.ts && tsx test/dashboard-runtime-adapters.test.ts && tsx test/hooks-adapter.test.ts && tsx test/admin-adapter.test.ts && tsx test/pkg-subexport.test.ts && tsx test/dashboard-sse-only.test.ts && tsx test/license-sync-offline.test.ts && tsx test/mcp-killlist-v2.test.ts && tsx test/uninstall.test.ts && tsx test/uninstall-lifecycle.test.ts && tsx test/install-arch-upgrade.test.ts && tsx test/unregister-configs.test.ts && tsx test/cleanup-storage.test.ts && tsx test/dashboard-memory-truthfulness.test.ts && tsx test/runtime-lifecycle.test.ts && tsx test/orchestrate-pipeline.test.ts && tsx test/daemon-supervisor.test.ts && tsx test/auto-optimize-tokens.test.ts && npm run test:synapse && npm run test:architects && npm run test:public",
53
- "lint": "eslint src --ext .ts",
54
- "verify:pricing": "tsx scripts/verify-provider-pricing.ts",
55
- "audit:prod": "npm audit --omit=dev",
56
- "smoke:release": "tsx scripts/release-smoke.ts",
57
- "qa:release": "npm run build && npm run lint && npm test && npm pack --dry-run && npm run audit:prod && npm run smoke:release"
58
- },
59
- "keywords": [
60
- "ai",
61
- "agents",
62
- "mcp",
63
- "memory",
64
- "token-optimization",
65
- "multi-agent",
66
- "orchestration",
67
- "guardrails",
68
- "self-evolving",
69
- "nexus-prime"
70
- ],
71
- "author": "sir-ad",
72
22
  "license": "MIT",
73
- "dependencies": {
74
- "@modelcontextprotocol/sdk": "^1.27.1",
75
- "better-sqlite3": "^12.6.2",
76
- "commander": "^11.1.0",
77
- "dotenv": "^16.3.1",
78
- "express": "^4.18.2",
79
- "js-yaml": "^4.1.1",
80
- "pino": "^8.17.2",
81
- "uuid": "^14.0.0",
82
- "ws": "^8.20.1",
83
- "zod": "^3.22.4"
84
- },
85
- "overrides": {
86
- "@hono/node-server": "^1.19.13",
87
- "express-rate-limit": "^8.3.1",
88
- "hono": "^4.12.14",
89
- "express": {
90
- "path-to-regexp": "0.1.13"
91
- },
92
- "router": {
93
- "path-to-regexp": "8.4.0"
94
- },
95
- "undici": "^7.24.2"
96
- },
97
- "devDependencies": {
98
- "@types/better-sqlite3": "^7.6.8",
99
- "@types/express": "^4.17.21",
100
- "@types/jest": "^29.5.11",
101
- "@types/js-yaml": "^4.0.9",
102
- "@types/node": "^20.11.0",
103
- "@types/uuid": "^11.0.0",
104
- "@types/ws": "^8.5.10",
105
- "@typescript-eslint/eslint-plugin": "^6.19.0",
106
- "@typescript-eslint/parser": "^6.19.0",
107
- "esbuild": "^0.27.3",
108
- "eslint": "^8.56.0",
109
- "jest": "^29.7.0",
110
- "ts-jest": "^29.1.1",
111
- "tsx": "^4.20.6",
112
- "typescript": "^5.3.3"
113
- },
114
23
  "engines": {
115
24
  "node": ">=20.0.0"
116
25
  }
@@ -1,14 +0,0 @@
1
- /**
2
- * Admin adapter — authoring.
3
- *
4
- * Programmatic specialist / skill file creation. Authoritative home for
5
- * the markdown builders that used to live in
6
- * `src/dashboard/routes/authoring.ts` (POST handlers are being retired
7
- * in PR7 Phase 3). Reachable from CLI and hosts without going through MCP.
8
- */
9
- import type { CreateSpecialistInput, CreateSpecialistResult, CreateSkillInput, CreateSkillResult } from './types.js';
10
- export interface AuthoringAdmin {
11
- createSpecialist(input: CreateSpecialistInput): Promise<CreateSpecialistResult>;
12
- createSkill(input: CreateSkillInput): Promise<CreateSkillResult>;
13
- }
14
- export declare function createAuthoringAdmin(repoRoot: string): AuthoringAdmin;
@@ -1,116 +0,0 @@
1
- /**
2
- * Admin adapter — authoring.
3
- *
4
- * Programmatic specialist / skill file creation. Authoritative home for
5
- * the markdown builders that used to live in
6
- * `src/dashboard/routes/authoring.ts` (POST handlers are being retired
7
- * in PR7 Phase 3). Reachable from CLI and hosts without going through MCP.
8
- */
9
- import * as fs from 'node:fs';
10
- import * as path from 'node:path';
11
- /** Sanitize an id to safe filesystem characters. */
12
- function safeId(raw) {
13
- return raw.replace(/[^a-z0-9._-]/gi, '-').toLowerCase().slice(0, 120);
14
- }
15
- /**
16
- * Render a specialist definition to markdown in the format expected by
17
- * the specialist detail loader at `.agents/specialists/<id>.md`.
18
- */
19
- function specialistToMarkdown(input) {
20
- const name = input.name;
21
- const division = input.division ?? 'custom';
22
- const description = input.description ?? '';
23
- const emoji = input.emoji ?? '🤖';
24
- const authority = input.authority ?? 'advisory';
25
- const domains = input.domains ?? [];
26
- const mission = input.mission ?? '';
27
- const rules = input.rules ?? [];
28
- const workflow = input.workflow ?? [];
29
- const deliverables = input.deliverables ?? [];
30
- const lines = [
31
- `# ${emoji} ${name}`,
32
- '',
33
- `**Division**: ${division} `,
34
- `**Authority**: ${authority} `,
35
- `**Domains**: ${domains.join(', ') || '—'} `,
36
- '',
37
- '## Description',
38
- '',
39
- description || '_No description provided._',
40
- '',
41
- '## Mission',
42
- '',
43
- mission || '_No mission provided._',
44
- '',
45
- ];
46
- if (rules.length) {
47
- lines.push('## Rules', '');
48
- rules.forEach((r) => lines.push(`- ${r}`));
49
- lines.push('');
50
- }
51
- if (workflow.length) {
52
- lines.push('## Workflow', '');
53
- workflow.forEach((w) => lines.push(`- ${w}`));
54
- lines.push('');
55
- }
56
- if (deliverables.length) {
57
- lines.push('## Deliverables', '');
58
- deliverables.forEach((d) => lines.push(`- ${d}`));
59
- lines.push('');
60
- }
61
- return lines.join('\n');
62
- }
63
- /**
64
- * Render a skill definition to markdown for `.agents/skills/<id>.md`.
65
- */
66
- function skillToMarkdown(input) {
67
- const name = input.name;
68
- const description = input.description ?? '';
69
- const trigger = input.trigger ?? '';
70
- const steps = input.steps ?? [];
71
- const lines = [
72
- `# ${name}`,
73
- '',
74
- description || '_No description provided._',
75
- '',
76
- ];
77
- if (trigger) {
78
- lines.push('## Trigger', '', trigger, '');
79
- }
80
- if (steps.length) {
81
- lines.push('## Steps', '');
82
- steps.forEach((s) => lines.push(`- ${s}`));
83
- lines.push('');
84
- }
85
- return lines.join('\n');
86
- }
87
- function requireName(name, kind) {
88
- if (typeof name !== 'string' || name.trim().length === 0) {
89
- throw new Error(`admin.createAuthoring: ${kind} name is required`);
90
- }
91
- return name.trim();
92
- }
93
- export function createAuthoringAdmin(repoRoot) {
94
- return {
95
- async createSpecialist(input) {
96
- const name = requireName(input.name, 'specialist');
97
- const specialistId = safeId(name);
98
- const dir = path.join(repoRoot, '.agents', 'specialists');
99
- const filePath = path.join(dir, `${specialistId}.md`);
100
- const content = specialistToMarkdown({ ...input, name });
101
- await fs.promises.mkdir(dir, { recursive: true });
102
- await fs.promises.writeFile(filePath, content, 'utf8');
103
- return { ok: true, specialistId, filePath };
104
- },
105
- async createSkill(input) {
106
- const name = requireName(input.name, 'skill');
107
- const skillId = safeId(name);
108
- const dir = path.join(repoRoot, '.agents', 'skills');
109
- const filePath = path.join(dir, `${skillId}.md`);
110
- const content = skillToMarkdown({ ...input, name });
111
- await fs.promises.mkdir(dir, { recursive: true });
112
- await fs.promises.writeFile(filePath, content, 'utf8');
113
- return { ok: true, skillId, filePath };
114
- },
115
- };
116
- }
@@ -1,39 +0,0 @@
1
- /**
2
- * Admin adapter — control.
3
- *
4
- * Thin facade over operator-grade runtime actions: license management and
5
- * memory export/import. Exposes what already exists in the engines as a
6
- * library call so hosts can trigger it without going through MCP JSON-RPC.
7
- */
8
- import type { LicenseStatus } from '../../licensing/index.js';
9
- import type { MemoryEngine, MemoryExportBundle, MemoryImportResult, MemoryItem } from '../../engines/memory.js';
10
- export interface MemoryExportOptions {
11
- limit?: number;
12
- scope?: MemoryItem['scope'];
13
- state?: MemoryItem['state'];
14
- sessionId?: string;
15
- }
16
- export interface ControlLicenseAdmin {
17
- /** Current license status (no I/O). */
18
- status(): LicenseStatus;
19
- /** Validate + persist a license key. Returns updated status. */
20
- activate(token: string): LicenseStatus;
21
- /** Remove the license key and reset to free tier. */
22
- deactivate(): void;
23
- /** Sync with the licensing backend. Requires network. */
24
- sync(): Promise<LicenseStatus>;
25
- }
26
- export interface ControlMemoryAdmin {
27
- /** Export in-memory items to a bundle. Requires ctx.memory. */
28
- export(options?: MemoryExportOptions): MemoryExportBundle;
29
- /** Import a bundle (from path or object). Requires ctx.memory. */
30
- import(input: {
31
- path?: string;
32
- bundle?: MemoryExportBundle;
33
- }): Promise<MemoryImportResult>;
34
- }
35
- export interface ControlAdmin {
36
- license: ControlLicenseAdmin;
37
- memory: ControlMemoryAdmin;
38
- }
39
- export declare function createControlAdmin(_repoRoot: string, memory?: MemoryEngine): ControlAdmin;
@@ -1,41 +0,0 @@
1
- /**
2
- * Admin adapter — control.
3
- *
4
- * Thin facade over operator-grade runtime actions: license management and
5
- * memory export/import. Exposes what already exists in the engines as a
6
- * library call so hosts can trigger it without going through MCP JSON-RPC.
7
- */
8
- import { getSharedLicenseManager, syncLicense } from '../../licensing/index.js';
9
- function requireMemory(memory) {
10
- if (!memory) {
11
- throw new Error('admin.control.memory: ctx.memory required — pass a MemoryEngine instance to createAdmin()');
12
- }
13
- }
14
- export function createControlAdmin(_repoRoot, memory) {
15
- return {
16
- license: {
17
- status() {
18
- return getSharedLicenseManager().getStatus();
19
- },
20
- activate(token) {
21
- return getSharedLicenseManager().activate(token);
22
- },
23
- deactivate() {
24
- getSharedLicenseManager().deactivate();
25
- },
26
- sync() {
27
- return syncLicense();
28
- },
29
- },
30
- memory: {
31
- export(options = {}) {
32
- requireMemory(memory);
33
- return memory.exportBundle(options);
34
- },
35
- async import(input) {
36
- requireMemory(memory);
37
- return memory.importBundle(input);
38
- },
39
- },
40
- };
41
- }
@@ -1,38 +0,0 @@
1
- /**
2
- * Admin adapter — barrel.
3
- *
4
- * Operator-grade, in-process host surface for authoring (specialist/skill
5
- * file creation) and control-plane actions (license management, memory
6
- * export/import) that don't belong on the observer-only dashboard and
7
- * don't need to go through MCP JSON-RPC.
8
- *
9
- * import { createAdmin } from 'nexus-prime/admin';
10
- *
11
- * const admin = createAdmin({ repoRoot });
12
- * await admin.authoring.createSpecialist({ name: 'Fix Auth', ... });
13
- * admin.control.license.activate(token);
14
- * admin.control.memory.export(); // requires ctx.memory
15
- *
16
- * Layering:
17
- * - may import from `src/kernel/**`, `src/engines/**`, `src/adapters/shared/**`.
18
- * - MUST NOT import from `src/agents/adapters/mcp/**` or `src/dashboard/**`.
19
- * Enforced by `test/adapter-boundary.test.ts`.
20
- */
21
- import { type AuthoringAdmin } from './authoring.js';
22
- import { type ControlAdmin } from './control.js';
23
- import type { AdminContext } from './types.js';
24
- export type { AdminContext, CreateSpecialistInput, CreateSpecialistResult, CreateSkillInput, CreateSkillResult, } from './types.js';
25
- export type { AuthoringAdmin, } from './authoring.js';
26
- export type { ControlAdmin, ControlLicenseAdmin, ControlMemoryAdmin, MemoryExportOptions, } from './control.js';
27
- export interface Admin {
28
- authoring: AuthoringAdmin;
29
- control: ControlAdmin;
30
- }
31
- /**
32
- * Compose an admin surface bound to an absolute repoRoot. Fail-fast: throws
33
- * if `ctx.repoRoot` is missing or not absolute, mirroring the hooks adapter
34
- * contract from PR6.
35
- *
36
- * Pass `ctx.memory` to enable admin.control.memory.* methods.
37
- */
38
- export declare function createAdmin(ctx: AdminContext): Admin;
@@ -1,39 +0,0 @@
1
- /**
2
- * Admin adapter — barrel.
3
- *
4
- * Operator-grade, in-process host surface for authoring (specialist/skill
5
- * file creation) and control-plane actions (license management, memory
6
- * export/import) that don't belong on the observer-only dashboard and
7
- * don't need to go through MCP JSON-RPC.
8
- *
9
- * import { createAdmin } from 'nexus-prime/admin';
10
- *
11
- * const admin = createAdmin({ repoRoot });
12
- * await admin.authoring.createSpecialist({ name: 'Fix Auth', ... });
13
- * admin.control.license.activate(token);
14
- * admin.control.memory.export(); // requires ctx.memory
15
- *
16
- * Layering:
17
- * - may import from `src/kernel/**`, `src/engines/**`, `src/adapters/shared/**`.
18
- * - MUST NOT import from `src/agents/adapters/mcp/**` or `src/dashboard/**`.
19
- * Enforced by `test/adapter-boundary.test.ts`.
20
- */
21
- import * as path from 'node:path';
22
- import { createAuthoringAdmin } from './authoring.js';
23
- import { createControlAdmin } from './control.js';
24
- /**
25
- * Compose an admin surface bound to an absolute repoRoot. Fail-fast: throws
26
- * if `ctx.repoRoot` is missing or not absolute, mirroring the hooks adapter
27
- * contract from PR6.
28
- *
29
- * Pass `ctx.memory` to enable admin.control.memory.* methods.
30
- */
31
- export function createAdmin(ctx) {
32
- if (!ctx.repoRoot || !path.isAbsolute(ctx.repoRoot)) {
33
- throw new Error('createAdmin: ctx.repoRoot must be an absolute path');
34
- }
35
- return {
36
- authoring: createAuthoringAdmin(ctx.repoRoot),
37
- control: createControlAdmin(ctx.repoRoot, ctx.memory),
38
- };
39
- }