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.
- package/README.md +1 -1
- package/dist/audit/readAudit.d.ts +3 -3
- package/dist/auth/profileStore.d.ts +3 -1
- package/dist/auth/profileStore.js +31 -30
- package/dist/auth/trainingAuth.d.ts +2 -5
- package/dist/auth/types.d.ts +16 -0
- package/dist/cli/authCommands.d.ts +1 -1
- package/dist/cli/authCommands.js +21 -1
- package/dist/cli/devCommands.d.ts +1 -1
- package/dist/cli/devCommands.js +0 -66
- package/dist/cli/runCli.d.ts +3 -4
- package/dist/cli/runCli.js +4 -3
- package/dist/cli/trainCommand.js +9 -15
- package/dist/cli/trainingBooted.d.ts +9 -0
- package/dist/cli/trainingBooted.js +45 -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 +19 -90
- package/dist/compiler/containerDaimonGatewayRender.d.ts +50 -0
- package/dist/compiler/containerDaimonGatewayRender.js +161 -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 +29 -47
- 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 +3 -0
- package/dist/compiler/runProject.js +12 -5
- package/dist/compiler/runProjectAuth.js +6 -18
- 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/rewind/contract.d.ts +6 -6
- package/dist/compiler/training/trial/boot.d.ts +72 -0
- package/dist/compiler/training/trial/boot.js +225 -0
- package/dist/compiler/training/trial/docker.d.ts +10 -0
- package/dist/compiler/training/trial/docker.js +22 -0
- package/dist/compiler/training/trial/gateway.d.ts +47 -0
- package/dist/compiler/training/trial/gateway.js +113 -0
- package/dist/compiler/training/trial/homeLogin.d.ts +31 -0
- package/dist/compiler/training/trial/homeLogin.js +69 -0
- package/dist/compiler/training/trial/index.d.ts +8 -0
- package/dist/compiler/training/trial/index.js +8 -0
- package/dist/compiler/training/trial/judge.d.ts +15 -0
- package/dist/compiler/training/trial/judge.js +42 -0
- package/dist/compiler/training/trial/launcher.d.ts +47 -0
- package/dist/compiler/training/trial/launcher.js +193 -0
- package/dist/compiler/training/trial/login.d.ts +35 -0
- package/dist/compiler/training/trial/login.js +85 -0
- package/dist/compiler/training/trial/project.d.ts +11 -0
- package/dist/compiler/training/trial/project.js +31 -0
- package/dist/compiler/training/trial/realmTurns.d.ts +20 -0
- package/dist/compiler/training/trial/realmTurns.js +69 -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/manifest/renderSpawnfile.js +2 -1
- 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 +8 -14
- 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 +15 -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 +27 -3
- package/dist/runtime/daimon/subscriptionRealms.js +35 -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 +50 -0
- package/dist/runtime/daimon/training/booted/adapter.js +60 -0
- package/dist/runtime/daimon/training/booted/adapter.js.map +1 -0
- package/dist/runtime/daimon/training/booted/index.d.ts +4 -0
- package/dist/runtime/daimon/training/booted/index.js +3 -0
- package/dist/runtime/daimon/training/booted/index.js.map +1 -0
- package/dist/runtime/daimon/training/booted/judge.d.ts +39 -0
- package/dist/runtime/daimon/training/booted/judge.js +122 -0
- package/dist/runtime/daimon/training/booted/judge.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/wakeMoments.js +0 -1
- package/dist/runtime/install.js +0 -21
- package/dist/runtime/registry.js +0 -2
- package/dist/runtime/trainingGraderProviders.js +10 -4
- package/dist/runtime/trainingProviders.d.ts +5 -3
- package/dist/runtime/trainingProviders.js +21 -24
- 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/runtime/usageRequestLedger.d.ts +2 -0
- package/dist/runtime/usageRequestLedger.js +3 -1
- package/dist/shared/errors.js +0 -1
- package/dist/shared/trainingLegacy/trainingLegacyHashDomains.d.ts +1 -0
- package/dist/shared/trainingLegacy/trainingLegacyHashDomains.js +1 -0
- package/dist/shared/trainingLegacy/trainingLegacyHashDomains.js.map +1 -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.d.ts +0 -1
- package/dist/runtime/codex-exec/training/providers/codex-subscription/index.js +0 -2
- package/dist/runtime/codex-exec/training/providers/codex-subscription/index.js.map +0 -1
- package/dist/runtime/codex-exec/training/providers/codex-subscription/protocol.d.ts +0 -17
- package/dist/runtime/codex-exec/training/providers/codex-subscription/protocol.js +0 -80
- package/dist/runtime/codex-exec/training/providers/codex-subscription/protocol.js.map +0 -1
- package/dist/runtime/codex-exec/training/providers/codex-subscription/provider.d.ts +0 -12
- package/dist/runtime/codex-exec/training/providers/codex-subscription/provider.js +0 -125
- 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.d.ts +0 -6
- package/dist/runtime/codex-exec/training/providers/codex-subscription/strict-schema.js +0 -219
- 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/providers/grok-subscription/cli.d.ts +0 -21
- package/dist/runtime/daimon/training/providers/grok-subscription/cli.js +0 -81
- package/dist/runtime/daimon/training/providers/grok-subscription/cli.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-subscription/index.d.ts +0 -4
- package/dist/runtime/daimon/training/providers/grok-subscription/index.js +0 -5
- package/dist/runtime/daimon/training/providers/grok-subscription/index.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-subscription/protocol.d.ts +0 -26
- package/dist/runtime/daimon/training/providers/grok-subscription/protocol.js +0 -102
- package/dist/runtime/daimon/training/providers/grok-subscription/protocol.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-subscription/provider.d.ts +0 -9
- package/dist/runtime/daimon/training/providers/grok-subscription/provider.js +0 -38
- package/dist/runtime/daimon/training/providers/grok-subscription/provider.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
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
export const unknownNativeAdmission = () => ({ executionRecords: null, executionsUsed: null, agentExecutionsUsed: null,
|
|
2
|
-
tokensUsed: null, agentTokensUsed: null, toolEvents: null, outputEvents: null });
|
|
3
|
-
const count = (value) => Array.isArray(value) ? value.length : null;
|
|
4
|
-
const counter = (value) => Number.isSafeInteger(value) && Number(value) >= 0 ? Number(value) : null;
|
|
5
|
-
/** Called only after the adapter binds trial, wake, agent, model, config and transport source. */
|
|
6
|
-
export function nativeAdmission(value) {
|
|
7
|
-
const receipt = value.receipt;
|
|
8
|
-
const activity = value.activity;
|
|
9
|
-
const availability = value.availability;
|
|
10
|
-
const native = value.native;
|
|
11
|
-
if (!receipt || receipt.version !== 'noopolis.daimon.wake-receipt-status.v2' || receipt.agent_id !== value.agentId ||
|
|
12
|
-
typeof receipt.acceptance_id !== 'string' || receipt.acceptance_id.trim().length === 0 ||
|
|
13
|
-
receipt.state !== 'accepted' || receipt.deferred || receipt.execution_id !== undefined ||
|
|
14
|
-
receipt.delivery_id !== (value.transport?.deliveryId ?? `${value.trialId}:${value.wakeId}`) ||
|
|
15
|
-
!activity || activity.version !== 'noopolis.daimon.organization-runtime-activity.v2' || !Array.isArray(activity.items) ||
|
|
16
|
-
!activity.items.length || activity.items.some(item => !item || item.agent_id !== value.agentId ||
|
|
17
|
-
item.delivery_id !== receipt.delivery_id || item.acceptance_id !== receipt.acceptance_id ||
|
|
18
|
-
item.execution_id !== undefined || item.state !== 'accepted' || item.active !== false || item.deferred) ||
|
|
19
|
-
availability?.version !== 'noopolis.daimon.work-availability.v1' || !Array.isArray(availability.agents) ||
|
|
20
|
-
availability.agents.length !== 1 || availability.agents[0]?.agent_id !== value.agentId ||
|
|
21
|
-
availability.agents[0].running !== false || !native)
|
|
22
|
-
return unknownNativeAdmission();
|
|
23
|
-
const budget = availability.agents[0].budget;
|
|
24
|
-
if (!budget || budget.armed !== true || budget.epoch !== value.trialId)
|
|
25
|
-
return unknownNativeAdmission();
|
|
26
|
-
const records = [count(activity.executions), count(native.traces), count(native.usage), count(native.modelContexts),
|
|
27
|
-
count(native.accounting?.usage), value.executionId === undefined ? 0 : 1,
|
|
28
|
-
native.requests === undefined ? 0 : count(native.requests), native.turnSeals === undefined ? 0 : count(native.turnSeals)];
|
|
29
|
-
if (value.transport) {
|
|
30
|
-
const transport = value.transport;
|
|
31
|
-
if (transport.acceptanceId !== receipt.acceptance_id || !Array.isArray(transport.selectedDeliveries) ||
|
|
32
|
-
!transport.selectedDeliveries.length || transport.selectedDeliveries.some(row => !row ||
|
|
33
|
-
row.deliveryId !== receipt.delivery_id || !Array.isArray(row.executionIds) || row.executionIds.length !== 0 ||
|
|
34
|
-
row.receipt?.execution_id !== undefined || row.receipt?.agent_id !== value.agentId ||
|
|
35
|
-
row.receipt?.delivery_id !== receipt.delivery_id || row.receipt?.acceptance_id !== receipt.acceptance_id ||
|
|
36
|
-
row.receipt?.state !== 'accepted' || row.receipt?.deferred))
|
|
37
|
-
return unknownNativeAdmission();
|
|
38
|
-
records.push(count(transport.batches), transport.batch === undefined ? 0 : 1);
|
|
39
|
-
}
|
|
40
|
-
const texts = [receipt.text, ...activity.items.map(item => item.text),
|
|
41
|
-
...(value.transport?.selectedDeliveries ?? []).map(row => row.receipt?.text)];
|
|
42
|
-
return {
|
|
43
|
-
executionRecords: records.includes(null) ? null : records.reduce((sum, item) => sum + item, 0),
|
|
44
|
-
executionsUsed: counter(budget.executions_used), agentExecutionsUsed: counter(budget.agent_executions_used),
|
|
45
|
-
tokensUsed: counter(budget.tokens_used), agentTokensUsed: counter(budget.agent_tokens_used),
|
|
46
|
-
toolEvents: count(native.toolReceipts),
|
|
47
|
-
outputEvents: texts.some(text => text !== undefined && typeof text !== 'string') ? null
|
|
48
|
-
: texts.some(text => !!text) ? 1
|
|
49
|
-
: value.coverage?.some(row => row.channel === 'output' && row.completeness === 'absent') ? 0 : null,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=admission.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admission.js","sourceRoot":"","sources":["../../../../../src/runtime/daimon/training/native/admission.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAc,EAAE,CAAC,CAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI;IAC/H,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AACnF,MAAM,KAAK,GAAG,CAAC,KAAc,EAAiB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5F,MAAM,OAAO,GAAG,CAAC,KAAc,EAAiB,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAE5H,kGAAkG;AAClG,MAAM,UAAU,eAAe,CAAC,KAAuB;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;IAC9B,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;IAChC,MAAM,YAAY,GAAG,KAAK,C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G,IAAK,EAAE,CAAC,CAAC;QACvG,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,mBAAmB,EAAE,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC;QAC3G,UAAU,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC;QAC3F,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC;QACtC,YAAY,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI;YACrF,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;gBAChC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,KAAK,QAAQ,IAAI,GAAG,CAAC,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;KACtG,CAAC;AACJ,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type VerifiedNativeLaunch } from '../receipt/index.js';
|
|
2
|
-
export declare function nativeChildArguments(launch: VerifiedNativeLaunch, trialId: string, timeoutMs: number): string[];
|
|
3
|
-
/**
|
|
4
|
-
* Creates this trial's private artifact directory before the worker starts.
|
|
5
|
-
*
|
|
6
|
-
* A Codex control root is already per-trial, so it is returned untouched. A Grok
|
|
7
|
-
* slot control root is fixed by the container and shared across trials: the
|
|
8
|
-
* non-recursive `mkdir` below is what separates them, and it fails with EEXIST
|
|
9
|
-
* rather than colliding with, or silently overwriting, the previous trial's
|
|
10
|
-
* exclusive artifacts. Nothing outside this directory is Training's to clear, so
|
|
11
|
-
* the slot supervisor's recycle never has to wipe on Training's behalf.
|
|
12
|
-
*/
|
|
13
|
-
export declare function ensureNativeTrialArtifacts(launch: VerifiedNativeLaunch, trialId: string): Promise<string>;
|
|
14
|
-
export declare function validateChildPaths(launch: VerifiedNativeLaunch): Promise<void>;
|
|
15
|
-
/** Docker env-file semantics: literal values, no shell expansion or inherited host provider settings. */
|
|
16
|
-
export declare function nativeChildEnvironment(launch: VerifiedNativeLaunch): Promise<NodeJS.ProcessEnv>;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { normalizedTrainingEnvironment } from '../../../../../training/index.js';
|
|
2
|
-
import { dirname, join } from 'node:path';
|
|
3
|
-
import { chmod, lstat, mkdir, realpath } from 'node:fs/promises';
|
|
4
|
-
import { nativeTrialArtifactsRoot, readPrivateFile } from '../receipt/index.js';
|
|
5
|
-
export function nativeChildArguments(launch, trialId, timeoutMs) {
|
|
6
|
-
return ['--experimental-strip-types', launch.bootstrap ? join(launch.bootstrap.root, launch.bootstrap.entrypoint) : join(launch.workerRoot, 'worker/cli.js'),
|
|
7
|
-
'--launch', launch.receiptFile, '--config', launch.config, '--config-sha256', launch.configSha256,
|
|
8
|
-
'--control-root', launch.controlRoot, '--token-file', launch.tokenFile,
|
|
9
|
-
'--evidence', join(nativeTrialArtifactsRoot(launch, trialId), 'evidence.json'),
|
|
10
|
-
'--trial-id', trialId, '--timeout-ms', String(timeoutMs), '--schedule-override', 'disabled'];
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Creates this trial's private artifact directory before the worker starts.
|
|
14
|
-
*
|
|
15
|
-
* A Codex control root is already per-trial, so it is returned untouched. A Grok
|
|
16
|
-
* slot control root is fixed by the container and shared across trials: the
|
|
17
|
-
* non-recursive `mkdir` below is what separates them, and it fails with EEXIST
|
|
18
|
-
* rather than colliding with, or silently overwriting, the previous trial's
|
|
19
|
-
* exclusive artifacts. Nothing outside this directory is Training's to clear, so
|
|
20
|
-
* the slot supervisor's recycle never has to wipe on Training's behalf.
|
|
21
|
-
*/
|
|
22
|
-
export async function ensureNativeTrialArtifacts(launch, trialId) {
|
|
23
|
-
const root = nativeTrialArtifactsRoot(launch, trialId);
|
|
24
|
-
if (root === launch.controlRoot)
|
|
25
|
-
return root;
|
|
26
|
-
const shared = dirname(root);
|
|
27
|
-
await mkdir(shared, { recursive: true, mode: 0o700 });
|
|
28
|
-
await chmod(shared, 0o700);
|
|
29
|
-
await mkdir(root, { mode: 0o700 });
|
|
30
|
-
await chmod(root, 0o700);
|
|
31
|
-
return root;
|
|
32
|
-
}
|
|
33
|
-
export async function validateChildPaths(launch) {
|
|
34
|
-
for (const projection of [launch.workspace, ...launch.projections]) {
|
|
35
|
-
if (projection.source !== projection.target)
|
|
36
|
-
throw new Error('Child execution requires actual source and target paths to match');
|
|
37
|
-
}
|
|
38
|
-
for (const credential of launch.credentials) {
|
|
39
|
-
const target = await lstat(credential.target);
|
|
40
|
-
if (!target.isFile() || target.isSymbolicLink() || target.nlink !== 1 || target.uid !== process.getuid?.() || (target.mode & 0o777) !== 0o600 || await realpath(credential.target) !== credential.target) {
|
|
41
|
-
throw new Error('Caller-owned native credential ingress was not safely staged');
|
|
42
|
-
}
|
|
43
|
-
const directory = await lstat(dirname(credential.target));
|
|
44
|
-
if (!directory.isDirectory() || directory.isSymbolicLink() || (directory.mode & 0o022) !== 0
|
|
45
|
-
|| directory.uid !== 0 && directory.uid !== process.getuid?.())
|
|
46
|
-
throw new Error('Caller-owned native credential directory is unsafe');
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/** Docker env-file semantics: literal values, no shell expansion or inherited host provider settings. */
|
|
50
|
-
export async function nativeChildEnvironment(launch) {
|
|
51
|
-
const home = launch.projections.find(row => row.role === 'home');
|
|
52
|
-
if (!home || home.source !== home.target)
|
|
53
|
-
throw new Error('Native child HOME requires the verified materialized home projection');
|
|
54
|
-
const env = { HOME: home.target };
|
|
55
|
-
for (const key of ['PATH', 'LANG', 'LC_ALL', 'TZ'])
|
|
56
|
-
if (process.env[key] !== undefined)
|
|
57
|
-
env[key] = process.env[key];
|
|
58
|
-
const keys = new Set(['HOME']);
|
|
59
|
-
for (const line of (await readPrivateFile(launch.envFile, 65536)).split(/\r?\n/u)) {
|
|
60
|
-
if (!line.trim() || line.trimStart().startsWith('#'))
|
|
61
|
-
continue;
|
|
62
|
-
const match = /^([A-Za-z_][A-Za-z0-9_]*)=(.*)$/u.exec(line);
|
|
63
|
-
if (!match || keys.has(match[1]))
|
|
64
|
-
throw new Error('Invalid explicit native child environment');
|
|
65
|
-
keys.add(match[1]);
|
|
66
|
-
env[match[1]] = match[2];
|
|
67
|
-
}
|
|
68
|
-
return normalizedTrainingEnvironment(env);
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=arguments.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arguments.js","sourceRoot":"","sources":["../../../../../../src/runtime/daimon/training/native/child/arguments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAA6B,MAAM,qBAAqB,CAAC;AAE3G,MAAM,UAAU,oBAAoB,CAAC,MAA4B,EAAE,OAAe,EAAE,SAAiB;IACnG,OAAO,CAAC,4BAA4B,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,eAAe,CAAC;QAC1J,UAAU,EAAE,MAAM,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,CAA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AC,MAAM,EAAE,CAAC;IACrD,KAAK,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC;QAAE,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpH,MAAM,IAAI,GAAG,IAAI,GAAG,CAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACvC,KAAK,MAAM,IAAI,IAAI,CAAC,MAAM,eAAe,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClF,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS;QAC/D,MAAM,KAAK,GAAG,kCAAkC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5D,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAChG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,CAAC;QAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC;IAClD,CAAC;IACD,OAAO,6BAA6B,CAAC,GAAG,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { type TrialReport } from '../../../../../training/index.js';
|
|
2
|
-
import type { SubjectTurnResult } from '../../../../../training/index.js';
|
|
3
|
-
/** One required artifact the filing would produce, so the verdict is exactly the subject's. */
|
|
4
|
-
export declare const filing: () => import("../../../../../training/index.js").ResolvedRecord;
|
|
5
|
-
/**
|
|
6
|
-
* No sidecar artifact is registered for these trials, so a read is a defect rather
|
|
7
|
-
* than a missing file: the verdict has to be exactly the subject's own evidence.
|
|
8
|
-
*/
|
|
9
|
-
export declare const unregisteredSidecar: () => Promise<never>;
|
|
10
|
-
/**
|
|
11
|
-
* The real child, the real loopback protocol and the real closure query: the only
|
|
12
|
-
* thing borrowed is the trial's own stimulus, because the worker owns the fresh
|
|
13
|
-
* workspace the launch receipt pins. Every continuation the budget admits defers,
|
|
14
|
-
* so the last one exhausts it — and by then the worker has stopped its own host.
|
|
15
|
-
*
|
|
16
|
-
* The caller owns the returned root: these trials write a real workspace and a real
|
|
17
|
-
* control root, and nothing here removes them.
|
|
18
|
-
*/
|
|
19
|
-
export declare function nativeDeferredTrial(mode: string, maxDeliveries?: number, supplied?: () => Promise<null>): Promise<{
|
|
20
|
-
report: TrialReport;
|
|
21
|
-
turn: SubjectTurnResult;
|
|
22
|
-
deliveries: number;
|
|
23
|
-
root: string;
|
|
24
|
-
}>;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { createHash } from 'node:crypto';
|
|
2
|
-
import { childFixture } from './fixture.js';
|
|
3
|
-
import { parseDatasetYaml, resolveDataset } from '../../../../../training/index.js';
|
|
4
|
-
import { createEvaluationRegistry } from '../../../../../training/index.js';
|
|
5
|
-
import { runTrial } from '../../../../../training/index.js';
|
|
6
|
-
import { createDaimonNativeAdapter } from '../index.js';
|
|
7
|
-
/** One required artifact the filing would produce, so the verdict is exactly the subject's. */
|
|
8
|
-
export const filing = () => resolveDataset(parseDatasetYaml(`schema: spawnfile.training.dataset.v1
|
|
9
|
-
id: newsroom
|
|
10
|
-
stages:
|
|
11
|
-
- id: accepted-article
|
|
12
|
-
checks:
|
|
13
|
-
- {id: filed, eval: tool-called, tool: mcp_newsroom_file_article}
|
|
14
|
-
- {id: body, eval: contains-any, input: 'artifact:accepted-article#/body', values: [Filed]}
|
|
15
|
-
score:
|
|
16
|
-
linear: {filed: 0.5, body: 0.5}
|
|
17
|
-
gate: {all: [{passed: filed}, {passed: body}]}
|
|
18
|
-
records:
|
|
19
|
-
- id: record
|
|
20
|
-
group: unique
|
|
21
|
-
input: {prompt: file the assigned story}
|
|
22
|
-
outputs: {accepted-article: article.json}
|
|
23
|
-
`)).records[0];
|
|
24
|
-
/**
|
|
25
|
-
* No sidecar artifact is registered for these trials, so a read is a defect rather
|
|
26
|
-
* than a missing file: the verdict has to be exactly the subject's own evidence.
|
|
27
|
-
*/
|
|
28
|
-
export const unregisteredSidecar = async () => { throw new Error('unregistered sidecar'); };
|
|
29
|
-
/**
|
|
30
|
-
* The real child, the real loopback protocol and the real closure query: the only
|
|
31
|
-
* thing borrowed is the trial's own stimulus, because the worker owns the fresh
|
|
32
|
-
* workspace the launch receipt pins. Every continuation the budget admits defers,
|
|
33
|
-
* so the last one exhausts it — and by then the worker has stopped its own host.
|
|
34
|
-
*
|
|
35
|
-
* The caller owns the returned root: these trials write a real workspace and a real
|
|
36
|
-
* control root, and nothing here removes them.
|
|
37
|
-
*/
|
|
38
|
-
export async function nativeDeferredTrial(mode, maxDeliveries = 1, supplied) {
|
|
39
|
-
const fixture = await childFixture(mode);
|
|
40
|
-
const text = 'Sourced research reply';
|
|
41
|
-
let asked = 0;
|
|
42
|
-
const sourced = async () => {
|
|
43
|
-
const id = `answer-${asked++}`;
|
|
44
|
-
return { id, text, source: { kind: 'transport', id, sha256: `sha256:${createHash('sha256').update(text).digest('hex')}` } };
|
|
45
|
-
};
|
|
46
|
-
const next = supplied ? async () => { asked++; return supplied(); } : sourced;
|
|
47
|
-
const native = createDaimonNativeAdapter({ timeoutMs: 20_000, execution: { kind: 'child-process', externalInputs: { maxDeliveries, next } } });
|
|
48
|
-
const session = await native.start(fixture.input);
|
|
49
|
-
let turn;
|
|
50
|
-
const adapter = { id: 'daimon-native-child', capabilities: native.capabilities,
|
|
51
|
-
async start() {
|
|
52
|
-
return { run: async (value, signal) => { turn = await session.run({ id: value.id, text: value.text }, signal); return turn; },
|
|
53
|
-
stop: reason => session.stop(reason) };
|
|
54
|
-
} };
|
|
55
|
-
const options = { id: fixture.input.trialId, phase: 'train', record: filing(), candidateId: 'candidate',
|
|
56
|
-
datasetDigest: 'dataset', planDigest: 'plan', adapter, model: fixture.input.model, root: fixture.root, timeoutMs: 20_000,
|
|
57
|
-
prepare: async () => ({ instructions: fixture.input.instructions }), registry: createEvaluationRegistry(),
|
|
58
|
-
evaluation: { judges: {}, embeddings: {}, readText: unregisteredSidecar },
|
|
59
|
-
persist: async () => undefined };
|
|
60
|
-
const report = await runTrial(options);
|
|
61
|
-
return { report, turn: turn, deliveries: asked, root: fixture.root };
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=deferred-trial.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deferred-trial.js","sourceRoot":"","sources":["../../../../../../src/runtime/daimon/training/native/child/deferred-trial.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAuC,MAAM,kCAAkC,CAAC;AACjG,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAGxD,+FAA+F;AAC/F,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,cAAc,CAAC,gBAAgB,CAAC;;;;;;;;;;;;;;;CAe3D,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,CAAC;AAEhB;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,IAAoB,EAAE,GAAG,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC;AAE5G;;;;;;;;GAQG;AACH,MAAM,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AC,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;gBAC3H,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3C,CAAC,EAAE,CAAC;IACN,MAAM,OAAO,GAAiB,EAAE,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,WAAW;QACnH,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,KAAM,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM;QACzH,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,wBAAwB,EAAE;QACzG,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,mBAAmB,EAAE;QACzE,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,SAAS,EAAE,CAAC;IACnC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,CAAC;IACvC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAK,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;AACxE,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { SubjectStartupCapture, SubjectStartupDiagnostic } from '../../../../../training/index.js';
|
|
2
|
-
export declare const redactedMarker = "[redacted]";
|
|
3
|
-
export declare const redactedPathMarker = "[redacted-path]";
|
|
4
|
-
export declare const withholdDetectors: readonly ["declared-secret", "bearer", "pem", "opaque-run"];
|
|
5
|
-
export type WithholdDetector = typeof withholdDetectors[number];
|
|
6
|
-
/**
|
|
7
|
-
* Removes every value this adapter knows to be secret, then refuses to call the
|
|
8
|
-
* result clean if anything credential-shaped is left.
|
|
9
|
-
*
|
|
10
|
-
* Substitution covers the control token, the declared environment values and the
|
|
11
|
-
* credential file paths. The assignment scrub covers a secret nobody declared: a
|
|
12
|
-
* line that echoes `SOMETHING=value` publishes the name and drops the value. What
|
|
13
|
-
* substitution cannot reach is an undeclared credential printed on its own — a
|
|
14
|
-
* bearer header, a PEM block, a long opaque token — so its presence makes the
|
|
15
|
-
* text unpublishable rather than published in the hope that it is harmless.
|
|
16
|
-
*/
|
|
17
|
-
export declare function redactNativeDiagnostic(text: string, secrets: readonly string[]): {
|
|
18
|
-
text: string;
|
|
19
|
-
clean: boolean;
|
|
20
|
-
detectors: readonly WithholdDetector[];
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Carries the publishable record, and the unredacted capture, out of startup.
|
|
24
|
-
*
|
|
25
|
-
* The caller persists the record durably and writes the capture to the
|
|
26
|
-
* operator's own run output as an operator-only file. The capture never reaches
|
|
27
|
-
* the event stream, a report or a viewer projection.
|
|
28
|
-
*/
|
|
29
|
-
export declare class NativeStartupFailure extends Error {
|
|
30
|
-
readonly diagnostic: SubjectStartupDiagnostic;
|
|
31
|
-
readonly capture: SubjectStartupCapture;
|
|
32
|
-
constructor(message: string, diagnostic: SubjectStartupDiagnostic, capture: SubjectStartupCapture);
|
|
33
|
-
}
|
|
34
|
-
/** Protected process output, never a public observation or a model/judge input. */
|
|
35
|
-
export declare function childDiagnostics(root: string, trialId: string, configSha256: string, secrets?: readonly string[]): Promise<{
|
|
36
|
-
file: string;
|
|
37
|
-
append(chunk: Buffer, stdout: boolean): void;
|
|
38
|
-
save(exitCode: number | null, exitSignal: NodeJS.Signals | null): Promise<void>;
|
|
39
|
-
/**
|
|
40
|
-
* The durable half of the protected file above.
|
|
41
|
-
*
|
|
42
|
-
* The full capture stays in the control root, which on a training slot is
|
|
43
|
-
* tmpfs that dies with the container; this redacted record is what an
|
|
44
|
-
* operator can still read afterwards, and it always names the failure class
|
|
45
|
-
* even when the bytes themselves have to be withheld.
|
|
46
|
-
*/
|
|
47
|
-
/**
|
|
48
|
-
* The publishable record on its own, for a worker that died *after*
|
|
49
|
-
* readiness. Startup already published one; a mid-turn death published
|
|
50
|
-
* nothing at all, so the one account of why the worker stopped answering
|
|
51
|
-
* lived only in the protected file on the slot's tmpfs and died with the
|
|
52
|
-
* container. Same redaction, same withholding rules, no capture: this
|
|
53
|
-
* travels in the durable event stream, which outlives the container, and an
|
|
54
|
-
* unredacted capture has no business there.
|
|
55
|
-
*/
|
|
56
|
-
record(caught: unknown): SubjectStartupDiagnostic;
|
|
57
|
-
startupFailure(caught: unknown): NativeStartupFailure;
|
|
58
|
-
}>;
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { canonicalWireId } from '../../../../../training/index.js';
|
|
2
|
-
import { lstat, realpath, writeFile } from 'node:fs/promises';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
const limit = 65_536;
|
|
5
|
-
/** Published tails are for identifying a defect class, not for reading a transcript. */
|
|
6
|
-
const published = 4_096;
|
|
7
|
-
/**
|
|
8
|
-
* Below this length a value cannot carry credential entropy, and substituting it
|
|
9
|
-
* would corrupt unrelated text while proving nothing. Such values are not
|
|
10
|
-
* redaction targets; the assignment scrub below still keeps them from being
|
|
11
|
-
* published as a named environment value.
|
|
12
|
-
*/
|
|
13
|
-
const shortestRedactableSecret = 8;
|
|
14
|
-
/** Environment values are never published verbatim, including ones this adapter was never told were secret. */
|
|
15
|
-
const assignment = /(^|[\s"'([{,;])([A-Za-z_][A-Za-z0-9_]{1,63})=(\S+)/gu;
|
|
16
|
-
/** Paths whose name says credential: published as a class, never as a location. */
|
|
17
|
-
const credentialPath = /(?:^|(?<=\s))\S*\/\S*(?:auth\.json|\.pem|\.key|token)\S*/giu;
|
|
18
|
-
/** Undeclared credential-shaped material: what substitution cannot remove because nobody declared it. */
|
|
19
|
-
const credentialShaped = [/bearer\s+\S+/iu, /-----BEGIN [A-Z ]*(?:PRIVATE KEY|CERTIFICATE)/u];
|
|
20
|
-
const opaqueRun = /[A-Za-z0-9_-]{40,}/gu;
|
|
21
|
-
export const redactedMarker = '[redacted]';
|
|
22
|
-
export const redactedPathMarker = '[redacted-path]';
|
|
23
|
-
const truncate = (text) => text.length > published ? `${text.slice(0, published)}…` : text;
|
|
24
|
-
/** Longest message published from a frame; a frame is an identity and a sentence, not a transcript. */
|
|
25
|
-
const framedMessage = 512;
|
|
26
|
-
const maximumFrames = 8;
|
|
27
|
-
export const withholdDetectors = ['declared-secret', 'bearer', 'pem', 'opaque-run'];
|
|
28
|
-
/**
|
|
29
|
-
* Which detector refuses this text, named rather than counted.
|
|
30
|
-
*
|
|
31
|
-
* Knowing that a bearer header fired tells an operator "the runtime threw with a
|
|
32
|
-
* capability token in the message"; knowing that a long opaque run fired tells
|
|
33
|
-
* them "something printed a blob". Without the name, a withheld stream is
|
|
34
|
-
* indistinguishable from a crash with no output at all.
|
|
35
|
-
*/
|
|
36
|
-
function withholdingDetectors(text, survivingSecret) {
|
|
37
|
-
const detectors = [];
|
|
38
|
-
if (survivingSecret)
|
|
39
|
-
detectors.push('declared-secret');
|
|
40
|
-
if (credentialShaped[0].test(text))
|
|
41
|
-
detectors.push('bearer');
|
|
42
|
-
if (credentialShaped[1].test(text))
|
|
43
|
-
detectors.push('pem');
|
|
44
|
-
if ([...text.matchAll(opaqueRun)].some(match => !/^[0-9a-f]+$/u.test(match[0])))
|
|
45
|
-
detectors.push('opaque-run');
|
|
46
|
-
return detectors;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Removes every value this adapter knows to be secret, then refuses to call the
|
|
50
|
-
* result clean if anything credential-shaped is left.
|
|
51
|
-
*
|
|
52
|
-
* Substitution covers the control token, the declared environment values and the
|
|
53
|
-
* credential file paths. The assignment scrub covers a secret nobody declared: a
|
|
54
|
-
* line that echoes `SOMETHING=value` publishes the name and drops the value. What
|
|
55
|
-
* substitution cannot reach is an undeclared credential printed on its own — a
|
|
56
|
-
* bearer header, a PEM block, a long opaque token — so its presence makes the
|
|
57
|
-
* text unpublishable rather than published in the hope that it is harmless.
|
|
58
|
-
*/
|
|
59
|
-
export function redactNativeDiagnostic(text, secrets) {
|
|
60
|
-
const substitutable = [...new Set(secrets.filter(secret => secret.length >= shortestRedactableSecret))];
|
|
61
|
-
let value = text;
|
|
62
|
-
for (const secret of substitutable.sort((left, right) => right.length - left.length))
|
|
63
|
-
value = value.split(secret).join(redactedMarker);
|
|
64
|
-
value = value.replace(assignment, (_match, lead, key) => `${lead}${key}=${redactedMarker}`);
|
|
65
|
-
value = value.replace(credentialPath, redactedPathMarker);
|
|
66
|
-
const detectors = withholdingDetectors(value, substitutable.some(secret => value.includes(secret)));
|
|
67
|
-
return { text: value, clean: !detectors.length, detectors };
|
|
68
|
-
}
|
|
69
|
-
/** Every `{"schema":…}` line the runtime printed, with the field it states its failure in. */
|
|
70
|
-
function readFrames(stream, text, secrets) {
|
|
71
|
-
const frames = [];
|
|
72
|
-
for (const line of text.split(/\r?\n/u)) {
|
|
73
|
-
if (frames.length >= maximumFrames || !line.trim().startsWith('{'))
|
|
74
|
-
continue;
|
|
75
|
-
let row;
|
|
76
|
-
try {
|
|
77
|
-
row = JSON.parse(line);
|
|
78
|
-
}
|
|
79
|
-
catch {
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
if (!row || typeof row !== 'object' || typeof row.schema !== 'string' || !row.schema)
|
|
83
|
-
continue;
|
|
84
|
-
const stated = [row.error, row.reason, row.message].find(value => typeof value === 'string' && value);
|
|
85
|
-
if (stated === undefined) {
|
|
86
|
-
frames.push({ stream, schema: row.schema });
|
|
87
|
-
continue;
|
|
88
|
-
}
|
|
89
|
-
// The schema is an identity, never a secret, so it publishes even when the message it carries cannot.
|
|
90
|
-
const message = redactNativeDiagnostic(String(stated).slice(0, framedMessage), secrets);
|
|
91
|
-
frames.push({ stream, schema: row.schema, ...(message.clean ? { message: message.text } : { withheldBy: message.detectors }) });
|
|
92
|
-
}
|
|
93
|
-
return frames.length ? frames : undefined;
|
|
94
|
-
}
|
|
95
|
-
const lineCount = (text) => text ? text.split(/\r?\n/u).length : 0;
|
|
96
|
-
/** The worker's own stated failure is the best reason; a frame from any layer beats an exit status. */
|
|
97
|
-
function classify(frames, exitCode, exitSignal, fallback) {
|
|
98
|
-
const stated = frames?.filter(frame => frame.message !== undefined) ?? [];
|
|
99
|
-
const worker = stated.find(frame => canonicalWireId(frame.schema) === 'spawnfile.training.daimon-native.start-failed.v1');
|
|
100
|
-
// Any layer's own account — the worker's, or a caller bootstrap's — outranks an exit code.
|
|
101
|
-
const frame = worker ?? stated.at(-1);
|
|
102
|
-
if (frame)
|
|
103
|
-
return `${frame.schema}: ${frame.message}`;
|
|
104
|
-
if (exitSignal)
|
|
105
|
-
return `Native worker terminated by signal ${exitSignal}: ${fallback}`;
|
|
106
|
-
if (exitCode !== null && exitCode !== 0)
|
|
107
|
-
return `Native worker exited with code ${exitCode}: ${fallback}`;
|
|
108
|
-
return fallback;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Carries the publishable record, and the unredacted capture, out of startup.
|
|
112
|
-
*
|
|
113
|
-
* The caller persists the record durably and writes the capture to the
|
|
114
|
-
* operator's own run output as an operator-only file. The capture never reaches
|
|
115
|
-
* the event stream, a report or a viewer projection.
|
|
116
|
-
*/
|
|
117
|
-
export class NativeStartupFailure extends Error {
|
|
118
|
-
diagnostic;
|
|
119
|
-
capture;
|
|
120
|
-
constructor(message, diagnostic, capture) {
|
|
121
|
-
super(message);
|
|
122
|
-
this.diagnostic = diagnostic;
|
|
123
|
-
this.capture = capture;
|
|
124
|
-
this.name = 'NativeStartupFailure';
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
/** Protected process output, never a public observation or a model/judge input. */
|
|
128
|
-
export async function childDiagnostics(root, trialId, configSha256, secrets = []) {
|
|
129
|
-
const directory = await lstat(root);
|
|
130
|
-
if (!directory.isDirectory() || directory.isSymbolicLink() || await realpath(root) !== root || (directory.mode & 0o777) !== 0o700) {
|
|
131
|
-
throw new Error('Native diagnostics require the protected canonical control directory');
|
|
132
|
-
}
|
|
133
|
-
const file = join(root, 'child-diagnostics.json');
|
|
134
|
-
const streams = { stdout: { bytes: Buffer.alloc(0), truncated: false }, stderr: { bytes: Buffer.alloc(0), truncated: false } };
|
|
135
|
-
let saved;
|
|
136
|
-
let status = { exitCode: null, exitSignal: null };
|
|
137
|
-
return {
|
|
138
|
-
file,
|
|
139
|
-
append(chunk, stdout) {
|
|
140
|
-
if (saved)
|
|
141
|
-
return;
|
|
142
|
-
const stream = stdout ? streams.stdout : streams.stderr;
|
|
143
|
-
const remaining = limit - stream.bytes.length;
|
|
144
|
-
stream.truncated ||= chunk.length > remaining;
|
|
145
|
-
if (remaining > 0)
|
|
146
|
-
stream.bytes = Buffer.concat([stream.bytes, chunk.subarray(0, remaining)]);
|
|
147
|
-
},
|
|
148
|
-
save(exitCode, exitSignal) {
|
|
149
|
-
status = { exitCode, exitSignal };
|
|
150
|
-
return saved ??= writeFile(file, JSON.stringify({ schema: 'spawnfile.training.daimon-native.child-diagnostics.v1', trialId, configSha256,
|
|
151
|
-
exitCode, exitSignal, limitBytesPerStream: limit,
|
|
152
|
-
stdout: streams.stdout.bytes.toString('utf8'), stderr: streams.stderr.bytes.toString('utf8'),
|
|
153
|
-
truncated: { stdout: streams.stdout.truncated, stderr: streams.stderr.truncated },
|
|
154
|
-
}) + '\n', { flag: 'wx', mode: 0o600 });
|
|
155
|
-
},
|
|
156
|
-
/**
|
|
157
|
-
* The durable half of the protected file above.
|
|
158
|
-
*
|
|
159
|
-
* The full capture stays in the control root, which on a training slot is
|
|
160
|
-
* tmpfs that dies with the container; this redacted record is what an
|
|
161
|
-
* operator can still read afterwards, and it always names the failure class
|
|
162
|
-
* even when the bytes themselves have to be withheld.
|
|
163
|
-
*/
|
|
164
|
-
/**
|
|
165
|
-
* The publishable record on its own, for a worker that died *after*
|
|
166
|
-
* readiness. Startup already published one; a mid-turn death published
|
|
167
|
-
* nothing at all, so the one account of why the worker stopped answering
|
|
168
|
-
* lived only in the protected file on the slot's tmpfs and died with the
|
|
169
|
-
* container. Same redaction, same withholding rules, no capture: this
|
|
170
|
-
* travels in the durable event stream, which outlives the container, and an
|
|
171
|
-
* unredacted capture has no business there.
|
|
172
|
-
*/
|
|
173
|
-
record(caught) {
|
|
174
|
-
return build(caught);
|
|
175
|
-
},
|
|
176
|
-
startupFailure(caught) {
|
|
177
|
-
const diagnostic = build(caught);
|
|
178
|
-
const raw = { stdout: streams.stdout.bytes.toString('utf8'), stderr: streams.stderr.bytes.toString('utf8') };
|
|
179
|
-
const capture = { basename: 'OPERATOR-ONLY.native-startup-capture.json',
|
|
180
|
-
content: `${JSON.stringify({ schema: 'spawnfile.training.daimon-native.operator-capture.v1', trialId, configSha256,
|
|
181
|
-
exitCode: status.exitCode, exitSignal: status.exitSignal, protectedArtifact: file,
|
|
182
|
-
limitBytesPerStream: limit, stdout: raw.stdout, stderr: raw.stderr,
|
|
183
|
-
truncated: { stdout: streams.stdout.truncated, stderr: streams.stderr.truncated } }, null, 2)}\n` };
|
|
184
|
-
return new NativeStartupFailure(`Native worker failed before readiness: ${diagnostic.reason}`, diagnostic, capture);
|
|
185
|
-
},
|
|
186
|
-
};
|
|
187
|
-
function build(caught) {
|
|
188
|
-
const fallback = caught instanceof Error ? caught.message : String(caught);
|
|
189
|
-
const raw = { stdout: streams.stdout.bytes.toString('utf8'), stderr: streams.stderr.bytes.toString('utf8') };
|
|
190
|
-
const out = redactNativeDiagnostic(raw.stdout, secrets);
|
|
191
|
-
const err = redactNativeDiagnostic(raw.stderr, secrets);
|
|
192
|
-
// Frames publish per field, so one unpublishable message never costs the whole account of the failure.
|
|
193
|
-
const frames = [...readFrames('stdout', raw.stdout, secrets) ?? [], ...readFrames('stderr', raw.stderr, secrets) ?? []];
|
|
194
|
-
const reason = redactNativeDiagnostic(classify(frames, status.exitCode, status.exitSignal, fallback), secrets);
|
|
195
|
-
const clean = out.clean && err.clean;
|
|
196
|
-
const withheld = [['stdout', raw.stdout, out], ['stderr', raw.stderr, err]]
|
|
197
|
-
.filter(([, , result]) => !result.clean)
|
|
198
|
-
.map(([stream, text, result]) => ({ stream, bytes: Buffer.byteLength(text), lines: lineCount(text),
|
|
199
|
-
frame: frames.find(row => row.stream === stream)?.schema ?? null, detectors: result.detectors }));
|
|
200
|
-
const diagnostic = {
|
|
201
|
-
schema: 'spawnfile.training.daimon-native.startup-diagnostic.v1', trialId,
|
|
202
|
-
// A withheld stream still leaves the class identified, so the reason is kept whenever it is itself clean.
|
|
203
|
-
reason: reason.clean ? truncate(reason.text) : 'Native worker failed before readiness; its stated reason could not be published safely',
|
|
204
|
-
exitCode: status.exitCode, exitSignal: status.exitSignal,
|
|
205
|
-
redaction: clean ? 'applied' : 'withheld',
|
|
206
|
-
...(clean ? { streams: { stdout: truncate(out.text), stderr: truncate(err.text),
|
|
207
|
-
truncated: { stdout: streams.stdout.truncated || out.text.length > published, stderr: streams.stderr.truncated || err.text.length > published } } } : {}),
|
|
208
|
-
...(frames.length ? { frames } : {}),
|
|
209
|
-
...(withheld.length ? { withheld } : {}),
|
|
210
|
-
protectedArtifact: file,
|
|
211
|
-
};
|
|
212
|
-
return diagnostic;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
//# sourceMappingURL=diagnostics.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../../../../../src/runtime/daimon/training/native/child/diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,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,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Real child/loopback protocol fixture only; it does not execute a model or prove
|
|
3
|
-
* sandboxing.
|
|
4
|
-
*
|
|
5
|
-
* `frames` names a file of terminal frames a REAL worker controller produced, one
|
|
6
|
-
* per wake. In that mode this fixture stops inventing evidence and replays them by
|
|
7
|
-
* wake id, which is the only way a test can put the worker's own poll and the
|
|
8
|
-
* parent's evidence reader on the same trial: the two halves live in different
|
|
9
|
-
* processes, and every fix that passed on one side alone went on to fail live.
|
|
10
|
-
*/
|
|
11
|
-
export declare function childFixture(mode?: string, frames?: string): Promise<{
|
|
12
|
-
root: string;
|
|
13
|
-
input: import("../../../../../training/index.js").SubjectStart;
|
|
14
|
-
launch: import("../receipt/schema.js").VerifiedNativeLaunch;
|
|
15
|
-
save(): Promise<void>;
|
|
16
|
-
}>;
|