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,266 +0,0 @@
|
|
|
1
|
-
import { describeNativeFailure, executionClosed, claimedExecution, disposedWakeExecution, deferredAfterCompletion, declaredLimitStop, DeclaredLimitStop } from './evidence/index.js';
|
|
2
|
-
export { describeNativeFailure, admittedExecutions, validateNativeFrame, executionClosed, claimedExecution, disposedWakeExecution, AMBIGUOUS_NATIVE_EXECUTION, AMBIGUOUS_WAKE_EXECUTION } from './evidence/index.js';
|
|
3
|
-
import { createDeliveryGate, engineWakeTimeoutMs } from './deliveries.js';
|
|
4
|
-
import { dirname, join } from 'node:path';
|
|
5
|
-
import { collectNativeEvidence, nativeUsageCoverage, readClosedTraces, wakeEvidenceFile, writeEvidence, settleNativeRead } from './evidence/index.js';
|
|
6
|
-
import { isGrokLaunch } from '../receipt/index.js';
|
|
7
|
-
import { createTransportDelivery, parseTransportSource, validateTransportExecutions } from './wake-delivery/index.js';
|
|
8
|
-
export function createWorkerController(host, config, options, token, launch, taskClock) {
|
|
9
|
-
const observation = {
|
|
10
|
-
wakeReceipt: (auth, id) => settleNativeRead('wake acceptance receipt', () => host.wakeReceipt(auth, id)),
|
|
11
|
-
activityV2: (auth) => settleNativeRead('activity acceptance/batch snapshot', () => host.activityV2(auth)),
|
|
12
|
-
availability: (auth) => settleNativeRead('availability snapshot', () => host.availability(auth)),
|
|
13
|
-
};
|
|
14
|
-
const agent = config.agents[0];
|
|
15
|
-
if (agent.engine.kind === 'grok' && (!launch || !isGrokLaunch(launch)))
|
|
16
|
-
throw new Error('Grok native trials require their Grok broker launch receipt');
|
|
17
|
-
const grok = launch && isGrokLaunch(launch) ? launch : undefined;
|
|
18
|
-
const usageFile = grok ? grok.broker.usageLedgerPath : join(options.controlRoot, 'usage.jsonl');
|
|
19
|
-
const source = grok ? { engine: 'grok', requestsFile: join(dirname(usageFile), 'requests.jsonl') } : { engine: 'codex' };
|
|
20
|
-
const cancellation = new AbortController();
|
|
21
|
-
const gate = createDeliveryGate(options.timeoutMs, agent.attention?.maxExecutions, launch?.delivery);
|
|
22
|
-
const wakeTimeoutMs = engineWakeTimeoutMs(options.timeoutMs, launch);
|
|
23
|
-
const transport = launch?.delivery === 'transport' ? createTransportDelivery(host, agent.id) : undefined;
|
|
24
|
-
/** This trial's delivery ordinal, so each wake's frame is filed under a name no later wake reuses. */
|
|
25
|
-
let delivered = 0;
|
|
26
|
-
let stopping;
|
|
27
|
-
const owned = (operation) => {
|
|
28
|
-
if (cancellation.signal.aborted)
|
|
29
|
-
return Promise.reject(new Error('Native trial cancelled'));
|
|
30
|
-
return new Promise((resolve, reject) => {
|
|
31
|
-
const aborted = () => reject(new Error('Native trial cancelled'));
|
|
32
|
-
cancellation.signal.addEventListener('abort', aborted, { once: true });
|
|
33
|
-
void operation.then(resolve, reject).finally(() => cancellation.signal.removeEventListener('abort', aborted));
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
const stop = () => {
|
|
37
|
-
cancellation.abort();
|
|
38
|
-
stopping ??= (async () => {
|
|
39
|
-
let timer;
|
|
40
|
-
try {
|
|
41
|
-
const native = await Promise.race([host.stop(), new Promise((_, reject) => {
|
|
42
|
-
timer = setTimeout(() => reject(new Error('Native shutdown deadline exceeded')), 5000);
|
|
43
|
-
})]);
|
|
44
|
-
return { schema: 'spawnfile.training.daimon-native.stop.v1', state: 'acknowledged', quiescence: 'unknown',
|
|
45
|
-
containmentVerification: 'parent-container-owner', native };
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
return { schema: 'spawnfile.training.daimon-native.stop.v1', state: 'unknown', quiescence: 'unknown',
|
|
49
|
-
containmentVerification: 'parent-container-owner', error: String(error) };
|
|
50
|
-
}
|
|
51
|
-
finally {
|
|
52
|
-
clearTimeout(timer);
|
|
53
|
-
}
|
|
54
|
-
})();
|
|
55
|
-
return stopping;
|
|
56
|
-
};
|
|
57
|
-
return {
|
|
58
|
-
// The HTTP observation routes used by child closure share the same readers.
|
|
59
|
-
host: { start: () => host.start(), stop: () => host.stop(), health: () => host.health(),
|
|
60
|
-
accept: value => host.accept(value), ...observation }, stop, ...(transport ? { transport } : {}),
|
|
61
|
-
async run(wakeId, text, controls, expectedSource) {
|
|
62
|
-
if (cancellation.signal.aborted)
|
|
63
|
-
throw new Error('Worker accepts exactly one native trial delivery');
|
|
64
|
-
const remaining = gate.begin(wakeId, text, controls, expectedSource);
|
|
65
|
-
const incoming = transport?.begin(wakeId, parseTransportSource(expectedSource));
|
|
66
|
-
const ordinal = ++delivered;
|
|
67
|
-
/**
|
|
68
|
-
* Every execution of this trial that is not this wake's, from the runtime's
|
|
69
|
-
* own account of them: the ones earlier wakes closed, and the ones it runs
|
|
70
|
-
* for another of this trial's deliveries while this wake waits. It is the
|
|
71
|
-
* set this wake's evidence is separated FROM, never a set anything is
|
|
72
|
-
* selected out of, and a member of it is this trial's own history rather
|
|
73
|
-
* than foreign work.
|
|
74
|
-
*/
|
|
75
|
-
const history = new Set(gate.executions);
|
|
76
|
-
/**
|
|
77
|
-
* That set at the moment it is read, with this wake's own execution taken
|
|
78
|
-
* back out of it — the one it bound AND the one the runtime claimed for this
|
|
79
|
-
* delivery, so a wake that failed before it could bind still keeps its own
|
|
80
|
-
* spend and its own trace on the frame it publishes.
|
|
81
|
-
*/
|
|
82
|
-
const others = () => [...history].filter(id => id !== executionId && id !== claimed);
|
|
83
|
-
const startedAt = new Date().toISOString();
|
|
84
|
-
let deliveryId = `${options.trialId}:${wakeId}`;
|
|
85
|
-
let receipt;
|
|
86
|
-
let activity;
|
|
87
|
-
let availability;
|
|
88
|
-
/** The execution the runtime bound to this delivery, once it has said which. */
|
|
89
|
-
let claimed;
|
|
90
|
-
let executionId;
|
|
91
|
-
let status;
|
|
92
|
-
let error;
|
|
93
|
-
let blocked;
|
|
94
|
-
let limit;
|
|
95
|
-
let native = { traces: [], usage: [], toolReceipts: [], modelContexts: [] };
|
|
96
|
-
let timedOut = false;
|
|
97
|
-
const timer = setTimeout(() => { timedOut = true; void stop(); }, remaining);
|
|
98
|
-
try {
|
|
99
|
-
// Whatever this trial had already closed before this delivery existed. The
|
|
100
|
-
// runtime home is asserted empty at startup and every trace in it is refused
|
|
101
|
-
// unless it is this agent's, so the rows here are this trial's earlier wakes
|
|
102
|
-
// by construction rather than by counting.
|
|
103
|
-
for (const trace of await owned(readClosedTraces(agent.runtimeHomePath, agent.id)))
|
|
104
|
-
history.add(trace.turn_id);
|
|
105
|
-
const accepted = incoming ? await owned(incoming.accepted) : await owned(host.accept({ token, agent_id: agent.id, delivery_id: deliveryId,
|
|
106
|
-
event: { version: 'noopolis.daimon.wake.v2', kind: 'manual', text, occurred_at: startedAt } }));
|
|
107
|
-
if (accepted.state !== 'accepted')
|
|
108
|
-
throw new Error(`Native acceptance refused: ${accepted.code}`);
|
|
109
|
-
if (incoming)
|
|
110
|
-
deliveryId = incoming.evidence.deliveryId;
|
|
111
|
-
for (;;) {
|
|
112
|
-
// Capture admission before any asynchronous snapshot/collection. A route
|
|
113
|
-
// request that enters or settles meanwhile requires another full pass.
|
|
114
|
-
const generation = incoming?.generation();
|
|
115
|
-
while (true) {
|
|
116
|
-
if (cancellation.signal.aborted)
|
|
117
|
-
throw new Error(timedOut ? 'Native trial deadline exceeded' : 'Native trial cancelled');
|
|
118
|
-
[receipt, activity, availability] = await owned(Promise.all([
|
|
119
|
-
observation.wakeReceipt(token, accepted.acceptance_id), observation.activityV2(token), observation.availability(token),
|
|
120
|
-
]));
|
|
121
|
-
if (!receipt || !activity || !availability)
|
|
122
|
-
throw new Error('Authenticated native control evidence disappeared');
|
|
123
|
-
if (receipt.delivery_id !== deliveryId || receipt.agent_id !== agent.id)
|
|
124
|
-
throw new Error('Native receipt identity mismatch');
|
|
125
|
-
if (!Array.isArray(activity.executions))
|
|
126
|
-
throw new Error('Native activity omitted execution authority');
|
|
127
|
-
// The runtime's own binding of this delivery to an execution, and its own
|
|
128
|
-
// account of everything else it is running for this trial meanwhile.
|
|
129
|
-
claimed = claimedExecution(receipt, activity, deliveryId, agent.id) ?? claimed;
|
|
130
|
-
incoming?.observe(receipt, activity, availability, claimed);
|
|
131
|
-
for (const row of activity.executions)
|
|
132
|
-
if (row.agent_id === agent.id)
|
|
133
|
-
history.add(row.execution_id);
|
|
134
|
-
if (!activity.executions.length) {
|
|
135
|
-
const traces = await readClosedTraces(agent.runtimeHomePath, agent.id, claimed !== undefined);
|
|
136
|
-
// The runtime's own binding first; only for a delivery it has disposed
|
|
137
|
-
// of, on a runtime admitting nothing, may this wake answer for the
|
|
138
|
-
// execution that closed inside its own window instead.
|
|
139
|
-
if (!incoming)
|
|
140
|
-
claimed ??= disposedWakeExecution(receipt, traces, history);
|
|
141
|
-
if (claimed) {
|
|
142
|
-
executionId = executionClosed(activity, receipt, traces, agent.id, claimed);
|
|
143
|
-
if (executionId) {
|
|
144
|
-
receipt = await owned(observation.wakeReceipt(token, accepted.acceptance_id));
|
|
145
|
-
activity = await owned(observation.activityV2(token));
|
|
146
|
-
availability = await owned(observation.availability(token));
|
|
147
|
-
if (!receipt || !activity || !availability)
|
|
148
|
-
throw new Error('Authenticated terminal control evidence disappeared');
|
|
149
|
-
if (receipt.delivery_id !== deliveryId)
|
|
150
|
-
throw new Error('Native receipt identity mismatch');
|
|
151
|
-
incoming?.observe(receipt, activity, availability, claimed);
|
|
152
|
-
executionId = executionClosed(activity, receipt, traces, agent.id, claimed);
|
|
153
|
-
if (executionId && (!incoming || incoming.closed(traces)))
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
const failure = availability.agents.find(row => row.agent_id === agent.id)?.error;
|
|
158
|
-
if (failure)
|
|
159
|
-
throw new Error(`Native execution failed before terminal telemetry: ${failure}`);
|
|
160
|
-
// Budget snapshots can pause immediately after this execution was admitted.
|
|
161
|
-
// Only its closed trace or the bounded deadline can establish completion.
|
|
162
|
-
}
|
|
163
|
-
await pause(100, cancellation.signal);
|
|
164
|
-
}
|
|
165
|
-
native = await owned(collectNativeEvidence(agent.runtimeHomePath, usageFile, agent.id, incoming ? undefined : executionId, agent.engine.model, incoming ? [] : others(), source));
|
|
166
|
-
if (cancellation.signal.aborted)
|
|
167
|
-
throw new Error('Native trial cancelled');
|
|
168
|
-
if (incoming) {
|
|
169
|
-
// Synchronously seal against route admission before deciding a terminal
|
|
170
|
-
// outcome. No in-flight acceptance can be omitted by this snapshot.
|
|
171
|
-
if (!incoming.seal(generation, native.traces)) {
|
|
172
|
-
await pause(100, cancellation.signal);
|
|
173
|
-
continue;
|
|
174
|
-
}
|
|
175
|
-
validateTransportExecutions(incoming.evidence, native, activity, agent.id, wakeTimeoutMs);
|
|
176
|
-
}
|
|
177
|
-
// The trace this wake's own execution closed, never whichever one came
|
|
178
|
-
// first: an unbound wake has no trace to speak for it, and reading another
|
|
179
|
-
// wake's would report that wake's disposition as this delivery's.
|
|
180
|
-
const trace = native.traces.find(row => row.turn_id === executionId);
|
|
181
|
-
const failure = availability.agents.find(row => row.agent_id === agent.id)?.error;
|
|
182
|
-
if (!native.usage.length) {
|
|
183
|
-
// Name what WAS observed: a bare "no usage" cannot distinguish a turn that never ran from
|
|
184
|
-
// one that ran without metering, and the runtime home is wiped with the slot.
|
|
185
|
-
const observed = `traces=${native.traces.length} contexts=${native.modelContexts.length} requests=${native.requests?.length ?? 0}`;
|
|
186
|
-
throw new Error(`Closed native execution omitted token usage evidence (${observed} receipt=${receipt.state} execution=${executionId ?? 'none'}${failure ? ` availability=${failure}` : ''})`);
|
|
187
|
-
}
|
|
188
|
-
if (!native.modelContexts.length)
|
|
189
|
-
throw new Error('Closed native execution omitted model identity evidence');
|
|
190
|
-
if (!failure && trace?.status === 'completed' && incoming?.evidence.deferredDeliveryIds.length) {
|
|
191
|
-
blocked = 'awaiting-external-input';
|
|
192
|
-
throw new Error('Native execution completed; transport batch deliveries blocked awaiting external input');
|
|
193
|
-
}
|
|
194
|
-
if (incoming?.evidence.unresolvedDeliveryIds.length)
|
|
195
|
-
throw new Error('Transport trial deliveries remain unresolved');
|
|
196
|
-
if (!failure && deferredAfterCompletion(receipt, trace))
|
|
197
|
-
blocked = 'awaiting-external-input';
|
|
198
|
-
if (receipt.state !== 'completed' || trace?.status !== 'completed' || failure) {
|
|
199
|
-
// The closed execution's own sealed limit row outranks the runtime's
|
|
200
|
-
// generic availability error, which that same limit is what raised.
|
|
201
|
-
const limit = declaredLimitStop(trace, native.usage, wakeTimeoutMs);
|
|
202
|
-
if (limit)
|
|
203
|
-
throw new DeclaredLimitStop(limit, describeNativeFailure(receipt, trace, native.usage));
|
|
204
|
-
throw new Error(failure ?? describeNativeFailure(receipt, trace, native.usage));
|
|
205
|
-
}
|
|
206
|
-
status = 'completed';
|
|
207
|
-
break;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
catch (failure) {
|
|
211
|
-
error = timedOut ? incoming && !incoming.evidence.deliveryId ? 'Transport delivery deadline exceeded: no matching delivery arrived'
|
|
212
|
-
: 'Native trial deadline exceeded' : failure instanceof Error ? failure.message : String(failure);
|
|
213
|
-
status = cancellation.signal.aborted && !timedOut ? 'cancelled' : 'failed';
|
|
214
|
-
// Thrown only synchronously after the cancellation check, so a deadline or abort never carries it.
|
|
215
|
-
if (failure instanceof DeclaredLimitStop)
|
|
216
|
-
limit = failure.limit;
|
|
217
|
-
if (!blocked)
|
|
218
|
-
await stop();
|
|
219
|
-
try {
|
|
220
|
-
native = await collectNativeEvidence(agent.runtimeHomePath, usageFile, agent.id, incoming ? undefined : executionId, agent.engine.model, incoming ? [] : others(), source);
|
|
221
|
-
}
|
|
222
|
-
catch (collectionError) {
|
|
223
|
-
blocked = undefined;
|
|
224
|
-
limit = undefined;
|
|
225
|
-
await stop();
|
|
226
|
-
error += `; evidence collection failed: ${String(collectionError)}`;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
finally {
|
|
230
|
-
clearTimeout(timer);
|
|
231
|
-
incoming?.finish();
|
|
232
|
-
}
|
|
233
|
-
const continuing = gate.finish(executionId, blocked === 'awaiting-external-input');
|
|
234
|
-
if (blocked && !continuing)
|
|
235
|
-
await stop();
|
|
236
|
-
const result = { schema: 'spawnfile.training.daimon-native.trial.v1', trialId: options.trialId, wakeId,
|
|
237
|
-
agentId: agent.id, model: agent.engine.model, ...(grok ? { engine: 'grok', reasoningEffort: grok.agent.reasoningEffort } : {}), configSha256: options.configSha256, scheduleOverride: 'disabled',
|
|
238
|
-
...(launch ? { preparation: { sourceConfigSha256: launch.sourceConfigSha256, instructions: launch.instructions, overrides: launch.overrides } } : {}),
|
|
239
|
-
...(incoming ? { transport: incoming.evidence } : {}), ...(taskClock ? { taskClock } : {}),
|
|
240
|
-
status, startedAt, completedAt: new Date().toISOString(), executionId, receipt, activity, availability, native,
|
|
241
|
-
...(blocked ? { blocked } : {}), ...(limit ? { limit } : {}),
|
|
242
|
-
coverage: [{ channel: 'tools', completeness: native.toolReceipts.length || native.traces.some(trace => trace.tools.length) ? 'partial' : 'absent', ordering: 'none' },
|
|
243
|
-
{ channel: 'output', completeness: 'absent', ordering: 'none' },
|
|
244
|
-
{ channel: 'usage', completeness: native.accounting?.coverage ?? nativeUsageCoverage(native, executionId), ordering: 'source' }],
|
|
245
|
-
...(error ? { error } : {}) };
|
|
246
|
-
// This wake's own frame first, under a name no other delivery of this trial
|
|
247
|
-
// writes, then the trial's latest frame. A trial that defers runs several
|
|
248
|
-
// wakes and each one's account is evidence about that wake: renaming over one
|
|
249
|
-
// file had the continuation's frame replace an assignment that really bound,
|
|
250
|
-
// and the earlier account no longer existed by the time anything read it.
|
|
251
|
-
await writeEvidence(wakeEvidenceFile(options.evidence, ordinal), result);
|
|
252
|
-
await writeEvidence(options.evidence, result);
|
|
253
|
-
return result;
|
|
254
|
-
},
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
function pause(milliseconds, signal) {
|
|
258
|
-
if (signal.aborted)
|
|
259
|
-
return Promise.resolve();
|
|
260
|
-
return new Promise(resolve => {
|
|
261
|
-
const done = () => { clearTimeout(timer); signal.removeEventListener('abort', done); resolve(); };
|
|
262
|
-
const timer = setTimeout(done, milliseconds);
|
|
263
|
-
signal.addEventListener('abort', done, { once: true });
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
//# sourceMappingURL=control.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"control.js","sourceRoot":"","sources":["../../../../../../src/runtime/daimon/training/native/worker/control.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACrL,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AACrN,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAyB,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACtJ,OAAO,EAAE,YAAY,EAAmD,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,2BAA2B,EAAgC,MAAM,0BAA0B,CAAC;AAmBpJ,MAAM,UAAU,sBAAsB,CA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E,QAAQ,EAAE,CAAC;gBAClI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;YAChC,4EAA4E;YAC5E,0EAA0E;YAC1E,8EAA8E;YAC9E,6EAA6E;YAC7E,0EAA0E;YAC1E,MAAM,aAAa,CAAC,gBAAgB,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;YACzE,MAAM,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC9C,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,KAAK,CAAC,YAAoB,EAAE,MAAmB;IACtD,IAAI,MAAM,CAAC,OAAO;QAAE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,MAAM,IAAI,GAAG,GAAS,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;QACxG,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QAC7C,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { type TransportDeliverySource } from './wake-delivery/index.js';
|
|
2
|
-
import { type NativeLaunch } from '../receipt/index.js';
|
|
3
|
-
export interface ExternalInputSource {
|
|
4
|
-
kind: string;
|
|
5
|
-
id: string;
|
|
6
|
-
sha256: string;
|
|
7
|
-
}
|
|
8
|
-
export interface DeliveryControls {
|
|
9
|
-
maxExternalDeliveries?: number;
|
|
10
|
-
source?: ExternalInputSource;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The most external continuations one trial may declare, and the wakes they cost.
|
|
14
|
-
*
|
|
15
|
-
* `MAX_TRIAL_WAKES` is the task delivery plus those continuations, and the worker's
|
|
16
|
-
* runtime wake ceiling is derived from it rather than declared beside it. That
|
|
17
|
-
* ceiling is published before any delivery arrives, so a separate number there
|
|
18
|
-
* drifts from what this gate admits — and it drifted to one, which is how a trial
|
|
19
|
-
* accepted a continuation the runtime would then never execute: the delivery stayed
|
|
20
|
-
* admitted, nothing ran, and the wake burned to the shared trial deadline.
|
|
21
|
-
*/
|
|
22
|
-
export declare const MAX_EXTERNAL_DELIVERIES = 3;
|
|
23
|
-
export declare const MAX_TRIAL_WAKES: number;
|
|
24
|
-
/** The per-wake timeout this worker hands Daimon: broker turn overrides may only lower the registration. */
|
|
25
|
-
export declare function engineWakeTimeoutMs(timeoutMs: number, launch: NativeLaunch | undefined): number;
|
|
26
|
-
export declare function verifyExternalSource(source: ExternalInputSource, text: string): void;
|
|
27
|
-
/**
|
|
28
|
-
* One task, explicitly bounded sequential external deliveries, never autonomous nudges.
|
|
29
|
-
*
|
|
30
|
-
* `maxExecutions` is the runtime's own per-agent execution policy. A budget this
|
|
31
|
-
* gate would admit above it is one whose later continuations could never execute,
|
|
32
|
-
* so it is refused here rather than deadlocking on the wake that cannot run.
|
|
33
|
-
*/
|
|
34
|
-
export declare function createDeliveryGate(timeoutMs: number, maxExecutions?: number, delivery?: 'direct' | 'transport'): {
|
|
35
|
-
executions: string[];
|
|
36
|
-
begin(wakeId: string, text: string, controls?: DeliveryControls, source?: TransportDeliverySource): number;
|
|
37
|
-
finish(executionId: string | undefined, awaitingInput: boolean): boolean;
|
|
38
|
-
};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { createHash } from 'node:crypto';
|
|
2
|
-
import { parseTransportSource } from './wake-delivery/index.js';
|
|
3
|
-
import { isGrokLaunch } from '../receipt/index.js';
|
|
4
|
-
/**
|
|
5
|
-
* The most external continuations one trial may declare, and the wakes they cost.
|
|
6
|
-
*
|
|
7
|
-
* `MAX_TRIAL_WAKES` is the task delivery plus those continuations, and the worker's
|
|
8
|
-
* runtime wake ceiling is derived from it rather than declared beside it. That
|
|
9
|
-
* ceiling is published before any delivery arrives, so a separate number there
|
|
10
|
-
* drifts from what this gate admits — and it drifted to one, which is how a trial
|
|
11
|
-
* accepted a continuation the runtime would then never execute: the delivery stayed
|
|
12
|
-
* admitted, nothing ran, and the wake burned to the shared trial deadline.
|
|
13
|
-
*/
|
|
14
|
-
export const MAX_EXTERNAL_DELIVERIES = 3;
|
|
15
|
-
export const MAX_TRIAL_WAKES = MAX_EXTERNAL_DELIVERIES + 1;
|
|
16
|
-
/** The per-wake timeout this worker hands Daimon: broker turn overrides may only lower the registration. */
|
|
17
|
-
export function engineWakeTimeoutMs(timeoutMs, launch) {
|
|
18
|
-
return launch && isGrokLaunch(launch) ? Math.min(timeoutMs, launch.broker.limits.timeoutMs) : timeoutMs;
|
|
19
|
-
}
|
|
20
|
-
export function verifyExternalSource(source, text) {
|
|
21
|
-
if (!source || Object.keys(source).sort().join(',') !== 'id,kind,sha256' ||
|
|
22
|
-
!/^[A-Za-z0-9][A-Za-z0-9._:-]{0,159}$/u.test(source.id) ||
|
|
23
|
-
!/^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$/u.test(source.kind) ||
|
|
24
|
-
source.sha256 !== `sha256:${createHash('sha256').update(text).digest('hex')}`) {
|
|
25
|
-
throw new Error('External input requires an exact bounded source identity and content digest');
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* One task, explicitly bounded sequential external deliveries, never autonomous nudges.
|
|
30
|
-
*
|
|
31
|
-
* `maxExecutions` is the runtime's own per-agent execution policy. A budget this
|
|
32
|
-
* gate would admit above it is one whose later continuations could never execute,
|
|
33
|
-
* so it is refused here rather than deadlocking on the wake that cannot run.
|
|
34
|
-
*/
|
|
35
|
-
export function createDeliveryGate(timeoutMs, maxExecutions = MAX_TRIAL_WAKES, delivery = 'direct') {
|
|
36
|
-
const wakes = new Set();
|
|
37
|
-
const executions = [];
|
|
38
|
-
let active = false;
|
|
39
|
-
let deferred = false;
|
|
40
|
-
let maximum = 0;
|
|
41
|
-
let deadline;
|
|
42
|
-
return {
|
|
43
|
-
executions,
|
|
44
|
-
begin(wakeId, text, controls = {}, source) {
|
|
45
|
-
if (Object.keys(controls).some(key => !['maxExternalDeliveries', 'source'].includes(key)))
|
|
46
|
-
throw new Error('Unknown delivery controls');
|
|
47
|
-
if (active || wakes.has(wakeId) || wakes.size > maximum || wakes.size > 0 && !deferred)
|
|
48
|
-
throw new Error('Worker accepts exactly one native trial delivery unless a bounded deferred continuation is declared');
|
|
49
|
-
if (!/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/u.test(wakeId) || delivery === 'direct' && !text.trim() || Buffer.byteLength(text) > 16384)
|
|
50
|
-
throw new Error('Invalid bounded trial delivery');
|
|
51
|
-
if (delivery === 'transport') {
|
|
52
|
-
const expected = parseTransportSource(source);
|
|
53
|
-
if (wakes.size && expected.deliveryId === undefined)
|
|
54
|
-
throw new Error('Transport continuation requires an exact delivery id');
|
|
55
|
-
}
|
|
56
|
-
else if (source !== undefined)
|
|
57
|
-
throw new Error('Direct delivery cannot declare a transport source');
|
|
58
|
-
if (!wakes.size) {
|
|
59
|
-
maximum = controls.maxExternalDeliveries ?? 0;
|
|
60
|
-
if (!Number.isSafeInteger(maximum) || maximum < 0 || maximum > MAX_EXTERNAL_DELIVERIES || controls.source)
|
|
61
|
-
throw new Error('Invalid external delivery bound');
|
|
62
|
-
if (maximum + 1 > maxExecutions)
|
|
63
|
-
throw new Error('Native execution policy admits fewer executions than the declared delivery budget');
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
if (controls.maxExternalDeliveries !== undefined || delivery === 'direct' && !controls.source)
|
|
67
|
-
throw new Error('Continuation requires a source and cannot change its delivery budget');
|
|
68
|
-
if (controls.source)
|
|
69
|
-
verifyExternalSource(controls.source, text);
|
|
70
|
-
}
|
|
71
|
-
deadline ??= Date.now() + timeoutMs;
|
|
72
|
-
if (Date.now() >= deadline)
|
|
73
|
-
throw new Error('Native trial deadline exceeded');
|
|
74
|
-
wakes.add(wakeId);
|
|
75
|
-
active = true;
|
|
76
|
-
deferred = false;
|
|
77
|
-
return deadline - Date.now();
|
|
78
|
-
},
|
|
79
|
-
finish(executionId, awaitingInput) {
|
|
80
|
-
if (executionId !== undefined) {
|
|
81
|
-
if (executions.includes(executionId))
|
|
82
|
-
throw new Error('Native execution ID was reused');
|
|
83
|
-
executions.push(executionId);
|
|
84
|
-
}
|
|
85
|
-
active = false;
|
|
86
|
-
deferred = awaitingInput;
|
|
87
|
-
return awaitingInput && wakes.size <= maximum;
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingURL=deliveries.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deliveries.js","sourceRoot":"","sources":["../../../../../../src/runtime/daimon/training/native/worker/deliveries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAgC,MAAM,0BAA0B,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAqB,MAAM,qBAAqB,CAAC;AAKtE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,eAAe,GAAG,uBAAuB,GAAG,CAAC,CAAC;AAE3D,4GAA4G;AAC5G,MAAM,UAAU,mBAAmB,CAAC,SAAiB,EAAE,MAAgC;IACrF,OAAO,MAAM,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,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M;oBAAE,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;gBACvL,IAAI,QAAQ,CAAC,MAAM;oBAAE,oBAAoB,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACnE,CAAC;YACD,QAAQ,KAAK,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;YACpC,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,QAAQ;gBAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;YAC9E,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAAC,MAAM,GAAG,IAAI,CAAC;YAAC,QAAQ,GAAG,KAAK,CAAC;YACnD,OAAO,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC/B,CAAC;QACD,MAAM,CAAC,WAA+B,EAAE,aAAsB;YAC5D,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;gBAC9B,IAAI,UAAU,CAAC,QAAQ,CAAC,WAAW,CAAC;oBAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;gBACxF,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC/B,CAAC;YACD,MAAM,GAAG,KAAK,CAAC;YACf,QAAQ,GAAG,aAAa,CAAC;YACzB,OAAO,aAAa,IAAI,KAAK,CAAC,IAAI,IAAI,OAAO,CAAC;QAChD,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { NativeEvidence, NativeEvidenceSource, NativeGrokUsage, NativeRequestUsage, NativeTrace, NativeTurnSeal } from '../types.js';
|
|
2
|
-
export declare function readClosedTraces(runtimeHome: string, agentId: string, settleEmpty?: boolean): Promise<NativeTrace[]>;
|
|
3
|
-
/**
|
|
4
|
-
* Complete observed terminal usage requires one matching, closed native execution.
|
|
5
|
-
*
|
|
6
|
-
* The single trace and single usage row are this WAKE's, not this trial's: what
|
|
7
|
-
* reaches here is already attributed to the bound execution, so a three-wake
|
|
8
|
-
* trial still arrives with one of each per wake. The arity states that nothing
|
|
9
|
-
* accounts for this execution twice, never how many wakes a trial may have.
|
|
10
|
-
*/
|
|
11
|
-
export declare function nativeUsageCoverage(native: NativeEvidence, executionId?: string): 'complete' | 'partial' | 'absent';
|
|
12
|
-
export declare function readToolReceipts(runtimeHome: string, agentId: string, engine?: NativeEvidenceSource['engine']): Promise<Record<string, unknown>[]>;
|
|
13
|
-
/**
|
|
14
|
-
* One wake's own evidence, separated from the rest of its trial's by attribution.
|
|
15
|
-
*
|
|
16
|
-
* `others` is the trial's other executions as the RUNTIME named them, never a
|
|
17
|
-
* count. Isolation is still refused where it can actually fail: a trace or row
|
|
18
|
-
* that is not this agent's, and a model context that is not the declared model.
|
|
19
|
-
* What is left is this trial's own work in a runtime home this worker asserted
|
|
20
|
-
* empty before it started, so an execution beside this wake's is its history.
|
|
21
|
-
*/
|
|
22
|
-
export declare function collectNativeEvidence(runtimeHome: string, usageFile: string, agentId: string, executionId: string | undefined, expectedModel: string, others?: readonly string[], source?: NativeEvidenceSource): Promise<NativeEvidence>;
|
|
23
|
-
/** Plausibility bound for one broker turn's notional USD (Daimon caps a turn at 10M tokens); larger values are malformed, not spend. */
|
|
24
|
-
export declare const GROK_TURN_NOTIONAL_USD_MAX = 100;
|
|
25
|
-
export declare const plausibleNotionalUsd: (value: unknown) => value is number;
|
|
26
|
-
/**
|
|
27
|
-
* The spend the broker sealed, read without a terminal frame to bind it to.
|
|
28
|
-
*
|
|
29
|
-
* The ordinary path binds every usage row to the closed execution the worker
|
|
30
|
-
* reported. When the worker never answers, that binding does not exist and the
|
|
31
|
-
* rows are still the only record of money already spent — the broker's proxy
|
|
32
|
-
* metered every request and seals a failed turn's partial usage exactly as it
|
|
33
|
-
* seals a completed one. So this reads the same ledger with the same strict
|
|
34
|
-
* schema and the same dedupe-by-`turn`, and simply has no execution to filter
|
|
35
|
-
* on; the per-slot ledger is wiped by every recycle, so its rows are this
|
|
36
|
-
* trial's. It is never the path a scored trial takes.
|
|
37
|
-
*/
|
|
38
|
-
export declare function readSealedGrokUsage(usageFile: string, agentId: string, expectedModel: string): Promise<NativeGrokUsage[]>;
|
|
39
|
-
export declare function assertFreshNativeEvidence(runtimeHome: string, usageFile: string, agentId: string, expectedModel: string, source?: NativeEvidenceSource): Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* The per-request rows the broker's proxy metered, read with no terminal frame
|
|
42
|
-
* to bind them to.
|
|
43
|
-
*
|
|
44
|
-
* The sibling of `readSealedGrokUsage` over the second stream the broker writes
|
|
45
|
-
* beside the usage ledger: one row per provider request, with the proxy's own
|
|
46
|
-
* `started_at`/`ended_at`. It is the only record that can tell a request that
|
|
47
|
-
* was issued and never answered (a row with a start and no end) from one that
|
|
48
|
-
* was never issued at all (no row) — the distinction a turn killed by its
|
|
49
|
-
* deadline cannot otherwise be diagnosed by. Same strict schema, same
|
|
50
|
-
* dedupe-by-`turn:request`, and no execution to filter on.
|
|
51
|
-
*/
|
|
52
|
-
export declare function readSealedGrokRequests(requestsFile: string, agentId: string, expectedModel: string): Promise<NativeRequestUsage[]>;
|
|
53
|
-
/** Broker-sealed terminal observations; validate before attribution and deduplicate replays. */
|
|
54
|
-
export declare function readSealedGrokTurnSeals(sealFile: string, agentId: string, expectedModel: string): Promise<NativeTurnSeal[]>;
|