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,175 +0,0 @@
|
|
|
1
|
-
import { prepareCodexEnvironment, savedCodexHome } from '../../../codex-exec/training/index.js';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { canonicalProtectedPaths } from '../../../../training/index.js';
|
|
4
|
-
import { loadDaimon } from './public.js';
|
|
5
|
-
export function createDaimonAdapter(options = {}) {
|
|
6
|
-
return {
|
|
7
|
-
id: 'daimon',
|
|
8
|
-
capabilities: { toolTrace: 'partial', liveObservations: true, cancellation: 'native-handle',
|
|
9
|
-
multiTurn: false, resources: ['instructions', 'supporting-files'],
|
|
10
|
-
readIsolation: 'declared-paths', protectedPaths: true,
|
|
11
|
-
isolation: 'Daimon strict Codex profile; host fixture journal only; native stop acknowledgement has unverified remote scope.' },
|
|
12
|
-
async start(input) {
|
|
13
|
-
const timeoutMs = options.timeoutMs ?? 180_000;
|
|
14
|
-
const stopTimeoutMs = options.stopTimeoutMs ?? 5_000;
|
|
15
|
-
if (![timeoutMs, stopTimeoutMs].every((value) => Number.isSafeInteger(value) && value > 0))
|
|
16
|
-
throw new Error('Daimon timeouts must be positive integers');
|
|
17
|
-
const model = input.model ?? options.model;
|
|
18
|
-
if (model === undefined || model.trim().length === 0 || model.startsWith('-'))
|
|
19
|
-
throw new Error('An explicit native Daimon model is required');
|
|
20
|
-
const env = await prepareCodexEnvironment(input.workspacePath, input.runtimeHomePath, savedCodexHome(options.authHome));
|
|
21
|
-
const authHome = env['CODEX_HOME'];
|
|
22
|
-
const protectedPaths = await canonicalProtectedPaths(input.protectedPaths);
|
|
23
|
-
const native = await (options.load ?? loadDaimon)();
|
|
24
|
-
if (native.PiHarnessAdapter.capabilities?.causalRunId !== true) {
|
|
25
|
-
throw new Error('Installed Daimon lacks per-instance causal run context');
|
|
26
|
-
}
|
|
27
|
-
const probe = native.renderCodexArgs({ codexProjectDocMaxBytes: 0,
|
|
28
|
-
codexSandbox: { mode: 'workspace-write', networkAccess: false, webSearch: 'disabled' } }, input.workspacePath, 'http://127.0.0.1:1/mcp');
|
|
29
|
-
if (!probe.includes('project_doc_max_bytes=0')) {
|
|
30
|
-
throw new Error('Installed Daimon cannot disable ambient Codex instruction discovery');
|
|
31
|
-
}
|
|
32
|
-
let seq = 0;
|
|
33
|
-
let wakeId = '';
|
|
34
|
-
let used = false;
|
|
35
|
-
let usage = null;
|
|
36
|
-
let stopping;
|
|
37
|
-
let observationFailure;
|
|
38
|
-
let interrupted;
|
|
39
|
-
const interruption = new Promise((resolve) => { interrupted = resolve; });
|
|
40
|
-
const source = `daimon-fixtures:${input.trialId}`;
|
|
41
|
-
const emit = async (value) => {
|
|
42
|
-
const id = `${source}:${++seq}`;
|
|
43
|
-
try {
|
|
44
|
-
await input.onObservation({ id, source, seq, trialId: input.trialId, wakeId,
|
|
45
|
-
timestamp: new Date().toISOString(), ...value });
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
observationFailure = error instanceof Error ? error : new Error(String(error));
|
|
49
|
-
void stop('observation sink failed');
|
|
50
|
-
throw observationFailure;
|
|
51
|
-
}
|
|
52
|
-
return id;
|
|
53
|
-
};
|
|
54
|
-
const tools = (input.tools ?? []).map((tool) => ({
|
|
55
|
-
name: tool.name, label: tool.name, description: tool.description, parameters: tool.parameters,
|
|
56
|
-
async execute(callId, args, signal) {
|
|
57
|
-
const parent = await emit({ type: 'tool.dispatch', callId, tool: tool.name, args });
|
|
58
|
-
let result;
|
|
59
|
-
try {
|
|
60
|
-
if (stopping !== undefined || signal?.aborted === true)
|
|
61
|
-
throw new Error('Tool cancelled before execution');
|
|
62
|
-
result = await tool.execute(args, signal);
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
await emit({ type: 'tool.complete', callId, tool: tool.name, args,
|
|
66
|
-
result: error instanceof Error ? error.message : String(error), success: false, causalParents: [parent] });
|
|
67
|
-
throw error;
|
|
68
|
-
}
|
|
69
|
-
await emit({ type: 'tool.complete', callId, tool: tool.name, args, result, success: true, causalParents: [parent] });
|
|
70
|
-
return { content: [{ type: 'text', text: JSON.stringify(result) }], details: result };
|
|
71
|
-
},
|
|
72
|
-
}));
|
|
73
|
-
const sessionFactory = native.createCliSessionFactory({ engine: 'codex',
|
|
74
|
-
command: options.command, engineHomePath: authHome, model,
|
|
75
|
-
identityPrompt: input.instructions, timeoutMs,
|
|
76
|
-
codexSandbox: { mode: 'workspace-write', networkAccess: false, webSearch: 'disabled' },
|
|
77
|
-
codexSandboxProtectedPaths: [authHome, ...protectedPaths],
|
|
78
|
-
codexSandboxReadablePaths: [input.runtimeHomePath],
|
|
79
|
-
codexProjectDocMaxBytes: 0,
|
|
80
|
-
onTurnUsage: async (value) => {
|
|
81
|
-
const count = (key) => typeof value[key] === 'number' ? value[key] : null;
|
|
82
|
-
usage = { inputTokens: count('input'), cachedInputTokens: count('cacheRead'), outputTokens: count('output'),
|
|
83
|
-
reasoningTokens: null, source: 'daimon.codex.onTurnUsage' };
|
|
84
|
-
await emit({ type: 'usage', usage });
|
|
85
|
-
},
|
|
86
|
-
});
|
|
87
|
-
const harness = new native.PiHarnessAdapter({
|
|
88
|
-
// Empty native Pi registry; saved subscription stays in Codex's external auth home.
|
|
89
|
-
authPath: path.join(input.runtimeHomePath, 'unused-pi-auth.json'),
|
|
90
|
-
model: { provider: 'openai', name: model, auth: { method: 'codex' } },
|
|
91
|
-
sessionFactory, toolNames: [], productionTools: tools,
|
|
92
|
-
});
|
|
93
|
-
const handle = await harness.startAgent({ id: input.trialId, name: 'Training subject', instructions: input.instructions,
|
|
94
|
-
causalRunId: input.trialId,
|
|
95
|
-
workspacePath: input.workspacePath, runtimeHomePath: input.runtimeHomePath, tools: [] });
|
|
96
|
-
const stop = (reason) => {
|
|
97
|
-
stopping ??= (async () => {
|
|
98
|
-
let timer;
|
|
99
|
-
try {
|
|
100
|
-
const acknowledged = await Promise.race([
|
|
101
|
-
Promise.resolve().then(async () => { await handle.stop(); return true; }),
|
|
102
|
-
new Promise((resolve) => { timer = setTimeout(() => resolve(false), stopTimeoutMs); }),
|
|
103
|
-
]);
|
|
104
|
-
if (!acknowledged)
|
|
105
|
-
throw new Error('Native stop acknowledgement deadline exceeded');
|
|
106
|
-
return { state: handle.status().state === 'stopped' ? 'acknowledged' : 'unknown',
|
|
107
|
-
scope: 'native-handle', quiescence: 'unknown', remoteWork: 'unknown', reason,
|
|
108
|
-
detail: 'Daimon stop returned; Training cannot independently inspect its owned process groups or remote fixture effects.' };
|
|
109
|
-
}
|
|
110
|
-
catch (error) {
|
|
111
|
-
return { state: 'unknown', scope: 'native-handle', quiescence: 'unknown',
|
|
112
|
-
remoteWork: 'unknown', reason, detail: `Native stop failed: ${String(error)}` };
|
|
113
|
-
}
|
|
114
|
-
finally {
|
|
115
|
-
clearTimeout(timer);
|
|
116
|
-
interrupted();
|
|
117
|
-
}
|
|
118
|
-
})();
|
|
119
|
-
return stopping;
|
|
120
|
-
};
|
|
121
|
-
return {
|
|
122
|
-
stop,
|
|
123
|
-
async run(turn, signal) {
|
|
124
|
-
if (used)
|
|
125
|
-
throw new Error('This Daimon CLI route has no cross-wake conversation contract');
|
|
126
|
-
if (stopping !== undefined)
|
|
127
|
-
throw new Error('Subject session is stopped');
|
|
128
|
-
used = true;
|
|
129
|
-
wakeId = turn.id;
|
|
130
|
-
const abort = () => { void stop('abort signal'); };
|
|
131
|
-
const signals = [input.signal, signal].filter((entry) => entry !== undefined);
|
|
132
|
-
for (const entry of signals)
|
|
133
|
-
entry.addEventListener('abort', abort, { once: true });
|
|
134
|
-
let text = '';
|
|
135
|
-
let error;
|
|
136
|
-
let timedOut = false;
|
|
137
|
-
const deadline = setTimeout(() => { timedOut = true; void stop('native wake deadline'); }, timeoutMs);
|
|
138
|
-
try {
|
|
139
|
-
if (signals.some((entry) => entry.aborted)) {
|
|
140
|
-
abort();
|
|
141
|
-
throw new Error('Aborted before wake');
|
|
142
|
-
}
|
|
143
|
-
const result = await Promise.race([
|
|
144
|
-
handle.wake({ id: turn.id, kind: 'manual', text: turn.text }),
|
|
145
|
-
interruption.then(() => { throw new Error('Native wake interrupted before terminal completion'); }),
|
|
146
|
-
]);
|
|
147
|
-
text = result.text;
|
|
148
|
-
if (text.trim().length === 0)
|
|
149
|
-
throw new Error('Daimon returned no final output');
|
|
150
|
-
if (observationFailure !== undefined)
|
|
151
|
-
throw observationFailure;
|
|
152
|
-
await emit({ type: 'output', text });
|
|
153
|
-
}
|
|
154
|
-
catch (failure) {
|
|
155
|
-
error = failure instanceof Error ? failure.message : String(failure);
|
|
156
|
-
}
|
|
157
|
-
finally {
|
|
158
|
-
clearTimeout(deadline);
|
|
159
|
-
for (const entry of signals)
|
|
160
|
-
entry.removeEventListener('abort', abort);
|
|
161
|
-
}
|
|
162
|
-
const receipt = stopping === undefined ? undefined : await stopping;
|
|
163
|
-
return { status: observationFailure !== undefined || timedOut ? 'failed' : receipt === undefined ? error === undefined ? 'completed' : 'failed' : 'cancelled',
|
|
164
|
-
text, usage, error, stop: receipt,
|
|
165
|
-
coverage: [
|
|
166
|
-
{ channel: 'tools', completeness: tools.length === 0 ? 'absent' : 'partial', ordering: 'causal' },
|
|
167
|
-
{ channel: 'output', completeness: error === undefined ? 'complete' : 'partial', ordering: 'source' },
|
|
168
|
-
{ channel: 'usage', completeness: usage === null ? 'absent' : 'partial', ordering: 'source' },
|
|
169
|
-
] };
|
|
170
|
-
},
|
|
171
|
-
};
|
|
172
|
-
},
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
//# sourceMappingURL=adapter.js.map
|
|
@@ -1 +0,0 @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C,CAAC,CAAC,MAAM,QAAQ,CAAC;oBACpE,OAAO,EAAE,MAAM,EAAE,kBAAkB,KAAK,SAAS,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAiB,CAAC,CAAC,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,WAAoB,CAAC,CAAC,CAAC,QAAiB,CAAC,CAAC,CAAC,WAAoB;wBAC/L,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO;wBACjC,QAAQ,EAAE;4BACR,EAAE,OAAO,EAAE,OAAgB,EAAE,YAAY,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,QAAiB,CAAC,CAAC,CAAC,SAAkB,EAAE,QAAQ,EAAE,QAAiB,EAAE;4BACrI,EAAE,OAAO,EAAE,QAAiB,EAAE,YAAY,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,UAAmB,CAAC,CAAC,CAAC,SAAkB,EAAE,QAAQ,EAAE,QAAiB,EAAE;4BACzI,EAAE,OAAO,EAAE,OAAgB,EAAE,YAAY,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,QAAiB,CAAC,CAAC,CAAC,SAAkB,EAAE,QAAQ,EAAE,QAAiB,EAAE;yBAClI,EAAE,CAAC;gBACR,CAAC;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/runtime/daimon/training/legacy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAsB,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,UAAU,EAAqB,MAAM,aAAa,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/** Structural subset of the optional runtime's public contracts; no SDK import in core. */
|
|
2
|
-
export interface NativeTool {
|
|
3
|
-
name: string;
|
|
4
|
-
label: string;
|
|
5
|
-
description: string;
|
|
6
|
-
parameters: Record<string, unknown>;
|
|
7
|
-
execute(callId: string, args: unknown, signal?: AbortSignal): Promise<{
|
|
8
|
-
content: {
|
|
9
|
-
type: 'text';
|
|
10
|
-
text: string;
|
|
11
|
-
}[];
|
|
12
|
-
details: unknown;
|
|
13
|
-
}>;
|
|
14
|
-
}
|
|
15
|
-
export interface NativeHandle {
|
|
16
|
-
wake(event: {
|
|
17
|
-
id: string;
|
|
18
|
-
kind: 'manual';
|
|
19
|
-
text: string;
|
|
20
|
-
}): Promise<{
|
|
21
|
-
text: string;
|
|
22
|
-
}>;
|
|
23
|
-
stop(): Promise<void>;
|
|
24
|
-
status(): {
|
|
25
|
-
state: string;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export interface NativeHarness {
|
|
29
|
-
startAgent(input: {
|
|
30
|
-
id: string;
|
|
31
|
-
name: string;
|
|
32
|
-
instructions: string;
|
|
33
|
-
workspacePath: string;
|
|
34
|
-
runtimeHomePath: string;
|
|
35
|
-
tools: string[];
|
|
36
|
-
causalRunId: string;
|
|
37
|
-
}): Promise<NativeHandle>;
|
|
38
|
-
}
|
|
39
|
-
export interface DaimonModule {
|
|
40
|
-
PiHarnessAdapter: {
|
|
41
|
-
new (options: Record<string, unknown>): NativeHarness;
|
|
42
|
-
capabilities?: {
|
|
43
|
-
causalRunId?: boolean;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
createCliSessionFactory(options: Record<string, unknown>): unknown;
|
|
47
|
-
renderCodexArgs(options: Record<string, unknown>, cwd: string, endpoint?: string): string[];
|
|
48
|
-
}
|
|
49
|
-
export declare function loadDaimon(): Promise<DaimonModule>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export async function loadDaimon() {
|
|
2
|
-
const packageName = '@noopolis/daimon/pi';
|
|
3
|
-
let loaded;
|
|
4
|
-
try {
|
|
5
|
-
loaded = await import(packageName);
|
|
6
|
-
}
|
|
7
|
-
catch (error) {
|
|
8
|
-
throw new Error('Install optional @noopolis/daimon with its public /pi export to use this adapter', { cause: error });
|
|
9
|
-
}
|
|
10
|
-
if (typeof loaded['PiHarnessAdapter'] !== 'function' || typeof loaded['createCliSessionFactory'] !== 'function' ||
|
|
11
|
-
typeof loaded['renderCodexArgs'] !== 'function') {
|
|
12
|
-
throw new Error('Installed Daimon is missing required public Pi/CLI interfaces');
|
|
13
|
-
}
|
|
14
|
-
return loaded;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=public.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../../../src/runtime/daimon/training/legacy/public.ts"],"names":[],"mappings":"AAiCA,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,MAAM,WAAW,GAAG,qBAAqB,CAAC;IAC1C,IAAI,MAA+B,CAAC;IACpC,IAAI,CAAC;QAAC,MAAM,GAAG,MAAM,MAAM,CAAC,WAAW,CAA4B,CAAC;IAAC,CAAC;IACtE,OAAO,KAAK,EAAE,CAAC;QAAC,MAAM,IAAI,KAAK,CAAC,kFAAkF,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAAC,CAAC;IACxI,IAAI,OAAO,MAAM,CAAC,kBAAkB,CAAC,KAAK,UAAU,IAAI,OAAO,MAAM,CAAC,yBAAyB,CAAC,KAAK,UAAU;QAC7G,OAAO,MAAM,CAAC,iBAAiB,CAAC,KAAK,UAAU,EAAE,CAAC;QAClD,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,MAAiC,CAAC;AAC3C,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type NativeTransportDelivery } from './transport/index.js';
|
|
2
|
-
import { type NativeChildExecution } from './child/index.js';
|
|
3
|
-
import { type NativeExternalInputs } from './external.js';
|
|
4
|
-
import type { SubjectAdapter } from '../../../../training/index.js';
|
|
5
|
-
import { type DockerCommand } from './container/index.js';
|
|
6
|
-
import { type SealedBrokerUsageOptions } from './sealed-usage.js';
|
|
7
|
-
export interface NativeAdapterOptions {
|
|
8
|
-
timeoutMs?: number;
|
|
9
|
-
startupMs?: number;
|
|
10
|
-
docker?: DockerCommand;
|
|
11
|
-
execution?: NativeChildExecution;
|
|
12
|
-
externalInputs?: NativeExternalInputs;
|
|
13
|
-
/** Reserve the caller-owned transport source; the adapter publishes after the worker arms it. */
|
|
14
|
-
transportDelivery?: NativeTransportDelivery;
|
|
15
|
-
/** How long a failed turn waits for the broker to seal its spend before reporting absence. */
|
|
16
|
-
sealedUsage?: SealedBrokerUsageOptions;
|
|
17
|
-
}
|
|
18
|
-
export declare function createDaimonNativeAdapter(options?: NativeAdapterOptions): SubjectAdapter;
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import { canonicalWireId } from '../../../../training/index.js';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
import { nativeCodexAccount, nativeTrialArtifactsRoot } from './receipt/index.js';
|
|
4
|
-
import { acquireNativeAccountLease, nativeStartupClosureConfirmed } from '../services/index.js';
|
|
5
|
-
import { admittedNativeEvidence } from './outcome.js';
|
|
6
|
-
import { boundedTransportCall, requestTransportDelivery, transportTerminalBinding, verifyPreparedTransport } from './transport/index.js';
|
|
7
|
-
import { startOwnedChild } from './child/index.js';
|
|
8
|
-
import { nextExternalInput, weakestNativeCoverage } from './external.js';
|
|
9
|
-
import { MAX_EXTERNAL_DELIVERIES, engineWakeTimeoutMs } from './worker/index.js';
|
|
10
|
-
import { dockerCommand, workerRequest } from './container/index.js';
|
|
11
|
-
import { startOwnedContainer } from './container/index.js';
|
|
12
|
-
import { loadNativeLaunch } from './container/index.js';
|
|
13
|
-
import { createNativeObserver } from './observations.js';
|
|
14
|
-
import { readSealedBrokerRequests, readSealedBrokerSeal, readSealedBrokerUsage } from './sealed-usage.js';
|
|
15
|
-
import { nativeAdmission, unknownNativeAdmission } from './admission.js';
|
|
16
|
-
export function createDaimonNativeAdapter(options = {}) {
|
|
17
|
-
const timeoutMs = options.timeoutMs ?? 900_000;
|
|
18
|
-
if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 100 || timeoutMs > 86_400_000)
|
|
19
|
-
throw new Error('Invalid native adapter deadline');
|
|
20
|
-
if (options.startupMs !== undefined && (!Number.isSafeInteger(options.startupMs) || options.startupMs < 1 || options.startupMs > 3_600_000))
|
|
21
|
-
throw new Error('Invalid native startup deadline');
|
|
22
|
-
if (options.execution && options.externalInputs)
|
|
23
|
-
throw new Error('Child execution requires execution.externalInputs, not Docker externalInputs');
|
|
24
|
-
const sealedUsage = options.sealedUsage;
|
|
25
|
-
const execution = options.execution;
|
|
26
|
-
if (execution && execution.kind !== 'child-process')
|
|
27
|
-
throw new Error('Unsupported native execution mode');
|
|
28
|
-
const childExternal = execution?.externalInputs ? { ...execution.externalInputs } : undefined;
|
|
29
|
-
const dockerExternal = options.externalInputs ? { ...options.externalInputs } : undefined;
|
|
30
|
-
const external = childExternal ?? dockerExternal;
|
|
31
|
-
if (external && (!Number.isSafeInteger(external.maxDeliveries) || external.maxDeliveries < 1 || external.maxDeliveries > MAX_EXTERNAL_DELIVERIES || typeof external.next !== 'function'))
|
|
32
|
-
throw new Error('Invalid external input policy');
|
|
33
|
-
if (options.execution && options.docker)
|
|
34
|
-
throw new Error('Select one native execution transport');
|
|
35
|
-
if (options.transportDelivery && typeof options.transportDelivery.prepare !== 'function')
|
|
36
|
-
throw new Error('Invalid transport delivery provider');
|
|
37
|
-
const docker = options.docker ?? dockerCommand();
|
|
38
|
-
return {
|
|
39
|
-
id: 'daimon-native',
|
|
40
|
-
capabilities: { toolTrace: 'partial', liveObservations: true, cancellation: 'native-handle', multiTurn: false,
|
|
41
|
-
resources: ['instructions', 'native-skills', 'supporting-files'], readIsolation: 'declared-paths', protectedPaths: true,
|
|
42
|
-
isolation: execution ? 'Fresh worker child in shared caller container; exact native sandbox protects declared paths' :
|
|
43
|
-
'Fresh local Linux container; canonical native sandbox denies /run and runtime credentials; evaluator files excluded from mounts' },
|
|
44
|
-
async start(input) {
|
|
45
|
-
if (input.signal?.aborted)
|
|
46
|
-
throw new Error('Native subject start aborted');
|
|
47
|
-
const launch = await loadNativeLaunch(input, !!execution);
|
|
48
|
-
if (launch.delivery === 'transport' && !options.transportDelivery)
|
|
49
|
-
throw new Error('Transport delivery mode requires a transport delivery provider');
|
|
50
|
-
const account = nativeCodexAccount(launch);
|
|
51
|
-
// Admission is cancellable and outside both startup and cognition clocks.
|
|
52
|
-
const releaseAccount = account ? await acquireNativeAccountLease(account.realm.source, input.signal) : undefined;
|
|
53
|
-
const deadline = Date.now() + timeoutMs;
|
|
54
|
-
let container;
|
|
55
|
-
try {
|
|
56
|
-
container = execution
|
|
57
|
-
? await startOwnedChild(execution, launch, input.trialId, timeoutMs, input.signal, options.startupMs, input.protectedPaths)
|
|
58
|
-
: await startOwnedContainer(docker, launch, input.trialId, timeoutMs, input.signal, options.startupMs).then(owned => ({
|
|
59
|
-
...owned, request: (path, body, ms, signal) => workerRequest(docker, owned.name, path, body, ms, signal, launch.host.port),
|
|
60
|
-
}));
|
|
61
|
-
}
|
|
62
|
-
catch (error) {
|
|
63
|
-
if (nativeStartupClosureConfirmed(error))
|
|
64
|
-
releaseAccount?.();
|
|
65
|
-
throw error;
|
|
66
|
-
}
|
|
67
|
-
const observer = createNativeObserver(input, launch.projections.find(row => row.role === 'home').source, launch.agent.id, launch.agent.engine);
|
|
68
|
-
const evidence = { schema: 'spawnfile.training.daimon-native.evidence.v1', wakes: [] };
|
|
69
|
-
const admittedDeliveries = new Set();
|
|
70
|
-
let attributionInvalid = false;
|
|
71
|
-
let ordinal = 0;
|
|
72
|
-
let used = false;
|
|
73
|
-
let stopped = false;
|
|
74
|
-
const sessionCancellation = new AbortController();
|
|
75
|
-
const stop = async (reason) => {
|
|
76
|
-
stopped = true;
|
|
77
|
-
sessionCancellation.abort();
|
|
78
|
-
const receipt = await container.stop(reason);
|
|
79
|
-
if (receipt.state === 'acknowledged' && receipt.quiescence === 'confirmed')
|
|
80
|
-
releaseAccount?.();
|
|
81
|
-
return receipt;
|
|
82
|
-
};
|
|
83
|
-
const deliver = async (turn, signal, controls, observedWakeId = turn.id, transport) => {
|
|
84
|
-
if (stopped || signal?.aborted || input.signal?.aborted)
|
|
85
|
-
throw new Error('Native subject cancelled before delivery');
|
|
86
|
-
const signals = [input.signal, signal].filter((value) => value !== undefined);
|
|
87
|
-
const cancelled = new AbortController();
|
|
88
|
-
const abort = () => { cancelled.abort(); if (!stopped)
|
|
89
|
-
void stop('Native subject aborted'); };
|
|
90
|
-
for (const source of signals)
|
|
91
|
-
source.addEventListener('abort', abort, { once: true });
|
|
92
|
-
if (signals.some(source => source.aborted))
|
|
93
|
-
abort();
|
|
94
|
-
let done = false;
|
|
95
|
-
let terminal;
|
|
96
|
-
let failure;
|
|
97
|
-
const deliveryOrdinal = ++ordinal;
|
|
98
|
-
const body = { wakeId: turn.id, text: turn.text, ...(controls ? { controls } : {}) };
|
|
99
|
-
const response = (transport
|
|
100
|
-
? requestTransportDelivery(container.request, { ...body, source: transport.source }, transport, deadline, cancelled.signal)
|
|
101
|
-
: container.request('/trial/run', body, Math.max(1, deadline - Date.now()) + 8000, cancelled.signal))
|
|
102
|
-
.then(value => { terminal = value; }, error => { failure = error; }).finally(() => { done = true; });
|
|
103
|
-
try {
|
|
104
|
-
while (!done) {
|
|
105
|
-
await observer.checkpoint(observedWakeId);
|
|
106
|
-
await Promise.race([response, new Promise(resolve => setTimeout(resolve, 200))]);
|
|
107
|
-
}
|
|
108
|
-
if (failure)
|
|
109
|
-
throw failure;
|
|
110
|
-
if (!terminal || canonicalWireId(terminal.schema) !== 'spawnfile.training.daimon-native.trial.v1' || terminal.trialId !== input.trialId ||
|
|
111
|
-
terminal.wakeId !== turn.id || terminal.agentId !== launch.agent.id || terminal.model !== launch.agent.model ||
|
|
112
|
-
terminal.configSha256 !== launch.configSha256) {
|
|
113
|
-
if (terminal)
|
|
114
|
-
attributionInvalid = true;
|
|
115
|
-
throw new Error('Native terminal evidence identity mismatch');
|
|
116
|
-
}
|
|
117
|
-
const binding = transport ? transportTerminalBinding(terminal, transport.source) : 'bound';
|
|
118
|
-
if (binding === 'conflict') {
|
|
119
|
-
attributionInvalid = true;
|
|
120
|
-
throw new Error('Native transport terminal evidence identity mismatch');
|
|
121
|
-
}
|
|
122
|
-
let admitted;
|
|
123
|
-
try {
|
|
124
|
-
admitted = admittedNativeEvidence(terminal, launch, input.trialId, turn.id, deliveryOrdinal, join(nativeTrialArtifactsRoot(launch, input.trialId), 'evidence.json'), transport?.source, admittedDeliveries, engineWakeTimeoutMs(timeoutMs, launch));
|
|
125
|
-
// Evidence admission only withholds evidence from collect(); the turn's own verdict is unchanged.
|
|
126
|
-
}
|
|
127
|
-
catch {
|
|
128
|
-
attributionInvalid = true;
|
|
129
|
-
}
|
|
130
|
-
if (admitted)
|
|
131
|
-
evidence.wakes.push(admitted);
|
|
132
|
-
if (terminal.blocked && terminal.status !== 'failed')
|
|
133
|
-
throw new Error('Blocked native terminal cannot claim completion');
|
|
134
|
-
const admission = terminal.status === 'failed' && !terminal.blocked ? nativeAdmission(terminal) : undefined;
|
|
135
|
-
await observer.checkpoint(observedWakeId);
|
|
136
|
-
// No execution has no usage/output to publish. Retain its admission
|
|
137
|
-
// evidence in the turn before collectors demand an execution binding.
|
|
138
|
-
const usage = admission && Object.values(admission).every(value => value === 0)
|
|
139
|
-
? null : await observer.terminal(observedWakeId, terminal);
|
|
140
|
-
// The blocked receipt travels with the verified terminal evidence: the trace
|
|
141
|
-
// closed, the delivery stayed accepted and deferred, and the identity checks
|
|
142
|
-
// above matched. The caller needs that apart from the bare `failed` status.
|
|
143
|
-
return { result: { status: terminal.status, text: '', usage, error: terminal.error, coverage: terminal.coverage,
|
|
144
|
-
...(admission ? { admission } : {}),
|
|
145
|
-
...(terminal.blocked ? { blocked: terminal.blocked } : {}),
|
|
146
|
-
...(terminal.limit && terminal.status === 'failed' ? { limit: terminal.limit } : {}) }, terminal, verified: binding === 'bound' };
|
|
147
|
-
}
|
|
148
|
-
catch (error) {
|
|
149
|
-
const wasCancelled = stopped || signals.some(source => source.aborted);
|
|
150
|
-
cancelled.abort();
|
|
151
|
-
const receipt = await stop('Native subject execution failed');
|
|
152
|
-
// The worker's reply was the only route usage normally takes here,
|
|
153
|
-
// and it never came — but a wake that fails spends the same money
|
|
154
|
-
// as one that publishes, and the broker sealed what its own proxy
|
|
155
|
-
// measured. Read that rather than reporting a zero nobody measured.
|
|
156
|
-
// The broker's own two ledgers, read on one bounded wait: what the
|
|
157
|
-
// turn spent, and — the only record that can tell a provider
|
|
158
|
-
// request issued and never answered from one never issued at all —
|
|
159
|
-
// when each request started and whether it ended.
|
|
160
|
-
// And the sealed terminal record itself, which a hung turn's HTTP
|
|
161
|
-
// reply can never carry: the failure code, the worker's redacted
|
|
162
|
-
// last words, and the MCP tool call it was still blocked on.
|
|
163
|
-
const [sealed, requests, seal] = await Promise.all([
|
|
164
|
-
readSealedBrokerUsage(launch, sealedUsage), readSealedBrokerRequests(launch, sealedUsage),
|
|
165
|
-
readSealedBrokerSeal(launch, sealedUsage),
|
|
166
|
-
]);
|
|
167
|
-
const usage = await observer.sealedUsage(observedWakeId, sealed.rows);
|
|
168
|
-
if (requests)
|
|
169
|
-
await observer.brokerRequests(observedWakeId, requests);
|
|
170
|
-
if (seal)
|
|
171
|
-
await observer.brokerSeal(observedWakeId, seal);
|
|
172
|
-
// Whatever the worker said before it stopped answering, redacted.
|
|
173
|
-
const record = container.diagnostic?.();
|
|
174
|
-
if (record)
|
|
175
|
-
await observer.childDiagnostic(observedWakeId, record);
|
|
176
|
-
return { result: { status: wasCancelled ? 'cancelled' : 'failed',
|
|
177
|
-
admission: unknownNativeAdmission(),
|
|
178
|
-
text: '', usage, error: String(error), stop: receipt,
|
|
179
|
-
coverage: [{ channel: 'tools', completeness: 'partial', ordering: 'none' },
|
|
180
|
-
{ channel: 'output', completeness: 'absent', ordering: 'none' },
|
|
181
|
-
// Measured, but never complete: the execution it belongs to never closed.
|
|
182
|
-
{ channel: 'usage', completeness: usage ? 'partial' : 'absent',
|
|
183
|
-
ordering: usage ? 'source' : 'none' }] }, terminal, verified: false };
|
|
184
|
-
}
|
|
185
|
-
finally {
|
|
186
|
-
for (const source of signals)
|
|
187
|
-
source.removeEventListener('abort', abort);
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
return { stop, async run(turn, signal) {
|
|
191
|
-
const result = await run(turn, signal);
|
|
192
|
-
return { ...result, ...(!attributionInvalid && evidence.wakes.length ? { evidence: { adapterId: 'daimon-native', payload: structuredClone(evidence) } } : {}) };
|
|
193
|
-
} };
|
|
194
|
-
async function run(turn, signal) {
|
|
195
|
-
if (used || stopped)
|
|
196
|
-
throw new Error('Native Daimon session permits one delivery');
|
|
197
|
-
used = true;
|
|
198
|
-
const combined = AbortSignal.any([sessionCancellation.signal, input.signal, signal].filter((value) => value !== undefined));
|
|
199
|
-
const coverages = [];
|
|
200
|
-
const ids = new Set([turn.id]);
|
|
201
|
-
let current = turn;
|
|
202
|
-
let transport;
|
|
203
|
-
let controls = external ? { maxExternalDeliveries: external.maxDeliveries } : undefined;
|
|
204
|
-
try {
|
|
205
|
-
if (launch.delivery === 'transport') {
|
|
206
|
-
transport = await boundedTransportCall(bound => options.transportDelivery.prepare({ trialId: input.trialId, turnId: turn.id,
|
|
207
|
-
text: turn.text, launch, executionId: container.name }, bound), deadline, combined);
|
|
208
|
-
verifyPreparedTransport(transport);
|
|
209
|
-
}
|
|
210
|
-
for (let ordinal = 0;; ordinal++) {
|
|
211
|
-
const { result, terminal, verified } = await deliver(current, combined, controls, turn.id, transport);
|
|
212
|
-
coverages.push(result.coverage);
|
|
213
|
-
// A cancelled wake never carries the deferral: cancellation is the machine's outcome.
|
|
214
|
-
if (verified && stopped)
|
|
215
|
-
return { ...result, status: 'cancelled', blocked: undefined, limit: undefined, usage: observer.usage(),
|
|
216
|
-
coverage: weakestNativeCoverage(coverages), stop: await stop('Native subject stopped after verified wake') };
|
|
217
|
-
if (!verified || !external || terminal?.blocked !== 'awaiting-external-input')
|
|
218
|
-
return { ...result, usage: observer.usage(), coverage: weakestNativeCoverage(coverages) };
|
|
219
|
-
if (ordinal >= external.maxDeliveries)
|
|
220
|
-
return { ...result, status: 'failed', usage: observer.usage(), coverage: weakestNativeCoverage(coverages), stop: await stop('External input delivery budget exhausted') };
|
|
221
|
-
const common = { trialId: input.trialId, turnId: turn.id, launch, terminal };
|
|
222
|
-
const next = execution
|
|
223
|
-
? await nextExternalInput(childExternal, { ...common, executionId: container.name }, deadline, combined)
|
|
224
|
-
: await nextExternalInput(dockerExternal, { ...common, containerName: container.name }, deadline, combined);
|
|
225
|
-
combined.throwIfAborted();
|
|
226
|
-
if (!next)
|
|
227
|
-
return { ...result, status: 'failed', usage: observer.usage(), coverage: weakestNativeCoverage(coverages), stop: await stop('No matching external input') };
|
|
228
|
-
if (launch.delivery === 'transport' && !next.transport)
|
|
229
|
-
throw new Error('Transport continuation requires a declared transport delivery');
|
|
230
|
-
if (launch.delivery !== 'transport' && next.transport)
|
|
231
|
-
throw new Error('Direct delivery cannot publish a transport continuation');
|
|
232
|
-
if (ids.has(next.id))
|
|
233
|
-
throw new Error('External input delivery ID was reused');
|
|
234
|
-
ids.add(next.id);
|
|
235
|
-
await observer.externalInput(turn.id, next);
|
|
236
|
-
current = { id: next.id, text: next.text };
|
|
237
|
-
controls = { source: next.source };
|
|
238
|
-
transport = next.transport;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
catch (error) {
|
|
242
|
-
const wasCancelled = combined.aborted;
|
|
243
|
-
const receipt = await stop('External input continuation failed');
|
|
244
|
-
return { status: wasCancelled ? 'cancelled' : 'failed', text: '', usage: observer.usage(), error: String(error), stop: receipt,
|
|
245
|
-
admission: unknownNativeAdmission(),
|
|
246
|
-
coverage: weakestNativeCoverage(coverages) };
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
};
|
|
251
|
-
}
|
|
252
|
-
//# sourceMappingURL=adapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../../src/runtime/daimon/training/native/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAAE,sBAAsB,EAA2B,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,uBAAuB,EACd,MAAM,sBAAsB,CAAC;AACzH,OAAO,EAAE,eAAe,EAA6B,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAA6B,MAAM,eAAe,CAAC;AAEpG,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAgD,MAAM,mBAAmB,CAAC;AAC/H,OAAO,EAAE,aAAa,EAAE,aAAa,EAAsB,MAAM,sBAAsB,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,qBAAqB,EAAiC,MAAM,mBAAmB,CAAC;AACzI,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAQzE,MAAM,UAAU,yBAAyB,CAAC,UAAgC,EAAE;IAC1E,MAAM,SAAS,GAAG,OAAO,CAAC,S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,CAAC,CAAC;wBAClI,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;4BAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;wBAC/E,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;wBACjB,MAAM,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;wBAC5C,OAAO,GAAG,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;wBAC3C,QAAQ,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;wBACnC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;oBAC7B,CAAC;gBACH,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC;oBACtC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,oCAAoC,CAAC,CAAC;oBACjE,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO;wBAC5H,SAAS,EAAE,sBAAsB,EAAE;wBACnC,QAAQ,EAAE,qBAAqB,CAAC,SAAS,CAAC,EAAE,CAAC;gBACjD,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { SubjectTurnResult } from '../../../../training/index.js';
|
|
2
|
-
import type { TerminalEvidence } from './worker/index.js';
|
|
3
|
-
type Admission = NonNullable<SubjectTurnResult['admission']>;
|
|
4
|
-
export declare const unknownNativeAdmission: () => Admission;
|
|
5
|
-
/** Called only after the adapter binds trial, wake, agent, model, config and transport source. */
|
|
6
|
-
export declare function nativeAdmission(value: TerminalEvidence): Admission;
|
|
7
|
-
export {};
|