spawnfile 0.1.32 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/auth/trainingAuth.d.ts +2 -5
- package/dist/cli/devCommands.d.ts +1 -1
- package/dist/cli/devCommands.js +0 -66
- package/dist/cli/runCli.d.ts +1 -4
- package/dist/cli/runCli.js +2 -2
- package/dist/cli/trainCommand.js +9 -15
- package/dist/cli/trainingBooted.d.ts +7 -0
- package/dist/cli/trainingBooted.js +41 -0
- package/dist/cli/trainingExecution.d.ts +4 -7
- package/dist/cli/trainingExecution.js +4 -32
- package/dist/compiler/containerArtifacts.js +0 -5
- package/dist/compiler/containerBackedMountRender.js +5 -1
- package/dist/compiler/containerDaimonBrokerRender.d.ts +5 -50
- package/dist/compiler/containerDaimonBrokerRender.js +7 -88
- package/dist/compiler/containerDaimonGatewayRender.d.ts +50 -0
- package/dist/compiler/containerDaimonGatewayRender.js +157 -0
- package/dist/compiler/containerDaimonGrokWorkerProvisioning.d.ts +2 -10
- package/dist/compiler/containerDaimonGrokWorkerProvisioning.js +13 -25
- package/dist/compiler/containerDaimonGrokWorkerRender.d.ts +11 -49
- package/dist/compiler/containerDaimonGrokWorkerRender.js +15 -39
- package/dist/compiler/containerDaimonStartupSupervision.d.ts +8 -0
- package/dist/compiler/containerDaimonStartupSupervision.js +39 -0
- package/dist/compiler/containerDaimonUidEntrypointRender.d.ts +1 -2
- package/dist/compiler/containerDaimonUidEntrypointRender.js +26 -46
- package/dist/compiler/containerRuntimeReadinessRender.js +1 -1
- package/dist/compiler/memoryArtifacts.js +0 -1
- package/dist/compiler/moltnetArtifacts.js +1 -17
- package/dist/compiler/moltnetClientConfig.js +1 -1
- package/dist/compiler/moltnetRuntimeConfig.js +0 -10
- package/dist/compiler/runProject.d.ts +1 -0
- package/dist/compiler/runProject.js +9 -3
- package/dist/compiler/runProjectAuth.js +2 -17
- package/dist/compiler/training/contract.d.ts +0 -2
- package/dist/compiler/training/contract.js +0 -2
- package/dist/compiler/training/execution.d.ts +1 -128
- package/dist/compiler/training/execution.js +7 -68
- package/dist/compiler/training/index.d.ts +0 -8
- package/dist/compiler/training/index.js +0 -7
- package/dist/compiler/training/output.d.ts +1 -0
- package/dist/compiler/training/output.js +1 -1
- package/dist/compiler/training/trial/boot.d.ts +53 -0
- package/dist/compiler/training/trial/boot.js +147 -0
- package/dist/compiler/training/trial/docker.d.ts +8 -0
- package/dist/compiler/training/trial/docker.js +22 -0
- package/dist/compiler/training/trial/gateway.d.ts +42 -0
- package/dist/compiler/training/trial/gateway.js +98 -0
- package/dist/compiler/training/trial/index.d.ts +4 -0
- package/dist/compiler/training/trial/index.js +4 -0
- package/dist/compiler/training/trial/launcher.d.ts +32 -0
- package/dist/compiler/training/trial/launcher.js +49 -0
- package/dist/compiler/training/trial/project.d.ts +11 -0
- package/dist/compiler/training/trial/project.js +31 -0
- package/dist/compiler/upReceipt.d.ts +2 -17
- package/dist/compiler/upReceipt.js +2 -17
- package/dist/deployment/artifactsExportPlan.js +2 -18
- package/dist/deployment/privateArtifactsExport.js +1 -1
- package/dist/dev/docker.d.ts +0 -5
- package/dist/dev/docker.js +0 -46
- package/dist/dev/index.d.ts +0 -1
- package/dist/dev/index.js +0 -1
- package/dist/dev/project.d.ts +0 -16
- package/dist/dev/project.js +1 -128
- package/dist/distribution/distributionReportSchema.js +1 -1
- package/dist/distribution/imageRuntimeAuth.js +3 -2
- package/dist/release/drainControl.d.ts +5 -19
- package/dist/release/drainControl.js +12 -67
- package/dist/report/types.d.ts +3 -6
- package/dist/runtime/common.d.ts +1 -1
- package/dist/runtime/common.js +1 -1
- package/dist/runtime/container.d.ts +2 -2
- package/dist/runtime/container.js +1 -39
- package/dist/runtime/daimon/config.js +6 -12
- package/dist/runtime/daimon/contractManifest.js +0 -1
- package/dist/runtime/daimon/contractManifestSchema.js +0 -1
- package/dist/runtime/daimon/control.d.ts +31 -0
- package/dist/runtime/daimon/control.js +83 -0
- package/dist/runtime/daimon/engineDescriptorSchema.js +0 -1
- package/dist/runtime/daimon/engineDescriptors.generated.d.ts +1 -1
- package/dist/runtime/daimon/engineDescriptors.generated.js +1 -2
- package/dist/runtime/daimon/engines.js +0 -1
- package/dist/runtime/daimon/gateway.d.ts +62 -0
- package/dist/runtime/daimon/gateway.js +77 -0
- package/dist/runtime/daimon/grokWorkerContract.d.ts +0 -5
- package/dist/runtime/daimon/grokWorkerContract.js +1 -13
- package/dist/runtime/daimon/index.d.ts +2 -0
- package/dist/runtime/daimon/index.js +2 -1
- package/dist/runtime/daimon/memory.js +1 -1
- package/dist/runtime/daimon/packageName.js +0 -1
- package/dist/runtime/daimon/runAuth.js +7 -4
- package/dist/runtime/daimon/runtimeIdentity.d.ts +2 -0
- package/dist/runtime/daimon/runtimeIdentity.js +2 -0
- package/dist/runtime/daimon/subscriptionRealms.d.ts +9 -3
- package/dist/runtime/daimon/subscriptionRealms.js +22 -13
- package/dist/runtime/daimon/testHelpers.d.ts +2 -0
- package/dist/runtime/{pi → daimon}/testHelpers.js +3 -3
- package/dist/runtime/daimon/training/booted/adapter.d.ts +46 -0
- package/dist/runtime/daimon/training/booted/adapter.js +59 -0
- package/dist/runtime/daimon/training/booted/adapter.js.map +1 -0
- package/dist/runtime/daimon/training/booted/index.d.ts +2 -0
- package/dist/runtime/daimon/training/booted/index.js +2 -0
- package/dist/runtime/daimon/training/booted/index.js.map +1 -0
- package/dist/runtime/daimon/training/index.d.ts +5 -0
- package/dist/runtime/daimon/training/index.js +8 -4
- package/dist/runtime/daimon/training/index.js.map +1 -1
- package/dist/runtime/daimon/training/providers/codex-subscription/index.js.map +1 -0
- package/dist/runtime/daimon/training/providers/codex-subscription/protocol.js.map +1 -0
- package/dist/runtime/daimon/training/providers/codex-subscription/provider.js.map +1 -0
- package/dist/runtime/daimon/training/providers/codex-subscription/strict-schema.js.map +1 -0
- package/dist/runtime/daimon/training/providers/grok-subscription/cli.d.ts +1 -3
- package/dist/runtime/daimon/training/providers/grok-subscription/cli.js +5 -5
- package/dist/runtime/daimon/training/providers/grok-subscription/cli.js.map +1 -1
- package/dist/runtime/daimon/training/providers/grok-subscription/index.d.ts +1 -2
- package/dist/runtime/daimon/training/providers/grok-subscription/index.js +0 -1
- package/dist/runtime/daimon/training/providers/grok-subscription/index.js.map +1 -1
- package/dist/runtime/daimon/training/providers/grok-subscription/protocol.d.ts +5 -17
- package/dist/runtime/daimon/training/providers/grok-subscription/protocol.js +18 -31
- package/dist/runtime/daimon/training/providers/grok-subscription/protocol.js.map +1 -1
- package/dist/runtime/daimon/training/providers/grok-subscription/provider.js +1 -2
- package/dist/runtime/daimon/training/providers/grok-subscription/provider.js.map +1 -1
- package/dist/runtime/daimon/wakeMoments.js +0 -1
- package/dist/runtime/install.js +0 -21
- package/dist/runtime/registry.js +0 -2
- package/dist/runtime/trainingGraderProviders.js +1 -1
- package/dist/runtime/trainingProviders.d.ts +1 -2
- package/dist/runtime/trainingProviders.js +9 -19
- package/dist/runtime/trainingSubjects.d.ts +0 -121
- package/dist/runtime/trainingSubjects.js +2 -13
- package/dist/runtime/types.d.ts +1 -8
- package/dist/shared/errors.js +0 -1
- package/dist/status/lifecycleProbes.js +3 -6
- package/dist/status/moltnetWiringProbes.js +1 -17
- package/dist/training/subjects/index.d.ts +0 -1
- package/dist/training/subjects/index.js +0 -1
- package/dist/training/subjects/index.js.map +1 -1
- package/examples/README.md +0 -1
- package/examples/daimon-org/agents/mapper/Spawnfile +4 -1
- package/examples/daimon-org/teams/review/agents/reviewer/Spawnfile +4 -1
- package/examples/jungian-daimon-org/teams/luna/agents/animus/Spawnfile +5 -8
- package/examples/jungian-daimon-org/teams/luna/agents/representative/Spawnfile +1 -1
- package/examples/jungian-daimon-org/teams/luna/agents/shadow/Spawnfile +5 -8
- package/examples/jungian-daimon-org/teams/selene/agents/animus/Spawnfile +5 -8
- package/examples/jungian-daimon-org/teams/selene/agents/representative/Spawnfile +5 -8
- package/examples/jungian-daimon-org/teams/selene/agents/shadow/Spawnfile +1 -1
- package/examples/mixed-runtime-org/agents/localist/Spawnfile +7 -7
- package/package.json +4 -13
- package/runtimes.yaml +5 -15
- package/dist/compiler/containerDaimonGrokTaskClock.d.ts +0 -5
- package/dist/compiler/containerDaimonGrokTaskClock.js +0 -29
- package/dist/compiler/daimonTelemetryArtifacts.d.ts +0 -22
- package/dist/compiler/daimonTelemetryArtifacts.js +0 -56
- package/dist/compiler/training/broker/clockProbe.d.ts +0 -6
- package/dist/compiler/training/broker/clockProbe.js +0 -27
- package/dist/compiler/training/broker/declaration.d.ts +0 -54
- package/dist/compiler/training/broker/declaration.js +0 -70
- package/dist/compiler/training/broker/entrypoint.d.ts +0 -39
- package/dist/compiler/training/broker/entrypoint.js +0 -124
- package/dist/compiler/training/broker/evaluatorSecrets.d.ts +0 -2
- package/dist/compiler/training/broker/evaluatorSecrets.js +0 -62
- package/dist/compiler/training/broker/index.d.ts +0 -12
- package/dist/compiler/training/broker/index.js +0 -12
- package/dist/compiler/training/broker/main.d.ts +0 -2
- package/dist/compiler/training/broker/main.js +0 -14
- package/dist/compiler/training/broker/paths.d.ts +0 -236
- package/dist/compiler/training/broker/paths.js +0 -249
- package/dist/compiler/training/broker/processes.d.ts +0 -51
- package/dist/compiler/training/broker/processes.js +0 -102
- package/dist/compiler/training/broker/projection.d.ts +0 -61
- package/dist/compiler/training/broker/projection.js +0 -109
- package/dist/compiler/training/broker/provisioning.d.ts +0 -78
- package/dist/compiler/training/broker/provisioning.js +0 -231
- package/dist/compiler/training/broker/receipt.d.ts +0 -77
- package/dist/compiler/training/broker/receipt.js +0 -110
- package/dist/compiler/training/broker/recycleClient.d.ts +0 -33
- package/dist/compiler/training/broker/recycleClient.js +0 -112
- package/dist/compiler/training/broker/registration.d.ts +0 -46
- package/dist/compiler/training/broker/registration.js +0 -113
- package/dist/compiler/training/broker/reset.d.ts +0 -9
- package/dist/compiler/training/broker/reset.js +0 -71
- package/dist/compiler/training/broker/rootScript.d.ts +0 -32
- package/dist/compiler/training/broker/rootScript.js +0 -33
- package/dist/compiler/training/broker/runtime.d.ts +0 -22
- package/dist/compiler/training/broker/runtime.js +0 -128
- package/dist/compiler/training/broker/seccompRoutes.d.ts +0 -31
- package/dist/compiler/training/broker/seccompRoutes.js +0 -36
- package/dist/compiler/training/broker/supervisor.d.ts +0 -108
- package/dist/compiler/training/broker/supervisor.js +0 -172
- package/dist/compiler/training/broker/taskClock.d.ts +0 -5
- package/dist/compiler/training/broker/taskClock.js +0 -41
- package/dist/compiler/training/container/contract.d.ts +0 -54
- package/dist/compiler/training/container/contract.js +0 -52
- package/dist/compiler/training/container/evaluators.d.ts +0 -48
- package/dist/compiler/training/container/evaluators.js +0 -50
- package/dist/compiler/training/container/grokWriteback.d.ts +0 -8
- package/dist/compiler/training/container/grokWriteback.js +0 -26
- package/dist/compiler/training/container/index.d.ts +0 -5
- package/dist/compiler/training/container/index.js +0 -3
- package/dist/compiler/training/container/launch.d.ts +0 -21
- package/dist/compiler/training/container/launch.js +0 -280
- package/dist/compiler/training/container/nativeSlots.d.ts +0 -14
- package/dist/compiler/training/container/nativeSlots.js +0 -13
- package/dist/compiler/training/container/outputCopy.d.ts +0 -2
- package/dist/compiler/training/container/outputCopy.js +0 -72
- package/dist/compiler/training/container/outputVolume.d.ts +0 -28
- package/dist/compiler/training/container/outputVolume.js +0 -185
- package/dist/compiler/training/container/prepare.d.ts +0 -10
- package/dist/compiler/training/container/prepare.js +0 -125
- package/dist/compiler/training/container/process.d.ts +0 -14
- package/dist/compiler/training/container/process.js +0 -70
- package/dist/compiler/training/container/security.d.ts +0 -38
- package/dist/compiler/training/container/security.js +0 -68
- package/dist/compiler/training/container/subjectIsolation.d.ts +0 -5
- package/dist/compiler/training/container/subjectIsolation.js +0 -16
- package/dist/compiler/training/preparation/assets/Dockerfile +0 -100
- package/dist/compiler/training/preparation/assets/package-lock.json +0 -5483
- package/dist/compiler/training/preparation/broker.d.ts +0 -30
- package/dist/compiler/training/preparation/broker.js +0 -68
- package/dist/compiler/training/preparation/contextModes.d.ts +0 -12
- package/dist/compiler/training/preparation/contextModes.js +0 -38
- package/dist/compiler/training/preparation/contract.d.ts +0 -203
- package/dist/compiler/training/preparation/contract.js +0 -114
- package/dist/compiler/training/preparation/copyAssets.d.ts +0 -1
- package/dist/compiler/training/preparation/copyAssets.js +0 -8
- package/dist/compiler/training/preparation/daimonParent.d.ts +0 -42
- package/dist/compiler/training/preparation/daimonParent.js +0 -114
- package/dist/compiler/training/preparation/files.d.ts +0 -29
- package/dist/compiler/training/preparation/files.js +0 -146
- package/dist/compiler/training/preparation/image.d.ts +0 -28
- package/dist/compiler/training/preparation/image.js +0 -105
- package/dist/compiler/training/preparation/index.d.ts +0 -3
- package/dist/compiler/training/preparation/index.js +0 -2
- package/dist/compiler/training/preparation/inputs.d.ts +0 -24
- package/dist/compiler/training/preparation/inputs.js +0 -101
- package/dist/compiler/training/preparation/prepare.d.ts +0 -38
- package/dist/compiler/training/preparation/prepare.js +0 -224
- package/dist/compiler/training/preparation/scratch.d.ts +0 -8
- package/dist/compiler/training/preparation/scratch.js +0 -114
- package/dist/compiler/training/repair/compatibility.d.ts +0 -11
- package/dist/compiler/training/repair/compatibility.js +0 -45
- package/dist/compiler/training/repair/contract.d.ts +0 -832
- package/dist/compiler/training/repair/contract.js +0 -34
- package/dist/compiler/training/repair/index.d.ts +0 -3
- package/dist/compiler/training/repair/index.js +0 -3
- package/dist/compiler/training/repair/prepare.d.ts +0 -378
- package/dist/compiler/training/repair/prepare.js +0 -84
- package/dist/compiler/training/repair/witness.d.ts +0 -348
- package/dist/compiler/training/repair/witness.js +0 -62
- package/dist/compiler/training/subjectDeclaration.d.ts +0 -26
- package/dist/compiler/training/subjectDeclaration.js +0 -54
- package/dist/compiler/training/subjectLease.d.ts +0 -115
- package/dist/compiler/training/subjectLease.js +0 -179
- package/dist/dev/activity.d.ts +0 -14
- package/dist/dev/activity.js +0 -48
- package/dist/runtime/codex-exec/training/adapter.d.ts +0 -13
- package/dist/runtime/codex-exec/training/adapter.js +0 -101
- package/dist/runtime/codex-exec/training/adapter.js.map +0 -1
- package/dist/runtime/codex-exec/training/environment.d.ts +0 -3
- package/dist/runtime/codex-exec/training/environment.js +0 -26
- package/dist/runtime/codex-exec/training/environment.js.map +0 -1
- package/dist/runtime/codex-exec/training/index.d.ts +0 -2
- package/dist/runtime/codex-exec/training/index.js +0 -3
- package/dist/runtime/codex-exec/training/index.js.map +0 -1
- package/dist/runtime/codex-exec/training/protocol.d.ts +0 -15
- package/dist/runtime/codex-exec/training/protocol.js +0 -102
- package/dist/runtime/codex-exec/training/protocol.js.map +0 -1
- package/dist/runtime/codex-exec/training/providers/codex-subscription/index.js.map +0 -1
- package/dist/runtime/codex-exec/training/providers/codex-subscription/protocol.js.map +0 -1
- package/dist/runtime/codex-exec/training/providers/codex-subscription/provider.js.map +0 -1
- package/dist/runtime/codex-exec/training/providers/codex-subscription/strict-schema.js.map +0 -1
- package/dist/runtime/daimon/contractManifest.js.map +0 -1
- package/dist/runtime/daimon/contractManifestSchema.js.map +0 -1
- package/dist/runtime/daimon/engineDescriptorSchema.js.map +0 -1
- package/dist/runtime/daimon/engineDescriptors.generated.js.map +0 -1
- package/dist/runtime/daimon/engines.js.map +0 -1
- package/dist/runtime/daimon/index.js.map +0 -1
- package/dist/runtime/daimon/packageName.js.map +0 -1
- package/dist/runtime/daimon/training/legacy/adapter.d.ts +0 -11
- package/dist/runtime/daimon/training/legacy/adapter.js +0 -175
- package/dist/runtime/daimon/training/legacy/adapter.js.map +0 -1
- package/dist/runtime/daimon/training/legacy/index.d.ts +0 -2
- package/dist/runtime/daimon/training/legacy/index.js +0 -3
- package/dist/runtime/daimon/training/legacy/index.js.map +0 -1
- package/dist/runtime/daimon/training/legacy/public.d.ts +0 -49
- package/dist/runtime/daimon/training/legacy/public.js +0 -16
- package/dist/runtime/daimon/training/legacy/public.js.map +0 -1
- package/dist/runtime/daimon/training/native/adapter.d.ts +0 -18
- package/dist/runtime/daimon/training/native/adapter.js +0 -252
- package/dist/runtime/daimon/training/native/adapter.js.map +0 -1
- package/dist/runtime/daimon/training/native/admission.d.ts +0 -7
- package/dist/runtime/daimon/training/native/admission.js +0 -52
- package/dist/runtime/daimon/training/native/admission.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/arguments.d.ts +0 -16
- package/dist/runtime/daimon/training/native/child/arguments.js +0 -70
- package/dist/runtime/daimon/training/native/child/arguments.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/deferred-trial.d.ts +0 -24
- package/dist/runtime/daimon/training/native/child/deferred-trial.js +0 -63
- package/dist/runtime/daimon/training/native/child/deferred-trial.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/diagnostics.d.ts +0 -58
- package/dist/runtime/daimon/training/native/child/diagnostics.js +0 -215
- package/dist/runtime/daimon/training/native/child/diagnostics.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/fixture.d.ts +0 -16
- package/dist/runtime/daimon/training/native/child/fixture.js +0 -159
- package/dist/runtime/daimon/training/native/child/fixture.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/grok.d.ts +0 -14
- package/dist/runtime/daimon/training/native/child/grok.js +0 -47
- package/dist/runtime/daimon/training/native/child/grok.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/index.d.ts +0 -7
- package/dist/runtime/daimon/training/native/child/index.js +0 -5
- package/dist/runtime/daimon/training/native/child/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/lifecycle.d.ts +0 -40
- package/dist/runtime/daimon/training/native/child/lifecycle.js +0 -400
- package/dist/runtime/daimon/training/native/child/lifecycle.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/probe.d.ts +0 -2
- package/dist/runtime/daimon/training/native/child/probe.js +0 -11
- package/dist/runtime/daimon/training/native/child/probe.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/sandbox.d.ts +0 -4
- package/dist/runtime/daimon/training/native/child/sandbox.js +0 -76
- package/dist/runtime/daimon/training/native/child/sandbox.js.map +0 -1
- package/dist/runtime/daimon/training/native/child/types.d.ts +0 -15
- package/dist/runtime/daimon/training/native/child/types.js +0 -2
- package/dist/runtime/daimon/training/native/child/types.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/docker.d.ts +0 -29
- package/dist/runtime/daimon/training/native/container/docker.js +0 -105
- package/dist/runtime/daimon/training/native/container/docker.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/grok-slot.d.ts +0 -22
- package/dist/runtime/daimon/training/native/container/grok-slot.js +0 -38
- package/dist/runtime/daimon/training/native/container/grok-slot.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/index.d.ts +0 -6
- package/dist/runtime/daimon/training/native/container/index.js +0 -6
- package/dist/runtime/daimon/training/native/container/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/lifecycle.d.ts +0 -8
- package/dist/runtime/daimon/training/native/container/lifecycle.js +0 -111
- package/dist/runtime/daimon/training/native/container/lifecycle.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/manifest.d.ts +0 -17
- package/dist/runtime/daimon/training/native/container/manifest.js +0 -164
- package/dist/runtime/daimon/training/native/container/manifest.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/native-preflight.d.ts +0 -8
- package/dist/runtime/daimon/training/native/container/native-preflight.js +0 -40
- package/dist/runtime/daimon/training/native/container/native-preflight.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/preflight.d.ts +0 -15
- package/dist/runtime/daimon/training/native/container/preflight.js +0 -79
- package/dist/runtime/daimon/training/native/container/preflight.js.map +0 -1
- package/dist/runtime/daimon/training/native/container/slot.d.ts +0 -4
- package/dist/runtime/daimon/training/native/container/slot.js +0 -58
- package/dist/runtime/daimon/training/native/container/slot.js.map +0 -1
- package/dist/runtime/daimon/training/native/external.d.ts +0 -37
- package/dist/runtime/daimon/training/native/external.js +0 -75
- package/dist/runtime/daimon/training/native/external.js.map +0 -1
- package/dist/runtime/daimon/training/native/grants/authority.d.ts +0 -36
- package/dist/runtime/daimon/training/native/grants/authority.js +0 -49
- package/dist/runtime/daimon/training/native/grants/authority.js.map +0 -1
- package/dist/runtime/daimon/training/native/grants/index.d.ts +0 -2
- package/dist/runtime/daimon/training/native/grants/index.js +0 -3
- package/dist/runtime/daimon/training/native/grants/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/grants/pins.d.ts +0 -30
- package/dist/runtime/daimon/training/native/grants/pins.js +0 -20
- package/dist/runtime/daimon/training/native/grants/pins.js.map +0 -1
- package/dist/runtime/daimon/training/native/grants/test-socket.d.ts +0 -6
- package/dist/runtime/daimon/training/native/grants/test-socket.js +0 -35
- package/dist/runtime/daimon/training/native/grants/test-socket.js.map +0 -1
- package/dist/runtime/daimon/training/native/grok-fixtures.d.ts +0 -34
- package/dist/runtime/daimon/training/native/grok-fixtures.js +0 -179
- package/dist/runtime/daimon/training/native/grok-fixtures.js.map +0 -1
- package/dist/runtime/daimon/training/native/index.d.ts +0 -38
- package/dist/runtime/daimon/training/native/index.js +0 -27
- package/dist/runtime/daimon/training/native/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/live-checkout.d.ts +0 -2
- package/dist/runtime/daimon/training/native/live-checkout.js +0 -15
- package/dist/runtime/daimon/training/native/live-checkout.js.map +0 -1
- package/dist/runtime/daimon/training/native/observations.d.ts +0 -51
- package/dist/runtime/daimon/training/native/observations.js +0 -217
- package/dist/runtime/daimon/training/native/observations.js.map +0 -1
- package/dist/runtime/daimon/training/native/outcome.d.ts +0 -13
- package/dist/runtime/daimon/training/native/outcome.js +0 -37
- package/dist/runtime/daimon/training/native/outcome.js.map +0 -1
- package/dist/runtime/daimon/training/native/preparation/engine-config.d.ts +0 -21
- package/dist/runtime/daimon/training/native/preparation/engine-config.js +0 -30
- package/dist/runtime/daimon/training/native/preparation/engine-config.js.map +0 -1
- package/dist/runtime/daimon/training/native/preparation/fixtures.d.ts +0 -17
- package/dist/runtime/daimon/training/native/preparation/fixtures.js +0 -52
- package/dist/runtime/daimon/training/native/preparation/fixtures.js.map +0 -1
- package/dist/runtime/daimon/training/native/preparation/index.d.ts +0 -7
- package/dist/runtime/daimon/training/native/preparation/index.js +0 -5
- package/dist/runtime/daimon/training/native/preparation/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/preparation/layout.d.ts +0 -66
- package/dist/runtime/daimon/training/native/preparation/layout.js +0 -87
- package/dist/runtime/daimon/training/native/preparation/layout.js.map +0 -1
- package/dist/runtime/daimon/training/native/preparation/subject.d.ts +0 -14
- package/dist/runtime/daimon/training/native/preparation/subject.js +0 -67
- package/dist/runtime/daimon/training/native/preparation/subject.js.map +0 -1
- package/dist/runtime/daimon/training/native/preparation/types.d.ts +0 -69
- package/dist/runtime/daimon/training/native/preparation/types.js +0 -2
- package/dist/runtime/daimon/training/native/preparation/types.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/artifacts.d.ts +0 -25
- package/dist/runtime/daimon/training/native/receipt/artifacts.js +0 -32
- package/dist/runtime/daimon/training/native/receipt/artifacts.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/grok-clocked-pins.d.ts +0 -129
- package/dist/runtime/daimon/training/native/receipt/grok-clocked-pins.js +0 -45
- package/dist/runtime/daimon/training/native/receipt/grok-clocked-pins.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/grok.d.ts +0 -246
- package/dist/runtime/daimon/training/native/receipt/grok.js +0 -195
- package/dist/runtime/daimon/training/native/receipt/grok.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/index.d.ts +0 -11
- package/dist/runtime/daimon/training/native/receipt/index.js +0 -8
- package/dist/runtime/daimon/training/native/receipt/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/paths.d.ts +0 -3
- package/dist/runtime/daimon/training/native/receipt/paths.js +0 -18
- package/dist/runtime/daimon/training/native/receipt/paths.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/sandbox.d.ts +0 -42
- package/dist/runtime/daimon/training/native/receipt/sandbox.js +0 -35
- package/dist/runtime/daimon/training/native/receipt/sandbox.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/schema.d.ts +0 -490
- package/dist/runtime/daimon/training/native/receipt/schema.js +0 -138
- package/dist/runtime/daimon/training/native/receipt/schema.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/subscription.d.ts +0 -13
- package/dist/runtime/daimon/training/native/receipt/subscription.js +0 -13
- package/dist/runtime/daimon/training/native/receipt/subscription.js.map +0 -1
- package/dist/runtime/daimon/training/native/receipt/task-clock.d.ts +0 -19
- package/dist/runtime/daimon/training/native/receipt/task-clock.js +0 -49
- package/dist/runtime/daimon/training/native/receipt/task-clock.js.map +0 -1
- package/dist/runtime/daimon/training/native/sealed-usage.d.ts +0 -218
- package/dist/runtime/daimon/training/native/sealed-usage.js +0 -261
- package/dist/runtime/daimon/training/native/sealed-usage.js.map +0 -1
- package/dist/runtime/daimon/training/native/test-fixtures.d.ts +0 -27
- package/dist/runtime/daimon/training/native/test-fixtures.js +0 -162
- package/dist/runtime/daimon/training/native/test-fixtures.js.map +0 -1
- package/dist/runtime/daimon/training/native/transcript.d.ts +0 -96
- package/dist/runtime/daimon/training/native/transcript.js +0 -239
- package/dist/runtime/daimon/training/native/transcript.js.map +0 -1
- package/dist/runtime/daimon/training/native/transport/delivery.d.ts +0 -27
- package/dist/runtime/daimon/training/native/transport/delivery.js +0 -98
- package/dist/runtime/daimon/training/native/transport/delivery.js.map +0 -1
- package/dist/runtime/daimon/training/native/transport/http.d.ts +0 -3
- package/dist/runtime/daimon/training/native/transport/http.js +0 -81
- package/dist/runtime/daimon/training/native/transport/http.js.map +0 -1
- package/dist/runtime/daimon/training/native/transport/index.d.ts +0 -4
- package/dist/runtime/daimon/training/native/transport/index.js +0 -3
- package/dist/runtime/daimon/training/native/transport/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/transport/types.d.ts +0 -15
- package/dist/runtime/daimon/training/native/transport/types.js +0 -2
- package/dist/runtime/daimon/training/native/transport/types.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/cli.d.ts +0 -1
- package/dist/runtime/daimon/training/native/worker/cli.js +0 -17
- package/dist/runtime/daimon/training/native/worker/cli.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/control.d.ts +0 -20
- package/dist/runtime/daimon/training/native/worker/control.js +0 -266
- package/dist/runtime/daimon/training/native/worker/control.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/deliveries.d.ts +0 -38
- package/dist/runtime/daimon/training/native/worker/deliveries.js +0 -91
- package/dist/runtime/daimon/training/native/worker/deliveries.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/evidence/collect.d.ts +0 -54
- package/dist/runtime/daimon/training/native/worker/evidence/collect.js +0 -278
- package/dist/runtime/daimon/training/native/worker/evidence/collect.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/evidence/execution.d.ts +0 -102
- package/dist/runtime/daimon/training/native/worker/evidence/execution.js +0 -191
- package/dist/runtime/daimon/training/native/worker/evidence/execution.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/evidence/index.d.ts +0 -3
- package/dist/runtime/daimon/training/native/worker/evidence/index.js +0 -4
- package/dist/runtime/daimon/training/native/worker/evidence/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/evidence/io.d.ts +0 -20
- package/dist/runtime/daimon/training/native/worker/evidence/io.js +0 -130
- package/dist/runtime/daimon/training/native/worker/evidence/io.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/evidence/seal.d.ts +0 -3
- package/dist/runtime/daimon/training/native/worker/evidence/seal.js +0 -67
- package/dist/runtime/daimon/training/native/worker/evidence/seal.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/index.d.ts +0 -11
- package/dist/runtime/daimon/training/native/worker/index.js +0 -8
- package/dist/runtime/daimon/training/native/worker/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/profile.d.ts +0 -23
- package/dist/runtime/daimon/training/native/worker/profile.js +0 -149
- package/dist/runtime/daimon/training/native/worker/profile.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/public.d.ts +0 -53
- package/dist/runtime/daimon/training/native/worker/public.js +0 -22
- package/dist/runtime/daimon/training/native/worker/public.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/sandbox.d.ts +0 -4
- package/dist/runtime/daimon/training/native/worker/sandbox.js +0 -54
- package/dist/runtime/daimon/training/native/worker/sandbox.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/server.d.ts +0 -4
- package/dist/runtime/daimon/training/native/worker/server.js +0 -102
- package/dist/runtime/daimon/training/native/worker/server.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/types.d.ts +0 -318
- package/dist/runtime/daimon/training/native/worker/types.js +0 -2
- package/dist/runtime/daimon/training/native/worker/types.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/wake-delivery/index.d.ts +0 -4
- package/dist/runtime/daimon/training/native/worker/wake-delivery/index.js +0 -4
- package/dist/runtime/daimon/training/native/worker/wake-delivery/index.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/wake-delivery/source.d.ts +0 -3
- package/dist/runtime/daimon/training/native/worker/wake-delivery/source.js +0 -16
- package/dist/runtime/daimon/training/native/worker/wake-delivery/source.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/wake-delivery/terminal.d.ts +0 -4
- package/dist/runtime/daimon/training/native/worker/wake-delivery/terminal.js +0 -52
- package/dist/runtime/daimon/training/native/worker/wake-delivery/terminal.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/wake-delivery/transport.d.ts +0 -21
- package/dist/runtime/daimon/training/native/worker/wake-delivery/transport.js +0 -198
- package/dist/runtime/daimon/training/native/worker/wake-delivery/transport.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/wake-delivery/types.d.ts +0 -91
- package/dist/runtime/daimon/training/native/worker/wake-delivery/types.js +0 -2
- package/dist/runtime/daimon/training/native/worker/wake-delivery/types.js.map +0 -1
- package/dist/runtime/daimon/training/native/worker/worker.d.ts +0 -1
- package/dist/runtime/daimon/training/native/worker/worker.js +0 -105
- package/dist/runtime/daimon/training/native/worker/worker.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-broker/broker.d.ts +0 -20
- package/dist/runtime/daimon/training/providers/grok-broker/broker.js +0 -55
- package/dist/runtime/daimon/training/providers/grok-broker/broker.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-broker/grant-fixtures.d.ts +0 -15
- package/dist/runtime/daimon/training/providers/grok-broker/grant-fixtures.js +0 -29
- package/dist/runtime/daimon/training/providers/grok-broker/grant-fixtures.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-broker/grant-home.d.ts +0 -16
- package/dist/runtime/daimon/training/providers/grok-broker/grant-home.js +0 -60
- package/dist/runtime/daimon/training/providers/grok-broker/grant-home.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-broker/grant-pool.d.ts +0 -81
- package/dist/runtime/daimon/training/providers/grok-broker/grant-pool.js +0 -221
- package/dist/runtime/daimon/training/providers/grok-broker/grant-pool.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-broker/grant-releases.d.ts +0 -31
- package/dist/runtime/daimon/training/providers/grok-broker/grant-releases.js +0 -78
- package/dist/runtime/daimon/training/providers/grok-broker/grant-releases.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-broker/grants.d.ts +0 -63
- package/dist/runtime/daimon/training/providers/grok-broker/grants.js +0 -20
- package/dist/runtime/daimon/training/providers/grok-broker/grants.js.map +0 -1
- package/dist/runtime/daimon/training/providers/grok-broker/index.d.ts +0 -3
- package/dist/runtime/daimon/training/providers/grok-broker/index.js +0 -4
- package/dist/runtime/daimon/training/providers/grok-broker/index.js.map +0 -1
- package/dist/runtime/daimon/training/public.d.ts +0 -6
- package/dist/runtime/daimon/training/public.js +0 -5
- package/dist/runtime/daimon/training/public.js.map +0 -1
- package/dist/runtime/daimon/training/services/account-lease.d.ts +0 -7
- package/dist/runtime/daimon/training/services/account-lease.js +0 -76
- package/dist/runtime/daimon/training/services/account-lease.js.map +0 -1
- package/dist/runtime/daimon/training/services/freshness.d.ts +0 -15
- package/dist/runtime/daimon/training/services/freshness.js +0 -19
- package/dist/runtime/daimon/training/services/freshness.js.map +0 -1
- package/dist/runtime/daimon/training/services/index.d.ts +0 -4
- package/dist/runtime/daimon/training/services/index.js +0 -4
- package/dist/runtime/daimon/training/services/index.js.map +0 -1
- package/dist/runtime/daimon/training/services/slot-freshness.d.ts +0 -34
- package/dist/runtime/daimon/training/services/slot-freshness.js +0 -178
- package/dist/runtime/daimon/training/services/slot-freshness.js.map +0 -1
- package/dist/runtime/daimon/wakeMoments.js.map +0 -1
- package/dist/runtime/pi/adapter.d.ts +0 -3
- package/dist/runtime/pi/adapter.js +0 -230
- package/dist/runtime/pi/appActivitySource.d.ts +0 -1
- package/dist/runtime/pi/appActivitySource.js +0 -199
- package/dist/runtime/pi/appAgentConfig.d.ts +0 -11
- package/dist/runtime/pi/appAgentConfig.js +0 -264
- package/dist/runtime/pi/appCliEnginesSource.d.ts +0 -1
- package/dist/runtime/pi/appCliEnginesSource.js +0 -183
- package/dist/runtime/pi/appCliSource.d.ts +0 -1
- package/dist/runtime/pi/appCliSource.js +0 -353
- package/dist/runtime/pi/appControlSource.d.ts +0 -1
- package/dist/runtime/pi/appControlSource.js +0 -390
- package/dist/runtime/pi/appControlWakeIdentitySource.d.ts +0 -1
- package/dist/runtime/pi/appControlWakeIdentitySource.js +0 -19
- package/dist/runtime/pi/appCoreSource.d.ts +0 -4
- package/dist/runtime/pi/appCoreSource.js +0 -244
- package/dist/runtime/pi/appPreludeSource.d.ts +0 -1
- package/dist/runtime/pi/appPreludeSource.js +0 -192
- package/dist/runtime/pi/appScheduleSource.d.ts +0 -1
- package/dist/runtime/pi/appScheduleSource.js +0 -84
- package/dist/runtime/pi/appScriptedEngine.d.ts +0 -31
- package/dist/runtime/pi/appScriptedEngine.js +0 -42
- package/dist/runtime/pi/appSource.d.ts +0 -4
- package/dist/runtime/pi/appSource.js +0 -12
- package/dist/runtime/pi/appTemplate.d.ts +0 -14
- package/dist/runtime/pi/appTemplate.js +0 -28
- package/dist/runtime/pi/appTemplateTypes.d.ts +0 -64
- package/dist/runtime/pi/appTemplateTypes.js +0 -18
- package/dist/runtime/pi/appWakeContextSource.d.ts +0 -1
- package/dist/runtime/pi/appWakeContextSource.js +0 -398
- package/dist/runtime/pi/containerTargets.d.ts +0 -4
- package/dist/runtime/pi/containerTargets.js +0 -63
- package/dist/runtime/pi/runAuth.d.ts +0 -2
- package/dist/runtime/pi/runAuth.js +0 -185
- package/dist/runtime/pi/testHelpers.d.ts +0 -2
- package/dist/shared/errors.js.map +0 -1
- package/dist/training/subjects/environment.d.ts +0 -2
- package/dist/training/subjects/environment.js +0 -14
- package/dist/training/subjects/environment.js.map +0 -1
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/index.d.ts +0 -0
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/index.js +0 -0
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/protocol.d.ts +0 -0
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/protocol.js +0 -0
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/provider.d.ts +0 -0
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/provider.js +0 -0
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/strict-schema.d.ts +0 -0
- /package/dist/runtime/{codex-exec → daimon}/training/providers/codex-subscription/strict-schema.js +0 -0
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type Server } from 'node:http';
|
|
2
|
-
import type { WorkerController } from './control.js';
|
|
3
|
-
export declare function createWorkerServer(controller: WorkerController, token: string): Server;
|
|
4
|
-
export declare function listenWorker(server: Server, bindHost: string, port: number): Promise<void>;
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { createHash, timingSafeEqual } from 'node:crypto';
|
|
2
|
-
import { createServer } from 'node:http';
|
|
3
|
-
import { parseTransportSource, TransportAdmissionClosedError } from './wake-delivery/index.js';
|
|
4
|
-
export function createWorkerServer(controller, token) {
|
|
5
|
-
const authenticated = (request) => {
|
|
6
|
-
const hash = (value) => createHash('sha256').update(value).digest();
|
|
7
|
-
return timingSafeEqual(hash(request.headers.authorization ?? ''), hash(`Bearer ${token}`));
|
|
8
|
-
};
|
|
9
|
-
const server = createServer((request, response) => {
|
|
10
|
-
void (async () => {
|
|
11
|
-
if (!authenticated(request))
|
|
12
|
-
return reply(response, 401, { error: 'unauthorized' });
|
|
13
|
-
const url = new URL(request.url ?? '/', 'http://worker.invalid');
|
|
14
|
-
if (url.search || url.hash)
|
|
15
|
-
return reply(response, 400, { error: 'unsupported_query' });
|
|
16
|
-
if (request.method === 'GET' && url.pathname === '/trial/health') {
|
|
17
|
-
return reply(response, 200, await controller.host.health());
|
|
18
|
-
}
|
|
19
|
-
if (request.method === 'GET' && url.pathname === '/v2/activity') {
|
|
20
|
-
const value = await controller.host.activityV2(token);
|
|
21
|
-
return reply(response, value ? 200 : 503, value ?? { error: 'native_host_unavailable' });
|
|
22
|
-
}
|
|
23
|
-
if (request.method === 'GET' && url.pathname === '/v2/availability') {
|
|
24
|
-
const value = await controller.host.availability(token);
|
|
25
|
-
return reply(response, value ? 200 : 503, value ?? { error: 'native_host_unavailable' });
|
|
26
|
-
}
|
|
27
|
-
const receipt = /^\/v2\/wake-receipts\/([0-9a-f-]{36})$/u.exec(url.pathname);
|
|
28
|
-
if (request.method === 'GET' && receipt) {
|
|
29
|
-
const value = await controller.host.wakeReceipt(token, receipt[1]);
|
|
30
|
-
return reply(response, value ? 200 : 404, value ?? { error: 'not_found' });
|
|
31
|
-
}
|
|
32
|
-
if (request.method === 'POST' && url.pathname === '/trial/stop') {
|
|
33
|
-
return reply(response, 200, await controller.stop());
|
|
34
|
-
}
|
|
35
|
-
if (controller.transport && request.method === 'GET' && url.pathname === '/trial/run') {
|
|
36
|
-
return reply(response, 200, controller.transport.state());
|
|
37
|
-
}
|
|
38
|
-
if (controller.transport && request.method === 'POST' && url.pathname === '/v2/wakes') {
|
|
39
|
-
if (request.headers['content-type'] !== 'application/json')
|
|
40
|
-
return reply(response, 400, { error: 'content-type must be application/json' });
|
|
41
|
-
const value = await body(request, 1_048_576, { bound: 'request body is too large', object: 'request body must be an object' });
|
|
42
|
-
// Daimon's host owns schema rejection and its structured acceptance body.
|
|
43
|
-
const result = await controller.transport.accept({ ...value, token });
|
|
44
|
-
const status = result.state === 'accepted' ? 202 : result.state === 'stopped' ? 409
|
|
45
|
-
: result.code === 'invalid_request' ? 400 : result.code === 'unauthorized' ? 401 : 409;
|
|
46
|
-
return reply(response, status, result);
|
|
47
|
-
}
|
|
48
|
-
if (request.method === 'POST' && url.pathname === '/trial/run') {
|
|
49
|
-
if (request.headers['content-type'] !== 'application/json')
|
|
50
|
-
return reply(response, 400, { error: 'content_type_required' });
|
|
51
|
-
const value = await body(request);
|
|
52
|
-
const fields = controller.transport ? ['text', 'wakeId', 'controls', 'source'] : ['text', 'wakeId', 'controls'];
|
|
53
|
-
if (Object.keys(value).some(key => !fields.includes(key)) || value.controls !== undefined && (!value.controls || typeof value.controls !== 'object' || Array.isArray(value.controls)) || typeof value.wakeId !== 'string' ||
|
|
54
|
-
!(controller.transport && value.text === undefined) && typeof value.text !== 'string') {
|
|
55
|
-
return reply(response, 400, { error: 'invalid_trial_delivery' });
|
|
56
|
-
}
|
|
57
|
-
const source = controller.transport ? parseTransportSource(value.source) : undefined;
|
|
58
|
-
const abandoned = () => { if (!response.writableEnded)
|
|
59
|
-
void controller.stop(); };
|
|
60
|
-
response.once('close', abandoned);
|
|
61
|
-
try {
|
|
62
|
-
return reply(response, 200, await controller.run(value.wakeId, value.text ?? '', value.controls, source));
|
|
63
|
-
}
|
|
64
|
-
finally {
|
|
65
|
-
response.removeListener('close', abandoned);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return reply(response, 404, { error: 'not_found' });
|
|
69
|
-
})().catch(error => reply(response, error instanceof TransportAdmissionClosedError ? 409 : 400, { error: error instanceof Error ? error.message : 'worker_request_failed' }));
|
|
70
|
-
});
|
|
71
|
-
server.requestTimeout = 30_000;
|
|
72
|
-
server.headersTimeout = 10_000;
|
|
73
|
-
return server;
|
|
74
|
-
}
|
|
75
|
-
export function listenWorker(server, bindHost, port) {
|
|
76
|
-
return new Promise((resolve, reject) => {
|
|
77
|
-
server.once('error', reject);
|
|
78
|
-
server.listen(port, bindHost, () => { server.removeListener('error', reject); resolve(); });
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function reply(response, status, value) {
|
|
82
|
-
if (response.destroyed || response.writableEnded)
|
|
83
|
-
return;
|
|
84
|
-
response.writeHead(status, { 'content-type': 'application/json; charset=utf-8' });
|
|
85
|
-
response.end(`${JSON.stringify(value)}\n`);
|
|
86
|
-
}
|
|
87
|
-
async function body(request, maximum = 32_768, errors = { bound: 'Worker request body exceeds its bound', object: 'Worker request must be an object' }) {
|
|
88
|
-
const chunks = [];
|
|
89
|
-
let size = 0;
|
|
90
|
-
for await (const chunk of request) {
|
|
91
|
-
const bytes = Buffer.from(chunk);
|
|
92
|
-
size += bytes.length;
|
|
93
|
-
if (size > maximum)
|
|
94
|
-
throw new Error(errors.bound);
|
|
95
|
-
chunks.push(bytes);
|
|
96
|
-
}
|
|
97
|
-
const value = JSON.parse(Buffer.concat(chunks).toString('utf8'));
|
|
98
|
-
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
99
|
-
throw new Error(errors.object);
|
|
100
|
-
return value;
|
|
101
|
-
}
|
|
102
|
-
//# sourceMappingURL=server.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../../../src/runtime/daimon/training/native/worker/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,YAAY,EAA0D,MAAM,WAAW,CAAC;AAEjG,OAAO,EAAE,oBA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AAC;QAAE,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAChG,OAAO,KAAgC,CAAC;AAC1C,CAAC"}
|
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
import type { DeclaredLimit } from '../../../../../training/index.js';
|
|
2
|
-
import type { NativeLaunch } from '../receipt/index.js';
|
|
3
|
-
import type { NativeAcceptanceResult, TransportEvidence } from './wake-delivery/index.js';
|
|
4
|
-
import type { NativeTaskClockEvidence } from '../receipt/index.js';
|
|
5
|
-
/** Only fields consumed from Daimon's public /runtime contract are described here. */
|
|
6
|
-
export interface NativeConfig {
|
|
7
|
-
version: string;
|
|
8
|
-
host: {
|
|
9
|
-
bindHost: string;
|
|
10
|
-
port: number;
|
|
11
|
-
controlTokenEnv: string;
|
|
12
|
-
};
|
|
13
|
-
agents: {
|
|
14
|
-
id: string;
|
|
15
|
-
name: string;
|
|
16
|
-
instructions: string;
|
|
17
|
-
workspacePath: string;
|
|
18
|
-
runtimeHomePath: string;
|
|
19
|
-
engine: {
|
|
20
|
-
kind: string;
|
|
21
|
-
model?: string;
|
|
22
|
-
codexSandbox?: {
|
|
23
|
-
mode: string;
|
|
24
|
-
networkAccess: boolean;
|
|
25
|
-
webSearch: string;
|
|
26
|
-
};
|
|
27
|
-
reasoningEffort?: string;
|
|
28
|
-
};
|
|
29
|
-
attention?: {
|
|
30
|
-
maxBatchMessages: number;
|
|
31
|
-
maxBatchBytes: number;
|
|
32
|
-
maxExecutions: number;
|
|
33
|
-
maxTokens: number;
|
|
34
|
-
};
|
|
35
|
-
schedule?: {
|
|
36
|
-
kind: string;
|
|
37
|
-
[key: string]: unknown;
|
|
38
|
-
};
|
|
39
|
-
memory?: {
|
|
40
|
-
runtimeHomePath: string;
|
|
41
|
-
[key: string]: unknown;
|
|
42
|
-
};
|
|
43
|
-
moltnet?: {
|
|
44
|
-
cliPath: string;
|
|
45
|
-
configPath: string;
|
|
46
|
-
networks: {
|
|
47
|
-
id: string;
|
|
48
|
-
rooms: string[];
|
|
49
|
-
dms: boolean;
|
|
50
|
-
}[];
|
|
51
|
-
};
|
|
52
|
-
mcp?: {
|
|
53
|
-
name: string;
|
|
54
|
-
transport: string;
|
|
55
|
-
command?: string;
|
|
56
|
-
args: string[];
|
|
57
|
-
env: Record<string, string>;
|
|
58
|
-
tools: string[];
|
|
59
|
-
}[];
|
|
60
|
-
}[];
|
|
61
|
-
}
|
|
62
|
-
export interface NativeReceipt {
|
|
63
|
-
version: string;
|
|
64
|
-
acceptance_id: string;
|
|
65
|
-
agent_id: string;
|
|
66
|
-
delivery_id: string;
|
|
67
|
-
request_digest: string;
|
|
68
|
-
state: 'accepted' | 'running' | 'completed' | 'failed' | 'stopped';
|
|
69
|
-
accepted_at: string;
|
|
70
|
-
updated_at: string;
|
|
71
|
-
execution_id?: string;
|
|
72
|
-
deferred?: boolean;
|
|
73
|
-
code?: string;
|
|
74
|
-
text?: string;
|
|
75
|
-
}
|
|
76
|
-
export interface NativeActivity {
|
|
77
|
-
version: string;
|
|
78
|
-
items: (NativeReceipt & {
|
|
79
|
-
active: boolean;
|
|
80
|
-
})[];
|
|
81
|
-
executions?: {
|
|
82
|
-
agent_id: string;
|
|
83
|
-
execution_id: string;
|
|
84
|
-
state: 'running';
|
|
85
|
-
delivery_ids: string[];
|
|
86
|
-
}[];
|
|
87
|
-
}
|
|
88
|
-
export interface NativeAvailability {
|
|
89
|
-
version: string;
|
|
90
|
-
state: string;
|
|
91
|
-
agents: {
|
|
92
|
-
agent_id: string;
|
|
93
|
-
pending: number;
|
|
94
|
-
running: boolean;
|
|
95
|
-
deferred: number;
|
|
96
|
-
budget: unknown;
|
|
97
|
-
error?: string;
|
|
98
|
-
}[];
|
|
99
|
-
}
|
|
100
|
-
export interface NativeHost {
|
|
101
|
-
start(): Promise<void>;
|
|
102
|
-
stop(): Promise<unknown>;
|
|
103
|
-
health(): Promise<{
|
|
104
|
-
version: string;
|
|
105
|
-
state: string;
|
|
106
|
-
agents: {
|
|
107
|
-
agentId: string;
|
|
108
|
-
engine?: string;
|
|
109
|
-
state?: string;
|
|
110
|
-
}[];
|
|
111
|
-
}>;
|
|
112
|
-
accept(request: unknown): Promise<NativeAcceptanceResult>;
|
|
113
|
-
wakeReceipt(token: string | undefined, acceptanceId: string): Promise<NativeReceipt | undefined>;
|
|
114
|
-
activityV2(token: string | undefined): Promise<NativeActivity | undefined>;
|
|
115
|
-
availability(token: string | undefined): Promise<NativeAvailability | undefined>;
|
|
116
|
-
}
|
|
117
|
-
export interface WorkerOptions {
|
|
118
|
-
config: string;
|
|
119
|
-
configSha256: string;
|
|
120
|
-
controlRoot: string;
|
|
121
|
-
tokenFile: string;
|
|
122
|
-
evidence: string;
|
|
123
|
-
trialId: string;
|
|
124
|
-
timeoutMs: number;
|
|
125
|
-
scheduleOverride: 'disabled';
|
|
126
|
-
launch: string;
|
|
127
|
-
}
|
|
128
|
-
export interface NativeTrace extends Record<string, unknown> {
|
|
129
|
-
schema: 'daimon.turn_trace.v1';
|
|
130
|
-
agent_id: string;
|
|
131
|
-
turn_id: string;
|
|
132
|
-
started_at: string;
|
|
133
|
-
completed_at: string;
|
|
134
|
-
status: 'completed' | 'failed';
|
|
135
|
-
tools: unknown[];
|
|
136
|
-
}
|
|
137
|
-
export interface NativeCodexUsage extends Record<string, unknown> {
|
|
138
|
-
v: 'noopolis.daimon.turn-usage.v1';
|
|
139
|
-
agent: string;
|
|
140
|
-
wake: string;
|
|
141
|
-
engine: 'codex';
|
|
142
|
-
input: number;
|
|
143
|
-
output: number;
|
|
144
|
-
cache_read: number;
|
|
145
|
-
total: number;
|
|
146
|
-
complete: boolean;
|
|
147
|
-
}
|
|
148
|
-
/** Broker-sealed Grok row: disjoint buckets, `total = input + cache_read + cache_write + output`, deduplicated by `turn`. */
|
|
149
|
-
export interface NativeGrokUsage extends Record<string, unknown> {
|
|
150
|
-
v: 'noopolis.daimon.turn-usage.v1';
|
|
151
|
-
agent: string;
|
|
152
|
-
wake: string;
|
|
153
|
-
engine: 'grok';
|
|
154
|
-
turn: string;
|
|
155
|
-
model: string;
|
|
156
|
-
input: number;
|
|
157
|
-
output: number;
|
|
158
|
-
cache_read: number;
|
|
159
|
-
cache_write: number;
|
|
160
|
-
total: number;
|
|
161
|
-
notional_usd: number;
|
|
162
|
-
complete: boolean;
|
|
163
|
-
limit_reason?: 'tokens' | 'requests' | 'timeout' | 'none';
|
|
164
|
-
estimated_requests?: number;
|
|
165
|
-
}
|
|
166
|
-
export type NativeUsage = NativeCodexUsage | NativeGrokUsage;
|
|
167
|
-
/** One `noopolis.daimon.turn-requests.v1` Grok row with its proxy-measured clock and usage source. */
|
|
168
|
-
export interface NativeRequestUsage extends Record<string, unknown> {
|
|
169
|
-
v: 'noopolis.daimon.turn-requests.v1';
|
|
170
|
-
agent: string;
|
|
171
|
-
wake: string;
|
|
172
|
-
engine: 'grok';
|
|
173
|
-
turn: string;
|
|
174
|
-
model: string;
|
|
175
|
-
request: number;
|
|
176
|
-
requests: number;
|
|
177
|
-
input: number;
|
|
178
|
-
cached_input: number;
|
|
179
|
-
fresh_input: number;
|
|
180
|
-
cache_write: number;
|
|
181
|
-
output: number;
|
|
182
|
-
total: number;
|
|
183
|
-
usage_source?: 'stream' | 'upstream' | 'estimated';
|
|
184
|
-
started_at?: string;
|
|
185
|
-
ended_at?: string;
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* One `noopolis.daimon.turn-seal.v1` row: the operator-visible projection of a
|
|
189
|
-
* brokered turn's sealed terminal response, written by the broker beside the
|
|
190
|
-
* two usage streams because a cancelled turn's response never reaches a client.
|
|
191
|
-
*/
|
|
192
|
-
export interface NativeTurnSeal extends Record<string, unknown> {
|
|
193
|
-
v: 'noopolis.daimon.turn-seal.v1';
|
|
194
|
-
agent: string;
|
|
195
|
-
wake: string;
|
|
196
|
-
engine: 'grok';
|
|
197
|
-
at: string;
|
|
198
|
-
turn: string;
|
|
199
|
-
outcome: 'completed' | 'failed';
|
|
200
|
-
requests: number;
|
|
201
|
-
model: string;
|
|
202
|
-
limit_reason: 'tokens' | 'requests' | 'timeout' | 'none';
|
|
203
|
-
shell_clock?: 'task' | 'real' | 'gap';
|
|
204
|
-
/** Broker-observed rewriting of engine-injected dates. Missing is unobserved, never zero. */
|
|
205
|
-
provider_clock?: {
|
|
206
|
-
requests: number;
|
|
207
|
-
linesRewritten: number;
|
|
208
|
-
requestsWithoutDateLine: number;
|
|
209
|
-
linesIgnored?: number;
|
|
210
|
-
injectedDate: string | null;
|
|
211
|
-
taskDate: string | null;
|
|
212
|
-
};
|
|
213
|
-
/** Present exactly for a failed turn: the broker's closed failure vocabulary. */
|
|
214
|
-
code?: string;
|
|
215
|
-
/** Present when the sealed response carried one; `reason` is the worker's own words, redacted by Daimon. */
|
|
216
|
-
diagnostic?: {
|
|
217
|
-
status: string;
|
|
218
|
-
stage: string;
|
|
219
|
-
failure_class: string;
|
|
220
|
-
exit_code: number;
|
|
221
|
-
term_signal: number;
|
|
222
|
-
reason?: string;
|
|
223
|
-
};
|
|
224
|
-
/**
|
|
225
|
-
* Present exactly when the broker's MCP facade observed this turn. Its
|
|
226
|
-
* absence is a different statement from `started: 0`, and neither may be
|
|
227
|
-
* read as the other.
|
|
228
|
-
*/
|
|
229
|
-
mcp?: {
|
|
230
|
-
started: number;
|
|
231
|
-
answered: number;
|
|
232
|
-
undecoded: number;
|
|
233
|
-
outstanding: {
|
|
234
|
-
name: string;
|
|
235
|
-
outstanding_ms: number;
|
|
236
|
-
}[];
|
|
237
|
-
refusals?: {
|
|
238
|
-
route: number;
|
|
239
|
-
expired: number;
|
|
240
|
-
exhausted: number;
|
|
241
|
-
unrouted: number;
|
|
242
|
-
oversized: number;
|
|
243
|
-
};
|
|
244
|
-
/**
|
|
245
|
-
* The session's standalone GET SSE tunnels. Present only when the broker
|
|
246
|
-
* observed that channel at all: a row sealed before the instrument existed
|
|
247
|
-
* carries no `tunnels` member, which is not `opened: 0`.
|
|
248
|
-
*/
|
|
249
|
-
tunnels?: {
|
|
250
|
-
opened: number;
|
|
251
|
-
closed: number;
|
|
252
|
-
delivered: number;
|
|
253
|
-
open: {
|
|
254
|
-
open_ms: number;
|
|
255
|
-
delivered: boolean;
|
|
256
|
-
}[];
|
|
257
|
-
};
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
export interface NativeEvidence {
|
|
261
|
-
traces: NativeTrace[];
|
|
262
|
-
usage: NativeUsage[];
|
|
263
|
-
/** Cumulative trial ledger, including revisits. Absent in older persisted frames. */
|
|
264
|
-
accounting?: {
|
|
265
|
-
usage: NativeUsage[];
|
|
266
|
-
coverage: 'complete' | 'partial' | 'absent';
|
|
267
|
-
};
|
|
268
|
-
toolReceipts: Record<string, unknown>[];
|
|
269
|
-
modelContexts: {
|
|
270
|
-
model: string;
|
|
271
|
-
approvalPolicy: unknown;
|
|
272
|
-
sandboxPolicy: unknown;
|
|
273
|
-
}[];
|
|
274
|
-
/** Grok only: per-request broker rows. Codex evidence never carries this member. */
|
|
275
|
-
requests?: NativeRequestUsage[];
|
|
276
|
-
/** Grok seals attributed to this wake's execution(s); absent when no matching seal was observed. */
|
|
277
|
-
turnSeals?: NativeTurnSeal[];
|
|
278
|
-
}
|
|
279
|
-
/** Where native evidence lives for the selected engine. */
|
|
280
|
-
export type NativeEvidenceSource = {
|
|
281
|
-
engine: 'codex';
|
|
282
|
-
} | {
|
|
283
|
-
engine: 'grok';
|
|
284
|
-
requestsFile: string;
|
|
285
|
-
};
|
|
286
|
-
export interface TerminalEvidence {
|
|
287
|
-
schema: 'spawnfile.training.daimon-native.trial.v1';
|
|
288
|
-
trialId: string;
|
|
289
|
-
wakeId: string;
|
|
290
|
-
agentId: string;
|
|
291
|
-
model: string;
|
|
292
|
-
/** Grok only; Codex terminal evidence keeps its original members. */
|
|
293
|
-
engine?: 'grok';
|
|
294
|
-
reasoningEffort?: string;
|
|
295
|
-
configSha256: string;
|
|
296
|
-
scheduleOverride: 'disabled';
|
|
297
|
-
preparation?: Pick<NativeLaunch, 'sourceConfigSha256' | 'instructions' | 'overrides'>;
|
|
298
|
-
transport?: TransportEvidence;
|
|
299
|
-
taskClock?: NativeTaskClockEvidence;
|
|
300
|
-
status: 'completed' | 'failed' | 'cancelled';
|
|
301
|
-
/** A closed execution can leave its delivery deferred; this never marks the trial completed. */
|
|
302
|
-
blocked?: 'awaiting-external-input';
|
|
303
|
-
/** The closed execution failed on a subject-declared limit sealed in its own usage row. */
|
|
304
|
-
limit?: DeclaredLimit;
|
|
305
|
-
startedAt: string;
|
|
306
|
-
completedAt: string;
|
|
307
|
-
executionId?: string;
|
|
308
|
-
receipt?: NativeReceipt;
|
|
309
|
-
activity?: NativeActivity;
|
|
310
|
-
availability?: NativeAvailability;
|
|
311
|
-
native: NativeEvidence;
|
|
312
|
-
coverage: {
|
|
313
|
-
channel: 'tools' | 'output' | 'usage';
|
|
314
|
-
completeness: 'absent' | 'partial' | 'complete';
|
|
315
|
-
ordering: 'source' | 'none';
|
|
316
|
-
}[];
|
|
317
|
-
error?: string;
|
|
318
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/runtime/daimon/training/native/worker/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { createTransportDelivery, TransportAdmissionClosedError } from './transport.js';
|
|
2
|
-
export { validateTransportExecutions } from './terminal.js';
|
|
3
|
-
export { parseTransportSource, matchTransportSource } from './source.js';
|
|
4
|
-
export type { NativeWakeRequest, NativeAcceptance, NativeAcceptanceResult, TransportDeliverySource, TransportEvidence, TransportRunState } from './types.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/runtime/daimon/training/native/worker/wake-delivery/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AACxF,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export function parseTransportSource(value) {
|
|
2
|
-
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
3
|
-
throw new Error('Transport delivery requires an expected source');
|
|
4
|
-
const row = value;
|
|
5
|
-
const keys = Object.keys(row).sort().join(',');
|
|
6
|
-
const id = row.deliveryId ?? row.deliveryIdPrefix;
|
|
7
|
-
if (row.kind !== 'transport' || !['deliveryId,kind', 'deliveryIdPrefix,kind'].includes(keys) ||
|
|
8
|
-
typeof id !== 'string' || !id.trim() || Buffer.byteLength(id) > 16_384 || [...id].some(char => char.charCodeAt(0) < 32 || char.charCodeAt(0) === 127)) {
|
|
9
|
-
throw new Error('Invalid expected transport delivery source');
|
|
10
|
-
}
|
|
11
|
-
return 'deliveryId' in row ? { kind: 'transport', deliveryId: id } : { kind: 'transport', deliveryIdPrefix: id };
|
|
12
|
-
}
|
|
13
|
-
export function matchTransportSource(source, deliveryId) {
|
|
14
|
-
return source.deliveryId !== undefined ? deliveryId === source.deliveryId : deliveryId.startsWith(source.deliveryIdPrefix);
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=source.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../../../../../../src/runtime/daimon/training/native/worker/wake-delivery/source.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oBAAoB,CAAC,KAAc;IACjD,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACnI,MAAM,GAAG,GAAG,KAAgC,CAAC;IAC7C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/C,MAAM,EAAE,GAAG,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC,gBAAgB,CAAC;IAClD,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,IAAI,CAAC,CAAC,iBAAiB,EAAE,uBAAuB,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;QACxF,OAAO,EAAE,KAAK,QAAQ,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC;QAC1J,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,YAAY,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC;AACnH,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,MAA+B,EAAE,UAAkB;IACtF,OAAO,MAAM,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,KAAK,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAC7H,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { NativeActivity, NativeEvidence } from '../types.js';
|
|
2
|
-
import type { TransportEvidence } from './types.js';
|
|
3
|
-
/** A completed disposition is not terminal execution telemetry: validate both. */
|
|
4
|
-
export declare function validateTransportExecutions(evidence: TransportEvidence, native: NativeEvidence, activity: NativeActivity, agentId: string, wakeTimeoutMs?: number): void;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { declaredLimitStop, DeclaredLimitStop, describeNativeFailure, validateNativeFrame } from '../evidence/index.js';
|
|
2
|
-
/** A completed disposition is not terminal execution telemetry: validate both. */
|
|
3
|
-
export function validateTransportExecutions(evidence, native, activity, agentId, wakeTimeoutMs) {
|
|
4
|
-
if (!evidence.batch)
|
|
5
|
-
throw new Error('Transport execution closed without observable batch membership');
|
|
6
|
-
if (!evidence.selectedDeliveries?.length)
|
|
7
|
-
throw new Error('Transport selection evidence is missing');
|
|
8
|
-
const owned = new Set();
|
|
9
|
-
// A judged attempt that stopped on its own sealed declared limit is a subject
|
|
10
|
-
// outcome, but only once every other check has passed and no judged attempt
|
|
11
|
-
// failed any other way: one crash among limit stops is still a crash.
|
|
12
|
-
let limited;
|
|
13
|
-
for (const selected of evidence.selectedDeliveries) {
|
|
14
|
-
const receipt = selected.receipt;
|
|
15
|
-
if (!receipt || !selected.executionIds.length)
|
|
16
|
-
throw new Error('Transport delivery omitted execution binding');
|
|
17
|
-
validateNativeFrame(activity, receipt, native.traces, agentId, receipt.execution_id);
|
|
18
|
-
// Without a receipt-bound final execution there is no retry to excuse: judge every attempt.
|
|
19
|
-
const settling = selected.executionIds.includes(receipt.execution_id ?? '') ? receipt.execution_id : undefined;
|
|
20
|
-
for (const executionId of selected.executionIds) {
|
|
21
|
-
if (!evidence.batches?.some(batch => batch.executionId === executionId && batch.deliveryIds.includes(selected.deliveryId))) {
|
|
22
|
-
throw new Error('Transport execution closed without observable batch membership');
|
|
23
|
-
}
|
|
24
|
-
const trace = native.traces.find(row => row.turn_id === executionId);
|
|
25
|
-
if (!trace)
|
|
26
|
-
throw new Error('Transport execution omitted terminal telemetry');
|
|
27
|
-
owned.add(executionId);
|
|
28
|
-
// Daimon retries a failed attempt under a new execution and records the one that
|
|
29
|
-
// settled the delivery as receipt.execution_id. Earlier attempts stay in the
|
|
30
|
-
// retained traces as evidence; only the settling execution decides success.
|
|
31
|
-
if (settling && executionId !== settling)
|
|
32
|
-
continue;
|
|
33
|
-
const limit = declaredLimitStop(trace, native.usage, wakeTimeoutMs);
|
|
34
|
-
if (limit) {
|
|
35
|
-
limited ??= new DeclaredLimitStop(limit, describeNativeFailure(receipt, trace, native.usage));
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
if (trace.status !== 'completed')
|
|
39
|
-
throw new Error(describeNativeFailure(receipt, trace, native.usage));
|
|
40
|
-
if (!native.usage.some(row => row.wake === executionId))
|
|
41
|
-
throw new Error('Transport execution omitted token usage evidence');
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
// This home was empty at trial startup. Reconcile its entire retained terminal
|
|
45
|
-
// history, including attempts that opened and closed between activity polls.
|
|
46
|
-
// Receipt retries may erase a binding, but cannot erase that attempt's trace.
|
|
47
|
-
if (native.traces.some(trace => !owned.has(trace.turn_id)))
|
|
48
|
-
throw new Error('Transport terminal trace omitted execution ownership');
|
|
49
|
-
if (limited)
|
|
50
|
-
throw limited;
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=terminal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"terminal.js","sourceRoot":"","sources":["../../../../../../../src/runtime/daimon/training/native/worker/wake-delivery/terminal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAIxH,kFAAkF;AAClF,MAAM,UAAU,2BAA2B,CAAC,QAA2B,EAAE,MAAsB,EAC7F,QAAwB,EAAE,OAAe,EAAE,aAAsB;IACjE,IAAI,CAAC,QAAQ,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACvG,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE,MAAM;QAAE,MAAM,IAAI,KAAK,CA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,CAAC,CAAC;YACvB,iFAAiF;YACjF,6EAA6E;YAC7E,4EAA4E;YAC5E,IAAI,QAAQ,IAAI,WAAW,KAAK,QAAQ;gBAAE,SAAS;YACnD,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;YACpE,IAAI,KAAK,EAAE,CAAC;gBAAC,OAAO,KAAK,IAAI,iBAAiB,CAAC,KAAK,EAAE,qBAAqB,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;gBAAC,SAAS;YAAC,CAAC;YACvH,IAAI,KAAK,CAAC,MAAM,KAAK,WAAW;gBAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YACvG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QAC/H,CAAC;IACH,CAAC;IACD,+EAA+E;IAC/E,6EAA6E;IAC7E,8EAA8E;IAC9E,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IACpI,IAAI,OAAO;QAAE,MAAM,OAAO,CAAC;AAC7B,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { NativeActivity, NativeAvailability, NativeHost, NativeReceipt, NativeTrace } from '../types.js';
|
|
2
|
-
import type { NativeAcceptance, TransportDeliverySource, TransportEvidence, TransportRunState } from './types.js';
|
|
3
|
-
/** Trial admission is separate from Daimon's schema and acceptance responses. */
|
|
4
|
-
export declare class TransportAdmissionClosedError extends Error {
|
|
5
|
-
constructor();
|
|
6
|
-
}
|
|
7
|
-
/** Only the HTTP route calls accept. run() arms and observes this mailbox. */
|
|
8
|
-
export declare function createTransportDelivery(host: NativeHost, agentId: string): {
|
|
9
|
-
state(): TransportRunState;
|
|
10
|
-
begin(wakeId: string, source: TransportDeliverySource): {
|
|
11
|
-
accepted: Promise<NativeAcceptance>;
|
|
12
|
-
evidence: TransportEvidence;
|
|
13
|
-
closed: (traces: NativeTrace[]) => boolean;
|
|
14
|
-
generation: () => number;
|
|
15
|
-
/** Synchronous admission/sealing linearization point: no await may split it. */
|
|
16
|
-
seal(generation: number, traces: NativeTrace[]): boolean;
|
|
17
|
-
observe(receipt: NativeReceipt, activity: NativeActivity, availability: NativeAvailability, executionId?: string): void;
|
|
18
|
-
finish(): void;
|
|
19
|
-
};
|
|
20
|
-
accept(value: unknown): Promise<import("./types.js").NativeAcceptanceResult>;
|
|
21
|
-
};
|