spawnfile 0.1.32 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/auth/trainingAuth.d.ts +2 -5
- package/dist/cli/devCommands.d.ts +1 -1
- package/dist/cli/devCommands.js +0 -66
- package/dist/cli/runCli.d.ts +1 -4
- package/dist/cli/runCli.js +2 -2
- package/dist/cli/trainCommand.js +9 -15
- package/dist/cli/trainingBooted.d.ts +7 -0
- package/dist/cli/trainingBooted.js +41 -0
- package/dist/cli/trainingExecution.d.ts +4 -7
- package/dist/cli/trainingExecution.js +4 -32
- package/dist/compiler/containerArtifacts.js +0 -5
- package/dist/compiler/containerBackedMountRender.js +5 -1
- package/dist/compiler/containerDaimonBrokerRender.d.ts +5 -50
- package/dist/compiler/containerDaimonBrokerRender.js +7 -88
- package/dist/compiler/containerDaimonGatewayRender.d.ts +50 -0
- package/dist/compiler/containerDaimonGatewayRender.js +157 -0
- package/dist/compiler/containerDaimonGrokWorkerProvisioning.d.ts +2 -10
- package/dist/compiler/containerDaimonGrokWorkerProvisioning.js +13 -25
- package/dist/compiler/containerDaimonGrokWorkerRender.d.ts +11 -49
- package/dist/compiler/containerDaimonGrokWorkerRender.js +15 -39
- package/dist/compiler/containerDaimonStartupSupervision.d.ts +8 -0
- package/dist/compiler/containerDaimonStartupSupervision.js +39 -0
- package/dist/compiler/containerDaimonUidEntrypointRender.d.ts +1 -2
- package/dist/compiler/containerDaimonUidEntrypointRender.js +26 -46
- package/dist/compiler/containerRuntimeReadinessRender.js +1 -1
- package/dist/compiler/memoryArtifacts.js +0 -1
- package/dist/compiler/moltnetArtifacts.js +1 -17
- package/dist/compiler/moltnetClientConfig.js +1 -1
- package/dist/compiler/moltnetRuntimeConfig.js +0 -10
- package/dist/compiler/runProject.d.ts +1 -0
- package/dist/compiler/runProject.js +9 -3
- package/dist/compiler/runProjectAuth.js +2 -17
- package/dist/compiler/training/contract.d.ts +0 -2
- package/dist/compiler/training/contract.js +0 -2
- package/dist/compiler/training/execution.d.ts +1 -128
- package/dist/compiler/training/execution.js +7 -68
- package/dist/compiler/training/index.d.ts +0 -8
- package/dist/compiler/training/index.js +0 -7
- package/dist/compiler/training/output.d.ts +1 -0
- package/dist/compiler/training/output.js +1 -1
- package/dist/compiler/training/trial/boot.d.ts +53 -0
- package/dist/compiler/training/trial/boot.js +147 -0
- package/dist/compiler/training/trial/docker.d.ts +8 -0
- package/dist/compiler/training/trial/docker.js +22 -0
- package/dist/compiler/training/trial/gateway.d.ts +42 -0
- package/dist/compiler/training/trial/gateway.js +98 -0
- package/dist/compiler/training/trial/index.d.ts +4 -0
- package/dist/compiler/training/trial/index.js +4 -0
- package/dist/compiler/training/trial/launcher.d.ts +32 -0
- package/dist/compiler/training/trial/launcher.js +49 -0
- package/dist/compiler/training/trial/project.d.ts +11 -0
- package/dist/compiler/training/trial/project.js +31 -0
- package/dist/compiler/upReceipt.d.ts +2 -17
- package/dist/compiler/upReceipt.js +2 -17
- package/dist/deployment/artifactsExportPlan.js +2 -18
- package/dist/deployment/privateArtifactsExport.js +1 -1
- package/dist/dev/docker.d.ts +0 -5
- package/dist/dev/docker.js +0 -46
- package/dist/dev/index.d.ts +0 -1
- package/dist/dev/index.js +0 -1
- package/dist/dev/project.d.ts +0 -16
- package/dist/dev/project.js +1 -128
- package/dist/distribution/distributionReportSchema.js +1 -1
- package/dist/distribution/imageRuntimeAuth.js +3 -2
- package/dist/release/drainControl.d.ts +5 -19
- package/dist/release/drainControl.js +12 -67
- package/dist/report/types.d.ts +3 -6
- package/dist/runtime/common.d.ts +1 -1
- package/dist/runtime/common.js +1 -1
- package/dist/runtime/container.d.ts +2 -2
- package/dist/runtime/container.js +1 -39
- package/dist/runtime/daimon/config.js +6 -12
- package/dist/runtime/daimon/contractManifest.js +0 -1
- package/dist/runtime/daimon/contractManifestSchema.js +0 -1
- package/dist/runtime/daimon/control.d.ts +31 -0
- package/dist/runtime/daimon/control.js +83 -0
- package/dist/runtime/daimon/engineDescriptorSchema.js +0 -1
- package/dist/runtime/daimon/engineDescriptors.generated.d.ts +1 -1
- package/dist/runtime/daimon/engineDescriptors.generated.js +1 -2
- package/dist/runtime/daimon/engines.js +0 -1
- package/dist/runtime/daimon/gateway.d.ts +62 -0
- package/dist/runtime/daimon/gateway.js +77 -0
- package/dist/runtime/daimon/grokWorkerContract.d.ts +0 -5
- package/dist/runtime/daimon/grokWorkerContract.js +1 -13
- package/dist/runtime/daimon/index.d.ts +2 -0
- package/dist/runtime/daimon/index.js +2 -1
- package/dist/runtime/daimon/memory.js +1 -1
- package/dist/runtime/daimon/packageName.js +0 -1
- package/dist/runtime/daimon/runAuth.js +7 -4
- package/dist/runtime/daimon/runtimeIdentity.d.ts +2 -0
- package/dist/runtime/daimon/runtimeIdentity.js +2 -0
- package/dist/runtime/daimon/subscriptionRealms.d.ts +9 -3
- package/dist/runtime/daimon/subscriptionRealms.js +22 -13
- package/dist/runtime/daimon/testHelpers.d.ts +2 -0
- package/dist/runtime/{pi → daimon}/testHelpers.js +3 -3
- package/dist/runtime/daimon/training/booted/adapter.d.ts +46 -0
- package/dist/runtime/daimon/training/booted/adapter.js +59 -0
- package/dist/runtime/daimon/training/booted/adapter.js.map +1 -0
- package/dist/runtime/daimon/training/booted/index.d.ts +2 -0
- package/dist/runtime/daimon/training/booted/index.js +2 -0
- package/dist/runtime/daimon/training/booted/index.js.map +1 -0
- package/dist/runtime/daimon/training/index.d.ts +5 -0
- package/dist/runtime/daimon/training/index.js +8 -4
- package/dist/runtime/daimon/training/index.js.map +1 -1
- package/dist/runtime/daimon/training/providers/codex-subscription/index.js.map +1 -0
- package/dist/runtime/daimon/training/providers/codex-subscription/protocol.js.map +1 -0
- package/dist/runtime/daimon/training/providers/codex-subscription/provider.js.map +1 -0
- package/dist/runtime/daimon/training/providers/codex-subscription/strict-schema.js.map +1 -0
- package/dist/runtime/daimon/training/providers/grok-subscription/cli.d.ts +1 -3
- package/dist/runtime/daimon/training/providers/grok-subscription/cli.js +5 -5
- package/dist/runtime/daimon/training/providers/grok-subscription/cli.js.map +1 -1
- package/dist/runtime/daimon/training/providers/grok-subscription/index.d.ts +1 -2
- package/dist/runtime/daimon/training/providers/grok-subscription/index.js +0 -1
- package/dist/runtime/daimon/training/providers/grok-subscription/index.js.map +1 -1
- package/dist/runtime/daimon/training/providers/grok-subscription/protocol.d.ts +5 -17
- package/dist/runtime/daimon/training/providers/grok-subscription/protocol.js +18 -31
- package/dist/runtime/daimon/training/providers/grok-subscription/protocol.js.map +1 -1
- package/dist/runtime/daimon/training/providers/grok-subscription/provider.js +1 -2
- package/dist/runtime/daimon/training/providers/grok-subscription/provider.js.map +1 -1
- package/dist/runtime/daimon/wakeMoments.js +0 -1
- package/dist/runtime/install.js +0 -21
- package/dist/runtime/registry.js +0 -2
- package/dist/runtime/trainingGraderProviders.js +1 -1
- package/dist/runtime/trainingProviders.d.ts +1 -2
- package/dist/runtime/trainingProviders.js +9 -19
- package/dist/runtime/trainingSubjects.d.ts +0 -121
- package/dist/runtime/trainingSubjects.js +2 -13
- package/dist/runtime/types.d.ts +1 -8
- package/dist/shared/errors.js +0 -1
- package/dist/status/lifecycleProbes.js +3 -6
- package/dist/status/moltnetWiringProbes.js +1 -17
- package/dist/training/subjects/index.d.ts +0 -1
- package/dist/training/subjects/index.js +0 -1
- package/dist/training/subjects/index.js.map +1 -1
- package/examples/README.md +0 -1
- package/examples/daimon-org/agents/mapper/Spawnfile +4 -1
- package/examples/daimon-org/teams/review/agents/reviewer/Spawnfile +4 -1
- package/examples/jungian-daimon-org/teams/luna/agents/animus/Spawnfile +5 -8
- package/examples/jungian-daimon-org/teams/luna/agents/representative/Spawnfile +1 -1
- package/examples/jungian-daimon-org/teams/luna/agents/shadow/Spawnfile +5 -8
- package/examples/jungian-daimon-org/teams/selene/agents/animus/Spawnfile +5 -8
- package/examples/jungian-daimon-org/teams/selene/agents/representative/Spawnfile +5 -8
- package/examples/jungian-daimon-org/teams/selene/agents/shadow/Spawnfile +1 -1
- package/examples/mixed-runtime-org/agents/localist/Spawnfile +7 -7
- package/package.json +4 -13
- package/runtimes.yaml +5 -15
- package/dist/compiler/containerDaimonGrokTaskClock.d.ts +0 -5
- package/dist/compiler/containerDaimonGrokTaskClock.js +0 -29
- package/dist/compiler/daimonTelemetryArtifacts.d.ts +0 -22
- package/dist/compiler/daimonTelemetryArtifacts.js +0 -56
- package/dist/compiler/training/broker/clockProbe.d.ts +0 -6
- package/dist/compiler/training/broker/clockProbe.js +0 -27
- package/dist/compiler/training/broker/declaration.d.ts +0 -54
- package/dist/compiler/training/broker/declaration.js +0 -70
- package/dist/compiler/training/broker/entrypoint.d.ts +0 -39
- package/dist/compiler/training/broker/entrypoint.js +0 -124
- package/dist/compiler/training/broker/evaluatorSecrets.d.ts +0 -2
- package/dist/compiler/training/broker/evaluatorSecrets.js +0 -62
- package/dist/compiler/training/broker/index.d.ts +0 -12
- package/dist/compiler/training/broker/index.js +0 -12
- package/dist/compiler/training/broker/main.d.ts +0 -2
- package/dist/compiler/training/broker/main.js +0 -14
- package/dist/compiler/training/broker/paths.d.ts +0 -236
- package/dist/compiler/training/broker/paths.js +0 -249
- package/dist/compiler/training/broker/processes.d.ts +0 -51
- package/dist/compiler/training/broker/processes.js +0 -102
- package/dist/compiler/training/broker/projection.d.ts +0 -61
- package/dist/compiler/training/broker/projection.js +0 -109
- package/dist/compiler/training/broker/provisioning.d.ts +0 -78
- package/dist/compiler/training/broker/provisioning.js +0 -231
- package/dist/compiler/training/broker/receipt.d.ts +0 -77
- package/dist/compiler/training/broker/receipt.js +0 -110
- package/dist/compiler/training/broker/recycleClient.d.ts +0 -33
- package/dist/compiler/training/broker/recycleClient.js +0 -112
- package/dist/compiler/training/broker/registration.d.ts +0 -46
- package/dist/compiler/training/broker/registration.js +0 -113
- package/dist/compiler/training/broker/reset.d.ts +0 -9
- package/dist/compiler/training/broker/reset.js +0 -71
- package/dist/compiler/training/broker/rootScript.d.ts +0 -32
- package/dist/compiler/training/broker/rootScript.js +0 -33
- package/dist/compiler/training/broker/runtime.d.ts +0 -22
- package/dist/compiler/training/broker/runtime.js +0 -128
- package/dist/compiler/training/broker/seccompRoutes.d.ts +0 -31
- package/dist/compiler/training/broker/seccompRoutes.js +0 -36
- package/dist/compiler/training/broker/supervisor.d.ts +0 -108
- package/dist/compiler/training/broker/supervisor.js +0 -172
- package/dist/compiler/training/broker/taskClock.d.ts +0 -5
- package/dist/compiler/training/broker/taskClock.js +0 -41
- package/dist/compiler/training/container/contract.d.ts +0 -54
- package/dist/compiler/training/container/contract.js +0 -52
- package/dist/compiler/training/container/evaluators.d.ts +0 -48
- package/dist/compiler/training/container/evaluators.js +0 -50
- package/dist/compiler/training/container/grokWriteback.d.ts +0 -8
- package/dist/compiler/training/container/grokWriteback.js +0 -26
- package/dist/compiler/training/container/index.d.ts +0 -5
- package/dist/compiler/training/container/index.js +0 -3
- package/dist/compiler/training/container/launch.d.ts +0 -21
- package/dist/compiler/training/container/launch.js +0 -280
- package/dist/compiler/training/container/nativeSlots.d.ts +0 -14
- package/dist/compiler/training/container/nativeSlots.js +0 -13
- package/dist/compiler/training/container/outputCopy.d.ts +0 -2
- package/dist/compiler/training/container/outputCopy.js +0 -72
- package/dist/compiler/training/container/outputVolume.d.ts +0 -28
- package/dist/compiler/training/container/outputVolume.js +0 -185
- package/dist/compiler/training/container/prepare.d.ts +0 -10
- package/dist/compiler/training/container/prepare.js +0 -125
- package/dist/compiler/training/container/process.d.ts +0 -14
- package/dist/compiler/training/container/process.js +0 -70
- package/dist/compiler/training/container/security.d.ts +0 -38
- package/dist/compiler/training/container/security.js +0 -68
- package/dist/compiler/training/container/subjectIsolation.d.ts +0 -5
- package/dist/compiler/training/container/subjectIsolation.js +0 -16
- package/dist/compiler/training/preparation/assets/Dockerfile +0 -100
- package/dist/compiler/training/preparation/assets/package-lock.json +0 -5483
- package/dist/compiler/training/preparation/broker.d.ts +0 -30
- package/dist/compiler/training/preparation/broker.js +0 -68
- package/dist/compiler/training/preparation/contextModes.d.ts +0 -12
- package/dist/compiler/training/preparation/contextModes.js +0 -38
- package/dist/compiler/training/preparation/contract.d.ts +0 -203
- package/dist/compiler/training/preparation/contract.js +0 -114
- package/dist/compiler/training/preparation/copyAssets.d.ts +0 -1
- package/dist/compiler/training/preparation/copyAssets.js +0 -8
- package/dist/compiler/training/preparation/daimonParent.d.ts +0 -42
- package/dist/compiler/training/preparation/daimonParent.js +0 -114
- package/dist/compiler/training/preparation/files.d.ts +0 -29
- package/dist/compiler/training/preparation/files.js +0 -146
- package/dist/compiler/training/preparation/image.d.ts +0 -28
- package/dist/compiler/training/preparation/image.js +0 -105
- package/dist/compiler/training/preparation/index.d.ts +0 -3
- package/dist/compiler/training/preparation/index.js +0 -2
- package/dist/compiler/training/preparation/inputs.d.ts +0 -24
- package/dist/compiler/training/preparation/inputs.js +0 -101
- package/dist/compiler/training/preparation/prepare.d.ts +0 -38
- package/dist/compiler/training/preparation/prepare.js +0 -224
- package/dist/compiler/training/preparation/scratch.d.ts +0 -8
- package/dist/compiler/training/preparation/scratch.js +0 -114
- package/dist/compiler/training/repair/compatibility.d.ts +0 -11
- package/dist/compiler/training/repair/compatibility.js +0 -45
- package/dist/compiler/training/repair/contract.d.ts +0 -832
- package/dist/compiler/training/repair/contract.js +0 -34
- package/dist/compiler/training/repair/index.d.ts +0 -3
- package/dist/compiler/training/repair/index.js +0 -3
- package/dist/compiler/training/repair/prepare.d.ts +0 -378
- package/dist/compiler/training/repair/prepare.js +0 -84
- package/dist/compiler/training/repair/witness.d.ts +0 -348
- package/dist/compiler/training/repair/witness.js +0 -62
- package/dist/compiler/training/subjectDeclaration.d.ts +0 -26
- package/dist/compiler/training/subjectDeclaration.js +0 -54
- package/dist/compiler/training/subjectLease.d.ts +0 -115
- package/dist/compiler/training/subjectLease.js +0 -179
- package/dist/dev/activity.d.ts +0 -14
- package/dist/dev/activity.js +0 -48
- package/dist/runtime/codex-exec/training/adapter.d.ts +0 -13
- package/dist/runtime/codex-exec/training/adapter.js +0 -101
- package/dist/runtime/codex-exec/training/adapter.js.map +0 -1
- package/dist/runtime/codex-exec/training/environment.d.ts +0 -3
- package/dist/runtime/codex-exec/training/environment.js +0 -26
- package/dist/runtime/codex-exec/training/environment.js.map +0 -1
- package/dist/runtime/codex-exec/training/index.d.ts +0 -2
- package/dist/runtime/codex-exec/training/index.js +0 -3
- package/dist/runtime/codex-exec/training/index.js.map +0 -1
- package/dist/runtime/codex-exec/training/protocol.d.ts +0 -15
- package/dist/runtime/codex-exec/training/protocol.js +0 -102
- package/dist/runtime/codex-exec/training/protocol.js.map +0 -1
- package/dist/runtime/codex-exec/training/providers/codex-subscription/index.js.map +0 -1
- package/dist/runtime/codex-exec/training/providers/codex-subscription/protocol.js.map +0 -1
- package/dist/runtime/codex-exec/training/providers/codex-subscription/provider.js.map +0 -1
- package/dist/runtime/codex-exec/training/providers/codex-subscription/strict-schema.js.map +0 -1
- package/dist/runtime/daimon/contractManifest.js.map +0 -1
- package/dist/runtime/daimon/contractManifestSchema.js.map +0 -1
- package/dist/runtime/daimon/engineDescriptorSchema.js.map +0 -1
- package/dist/runtime/daimon/engineDescriptors.generated.js.map +0 -1
- package/dist/runtime/daimon/engines.js.map +0 -1
- package/dist/runtime/daimon/index.js.map +0 -1
- package/dist/runtime/daimon/packageName.js.map +0 -1
- package/dist/runtime/daimon/training/legacy/adapter.d.ts +0 -11
- package/dist/runtime/daimon/training/legacy/adapter.js +0 -175
- package/dist/runtime/daimon/training/legacy/adapter.js.map +0 -1
- package/dist/runtime/daimon/training/legacy/index.d.ts +0 -2
- package/dist/runtime/daimon/training/legacy/index.js +0 -3
- package/dist/runtime/daimon/training/legacy/index.js.map +0 -1
- package/dist/runtime/daimon/training/legacy/public.d.ts +0 -49
- package/dist/runtime/daimon/training/legacy/public.js +0 -16
- package/dist/runtime/daimon/training/legacy/public.js.map +0 -1
- package/dist/runtime/daimon/training/native/adapter.d.ts +0 -18
- package/dist/runtime/daimon/training/native/adapter.js +0 -252
- package/dist/runtime/daimon/training/native/adapter.js.map +0 -1
- package/dist/runtime/daimon/training/native/admission.d.ts +0 -7
- package/dist/runtime/daimon/training/native/admission.js +0 -52
- package/dist/runtime/daimon/training/native/admission.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/arguments.d.ts +0 -16
- package/dist/runtime/daimon/training/native/child/arguments.js +0 -70
- package/dist/runtime/daimon/training/native/child/arguments.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/deferred-trial.d.ts +0 -24
- package/dist/runtime/daimon/training/native/child/deferred-trial.js +0 -63
- package/dist/runtime/daimon/training/native/child/deferred-trial.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/diagnostics.d.ts +0 -58
- package/dist/runtime/daimon/training/native/child/diagnostics.js +0 -215
- package/dist/runtime/daimon/training/native/child/diagnostics.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/fixture.d.ts +0 -16
- package/dist/runtime/daimon/training/native/child/fixture.js +0 -159
- package/dist/runtime/daimon/training/native/child/fixture.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/grok.d.ts +0 -14
- package/dist/runtime/daimon/training/native/child/grok.js +0 -47
- package/dist/runtime/daimon/training/native/child/grok.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/index.d.ts +0 -7
- package/dist/runtime/daimon/training/native/child/index.js +0 -5
- package/dist/runtime/daimon/training/native/child/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/lifecycle.d.ts +0 -40
- package/dist/runtime/daimon/training/native/child/lifecycle.js +0 -400
- package/dist/runtime/daimon/training/native/child/lifecycle.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/probe.d.ts +0 -2
- package/dist/runtime/daimon/training/native/child/probe.js +0 -11
- package/dist/runtime/daimon/training/native/child/probe.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/sandbox.d.ts +0 -4
- package/dist/runtime/daimon/training/native/child/sandbox.js +0 -76
- package/dist/runtime/daimon/training/native/child/sandbox.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/types.d.ts +0 -15
- package/dist/runtime/daimon/training/native/child/types.js +0 -2
- package/dist/runtime/daimon/training/native/child/types.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/docker.d.ts +0 -29
- package/dist/runtime/daimon/training/native/container/docker.js +0 -105
- package/dist/runtime/daimon/training/native/container/docker.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/grok-slot.d.ts +0 -22
- package/dist/runtime/daimon/training/native/container/grok-slot.js +0 -38
- package/dist/runtime/daimon/training/native/container/grok-slot.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/index.d.ts +0 -6
- package/dist/runtime/daimon/training/native/container/index.js +0 -6
- package/dist/runtime/daimon/training/native/container/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/lifecycle.d.ts +0 -8
- package/dist/runtime/daimon/training/native/container/lifecycle.js +0 -111
- package/dist/runtime/daimon/training/native/container/lifecycle.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/manifest.d.ts +0 -17
- package/dist/runtime/daimon/training/native/container/manifest.js +0 -164
- package/dist/runtime/daimon/training/native/container/manifest.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/native-preflight.d.ts +0 -8
- package/dist/runtime/daimon/training/native/container/native-preflight.js +0 -40
- package/dist/runtime/daimon/training/native/container/native-preflight.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/preflight.d.ts +0 -15
- package/dist/runtime/daimon/training/native/container/preflight.js +0 -79
- package/dist/runtime/daimon/training/native/container/preflight.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/slot.d.ts +0 -4
- package/dist/runtime/daimon/training/native/container/slot.js +0 -58
- package/dist/runtime/daimon/training/native/container/slot.js.map +0 -1
- package/dist/runtime/daimon/training/native/external.d.ts +0 -37
- package/dist/runtime/daimon/training/native/external.js +0 -75
- package/dist/runtime/daimon/training/native/external.js.map +0 -1
- package/dist/runtime/daimon/training/native/grants/authority.d.ts +0 -36
- package/dist/runtime/daimon/training/native/grants/authority.js +0 -49
- package/dist/runtime/daimon/training/native/grants/authority.js.map +0 -1
- package/dist/runtime/daimon/training/native/grants/index.d.ts +0 -2
- package/dist/runtime/daimon/training/native/grants/index.js +0 -3
- package/dist/runtime/daimon/training/native/grants/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/grants/pins.d.ts +0 -30
- package/dist/runtime/daimon/training/native/grants/pins.js +0 -20
- package/dist/runtime/daimon/training/native/grants/pins.js.map +0 -1
- package/dist/runtime/daimon/training/native/grants/test-socket.d.ts +0 -6
- package/dist/runtime/daimon/training/native/grants/test-socket.js +0 -35
- package/dist/runtime/daimon/training/native/grants/test-socket.js.map +0 -1
- package/dist/runtime/daimon/training/native/grok-fixtures.d.ts +0 -34
- package/dist/runtime/daimon/training/native/grok-fixtures.js +0 -179
- package/dist/runtime/daimon/training/native/grok-fixtures.js.map +0 -1
- package/dist/runtime/daimon/training/native/index.d.ts +0 -38
- package/dist/runtime/daimon/training/native/index.js +0 -27
- package/dist/runtime/daimon/training/native/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/live-checkout.d.ts +0 -2
- package/dist/runtime/daimon/training/native/live-checkout.js +0 -15
- package/dist/runtime/daimon/training/native/live-checkout.js.map +0 -1
- package/dist/runtime/daimon/training/native/observations.d.ts +0 -51
- package/dist/runtime/daimon/training/native/observations.js +0 -217
- package/dist/runtime/daimon/training/native/observations.js.map +0 -1
- package/dist/runtime/daimon/training/native/outcome.d.ts +0 -13
- package/dist/runtime/daimon/training/native/outcome.js +0 -37
- package/dist/runtime/daimon/training/native/outcome.js.map +0 -1
- package/dist/runtime/daimon/training/native/preparation/engine-config.d.ts +0 -21
- package/dist/runtime/daimon/training/native/preparation/engine-config.js +0 -30
- package/dist/runtime/daimon/training/native/preparation/engine-config.js.map +0 -1
- package/dist/runtime/daimon/training/native/preparation/fixtures.d.ts +0 -17
- package/dist/runtime/daimon/training/native/preparation/fixtures.js +0 -52
- package/dist/runtime/daimon/training/native/preparation/fixtures.js.map +0 -1
- package/dist/runtime/daimon/training/native/preparation/index.d.ts +0 -7
- package/dist/runtime/daimon/training/native/preparation/index.js +0 -5
- package/dist/runtime/daimon/training/native/preparation/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/preparation/layout.d.ts +0 -66
- package/dist/runtime/daimon/training/native/preparation/layout.js +0 -87
- package/dist/runtime/daimon/training/native/preparation/layout.js.map +0 -1
- package/dist/runtime/daimon/training/native/preparation/subject.d.ts +0 -14
- package/dist/runtime/daimon/training/native/preparation/subject.js +0 -67
- package/dist/runtime/daimon/training/native/preparation/subject.js.map +0 -1
- package/dist/runtime/daimon/training/native/preparation/types.d.ts +0 -69
- package/dist/runtime/daimon/training/native/preparation/types.js +0 -2
- package/dist/runtime/daimon/training/native/preparation/types.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/artifacts.d.ts +0 -25
- package/dist/runtime/daimon/training/native/receipt/artifacts.js +0 -32
- package/dist/runtime/daimon/training/native/receipt/artifacts.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/grok-clocked-pins.d.ts +0 -129
- package/dist/runtime/daimon/training/native/receipt/grok-clocked-pins.js +0 -45
- package/dist/runtime/daimon/training/native/receipt/grok-clocked-pins.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/grok.d.ts +0 -246
- package/dist/runtime/daimon/training/native/receipt/grok.js +0 -195
- package/dist/runtime/daimon/training/native/receipt/grok.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/index.d.ts +0 -11
- package/dist/runtime/daimon/training/native/receipt/index.js +0 -8
- package/dist/runtime/daimon/training/native/receipt/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/paths.d.ts +0 -3
- package/dist/runtime/daimon/training/native/receipt/paths.js +0 -18
- package/dist/runtime/daimon/training/native/receipt/paths.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/sandbox.d.ts +0 -42
- package/dist/runtime/daimon/training/native/receipt/sandbox.js +0 -35
- package/dist/runtime/daimon/training/native/receipt/sandbox.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/schema.d.ts +0 -490
- package/dist/runtime/daimon/training/native/receipt/schema.js +0 -138
- package/dist/runtime/daimon/training/native/receipt/schema.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/subscription.d.ts +0 -13
- package/dist/runtime/daimon/training/native/receipt/subscription.js +0 -13
- package/dist/runtime/daimon/training/native/receipt/subscription.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/task-clock.d.ts +0 -19
- package/dist/runtime/daimon/training/native/receipt/task-clock.js +0 -49
- package/dist/runtime/daimon/training/native/receipt/task-clock.js.map +0 -1
- package/dist/runtime/daimon/training/native/sealed-usage.d.ts +0 -218
- package/dist/runtime/daimon/training/native/sealed-usage.js +0 -261
- package/dist/runtime/daimon/training/native/sealed-usage.js.map +0 -1
- package/dist/runtime/daimon/training/native/test-fixtures.d.ts +0 -27
- package/dist/runtime/daimon/training/native/test-fixtures.js +0 -162
- package/dist/runtime/daimon/training/native/test-fixtures.js.map +0 -1
- package/dist/runtime/daimon/training/native/transcript.d.ts +0 -96
- package/dist/runtime/daimon/training/native/transcript.js +0 -239
- package/dist/runtime/daimon/training/native/transcript.js.map +0 -1
- package/dist/runtime/daimon/training/native/transport/delivery.d.ts +0 -27
- package/dist/runtime/daimon/training/native/transport/delivery.js +0 -98
- package/dist/runtime/daimon/training/native/transport/delivery.js.map +0 -1
- package/dist/runtime/daimon/training/native/transport/http.d.ts +0 -3
- package/dist/runtime/daimon/training/native/transport/http.js +0 -81
- package/dist/runtime/daimon/training/native/transport/http.js.map +0 -1
- package/dist/runtime/daimon/training/native/transport/index.d.ts +0 -4
- package/dist/runtime/daimon/training/native/transport/index.js +0 -3
- package/dist/runtime/daimon/training/native/transport/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/transport/types.d.ts +0 -15
- package/dist/runtime/daimon/training/native/transport/types.js +0 -2
- package/dist/runtime/daimon/training/native/transport/types.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/cli.d.ts +0 -1
- package/dist/runtime/daimon/training/native/worker/cli.js +0 -17
- package/dist/runtime/daimon/training/native/worker/cli.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/control.d.ts +0 -20
- package/dist/runtime/daimon/training/native/worker/control.js +0 -266
- package/dist/runtime/daimon/training/native/worker/control.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/deliveries.d.ts +0 -38
- package/dist/runtime/daimon/training/native/worker/deliveries.js +0 -91
- package/dist/runtime/daimon/training/native/worker/deliveries.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/evidence/collect.d.ts +0 -54
- package/dist/runtime/daimon/training/native/worker/evidence/collect.js +0 -278
- package/dist/runtime/daimon/training/native/worker/evidence/collect.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/evidence/execution.d.ts +0 -102
- package/dist/runtime/daimon/training/native/worker/evidence/execution.js +0 -191
- package/dist/runtime/daimon/training/native/worker/evidence/execution.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/evidence/index.d.ts +0 -3
- package/dist/runtime/daimon/training/native/worker/evidence/index.js +0 -4
- package/dist/runtime/daimon/training/native/worker/evidence/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/evidence/io.d.ts +0 -20
- package/dist/runtime/daimon/training/native/worker/evidence/io.js +0 -130
- package/dist/runtime/daimon/training/native/worker/evidence/io.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/evidence/seal.d.ts +0 -3
- package/dist/runtime/daimon/training/native/worker/evidence/seal.js +0 -67
- package/dist/runtime/daimon/training/native/worker/evidence/seal.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/index.d.ts +0 -11
- package/dist/runtime/daimon/training/native/worker/index.js +0 -8
- package/dist/runtime/daimon/training/native/worker/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/profile.d.ts +0 -23
- package/dist/runtime/daimon/training/native/worker/profile.js +0 -149
- package/dist/runtime/daimon/training/native/worker/profile.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/public.d.ts +0 -53
- package/dist/runtime/daimon/training/native/worker/public.js +0 -22
- package/dist/runtime/daimon/training/native/worker/public.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/sandbox.d.ts +0 -4
- package/dist/runtime/daimon/training/native/worker/sandbox.js +0 -54
- package/dist/runtime/daimon/training/native/worker/sandbox.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/server.d.ts +0 -4
- package/dist/runtime/daimon/training/native/worker/server.js +0 -102
- package/dist/runtime/daimon/training/native/worker/server.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/types.d.ts +0 -318
- package/dist/runtime/daimon/training/native/worker/types.js +0 -2
- package/dist/runtime/daimon/training/native/worker/types.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/wake-delivery/index.d.ts +0 -4
- package/dist/runtime/daimon/training/native/worker/wake-delivery/index.js +0 -4
- package/dist/runtime/daimon/training/native/worker/wake-delivery/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/wake-delivery/source.d.ts +0 -3
- package/dist/runtime/daimon/training/native/worker/wake-delivery/source.js +0 -16
- package/dist/runtime/daimon/training/native/worker/wake-delivery/source.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/wake-delivery/terminal.d.ts +0 -4
- package/dist/runtime/daimon/training/native/worker/wake-delivery/terminal.js +0 -52
- package/dist/runtime/daimon/training/native/worker/wake-delivery/terminal.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/wake-delivery/transport.d.ts +0 -21
- package/dist/runtime/daimon/training/native/worker/wake-delivery/transport.js +0 -198
- package/dist/runtime/daimon/training/native/worker/wake-delivery/transport.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/wake-delivery/types.d.ts +0 -91
- package/dist/runtime/daimon/training/native/worker/wake-delivery/types.js +0 -2
- package/dist/runtime/daimon/training/native/worker/wake-delivery/types.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/worker.d.ts +0 -1
- package/dist/runtime/daimon/training/native/worker/worker.js +0 -105
- package/dist/runtime/daimon/training/native/worker/worker.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-broker/broker.d.ts +0 -20
- package/dist/runtime/daimon/training/providers/grok-broker/broker.js +0 -55
- package/dist/runtime/daimon/training/providers/grok-broker/broker.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-broker/grant-fixtures.d.ts +0 -15
- package/dist/runtime/daimon/training/providers/grok-broker/grant-fixtures.js +0 -29
- package/dist/runtime/daimon/training/providers/grok-broker/grant-fixtures.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-broker/grant-home.d.ts +0 -16
- package/dist/runtime/daimon/training/providers/grok-broker/grant-home.js +0 -60
- package/dist/runtime/daimon/training/providers/grok-broker/grant-home.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-broker/grant-pool.d.ts +0 -81
- package/dist/runtime/daimon/training/providers/grok-broker/grant-pool.js +0 -221
- package/dist/runtime/daimon/training/providers/grok-broker/grant-pool.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-broker/grant-releases.d.ts +0 -31
- package/dist/runtime/daimon/training/providers/grok-broker/grant-releases.js +0 -78
- package/dist/runtime/daimon/training/providers/grok-broker/grant-releases.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-broker/grants.d.ts +0 -63
- package/dist/runtime/daimon/training/providers/grok-broker/grants.js +0 -20
- package/dist/runtime/daimon/training/providers/grok-broker/grants.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-broker/index.d.ts +0 -3
- package/dist/runtime/daimon/training/providers/grok-broker/index.js +0 -4
- package/dist/runtime/daimon/training/providers/grok-broker/index.js.map +0 -1
- package/dist/runtime/daimon/training/public.d.ts +0 -6
- package/dist/runtime/daimon/training/public.js +0 -5
- package/dist/runtime/daimon/training/public.js.map +0 -1
- package/dist/runtime/daimon/training/services/account-lease.d.ts +0 -7
- package/dist/runtime/daimon/training/services/account-lease.js +0 -76
- package/dist/runtime/daimon/training/services/account-lease.js.map +0 -1
- package/dist/runtime/daimon/training/services/freshness.d.ts +0 -15
- package/dist/runtime/daimon/training/services/freshness.js +0 -19
- package/dist/runtime/daimon/training/services/freshness.js.map +0 -1
- package/dist/runtime/daimon/training/services/index.d.ts +0 -4
- package/dist/runtime/daimon/training/services/index.js +0 -4
- package/dist/runtime/daimon/training/services/index.js.map +0 -1
- package/dist/runtime/daimon/training/services/slot-freshness.d.ts +0 -34
- package/dist/runtime/daimon/training/services/slot-freshness.js +0 -178
- package/dist/runtime/daimon/training/services/slot-freshness.js.map +0 -1
- package/dist/runtime/daimon/wakeMoments.js.map +0 -1
- package/dist/runtime/pi/adapter.d.ts +0 -3
- package/dist/runtime/pi/adapter.js +0 -230
- package/dist/runtime/pi/appActivitySource.d.ts +0 -1
- package/dist/runtime/pi/appActivitySource.js +0 -199
- package/dist/runtime/pi/appAgentConfig.d.ts +0 -11
- package/dist/runtime/pi/appAgentConfig.js +0 -264
- package/dist/runtime/pi/appCliEnginesSource.d.ts +0 -1
- package/dist/runtime/pi/appCliEnginesSource.js +0 -183
- package/dist/runtime/pi/appCliSource.d.ts +0 -1
- package/dist/runtime/pi/appCliSource.js +0 -353
- package/dist/runtime/pi/appControlSource.d.ts +0 -1
- package/dist/runtime/pi/appControlSource.js +0 -390
- package/dist/runtime/pi/appControlWakeIdentitySource.d.ts +0 -1
- package/dist/runtime/pi/appControlWakeIdentitySource.js +0 -19
- package/dist/runtime/pi/appCoreSource.d.ts +0 -4
- package/dist/runtime/pi/appCoreSource.js +0 -244
- package/dist/runtime/pi/appPreludeSource.d.ts +0 -1
- package/dist/runtime/pi/appPreludeSource.js +0 -192
- package/dist/runtime/pi/appScheduleSource.d.ts +0 -1
- package/dist/runtime/pi/appScheduleSource.js +0 -84
- package/dist/runtime/pi/appScriptedEngine.d.ts +0 -31
- package/dist/runtime/pi/appScriptedEngine.js +0 -42
- package/dist/runtime/pi/appSource.d.ts +0 -4
- package/dist/runtime/pi/appSource.js +0 -12
- package/dist/runtime/pi/appTemplate.d.ts +0 -14
- package/dist/runtime/pi/appTemplate.js +0 -28
- package/dist/runtime/pi/appTemplateTypes.d.ts +0 -64
- package/dist/runtime/pi/appTemplateTypes.js +0 -18
- package/dist/runtime/pi/appWakeContextSource.d.ts +0 -1
- package/dist/runtime/pi/appWakeContextSource.js +0 -398
- package/dist/runtime/pi/containerTargets.d.ts +0 -4
- package/dist/runtime/pi/containerTargets.js +0 -63
- package/dist/runtime/pi/runAuth.d.ts +0 -2
- package/dist/runtime/pi/runAuth.js +0 -185
- package/dist/runtime/pi/testHelpers.d.ts +0 -2
- package/dist/shared/errors.js.map +0 -1
- package/dist/training/subjects/environment.d.ts +0 -2
- package/dist/training/subjects/environment.js +0 -14
- package/dist/training/subjects/environment.js.map +0 -1
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/index.d.ts +0 -0
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/index.js +0 -0
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/protocol.d.ts +0 -0
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/protocol.js +0 -0
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/provider.d.ts +0 -0
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/provider.js +0 -0
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/strict-schema.d.ts +0 -0
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/strict-schema.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DAIMON_SECRET_SERVICE_ENGINE_ID, getDaimonEngineDescriptor } from "../runtime/daimon/index.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { DAIMON_RUNTIME_ACCEPTANCE_STORE_MOUNT_ID, DAIMON_WAKE_FUSE_DIRECTORY } from "../runtime/daimon/config.js";
|
|
4
4
|
import { DAIMON_GROK_TURN_USAGE_LEDGER } from "../runtime/daimon/contractManifest.js";
|
|
@@ -9,37 +9,13 @@ import { renderDaimonOwnershipProgram, resolveDaimonVolumeIdentityFiles } from "
|
|
|
9
9
|
export { resolveDaimonVolumeIdentityFiles } from "./containerDaimonOwnershipGuardRender.js";
|
|
10
10
|
import { renderDaimonGrokHostPreflight } from "./containerDaimonGrokWorkerProvisioning.js";
|
|
11
11
|
import { DAIMON_BROKER_EXECUTABLE, DAIMON_BROKER_BACKEND_SOCKET, DAIMON_BROKER_LAUNCHER_SOCKET, DAIMON_BROKER_REALM, DAIMON_BROKER_SOCKET, DAIMON_BROKER_TMPDIR, DAIMON_BROKER_UID, DAIMON_ORGANIZATION_UID, renderDaimonBrokerProvisioning, renderDaimonUsageLedgerProvisioning, resolveDaimonGrokRegistrations } from "./containerDaimonBrokerRender.js";
|
|
12
|
+
import { renderDaimonStartupSupervision } from "./containerDaimonStartupSupervision.js";
|
|
13
|
+
import { DAIMON_GATEWAY_UID, renderDaimonGatewayLaunch, renderDaimonGatewayProvisioning, renderDaimonGatewayRuntimeEnv, resolveDaimonGatewayRealmPaths } from "./containerDaimonGatewayRender.js";
|
|
14
|
+
export { DAIMON_BROKER_STARTUP_TIMEOUT_SECONDS, renderDaimonBrokerSocketWait } from "./containerDaimonStartupSupervision.js";
|
|
12
15
|
export const DAIMON_AUTHORIZED_UID_ENV = "SPAWNFILE_DAIMON_AUTHORIZED_UID";
|
|
13
16
|
export const DAIMON_RUNTIME_UID = DAIMON_ORGANIZATION_UID;
|
|
14
17
|
export const DAIMON_UID_ENTRYPOINT_PATH = "/opt/spawnfile/daimon-uid-entrypoint.sh";
|
|
15
18
|
export const DAIMON_RUNTIME_HOMES_DIRECTORY = "runtime-homes";
|
|
16
|
-
export const DAIMON_BROKER_STARTUP_TIMEOUT_SECONDS = 60;
|
|
17
|
-
export const renderDaimonBrokerSocketWait = (timeoutSeconds = DAIMON_BROKER_STARTUP_TIMEOUT_SECONDS, pollSeconds = 0.1) => [
|
|
18
|
-
`broker_startup_timeout_seconds=${timeoutSeconds}`,
|
|
19
|
-
`broker_startup_poll_seconds=${pollSeconds}`,
|
|
20
|
-
"broker_startup_started=$SECONDS",
|
|
21
|
-
"broker_process_status_root=/proc",
|
|
22
|
-
"wait_for_broker_socket() {",
|
|
23
|
-
" socket=$1; child=$2; label=$3",
|
|
24
|
-
" while [ ! -S \"$socket\" ]; do",
|
|
25
|
-
" if ! kill -0 \"$child\" 2>/dev/null; then set +e; wait \"$child\"; child_status=$?; set -e; echo \"$label exited before readiness (status $child_status)\" >&2; return 1; fi",
|
|
26
|
-
" if [ $((SECONDS - broker_startup_started)) -ge \"$broker_startup_timeout_seconds\" ]; then echo \"$label readiness timed out after ${broker_startup_timeout_seconds}s\" >&2; return 1; fi",
|
|
27
|
-
" sleep \"$broker_startup_poll_seconds\"",
|
|
28
|
-
" done",
|
|
29
|
-
"}",
|
|
30
|
-
"wait_for_broker_identity() {",
|
|
31
|
-
" child=$1; expected_uid=$2; expected_caps=$3; label=$4",
|
|
32
|
-
" while kill -0 \"$child\" 2>/dev/null; do",
|
|
33
|
-
" status_path=$broker_process_status_root/$child/status",
|
|
34
|
-
" observed_uid=$(awk '/^Uid:/{print $2}' \"$status_path\" 2>/dev/null || true)",
|
|
35
|
-
" observed_caps=$(awk '/^CapBnd:/{print $2}' \"$status_path\" 2>/dev/null || true)",
|
|
36
|
-
" if [ \"$observed_uid\" = \"$expected_uid\" ] && [ \"$observed_caps\" = \"$expected_caps\" ]; then return 0; fi",
|
|
37
|
-
" if [ $((SECONDS - broker_startup_started)) -ge \"$broker_startup_timeout_seconds\" ]; then echo \"$label identity readiness timed out after ${broker_startup_timeout_seconds}s\" >&2; return 1; fi",
|
|
38
|
-
" sleep \"$broker_startup_poll_seconds\"",
|
|
39
|
-
" done",
|
|
40
|
-
" set +e; wait \"$child\"; child_status=$?; set -e; echo \"$label exited before identity readiness (status $child_status)\" >&2; return 1",
|
|
41
|
-
"}"
|
|
42
|
-
];
|
|
43
19
|
const SPAWNFILE_PRIVATE_STATE_ROOT = "/var/lib/spawnfile";
|
|
44
20
|
/**
|
|
45
21
|
* `/var/lib/spawnfile/daimon` hosts several independently-owned children —
|
|
@@ -96,7 +72,8 @@ const writableStateRoots = (runtimePlans, persistentMountPaths) => [
|
|
|
96
72
|
].filter((root) => root.startsWith("/")
|
|
97
73
|
&& root !== DAIMON_BROKER_REALM
|
|
98
74
|
&& root !== DAIMON_GROK_TURN_USAGE_LEDGER.directoryPath
|
|
99
|
-
&& root !== DAIMON_WAKE_FUSE_DIRECTORY
|
|
75
|
+
&& root !== DAIMON_WAKE_FUSE_DIRECTORY
|
|
76
|
+
&& !resolveDaimonGatewayRealmPaths(runtimePlans).includes(root)).sort();
|
|
100
77
|
const privateDirectoriesThrough = (target) => {
|
|
101
78
|
if (target !== SPAWNFILE_PRIVATE_STATE_ROOT &&
|
|
102
79
|
!target.startsWith(`${SPAWNFILE_PRIVATE_STATE_ROOT}/`))
|
|
@@ -114,8 +91,6 @@ const privateModeDirectories = (runtimePlans, moltnet) => [
|
|
|
114
91
|
.flatMap((plan) => plan.persistentMounts ?? [])
|
|
115
92
|
.filter((mount) => mount.id === DAIMON_RUNTIME_ACCEPTANCE_STORE_MOUNT_ID
|
|
116
93
|
|| mount.id === DAIMON_AGY_SUBSCRIPTION_REALM_MOUNT_ID
|
|
117
|
-
|| Object.values(DAIMON_ENGINE_DESCRIPTORS).some(({ id, auth }) => auth.staging === "portable-realm"
|
|
118
|
-
&& mount.id === `daimon-${id}-subscription-realm` && mount.mount_path === auth.realm.durableMountPath)
|
|
119
94
|
|| mount.id.startsWith(DAIMON_AGY_RUNTIME_HOME_MOUNT_ID_PREFIX)
|
|
120
95
|
|| mount.id.startsWith(DAIMON_RECORDING_MOUNT_ID_PREFIX)
|
|
121
96
|
|| mount.id.startsWith(DAIMON_PORTABLE_ENGINE_HOME_MOUNT_ID_PREFIX))
|
|
@@ -206,6 +181,9 @@ export const renderDaimonUidEntrypoint = (runtimePlans, persistentMountPaths = [
|
|
|
206
181
|
.filter((runtimeRoot) => runtimeRoot.startsWith("/opt/spawnfile/runtime-installs/")))
|
|
207
182
|
].sort();
|
|
208
183
|
const volumeIdentityFiles = resolveDaimonVolumeIdentityFiles(runtimePlans);
|
|
184
|
+
const grokRegistrations = resolveDaimonGrokRegistrations(runtimePlans);
|
|
185
|
+
const gateway = resolveDaimonGatewayRealmPaths(runtimePlans).length > 0;
|
|
186
|
+
const gatewayPid = gateway ? '"${gateway_pid:-}" ' : "";
|
|
209
187
|
return [
|
|
210
188
|
"#!/usr/bin/env bash",
|
|
211
189
|
"set -euo pipefail",
|
|
@@ -222,13 +200,15 @@ export const renderDaimonUidEntrypoint = (runtimePlans, persistentMountPaths = [
|
|
|
222
200
|
...createBackedMountGuard(persistentMounts),
|
|
223
201
|
`state_roots=(${ownershipPlan.stateRoots.map(quote).join(" ")})`,
|
|
224
202
|
"node - \"$uid\" \"${state_roots[@]}\" <<'SPAWNFILE_DAIMON_OWNERSHIP'",
|
|
225
|
-
renderDaimonOwnershipProgram(opaqueTargets, ownershipPlan.opaqueDescendantRoots, immutableRuntimeRoots, volumeIdentityFiles, ownershipPlan.privateDirectories, ownershipPlan.privateFiles, ownershipPlan.privateModeDirectories, ownershipPlan.creatablePrivateDirectories,
|
|
203
|
+
renderDaimonOwnershipProgram(opaqueTargets, ownershipPlan.opaqueDescendantRoots, immutableRuntimeRoots, volumeIdentityFiles, ownershipPlan.privateDirectories, ownershipPlan.privateFiles, ownershipPlan.privateModeDirectories, ownershipPlan.creatablePrivateDirectories, grokRegistrations.length > 0),
|
|
226
204
|
"SPAWNFILE_DAIMON_OWNERSHIP",
|
|
227
|
-
`for fixed_uid in ${DAIMON_ORGANIZATION_UID} ${DAIMON_BROKER_UID} ${
|
|
205
|
+
`for fixed_uid in ${DAIMON_ORGANIZATION_UID} ${DAIMON_BROKER_UID}${gateway ? ` ${DAIMON_GATEWAY_UID}` : ""} ${grokRegistrations.map((entry) => entry.uid).join(" ")}; do`,
|
|
228
206
|
' if ! getent group "$fixed_uid" >/dev/null; then groupadd -K GID_MIN=1 --gid "$fixed_uid" "daimon-$fixed_uid"; fi',
|
|
229
207
|
' if ! getent passwd "$fixed_uid" >/dev/null; then useradd -K UID_MIN=1 --no-create-home --no-log-init --uid "$fixed_uid" --gid "$fixed_uid" --home-dir /nonexistent --shell /usr/sbin/nologin "daimon-$fixed_uid"; fi',
|
|
230
208
|
"done",
|
|
231
|
-
...(
|
|
209
|
+
...(grokRegistrations.length === 0 ? [] : renderDaimonGrokHostPreflight()),
|
|
210
|
+
// Before broker provisioning: a Grok worker's deny list masks the gateway's paths, which must exist.
|
|
211
|
+
...renderDaimonGatewayProvisioning(runtimePlans),
|
|
232
212
|
...renderDaimonBrokerProvisioning(runtimePlans),
|
|
233
213
|
'if ! getent passwd "$uid" >/dev/null; then',
|
|
234
214
|
' runtime_identity="daimon-$uid"',
|
|
@@ -242,23 +222,21 @@ export const renderDaimonUidEntrypoint = (runtimePlans, persistentMountPaths = [
|
|
|
242
222
|
// organization-uid runtime process below, not the (Grok-only) broker, so
|
|
243
223
|
// this cannot be gated on `resolveDaimonGrokRegistrations`.
|
|
244
224
|
...renderDaimonUsageLedgerProvisioning(),
|
|
245
|
-
...(
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
"trap cleanup_broker_startup EXIT",
|
|
250
|
-
"trap 'exit 143' TERM INT HUP",
|
|
225
|
+
...(grokRegistrations.length === 0 && !gateway ? [] : renderDaimonStartupSupervision()),
|
|
226
|
+
// The gateway starts first: the broker's readiness probes it for its Grok key.
|
|
227
|
+
...renderDaimonGatewayLaunch(runtimePlans, daimonPlan?.runtimeRoot ?? ""),
|
|
228
|
+
...(grokRegistrations.length === 0 ? [] : [
|
|
251
229
|
`install -d -o ${DAIMON_BROKER_UID} -g ${DAIMON_BROKER_UID} -m 0700 ${quote(DAIMON_BROKER_REALM)}`,
|
|
252
230
|
`if [ -e ${quote(`${DAIMON_BROKER_REALM}/auth.json`)} ]; then test -f ${quote(`${DAIMON_BROKER_REALM}/auth.json`)} && test ! -L ${quote(`${DAIMON_BROKER_REALM}/auth.json`)}; chown 0:0 ${quote(`${DAIMON_BROKER_REALM}/auth.json`)}; chmod 0600 ${quote(`${DAIMON_BROKER_REALM}/auth.json`)}; chown ${DAIMON_BROKER_UID}:${DAIMON_BROKER_UID} ${quote(`${DAIMON_BROKER_REALM}/auth.json`)}; fi`,
|
|
253
231
|
`setpriv --clear-groups --reuid ${DAIMON_BROKER_UID} --regid ${DAIMON_BROKER_UID} --inh-caps=-all --ambient-caps=-all --bounding-set=-all -- bash -ceu 'probe=${DAIMON_BROKER_REALM}/.daimon-ancestry-probe; umask 077; : > "$probe"; rm "$probe"'`,
|
|
254
232
|
`setpriv --clear-groups --reuid ${DAIMON_ORGANIZATION_UID} --regid ${DAIMON_ORGANIZATION_UID} --inh-caps=-all --ambient-caps=-all --bounding-set=-all -- bash -ceu '! test -r ${DAIMON_BROKER_REALM}'`,
|
|
255
|
-
...
|
|
233
|
+
...grokRegistrations.map((entry) => `setpriv --clear-groups --reuid ${entry.uid} --regid ${entry.uid} --inh-caps=-all --ambient-caps=-all --bounding-set=-all -- bash -ceu '! test -r ${DAIMON_BROKER_REALM}'`),
|
|
256
234
|
`setpriv --inh-caps=-all --ambient-caps=-all --bounding-set=-all,+chown,+setuid,+setgid -- ${quote(DAIMON_BROKER_EXECUTABLE)} &`,
|
|
257
235
|
"launcher_pid=$!",
|
|
258
236
|
"startup_children+=(\"$launcher_pid\")",
|
|
259
237
|
`wait_for_broker_socket ${quote(DAIMON_BROKER_LAUNCHER_SOCKET)} "$launcher_pid" "engine broker launcher"`,
|
|
260
238
|
`wait_for_broker_identity "$launcher_pid" 0 00000000000000c1 "engine broker launcher"`,
|
|
261
|
-
`setpriv --clear-groups --reuid ${DAIMON_BROKER_UID} --regid ${DAIMON_BROKER_UID} --inh-caps=-all --ambient-caps=-all --bounding-set=-all -- env TMPDIR=${quote(DAIMON_BROKER_TMPDIR)} ${quote(path.posix.join(daimonPlan?.runtimeRoot ?? "", "bin/daimon-runtime"))} engine-broker serve &`,
|
|
239
|
+
`setpriv --clear-groups --reuid ${DAIMON_BROKER_UID} --regid ${DAIMON_BROKER_UID} --inh-caps=-all --ambient-caps=-all --bounding-set=-all -- env TMPDIR=${quote(DAIMON_BROKER_TMPDIR)} ${renderDaimonGatewayRuntimeEnv(runtimePlans)}${quote(path.posix.join(daimonPlan?.runtimeRoot ?? "", "bin/daimon-runtime"))} engine-broker serve &`,
|
|
262
240
|
"broker_pid=$!",
|
|
263
241
|
"startup_children+=(\"$broker_pid\")",
|
|
264
242
|
`wait_for_broker_socket ${quote(DAIMON_BROKER_BACKEND_SOCKET)} "$broker_pid" "engine broker backend"`,
|
|
@@ -271,7 +249,7 @@ export const renderDaimonUidEntrypoint = (runtimePlans, persistentMountPaths = [
|
|
|
271
249
|
`[ -S ${quote(DAIMON_BROKER_SOCKET)} ] || exit 1`,
|
|
272
250
|
"for child_spec in \"$launcher_pid:0:00000000000000c1\" \"$relay_pid:2100:0000000000000000\" \"$broker_pid:2100:0000000000000000\"; do child=${child_spec%%:*}; rest=${child_spec#*:}; expected_uid=${rest%%:*}; expected_caps=${rest##*:}; observed_uid=$(awk '/^Uid:/{print $2}' \"/proc/$child/status\"); cap_bnd=$(awk '/^CapBnd:/{print $2}' \"/proc/$child/status\"); [ \"$observed_uid\" = \"$expected_uid\" ] && [ \"$cap_bnd\" = \"$expected_caps\" ] || exit 1; done"
|
|
273
251
|
]),
|
|
274
|
-
|
|
252
|
+
`${renderDaimonGatewayRuntimeEnv(runtimePlans)}setpriv --clear-groups --reuid "$uid" --regid "$gid" --inh-caps=-all --ambient-caps=-all --bounding-set=-all -- bash -ceu '`,
|
|
275
253
|
" if [ \"$EUID\" -eq 0 ]; then exit 1; fi",
|
|
276
254
|
" test \"$(sed -n \"s/^CapEff:[[:space:]]*//p\" /proc/self/status)\" = 0000000000000000",
|
|
277
255
|
" exec \"$@\"",
|
|
@@ -279,15 +257,17 @@ export const renderDaimonUidEntrypoint = (runtimePlans, persistentMountPaths = [
|
|
|
279
257
|
"runtime_pid=$!",
|
|
280
258
|
"trap - EXIT TERM INT HUP",
|
|
281
259
|
"stopping=0",
|
|
282
|
-
|
|
260
|
+
`stop_children() { stopping=1; kill -TERM "$runtime_pid" 2>/dev/null || true; for child in ${gatewayPid}"\${relay_pid:-}" "\${broker_pid:-}" "\${launcher_pid:-}"; do [ -z "$child" ] || kill -TERM "$child" 2>/dev/null || true; done; }`,
|
|
283
261
|
"trap stop_children TERM INT HUP",
|
|
284
262
|
'watch_pids=("$runtime_pid")',
|
|
285
|
-
...(
|
|
263
|
+
...(grokRegistrations.length === 0 ? [] : ['watch_pids+=("$relay_pid" "$broker_pid" "$launcher_pid")']),
|
|
264
|
+
// An external gateway (training sidecar) leaves no local gateway to watch.
|
|
265
|
+
...(gateway ? ['[ -z "${gateway_pid:-}" ] || watch_pids+=("$gateway_pid")'] : []),
|
|
286
266
|
"finished_pid=",
|
|
287
267
|
'set +e; wait -n -p finished_pid "${watch_pids[@]}"; status=$?; set -e',
|
|
288
268
|
'if [ "${finished_pid:-}" != "$runtime_pid" ]; then status=1; fi',
|
|
289
269
|
'kill -TERM "$runtime_pid" 2>/dev/null || true',
|
|
290
|
-
|
|
270
|
+
`for child in "\${relay_pid:-}" "\${broker_pid:-}" "\${launcher_pid:-}"${gatewayPid ? ` ${gatewayPid.trim()}` : ""}; do [ -z "$child" ] || { kill -TERM "$child" 2>/dev/null || true; wait "$child" 2>/dev/null || true; }; done`,
|
|
291
271
|
'wait "$runtime_pid" 2>/dev/null || true',
|
|
292
272
|
"exit \"$status\""
|
|
293
273
|
].join("\n") + "\n";
|
|
@@ -6,7 +6,6 @@ const createMountId = (mountPath) => `memory-${safeSlug(mountPath)}`;
|
|
|
6
6
|
const isFileBackedMemoryStore = (bank) => bank.store.kind === "sqlite" || bank.store.kind === "json";
|
|
7
7
|
const transportFromRuntime = (runtimeName, bank) => {
|
|
8
8
|
switch (runtimeName) {
|
|
9
|
-
case "pi":
|
|
10
9
|
case "daimon":
|
|
11
10
|
// Mneme runs in-process for these runtimes (no MCP subprocess), but
|
|
12
11
|
// whether that in-process runtime is reachable -- and whether it
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveNoopolisRunId } from "../runtime/index.js";
|
|
2
2
|
import { createExclusiveReattachVolumeName, SpawnfileError } from "../shared/index.js";
|
|
3
|
-
import { createMoltnetCausalDirectory, createMoltnetDaimonReceiptStorePath, createMoltnetNetworkStateDirectory, createMoltnetServerConfigPath, createMoltnetOpenTokenDirectory, createMoltnetNativeServerConfig, createMoltnetNodeConfigPath,
|
|
3
|
+
import { createMoltnetCausalDirectory, createMoltnetDaimonReceiptStorePath, createMoltnetNetworkStateDirectory, createMoltnetServerConfigPath, createMoltnetOpenTokenDirectory, createMoltnetNativeServerConfig, createMoltnetNodeConfigPath, resolveMoltnetStorePersistenceMountPath } from "./moltnetConfigLowering.js";
|
|
4
4
|
import { assertNetworkBindingEnvUniqueness } from "./networkBinding.js";
|
|
5
5
|
import { createMoltnetNodeConfigContent } from "./moltnetNodeConfig.js";
|
|
6
6
|
import { createPersistentVolumeName, isNetworkHttpEnabled, toContainerRootfsPath } from "./moltnetArtifactPaths.js";
|
|
@@ -152,22 +152,6 @@ export const generateMoltnetArtifacts = async (plan, deploymentLineage = "compil
|
|
|
152
152
|
throw new SpawnfileError("validation_error", `Duplicate Moltnet node attachment for ${attachment.network}/${attachment.memberId}`);
|
|
153
153
|
}
|
|
154
154
|
nodePlanKeys.add(nodePlanKey);
|
|
155
|
-
if (agentNode.runtime.name === "pi") {
|
|
156
|
-
const clientAuth = resolveMoltnetClientAuth(serverPlan.server, attachment.network, attachment.memberId, node.slug, attachment.auth?.tokenId);
|
|
157
|
-
const usesPerAttachmentOpenToken = clientAuth.mode === "open" &&
|
|
158
|
-
clientAuth.staticToken !== true &&
|
|
159
|
-
Boolean(clientAuth.tokenEnv || clientAuth.tokenPath);
|
|
160
|
-
if (usesPerAttachmentOpenToken && clientAuth.tokenPath) {
|
|
161
|
-
const mountId = `agent-${node.slug}-moltnet-tokens`;
|
|
162
|
-
addPersistentMount({
|
|
163
|
-
id: mountId,
|
|
164
|
-
lifecycle: "exclusive-reattach",
|
|
165
|
-
mountPath: createMoltnetOpenTokenDirectory(node.slug),
|
|
166
|
-
reason: `Moltnet open-mode generated agent tokens for ${agentNode.name}`,
|
|
167
|
-
volumeName: durableVolumeName(mountId)
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
155
|
const nodeConfig = createMoltnetNodeConfigContent({
|
|
172
156
|
agentNode,
|
|
173
157
|
attachment: { ...attachment, memberId: attachment.memberId },
|
|
@@ -68,7 +68,7 @@ const createAttachmentConfig = (node, artifacts, attachment, agentSlug) => {
|
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
70
|
export const resolveMoltnetWorkspaceLayout = (runtimeName, _agentName) => {
|
|
71
|
-
if (runtimeName === "daimon"
|
|
71
|
+
if (runtimeName === "daimon") {
|
|
72
72
|
return {
|
|
73
73
|
clientConfigPath: `workspace/.moltnet/config.json`,
|
|
74
74
|
cliRuntime: "codex",
|
|
@@ -72,16 +72,6 @@ export const resolveRuntimeConfig = (plan, agentNode, nodeSlug, networkId, moltn
|
|
|
72
72
|
token_env: "SPAWNFILE_DAIMON_CONTROL_TOKEN"
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
case "pi": {
|
|
76
|
-
const port = getRuntimeAdapter(agentNode.runtime.name).container.port;
|
|
77
|
-
if (!port) {
|
|
78
|
-
throw new SpawnfileError("compile_error", `Unable to resolve ${agentNode.runtime.name} control port for Moltnet agent ${agentNode.name}`);
|
|
79
|
-
}
|
|
80
|
-
return {
|
|
81
|
-
control_url: `http://127.0.0.1:${port}/agents/${nodeSlug}/wake`,
|
|
82
|
-
kind: "pi"
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
75
|
default:
|
|
86
76
|
throw new SpawnfileError("compile_error", `Moltnet does not know how to attach runtime ${agentNode.runtime.name} directly`);
|
|
87
77
|
}
|
|
@@ -38,6 +38,7 @@ export declare const createDockerRunInvocation: (compileResult: CompileProjectRe
|
|
|
38
38
|
dockerContext?: string;
|
|
39
39
|
dockerHost?: string;
|
|
40
40
|
envFilePath?: string;
|
|
41
|
+
network?: string;
|
|
41
42
|
}) => Promise<DockerRunInvocation>;
|
|
42
43
|
interface ResolvedRunDeploymentOptions {
|
|
43
44
|
previousRecord?: DeploymentRecord;
|
|
@@ -6,6 +6,7 @@ import { ensureDirectory, fileExists, removeDirectory, writeUtf8File } from "../
|
|
|
6
6
|
import { appendDockerLabelArgs, createDockerDeploymentLabels, createDockerDeploymentUnitId, createDockerProjectLabel, dockerContextNameForTarget, dockerHostValueForTarget, normalizeDeploymentName, readDeploymentRecordFromOutput, resolveDeploymentRecordPath, verifyDockerDeploymentTarget, writeDockerDeploymentRecordForRun } from "../deployment/index.js";
|
|
7
7
|
import { DAIMON_DOCKER_RUNTIME_SECURITY_ARGS, DEFAULT_OUTPUT_DIRECTORY, SpawnfileError } from "../shared/index.js";
|
|
8
8
|
import { ensureNoopolisRunId, resolveNoopolisRunId } from "../runtime/index.js";
|
|
9
|
+
import { DAIMON_GATEWAY_URL_ENV, isDaimonGatewayRealmMountId } from "../runtime/daimon/index.js";
|
|
9
10
|
import { compileProject } from "./compileProject.js";
|
|
10
11
|
import { createDefaultImageTag, resolveDockerBuildArchitecture } from "./buildProject.js";
|
|
11
12
|
import { slugify } from "./helpers.js";
|
|
@@ -62,6 +63,8 @@ export const createDockerRunInvocation = async (compileResult, imageTag, options
|
|
|
62
63
|
args.push("--rm");
|
|
63
64
|
}
|
|
64
65
|
args.push("--name", containerName);
|
|
66
|
+
if (options.network)
|
|
67
|
+
args.push("--network", options.network);
|
|
65
68
|
if (hasDaimon) {
|
|
66
69
|
args.push(...DAIMON_DOCKER_RUNTIME_SECURITY_ARGS, ...(await resolveDaimonCodexNativeSandboxDockerSecurityOptions(compileResult)));
|
|
67
70
|
}
|
|
@@ -80,7 +83,10 @@ export const createDockerRunInvocation = async (compileResult, imageTag, options
|
|
|
80
83
|
// reattached volume that already holds state is untouched by dropping it.
|
|
81
84
|
// (Target/secrets volumes under src/target/* keep `volume-nocopy`: no
|
|
82
85
|
// image content backs those paths and they must stay opaque.)
|
|
83
|
-
|
|
86
|
+
// An external auth gateway in the run env holds every gatewayed realm; the org mounts none.
|
|
87
|
+
const persistentMounts = (containerReport.persistent_mounts ?? [])
|
|
88
|
+
.filter((mount) => !env[DAIMON_GATEWAY_URL_ENV] || !isDaimonGatewayRealmMountId(mount.id));
|
|
89
|
+
for (const mount of persistentMounts) {
|
|
84
90
|
args.push("--mount", `type=volume,source=${mount.volume_name},target=${mount.mount_path}`);
|
|
85
91
|
}
|
|
86
92
|
const deploymentLabels = options.detach && deploymentName ? (() => {
|
|
@@ -109,8 +115,8 @@ export const createDockerRunInvocation = async (compileResult, imageTag, options
|
|
|
109
115
|
dockerContext: options.dockerContext ?? null,
|
|
110
116
|
dockerHost: options.dockerHost ?? null,
|
|
111
117
|
envFilePath,
|
|
112
|
-
...(
|
|
113
|
-
exclusiveReattachVolumes:
|
|
118
|
+
...(persistentMounts.some((mount) => mount.lifecycle === "exclusive-reattach") ? {
|
|
119
|
+
exclusiveReattachVolumes: persistentMounts
|
|
114
120
|
.filter((mount) => mount.lifecycle === "exclusive-reattach")
|
|
115
121
|
.map((mount) => mount.volume_name)
|
|
116
122
|
.sort()
|
|
@@ -46,13 +46,7 @@ const addCoveredModelSecrets = (coveredModelSecrets, instanceId, secretNames) =>
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
export const prepareRuntimeAuthMounts = async (outputDirectory, containerReport, authProfile, env, tempRoot, containerCredentialUid) => {
|
|
49
|
-
//
|
|
50
|
-
// `prepareRuntimeAuth` may still have host-credential staging to do that
|
|
51
|
-
// does not depend on an imported Spawnfile auth profile (e.g. the Pi
|
|
52
|
-
// adapter mounting the host's `~/.grok`/`~/.codex`/antigravity CLI homes
|
|
53
|
-
// for a real-engine org — see `src/runtime/pi/runAuth.ts`). Each adapter is
|
|
54
|
-
// responsible for treating a `null` `authProfile` as "no profile-derived
|
|
55
|
-
// imports available" rather than failing.
|
|
49
|
+
// Adapters receive null profiles so they can handle runtime-owned credentials.
|
|
56
50
|
const coveredModelSecrets = new Set();
|
|
57
51
|
let launchIdentity;
|
|
58
52
|
const mountArgs = [];
|
|
@@ -227,15 +221,6 @@ export const resolveAuthMountArgs = async (containerReport, authProfile) => {
|
|
|
227
221
|
return [];
|
|
228
222
|
}
|
|
229
223
|
const args = [];
|
|
230
|
-
// Pi owns its model and CLI-engine auth projection in preparePiRuntimeAuth.
|
|
231
|
-
// Mounting the generic imported home onto the same destination would create
|
|
232
|
-
// duplicate Docker mount points and bypass the adapter's minimal-file staging.
|
|
233
|
-
const piRuntimeHomes = new Set(containerReport.runtime_instances
|
|
234
|
-
.filter((instance) => instance.runtime === "pi")
|
|
235
|
-
.map((instance) => instance.home_path)
|
|
236
|
-
.filter((homePath) => homePath !== null));
|
|
237
|
-
const genericRuntimeHomes = containerReport.runtime_homes
|
|
238
|
-
.filter((runtimeHome) => !piRuntimeHomes.has(runtimeHome));
|
|
239
224
|
for (const [kind, entry] of Object.entries(authProfile.imports)) {
|
|
240
225
|
if (!entry) {
|
|
241
226
|
continue;
|
|
@@ -243,7 +228,7 @@ export const resolveAuthMountArgs = async (containerReport, authProfile) => {
|
|
|
243
228
|
if (!(await fileExists(entry.path))) {
|
|
244
229
|
throw new SpawnfileError("validation_error", `Imported auth path for ${kind} does not exist: ${entry.path}`);
|
|
245
230
|
}
|
|
246
|
-
for (const runtimeHome of
|
|
231
|
+
for (const runtimeHome of containerReport.runtime_homes) {
|
|
247
232
|
args.push("-v", `${entry.path}:${path.posix.join(runtimeHome, getImportMountTargetName(kind))}`);
|
|
248
233
|
}
|
|
249
234
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const TRAINING_CONTEXT_VERSION: "spawnfile.training-context.v1";
|
|
3
|
-
export declare const TRAINING_EXECUTION_CAPABILITY_LABEL = "com.spawnfile.training.execution";
|
|
4
|
-
export declare const TRAINING_EXECUTION_VERSION = "spawnfile.training-execution.v1";
|
|
5
3
|
export declare const trainingSourceSchema: z.ZodObject<{
|
|
6
4
|
sourcePath: z.ZodString;
|
|
7
5
|
destinationPath: z.ZodString;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export const TRAINING_CONTEXT_VERSION = "spawnfile.training-context.v1";
|
|
3
|
-
export const TRAINING_EXECUTION_CAPABILITY_LABEL = "com.spawnfile.training.execution";
|
|
4
|
-
export const TRAINING_EXECUTION_VERSION = "spawnfile.training-execution.v1";
|
|
5
3
|
const digest = z.string().regex(/^sha256:[a-f0-9]{64}$/u);
|
|
6
4
|
const absolutePath = z.string().min(1).regex(/^(?:\/|[A-Za-z]:[\\/])/u);
|
|
7
5
|
const relativePath = z.string().min(1).regex(/^(?!\/)(?!.*(?:^|\/)\.\.(?:\/|$))[^\\]+$/u);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { type TrainingPlan } from "./plan/contract.js";
|
|
3
3
|
import type { LoadedTrainingProject } from "./plan/types.js";
|
|
4
|
-
export declare const TRAINING_EXECUTION_FILE = "/run/spawnfile-training/execution.json";
|
|
5
|
-
export { TRAINING_EXECUTION_CAPABILITY_LABEL, TRAINING_EXECUTION_VERSION } from "./contract.js";
|
|
6
4
|
export declare const trainingExecutionSchema: z.ZodObject<{
|
|
7
5
|
version: z.ZodLiteral<"spawnfile.training-execution.v1">;
|
|
8
6
|
authoring: z.ZodObject<{
|
|
@@ -151,10 +149,8 @@ export interface LowerTrainingExecutionOptions {
|
|
|
151
149
|
project: LoadedTrainingProject;
|
|
152
150
|
plan: TrainingPlan;
|
|
153
151
|
args: readonly string[];
|
|
154
|
-
trainingConfig?: string;
|
|
155
|
-
trainingImage?: string;
|
|
156
152
|
}
|
|
157
|
-
/** Resolve
|
|
153
|
+
/** Resolve authoring defaults into training CLI arguments; no writes, auth reads or execution. */
|
|
158
154
|
export declare const lowerTrainingExecution: (options: LowerTrainingExecutionOptions) => Promise<{
|
|
159
155
|
execution: {
|
|
160
156
|
version: "spawnfile.training-execution.v1";
|
|
@@ -287,129 +283,6 @@ export declare const lowerTrainingExecution: (options: LowerTrainingExecutionOpt
|
|
|
287
283
|
args: string[];
|
|
288
284
|
output: string;
|
|
289
285
|
};
|
|
290
|
-
trainingConfig: string;
|
|
291
|
-
trainingImage: string | undefined;
|
|
292
|
-
declaration: {
|
|
293
|
-
version: "spawnfile.training-container.v1" | "spawnfile.training-container.v3" | "spawnfile.training-container.v4";
|
|
294
|
-
slots: number;
|
|
295
|
-
dockerContext: string;
|
|
296
|
-
inputs: {
|
|
297
|
-
source: string;
|
|
298
|
-
destination: string;
|
|
299
|
-
}[];
|
|
300
|
-
output: {
|
|
301
|
-
source: string;
|
|
302
|
-
destination: "/run/training/output";
|
|
303
|
-
};
|
|
304
|
-
auth: {
|
|
305
|
-
source: string;
|
|
306
|
-
provider: "codex" | "claude";
|
|
307
|
-
}[];
|
|
308
|
-
evaluatorRoutes?: {
|
|
309
|
-
purpose: "decisions" | "extraction" | "proposals";
|
|
310
|
-
provider: "codex-subscription" | "typesafe";
|
|
311
|
-
model: string;
|
|
312
|
-
maxRequests: number;
|
|
313
|
-
maxSpendUsd?: number | undefined;
|
|
314
|
-
}[] | undefined;
|
|
315
|
-
evaluatorSecrets?: {
|
|
316
|
-
provider: "typesafe";
|
|
317
|
-
source: string;
|
|
318
|
-
}[] | undefined;
|
|
319
|
-
subjectIsolation?: "codex-native-sandbox" | undefined;
|
|
320
|
-
broker?: {
|
|
321
|
-
engine: "grok";
|
|
322
|
-
realmVolume: string;
|
|
323
|
-
bootstrap: string;
|
|
324
|
-
declaration: string;
|
|
325
|
-
} | undefined;
|
|
326
|
-
} | {
|
|
327
|
-
version: "spawnfile.training-container.v3" | "spawnfile.training-container.v4" | "spawnfile.training-container.v2";
|
|
328
|
-
slots: number;
|
|
329
|
-
dockerContext: string;
|
|
330
|
-
image: {
|
|
331
|
-
ref: string;
|
|
332
|
-
} | {
|
|
333
|
-
build: {
|
|
334
|
-
recipe: "daimon-dspy.v1";
|
|
335
|
-
nativeImage: string;
|
|
336
|
-
pythonImage: string;
|
|
337
|
-
platform: "linux/amd64" | "linux/arm64";
|
|
338
|
-
claude: string;
|
|
339
|
-
integration: {
|
|
340
|
-
source: string;
|
|
341
|
-
entry: string;
|
|
342
|
-
execution?: "spawnfile.training-execution.v1" | undefined;
|
|
343
|
-
};
|
|
344
|
-
compiler?: string | undefined;
|
|
345
|
-
grok?: {
|
|
346
|
-
source: string;
|
|
347
|
-
sha256: string;
|
|
348
|
-
} | undefined;
|
|
349
|
-
bootstrap?: string | undefined;
|
|
350
|
-
};
|
|
351
|
-
};
|
|
352
|
-
integration: {
|
|
353
|
-
settings: {
|
|
354
|
-
input: string;
|
|
355
|
-
path: string;
|
|
356
|
-
};
|
|
357
|
-
};
|
|
358
|
-
inputs: {
|
|
359
|
-
id: string;
|
|
360
|
-
source: string;
|
|
361
|
-
destination: string;
|
|
362
|
-
include?: string[] | undefined;
|
|
363
|
-
git?: {
|
|
364
|
-
revision: string;
|
|
365
|
-
overlays: {
|
|
366
|
-
source: string;
|
|
367
|
-
path: string;
|
|
368
|
-
sha256: string;
|
|
369
|
-
}[];
|
|
370
|
-
} | undefined;
|
|
371
|
-
}[];
|
|
372
|
-
output: {
|
|
373
|
-
source: string;
|
|
374
|
-
destination: "/run/training/output";
|
|
375
|
-
};
|
|
376
|
-
auth: {
|
|
377
|
-
source: string;
|
|
378
|
-
provider: "codex" | "claude";
|
|
379
|
-
}[];
|
|
380
|
-
evaluatorRoutes?: {
|
|
381
|
-
purpose: "decisions" | "extraction" | "proposals";
|
|
382
|
-
provider: "codex-subscription" | "typesafe";
|
|
383
|
-
model: string;
|
|
384
|
-
maxRequests: number;
|
|
385
|
-
maxSpendUsd?: number | undefined;
|
|
386
|
-
}[] | undefined;
|
|
387
|
-
evaluatorSecrets?: {
|
|
388
|
-
provider: "typesafe";
|
|
389
|
-
source: string;
|
|
390
|
-
}[] | undefined;
|
|
391
|
-
subjectIsolation?: "codex-native-sandbox" | undefined;
|
|
392
|
-
broker?: {
|
|
393
|
-
maxRunRequests: number;
|
|
394
|
-
engine: "grok";
|
|
395
|
-
agentId: string;
|
|
396
|
-
model: "grok-4.6" | "grok-4.5" | "grok-build";
|
|
397
|
-
reasoningEffort: "low" | "medium" | "high";
|
|
398
|
-
architecture: "arm64" | "x64";
|
|
399
|
-
limits: {
|
|
400
|
-
maxRequests: number;
|
|
401
|
-
maxTokens: number;
|
|
402
|
-
timeoutMs: number;
|
|
403
|
-
};
|
|
404
|
-
realmVolume: string;
|
|
405
|
-
bootstrap: string;
|
|
406
|
-
unenforcedBindPolicy?: "refuse" | "profile-only" | undefined;
|
|
407
|
-
} | undefined;
|
|
408
|
-
};
|
|
409
286
|
}>;
|
|
410
287
|
/** Allocation is separate so dry-run never creates a directory, and aliases fail before writes. */
|
|
411
288
|
export declare const allocateTrainingOutputParent: (output: string) => Promise<void>;
|
|
412
|
-
/** Preserve identities and all dataset roles while projecting only filesystem addresses. */
|
|
413
|
-
export declare const mapTrainingExecution: (execution: TrainingExecution, map: (file: string) => string) => TrainingExecution;
|
|
414
|
-
/** Resume changes position/presence of --resume, not the experiment's effective inputs. */
|
|
415
|
-
export declare const trainingExecutionIdentity: (execution: TrainingExecution) => unknown;
|
|
@@ -5,11 +5,6 @@ import { z } from "zod";
|
|
|
5
5
|
import { defaultTrainingOutputRoot } from "./output.js";
|
|
6
6
|
import { SpawnfileError } from "../../shared/index.js";
|
|
7
7
|
import { trainingPlanSchema, trainingPlanOptimizerSchema } from "./plan/contract.js";
|
|
8
|
-
import { trainingPreparationSchema } from "./preparation/contract.js";
|
|
9
|
-
import { readBoundedJson } from "./preparation/inputs.js";
|
|
10
|
-
import { trainingContainerConfigSchema, trainingImageSchema } from "./container/contract.js";
|
|
11
|
-
export const TRAINING_EXECUTION_FILE = "/run/spawnfile-training/execution.json";
|
|
12
|
-
export { TRAINING_EXECUTION_CAPABILITY_LABEL, TRAINING_EXECUTION_VERSION } from "./contract.js";
|
|
13
8
|
export const trainingExecutionSchema = z.object({
|
|
14
9
|
version: z.literal("spawnfile.training-execution.v1"),
|
|
15
10
|
authoring: trainingPlanSchema,
|
|
@@ -34,32 +29,11 @@ const exists = async (file) => {
|
|
|
34
29
|
throw error;
|
|
35
30
|
}
|
|
36
31
|
};
|
|
37
|
-
/** Resolve
|
|
32
|
+
/** Resolve authoring defaults into training CLI arguments; no writes, auth reads or execution. */
|
|
38
33
|
export const lowerTrainingExecution = async (options) => {
|
|
39
34
|
const { project, plan } = options;
|
|
40
35
|
if (!plan.targets.length || !plan.optimizer)
|
|
41
36
|
return invalid(`Agent ${plan.agent.id} has no executable training targets`);
|
|
42
|
-
const agent = project.compilePlan.nodes.find(node => node.id === plan.agent.id);
|
|
43
|
-
const agentDirectory = path.dirname(agent.value.kind === "agent" ? agent.value.sourcePath ?? agent.value.source : agent.value.source);
|
|
44
|
-
const candidates = [...new Set([agentDirectory, project.root].map(root => path.join(root, "training/container.json")))];
|
|
45
|
-
let trainingConfig = options.trainingConfig === undefined ? undefined : path.resolve(options.trainingConfig);
|
|
46
|
-
if (trainingConfig === undefined)
|
|
47
|
-
for (const file of candidates)
|
|
48
|
-
if (await exists(file)) {
|
|
49
|
-
trainingConfig = file;
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
if (trainingConfig === undefined)
|
|
53
|
-
return invalid(`Training requires a container declaration at ${candidates.join(" or ")}, or --training-config`);
|
|
54
|
-
trainingConfig = await realpath(trainingConfig);
|
|
55
|
-
const raw = await readBoundedJson(trainingConfig);
|
|
56
|
-
const preparation = raw.version === "spawnfile.training-container.v2" ||
|
|
57
|
-
(["spawnfile.training-container.v3", "spawnfile.training-container.v4"].includes(String(raw.version)) && raw.image !== undefined);
|
|
58
|
-
const declaration = preparation ? trainingPreparationSchema.parse(raw) : trainingContainerConfigSchema.parse(raw);
|
|
59
|
-
const trainingImage = options.trainingImage === undefined ? undefined : trainingImageSchema.parse(options.trainingImage);
|
|
60
|
-
if (!preparation && trainingImage === undefined) {
|
|
61
|
-
return invalid("A lowered container launch configuration requires --training-image; use a v2/v4 preparation declaration for a declared image");
|
|
62
|
-
}
|
|
63
37
|
const args = [...options.args];
|
|
64
38
|
if (!args.includes("--experiment-timeout-ms") && !args.includes("--timeout-ms")) {
|
|
65
39
|
args.push("--experiment-timeout-ms", String(plan.deadlines?.experiment_ms ?? 43_200_000));
|
|
@@ -84,11 +58,6 @@ export const lowerTrainingExecution = async (options) => {
|
|
|
84
58
|
args.push("--optimizer-model", plan.optimizer.model);
|
|
85
59
|
if (args.includes("--resume") && option(args, "--out") === undefined)
|
|
86
60
|
return invalid("--resume requires --out identifying the exact prior experiment");
|
|
87
|
-
const output = path.resolve(option(args, "--out") ?? path.join(defaultTrainingOutputRoot(project.root, declaration.inputs.map(input => path.resolve(path.dirname(trainingConfig), input.source))), encodeURIComponent(plan.agent.id), `${new Date().toISOString().replace(/[:.]/gu, "-")}-${randomUUID().slice(0, 8)}`));
|
|
88
|
-
if (!args.includes("--out"))
|
|
89
|
-
args.push("--out", output);
|
|
90
|
-
else
|
|
91
|
-
args[args.indexOf("--out") + 1] = output;
|
|
92
61
|
const datasetPins = [...new Set(plan.targets.flatMap(target => Object.values(target.datasets)
|
|
93
62
|
.filter(dataset => dataset !== null).map(dataset => dataset.sourcePath)))].map(sourcePath => {
|
|
94
63
|
const loaded = project.datasets[sourcePath];
|
|
@@ -96,9 +65,14 @@ export const lowerTrainingExecution = async (options) => {
|
|
|
96
65
|
return invalid(`Authored dataset was not captured during plan loading: ${sourcePath}`);
|
|
97
66
|
return { sourcePath, sha256: loaded.sha256 };
|
|
98
67
|
});
|
|
68
|
+
const output = path.resolve(option(args, "--out") ?? path.join(defaultTrainingOutputRoot(project.root, datasetPins.map(pin => pin.sourcePath)), encodeURIComponent(plan.agent.id), `${new Date().toISOString().replace(/[:.]/gu, "-")}-${randomUUID().slice(0, 8)}`));
|
|
69
|
+
if (!args.includes("--out"))
|
|
70
|
+
args.push("--out", output);
|
|
71
|
+
else
|
|
72
|
+
args[args.indexOf("--out") + 1] = output;
|
|
99
73
|
const execution = trainingExecutionSchema.parse({ version: "spawnfile.training-execution.v1", authoring: plan, datasetPins,
|
|
100
74
|
optimizer: { ...plan.optimizer, model: option(args, "--optimizer-model") }, args, output });
|
|
101
|
-
return { execution
|
|
75
|
+
return { execution };
|
|
102
76
|
};
|
|
103
77
|
/** Allocation is separate so dry-run never creates a directory, and aliases fail before writes. */
|
|
104
78
|
export const allocateTrainingOutputParent = async (output) => {
|
|
@@ -123,38 +97,3 @@ export const allocateTrainingOutputParent = async (output) => {
|
|
|
123
97
|
invalid("Training output parent must be a canonical directory");
|
|
124
98
|
}
|
|
125
99
|
};
|
|
126
|
-
/** Preserve identities and all dataset roles while projecting only filesystem addresses. */
|
|
127
|
-
export const mapTrainingExecution = (execution, map) => {
|
|
128
|
-
const source = (value) => ({ ...value, sourcePath: map(value.sourcePath) });
|
|
129
|
-
const args = [...execution.args];
|
|
130
|
-
for (let index = 0; index < args.length; index++) {
|
|
131
|
-
if (["--train", "--validation", "--test", "--out", "--cost-config"].includes(args[index]))
|
|
132
|
-
args[++index] = map(args[index]);
|
|
133
|
-
else if (args[index] === "--resource") {
|
|
134
|
-
const value = args[++index], split = value.indexOf("=");
|
|
135
|
-
args[index] = `${value.slice(0, split)}=${map(value.slice(split + 1))}`;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return trainingExecutionSchema.parse({ ...execution, datasetPins: execution.datasetPins.map(source), args, output: map(execution.output), authoring: {
|
|
139
|
-
...execution.authoring,
|
|
140
|
-
...(execution.authoring.preparation ? { preparation: { ...execution.authoring.preparation,
|
|
141
|
-
...(execution.authoring.preparation.history ? { history: map(execution.authoring.preparation.history) } : {}) } } : {}),
|
|
142
|
-
project: { root: map(execution.authoring.project.root), manifest: map(execution.authoring.project.manifest) },
|
|
143
|
-
graders: execution.authoring.graders.map(source),
|
|
144
|
-
targets: execution.authoring.targets.map(target => ({ ...target, files: target.files.map(source), datasets: {
|
|
145
|
-
train: source(target.datasets.train), test: source(target.datasets.test),
|
|
146
|
-
validation: target.datasets.validation === null ? null : source(target.datasets.validation)
|
|
147
|
-
} }))
|
|
148
|
-
} });
|
|
149
|
-
};
|
|
150
|
-
/** Resume changes position/presence of --resume, not the experiment's effective inputs. */
|
|
151
|
-
export const trainingExecutionIdentity = (execution) => {
|
|
152
|
-
const flags = [];
|
|
153
|
-
for (let index = 0; index < execution.args.length; index++) {
|
|
154
|
-
const flag = execution.args[index];
|
|
155
|
-
if (flag === "--resume")
|
|
156
|
-
continue;
|
|
157
|
-
flags.push(flag === "--dry-run" ? [flag] : [flag, execution.args[++index]]);
|
|
158
|
-
}
|
|
159
|
-
return { ...execution, args: flags.sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0) };
|
|
160
|
-
};
|
|
@@ -3,14 +3,6 @@ export * from "./context.js";
|
|
|
3
3
|
export * from "./plan/index.js";
|
|
4
4
|
export * from "./rewind/index.js";
|
|
5
5
|
export type { ResolvedTraining, ResolvedTrainingGrader } from "./resolution.js";
|
|
6
|
-
export { parseTrainingMappedPreparation, trainingPreparationSchema } from "./preparation/contract.js";
|
|
7
|
-
export { prepareTrainingEvaluators } from "./container/evaluators.js";
|
|
8
|
-
export type { TrainingMappedPreparation } from "./preparation/contract.js";
|
|
9
|
-
export { TRAINING_SLOTS_FILE, TRAINING_SLOTS_VERSION, trainingSlotPaths, trainingSlotDescriptors, trainingSlotsDocument, type TrainingSlotsDocument, type TrainingSlotPaths, type TrainingSlotDescriptor } from "./broker/paths.js";
|
|
10
6
|
export * from "./execution.js";
|
|
11
7
|
export * from "./moments.js";
|
|
12
8
|
export * from "./compiledAgent.js";
|
|
13
|
-
export { TRAINING_FAKETIME_LIBRARY_PATH } from "./container/contract.js";
|
|
14
|
-
export * from "./subjectLease.js";
|
|
15
|
-
export * from "./subjectDeclaration.js";
|
|
16
|
-
export { recycleTrainingSlot, type RecycleTrainingSlotOptions, type TrainingSlotRecycleReceipt } from "./broker/recycleClient.js";
|