spawnfile 0.1.33 → 0.1.35

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 (606) hide show
  1. package/README.md +1 -1
  2. package/dist/audit/readAudit.d.ts +3 -3
  3. package/dist/auth/profileStore.d.ts +3 -1
  4. package/dist/auth/profileStore.js +31 -30
  5. package/dist/auth/trainingAuth.d.ts +2 -5
  6. package/dist/auth/types.d.ts +16 -0
  7. package/dist/cli/authCommands.d.ts +1 -1
  8. package/dist/cli/authCommands.js +21 -1
  9. package/dist/cli/devCommands.d.ts +1 -1
  10. package/dist/cli/devCommands.js +0 -66
  11. package/dist/cli/runCli.d.ts +3 -4
  12. package/dist/cli/runCli.js +4 -3
  13. package/dist/cli/trainCommand.js +9 -15
  14. package/dist/cli/trainingBooted.d.ts +9 -0
  15. package/dist/cli/trainingBooted.js +45 -0
  16. package/dist/cli/trainingExecution.d.ts +4 -7
  17. package/dist/cli/trainingExecution.js +4 -32
  18. package/dist/compiler/containerArtifacts.js +0 -5
  19. package/dist/compiler/containerBackedMountRender.js +5 -1
  20. package/dist/compiler/containerDaimonBrokerRender.d.ts +5 -50
  21. package/dist/compiler/containerDaimonBrokerRender.js +19 -90
  22. package/dist/compiler/containerDaimonGatewayRender.d.ts +50 -0
  23. package/dist/compiler/containerDaimonGatewayRender.js +161 -0
  24. package/dist/compiler/containerDaimonGrokWorkerProvisioning.d.ts +2 -10
  25. package/dist/compiler/containerDaimonGrokWorkerProvisioning.js +13 -25
  26. package/dist/compiler/containerDaimonGrokWorkerRender.d.ts +11 -49
  27. package/dist/compiler/containerDaimonGrokWorkerRender.js +15 -39
  28. package/dist/compiler/containerDaimonStartupSupervision.d.ts +8 -0
  29. package/dist/compiler/containerDaimonStartupSupervision.js +39 -0
  30. package/dist/compiler/containerDaimonUidEntrypointRender.d.ts +1 -2
  31. package/dist/compiler/containerDaimonUidEntrypointRender.js +29 -47
  32. package/dist/compiler/containerRuntimeReadinessRender.js +1 -1
  33. package/dist/compiler/memoryArtifacts.js +0 -1
  34. package/dist/compiler/moltnetArtifacts.js +1 -17
  35. package/dist/compiler/moltnetClientConfig.js +1 -1
  36. package/dist/compiler/moltnetRuntimeConfig.js +0 -10
  37. package/dist/compiler/runProject.d.ts +3 -0
  38. package/dist/compiler/runProject.js +12 -5
  39. package/dist/compiler/runProjectAuth.js +6 -18
  40. package/dist/compiler/training/contract.d.ts +0 -2
  41. package/dist/compiler/training/contract.js +0 -2
  42. package/dist/compiler/training/execution.d.ts +1 -128
  43. package/dist/compiler/training/execution.js +7 -68
  44. package/dist/compiler/training/index.d.ts +0 -8
  45. package/dist/compiler/training/index.js +0 -7
  46. package/dist/compiler/training/output.d.ts +1 -0
  47. package/dist/compiler/training/output.js +1 -1
  48. package/dist/compiler/training/rewind/contract.d.ts +6 -6
  49. package/dist/compiler/training/trial/boot.d.ts +72 -0
  50. package/dist/compiler/training/trial/boot.js +225 -0
  51. package/dist/compiler/training/trial/docker.d.ts +10 -0
  52. package/dist/compiler/training/trial/docker.js +22 -0
  53. package/dist/compiler/training/trial/gateway.d.ts +47 -0
  54. package/dist/compiler/training/trial/gateway.js +113 -0
  55. package/dist/compiler/training/trial/homeLogin.d.ts +31 -0
  56. package/dist/compiler/training/trial/homeLogin.js +69 -0
  57. package/dist/compiler/training/trial/index.d.ts +8 -0
  58. package/dist/compiler/training/trial/index.js +8 -0
  59. package/dist/compiler/training/trial/judge.d.ts +15 -0
  60. package/dist/compiler/training/trial/judge.js +42 -0
  61. package/dist/compiler/training/trial/launcher.d.ts +47 -0
  62. package/dist/compiler/training/trial/launcher.js +193 -0
  63. package/dist/compiler/training/trial/login.d.ts +35 -0
  64. package/dist/compiler/training/trial/login.js +85 -0
  65. package/dist/compiler/training/trial/project.d.ts +11 -0
  66. package/dist/compiler/training/trial/project.js +31 -0
  67. package/dist/compiler/training/trial/realmTurns.d.ts +20 -0
  68. package/dist/compiler/training/trial/realmTurns.js +69 -0
  69. package/dist/compiler/upReceipt.d.ts +2 -17
  70. package/dist/compiler/upReceipt.js +2 -17
  71. package/dist/deployment/artifactsExportPlan.js +2 -18
  72. package/dist/deployment/privateArtifactsExport.js +1 -1
  73. package/dist/dev/docker.d.ts +0 -5
  74. package/dist/dev/docker.js +0 -46
  75. package/dist/dev/index.d.ts +0 -1
  76. package/dist/dev/index.js +0 -1
  77. package/dist/dev/project.d.ts +0 -16
  78. package/dist/dev/project.js +1 -128
  79. package/dist/distribution/distributionReportSchema.js +1 -1
  80. package/dist/distribution/imageRuntimeAuth.js +3 -2
  81. package/dist/manifest/renderSpawnfile.js +2 -1
  82. package/dist/release/drainControl.d.ts +5 -19
  83. package/dist/release/drainControl.js +12 -67
  84. package/dist/report/types.d.ts +3 -6
  85. package/dist/runtime/common.d.ts +1 -1
  86. package/dist/runtime/common.js +1 -1
  87. package/dist/runtime/container.d.ts +2 -2
  88. package/dist/runtime/container.js +1 -39
  89. package/dist/runtime/daimon/config.js +8 -14
  90. package/dist/runtime/daimon/contractManifest.js +0 -1
  91. package/dist/runtime/daimon/contractManifestSchema.js +0 -1
  92. package/dist/runtime/daimon/control.d.ts +31 -0
  93. package/dist/runtime/daimon/control.js +83 -0
  94. package/dist/runtime/daimon/engineDescriptorSchema.js +0 -1
  95. package/dist/runtime/daimon/engineDescriptors.generated.d.ts +1 -1
  96. package/dist/runtime/daimon/engineDescriptors.generated.js +1 -2
  97. package/dist/runtime/daimon/engines.js +0 -1
  98. package/dist/runtime/daimon/gateway.d.ts +62 -0
  99. package/dist/runtime/daimon/gateway.js +77 -0
  100. package/dist/runtime/daimon/grokWorkerContract.d.ts +0 -5
  101. package/dist/runtime/daimon/grokWorkerContract.js +1 -13
  102. package/dist/runtime/daimon/index.d.ts +2 -0
  103. package/dist/runtime/daimon/index.js +2 -1
  104. package/dist/runtime/daimon/memory.js +1 -1
  105. package/dist/runtime/daimon/packageName.js +0 -1
  106. package/dist/runtime/daimon/runAuth.js +15 -4
  107. package/dist/runtime/daimon/runtimeIdentity.d.ts +2 -0
  108. package/dist/runtime/daimon/runtimeIdentity.js +2 -0
  109. package/dist/runtime/daimon/subscriptionRealms.d.ts +27 -3
  110. package/dist/runtime/daimon/subscriptionRealms.js +35 -13
  111. package/dist/runtime/daimon/testHelpers.d.ts +2 -0
  112. package/dist/runtime/{pi → daimon}/testHelpers.js +3 -3
  113. package/dist/runtime/daimon/training/booted/adapter.d.ts +50 -0
  114. package/dist/runtime/daimon/training/booted/adapter.js +60 -0
  115. package/dist/runtime/daimon/training/booted/adapter.js.map +1 -0
  116. package/dist/runtime/daimon/training/booted/index.d.ts +4 -0
  117. package/dist/runtime/daimon/training/booted/index.js +3 -0
  118. package/dist/runtime/daimon/training/booted/index.js.map +1 -0
  119. package/dist/runtime/daimon/training/booted/judge.d.ts +39 -0
  120. package/dist/runtime/daimon/training/booted/judge.js +122 -0
  121. package/dist/runtime/daimon/training/booted/judge.js.map +1 -0
  122. package/dist/runtime/daimon/training/index.d.ts +5 -0
  123. package/dist/runtime/daimon/training/index.js +8 -4
  124. package/dist/runtime/daimon/training/index.js.map +1 -1
  125. package/dist/runtime/daimon/wakeMoments.js +0 -1
  126. package/dist/runtime/install.js +0 -21
  127. package/dist/runtime/registry.js +0 -2
  128. package/dist/runtime/trainingGraderProviders.js +10 -4
  129. package/dist/runtime/trainingProviders.d.ts +5 -3
  130. package/dist/runtime/trainingProviders.js +21 -24
  131. package/dist/runtime/trainingSubjects.d.ts +0 -121
  132. package/dist/runtime/trainingSubjects.js +2 -13
  133. package/dist/runtime/types.d.ts +1 -8
  134. package/dist/runtime/usageRequestLedger.d.ts +2 -0
  135. package/dist/runtime/usageRequestLedger.js +3 -1
  136. package/dist/shared/errors.js +0 -1
  137. package/dist/shared/trainingLegacy/trainingLegacyHashDomains.d.ts +1 -0
  138. package/dist/shared/trainingLegacy/trainingLegacyHashDomains.js +1 -0
  139. package/dist/shared/trainingLegacy/trainingLegacyHashDomains.js.map +1 -1
  140. package/dist/status/lifecycleProbes.js +3 -6
  141. package/dist/status/moltnetWiringProbes.js +1 -17
  142. package/dist/training/subjects/index.d.ts +0 -1
  143. package/dist/training/subjects/index.js +0 -1
  144. package/dist/training/subjects/index.js.map +1 -1
  145. package/examples/README.md +0 -1
  146. package/examples/daimon-org/agents/mapper/Spawnfile +4 -1
  147. package/examples/daimon-org/teams/review/agents/reviewer/Spawnfile +4 -1
  148. package/examples/jungian-daimon-org/teams/luna/agents/animus/Spawnfile +5 -8
  149. package/examples/jungian-daimon-org/teams/luna/agents/representative/Spawnfile +1 -1
  150. package/examples/jungian-daimon-org/teams/luna/agents/shadow/Spawnfile +5 -8
  151. package/examples/jungian-daimon-org/teams/selene/agents/animus/Spawnfile +5 -8
  152. package/examples/jungian-daimon-org/teams/selene/agents/representative/Spawnfile +5 -8
  153. package/examples/jungian-daimon-org/teams/selene/agents/shadow/Spawnfile +1 -1
  154. package/examples/mixed-runtime-org/agents/localist/Spawnfile +7 -7
  155. package/package.json +4 -13
  156. package/runtimes.yaml +5 -15
  157. package/dist/compiler/containerDaimonGrokTaskClock.d.ts +0 -5
  158. package/dist/compiler/containerDaimonGrokTaskClock.js +0 -29
  159. package/dist/compiler/daimonTelemetryArtifacts.d.ts +0 -22
  160. package/dist/compiler/daimonTelemetryArtifacts.js +0 -56
  161. package/dist/compiler/training/broker/clockProbe.d.ts +0 -6
  162. package/dist/compiler/training/broker/clockProbe.js +0 -27
  163. package/dist/compiler/training/broker/declaration.d.ts +0 -54
  164. package/dist/compiler/training/broker/declaration.js +0 -70
  165. package/dist/compiler/training/broker/entrypoint.d.ts +0 -39
  166. package/dist/compiler/training/broker/entrypoint.js +0 -124
  167. package/dist/compiler/training/broker/evaluatorSecrets.d.ts +0 -2
  168. package/dist/compiler/training/broker/evaluatorSecrets.js +0 -62
  169. package/dist/compiler/training/broker/index.d.ts +0 -12
  170. package/dist/compiler/training/broker/index.js +0 -12
  171. package/dist/compiler/training/broker/main.d.ts +0 -2
  172. package/dist/compiler/training/broker/main.js +0 -14
  173. package/dist/compiler/training/broker/paths.d.ts +0 -236
  174. package/dist/compiler/training/broker/paths.js +0 -249
  175. package/dist/compiler/training/broker/processes.d.ts +0 -51
  176. package/dist/compiler/training/broker/processes.js +0 -102
  177. package/dist/compiler/training/broker/projection.d.ts +0 -61
  178. package/dist/compiler/training/broker/projection.js +0 -109
  179. package/dist/compiler/training/broker/provisioning.d.ts +0 -78
  180. package/dist/compiler/training/broker/provisioning.js +0 -231
  181. package/dist/compiler/training/broker/receipt.d.ts +0 -77
  182. package/dist/compiler/training/broker/receipt.js +0 -110
  183. package/dist/compiler/training/broker/recycleClient.d.ts +0 -33
  184. package/dist/compiler/training/broker/recycleClient.js +0 -112
  185. package/dist/compiler/training/broker/registration.d.ts +0 -46
  186. package/dist/compiler/training/broker/registration.js +0 -113
  187. package/dist/compiler/training/broker/reset.d.ts +0 -9
  188. package/dist/compiler/training/broker/reset.js +0 -71
  189. package/dist/compiler/training/broker/rootScript.d.ts +0 -32
  190. package/dist/compiler/training/broker/rootScript.js +0 -33
  191. package/dist/compiler/training/broker/runtime.d.ts +0 -22
  192. package/dist/compiler/training/broker/runtime.js +0 -128
  193. package/dist/compiler/training/broker/seccompRoutes.d.ts +0 -31
  194. package/dist/compiler/training/broker/seccompRoutes.js +0 -36
  195. package/dist/compiler/training/broker/supervisor.d.ts +0 -108
  196. package/dist/compiler/training/broker/supervisor.js +0 -172
  197. package/dist/compiler/training/broker/taskClock.d.ts +0 -5
  198. package/dist/compiler/training/broker/taskClock.js +0 -41
  199. package/dist/compiler/training/container/contract.d.ts +0 -54
  200. package/dist/compiler/training/container/contract.js +0 -52
  201. package/dist/compiler/training/container/evaluators.d.ts +0 -48
  202. package/dist/compiler/training/container/evaluators.js +0 -50
  203. package/dist/compiler/training/container/grokWriteback.d.ts +0 -8
  204. package/dist/compiler/training/container/grokWriteback.js +0 -26
  205. package/dist/compiler/training/container/index.d.ts +0 -5
  206. package/dist/compiler/training/container/index.js +0 -3
  207. package/dist/compiler/training/container/launch.d.ts +0 -21
  208. package/dist/compiler/training/container/launch.js +0 -280
  209. package/dist/compiler/training/container/nativeSlots.d.ts +0 -14
  210. package/dist/compiler/training/container/nativeSlots.js +0 -13
  211. package/dist/compiler/training/container/outputCopy.d.ts +0 -2
  212. package/dist/compiler/training/container/outputCopy.js +0 -72
  213. package/dist/compiler/training/container/outputVolume.d.ts +0 -28
  214. package/dist/compiler/training/container/outputVolume.js +0 -185
  215. package/dist/compiler/training/container/prepare.d.ts +0 -10
  216. package/dist/compiler/training/container/prepare.js +0 -125
  217. package/dist/compiler/training/container/process.d.ts +0 -14
  218. package/dist/compiler/training/container/process.js +0 -70
  219. package/dist/compiler/training/container/security.d.ts +0 -38
  220. package/dist/compiler/training/container/security.js +0 -68
  221. package/dist/compiler/training/container/subjectIsolation.d.ts +0 -5
  222. package/dist/compiler/training/container/subjectIsolation.js +0 -16
  223. package/dist/compiler/training/preparation/assets/Dockerfile +0 -100
  224. package/dist/compiler/training/preparation/assets/package-lock.json +0 -5483
  225. package/dist/compiler/training/preparation/broker.d.ts +0 -30
  226. package/dist/compiler/training/preparation/broker.js +0 -68
  227. package/dist/compiler/training/preparation/contextModes.d.ts +0 -12
  228. package/dist/compiler/training/preparation/contextModes.js +0 -38
  229. package/dist/compiler/training/preparation/contract.d.ts +0 -203
  230. package/dist/compiler/training/preparation/contract.js +0 -114
  231. package/dist/compiler/training/preparation/copyAssets.d.ts +0 -1
  232. package/dist/compiler/training/preparation/copyAssets.js +0 -8
  233. package/dist/compiler/training/preparation/daimonParent.d.ts +0 -42
  234. package/dist/compiler/training/preparation/daimonParent.js +0 -114
  235. package/dist/compiler/training/preparation/files.d.ts +0 -29
  236. package/dist/compiler/training/preparation/files.js +0 -146
  237. package/dist/compiler/training/preparation/image.d.ts +0 -28
  238. package/dist/compiler/training/preparation/image.js +0 -105
  239. package/dist/compiler/training/preparation/index.d.ts +0 -3
  240. package/dist/compiler/training/preparation/index.js +0 -2
  241. package/dist/compiler/training/preparation/inputs.d.ts +0 -24
  242. package/dist/compiler/training/preparation/inputs.js +0 -101
  243. package/dist/compiler/training/preparation/prepare.d.ts +0 -38
  244. package/dist/compiler/training/preparation/prepare.js +0 -224
  245. package/dist/compiler/training/preparation/scratch.d.ts +0 -8
  246. package/dist/compiler/training/preparation/scratch.js +0 -114
  247. package/dist/compiler/training/repair/compatibility.d.ts +0 -11
  248. package/dist/compiler/training/repair/compatibility.js +0 -45
  249. package/dist/compiler/training/repair/contract.d.ts +0 -832
  250. package/dist/compiler/training/repair/contract.js +0 -34
  251. package/dist/compiler/training/repair/index.d.ts +0 -3
  252. package/dist/compiler/training/repair/index.js +0 -3
  253. package/dist/compiler/training/repair/prepare.d.ts +0 -378
  254. package/dist/compiler/training/repair/prepare.js +0 -84
  255. package/dist/compiler/training/repair/witness.d.ts +0 -348
  256. package/dist/compiler/training/repair/witness.js +0 -62
  257. package/dist/compiler/training/subjectDeclaration.d.ts +0 -26
  258. package/dist/compiler/training/subjectDeclaration.js +0 -54
  259. package/dist/compiler/training/subjectLease.d.ts +0 -115
  260. package/dist/compiler/training/subjectLease.js +0 -179
  261. package/dist/dev/activity.d.ts +0 -14
  262. package/dist/dev/activity.js +0 -48
  263. package/dist/runtime/codex-exec/training/adapter.d.ts +0 -13
  264. package/dist/runtime/codex-exec/training/adapter.js +0 -101
  265. package/dist/runtime/codex-exec/training/adapter.js.map +0 -1
  266. package/dist/runtime/codex-exec/training/environment.d.ts +0 -3
  267. package/dist/runtime/codex-exec/training/environment.js +0 -26
  268. package/dist/runtime/codex-exec/training/environment.js.map +0 -1
  269. package/dist/runtime/codex-exec/training/index.d.ts +0 -2
  270. package/dist/runtime/codex-exec/training/index.js +0 -3
  271. package/dist/runtime/codex-exec/training/index.js.map +0 -1
  272. package/dist/runtime/codex-exec/training/protocol.d.ts +0 -15
  273. package/dist/runtime/codex-exec/training/protocol.js +0 -102
  274. package/dist/runtime/codex-exec/training/protocol.js.map +0 -1
  275. package/dist/runtime/codex-exec/training/providers/codex-subscription/index.d.ts +0 -1
  276. package/dist/runtime/codex-exec/training/providers/codex-subscription/index.js +0 -2
  277. package/dist/runtime/codex-exec/training/providers/codex-subscription/index.js.map +0 -1
  278. package/dist/runtime/codex-exec/training/providers/codex-subscription/protocol.d.ts +0 -17
  279. package/dist/runtime/codex-exec/training/providers/codex-subscription/protocol.js +0 -80
  280. package/dist/runtime/codex-exec/training/providers/codex-subscription/protocol.js.map +0 -1
  281. package/dist/runtime/codex-exec/training/providers/codex-subscription/provider.d.ts +0 -12
  282. package/dist/runtime/codex-exec/training/providers/codex-subscription/provider.js +0 -125
  283. package/dist/runtime/codex-exec/training/providers/codex-subscription/provider.js.map +0 -1
  284. package/dist/runtime/codex-exec/training/providers/codex-subscription/strict-schema.d.ts +0 -6
  285. package/dist/runtime/codex-exec/training/providers/codex-subscription/strict-schema.js +0 -219
  286. package/dist/runtime/codex-exec/training/providers/codex-subscription/strict-schema.js.map +0 -1
  287. package/dist/runtime/daimon/contractManifest.js.map +0 -1
  288. package/dist/runtime/daimon/contractManifestSchema.js.map +0 -1
  289. package/dist/runtime/daimon/engineDescriptorSchema.js.map +0 -1
  290. package/dist/runtime/daimon/engineDescriptors.generated.js.map +0 -1
  291. package/dist/runtime/daimon/engines.js.map +0 -1
  292. package/dist/runtime/daimon/index.js.map +0 -1
  293. package/dist/runtime/daimon/packageName.js.map +0 -1
  294. package/dist/runtime/daimon/training/legacy/adapter.d.ts +0 -11
  295. package/dist/runtime/daimon/training/legacy/adapter.js +0 -175
  296. package/dist/runtime/daimon/training/legacy/adapter.js.map +0 -1
  297. package/dist/runtime/daimon/training/legacy/index.d.ts +0 -2
  298. package/dist/runtime/daimon/training/legacy/index.js +0 -3
  299. package/dist/runtime/daimon/training/legacy/index.js.map +0 -1
  300. package/dist/runtime/daimon/training/legacy/public.d.ts +0 -49
  301. package/dist/runtime/daimon/training/legacy/public.js +0 -16
  302. package/dist/runtime/daimon/training/legacy/public.js.map +0 -1
  303. package/dist/runtime/daimon/training/native/adapter.d.ts +0 -18
  304. package/dist/runtime/daimon/training/native/adapter.js +0 -252
  305. package/dist/runtime/daimon/training/native/adapter.js.map +0 -1
  306. package/dist/runtime/daimon/training/native/admission.d.ts +0 -7
  307. package/dist/runtime/daimon/training/native/admission.js +0 -52
  308. package/dist/runtime/daimon/training/native/admission.js.map +0 -1
  309. package/dist/runtime/daimon/training/native/child/arguments.d.ts +0 -16
  310. package/dist/runtime/daimon/training/native/child/arguments.js +0 -70
  311. package/dist/runtime/daimon/training/native/child/arguments.js.map +0 -1
  312. package/dist/runtime/daimon/training/native/child/deferred-trial.d.ts +0 -24
  313. package/dist/runtime/daimon/training/native/child/deferred-trial.js +0 -63
  314. package/dist/runtime/daimon/training/native/child/deferred-trial.js.map +0 -1
  315. package/dist/runtime/daimon/training/native/child/diagnostics.d.ts +0 -58
  316. package/dist/runtime/daimon/training/native/child/diagnostics.js +0 -215
  317. package/dist/runtime/daimon/training/native/child/diagnostics.js.map +0 -1
  318. package/dist/runtime/daimon/training/native/child/fixture.d.ts +0 -16
  319. package/dist/runtime/daimon/training/native/child/fixture.js +0 -159
  320. package/dist/runtime/daimon/training/native/child/fixture.js.map +0 -1
  321. package/dist/runtime/daimon/training/native/child/grok.d.ts +0 -14
  322. package/dist/runtime/daimon/training/native/child/grok.js +0 -47
  323. package/dist/runtime/daimon/training/native/child/grok.js.map +0 -1
  324. package/dist/runtime/daimon/training/native/child/index.d.ts +0 -7
  325. package/dist/runtime/daimon/training/native/child/index.js +0 -5
  326. package/dist/runtime/daimon/training/native/child/index.js.map +0 -1
  327. package/dist/runtime/daimon/training/native/child/lifecycle.d.ts +0 -40
  328. package/dist/runtime/daimon/training/native/child/lifecycle.js +0 -400
  329. package/dist/runtime/daimon/training/native/child/lifecycle.js.map +0 -1
  330. package/dist/runtime/daimon/training/native/child/probe.d.ts +0 -2
  331. package/dist/runtime/daimon/training/native/child/probe.js +0 -11
  332. package/dist/runtime/daimon/training/native/child/probe.js.map +0 -1
  333. package/dist/runtime/daimon/training/native/child/sandbox.d.ts +0 -4
  334. package/dist/runtime/daimon/training/native/child/sandbox.js +0 -76
  335. package/dist/runtime/daimon/training/native/child/sandbox.js.map +0 -1
  336. package/dist/runtime/daimon/training/native/child/types.d.ts +0 -15
  337. package/dist/runtime/daimon/training/native/child/types.js +0 -2
  338. package/dist/runtime/daimon/training/native/child/types.js.map +0 -1
  339. package/dist/runtime/daimon/training/native/container/docker.d.ts +0 -29
  340. package/dist/runtime/daimon/training/native/container/docker.js +0 -105
  341. package/dist/runtime/daimon/training/native/container/docker.js.map +0 -1
  342. package/dist/runtime/daimon/training/native/container/grok-slot.d.ts +0 -22
  343. package/dist/runtime/daimon/training/native/container/grok-slot.js +0 -38
  344. package/dist/runtime/daimon/training/native/container/grok-slot.js.map +0 -1
  345. package/dist/runtime/daimon/training/native/container/index.d.ts +0 -6
  346. package/dist/runtime/daimon/training/native/container/index.js +0 -6
  347. package/dist/runtime/daimon/training/native/container/index.js.map +0 -1
  348. package/dist/runtime/daimon/training/native/container/lifecycle.d.ts +0 -8
  349. package/dist/runtime/daimon/training/native/container/lifecycle.js +0 -111
  350. package/dist/runtime/daimon/training/native/container/lifecycle.js.map +0 -1
  351. package/dist/runtime/daimon/training/native/container/manifest.d.ts +0 -17
  352. package/dist/runtime/daimon/training/native/container/manifest.js +0 -164
  353. package/dist/runtime/daimon/training/native/container/manifest.js.map +0 -1
  354. package/dist/runtime/daimon/training/native/container/native-preflight.d.ts +0 -8
  355. package/dist/runtime/daimon/training/native/container/native-preflight.js +0 -40
  356. package/dist/runtime/daimon/training/native/container/native-preflight.js.map +0 -1
  357. package/dist/runtime/daimon/training/native/container/preflight.d.ts +0 -15
  358. package/dist/runtime/daimon/training/native/container/preflight.js +0 -79
  359. package/dist/runtime/daimon/training/native/container/preflight.js.map +0 -1
  360. package/dist/runtime/daimon/training/native/container/slot.d.ts +0 -4
  361. package/dist/runtime/daimon/training/native/container/slot.js +0 -58
  362. package/dist/runtime/daimon/training/native/container/slot.js.map +0 -1
  363. package/dist/runtime/daimon/training/native/external.d.ts +0 -37
  364. package/dist/runtime/daimon/training/native/external.js +0 -75
  365. package/dist/runtime/daimon/training/native/external.js.map +0 -1
  366. package/dist/runtime/daimon/training/native/grants/authority.d.ts +0 -36
  367. package/dist/runtime/daimon/training/native/grants/authority.js +0 -49
  368. package/dist/runtime/daimon/training/native/grants/authority.js.map +0 -1
  369. package/dist/runtime/daimon/training/native/grants/index.d.ts +0 -2
  370. package/dist/runtime/daimon/training/native/grants/index.js +0 -3
  371. package/dist/runtime/daimon/training/native/grants/index.js.map +0 -1
  372. package/dist/runtime/daimon/training/native/grants/pins.d.ts +0 -30
  373. package/dist/runtime/daimon/training/native/grants/pins.js +0 -20
  374. package/dist/runtime/daimon/training/native/grants/pins.js.map +0 -1
  375. package/dist/runtime/daimon/training/native/grants/test-socket.d.ts +0 -6
  376. package/dist/runtime/daimon/training/native/grants/test-socket.js +0 -35
  377. package/dist/runtime/daimon/training/native/grants/test-socket.js.map +0 -1
  378. package/dist/runtime/daimon/training/native/grok-fixtures.d.ts +0 -34
  379. package/dist/runtime/daimon/training/native/grok-fixtures.js +0 -179
  380. package/dist/runtime/daimon/training/native/grok-fixtures.js.map +0 -1
  381. package/dist/runtime/daimon/training/native/index.d.ts +0 -38
  382. package/dist/runtime/daimon/training/native/index.js +0 -27
  383. package/dist/runtime/daimon/training/native/index.js.map +0 -1
  384. package/dist/runtime/daimon/training/native/live-checkout.d.ts +0 -2
  385. package/dist/runtime/daimon/training/native/live-checkout.js +0 -15
  386. package/dist/runtime/daimon/training/native/live-checkout.js.map +0 -1
  387. package/dist/runtime/daimon/training/native/observations.d.ts +0 -51
  388. package/dist/runtime/daimon/training/native/observations.js +0 -217
  389. package/dist/runtime/daimon/training/native/observations.js.map +0 -1
  390. package/dist/runtime/daimon/training/native/outcome.d.ts +0 -13
  391. package/dist/runtime/daimon/training/native/outcome.js +0 -37
  392. package/dist/runtime/daimon/training/native/outcome.js.map +0 -1
  393. package/dist/runtime/daimon/training/native/preparation/engine-config.d.ts +0 -21
  394. package/dist/runtime/daimon/training/native/preparation/engine-config.js +0 -30
  395. package/dist/runtime/daimon/training/native/preparation/engine-config.js.map +0 -1
  396. package/dist/runtime/daimon/training/native/preparation/fixtures.d.ts +0 -17
  397. package/dist/runtime/daimon/training/native/preparation/fixtures.js +0 -52
  398. package/dist/runtime/daimon/training/native/preparation/fixtures.js.map +0 -1
  399. package/dist/runtime/daimon/training/native/preparation/index.d.ts +0 -7
  400. package/dist/runtime/daimon/training/native/preparation/index.js +0 -5
  401. package/dist/runtime/daimon/training/native/preparation/index.js.map +0 -1
  402. package/dist/runtime/daimon/training/native/preparation/layout.d.ts +0 -66
  403. package/dist/runtime/daimon/training/native/preparation/layout.js +0 -87
  404. package/dist/runtime/daimon/training/native/preparation/layout.js.map +0 -1
  405. package/dist/runtime/daimon/training/native/preparation/subject.d.ts +0 -14
  406. package/dist/runtime/daimon/training/native/preparation/subject.js +0 -67
  407. package/dist/runtime/daimon/training/native/preparation/subject.js.map +0 -1
  408. package/dist/runtime/daimon/training/native/preparation/types.d.ts +0 -69
  409. package/dist/runtime/daimon/training/native/preparation/types.js +0 -2
  410. package/dist/runtime/daimon/training/native/preparation/types.js.map +0 -1
  411. package/dist/runtime/daimon/training/native/receipt/artifacts.d.ts +0 -25
  412. package/dist/runtime/daimon/training/native/receipt/artifacts.js +0 -32
  413. package/dist/runtime/daimon/training/native/receipt/artifacts.js.map +0 -1
  414. package/dist/runtime/daimon/training/native/receipt/grok-clocked-pins.d.ts +0 -129
  415. package/dist/runtime/daimon/training/native/receipt/grok-clocked-pins.js +0 -45
  416. package/dist/runtime/daimon/training/native/receipt/grok-clocked-pins.js.map +0 -1
  417. package/dist/runtime/daimon/training/native/receipt/grok.d.ts +0 -246
  418. package/dist/runtime/daimon/training/native/receipt/grok.js +0 -195
  419. package/dist/runtime/daimon/training/native/receipt/grok.js.map +0 -1
  420. package/dist/runtime/daimon/training/native/receipt/index.d.ts +0 -11
  421. package/dist/runtime/daimon/training/native/receipt/index.js +0 -8
  422. package/dist/runtime/daimon/training/native/receipt/index.js.map +0 -1
  423. package/dist/runtime/daimon/training/native/receipt/paths.d.ts +0 -3
  424. package/dist/runtime/daimon/training/native/receipt/paths.js +0 -18
  425. package/dist/runtime/daimon/training/native/receipt/paths.js.map +0 -1
  426. package/dist/runtime/daimon/training/native/receipt/sandbox.d.ts +0 -42
  427. package/dist/runtime/daimon/training/native/receipt/sandbox.js +0 -35
  428. package/dist/runtime/daimon/training/native/receipt/sandbox.js.map +0 -1
  429. package/dist/runtime/daimon/training/native/receipt/schema.d.ts +0 -490
  430. package/dist/runtime/daimon/training/native/receipt/schema.js +0 -138
  431. package/dist/runtime/daimon/training/native/receipt/schema.js.map +0 -1
  432. package/dist/runtime/daimon/training/native/receipt/subscription.d.ts +0 -13
  433. package/dist/runtime/daimon/training/native/receipt/subscription.js +0 -13
  434. package/dist/runtime/daimon/training/native/receipt/subscription.js.map +0 -1
  435. package/dist/runtime/daimon/training/native/receipt/task-clock.d.ts +0 -19
  436. package/dist/runtime/daimon/training/native/receipt/task-clock.js +0 -49
  437. package/dist/runtime/daimon/training/native/receipt/task-clock.js.map +0 -1
  438. package/dist/runtime/daimon/training/native/sealed-usage.d.ts +0 -218
  439. package/dist/runtime/daimon/training/native/sealed-usage.js +0 -261
  440. package/dist/runtime/daimon/training/native/sealed-usage.js.map +0 -1
  441. package/dist/runtime/daimon/training/native/test-fixtures.d.ts +0 -27
  442. package/dist/runtime/daimon/training/native/test-fixtures.js +0 -162
  443. package/dist/runtime/daimon/training/native/test-fixtures.js.map +0 -1
  444. package/dist/runtime/daimon/training/native/transcript.d.ts +0 -96
  445. package/dist/runtime/daimon/training/native/transcript.js +0 -239
  446. package/dist/runtime/daimon/training/native/transcript.js.map +0 -1
  447. package/dist/runtime/daimon/training/native/transport/delivery.d.ts +0 -27
  448. package/dist/runtime/daimon/training/native/transport/delivery.js +0 -98
  449. package/dist/runtime/daimon/training/native/transport/delivery.js.map +0 -1
  450. package/dist/runtime/daimon/training/native/transport/http.d.ts +0 -3
  451. package/dist/runtime/daimon/training/native/transport/http.js +0 -81
  452. package/dist/runtime/daimon/training/native/transport/http.js.map +0 -1
  453. package/dist/runtime/daimon/training/native/transport/index.d.ts +0 -4
  454. package/dist/runtime/daimon/training/native/transport/index.js +0 -3
  455. package/dist/runtime/daimon/training/native/transport/index.js.map +0 -1
  456. package/dist/runtime/daimon/training/native/transport/types.d.ts +0 -15
  457. package/dist/runtime/daimon/training/native/transport/types.js +0 -2
  458. package/dist/runtime/daimon/training/native/transport/types.js.map +0 -1
  459. package/dist/runtime/daimon/training/native/worker/cli.d.ts +0 -1
  460. package/dist/runtime/daimon/training/native/worker/cli.js +0 -17
  461. package/dist/runtime/daimon/training/native/worker/cli.js.map +0 -1
  462. package/dist/runtime/daimon/training/native/worker/control.d.ts +0 -20
  463. package/dist/runtime/daimon/training/native/worker/control.js +0 -266
  464. package/dist/runtime/daimon/training/native/worker/control.js.map +0 -1
  465. package/dist/runtime/daimon/training/native/worker/deliveries.d.ts +0 -38
  466. package/dist/runtime/daimon/training/native/worker/deliveries.js +0 -91
  467. package/dist/runtime/daimon/training/native/worker/deliveries.js.map +0 -1
  468. package/dist/runtime/daimon/training/native/worker/evidence/collect.d.ts +0 -54
  469. package/dist/runtime/daimon/training/native/worker/evidence/collect.js +0 -278
  470. package/dist/runtime/daimon/training/native/worker/evidence/collect.js.map +0 -1
  471. package/dist/runtime/daimon/training/native/worker/evidence/execution.d.ts +0 -102
  472. package/dist/runtime/daimon/training/native/worker/evidence/execution.js +0 -191
  473. package/dist/runtime/daimon/training/native/worker/evidence/execution.js.map +0 -1
  474. package/dist/runtime/daimon/training/native/worker/evidence/index.d.ts +0 -3
  475. package/dist/runtime/daimon/training/native/worker/evidence/index.js +0 -4
  476. package/dist/runtime/daimon/training/native/worker/evidence/index.js.map +0 -1
  477. package/dist/runtime/daimon/training/native/worker/evidence/io.d.ts +0 -20
  478. package/dist/runtime/daimon/training/native/worker/evidence/io.js +0 -130
  479. package/dist/runtime/daimon/training/native/worker/evidence/io.js.map +0 -1
  480. package/dist/runtime/daimon/training/native/worker/evidence/seal.d.ts +0 -3
  481. package/dist/runtime/daimon/training/native/worker/evidence/seal.js +0 -67
  482. package/dist/runtime/daimon/training/native/worker/evidence/seal.js.map +0 -1
  483. package/dist/runtime/daimon/training/native/worker/index.d.ts +0 -11
  484. package/dist/runtime/daimon/training/native/worker/index.js +0 -8
  485. package/dist/runtime/daimon/training/native/worker/index.js.map +0 -1
  486. package/dist/runtime/daimon/training/native/worker/profile.d.ts +0 -23
  487. package/dist/runtime/daimon/training/native/worker/profile.js +0 -149
  488. package/dist/runtime/daimon/training/native/worker/profile.js.map +0 -1
  489. package/dist/runtime/daimon/training/native/worker/public.d.ts +0 -53
  490. package/dist/runtime/daimon/training/native/worker/public.js +0 -22
  491. package/dist/runtime/daimon/training/native/worker/public.js.map +0 -1
  492. package/dist/runtime/daimon/training/native/worker/sandbox.d.ts +0 -4
  493. package/dist/runtime/daimon/training/native/worker/sandbox.js +0 -54
  494. package/dist/runtime/daimon/training/native/worker/sandbox.js.map +0 -1
  495. package/dist/runtime/daimon/training/native/worker/server.d.ts +0 -4
  496. package/dist/runtime/daimon/training/native/worker/server.js +0 -102
  497. package/dist/runtime/daimon/training/native/worker/server.js.map +0 -1
  498. package/dist/runtime/daimon/training/native/worker/types.d.ts +0 -318
  499. package/dist/runtime/daimon/training/native/worker/types.js +0 -2
  500. package/dist/runtime/daimon/training/native/worker/types.js.map +0 -1
  501. package/dist/runtime/daimon/training/native/worker/wake-delivery/index.d.ts +0 -4
  502. package/dist/runtime/daimon/training/native/worker/wake-delivery/index.js +0 -4
  503. package/dist/runtime/daimon/training/native/worker/wake-delivery/index.js.map +0 -1
  504. package/dist/runtime/daimon/training/native/worker/wake-delivery/source.d.ts +0 -3
  505. package/dist/runtime/daimon/training/native/worker/wake-delivery/source.js +0 -16
  506. package/dist/runtime/daimon/training/native/worker/wake-delivery/source.js.map +0 -1
  507. package/dist/runtime/daimon/training/native/worker/wake-delivery/terminal.d.ts +0 -4
  508. package/dist/runtime/daimon/training/native/worker/wake-delivery/terminal.js +0 -52
  509. package/dist/runtime/daimon/training/native/worker/wake-delivery/terminal.js.map +0 -1
  510. package/dist/runtime/daimon/training/native/worker/wake-delivery/transport.d.ts +0 -21
  511. package/dist/runtime/daimon/training/native/worker/wake-delivery/transport.js +0 -198
  512. package/dist/runtime/daimon/training/native/worker/wake-delivery/transport.js.map +0 -1
  513. package/dist/runtime/daimon/training/native/worker/wake-delivery/types.d.ts +0 -91
  514. package/dist/runtime/daimon/training/native/worker/wake-delivery/types.js +0 -2
  515. package/dist/runtime/daimon/training/native/worker/wake-delivery/types.js.map +0 -1
  516. package/dist/runtime/daimon/training/native/worker/worker.d.ts +0 -1
  517. package/dist/runtime/daimon/training/native/worker/worker.js +0 -105
  518. package/dist/runtime/daimon/training/native/worker/worker.js.map +0 -1
  519. package/dist/runtime/daimon/training/providers/grok-broker/broker.d.ts +0 -20
  520. package/dist/runtime/daimon/training/providers/grok-broker/broker.js +0 -55
  521. package/dist/runtime/daimon/training/providers/grok-broker/broker.js.map +0 -1
  522. package/dist/runtime/daimon/training/providers/grok-broker/grant-fixtures.d.ts +0 -15
  523. package/dist/runtime/daimon/training/providers/grok-broker/grant-fixtures.js +0 -29
  524. package/dist/runtime/daimon/training/providers/grok-broker/grant-fixtures.js.map +0 -1
  525. package/dist/runtime/daimon/training/providers/grok-broker/grant-home.d.ts +0 -16
  526. package/dist/runtime/daimon/training/providers/grok-broker/grant-home.js +0 -60
  527. package/dist/runtime/daimon/training/providers/grok-broker/grant-home.js.map +0 -1
  528. package/dist/runtime/daimon/training/providers/grok-broker/grant-pool.d.ts +0 -81
  529. package/dist/runtime/daimon/training/providers/grok-broker/grant-pool.js +0 -221
  530. package/dist/runtime/daimon/training/providers/grok-broker/grant-pool.js.map +0 -1
  531. package/dist/runtime/daimon/training/providers/grok-broker/grant-releases.d.ts +0 -31
  532. package/dist/runtime/daimon/training/providers/grok-broker/grant-releases.js +0 -78
  533. package/dist/runtime/daimon/training/providers/grok-broker/grant-releases.js.map +0 -1
  534. package/dist/runtime/daimon/training/providers/grok-broker/grants.d.ts +0 -63
  535. package/dist/runtime/daimon/training/providers/grok-broker/grants.js +0 -20
  536. package/dist/runtime/daimon/training/providers/grok-broker/grants.js.map +0 -1
  537. package/dist/runtime/daimon/training/providers/grok-broker/index.d.ts +0 -3
  538. package/dist/runtime/daimon/training/providers/grok-broker/index.js +0 -4
  539. package/dist/runtime/daimon/training/providers/grok-broker/index.js.map +0 -1
  540. package/dist/runtime/daimon/training/providers/grok-subscription/cli.d.ts +0 -21
  541. package/dist/runtime/daimon/training/providers/grok-subscription/cli.js +0 -81
  542. package/dist/runtime/daimon/training/providers/grok-subscription/cli.js.map +0 -1
  543. package/dist/runtime/daimon/training/providers/grok-subscription/index.d.ts +0 -4
  544. package/dist/runtime/daimon/training/providers/grok-subscription/index.js +0 -5
  545. package/dist/runtime/daimon/training/providers/grok-subscription/index.js.map +0 -1
  546. package/dist/runtime/daimon/training/providers/grok-subscription/protocol.d.ts +0 -26
  547. package/dist/runtime/daimon/training/providers/grok-subscription/protocol.js +0 -102
  548. package/dist/runtime/daimon/training/providers/grok-subscription/protocol.js.map +0 -1
  549. package/dist/runtime/daimon/training/providers/grok-subscription/provider.d.ts +0 -9
  550. package/dist/runtime/daimon/training/providers/grok-subscription/provider.js +0 -38
  551. package/dist/runtime/daimon/training/providers/grok-subscription/provider.js.map +0 -1
  552. package/dist/runtime/daimon/training/public.d.ts +0 -6
  553. package/dist/runtime/daimon/training/public.js +0 -5
  554. package/dist/runtime/daimon/training/public.js.map +0 -1
  555. package/dist/runtime/daimon/training/services/account-lease.d.ts +0 -7
  556. package/dist/runtime/daimon/training/services/account-lease.js +0 -76
  557. package/dist/runtime/daimon/training/services/account-lease.js.map +0 -1
  558. package/dist/runtime/daimon/training/services/freshness.d.ts +0 -15
  559. package/dist/runtime/daimon/training/services/freshness.js +0 -19
  560. package/dist/runtime/daimon/training/services/freshness.js.map +0 -1
  561. package/dist/runtime/daimon/training/services/index.d.ts +0 -4
  562. package/dist/runtime/daimon/training/services/index.js +0 -4
  563. package/dist/runtime/daimon/training/services/index.js.map +0 -1
  564. package/dist/runtime/daimon/training/services/slot-freshness.d.ts +0 -34
  565. package/dist/runtime/daimon/training/services/slot-freshness.js +0 -178
  566. package/dist/runtime/daimon/training/services/slot-freshness.js.map +0 -1
  567. package/dist/runtime/daimon/wakeMoments.js.map +0 -1
  568. package/dist/runtime/pi/adapter.d.ts +0 -3
  569. package/dist/runtime/pi/adapter.js +0 -230
  570. package/dist/runtime/pi/appActivitySource.d.ts +0 -1
  571. package/dist/runtime/pi/appActivitySource.js +0 -199
  572. package/dist/runtime/pi/appAgentConfig.d.ts +0 -11
  573. package/dist/runtime/pi/appAgentConfig.js +0 -264
  574. package/dist/runtime/pi/appCliEnginesSource.d.ts +0 -1
  575. package/dist/runtime/pi/appCliEnginesSource.js +0 -183
  576. package/dist/runtime/pi/appCliSource.d.ts +0 -1
  577. package/dist/runtime/pi/appCliSource.js +0 -353
  578. package/dist/runtime/pi/appControlSource.d.ts +0 -1
  579. package/dist/runtime/pi/appControlSource.js +0 -390
  580. package/dist/runtime/pi/appControlWakeIdentitySource.d.ts +0 -1
  581. package/dist/runtime/pi/appControlWakeIdentitySource.js +0 -19
  582. package/dist/runtime/pi/appCoreSource.d.ts +0 -4
  583. package/dist/runtime/pi/appCoreSource.js +0 -244
  584. package/dist/runtime/pi/appPreludeSource.d.ts +0 -1
  585. package/dist/runtime/pi/appPreludeSource.js +0 -192
  586. package/dist/runtime/pi/appScheduleSource.d.ts +0 -1
  587. package/dist/runtime/pi/appScheduleSource.js +0 -84
  588. package/dist/runtime/pi/appScriptedEngine.d.ts +0 -31
  589. package/dist/runtime/pi/appScriptedEngine.js +0 -42
  590. package/dist/runtime/pi/appSource.d.ts +0 -4
  591. package/dist/runtime/pi/appSource.js +0 -12
  592. package/dist/runtime/pi/appTemplate.d.ts +0 -14
  593. package/dist/runtime/pi/appTemplate.js +0 -28
  594. package/dist/runtime/pi/appTemplateTypes.d.ts +0 -64
  595. package/dist/runtime/pi/appTemplateTypes.js +0 -18
  596. package/dist/runtime/pi/appWakeContextSource.d.ts +0 -1
  597. package/dist/runtime/pi/appWakeContextSource.js +0 -398
  598. package/dist/runtime/pi/containerTargets.d.ts +0 -4
  599. package/dist/runtime/pi/containerTargets.js +0 -63
  600. package/dist/runtime/pi/runAuth.d.ts +0 -2
  601. package/dist/runtime/pi/runAuth.js +0 -185
  602. package/dist/runtime/pi/testHelpers.d.ts +0 -2
  603. package/dist/shared/errors.js.map +0 -1
  604. package/dist/training/subjects/environment.d.ts +0 -2
  605. package/dist/training/subjects/environment.js +0 -14
  606. package/dist/training/subjects/environment.js.map +0 -1
@@ -1,15 +0,0 @@
1
- import type { VerifiedNativeLaunch } from '../receipt/index.js';
2
- import type { DockerCommand } from './docker.js';
3
- /** Same namespace compatibility policy as Spawnfile's strict native Codex launch. */
4
- export declare const codexSandboxContainerSecurity: readonly ["--security-opt", "seccomp=unconfined", "--security-opt", "apparmor=unconfined"];
5
- /** Separate-container Grok needs a broker, realm and root slot supervisor this adapter does not own. */
6
- export declare const grokContainerUnsupported = "Separate-container Grok native trials are unsupported: run Grok through child-process execution in the broker-capable training container";
7
- /** Codex's bubblewrap needs unconfined outer profiles; no other engine inherits them. */
8
- export declare function containerSecurityOptions(launch: VerifiedNativeLaunch): readonly string[];
9
- export declare const sandboxPreflightSchema = "spawnfile.training.daimon-native.sandbox-preflight.v1";
10
- export declare const sandboxChecks: readonly ["namespace", "workspaceRead", "workspaceWrite", "runDenied", "authDenied", "ingressDenied", "networkDenied"];
11
- /** Shared verbatim by the emitted command and transition tests. A timeout proves nothing. */
12
- export declare const sandboxNetworkProbeScript = "\nlet settled=false;\nconst socket=net.connect({host:'127.0.0.1',port});\nconst fail=message=>{if(settled)return;settled=true;socket.destroy();process.stderr.write(message);process.exitCode=1;};\nsocket.once('connect',()=>fail('Sandbox network reachable'));\nsocket.once('error',()=>{if(settled)return;settled=true;socket.destroy();fs.writeFileSync('complete','SANDBOX_CHECKS_PASSED');});\nsocket.setTimeout(750,()=>fail('Sandbox network probe timed out'));";
13
- /** Runs only local sandbox commands with non-secret canaries and a fresh Codex home. */
14
- export declare const sandboxPreflightScript: string;
15
- export declare function verifyNativeSandbox(run: DockerCommand, name: string, launch: VerifiedNativeLaunch, trialId: string, signal?: AbortSignal): Promise<void>;
@@ -1,79 +0,0 @@
1
- import { canonicalWireId } from '../../../../../training/index.js';
2
- import { writeFile } from 'node:fs/promises';
3
- import { dirname, join } from 'node:path';
4
- import { verifyPreparedNativeSandbox } from './native-preflight.js';
5
- /** Same namespace compatibility policy as Spawnfile's strict native Codex launch. */
6
- export const codexSandboxContainerSecurity = ['--security-opt', 'seccomp=unconfined', '--security-opt', 'apparmor=unconfined'];
7
- /** Separate-container Grok needs a broker, realm and root slot supervisor this adapter does not own. */
8
- export const grokContainerUnsupported = 'Separate-container Grok native trials are unsupported: run Grok through child-process execution in the broker-capable training container';
9
- /** Codex's bubblewrap needs unconfined outer profiles; no other engine inherits them. */
10
- export function containerSecurityOptions(launch) {
11
- if (launch.agent.engine !== 'codex')
12
- throw new Error(grokContainerUnsupported);
13
- return codexSandboxContainerSecurity;
14
- }
15
- export const sandboxPreflightSchema = 'spawnfile.training.daimon-native.sandbox-preflight.v1';
16
- export const sandboxChecks = ['namespace', 'workspaceRead', 'workspaceWrite', 'runDenied', 'authDenied', 'ingressDenied', 'networkDenied'];
17
- /** Shared verbatim by the emitted command and transition tests. A timeout proves nothing. */
18
- export const sandboxNetworkProbeScript = `
19
- let settled=false;
20
- const socket=net.connect({host:'127.0.0.1',port});
21
- const fail=message=>{if(settled)return;settled=true;socket.destroy();process.stderr.write(message);process.exitCode=1;};
22
- socket.once('connect',()=>fail('Sandbox network reachable'));
23
- socket.once('error',()=>{if(settled)return;settled=true;socket.destroy();fs.writeFileSync('complete','SANDBOX_CHECKS_PASSED');});
24
- socket.setTimeout(750,()=>fail('Sandbox network probe timed out'));`;
25
- /** Runs only local sandbox commands with non-secret canaries and a fresh Codex home. */
26
- export const sandboxPreflightScript = `
27
- import {execFile} from 'node:child_process';
28
- import {promisify} from 'node:util';
29
- import {mkdtemp,mkdir,readFile,writeFile,rm} from 'node:fs/promises';
30
- import {join} from 'node:path';
31
- import {createServer} from 'node:net';
32
- const execute=promisify(execFile);
33
- const input=JSON.parse(await new Promise(resolve=>{let s='';process.stdin.setEncoding('utf8');process.stdin.on('data',v=>s+=v);process.stdin.on('end',()=>resolve(s));}));
34
- const scratch=await mkdtemp(join(input.workspace,'.spawnfile-training-sandbox-preflight-'));
35
- let controls; let server;
36
- try {
37
- controls=await mkdtemp(join(input.controlRoot,'.sandbox-preflight-'));
38
- const home=join(scratch,'home'), workspace=join(scratch,'workspace'), ingress=join(home,'.daimon-inbound');
39
- await mkdir(join(home,'.codex'),{recursive:true,mode:448}); await mkdir(workspace,{mode:448}); await mkdir(ingress,{mode:448});
40
- const auth=join(home,'.codex','auth.json'), inbound=join(ingress,'canary'), control=join(controls,'canary');
41
- await writeFile(auth,'{}',{mode:384}); await writeFile(inbound,'non-secret ingress canary',{mode:384}); await writeFile(control,'non-secret control canary',{mode:384});
42
- await writeFile(join(workspace,'input'),'read-proof',{mode:384});
43
- for (const file of [auth,inbound,control]) if (!(await readFile(file)).length) throw Error('Missing outside-sandbox canary');
44
- server=createServer(socket=>socket.destroy());
45
- await new Promise((resolve,reject)=>{server.once('error',reject);server.listen(0,'127.0.0.1',resolve);});
46
- const port=server.address().port;
47
- const env={PATH:process.env.PATH,HOME:home,CODEX_HOME:join(home,'.codex'),TMPDIR:'/tmp',LANG:'C.UTF-8'};
48
- await execute('bwrap',['--unshare-user','--uid','0','--gid','0','--ro-bind','/','/','--proc','/proc','--dev','/dev','--','/bin/true'],{env,timeout:10000,maxBuffer:65536});
49
- const profile='permissions={preflight={extends=":workspace",filesystem={":workspace_roots"={"."="write"},"/run"="deny","/proc"="deny",'+JSON.stringify(auth)+'="deny",'+JSON.stringify(ingress)+'="deny"},network={enabled=false}}}';
50
- const command=\`const fs=require('node:fs'),net=require('node:net');
51
- if(fs.readFileSync('input','utf8')!=='read-proof')throw Error('Workspace read failed');
52
- fs.writeFileSync('output','write-proof');
53
- for(const file of \${JSON.stringify([control,auth,inbound])}) { let denied=false; try{fs.readFileSync(file);}catch{denied=true;} if(!denied)throw Error('Protected canary is readable'); }
54
- const port=\${port};
55
- ${sandboxNetworkProbeScript}\`;
56
- await execute('codex',['sandbox','-P','preflight','-C',workspace,'-c',profile,'--','/usr/local/bin/node','-e',command],{env,timeout:12000,maxBuffer:65536});
57
- if(await readFile(join(workspace,'complete'),'utf8')!=='SANDBOX_CHECKS_PASSED'||await readFile(join(workspace,'output'),'utf8')!=='write-proof')throw Error('Sandbox did not complete its actual command');
58
- process.stdout.write(JSON.stringify({schema:'${sandboxPreflightSchema}',modelCallsMade:0,checks:Object.fromEntries(${JSON.stringify(sandboxChecks)}.map(key=>[key,true]))}));
59
- } finally {
60
- if(server)await new Promise(resolve=>server.close(resolve));
61
- if(controls)await rm(controls,{recursive:true,force:true});
62
- await rm(scratch,{recursive:true,force:true});
63
- }
64
- `;
65
- export async function verifyNativeSandbox(run, name, launch, trialId, signal) {
66
- const result = await run(['exec', '-i', name, '/usr/local/bin/node', '--input-type=module', '-e', sandboxPreflightScript], {
67
- signal, timeoutMs: 25_000, stdin: JSON.stringify({ path: 'sandbox-preflight', workspace: launch.workspace.target, controlRoot: '/run/spawnfile-training/control' }),
68
- });
69
- if (result.code !== 0)
70
- throw new Error(`Native sandbox preflight failed before cognition: ${result.stderr.slice(-3000)}`);
71
- const proof = JSON.parse(result.stdout);
72
- if (canonicalWireId(proof.schema) !== sandboxPreflightSchema || proof.modelCallsMade !== 0 || sandboxChecks.some(check => proof.checks?.[check] !== true)) {
73
- throw new Error('Native sandbox preflight omitted substantive enforcement evidence');
74
- }
75
- const nativePolicy = await verifyPreparedNativeSandbox(run, name, launch, trialId, signal);
76
- await writeFile(join(dirname(launch.receiptFile), 'sandbox-preflight.json'), `${JSON.stringify({ ...proof, trialId,
77
- image: launch.image, configSha256: launch.configSha256, nativePolicy, outerCompatibility: [...codexSandboxContainerSecurity] }, null, 2)}\n`, { flag: 'wx', mode: 0o600 });
78
- }
79
- //# sourceMappingURL=preflight.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preflight.js","sourceRoot":"","sources":["../../../../../../src/runtime/daimon/training/native/container/preflight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAG1C,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEpE,qFAAqF;AACrF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,qBAAqB,CAAU,CAAC;AACxI,wGAAwG;AACxG,MAAM,CAAC,MAAM,wBAAwB,GAAG,0IAA0I,CAAC;AAEnL,yFAAyF;AACzF,MAAM,UAAU,wBAAwB,CAAC,MAA4B;IACnE,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC/E,OAAO,6BAA6B,CAAC;AACvC,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,uDAAuD,CAAC;AAC9F,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,CAAU,CAAC;AAEpJ,6FAA6F;AAC7F,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;o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AE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC3F,MAAM,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,wBAAwB,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,OAAO;QAChH,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,CAAC,GAAG,6BAA6B,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AAC/K,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { TrialSlot } from '../../../../../training/index.js';
2
- import { type NativeLaunch } from '../receipt/index.js';
3
- /** Verify the project-written receipt before copying it to the owned child. */
4
- export declare function assertLeasedLaunch(launch: NativeLaunch, slot: TrialSlot): void;
@@ -1,58 +0,0 @@
1
- import { isGrokLaunch } from '../receipt/index.js';
2
- /** Verify the project-written receipt before copying it to the owned child. */
3
- export function assertLeasedLaunch(launch, slot) {
4
- if (slot.isolation === 'shared-uid') {
5
- if (isGrokLaunch(launch) || slot.workerUid !== process.geteuid?.()) {
6
- throw new Error('Native launch does not belong to the leased shared-uid slot');
7
- }
8
- if (!Number.isSafeInteger(slot.ports.base) || slot.ports.base < 1024 ||
9
- !Number.isSafeInteger(slot.ports.count) || slot.ports.count < 1 || slot.ports.base + slot.ports.count > 65536) {
10
- throw new Error('Invalid native leased port block');
11
- }
12
- if (!Number.isSafeInteger(launch.host.port))
13
- throw new Error('Native control port must be an integer');
14
- if (launch.host.port < slot.ports.base || launch.host.port >= slot.ports.base + slot.ports.count) {
15
- throw new Error('Native control port escapes the leased slot');
16
- }
17
- const paths = {
18
- workspace: [launch.workspace],
19
- controlRoot: [{ source: launch.controlRoot, target: launch.controlRoot }],
20
- };
21
- for (const row of launch.projections) {
22
- const name = row.role === 'home' ? 'runtimeHome' : row.role;
23
- (paths[name] ??= []).push(row);
24
- }
25
- for (const [name, root] of Object.entries(slot.roots)) {
26
- const matches = paths[name];
27
- const declared = matches?.[0];
28
- if (matches?.length !== 1 || !declared || declared.source !== root || declared.target !== root) {
29
- throw new Error(`Native launch differs from leased slot root: ${name}`);
30
- }
31
- }
32
- return;
33
- }
34
- if (!isGrokLaunch(launch))
35
- throw new Error('Leased native launch requires broker slot evidence');
36
- if (launch.broker.slot !== slot.index || launch.broker.workerUid !== slot.workerUid) {
37
- throw new Error('Native launch does not belong to the leased slot identity');
38
- }
39
- const paths = {
40
- workspace: launch.workspace.source,
41
- runtimeHome: launch.projections.find(row => row.role === 'home').source,
42
- workerHome: launch.broker.workerHomePath,
43
- usageLedger: launch.broker.usageLedgerPath,
44
- preflightReceipt: launch.broker.slotPreflightReceipt,
45
- controlRoot: launch.controlRoot,
46
- };
47
- for (const [name, path] of Object.entries(paths)) {
48
- if (slot.roots[name] !== path)
49
- throw new Error(`Native launch differs from leased slot root: ${name}`);
50
- }
51
- if (!Number.isSafeInteger(launch.host.port))
52
- throw new Error('Native control port must be an integer');
53
- if (launch.workspace.target !== paths.workspace || launch.projections[0].target !== paths.runtimeHome ||
54
- launch.host.port < slot.ports.base || launch.host.port >= slot.ports.base + slot.ports.count) {
55
- throw new Error('Native launch paths or control port escape the leased slot');
56
- }
57
- }
58
- //# sourceMappingURL=slot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slot.js","sourceRoot":"","sources":["../../../../../../src/runtime/daimon/training/native/container/slot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqB,MAAM,qBAAqB,CAAC;AAEtE,+EAA+E;AAC/E,MAAM,UAAU,kBAAkB,CAAC,MAAoB,EAAE,IAAe;IACtE,IAAI,IAAI,CAAC,SAAS,KAAK,YAAY,EAAE,CAAC;QACpC,IAAI,YAAY,CAAC,MAAM,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CAAC,MAAM,CAAC,eAAe;QAC1C,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,oBAAoB;QACpD,WAAW,EAAE,MAAM,CAAC,WAAW;KAChC,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,gDAAgD,IAAI,EAAE,CAAC,CAAC;IACzG,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IACvG,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,KAAK,KAAK,CAAC,SAAS,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC,CAAE,CAAC,MAAM,KAAK,KAAK,CAAC,WAAW;QAClG,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACjG,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAChF,CAAC;AACH,CAAC"}
@@ -1,37 +0,0 @@
1
- import type { ObservationCoverage, Usage } from '../../../../training/index.js';
2
- import type { NativeLaunch } from './receipt/index.js';
3
- import { type ExternalInputSource, type TerminalEvidence } from './worker/index.js';
4
- import { type PreparedTransportDelivery } from './transport/index.js';
5
- export interface NativeExternalInput {
6
- id: string;
7
- text: string;
8
- source: ExternalInputSource;
9
- transport?: PreparedTransportDelivery;
10
- }
11
- export interface NativeExternalInputs {
12
- maxDeliveries: number;
13
- next(context: {
14
- trialId: string;
15
- turnId: string;
16
- containerName: string;
17
- launch: NativeLaunch;
18
- terminal: TerminalEvidence;
19
- }, signal: AbortSignal): Promise<NativeExternalInput | null>;
20
- }
21
- export interface NativeChildExternalInputs {
22
- maxDeliveries: number;
23
- next(context: {
24
- trialId: string;
25
- turnId: string;
26
- executionId: string;
27
- launch: NativeLaunch;
28
- terminal: TerminalEvidence;
29
- }, signal: AbortSignal): Promise<NativeExternalInput | null>;
30
- }
31
- /** A callback may supply evidence; it cannot extend the task deadline or invent a retry. */
32
- export declare function nextExternalInput<T>(policy: {
33
- next(context: T, signal: AbortSignal): Promise<NativeExternalInput | null>;
34
- }, context: T, deadline: number, signal: AbortSignal): Promise<NativeExternalInput | null>;
35
- export declare function sumNativeUsage(rows: readonly (Usage | null)[]): Usage | null;
36
- /** Missing coverage in any wake cannot be repaired by a later complete wake. */
37
- export declare function weakestNativeCoverage(rows: readonly (readonly ObservationCoverage[] | undefined)[]): ObservationCoverage[];
@@ -1,75 +0,0 @@
1
- import { verifyExternalSource } from './worker/index.js';
2
- import { verifyPreparedTransport } from './transport/index.js';
3
- /** A callback may supply evidence; it cannot extend the task deadline or invent a retry. */
4
- export async function nextExternalInput(policy, context, deadline, signal) {
5
- if (signal.aborted)
6
- throw new Error('External input cancelled');
7
- const remaining = deadline - Date.now();
8
- if (remaining <= 0)
9
- throw new Error('Native trial deadline exceeded awaiting external input');
10
- const controller = new AbortController();
11
- let timer;
12
- let abort;
13
- const interrupted = new Promise((_resolve, reject) => {
14
- abort = () => { controller.abort(); reject(new Error('External input cancelled')); };
15
- signal.addEventListener('abort', abort, { once: true });
16
- timer = setTimeout(() => { controller.abort(); reject(new Error('Native trial deadline exceeded awaiting external input')); }, remaining);
17
- });
18
- try {
19
- const input = await Promise.race([policy.next(context, controller.signal), interrupted]);
20
- if (signal.aborted)
21
- throw new Error('External input cancelled');
22
- if (input !== null) {
23
- const keys = Object.keys(input).sort().join(',');
24
- if ((keys !== 'id,source,text' && keys !== 'id,source,text,transport') ||
25
- !/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/u.test(input.id) || !input.text.trim() || Buffer.byteLength(input.text) > 16384)
26
- throw new Error('Invalid external input');
27
- verifyExternalSource(input.source, input.text);
28
- if (keys.endsWith(',transport'))
29
- verifyPreparedTransport(input.transport, true);
30
- }
31
- return input;
32
- }
33
- finally {
34
- clearTimeout(timer);
35
- signal.removeEventListener('abort', abort);
36
- controller.abort();
37
- }
38
- }
39
- export function sumNativeUsage(rows) {
40
- if (!rows.length || rows.some(row => row === null))
41
- return null;
42
- const sum = (key) => {
43
- const values = rows.map(row => row[key]);
44
- if (values.some(value => value === null))
45
- return null;
46
- const total = values.reduce((sum, value) => sum + value, 0);
47
- if (!Number.isSafeInteger(total) || total < 0)
48
- throw new Error('Invalid aggregate native usage');
49
- return total;
50
- };
51
- const totals = { inputTokens: sum('inputTokens'), cachedInputTokens: sum('cachedInputTokens'), outputTokens: sum('outputTokens') };
52
- // Optional members appear only when a wake reported them, so Codex aggregates keep their exact shape.
53
- const extra = {};
54
- if (rows.some(row => row.cacheWriteInputTokens !== undefined))
55
- extra.cacheWriteInputTokens = rows.some(row => row.cacheWriteInputTokens == null) ? null
56
- : rows.reduce((total, row) => total + row.cacheWriteInputTokens, 0);
57
- if (rows.some(row => row.notionalUsd !== undefined))
58
- extra.notionalUsd = rows.some(row => row.notionalUsd == null) ? null
59
- : rows.reduce((total, row) => total + row.notionalUsd, 0);
60
- return rows.length === 1 ? { ...rows[0], ...totals }
61
- : { ...totals, ...extra, reasoningTokens: null, source: 'noopolis.daimon.turn-usage.v1' };
62
- }
63
- /** Missing coverage in any wake cannot be repaired by a later complete wake. */
64
- export function weakestNativeCoverage(rows) {
65
- const channels = new Set(rows.flatMap(row => row?.map(item => item.channel) ?? []));
66
- return [...channels].map(channel => {
67
- const values = rows.map(row => row?.find(item => item.channel === channel));
68
- const completeness = values.some(value => !value || value.completeness === 'absent') ? 'absent'
69
- : values.some(value => value?.completeness === 'partial') ? 'partial' : 'complete';
70
- const ordering = values.every(value => value?.ordering === 'causal') ? 'causal'
71
- : values.every(value => value && value.ordering !== 'none') ? 'source' : 'none';
72
- return { channel, completeness, ordering };
73
- });
74
- }
75
- //# sourceMappingURL=external.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"external.js","sourceRoot":"","sources":["../../../../../src/runtime/daimon/training/native/external.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAmD,MAAM,mBAAmB,CAAC;AAC1G,OAAO,EAAE,uBAAuB,EAAkC,MAAM,sBAAsB,CAAC;AAe/F,4FAA4F;AAC5F,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAI,MAAsF,EAAE,OAAU,EAC3I,QAAgB,EAAE,MAAmB;IACrC,IAAI,MAAM,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAChE,MAAM,SAAS,GAAG,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACxC,IAAI,SAAS,IAAI,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC9F,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,IAAI,KAAgD,CAAC;IACrD,IAAI,KAAkB,CAAC;IACvB,MAAM,WAAW,GAAG,IAAI,OAAO,CAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE;QAC1D,KAAK,GAAG,GAAG,EAAE,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrF,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACxD,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC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AC,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ;YAC7F,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC;QACrF,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ;YAC7E,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;QAClF,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;IAC7C,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,36 +0,0 @@
1
- import { type GrokClientConfigInput, type GrokInferenceGrant, type GrokInferenceGrantAuthority } from '../../providers/grok-broker/index.js';
2
- /** Structural slice of `@noopolis/daimon/runtime` this binding uses. */
3
- export interface DaimonGrantModule {
4
- EngineBrokerControlClient: new (socketPath: string) => {
5
- requestInferenceGrant(request: {
6
- model: string;
7
- reasoningEffort: string;
8
- purpose: string;
9
- }): Promise<GrokInferenceGrant>;
10
- releaseInferenceGrant(grantId: string): Promise<boolean>;
11
- };
12
- EngineBrokerInferenceGrantRefused: new (...args: never[]) => Error & {
13
- code: string;
14
- };
15
- renderGrokInferenceClientConfig(input: GrokClientConfigInput): string;
16
- GROK_INFERENCE_CLIENT_MODEL_ID: string;
17
- GROK_INFERENCE_GRANT_ENV: string;
18
- GROK_INFERENCE_PROXY_BASE_URL: string;
19
- GROK_ENGINE_BROKER: {
20
- inferenceGrants: {
21
- maxLiveGrants: number;
22
- failureCodes: readonly string[];
23
- client: {
24
- modelId: string;
25
- envKey: string;
26
- configSha256: unknown;
27
- };
28
- };
29
- };
30
- }
31
- export { grokBrokerControlSocketEnv, grokGrantHomeRootEnv } from '../../providers/grok-broker/index.js';
32
- /**
33
- * Daimon-backed grant authority over the control socket the training container
34
- * supplies. Every precondition failure throws; nothing falls back to a desktop login.
35
- */
36
- export declare function loadDaimonGrokGrantAuthority(socketPath: string | undefined, load?: () => Promise<unknown>): Promise<GrokInferenceGrantAuthority>;
@@ -1,49 +0,0 @@
1
- import { lstat } from 'node:fs/promises';
2
- import path from 'node:path';
3
- import { isDeepStrictEqual } from 'node:util';
4
- import { GrokGrantRefusal, grokGrantRefusalCodes } from '../../providers/grok-broker/index.js';
5
- import { daimonGrokInferenceClientPin as PIN } from './pins.js';
6
- import { grokBrokerControlSocketEnv } from '../../providers/grok-broker/index.js';
7
- export { grokBrokerControlSocketEnv, grokGrantHomeRootEnv } from '../../providers/grok-broker/index.js';
8
- const loadRuntime = async () => {
9
- const packageName = '@noopolis/daimon/runtime';
10
- return import(packageName);
11
- };
12
- /**
13
- * Daimon-backed grant authority over the control socket the training container
14
- * supplies. Every precondition failure throws; nothing falls back to a desktop login.
15
- */
16
- export async function loadDaimonGrokGrantAuthority(socketPath, load = loadRuntime) {
17
- if (socketPath === undefined || !path.isAbsolute(socketPath))
18
- throw new Error(`${grokBrokerControlSocketEnv} must name the broker control socket`);
19
- const socket = await lstat(socketPath).catch(() => undefined);
20
- if (socket === undefined || !socket.isSocket())
21
- throw new Error('Grok broker control socket is unavailable');
22
- let daimon;
23
- try {
24
- daimon = await load();
25
- }
26
- catch (error) {
27
- throw new Error('Install optional @noopolis/daimon with its public /runtime export for broker-grant inference', { cause: error });
28
- }
29
- const grants = daimon.GROK_ENGINE_BROKER?.inferenceGrants;
30
- if (typeof daimon.EngineBrokerControlClient !== 'function' || typeof daimon.EngineBrokerInferenceGrantRefused !== 'function' ||
31
- typeof daimon.renderGrokInferenceClientConfig !== 'function' || grants === undefined)
32
- throw new Error('Installed Daimon lacks evaluator inference grants');
33
- if (daimon.GROK_INFERENCE_CLIENT_MODEL_ID !== PIN.modelId || daimon.GROK_INFERENCE_GRANT_ENV !== PIN.envKey || daimon.GROK_INFERENCE_PROXY_BASE_URL !== PIN.proxyBaseUrl ||
34
- grants.maxLiveGrants !== PIN.maxLiveGrants || !isDeepStrictEqual([...grants.failureCodes], PIN.failureCodes) || grants.client.modelId !== PIN.modelId ||
35
- grants.client.envKey !== PIN.envKey || !isDeepStrictEqual(grants.client.configSha256, PIN.configSha256)) {
36
- throw new Error('Installed Daimon inference client contract differs from the Training pin');
37
- }
38
- const client = new daimon.EngineBrokerControlClient(socketPath);
39
- const refusal = (error) => error instanceof daimon.EngineBrokerInferenceGrantRefused && grokGrantRefusalCodes.includes(error.code)
40
- ? new GrokGrantRefusal(error.code) : error;
41
- return Object.freeze({
42
- clientModelId: PIN.modelId, envKey: PIN.envKey, maxLiveGrants: PIN.maxLiveGrants,
43
- request: input => client.requestInferenceGrant(input).catch((error) => { throw refusal(error); }),
44
- release: grantId => client.releaseInferenceGrant(grantId).catch((error) => { throw refusal(error); }),
45
- renderClientConfig: input => daimon.renderGrokInferenceClientConfig(input),
46
- pinnedClientConfigSha256: (model, reasoningEffort) => PIN.configSha256[model]?.[reasoningEffort],
47
- });
48
- }
49
- //# sourceMappingURL=authority.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"authority.js","sourceRoot":"","sources":["../../../../../../src/runtime/daimon/training/native/grants/authority.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EACZ,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,4BAA4B,IAAI,GAAG,EAAE,MAAM,W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CAAC;QAC1G,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9G,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,+BAA+B,CAAC,KAAK,CAAC;QAC1E,wBAAwB,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,EAAE,CAAE,GAAG,CAAC,YAAyE,CAAC,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC;KACzH,CAAC,CAAC;AAC3C,CAAC"}
@@ -1,2 +0,0 @@
1
- export { grokBrokerControlSocketEnv, grokGrantHomeRootEnv, loadDaimonGrokGrantAuthority, type DaimonGrantModule } from './authority.js';
2
- export { daimonGrokInferenceClientPin } from './pins.js';
@@ -1,3 +0,0 @@
1
- export { grokBrokerControlSocketEnv, grokGrantHomeRootEnv, loadDaimonGrokGrantAuthority } from './authority.js';
2
- export { daimonGrokInferenceClientPin } from './pins.js';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/runtime/daimon/training/native/grants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,4BAA4B,EAA0B,MAAM,gBAAgB,CAAC;AACxI,OAAO,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC"}
@@ -1,30 +0,0 @@
1
- /**
2
- * Training's pin of Daimon's evaluator inference client contract
3
- * (`GROK_ENGINE_BROKER.inferenceGrants` in runtime-contract-manifest v4, Grok CLI 1.0.34).
4
- * These inference-only bytes are unchanged by the clocked subject worker config.
5
- * Independent of the installed Daimon so drift in either side fails closed.
6
- */
7
- export declare const daimonGrokInferenceClientPin: Readonly<{
8
- modelId: "daimon-inference-grok";
9
- envKey: "DAIMON_INFERENCE_GRANT";
10
- proxyBaseUrl: "http://127.0.0.1:43123/v1";
11
- maxLiveGrants: 8;
12
- failureCodes: string[];
13
- configSha256: {
14
- 'grok-4.6': {
15
- low: string;
16
- medium: string;
17
- high: string;
18
- };
19
- 'grok-4.5': {
20
- low: string;
21
- medium: string;
22
- high: string;
23
- };
24
- 'grok-build': {
25
- low: string;
26
- medium: string;
27
- high: string;
28
- };
29
- };
30
- }>;
@@ -1,20 +0,0 @@
1
- import { grokGrantEnvKey } from '../../providers/grok-broker/index.js';
2
- /**
3
- * Training's pin of Daimon's evaluator inference client contract
4
- * (`GROK_ENGINE_BROKER.inferenceGrants` in runtime-contract-manifest v4, Grok CLI 1.0.34).
5
- * These inference-only bytes are unchanged by the clocked subject worker config.
6
- * Independent of the installed Daimon so drift in either side fails closed.
7
- */
8
- export const daimonGrokInferenceClientPin = Object.freeze({
9
- modelId: 'daimon-inference-grok',
10
- envKey: grokGrantEnvKey,
11
- proxyBaseUrl: 'http://127.0.0.1:43123/v1',
12
- maxLiveGrants: 8,
13
- failureCodes: ['auth_stale', 'grant_limit', 'invalid_request', 'unavailable'],
14
- configSha256: {
15
- 'grok-4.6': { low: '79314d039f787e4ebfec7dacf57adc969086b948f564dec008f0ed6367e6062f', medium: '6f538de0547c0c4e6a3f04ae08595ceadadabb06b75f6b6ee4c428744bb95cd8', high: '5652656effa82f0c4f09cf8226b16e6140332a5a358b571194bb5563312367ac' },
16
- 'grok-4.5': { low: 'a07f7436f1268bb399ec233c65d3b3d8fb99a11a1f175f8da1ca133c9367bc74', medium: '1f4c0d4dad1f3b09419b5739db6423a09e0049abc091594c64123a75dd53dfb9', high: 'ffbc33728b821e9854fbc7c93601e599225da421ecfd6ebf10d314afcc28d6f2' },
17
- 'grok-build': { low: 'ca15c6a562a008227d39c51d3a3a83715663089b3784e8b46debb1fb67b3c4a1', medium: '01783fb6beadcf6f8486fff0836820ad43fab5662b812a907fe9cfdb83e9804d', high: '98d16f2b7d12f4eb540d625c853e51d227933e204923e43e8b9b4176f10aca2c' },
18
- },
19
- });
20
- //# sourceMappingURL=pins.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pins.js","sourceRoot":"","sources":["../../../../../../src/runtime/daimon/training/native/grants/pins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAsD,MAAM,sCAAsC,CAAC;AAE3H;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,MAAM,CAAC;IACxD,OAAO,EAAE,uBAAuB;IAChC,MAAM,EAAE,eAAe;IACvB,YAAY,EAAE,2BAA2B;IACzC,aAAa,EAAE,CAAC;IAChB,YAAY,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,aAAa,CAAC;IAC7E,YAAY,EAAE;QACZ,UAAU,EAAE,EAAE,GAAG,EAAE,kEAAkE,EAAE,MAAM,EAAE,kEAAkE,EAAE,IAAI,EAAE,kEAAkE,EAAE;QAC7O,UAAU,EAAE,EAAE,GAAG,EAAE,kEAAkE,EAAE,MAAM,EAAE,kEAAkE,EAAE,IAAI,EAAE,kEAAkE,EAAE;QAC7O,YAAY,EAAE,EAAE,GAAG,EAAE,kEAAkE,EAAE,MAAM,EAAE,kEAAkE,EAAE,IAAI,EAAE,kEAAkE,EAAE;KACrK;CAC7E,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- /** Test-only broker control socket speaking Daimon's length-prefixed JSON frames with scripted answers. */
2
- export declare function scriptedBrokerSocket(answer: (request: Record<string, unknown>) => Record<string, unknown> | undefined): Promise<{
3
- socketPath: string;
4
- received: Record<string, unknown>[];
5
- close: () => Promise<void>;
6
- }>;
@@ -1,35 +0,0 @@
1
- import { mkdtemp, rm } from 'node:fs/promises';
2
- import { createServer } from 'node:net';
3
- import { tmpdir } from 'node:os';
4
- import path from 'node:path';
5
- /** Test-only broker control socket speaking Daimon's length-prefixed JSON frames with scripted answers. */
6
- export async function scriptedBrokerSocket(answer) {
7
- const dir = await mkdtemp(path.join(tmpdir(), 'training-broker-'));
8
- const socketPath = path.join(dir, 'control.sock');
9
- const received = [];
10
- const server = createServer(connection => {
11
- let buffered = Buffer.alloc(0);
12
- connection.on('data', chunk => {
13
- buffered = Buffer.concat([buffered, chunk]);
14
- while (buffered.length >= 4 && buffered.length >= buffered.readUInt32BE(0) + 4) {
15
- const length = buffered.readUInt32BE(0);
16
- const request = JSON.parse(buffered.subarray(4, 4 + length).toString('utf8'));
17
- buffered = buffered.subarray(4 + length);
18
- received.push(request);
19
- const response = answer(request);
20
- if (response === undefined) {
21
- connection.destroy();
22
- return;
23
- }
24
- const body = Buffer.from(JSON.stringify({ version: request['version'], requestId: request['requestId'], ...response }));
25
- const frame = Buffer.alloc(4 + body.length);
26
- frame.writeUInt32BE(body.length);
27
- body.copy(frame, 4);
28
- connection.write(frame);
29
- }
30
- });
31
- });
32
- await new Promise(resolve => server.listen(socketPath, resolve));
33
- return { socketPath, received, close: async () => { await new Promise(resolve => server.close(resolve)); await rm(dir, { recursive: true, force: true }); } };
34
- }
35
- //# sourceMappingURL=test-socket.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-socket.js","sourceRoot":"","sources":["../../../../../../src/runtime/daimon/training/native/grants/test-socket.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAe,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,2GAA2G;AAC3G,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAAiF;IAC1H,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,kBAAkB,CAAC,CAAC,CAAC;IACnE,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,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AAG,IAAI,CAAC,MAAM,CAAC,CAAC;gBAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;gBACnG,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,MAAM,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;IACvE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,GAAG,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChK,CAAC"}
@@ -1,34 +0,0 @@
1
- import { type GrokBrokerProjection, type GrokSlotPreflight } from './receipt/grok.js';
2
- import type { GrokNativeLaunch, NativeLaunch } from './receipt/index.js';
3
- import type { NativeConfig } from './worker/index.js';
4
- /** Byte-exact outputs from Daimon public projection v3 resolver. */
5
- export declare const daimonProjectionGolden: GrokBrokerProjection;
6
- export declare const daimonProjectionGoldenSha256 = "eb9fe5430db97b3e9aea8d3a4ec4b2a4771db15917d7c41594338599d96932f5";
7
- export declare const daimonClockedProjectionGolden: GrokBrokerProjection;
8
- export declare const daimonClockedProjectionGoldenSha256 = "c06709c076b4ba1a15c10f0f3f7c1bcd46217355d81e1cfb7d1d2c25194fbd68";
9
- export declare const fixtureNonce = "5f0e2a1c9b8d7e6f5a4b3c2d1e0f9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f";
10
- /**
11
- * The caller-protected paths a Grok trial declares.
12
- *
13
- * Always evaluator roots the slot receipt denies to the worker uid — never the
14
- * subject's own workspace or runtime home, which are the two writable roots.
15
- */
16
- export declare const grokProtectedPaths: (root: string) => string[];
17
- /**
18
- * Turns a Codex launch fixture into a Grok v2 child launch shaped like the
19
- * broker-capable training container.
20
- *
21
- * The container fixes `<slot>/workspace`, `<slot>/runtime-home` and
22
- * `<slot>/state` as siblings and keeps every Training control input in the
23
- * denied `/run/spawnfile-training` root, so the fixture root stands in for the slot root:
24
- * the trial runtime home is the single writable projection, the control root is
25
- * its sibling `state/`, and config/token/env move into the denied `training/`
26
- * evaluator root. Every evaluator root is a real directory under `root`.
27
- */
28
- export declare function grokLaunchFrom<T extends NativeLaunch>(launch: T, root: string, runtimeHome?: string): Promise<T & GrokNativeLaunch>;
29
- /** The training container resolves the slot projection from a one-agent config with no peers and no Mneme projection. */
30
- export declare function grokConfigFor(config: NativeConfig): NativeConfig;
31
- /** What Daimon's resolver returns for this launch when its inputs are passed through unchanged. */
32
- export declare function grokProjectionFor(launch: GrokNativeLaunch, extraDeny?: readonly string[]): GrokBrokerProjection;
33
- export declare function slotPreflightFor(projection: GrokBrokerProjection, paths?: string[], generation?: number, nonce?: string): GrokSlotPreflight;
34
- export declare function writeGrokSlotReceipt(launch: GrokNativeLaunch, value?: unknown): Promise<void>;