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,179 +0,0 @@
1
- import { DAIMON_BROKER_ENGINE_ID, DAIMON_PORTABLE_ENGINE_ID, getDaimonEngineDescriptor } from "../../runtime/daimon/index.js";
2
- import { DAIMON_PACKAGE_NAME } from '../../runtime/daimon/packageName.js';
3
- import { readFile } from "node:fs/promises";
4
- import path from "node:path";
5
- import { SpawnfileError } from "../../shared/index.js";
6
- import { DAIMON_CODEX_SUBSCRIPTION_REALM, DAIMON_GROK_ENGINE_BROKER } from "../../runtime/daimon/contractManifest.js";
7
- import { parseTrainingBrokerDeclaration } from "./broker/declaration.js";
8
- import { TRAINING_BROKER_DECLARATION_FILE, TRAINING_ROOT, TRAINING_SLOTS_FILE, trainingSlotDescriptors } from "./broker/paths.js";
9
- import { loadDaimonProjectionModule, resolveTrainingSlotProjection } from "./broker/projection.js";
10
- import { recycleTrainingSlot } from "./broker/recycleClient.js";
11
- /** The fixed read-only container leaf the training launch binds the Codex login to. */
12
- export const TRAINING_CODEX_CREDENTIAL_INGRESS = "/run/spawnfile-training-auth/codex";
13
- const NONCE = /^[a-f0-9]{64}$/u;
14
- const invalid = (message) => { throw new SpawnfileError("validation_error", message); };
15
- const refused = (message) => { throw new SpawnfileError("runtime_error", message); };
16
- const canonical = (label, value) => {
17
- if (typeof value !== "string" || !path.posix.isAbsolute(value) || path.posix.normalize(value) !== value
18
- || value.length < 2 || value.endsWith("/") || value.includes(","))
19
- invalid(`Training subject ${label} must be a canonical absolute path`);
20
- return value;
21
- };
22
- /**
23
- * Lease one training slot for an engine-neutral subject and return everything
24
- * `spawnfile.training.daimon-native.launch.v2` must carry about it.
25
- *
26
- * Spawnfile owns the container, its slots, the broker declaration and
27
- * registration, the projection inputs, the recycle verb and the credential
28
- * ingress paths, so an integration names an engine and an agent and never a
29
- * container path. Grok recycles the slot with the evaluator's nonce and binds
30
- * the supervisor's receipt; Codex derives its per-trial projections from the
31
- * evaluator's own trial roots. Any other engine is refused.
32
- */
33
- export const leaseTrainingSubject = async (options) => {
34
- options.signal.throwIfAborted();
35
- if (!Number.isInteger(options.slot) || options.slot < 0)
36
- invalid("Training subject lease requires a slot index");
37
- const subject = getDaimonEngineDescriptor(options.engine)?.training.subject;
38
- // These versioned lease variants implement only the two released identities.
39
- if (subject?.supported && subject.isolation === "broker-worker" && options.engine === DAIMON_BROKER_ENGINE_ID)
40
- return leaseGrokSubject(options);
41
- if (subject?.supported && subject.isolation === "native-sandbox" && options.engine === DAIMON_PORTABLE_ENGINE_ID)
42
- return leaseCodexSubject(options);
43
- return invalid(`Training subject engine ${String(options.engine)} is not supported; lease a codex or grok subject`);
44
- };
45
- const leaseGrokSubject = async (options) => {
46
- const freshness = options.freshness;
47
- if (!freshness || !NONCE.test(freshness.expectedNonce) || !Number.isSafeInteger(freshness.minGeneration) || freshness.minGeneration < 1) {
48
- return invalid("A Grok training subject requires freshness with a 32-byte hex nonce and a generation floor of at least 1");
49
- }
50
- const declaration = parseTrainingBrokerDeclaration(JSON.parse(await readFile(options.declarationFile ?? TRAINING_BROKER_DECLARATION_FILE, "utf8")));
51
- if (declaration.agentId !== options.agentId)
52
- invalid(`The training broker declares ${declaration.agentId}, not ${options.agentId}`);
53
- if (options.model !== undefined && options.model !== declaration.model)
54
- invalid(`The training broker declares model ${declaration.model}, not ${options.model}`);
55
- if (options.slot >= declaration.slots)
56
- invalid(`Training slot ${options.slot} is outside the declared pool of ${declaration.slots}`);
57
- const descriptor = trainingSlotDescriptors(declaration.slots)[options.slot];
58
- // Resolved before the recycle: a Daimon whose contract drifted must refuse without wiping the slot.
59
- const daimon = await loadDaimonProjectionModule(options.loadDaimon);
60
- const { registration, projection, projectionSha256 } = await resolveTrainingSlotProjection(declaration, options.slot, daimon);
61
- options.signal.throwIfAborted();
62
- const result = await recycleTrainingSlot({ slot: options.slot, nonce: freshness.expectedNonce, signal: options.signal,
63
- ...(options.connect ? { connect: options.connect } : {}) });
64
- if (result.receipt !== descriptor.preflightReceipt)
65
- refused("The slot supervisor published its receipt outside the leased slot root");
66
- if (result.generation < freshness.minGeneration)
67
- refused("The slot supervisor published a generation below the evaluator freshness floor");
68
- options.signal.throwIfAborted();
69
- const roots = {
70
- workspace: descriptor.workspace, home: descriptor.runtimeHome, control: descriptor.state, workerHome: descriptor.workerHome,
71
- usageLedger: descriptor.usageLedger, preflightReceipt: descriptor.preflightReceipt, context: TRAINING_ROOT
72
- };
73
- return {
74
- agent: { id: declaration.agentId, engine: DAIMON_BROKER_ENGINE_ID, model: declaration.model, reasoningEffort: declaration.reasoningEffort },
75
- workspace: { source: descriptor.workspace, target: descriptor.workspace },
76
- // The projection digest binds exactly the slot workspace and runtime home; nothing else may be writable.
77
- projections: [{ role: "home", source: descriptor.runtimeHome, target: descriptor.runtimeHome }],
78
- credentials: [],
79
- broker: {
80
- projectionVersion: DAIMON_GROK_ENGINE_BROKER.projectionVersion,
81
- workerConfigVariant: projection.workerConfigVariant,
82
- projectionSha256,
83
- slot: options.slot,
84
- workerUid: descriptor.workerUid,
85
- workerHomePath: descriptor.workerHome,
86
- architecture: declaration.architecture,
87
- usageLedgerPath: descriptor.usageLedger,
88
- seccompProfileSha256: declaration.seccompProfileSha256,
89
- // Verbatim provisioner values the digest binds: a deny list re-derived from evaluatorPaths would fork it.
90
- profileSha256: registration.profileSha256,
91
- denyPaths: [...registration.denyPaths],
92
- limits: { ...declaration.limits },
93
- evaluatorPaths: descriptor.evaluatorPaths.map((row) => ({ role: row.role, path: row.path })),
94
- slotPreflightReceipt: descriptor.preflightReceipt,
95
- expectedNonce: freshness.expectedNonce,
96
- minGeneration: freshness.minGeneration
97
- },
98
- roots,
99
- ports: { moltnet: descriptor.ports.moltnet, control: descriptor.ports.workerControl, bridge: descriptor.ports.bridge },
100
- generation: result.generation,
101
- env: { [DAIMON_GROK_ENGINE_BROKER.slotRouting.slotEnvironment]: String(options.slot) }
102
- };
103
- };
104
- /** Indirect specifier: Daimon is an in-image runtime peer, never a Spawnfile source dependency. */
105
- const loadDaimonRuntime = async () => {
106
- const packageName = `${DAIMON_PACKAGE_NAME}/runtime`;
107
- return import(packageName);
108
- };
109
- /** The Codex credential leaf Daimon reads, from its public export, refused unless it equals the vendored manifest. */
110
- const codexSubscriptionRealm = async (load = loadDaimonRuntime) => {
111
- let daimon;
112
- try {
113
- daimon = await load();
114
- }
115
- catch {
116
- return refused(`The training image must install ${DAIMON_PACKAGE_NAME} with its public /runtime export`);
117
- }
118
- if (!daimon?.CODEX_SUBSCRIPTION_REALM || Object.entries(DAIMON_CODEX_SUBSCRIPTION_REALM).some(([key, value]) => daimon.CODEX_SUBSCRIPTION_REALM[key] !== value)) {
119
- return refused("The installed Daimon Codex subscription realm differs from this compiler's vendored manifest");
120
- }
121
- return DAIMON_CODEX_SUBSCRIPTION_REALM;
122
- };
123
- /** Ports from the leased slot's own `slots.json` block (offsets 0=Moltnet, 1=worker control, 2=bridge), refused outside it. */
124
- const leasedSlotPorts = async (slot, file) => {
125
- let entry;
126
- try {
127
- const document = JSON.parse(await readFile(file, "utf8"));
128
- entry = Array.isArray(document.slots) ? document.slots.find((row) => row?.index === slot) : undefined;
129
- }
130
- catch {
131
- return refused("The training slots manifest is missing or unreadable");
132
- }
133
- const base = entry?.ports?.base, count = entry?.ports?.count;
134
- if (!Number.isSafeInteger(base) || !Number.isSafeInteger(count) || base < 1 || count < 3) {
135
- return refused(`Training slot ${slot} has no usable port block in the slots manifest`);
136
- }
137
- const first = base;
138
- const offsets = { moltnet: first, control: first + 1, bridge: first + 2 };
139
- if (Object.values(offsets).some((port) => port >= first + count || port > 65_535)) {
140
- return refused(`Training slot ${slot} ports fall outside its leased block`);
141
- }
142
- return offsets;
143
- };
144
- const leaseCodexSubject = async (options) => {
145
- if (options.freshness !== undefined)
146
- invalid("A Codex training subject has no slot recycle; freshness does not apply");
147
- if (typeof options.model !== "string" || !options.model.trim())
148
- invalid("A Codex training subject requires its compiled model");
149
- if (!options.trialRoots)
150
- return invalid("A Codex training subject requires the evaluator's trial roots");
151
- const workspace = canonical("workspace", options.trialRoots.workspace);
152
- const runtimeHome = canonical("runtime home", options.trialRoots.runtimeHome);
153
- const ports = await leasedSlotPorts(options.slot, options.slotsFile ?? TRAINING_SLOTS_FILE);
154
- const realm = await codexSubscriptionRealm(options.loadDaimon);
155
- options.signal.throwIfAborted();
156
- // Codex's writable data sits beside the workspace, disjoint from the evaluator runtime and its controls.
157
- const parent = path.posix.dirname(workspace);
158
- const home = path.posix.join(parent, "home"), memory = path.posix.join(parent, "memory");
159
- const transport = path.posix.join(runtimeHome, "native/moltnet");
160
- const roots = { workspace, home, memory, transport, control: path.posix.join(runtimeHome, "native/root-control/acceptance"),
161
- inputs: path.posix.join(runtimeHome, "native/root-control/inputs") };
162
- const values = Object.values(roots);
163
- if (new Set(values).size !== values.length || values.some((value) => value !== workspace && value.startsWith(`${workspace}/`))) {
164
- invalid("Codex trial roots must not overlap the subject workspace");
165
- }
166
- return {
167
- agent: { id: options.agentId, engine: DAIMON_PORTABLE_ENGINE_ID, model: options.model },
168
- workspace: { source: workspace, target: workspace },
169
- projections: [{ role: "home", source: home, target: home }, { role: "memory", source: memory, target: memory },
170
- { role: "transport", source: transport, target: transport },
171
- { role: "subscription", source: realm.durableMountPath, target: realm.durableMountPath }],
172
- // The container owns one persistent authority for every trial. The runtime
173
- // stages credentials during each serialized host lifecycle and promotes refreshes.
174
- credentials: [{ source: TRAINING_CODEX_CREDENTIAL_INGRESS, target: realm.bootstrapMountPath }],
175
- roots,
176
- ports,
177
- env: {}
178
- };
179
- };
@@ -1,14 +0,0 @@
1
- import { type DevExecFile } from "./docker.js";
2
- import { type DevProjectOptions } from "./project.js";
3
- export interface DevActivityProjectOptions extends DevProjectOptions {
4
- agent?: string;
5
- execFile?: DevExecFile;
6
- tail?: number;
7
- }
8
- export interface DevActivityProjectResult {
9
- containerName: string;
10
- deploymentName: string;
11
- events: unknown[];
12
- outputDirectory: string;
13
- }
14
- export declare const devActivityProject: (inputPath: string, options?: DevActivityProjectOptions) => Promise<DevActivityProjectResult>;
@@ -1,48 +0,0 @@
1
- import { defaultExecFile, dockerArgsForRecord, firstContainerName, runDocker } from "./docker.js";
2
- import { PI_CONTROL_URL, resolveDevOutputDirectory, selectDeploymentRecord } from "./project.js";
3
- import { SpawnfileError } from "../shared/index.js";
4
- const activityPath = (options) => {
5
- const params = new URLSearchParams();
6
- if (options.agent) {
7
- params.set("agent", options.agent);
8
- }
9
- if (typeof options.tail === "number" && Number.isInteger(options.tail) && options.tail > 0) {
10
- params.set("tail", String(options.tail));
11
- }
12
- const query = params.toString();
13
- return `${PI_CONTROL_URL}/spawnfile/activity${query ? `?${query}` : ""}`;
14
- };
15
- const parseActivityEvents = (stdout) => {
16
- let parsed;
17
- try {
18
- parsed = JSON.parse(stdout);
19
- }
20
- catch {
21
- throw new SpawnfileError("runtime_error", "Pi activity endpoint returned invalid JSON");
22
- }
23
- if (typeof parsed !== "object" ||
24
- parsed === null ||
25
- !Array.isArray(parsed.events)) {
26
- throw new SpawnfileError("runtime_error", "Pi activity endpoint response did not include an events array");
27
- }
28
- return parsed.events;
29
- };
30
- export const devActivityProject = async (inputPath, options = {}) => {
31
- const outputDirectory = await resolveDevOutputDirectory(inputPath, options.outputDirectory);
32
- const record = await selectDeploymentRecord(outputDirectory, options.deploymentName);
33
- const containerName = firstContainerName(record);
34
- const stdout = await runDocker(options.dockerCommand ?? "docker", [
35
- ...dockerArgsForRecord(record),
36
- "exec",
37
- containerName,
38
- "curl",
39
- "-fsS",
40
- activityPath(options)
41
- ], options.execFile ?? defaultExecFile);
42
- return {
43
- containerName,
44
- deploymentName: record.name,
45
- events: parseActivityEvents(stdout),
46
- outputDirectory
47
- };
48
- };
@@ -1,13 +0,0 @@
1
- import type { SubjectAdapter, SubjectStart } from '../../../training/index.js';
2
- import { runProcess } from '../../../training/index.js';
3
- export interface CodexOptions {
4
- command?: string;
5
- authHome?: string;
6
- model?: string;
7
- timeoutMs?: number;
8
- /** Injection only changes process plumbing; production uses the installed CLI. */
9
- process?: typeof runProcess;
10
- }
11
- export declare function createCodexAdapter(options?: CodexOptions): SubjectAdapter;
12
- export declare function codexArguments(input: SubjectStart, authHome: string, model?: string, threadId?: string): string[];
13
- export declare function combineSignals(first?: AbortSignal, second?: AbortSignal): AbortSignal | undefined;
@@ -1,101 +0,0 @@
1
- import { prepareCodexEnvironment, savedCodexHome } from './environment.js';
2
- import { canonicalProtectedPaths } from '../../../training/index.js';
3
- import { runProcess } from '../../../training/index.js';
4
- import { decodeCodex } from './protocol.js';
5
- export function createCodexAdapter(options = {}) {
6
- return {
7
- id: 'codex',
8
- capabilities: { toolTrace: 'partial', liveObservations: true, cancellation: 'process-group',
9
- multiTurn: true, resources: ['instructions', 'supporting-files'],
10
- readIsolation: 'declared-paths', protectedPaths: true,
11
- isolation: 'Native workspace permission profile, network disabled, declared protected paths denied; no universal host-read isolation.' },
12
- async start(input) {
13
- if ((input.tools?.length ?? 0) > 0)
14
- throw new Error('Codex CLI fixture-tool mounting is not supported by this adapter');
15
- const model = input.model ?? options.model;
16
- if (model === undefined || model.trim().length === 0 || model.startsWith('-'))
17
- throw new Error('An explicit native Codex model is required');
18
- const env = await prepareCodexEnvironment(input.workspacePath, input.runtimeHomePath, savedCodexHome(options.authHome));
19
- const authHome = env['CODEX_HOME'];
20
- const protectedPaths = await canonicalProtectedPaths(input.protectedPaths);
21
- let threadId;
22
- let active;
23
- let lastProcess;
24
- let stopped;
25
- let stopRequested = false;
26
- let used = false;
27
- let previousUsage;
28
- const stop = async (reason) => {
29
- stopRequested = true;
30
- const owned = active ?? lastProcess;
31
- stopped = owned === undefined ? {
32
- state: 'acknowledged', scope: 'process-group', quiescence: 'confirmed', remoteWork: 'unknown', reason,
33
- detail: 'No active owned process; remote effects and escaped descendants are not covered.',
34
- } : await owned.stop(reason);
35
- return stopped;
36
- };
37
- return {
38
- stop,
39
- async run(turn, signal) {
40
- if (stopRequested)
41
- throw new Error('Subject session is stopped');
42
- if (active !== undefined)
43
- throw new Error('Concurrent wakes are unsupported');
44
- if (used && threadId === undefined)
45
- throw new Error('Cannot resume without the native thread identity');
46
- const decoder = decodeCodex(input.trialId, turn.id, input.onObservation, previousUsage);
47
- active = (options.process ?? runProcess)({ command: options.command ?? 'codex',
48
- args: codexArguments({ ...input, protectedPaths }, authHome, model, threadId),
49
- cwd: input.workspacePath, env, stdin: turn.text, timeoutMs: options.timeoutMs ?? 180_000,
50
- signal: combineSignals(input.signal, signal), onLine: decoder.decode });
51
- used = true;
52
- lastProcess = active;
53
- try {
54
- const result = await active.completion;
55
- if (result.cancelled)
56
- stopRequested = true;
57
- previousUsage = decoder.cumulativeUsage;
58
- threadId ??= decoder.threadId;
59
- const error = result.error ?? decoder.failed ??
60
- (result.exitCode !== 0 ? `Codex exited ${result.exitCode}: ${result.stderr}` : undefined) ??
61
- (!decoder.completed || decoder.text.trim().length === 0 ? 'Codex did not produce a completed nonempty result' : undefined);
62
- if (error !== undefined)
63
- stopRequested = true;
64
- return {
65
- status: result.error !== undefined ? 'failed' : result.cancelled ? 'cancelled' : error === undefined ? 'completed' : 'failed',
66
- text: decoder.text, usage: decoder.usage, error, stop: result.stop,
67
- coverage: [
68
- { channel: 'tools', completeness: 'partial', ordering: 'source' },
69
- { channel: 'output', completeness: error === undefined ? 'complete' : 'partial', ordering: 'source' },
70
- { channel: 'usage', completeness: decoder.usage === null ? 'absent' : 'partial', ordering: 'source' },
71
- ],
72
- };
73
- }
74
- finally {
75
- active = undefined;
76
- }
77
- },
78
- };
79
- },
80
- };
81
- }
82
- export function codexArguments(input, authHome, model, threadId) {
83
- const denied = [...new Set([authHome, ...(input.protectedPaths ?? [])])];
84
- const filesystem = [
85
- '":workspace_roots"={"."="write"}',
86
- ...denied.map((entry) => `${JSON.stringify(entry)}="deny"`),
87
- ].join(',');
88
- return ['exec', '--ignore-user-config', '--ignore-rules', '--strict-config', '--disable', 'memories',
89
- '--skip-git-repo-check', '--json', '-C', input.workspacePath,
90
- '-c', 'approval_policy="never"', '-c', 'web_search="disabled"', '-c', 'project_doc_max_bytes=0',
91
- '-c', 'mcp_servers={}', '-c', 'default_permissions="training"',
92
- '-c', `permissions={training={extends=":workspace",filesystem={${filesystem}},network={enabled=false}}}`,
93
- '-c', `developer_instructions=${JSON.stringify(input.instructions)}`,
94
- ...(model === undefined ? [] : ['--model', model]),
95
- ...(threadId === undefined ? ['-'] : ['resume', threadId, '-'])];
96
- }
97
- export function combineSignals(first, second) {
98
- const signals = [first, second].filter((signal) => signal !== undefined);
99
- return signals.length === 0 ? undefined : AbortSignal.any(signals);
100
- }
101
- //# sourceMappingURL=adapter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../src/runtime/codex-exec/training/adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAuB,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAW5C,MAAM,UAAU,kBAAkB,CAAC,UAAwB,EAA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AAE,IAAI,EAAE,gCAAgC;QAC9D,IAAI,EAAE,2DAA2D,UAAU,6BAA6B;QACxG,IAAI,EAAE,0BAA0B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE;QACpE,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAClD,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAmB,EAAE,MAAoB;IACtE,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAyB,EAAE,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC;IAChG,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACrE,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare function savedCodexHome(selected?: string): string;
2
- /** Authentication is selected externally and never copied or read into a capture. */
3
- export declare function prepareCodexEnvironment(workspacePath: string, runtimeHomePath: string, codexHome: string): Promise<NodeJS.ProcessEnv>;
@@ -1,26 +0,0 @@
1
- import { access, mkdir, realpath } from 'node:fs/promises';
2
- import { homedir } from 'node:os';
3
- import path from 'node:path';
4
- import { within } from '../../../training/index.js';
5
- export function savedCodexHome(selected) {
6
- return path.resolve(selected ?? process.env['CODEX_HOME'] ?? path.join(homedir(), '.codex'));
7
- }
8
- /** Authentication is selected externally and never copied or read into a capture. */
9
- export async function prepareCodexEnvironment(workspacePath, runtimeHomePath, codexHome) {
10
- await access(path.join(codexHome, 'auth.json'));
11
- await Promise.all([workspacePath, runtimeHomePath].map((directory) => mkdir(directory, { recursive: true })));
12
- const [workspace, runtimeHome, authentication] = await Promise.all([workspacePath, runtimeHomePath, codexHome].map((directory) => realpath(directory)));
13
- if (within(workspace, authentication) || within(runtimeHome, authentication) ||
14
- within(authentication, workspace) || within(authentication, runtimeHome)) {
15
- throw new Error('Saved authentication must be outside subject workspace and runtime home');
16
- }
17
- await mkdir(path.join(runtimeHome, '.tmp'), { recursive: true });
18
- return {
19
- PATH: process.env['PATH'], LANG: process.env['LANG'] ?? 'C', TZ: process.env['TZ'] ?? 'UTC',
20
- HOME: runtimeHome, CODEX_HOME: authentication,
21
- XDG_CONFIG_HOME: path.join(runtimeHome, '.config'), XDG_CACHE_HOME: path.join(runtimeHome, '.cache'),
22
- XDG_DATA_HOME: path.join(runtimeHome, '.local/share'), XDG_STATE_HOME: path.join(runtimeHome, '.local/state'),
23
- TMPDIR: path.join(runtimeHome, '.tmp'),
24
- };
25
- }
26
- //# sourceMappingURL=environment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../../src/runtime/codex-exec/training/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,MAAM,UAAU,cAAc,CAAC,QAAiB;IAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC/F,CAAC;AAED,qFAAqF;AACrF,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,aAAqB,EAAE,eAAuB,EAAE,SAAiB;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AY,EAAE,QAAQ,CAAC;QACtG,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,WAAY,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,WAAY,EAAE,cAAc,CAAC;QAC/G,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,WAAY,EAAE,MAAM,CAAC;KACxC,CAAC;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export { createCodexAdapter, type CodexOptions } from './adapter.js';
2
- export { prepareCodexEnvironment, savedCodexHome } from './environment.js';
@@ -1,3 +0,0 @@
1
- export { createCodexAdapter } from './adapter.js';
2
- export { prepareCodexEnvironment, savedCodexHome } from './environment.js';
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/runtime/codex-exec/training/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAqB,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,15 +0,0 @@
1
- import type { Observation, Usage } from '../../../training/index.js';
2
- export interface CodexProtocol {
3
- text: string;
4
- threadId?: string;
5
- completed: boolean;
6
- failed?: string;
7
- usage: Usage | null;
8
- cumulativeUsage: Usage | null;
9
- decode(line: string): Promise<void>;
10
- }
11
- export declare function decodeCodex(trialId: string, wakeId: string, emit: (observation: Observation) => void | Promise<void>, previousUsage?: Usage | null): CodexProtocol;
12
- /** Native resumed exec reports cumulative thread counters; compare matching session baselines. */
13
- export declare function usageDelta(current: Usage, previous: Usage | null): Usage;
14
- export declare function asObject(value: unknown): Record<string, unknown>;
15
- export declare function codexUsage(value: unknown): Usage;
@@ -1,102 +0,0 @@
1
- export function decodeCodex(trialId, wakeId, emit, previousUsage) {
2
- let seq = 0;
3
- const source = `codex:${trialId}:${wakeId}`;
4
- const dispatch = new Map();
5
- const output = async (value) => {
6
- const id = `${source}:${++seq}`;
7
- await emit({ id, source, seq, trialId, wakeId, timestamp: new Date().toISOString(), ...value });
8
- return id;
9
- };
10
- const state = {
11
- text: '', completed: false, usage: null, cumulativeUsage: null,
12
- async decode(line) {
13
- const event = asObject(JSON.parse(line));
14
- if (typeof event['type'] !== 'string')
15
- throw new Error('Invalid Codex event envelope');
16
- if (event['type'] === 'thread.started') {
17
- if (typeof event['thread_id'] !== 'string')
18
- throw new Error('Missing Codex thread identity');
19
- state.threadId = event['thread_id'];
20
- }
21
- if (event['type'] === 'turn.completed') {
22
- state.completed = true;
23
- state.cumulativeUsage = codexUsage(event['usage']);
24
- state.usage = previousUsage === undefined ? state.cumulativeUsage : usageDelta(state.cumulativeUsage, previousUsage);
25
- await output({ type: 'usage', usage: state.usage, native: event });
26
- }
27
- if (event['type'] === 'turn.failed' || event['type'] === 'error') {
28
- state.failed = typeof event['message'] === 'string' ? event['message'] : JSON.stringify(event['error'] ?? event);
29
- await output({ type: 'diagnostic', text: state.failed, native: event });
30
- }
31
- if (!String(event['type']).startsWith('item.'))
32
- return;
33
- const item = asObject(event['item']);
34
- if (item['type'] === 'agent_message' && event['type'] === 'item.completed') {
35
- if (typeof item['text'] !== 'string')
36
- throw new Error('Invalid Codex assistant output');
37
- state.text = item['text'];
38
- await output({ type: 'output', text: state.text, native: event });
39
- }
40
- const tool = nativeTool(item);
41
- if (tool === undefined)
42
- return;
43
- if (typeof item['id'] !== 'string')
44
- throw new Error('Missing native call identity');
45
- const callId = item['id'];
46
- if (event['type'] === 'item.started') {
47
- const id = await output({ type: 'tool.dispatch', callId, tool: tool.name, args: tool.args, native: event });
48
- dispatch.set(callId, id);
49
- }
50
- if (event['type'] === 'item.completed') {
51
- const parent = dispatch.get(callId);
52
- await output({ type: 'tool.complete', callId, tool: tool.name, args: tool.args,
53
- result: item['result'] ?? item['aggregated_output'] ?? item['changes'],
54
- success: success(item), causalParents: parent === undefined ? [] : [parent], native: event });
55
- }
56
- },
57
- };
58
- return state;
59
- }
60
- /** Native resumed exec reports cumulative thread counters; compare matching session baselines. */
61
- export function usageDelta(current, previous) {
62
- const subtract = (key) => {
63
- const value = current[key];
64
- const baseline = previous?.[key];
65
- return value !== null && baseline !== undefined && baseline !== null && value >= baseline ? value - baseline : null;
66
- };
67
- return { inputTokens: subtract('inputTokens'), cachedInputTokens: subtract('cachedInputTokens'),
68
- outputTokens: subtract('outputTokens'), reasoningTokens: subtract('reasoningTokens'), source: 'codex.thread.usage.delta' };
69
- }
70
- function nativeTool(item) {
71
- if (item['type'] === 'command_execution')
72
- return { name: 'shell', args: { command: item['command'] } };
73
- if (item['type'] === 'mcp_tool_call')
74
- return { name: String(item['tool']), args: item['arguments'] };
75
- if (item['type'] === 'file_change')
76
- return { name: 'apply_patch', args: item['changes'] };
77
- if (item['type'] === 'web_search')
78
- return { name: 'web_search', args: { query: item['query'] } };
79
- return undefined;
80
- }
81
- function success(item) {
82
- if (item['status'] === 'failed' || item['error'] !== undefined)
83
- return false;
84
- if (typeof item['exit_code'] === 'number')
85
- return item['exit_code'] === 0;
86
- return item['status'] === 'completed' ? true : undefined;
87
- }
88
- export function asObject(value) {
89
- if (value === null || typeof value !== 'object' || Array.isArray(value))
90
- throw new Error('Expected protocol object');
91
- return value;
92
- }
93
- export function codexUsage(value) {
94
- const usage = value !== null && typeof value === 'object' ? value : {};
95
- const count = (key) => {
96
- const entry = usage[key];
97
- return typeof entry === 'number' && Number.isFinite(entry) && entry >= 0 ? entry : null;
98
- };
99
- return { inputTokens: count('input_tokens'), cachedInputTokens: count('cached_input_tokens'),
100
- outputTokens: count('output_tokens'), reasoningTokens: count('reasoning_output_tokens'), source: 'codex.turn.completed' };
101
- }
102
- //# sourceMappingURL=protocol.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../../src/runtime/codex-exec/training/protocol.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,WAAW,CACzB,OAAe,EAAE,MAAc,EAAE,IAAwD,EACzF,aAA4B;I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KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1F,CAAC,CAAC;IACF,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,qBAAqB,CAAC;QAC1F,YAAY,EAAE,KAAK,CAAC,eAAe,CAAC,EAAE,eAAe,EAAE,KAAK,CAAC,yBAAyB,CAAC,EAAE,MAAM,EAAE,sBAAsB,EAAE,CAAC;AAC9H,CAAC"}
@@ -1 +0,0 @@
1
- export { createCodexInference, type CodexInferenceOptions } from './provider.js';
@@ -1,2 +0,0 @@
1
- export { createCodexInference } from './provider.js';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/runtime/codex-exec/training/providers/codex-subscription/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAA8B,MAAM,eAAe,CAAC"}
@@ -1,17 +0,0 @@
1
- import type { Usage, InferenceFailureKind } from '../../../../../training/index.js';
2
- export interface CodexFrames {
3
- started: boolean;
4
- turning: boolean;
5
- completed: boolean;
6
- text: string;
7
- model?: string;
8
- usage: Usage | null;
9
- }
10
- export declare function codexEvidence(frames: CodexFrames): {
11
- responseModel: string | null;
12
- responseRoute: string;
13
- usage: Usage | null;
14
- };
15
- /** Unknown item types are tool activity, including future native tool families. */
16
- export declare function consumeCodexFrame(frames: CodexFrames, line: string): void;
17
- export declare function classifyCodexFailure(message: unknown): InferenceFailureKind;