spawnfile 0.1.14 → 0.1.18
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 +60 -159
- package/dist/audit/checksShared.d.ts +1 -1
- package/dist/auth/importers.d.ts +10 -0
- package/dist/auth/importers.js +46 -5
- package/dist/auth/index.d.ts +3 -0
- package/dist/auth/index.js +2 -0
- package/dist/auth/paths.d.ts +1 -1
- package/dist/auth/profileStore.js +13 -10
- package/dist/auth/targetSecretSourceFsIdentity.d.ts +40 -0
- package/dist/auth/targetSecretSourceFsIdentity.js +42 -0
- package/dist/auth/targetSecretSourceFsPublish.d.ts +2 -0
- package/dist/auth/targetSecretSourceFsPublish.js +3 -1
- package/dist/auth/targetSecretSourceFsPublishImmutable.d.ts +2 -1
- package/dist/auth/targetSecretSourceFsPublishImmutable.js +104 -71
- package/dist/auth/targetSecretSourceFsRead.js +5 -14
- package/dist/auth/trainingAuth.d.ts +21 -0
- package/dist/auth/trainingAuth.js +86 -0
- package/dist/auth/trainingGrokWriteback.d.ts +4 -0
- package/dist/auth/trainingGrokWriteback.js +119 -0
- package/dist/auth/trainingGrokWritebackLock.d.ts +5 -0
- package/dist/auth/trainingGrokWritebackLock.js +56 -0
- package/dist/auth/types.d.ts +1 -1
- package/dist/cli/authCommands.d.ts +1 -1
- package/dist/cli/authCommands.js +18 -5
- package/dist/cli/canaryCutoverCommand.d.ts +2 -0
- package/dist/cli/canaryCutoverCommand.js +30 -0
- package/dist/cli/capabilitiesCommand.d.ts +3 -0
- package/dist/cli/capabilitiesCommand.js +12 -0
- package/dist/cli/capabilitiesReceipt.d.ts +56 -0
- package/dist/cli/capabilitiesReceipt.js +56 -0
- package/dist/cli/compileBuildCommands.js +17 -0
- package/dist/cli/composedLifecycleContractSet.d.ts +21 -0
- package/dist/cli/composedLifecycleContractSet.js +204 -0
- package/dist/cli/devCommands.js +6 -2
- package/dist/cli/downCommand.d.ts +2 -0
- package/dist/cli/downCommand.js +22 -8
- package/dist/cli/envFileOption.d.ts +18 -0
- package/dist/cli/envFileOption.js +20 -0
- package/dist/cli/evidenceExportHelperCommand.d.ts +13 -0
- package/dist/cli/evidenceExportHelperCommand.js +51 -0
- package/dist/cli/index.js +12 -3
- package/dist/cli/lifecycleCommands.d.ts +1 -1
- package/dist/cli/lifecycleCommands.js +3 -1
- package/dist/cli/lifecycleMachine.d.ts +7 -1
- package/dist/cli/lifecycleMachine.js +2 -2
- package/dist/cli/lifecyclePlan.d.ts +1 -0
- package/dist/cli/lifecyclePlan.js +2 -0
- package/dist/cli/paideiaDelegation.d.ts +18 -0
- package/dist/cli/paideiaDelegation.js +211 -0
- package/dist/cli/paideiaSupervisor.d.ts +17 -0
- package/dist/cli/paideiaSupervisor.js +48 -0
- package/dist/cli/productStateCloneCommand.d.ts +2 -0
- package/dist/cli/productStateCloneCommand.js +34 -0
- package/dist/cli/recordCommands.d.ts +17 -0
- package/dist/cli/recordCommands.js +43 -0
- package/dist/cli/releaseCommand.d.ts +6 -0
- package/dist/cli/releaseCommand.js +91 -0
- package/dist/cli/runCli.d.ts +19 -3
- package/dist/cli/runCli.js +43 -10
- package/dist/cli/runPublishCommands.js +5 -3
- package/dist/cli/targetCommands.d.ts +4 -7
- package/dist/cli/targetCommands.js +16 -46
- package/dist/cli/targetConfigPreparedPlan.d.ts +3 -0
- package/dist/cli/targetConfigPreparedPlan.js +74 -0
- package/dist/cli/targetConfigResolver.d.ts +3 -0
- package/dist/cli/targetConfigResolver.js +111 -0
- package/dist/cli/targetConfigResolverCommand.d.ts +6 -0
- package/dist/cli/targetConfigResolverCommand.js +43 -0
- package/dist/cli/targetConfigResolverContracts.d.ts +56 -0
- package/dist/cli/targetConfigResolverContracts.js +30 -0
- package/dist/cli/targetConfigResolverDocker.d.ts +4 -0
- package/dist/cli/targetConfigResolverDocker.js +47 -0
- package/dist/cli/targetConfigResolverValidation.d.ts +10 -0
- package/dist/cli/targetConfigResolverValidation.js +94 -0
- package/dist/cli/targetDefaultAuthorities.d.ts +2 -0
- package/dist/cli/targetDefaultAuthorities.js +3 -0
- package/dist/cli/targetDefaultConfig.d.ts +7 -0
- package/dist/cli/targetDefaultConfig.js +22 -5
- package/dist/cli/targetDefaultConfigStdin.js +7 -1
- package/dist/cli/targetDefaultHandlerFactory.js +23 -2
- package/dist/cli/targetDefaultHandlers.d.ts +2 -2
- package/dist/cli/targetProductionCommands.d.ts +5 -0
- package/dist/cli/targetProductionCommands.js +45 -0
- package/dist/cli/trainCommand.d.ts +3 -0
- package/dist/cli/trainCommand.js +114 -0
- package/dist/cli/upCommand.js +40 -7
- package/dist/cli/upLifecycleRecovery.d.ts +2 -2
- package/dist/cli/upLifecycleRecovery.js +188 -44
- package/dist/cli/usageCommand.d.ts +40 -0
- package/dist/cli/usageCommand.js +284 -0
- package/dist/cli/usageCommandLive.d.ts +84 -0
- package/dist/cli/usageCommandLive.js +95 -0
- package/dist/cli/usageDeploymentSource.d.ts +9 -0
- package/dist/cli/usageDeploymentSource.js +22 -0
- package/dist/cli/volumeCommands.d.ts +8 -0
- package/dist/cli/volumeCommands.js +53 -0
- package/dist/cli/workspaceResourceMigrationCommand.d.ts +8 -0
- package/dist/cli/workspaceResourceMigrationCommand.js +36 -0
- package/dist/compiler/agentNodeMerge.js +3 -2
- package/dist/compiler/buildCompilePlan.js +4 -0
- package/dist/compiler/buildCompilePlanAgent.js +3 -1
- package/dist/compiler/buildCompilePlanTeams.d.ts +1 -1
- package/dist/compiler/buildCompilePlanTeams.js +6 -1
- package/dist/compiler/buildCompilePlanTraversal.js +2 -0
- package/dist/compiler/buildCompilePlanTraversalHelpers.d.ts +2 -2
- package/dist/compiler/buildCompilePlanTraversalHelpers.js +4 -3
- package/dist/compiler/buildProject.d.ts +10 -0
- package/dist/compiler/buildProject.js +14 -2
- package/dist/compiler/cleanCompileOutput.d.ts +2 -0
- package/dist/compiler/cleanCompileOutput.js +14 -0
- package/dist/compiler/compilePlanHelpers.js +5 -0
- package/dist/compiler/compileProject.d.ts +12 -0
- package/dist/compiler/compileProject.js +33 -3
- package/dist/compiler/compileProjectSupport.js +9 -0
- package/dist/compiler/containerArtifactSummaries.js +1 -0
- package/dist/compiler/containerArtifacts.d.ts +7 -5
- package/dist/compiler/containerArtifacts.js +77 -41
- package/dist/compiler/containerArtifactsPlans.d.ts +1 -1
- package/dist/compiler/containerArtifactsPlans.js +31 -7
- package/dist/compiler/containerArtifactsRender.d.ts +2 -1
- package/dist/compiler/containerArtifactsRender.js +91 -58
- package/dist/compiler/containerArtifactsTypes.d.ts +15 -0
- package/dist/compiler/containerBackedMountRender.d.ts +56 -0
- package/dist/compiler/containerBackedMountRender.js +101 -0
- package/dist/compiler/containerDaimonBrokerRender.d.ts +114 -0
- package/dist/compiler/containerDaimonBrokerRender.js +194 -0
- package/dist/compiler/containerDaimonGrokTaskClock.d.ts +5 -0
- package/dist/compiler/containerDaimonGrokTaskClock.js +29 -0
- package/dist/compiler/containerDaimonGrokWorkerProvisioning.d.ts +38 -0
- package/dist/compiler/containerDaimonGrokWorkerProvisioning.js +130 -0
- package/dist/compiler/containerDaimonGrokWorkerRender.d.ts +197 -0
- package/dist/compiler/containerDaimonGrokWorkerRender.js +281 -0
- package/dist/compiler/containerDaimonOwnershipGuardRender.d.ts +25 -0
- package/dist/compiler/containerDaimonOwnershipGuardRender.js +204 -0
- package/dist/compiler/containerDaimonUidEntrypointRender.d.ts +24 -0
- package/dist/compiler/containerDaimonUidEntrypointRender.js +291 -0
- package/dist/compiler/containerEntrypointRender.d.ts +7 -0
- package/dist/compiler/containerEntrypointRender.js +28 -22
- package/dist/compiler/containerPersistentMounts.d.ts +30 -0
- package/dist/compiler/containerPersistentMounts.js +66 -0
- package/dist/compiler/containerReadinessPaths.d.ts +1 -0
- package/dist/compiler/containerReadinessPaths.js +1 -0
- package/dist/compiler/containerRuntimeLinkMaterializer.d.ts +2 -0
- package/dist/compiler/containerRuntimeLinkMaterializer.js +12 -0
- package/dist/compiler/containerRuntimeReadinessRender.d.ts +7 -0
- package/dist/compiler/containerRuntimeReadinessRender.js +40 -0
- package/dist/compiler/containerStateOwnershipRender.d.ts +4 -0
- package/dist/compiler/containerStateOwnershipRender.js +75 -0
- package/dist/compiler/containerTargetResources.d.ts +32 -1
- package/dist/compiler/containerTargetResources.js +115 -15
- package/dist/compiler/containerVolumeBootstrap.d.ts +3 -0
- package/dist/compiler/containerVolumeBootstrap.js +3 -0
- package/dist/compiler/containerWorkspaceResourceRender.js +52 -1
- package/dist/compiler/daimonTelemetryArtifacts.d.ts +2 -2
- package/dist/compiler/daimonTelemetryArtifacts.js +5 -10
- package/dist/compiler/deploymentLineage.d.ts +40 -0
- package/dist/compiler/deploymentLineage.js +50 -0
- package/dist/compiler/index.d.ts +5 -0
- package/dist/compiler/index.js +5 -0
- package/dist/compiler/initProject.d.ts +2 -0
- package/dist/compiler/initProject.js +39 -1
- package/dist/compiler/localMoltnetAuthority.d.ts +64 -0
- package/dist/compiler/localMoltnetAuthority.js +177 -0
- package/dist/compiler/mcpPlaceholders.d.ts +11 -0
- package/dist/compiler/mcpPlaceholders.js +58 -0
- package/dist/compiler/mcpServerInheritance.d.ts +18 -0
- package/dist/compiler/mcpServerInheritance.js +43 -0
- package/dist/compiler/memoryArtifacts.d.ts +1 -1
- package/dist/compiler/memoryArtifacts.js +108 -32
- package/dist/compiler/modelEnv.d.ts +5 -0
- package/dist/compiler/modelEnv.js +8 -2
- package/dist/compiler/moltnetArtifactPaths.d.ts +17 -12
- package/dist/compiler/moltnetArtifactPaths.js +17 -15
- package/dist/compiler/moltnetArtifactTypes.d.ts +11 -0
- package/dist/compiler/moltnetArtifacts.d.ts +1 -1
- package/dist/compiler/moltnetArtifacts.js +53 -12
- package/dist/compiler/moltnetBinaries.d.ts +16 -4
- package/dist/compiler/moltnetBinaries.js +46 -6
- package/dist/compiler/moltnetClientConfig.js +1 -1
- package/dist/compiler/moltnetConfigLowering.d.ts +3 -1
- package/dist/compiler/moltnetConfigLowering.js +30 -6
- package/dist/compiler/moltnetNodeConfig.js +1 -1
- package/dist/compiler/moltnetReleaseAuthority.d.ts +24 -1
- package/dist/compiler/moltnetReleaseAuthority.js +33 -4
- package/dist/compiler/moltnetRepresentativeResolution.d.ts +1 -1
- package/dist/compiler/moltnetRepresentativeResolution.js +2 -2
- package/dist/compiler/moltnetResolution.js +9 -15
- package/dist/compiler/moltnetRoomMemberships.js +20 -5
- package/dist/compiler/moltnetRoomPolicyCompatibility.d.ts +1 -1
- package/dist/compiler/moltnetRoomPolicyCompatibility.js +3 -1
- package/dist/compiler/moltnetRuntimeConfig.d.ts +1 -1
- package/dist/compiler/moltnetRuntimeConfig.js +22 -2
- package/dist/compiler/moltnetServerPlans.js +19 -0
- package/dist/compiler/organizationExternalParticipants.d.ts +3 -0
- package/dist/compiler/organizationExternalParticipants.js +176 -0
- package/dist/compiler/organizationIdentity.d.ts +3 -9
- package/dist/compiler/organizationIdentity.js +37 -270
- package/dist/compiler/organizationIdentityGraph.d.ts +15 -0
- package/dist/compiler/organizationIdentityGraph.js +115 -0
- package/dist/compiler/organizationReadyEvidence.d.ts +8 -0
- package/dist/compiler/organizationReadyEvidence.js +23 -3
- package/dist/compiler/preflightCompilePlan.d.ts +9 -0
- package/dist/compiler/preflightCompilePlan.js +38 -0
- package/dist/compiler/recordingAgentFacts.d.ts +4 -0
- package/dist/compiler/recordingAgentFacts.js +35 -0
- package/dist/compiler/recordingCapability.d.ts +4 -0
- package/dist/compiler/recordingCapability.js +22 -0
- package/dist/compiler/recordingReport.d.ts +4 -0
- package/dist/compiler/recordingReport.js +18 -0
- package/dist/compiler/runProject.d.ts +6 -3
- package/dist/compiler/runProject.js +34 -6
- package/dist/compiler/runProjectAuth.d.ts +3 -1
- package/dist/compiler/runProjectAuth.js +19 -3
- package/dist/compiler/runProjectDaimonCodexDocker.d.ts +3 -0
- package/dist/compiler/runProjectDaimonCodexDocker.js +36 -0
- package/dist/compiler/runProjectDocker.d.ts +8 -4
- package/dist/compiler/runProjectDocker.js +43 -18
- package/dist/compiler/runProjectDockerDaimonGuards.d.ts +15 -0
- package/dist/compiler/runProjectDockerDaimonGuards.js +122 -0
- package/dist/compiler/runProjectDockerReservation.d.ts +3 -0
- package/dist/compiler/runProjectDockerReservation.js +118 -0
- package/dist/compiler/runProjectLifecycle.js +1 -1
- package/dist/compiler/surfaces.d.ts +1 -2
- package/dist/compiler/surfaces.js +0 -1
- package/dist/compiler/syncProjectAuth.js +2 -1
- package/dist/compiler/training/broker/clockProbe.d.ts +6 -0
- package/dist/compiler/training/broker/clockProbe.js +27 -0
- package/dist/compiler/training/broker/declaration.d.ts +47 -0
- package/dist/compiler/training/broker/declaration.js +57 -0
- package/dist/compiler/training/broker/entrypoint.d.ts +39 -0
- package/dist/compiler/training/broker/entrypoint.js +126 -0
- package/dist/compiler/training/broker/evaluatorSecrets.d.ts +2 -0
- package/dist/compiler/training/broker/evaluatorSecrets.js +60 -0
- package/dist/compiler/training/broker/index.d.ts +11 -0
- package/dist/compiler/training/broker/index.js +11 -0
- package/dist/compiler/training/broker/main.d.ts +2 -0
- package/dist/compiler/training/broker/main.js +14 -0
- package/dist/compiler/training/broker/paths.d.ts +236 -0
- package/dist/compiler/training/broker/paths.js +249 -0
- package/dist/compiler/training/broker/processes.d.ts +51 -0
- package/dist/compiler/training/broker/processes.js +102 -0
- package/dist/compiler/training/broker/projection.d.ts +52 -0
- package/dist/compiler/training/broker/projection.js +88 -0
- package/dist/compiler/training/broker/provisioning.d.ts +78 -0
- package/dist/compiler/training/broker/provisioning.js +231 -0
- package/dist/compiler/training/broker/receipt.d.ts +77 -0
- package/dist/compiler/training/broker/receipt.js +110 -0
- package/dist/compiler/training/broker/registration.d.ts +43 -0
- package/dist/compiler/training/broker/registration.js +110 -0
- package/dist/compiler/training/broker/reset.d.ts +9 -0
- package/dist/compiler/training/broker/reset.js +71 -0
- package/dist/compiler/training/broker/runtime.d.ts +22 -0
- package/dist/compiler/training/broker/runtime.js +127 -0
- package/dist/compiler/training/broker/seccompRoutes.d.ts +31 -0
- package/dist/compiler/training/broker/seccompRoutes.js +36 -0
- package/dist/compiler/training/broker/supervisor.d.ts +108 -0
- package/dist/compiler/training/broker/supervisor.js +172 -0
- package/dist/compiler/training/broker/taskClock.d.ts +5 -0
- package/dist/compiler/training/broker/taskClock.js +41 -0
- package/dist/compiler/training/compiledAgent.d.ts +21 -0
- package/dist/compiler/training/compiledAgent.js +62 -0
- package/dist/compiler/training/container/contract.d.ts +54 -0
- package/dist/compiler/training/container/contract.js +51 -0
- package/dist/compiler/training/container/evaluators.d.ts +48 -0
- package/dist/compiler/training/container/evaluators.js +50 -0
- package/dist/compiler/training/container/grokWriteback.d.ts +8 -0
- package/dist/compiler/training/container/grokWriteback.js +26 -0
- package/dist/compiler/training/container/index.d.ts +5 -0
- package/dist/compiler/training/container/index.js +3 -0
- package/dist/compiler/training/container/launch.d.ts +21 -0
- package/dist/compiler/training/container/launch.js +264 -0
- package/dist/compiler/training/container/nativeSlots.d.ts +14 -0
- package/dist/compiler/training/container/nativeSlots.js +13 -0
- package/dist/compiler/training/container/outputCopy.d.ts +2 -0
- package/dist/compiler/training/container/outputCopy.js +72 -0
- package/dist/compiler/training/container/outputVolume.d.ts +27 -0
- package/dist/compiler/training/container/outputVolume.js +161 -0
- package/dist/compiler/training/container/prepare.d.ts +10 -0
- package/dist/compiler/training/container/prepare.js +125 -0
- package/dist/compiler/training/container/process.d.ts +14 -0
- package/dist/compiler/training/container/process.js +70 -0
- package/dist/compiler/training/container/security.d.ts +38 -0
- package/dist/compiler/training/container/security.js +68 -0
- package/dist/compiler/training/container/subjectIsolation.d.ts +5 -0
- package/dist/compiler/training/container/subjectIsolation.js +15 -0
- package/dist/compiler/training/context.d.ts +15 -0
- package/dist/compiler/training/context.js +93 -0
- package/dist/compiler/training/contract.d.ts +144 -0
- package/dist/compiler/training/contract.js +36 -0
- package/dist/compiler/training/execution.d.ts +417 -0
- package/dist/compiler/training/execution.js +160 -0
- package/dist/compiler/training/index.d.ts +12 -0
- package/dist/compiler/training/index.js +10 -0
- package/dist/compiler/training/moments.d.ts +80 -0
- package/dist/compiler/training/moments.js +118 -0
- package/dist/compiler/training/output.d.ts +2 -0
- package/dist/compiler/training/output.js +20 -0
- package/dist/compiler/training/plan/contract.d.ts +287 -0
- package/dist/compiler/training/plan/contract.js +49 -0
- package/dist/compiler/training/plan/index.d.ts +5 -0
- package/dist/compiler/training/plan/index.js +4 -0
- package/dist/compiler/training/plan/load.d.ts +9 -0
- package/dist/compiler/training/plan/load.js +153 -0
- package/dist/compiler/training/plan/references.d.ts +19 -0
- package/dist/compiler/training/plan/references.js +57 -0
- package/dist/compiler/training/plan/resolve.d.ts +4 -0
- package/dist/compiler/training/plan/resolve.js +73 -0
- package/dist/compiler/training/plan/targets.d.ts +11 -0
- package/dist/compiler/training/plan/targets.js +71 -0
- package/dist/compiler/training/plan/types.d.ts +36 -0
- package/dist/compiler/training/plan/types.js +1 -0
- package/dist/compiler/training/preparation/assets/Dockerfile +109 -0
- package/dist/compiler/training/preparation/assets/package-lock.json +3787 -0
- package/dist/compiler/training/preparation/broker.d.ts +21 -0
- package/dist/compiler/training/preparation/broker.js +45 -0
- package/dist/compiler/training/preparation/contextModes.d.ts +12 -0
- package/dist/compiler/training/preparation/contextModes.js +38 -0
- package/dist/compiler/training/preparation/contract.d.ts +207 -0
- package/dist/compiler/training/preparation/contract.js +113 -0
- package/dist/compiler/training/preparation/copyAssets.d.ts +1 -0
- package/dist/compiler/training/preparation/copyAssets.js +8 -0
- package/dist/compiler/training/preparation/daimonParent.d.ts +42 -0
- package/dist/compiler/training/preparation/daimonParent.js +114 -0
- package/dist/compiler/training/preparation/files.d.ts +29 -0
- package/dist/compiler/training/preparation/files.js +146 -0
- package/dist/compiler/training/preparation/image.d.ts +28 -0
- package/dist/compiler/training/preparation/image.js +107 -0
- package/dist/compiler/training/preparation/index.d.ts +3 -0
- package/dist/compiler/training/preparation/index.js +2 -0
- package/dist/compiler/training/preparation/inputs.d.ts +24 -0
- package/dist/compiler/training/preparation/inputs.js +101 -0
- package/dist/compiler/training/preparation/prepare.d.ts +38 -0
- package/dist/compiler/training/preparation/prepare.js +223 -0
- package/dist/compiler/training/preparation/scratch.d.ts +8 -0
- package/dist/compiler/training/preparation/scratch.js +114 -0
- package/dist/compiler/training/repair/compatibility.d.ts +11 -0
- package/dist/compiler/training/repair/compatibility.js +34 -0
- package/dist/compiler/training/repair/contract.d.ts +840 -0
- package/dist/compiler/training/repair/contract.js +33 -0
- package/dist/compiler/training/repair/index.d.ts +3 -0
- package/dist/compiler/training/repair/index.js +3 -0
- package/dist/compiler/training/repair/prepare.d.ts +382 -0
- package/dist/compiler/training/repair/prepare.js +78 -0
- package/dist/compiler/training/repair/witness.d.ts +352 -0
- package/dist/compiler/training/repair/witness.js +48 -0
- package/dist/compiler/training/resolution.d.ts +25 -0
- package/dist/compiler/training/resolution.js +69 -0
- package/dist/compiler/training/rewind/contract.d.ts +321 -0
- package/dist/compiler/training/rewind/contract.js +39 -0
- package/dist/compiler/training/rewind/deployedResource.d.ts +22 -0
- package/dist/compiler/training/rewind/deployedResource.js +19 -0
- package/dist/compiler/training/rewind/feed.d.ts +12 -0
- package/dist/compiler/training/rewind/feed.js +182 -0
- package/dist/compiler/training/rewind/feedContent.d.ts +6 -0
- package/dist/compiler/training/rewind/feedContent.js +38 -0
- package/dist/compiler/training/rewind/git.d.ts +8 -0
- package/dist/compiler/training/rewind/git.js +159 -0
- package/dist/compiler/training/rewind/gitArchive.d.ts +2 -0
- package/dist/compiler/training/rewind/gitArchive.js +7 -0
- package/dist/compiler/training/rewind/gitHistory.d.ts +3 -0
- package/dist/compiler/training/rewind/gitHistory.js +55 -0
- package/dist/compiler/training/rewind/gitProcess.d.ts +19 -0
- package/dist/compiler/training/rewind/gitProcess.js +81 -0
- package/dist/compiler/training/rewind/gitTree.d.ts +14 -0
- package/dist/compiler/training/rewind/gitTree.js +90 -0
- package/dist/compiler/training/rewind/history.d.ts +28 -0
- package/dist/compiler/training/rewind/history.js +239 -0
- package/dist/compiler/training/rewind/index.d.ts +18 -0
- package/dist/compiler/training/rewind/index.js +15 -0
- package/dist/compiler/training/rewind/inputs.d.ts +9 -0
- package/dist/compiler/training/rewind/inputs.js +67 -0
- package/dist/compiler/training/rewind/instant.d.ts +4 -0
- package/dist/compiler/training/rewind/instant.js +24 -0
- package/dist/compiler/training/rewind/leakCheck.d.ts +10 -0
- package/dist/compiler/training/rewind/leakCheck.js +56 -0
- package/dist/compiler/training/rewind/leakFeed.d.ts +5 -0
- package/dist/compiler/training/rewind/leakFeed.js +25 -0
- package/dist/compiler/training/rewind/leakFiles.d.ts +10 -0
- package/dist/compiler/training/rewind/leakFiles.js +106 -0
- package/dist/compiler/training/rewind/leakGit.d.ts +3 -0
- package/dist/compiler/training/rewind/leakGit.js +78 -0
- package/dist/compiler/training/rewind/leakGitPayload.d.ts +4 -0
- package/dist/compiler/training/rewind/leakGitPayload.js +57 -0
- package/dist/compiler/training/rewind/leakInputs.d.ts +7 -0
- package/dist/compiler/training/rewind/leakInputs.js +135 -0
- package/dist/compiler/training/rewind/leakLayout.d.ts +2 -0
- package/dist/compiler/training/rewind/leakLayout.js +17 -0
- package/dist/compiler/training/rewind/leakProvenance.d.ts +3 -0
- package/dist/compiler/training/rewind/leakProvenance.js +88 -0
- package/dist/compiler/training/rewind/materialize.d.ts +136 -0
- package/dist/compiler/training/rewind/materialize.js +212 -0
- package/dist/compiler/training/rewind/memory.d.ts +10 -0
- package/dist/compiler/training/rewind/memory.js +84 -0
- package/dist/compiler/training/rewind/memorySchemas.d.ts +87 -0
- package/dist/compiler/training/rewind/memorySchemas.js +50 -0
- package/dist/compiler/training/rewind/moltnet.d.ts +2 -0
- package/dist/compiler/training/rewind/moltnet.js +54 -0
- package/dist/compiler/training/rewind/moltnetJson.d.ts +13 -0
- package/dist/compiler/training/rewind/moltnetJson.js +180 -0
- package/dist/compiler/training/rewind/moltnetSchemas.d.ts +1226 -0
- package/dist/compiler/training/rewind/moltnetSchemas.js +75 -0
- package/dist/compiler/training/rewind/moltnetSqlite.d.ts +31 -0
- package/dist/compiler/training/rewind/moltnetSqlite.js +192 -0
- package/dist/compiler/training/rewind/moltnetSqliteData.d.ts +10 -0
- package/dist/compiler/training/rewind/moltnetSqliteData.js +113 -0
- package/dist/compiler/training/rewind/recordInput.d.ts +40 -0
- package/dist/compiler/training/rewind/recordInput.js +49 -0
- package/dist/compiler/training/rewind/recordedBundle.d.ts +4 -0
- package/dist/compiler/training/rewind/recordedBundle.js +58 -0
- package/dist/compiler/training/rewind/recordedCommit.d.ts +2 -0
- package/dist/compiler/training/rewind/recordedCommit.js +10 -0
- package/dist/compiler/training/rewind/select.d.ts +18 -0
- package/dist/compiler/training/rewind/select.js +64 -0
- package/dist/compiler/training/rewind/snapshotManifest.d.ts +42 -0
- package/dist/compiler/training/rewind/snapshotManifest.js +134 -0
- package/dist/compiler/training/rewind/taskClock.d.ts +12 -0
- package/dist/compiler/training/rewind/taskClock.js +40 -0
- package/dist/compiler/training/rewind/timestamps.d.ts +4 -0
- package/dist/compiler/training/rewind/timestamps.js +26 -0
- package/dist/compiler/training/rewind/types.d.ts +43 -0
- package/dist/compiler/training/rewind/types.js +1 -0
- package/dist/compiler/training/rewind/volumes.d.ts +12 -0
- package/dist/compiler/training/rewind/volumes.js +58 -0
- package/dist/compiler/training/selection.d.ts +7 -0
- package/dist/compiler/training/selection.js +15 -0
- package/dist/compiler/types.d.ts +7 -2
- package/dist/compiler/upProject.d.ts +27 -1
- package/dist/compiler/upProject.js +135 -180
- package/dist/compiler/upProjectHandoff.d.ts +62 -0
- package/dist/compiler/upProjectHandoff.js +204 -0
- package/dist/compiler/upReceipt.js +49 -4
- package/dist/compiler/updateProjectModels.js +1 -0
- package/dist/compiler/view/types.d.ts +1 -1
- package/dist/compiler/workspaceBundleArtifacts.d.ts +18 -0
- package/dist/compiler/workspaceBundleArtifacts.js +155 -0
- package/dist/compiler/workspaceBundleCache.d.ts +23 -0
- package/dist/compiler/workspaceBundleCache.js +79 -0
- package/dist/compiler/workspaceBundleDependencies.d.ts +21 -0
- package/dist/compiler/workspaceBundleDependencies.js +122 -0
- package/dist/compiler/workspaceBundleFiles.d.ts +51 -0
- package/dist/compiler/workspaceBundleFiles.js +251 -0
- package/dist/compiler/workspaceBundleGenerated.d.ts +25 -0
- package/dist/compiler/workspaceBundleGenerated.js +103 -0
- package/dist/compiler/workspaceBundleGit.d.ts +64 -0
- package/dist/compiler/workspaceBundleGit.js +154 -0
- package/dist/compiler/workspaceBundleKey.d.ts +34 -0
- package/dist/compiler/workspaceBundleKey.js +17 -0
- package/dist/compiler/workspaceBundleResolve.d.ts +56 -0
- package/dist/compiler/workspaceBundleResolve.js +144 -0
- package/dist/compiler/workspaceBundleRun.d.ts +41 -0
- package/dist/compiler/workspaceBundleRun.js +79 -0
- package/dist/compiler/workspaceBundleTar.d.ts +47 -0
- package/dist/compiler/workspaceBundleTar.js +140 -0
- package/dist/compiler/workspaceBundleTree.d.ts +15 -0
- package/dist/compiler/workspaceBundleTree.js +58 -0
- package/dist/compiler/workspaceGitFetch.d.ts +41 -0
- package/dist/compiler/workspaceGitFetch.js +155 -0
- package/dist/compiler/workspaceGitPins.d.ts +33 -0
- package/dist/compiler/workspaceGitPins.js +127 -0
- package/dist/compiler/workspaceResources.d.ts +9 -2
- package/dist/compiler/workspaceResources.js +39 -7
- package/dist/deployment/activation.d.ts +3 -0
- package/dist/deployment/activation.js +12 -0
- package/dist/deployment/artifactsExportPlan.js +51 -1
- package/dist/deployment/canaryCutover.d.ts +42 -0
- package/dist/deployment/canaryCutover.js +140 -0
- package/dist/deployment/candidateDiagnostics.d.ts +15 -0
- package/dist/deployment/candidateDiagnostics.js +90 -0
- package/dist/deployment/candidateRecording.d.ts +8 -0
- package/dist/deployment/candidateRecording.js +22 -0
- package/dist/deployment/dockerLogs.js +4 -1
- package/dist/deployment/dockerManager.d.ts +5 -3
- package/dist/deployment/dockerManager.js +21 -5
- package/dist/deployment/dockerProbeGateway.d.ts +17 -0
- package/dist/deployment/dockerProbeGateway.js +17 -2
- package/dist/deployment/downDeployment.d.ts +7 -0
- package/dist/deployment/downDeployment.js +114 -9
- package/dist/deployment/downReceiptTypes.d.ts +17 -2
- package/dist/deployment/downReceiptTypes.js +17 -2
- package/dist/deployment/homeStore.d.ts +9 -1
- package/dist/deployment/homeStore.js +16 -53
- package/dist/deployment/index.d.ts +10 -0
- package/dist/deployment/index.js +10 -0
- package/dist/deployment/lifecycleCompletionContracts.d.ts +66 -0
- package/dist/deployment/lifecycleCompletionContracts.js +34 -0
- package/dist/deployment/lifecycleCompletionPaths.d.ts +4 -1
- package/dist/deployment/lifecycleCompletionPaths.js +3 -0
- package/dist/deployment/lifecycleCompletionPublication.d.ts +2 -0
- package/dist/deployment/lifecycleCompletionPublication.js +18 -4
- package/dist/deployment/lifecycleCompletionStore.d.ts +1 -1
- package/dist/deployment/lifecycleCompletionStore.js +7 -7
- package/dist/deployment/lifecycleUpRecords.d.ts +11 -0
- package/dist/deployment/lifecycleUpRecords.js +127 -0
- package/dist/deployment/native/AGENTS.md +11 -0
- package/dist/deployment/native/rename-noreplace-arm64 +0 -0
- package/dist/deployment/native/rename-noreplace-arm64.provenance.json +1 -0
- package/dist/deployment/native/rename-noreplace-x64 +0 -0
- package/dist/deployment/native/rename-noreplace-x64.provenance.json +1 -0
- package/dist/deployment/noReplaceActivation.d.ts +17 -0
- package/dist/deployment/noReplaceActivation.js +50 -0
- package/dist/deployment/organizationHandoffAuthorityFsBudget.d.ts +110 -0
- package/dist/deployment/organizationHandoffAuthorityFsBudget.js +156 -0
- package/dist/deployment/organizationHandoffAuthorityFsClient.js +82 -27
- package/dist/deployment/organizationHandoffAuthorityFsElection.d.ts +21 -0
- package/dist/deployment/organizationHandoffAuthorityFsElection.js +57 -0
- package/dist/deployment/organizationHandoffAuthorityFsWorker.js +254 -108
- package/dist/deployment/organizationHandoffAuthorityFsWorkerStall.fixture.d.ts +1 -0
- package/dist/deployment/organizationHandoffAuthorityFsWorkerStall.fixture.js +16 -0
- package/dist/deployment/organizationHandoffAuthorityStore.js +14 -7
- package/dist/deployment/organizationHandoffAuthorityTypes.d.ts +2 -2
- package/dist/deployment/organizationHandoffAuthorityTypes.js +2 -1
- package/dist/deployment/organizationReady.d.ts +2 -0
- package/dist/deployment/organizationReady.js +36 -4
- package/dist/deployment/pidLock.d.ts +25 -0
- package/dist/deployment/pidLock.js +81 -0
- package/dist/deployment/productStateClone.d.ts +43 -0
- package/dist/deployment/productStateClone.js +319 -0
- package/dist/deployment/record.d.ts +85 -1
- package/dist/deployment/record.js +11 -5
- package/dist/deployment/recordPublication.d.ts +15 -0
- package/dist/deployment/recordPublication.js +76 -0
- package/dist/deployment/recordedMemoryRetention.d.ts +18 -0
- package/dist/deployment/recordedMemoryRetention.js +27 -0
- package/dist/deployment/resourceLog.d.ts +140 -0
- package/dist/deployment/resourceLog.js +78 -0
- package/dist/deployment/upLifecycleRecoveryState.d.ts +23 -0
- package/dist/deployment/upLifecycleRecoveryState.js +12 -0
- package/dist/deployment/upReceiptTypes.d.ts +32 -6
- package/dist/deployment/upReceiptTypes.js +29 -2
- package/dist/deployment/workspaceResourceMigration.d.ts +55 -0
- package/dist/deployment/workspaceResourceMigration.js +315 -0
- package/dist/dev/project.d.ts +7 -0
- package/dist/dev/project.js +9 -0
- package/dist/distribution/buildDistributionReport.d.ts +3 -0
- package/dist/distribution/buildDistributionReport.js +5 -0
- package/dist/distribution/consumeImage.d.ts +5 -0
- package/dist/distribution/consumeImage.js +115 -98
- package/dist/distribution/consumeImageDaimonDocker.d.ts +3 -0
- package/dist/distribution/consumeImageDaimonDocker.js +45 -0
- package/dist/distribution/consumeImageLifecycle.d.ts +20 -0
- package/dist/distribution/consumeImageLifecycle.js +242 -0
- package/dist/distribution/consumeImageSupport.d.ts +19 -0
- package/dist/distribution/consumeImageSupport.js +40 -0
- package/dist/distribution/distributionReportSchema.d.ts +58 -1
- package/dist/distribution/distributionReportSchema.js +35 -2
- package/dist/distribution/dockerRunner.d.ts +6 -1
- package/dist/distribution/dockerRunner.js +31 -4
- package/dist/distribution/imageRuntimeAuth.d.ts +9 -1
- package/dist/distribution/imageRuntimeAuth.js +70 -1
- package/dist/distribution/index.d.ts +1 -1
- package/dist/distribution/index.js +1 -1
- package/dist/distribution/preflight.js +5 -1
- package/dist/distribution/renderImageInterface.js +1 -1
- package/dist/distribution/types.d.ts +29 -1
- package/dist/distribution/types.js +3 -0
- package/dist/evidenceExportHelper/boundedExecutor.d.ts +3 -0
- package/dist/evidenceExportHelper/boundedExecutor.js +33 -0
- package/dist/evidenceExportHelper/helperProgram.mjs +156 -0
- package/dist/evidenceExportHelper/index.d.ts +4 -0
- package/dist/evidenceExportHelper/index.js +4 -0
- package/dist/evidenceExportHelper/preparedAuthority.d.ts +64 -0
- package/dist/evidenceExportHelper/preparedAuthority.js +228 -0
- package/dist/evidenceExportHelper/preparedBuilder.d.ts +10 -0
- package/dist/evidenceExportHelper/preparedBuilder.js +183 -0
- package/dist/evidenceExportHelper/preparedBuilderTypes.d.ts +19 -0
- package/dist/evidenceExportHelper/preparedBuilderTypes.js +1 -0
- package/dist/evidenceExportHelper/recipe.d.ts +7 -0
- package/dist/evidenceExportHelper/recipe.js +83 -0
- package/dist/filesystem/durableWrite.d.ts +10 -0
- package/dist/filesystem/durableWrite.js +87 -0
- package/dist/filesystem/index.d.ts +2 -0
- package/dist/filesystem/index.js +2 -0
- package/dist/filesystem/io.d.ts +2 -0
- package/dist/filesystem/io.js +16 -1
- package/dist/filesystem/retainedJsonl.d.ts +23 -0
- package/dist/filesystem/retainedJsonl.js +123 -0
- package/dist/manifest/commandSchemas.d.ts +5 -0
- package/dist/manifest/commandSchemas.js +5 -0
- package/dist/manifest/executionSchemas.d.ts +47 -0
- package/dist/manifest/executionSchemas.js +31 -2
- package/dist/manifest/index.d.ts +2 -0
- package/dist/manifest/index.js +2 -0
- package/dist/manifest/loadManifest.js +3 -26
- package/dist/manifest/mcpSchemas.d.ts +62 -0
- package/dist/manifest/mcpSchemas.js +57 -8
- package/dist/manifest/memorySchemas.d.ts +1 -1
- package/dist/manifest/memorySchemas.js +1 -1
- package/dist/manifest/parseManifest.d.ts +7 -0
- package/dist/manifest/parseManifest.js +65 -0
- package/dist/manifest/renderSpawnfile.js +4 -1
- package/dist/manifest/renderSpawnfileNetworks.js +11 -0
- package/dist/manifest/renderSpawnfileWorkspace.js +10 -1
- package/dist/manifest/scheduleSchemas.d.ts +3 -1
- package/dist/manifest/scheduleSchemas.js +91 -5
- package/dist/manifest/schemas.d.ts +1419 -120
- package/dist/manifest/schemas.js +19 -6
- package/dist/manifest/teamNetworkAccessSchemas.d.ts +5 -1
- package/dist/manifest/teamNetworkAccessSchemas.js +11 -0
- package/dist/manifest/teamNetworkAuthSchemas.d.ts +1 -1
- package/dist/manifest/teamNetworkSchemas.d.ts +18 -4
- package/dist/manifest/teamNetworkSchemas.js +19 -1
- package/dist/manifest/teamNetworkServerSchemas.d.ts +8 -3
- package/dist/manifest/teamNetworkServerSchemas.js +18 -2
- package/dist/manifest/trainingDataSchemas.d.ts +357 -0
- package/dist/manifest/trainingDataSchemas.js +31 -0
- package/dist/manifest/trainingSchemas.d.ts +49 -0
- package/dist/manifest/trainingSchemas.js +44 -0
- package/dist/manifest/volumeFeedSchemas.d.ts +52 -0
- package/dist/manifest/volumeFeedSchemas.js +104 -0
- package/dist/manifest/workspaceSchemas.d.ts +194 -1
- package/dist/manifest/workspaceSchemas.js +117 -2
- package/dist/recording/compose.d.ts +3 -0
- package/dist/recording/compose.js +93 -0
- package/dist/recording/deployment.d.ts +15 -0
- package/dist/recording/deployment.js +38 -0
- package/dist/recording/history.d.ts +16 -0
- package/dist/recording/history.js +47 -0
- package/dist/recording/index.d.ts +9 -0
- package/dist/recording/index.js +9 -0
- package/dist/recording/moment.d.ts +61 -0
- package/dist/recording/moment.js +36 -0
- package/dist/recording/parse.d.ts +15 -0
- package/dist/recording/parse.js +74 -0
- package/dist/recording/read.d.ts +8 -0
- package/dist/recording/read.js +61 -0
- package/dist/recording/store.d.ts +10 -0
- package/dist/recording/store.js +94 -0
- package/dist/recording/sync.d.ts +24 -0
- package/dist/recording/sync.js +126 -0
- package/dist/recording/types.d.ts +45 -0
- package/dist/recording/types.js +2 -0
- package/dist/release/drainControl.d.ts +54 -0
- package/dist/release/drainControl.js +137 -0
- package/dist/release/drainPhase.d.ts +37 -0
- package/dist/release/drainPhase.js +161 -0
- package/dist/release/index.d.ts +11 -0
- package/dist/release/index.js +11 -0
- package/dist/release/ledger.d.ts +75 -0
- package/dist/release/ledger.js +111 -0
- package/dist/release/notify.d.ts +58 -0
- package/dist/release/notify.js +126 -0
- package/dist/release/pending.d.ts +35 -0
- package/dist/release/pending.js +60 -0
- package/dist/release/postDeploy.d.ts +32 -0
- package/dist/release/postDeploy.js +62 -0
- package/dist/release/releaseDefaults.d.ts +9 -0
- package/dist/release/releaseDefaults.js +115 -0
- package/dist/release/releaseDocker.d.ts +38 -0
- package/dist/release/releaseDocker.js +94 -0
- package/dist/release/releaseTypes.d.ts +94 -0
- package/dist/release/releaseTypes.js +1 -0
- package/dist/release/runRelease.d.ts +9 -0
- package/dist/release/runRelease.js +218 -0
- package/dist/release/swap.d.ts +23 -0
- package/dist/release/swap.js +55 -0
- package/dist/release/types.d.ts +50 -0
- package/dist/release/types.js +29 -0
- package/dist/report/index.d.ts +1 -0
- package/dist/report/index.js +1 -0
- package/dist/report/recording.d.ts +57 -0
- package/dist/report/recording.js +26 -0
- package/dist/report/types.d.ts +92 -4
- package/dist/runtime/common.d.ts +28 -1
- package/dist/runtime/common.js +33 -3
- package/dist/runtime/container.js +46 -35
- package/dist/runtime/daimon/adapter.d.ts +14 -0
- package/dist/runtime/daimon/adapter.js +254 -0
- package/dist/runtime/daimon/attention.d.ts +8 -0
- package/dist/runtime/daimon/attention.js +32 -0
- package/dist/runtime/daimon/config.d.ts +29 -0
- package/dist/runtime/daimon/config.js +321 -0
- package/dist/runtime/daimon/contract-manifest.json +1 -0
- package/dist/runtime/daimon/contract-manifest.sha256 +1 -0
- package/dist/runtime/daimon/contractManifest.d.ts +346 -0
- package/dist/runtime/daimon/contractManifest.js +335 -0
- package/dist/runtime/daimon/grokModel.d.ts +19 -0
- package/dist/runtime/daimon/grokModel.js +33 -0
- package/dist/runtime/daimon/grokTurnLimits.d.ts +25 -0
- package/dist/runtime/daimon/grokTurnLimits.js +51 -0
- package/dist/runtime/daimon/grokWorkerConfigBytes.d.ts +43 -0
- package/dist/runtime/daimon/grokWorkerConfigBytes.js +53 -0
- package/dist/runtime/daimon/grokWorkerContract.d.ts +27 -0
- package/dist/runtime/daimon/grokWorkerContract.js +60 -0
- package/dist/runtime/daimon/memory.d.ts +57 -0
- package/dist/runtime/daimon/memory.js +125 -0
- package/dist/runtime/daimon/recording.d.ts +19 -0
- package/dist/runtime/daimon/recording.js +50 -0
- package/dist/runtime/daimon/runAuth.d.ts +51 -0
- package/dist/runtime/daimon/runAuth.js +279 -0
- package/dist/runtime/daimon/runtimeIdentity.d.ts +22 -0
- package/dist/runtime/daimon/runtimeIdentity.js +22 -0
- package/dist/runtime/daimon/scheduleAuthority.d.ts +11 -0
- package/dist/runtime/daimon/scheduleAuthority.js +31 -0
- package/dist/runtime/daimon/wakeMoments.d.ts +15 -0
- package/dist/runtime/daimon/wakeMoments.js +17 -0
- package/dist/runtime/daimonInstall.d.ts +3 -0
- package/dist/runtime/daimonInstall.js +25 -0
- package/dist/runtime/index.d.ts +5 -0
- package/dist/runtime/index.js +5 -0
- package/dist/runtime/install.d.ts +5 -0
- package/dist/runtime/install.js +4 -0
- package/dist/runtime/localDaimonAuthority.d.ts +11 -0
- package/dist/runtime/localDaimonAuthority.js +77 -0
- package/dist/runtime/mnemeMcp.d.ts +13 -0
- package/dist/runtime/mnemeMcp.js +26 -0
- package/dist/runtime/openclaw/adapter.js +5 -2
- package/dist/runtime/pi/adapter.d.ts +0 -1
- package/dist/runtime/pi/adapter.js +5 -6
- package/dist/runtime/pi/appCliSource.js +1 -1
- package/dist/runtime/pi/appScheduleSource.js +6 -2
- package/dist/runtime/pi/appTemplateTypes.d.ts +1 -1
- package/dist/runtime/pi/containerTargets.js +6 -0
- package/dist/runtime/picoclaw/adapter.js +5 -2
- package/dist/runtime/registry.d.ts +6 -0
- package/dist/runtime/registry.js +32 -3
- package/dist/runtime/scheduleUtils.d.ts +1 -0
- package/dist/runtime/scheduleUtils.js +5 -1
- package/dist/runtime/types.d.ts +40 -0
- package/dist/runtime/usageLedger.d.ts +158 -0
- package/dist/runtime/usageLedger.js +269 -0
- package/dist/runtime/usageLedgerRead.d.ts +54 -0
- package/dist/runtime/usageLedgerRead.js +102 -0
- package/dist/runtime/usageRequestLedger.d.ts +42 -0
- package/dist/runtime/usageRequestLedger.js +72 -0
- package/dist/shared/daimonCodexDocker.d.ts +32 -0
- package/dist/shared/daimonCodexDocker.js +120 -0
- package/dist/shared/daimonGrokSeccompProfile.d.ts +10 -0
- package/dist/shared/daimonGrokSeccompProfile.js +11 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.js +3 -0
- package/dist/shared/recording.d.ts +8 -0
- package/dist/shared/recording.js +25 -0
- package/dist/shared/types.d.ts +1 -1
- package/dist/shared/volumeNames.d.ts +6 -0
- package/dist/shared/volumeNames.js +14 -0
- package/dist/target/dockerArtifactsProvider.js +34 -7
- package/dist/target/dockerBaseImage.d.ts +2 -0
- package/dist/target/dockerBaseImage.js +11 -0
- package/dist/target/dockerCommandExecutor.d.ts +11 -0
- package/dist/target/dockerCommandExecutor.js +53 -2
- package/dist/target/dockerCommandExecutorCore.d.ts +2 -1
- package/dist/target/dockerCommandExecutorCore.js +5 -3
- package/dist/target/dockerPublicArtifactSnapshot.d.ts +3 -3
- package/dist/target/dockerPublicArtifactSnapshot.js +17 -33
- package/dist/target/dockerTarget.d.ts +1 -0
- package/dist/target/dockerTargetBinding.d.ts +1 -2
- package/dist/target/dockerTargetBinding.js +4 -4
- package/dist/target/dockerTargetExecFile.d.ts +19 -0
- package/dist/target/dockerTargetExecFile.js +194 -0
- package/dist/target/dockerWorldServiceProvider.d.ts +4 -0
- package/dist/target/dockerWorldServiceProvider.js +13 -1
- package/dist/target/evidenceExport.d.ts +3 -1
- package/dist/target/evidenceExport.js +12 -3
- package/dist/target/evidenceExportOperationsTestKit.js +3 -3
- package/dist/target/evidenceExportProvider.d.ts +2 -0
- package/dist/target/evidenceExportProvider.js +15 -5
- package/dist/target/publicArtifactSnapshot.d.ts +31 -0
- package/dist/target/publicArtifactSnapshot.js +37 -3
- package/dist/volume/feedLand.d.ts +31 -0
- package/dist/volume/feedLand.js +174 -0
- package/dist/volume/feedLandings.d.ts +45 -0
- package/dist/volume/feedLandings.js +111 -0
- package/dist/volume/feedLayout.d.ts +61 -0
- package/dist/volume/feedLayout.js +234 -0
- package/dist/volume/feedLock.d.ts +7 -0
- package/dist/volume/feedLock.js +131 -0
- package/dist/volume/feedManifest.d.ts +27 -0
- package/dist/volume/feedManifest.js +123 -0
- package/dist/volume/feedPrepare.d.ts +16 -0
- package/dist/volume/feedPrepare.js +228 -0
- package/dist/volume/feedProject.d.ts +39 -0
- package/dist/volume/feedProject.js +92 -0
- package/dist/volume/feedRecord.d.ts +55 -0
- package/dist/volume/feedRecord.js +148 -0
- package/dist/volume/feedRef.d.ts +43 -0
- package/dist/volume/feedRef.js +117 -0
- package/dist/volume/feedRefresh.d.ts +15 -0
- package/dist/volume/feedRefresh.js +187 -0
- package/dist/volume/feedSource.d.ts +66 -0
- package/dist/volume/feedSource.js +104 -0
- package/dist/volume/feedTarget.d.ts +70 -0
- package/dist/volume/feedTarget.js +9 -0
- package/dist/volume/feedTestKit.d.ts +11 -0
- package/dist/volume/feedTestKit.js +45 -0
- package/dist/volume/feedVerify.d.ts +18 -0
- package/dist/volume/feedVerify.js +104 -0
- package/dist/volume/index.d.ts +13 -0
- package/dist/volume/index.js +13 -0
- package/examples/README.md +45 -0
- package/examples/agent-with-subagents/AGENTS.md +3 -0
- package/examples/agent-with-subagents/Spawnfile +30 -0
- package/examples/agent-with-subagents/subagents/critic/AGENTS.md +3 -0
- package/examples/agent-with-subagents/subagents/critic/Spawnfile +15 -0
- package/examples/agent-with-subagents/subagents/researcher/AGENTS.md +3 -0
- package/examples/agent-with-subagents/subagents/researcher/Spawnfile +17 -0
- package/examples/daimon-org/Spawnfile +68 -0
- package/examples/daimon-org/TEAM.md +4 -0
- package/examples/daimon-org/agents/mapper/AGENTS.md +4 -0
- package/examples/daimon-org/agents/mapper/Spawnfile +37 -0
- package/examples/daimon-org/shared/skills/file-note/SKILL.md +9 -0
- package/examples/daimon-org/teams/review/Spawnfile +53 -0
- package/examples/daimon-org/teams/review/agents/reviewer/AGENTS.md +4 -0
- package/examples/daimon-org/teams/review/agents/reviewer/Spawnfile +37 -0
- package/examples/daimon-public-host/AGENTS.md +3 -0
- package/examples/daimon-public-host/Spawnfile +21 -0
- package/examples/distribution-org/Spawnfile +43 -0
- package/examples/distribution-org/TEAM.md +4 -0
- package/examples/distribution-org/agents/coordinator/AGENTS.md +1 -0
- package/examples/distribution-org/agents/coordinator/Spawnfile +20 -0
- package/examples/distribution-org/agents/researcher/AGENTS.md +1 -0
- package/examples/distribution-org/agents/researcher/Spawnfile +20 -0
- package/examples/jungian-daimon-org/Spawnfile +41 -0
- package/examples/jungian-daimon-org/TEAM.md +21 -0
- package/examples/jungian-daimon-org/teams/luna/Spawnfile +47 -0
- package/examples/jungian-daimon-org/teams/luna/TEAM.md +4 -0
- package/examples/jungian-daimon-org/teams/luna/agents/animus/AGENTS.md +10 -0
- package/examples/jungian-daimon-org/teams/luna/agents/animus/Spawnfile +33 -0
- package/examples/jungian-daimon-org/teams/luna/agents/representative/AGENTS.md +21 -0
- package/examples/jungian-daimon-org/teams/luna/agents/representative/Spawnfile +30 -0
- package/examples/jungian-daimon-org/teams/luna/agents/shadow/AGENTS.md +10 -0
- package/examples/jungian-daimon-org/teams/luna/agents/shadow/Spawnfile +33 -0
- package/examples/jungian-daimon-org/teams/selene/Spawnfile +47 -0
- package/examples/jungian-daimon-org/teams/selene/TEAM.md +4 -0
- package/examples/jungian-daimon-org/teams/selene/agents/animus/AGENTS.md +10 -0
- package/examples/jungian-daimon-org/teams/selene/agents/animus/Spawnfile +33 -0
- package/examples/jungian-daimon-org/teams/selene/agents/representative/AGENTS.md +19 -0
- package/examples/jungian-daimon-org/teams/selene/agents/representative/Spawnfile +33 -0
- package/examples/jungian-daimon-org/teams/selene/agents/shadow/AGENTS.md +10 -0
- package/examples/jungian-daimon-org/teams/selene/agents/shadow/Spawnfile +30 -0
- package/examples/mixed-runtime-org/Spawnfile +71 -0
- package/examples/mixed-runtime-org/TEAM.md +8 -0
- package/examples/mixed-runtime-org/agents/analyst/AGENTS.md +8 -0
- package/examples/mixed-runtime-org/agents/analyst/Spawnfile +27 -0
- package/examples/mixed-runtime-org/agents/conductor/AGENTS.md +8 -0
- package/examples/mixed-runtime-org/agents/conductor/Spawnfile +27 -0
- package/examples/mixed-runtime-org/agents/localist/AGENTS.md +7 -0
- package/examples/mixed-runtime-org/agents/localist/Spawnfile +50 -0
- package/examples/moltnet-team-chat/Spawnfile +43 -0
- package/examples/moltnet-team-chat/TEAM.md +5 -0
- package/examples/moltnet-team-chat/agents/coordinator/AGENTS.md +9 -0
- package/examples/moltnet-team-chat/agents/coordinator/Spawnfile +26 -0
- package/examples/moltnet-team-chat/teams/analysis/Spawnfile +23 -0
- package/examples/moltnet-team-chat/teams/analysis/TEAM.md +3 -0
- package/examples/moltnet-team-chat/teams/analysis/agents/observer/AGENTS.md +5 -0
- package/examples/moltnet-team-chat/teams/analysis/agents/observer/Spawnfile +19 -0
- package/examples/moltnet-team-chat/teams/analysis/agents/representative/AGENTS.md +5 -0
- package/examples/moltnet-team-chat/teams/analysis/agents/representative/Spawnfile +19 -0
- package/examples/moltnet-team-chat/teams/field/Spawnfile +41 -0
- package/examples/moltnet-team-chat/teams/field/TEAM.md +3 -0
- package/examples/moltnet-team-chat/teams/field/agents/observer/AGENTS.md +5 -0
- package/examples/moltnet-team-chat/teams/field/agents/observer/Spawnfile +26 -0
- package/examples/moltnet-team-chat/teams/field/agents/representative/AGENTS.md +11 -0
- package/examples/moltnet-team-chat/teams/field/agents/representative/Spawnfile +26 -0
- package/examples/single-agent/AGENTS.md +3 -0
- package/examples/single-agent/HEARTBEAT.md +3 -0
- package/examples/single-agent/IDENTITY.md +3 -0
- package/examples/single-agent/MEMORY.md +3 -0
- package/examples/single-agent/SOUL.md +3 -0
- package/examples/single-agent/Spawnfile +41 -0
- package/examples/single-agent/skills/web_search/SKILL.md +6 -0
- package/moltnet-releases.json +5 -4
- package/package.json +36 -9
- package/runtimes.yaml +8 -3
- package/dist/cli/targetWorldClockCrossProcess.test-helper.d.ts +0 -13
- package/dist/cli/targetWorldClockCrossProcess.test-helper.js +0 -109
- package/dist/deployment/providerRuntimeBoundaryScanner.test-helper.d.ts +0 -8
- package/dist/deployment/providerRuntimeBoundaryScanner.test-helper.js +0 -60
- package/dist/deployment/simfileFixtureBoundary.test-helper.d.ts +0 -8
- package/dist/deployment/simfileFixtureBoundary.test-helper.js +0 -103
- package/dist/ownership/simfileRunOperatorInputs.d.ts +0 -103
- package/dist/ownership/simfileRunOperatorInputs.js +0 -139
- package/dist/target/cleanupRunDocker.test-helper.d.ts +0 -67
- package/dist/target/cleanupRunDocker.test-helper.js +0 -238
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
3
|
+
import os from "node:os";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
import { trainingContextSchema } from "../compiler/training/index.js";
|
|
8
|
+
import { launchTrainingContainer } from "../compiler/training/container/index.js";
|
|
9
|
+
import { runTrainingDocker } from "../compiler/training/container/process.js";
|
|
10
|
+
import { prepareTraining } from "../compiler/training/preparation/index.js";
|
|
11
|
+
import { readBoundedJson } from "../compiler/training/preparation/inputs.js";
|
|
12
|
+
import { SpawnfileError } from "../shared/index.js";
|
|
13
|
+
const MAX_LINE_BYTES = 1024 * 1024;
|
|
14
|
+
const validReceipt = (line, dryRun) => {
|
|
15
|
+
try {
|
|
16
|
+
const value = JSON.parse(line);
|
|
17
|
+
if (typeof value !== "object" || value === null)
|
|
18
|
+
return false;
|
|
19
|
+
const receipt = value;
|
|
20
|
+
return dryRun
|
|
21
|
+
? receipt.schema === "paideia.training-cost-plan.v1" && receipt.modelCallsMade === 0
|
|
22
|
+
: receipt.status === "completed" && typeof receipt.index === "string" && receipt.index.length > 0;
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const failure = (message) => new SpawnfileError("runtime_error", message);
|
|
29
|
+
const runChild = (options, contextPath) => new Promise((resolve, reject) => {
|
|
30
|
+
if (options.signal?.aborted) {
|
|
31
|
+
resolve(130);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
// Node strips types in a source checkout; the packaged build selects its emitted JS.
|
|
35
|
+
const extension = path.extname(fileURLToPath(import.meta.url));
|
|
36
|
+
const supervisor = fileURLToPath(new URL(`./paideiaSupervisor${extension}`, import.meta.url));
|
|
37
|
+
const child = spawn(process.execPath, ["--experimental-strip-types", supervisor, options.command,
|
|
38
|
+
"train", "--spawnfile-context", contextPath, ...options.args], {
|
|
39
|
+
shell: false, detached: true, stdio: ["ignore", "pipe", "pipe", "ipc"]
|
|
40
|
+
});
|
|
41
|
+
const pid = child.pid;
|
|
42
|
+
let stdout = "", stderr = "", lastLine = "";
|
|
43
|
+
let stopCode, error, outcome;
|
|
44
|
+
let reaped = false, closed = false, finished = false;
|
|
45
|
+
let killTimer;
|
|
46
|
+
const kill = (signal) => {
|
|
47
|
+
if (pid === undefined || reaped)
|
|
48
|
+
return;
|
|
49
|
+
try {
|
|
50
|
+
process.kill(-pid, signal);
|
|
51
|
+
}
|
|
52
|
+
catch (caught) {
|
|
53
|
+
if (caught.code !== "ESRCH")
|
|
54
|
+
error = failure("Could not signal the owned Paideia process group");
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const groupExists = () => {
|
|
58
|
+
if (pid === undefined)
|
|
59
|
+
return false;
|
|
60
|
+
try {
|
|
61
|
+
process.kill(-pid, 0);
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
catch (caught) {
|
|
65
|
+
return caught.code !== "ESRCH";
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const stop = (code, cause) => {
|
|
69
|
+
if (stopCode !== undefined)
|
|
70
|
+
return;
|
|
71
|
+
stopCode = code;
|
|
72
|
+
error = cause;
|
|
73
|
+
kill("SIGTERM");
|
|
74
|
+
killTimer = setTimeout(() => kill("SIGKILL"), 1000);
|
|
75
|
+
killTimer.unref();
|
|
76
|
+
};
|
|
77
|
+
const interrupt = () => stop(130), terminate = () => stop(143), abort = () => stop(130);
|
|
78
|
+
const timer = setTimeout(() => stop(1, failure("Paideia training exceeded its command deadline")), options.timeoutMs);
|
|
79
|
+
timer.unref();
|
|
80
|
+
process.once("SIGINT", interrupt);
|
|
81
|
+
process.once("SIGTERM", terminate);
|
|
82
|
+
options.signal?.addEventListener("abort", abort, { once: true });
|
|
83
|
+
if (options.signal?.aborted)
|
|
84
|
+
abort();
|
|
85
|
+
const consume = (chunk, channel) => {
|
|
86
|
+
const lines = ((channel === "stdout" ? stdout : stderr) + chunk).split("\n");
|
|
87
|
+
const remainder = lines.pop();
|
|
88
|
+
if ([remainder, ...lines].some((line) => Buffer.byteLength(line, "utf8") > MAX_LINE_BYTES)) {
|
|
89
|
+
stop(1, failure("Paideia output exceeded the bounded JSON-line contract"));
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
for (const raw of lines) {
|
|
93
|
+
const line = raw.replace(/\r$/u, "");
|
|
94
|
+
if (!line.trim())
|
|
95
|
+
continue;
|
|
96
|
+
if (channel === "stdout")
|
|
97
|
+
lastLine = line;
|
|
98
|
+
options.streams[channel](line);
|
|
99
|
+
}
|
|
100
|
+
if (channel === "stdout")
|
|
101
|
+
stdout = remainder;
|
|
102
|
+
else
|
|
103
|
+
stderr = remainder;
|
|
104
|
+
};
|
|
105
|
+
child.stdout.setEncoding("utf8").on("data", (chunk) => consume(chunk, "stdout"));
|
|
106
|
+
child.stderr.setEncoding("utf8").on("data", (chunk) => consume(chunk, "stderr"));
|
|
107
|
+
child.once("message", (message) => {
|
|
108
|
+
outcome = message;
|
|
109
|
+
if (message.type === "paideia.process.launch-error")
|
|
110
|
+
error = failure(`Could not start Paideia: ${message.message}`);
|
|
111
|
+
// The native child exited, but our supervisor still holds the group identity.
|
|
112
|
+
// Stop stragglers before permitting its leader to disappear or reporting completion.
|
|
113
|
+
kill("SIGKILL");
|
|
114
|
+
});
|
|
115
|
+
const finish = async () => {
|
|
116
|
+
if (finished)
|
|
117
|
+
return;
|
|
118
|
+
finished = true;
|
|
119
|
+
clearTimeout(timer);
|
|
120
|
+
clearTimeout(killTimer);
|
|
121
|
+
process.removeListener("SIGINT", interrupt);
|
|
122
|
+
process.removeListener("SIGTERM", terminate);
|
|
123
|
+
options.signal?.removeEventListener("abort", abort);
|
|
124
|
+
const deadline = Date.now() + 1500;
|
|
125
|
+
// Check only: never signal a numeric group identity after its supervisor was reaped.
|
|
126
|
+
while ((groupExists() || !closed) && Date.now() < deadline)
|
|
127
|
+
await delay(20);
|
|
128
|
+
if (groupExists() || !closed) {
|
|
129
|
+
error = failure("Paideia process cleanup is incomplete; group or output quiescence is unknown");
|
|
130
|
+
child.stdout.destroy();
|
|
131
|
+
child.stderr.destroy();
|
|
132
|
+
}
|
|
133
|
+
if (stdout.trim()) {
|
|
134
|
+
lastLine = stdout;
|
|
135
|
+
options.streams.stdout(stdout);
|
|
136
|
+
}
|
|
137
|
+
if (stderr.trim())
|
|
138
|
+
options.streams.stderr(stderr);
|
|
139
|
+
if (error) {
|
|
140
|
+
reject(error);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (stopCode !== undefined) {
|
|
144
|
+
resolve(stopCode);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (outcome?.type !== "paideia.process.exited") {
|
|
148
|
+
reject(failure("Paideia supervisor exited without a native outcome"));
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (outcome.signal) {
|
|
152
|
+
resolve(outcome.signal === "SIGINT" ? 130 : outcome.signal === "SIGTERM" ? 143 : 1);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
const exitCode = outcome.code ?? 1;
|
|
156
|
+
if ((exitCode === 0 || exitCode === 1) && !validReceipt(lastLine, options.dryRun)) {
|
|
157
|
+
reject(failure("Paideia exited without the required final training receipt"));
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
resolve(exitCode);
|
|
161
|
+
};
|
|
162
|
+
child.once("error", (caught) => { error = failure(`Could not start Paideia supervisor: ${caught.message}`); });
|
|
163
|
+
child.once("exit", () => { reaped = true; void finish(); });
|
|
164
|
+
child.once("close", () => { closed = true; void finish(); });
|
|
165
|
+
});
|
|
166
|
+
/** Delegates through the public CLI, never importing Paideia or selecting a fallback adapter. */
|
|
167
|
+
export const delegatePaideiaTraining = async (options) => {
|
|
168
|
+
if (options.signal?.aborted)
|
|
169
|
+
return 130;
|
|
170
|
+
if (options.repairWitness && !options.repairMeasurements)
|
|
171
|
+
throw failure("--repair-witness requires --repair-measurements");
|
|
172
|
+
if (options.trainingConfig) {
|
|
173
|
+
const config = await readBoundedJson(options.trainingConfig);
|
|
174
|
+
// Image declarations go through preparation; lowered launch configurations go straight to Docker.
|
|
175
|
+
if (config.version === "spawnfile.training-container.v2" || (["spawnfile.training-container.v3", "spawnfile.training-container.v4"].includes(String(config.version)) && config.image !== undefined)) {
|
|
176
|
+
if (options.trainingImage && !options.execution)
|
|
177
|
+
throw failure("V2 owns its image declaration; --training-image is only for v1");
|
|
178
|
+
const prepared = await prepareTraining({ configPath: options.trainingConfig, context: options.context, args: options.args,
|
|
179
|
+
repairMeasurements: options.repairMeasurements, repairWitness: options.repairWitness,
|
|
180
|
+
execution: options.execution, outputOverride: options.execution?.output, imageOverride: options.execution ? options.trainingImage : undefined,
|
|
181
|
+
dryRun: options.dryRun, process: runTrainingDocker, timeoutMs: options.timeoutMs, signal: options.signal, streams: options.streams });
|
|
182
|
+
if (!("dryRun" in prepared))
|
|
183
|
+
return launchTrainingContainer({ ...prepared,
|
|
184
|
+
timeoutMs: options.timeoutMs, signal: options.signal, streams: options.streams });
|
|
185
|
+
options.streams.stderr(`Training preparation plan ${prepared.digest}; no Docker, auth or filesystem mutations`);
|
|
186
|
+
options = { ...options, repairMeasurements: undefined, repairWitness: undefined };
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (options.repairMeasurements)
|
|
190
|
+
throw failure("Measurement repair requires the v2 preparation declaration");
|
|
191
|
+
if (!options.dryRun) {
|
|
192
|
+
if (!options.trainingImage || !options.trainingConfig)
|
|
193
|
+
throw failure("Actual training requires --training-image and --training-config; host execution is disabled");
|
|
194
|
+
return launchTrainingContainer({ image: options.trainingImage, configPath: options.trainingConfig,
|
|
195
|
+
context: options.context, args: options.args, execution: options.execution, timeoutMs: options.timeoutMs, streams: options.streams, signal: options.signal });
|
|
196
|
+
}
|
|
197
|
+
if (process.platform === "win32")
|
|
198
|
+
throw failure("Paideia delegation requires POSIX process-group supervision");
|
|
199
|
+
const bytes = JSON.stringify(trainingContextSchema.parse(options.context));
|
|
200
|
+
if (Buffer.byteLength(bytes, "utf8") > MAX_LINE_BYTES)
|
|
201
|
+
throw new SpawnfileError("validation_error", "Training context exceeds 1 MiB");
|
|
202
|
+
const temporary = await mkdtemp(path.join(os.tmpdir(), "spawnfile-training-"));
|
|
203
|
+
const contextPath = path.join(temporary, "context.json");
|
|
204
|
+
try {
|
|
205
|
+
await writeFile(contextPath, bytes, { mode: 0o600, flag: "wx" });
|
|
206
|
+
return await runChild(options, contextPath);
|
|
207
|
+
}
|
|
208
|
+
finally {
|
|
209
|
+
await rm(temporary, { recursive: true, force: true });
|
|
210
|
+
}
|
|
211
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ChildProcess } from "node:child_process";
|
|
2
|
+
export type PaideiaProcessOutcome = {
|
|
3
|
+
type: "paideia.process.exited";
|
|
4
|
+
code: number | null;
|
|
5
|
+
signal: NodeJS.Signals | null;
|
|
6
|
+
} | {
|
|
7
|
+
type: "paideia.process.launch-error";
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
type SupervisorProcess = Pick<NodeJS.Process, "send" | "pid" | "on" | "removeListener" | "kill" | "exit">;
|
|
11
|
+
export interface PaideiaSupervisorHost {
|
|
12
|
+
process: SupervisorProcess;
|
|
13
|
+
launch(command: string, args: string[]): ChildProcess;
|
|
14
|
+
}
|
|
15
|
+
/** Remains the owned group leader until the parent closes the entire group. */
|
|
16
|
+
export declare const supervisePaideia: (argv: readonly string[], host?: PaideiaSupervisorHost) => (() => void);
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
const defaultHost = {
|
|
5
|
+
process,
|
|
6
|
+
launch: (command, args) => spawn(command, args, { shell: false, stdio: ["ignore", "inherit", "inherit"] })
|
|
7
|
+
};
|
|
8
|
+
/** Remains the owned group leader until the parent closes the entire group. */
|
|
9
|
+
export const supervisePaideia = (argv, host = defaultHost) => {
|
|
10
|
+
const [command, ...args] = argv;
|
|
11
|
+
if (!command || !host.process.send)
|
|
12
|
+
throw new Error("Paideia supervisor requires an executable and private IPC");
|
|
13
|
+
const hold = setInterval(() => undefined, 1000);
|
|
14
|
+
const ignore = () => undefined;
|
|
15
|
+
const disconnect = () => {
|
|
16
|
+
// This process is still alive: its own group identity cannot have been recycled.
|
|
17
|
+
try {
|
|
18
|
+
host.process.kill(-host.process.pid, "SIGKILL");
|
|
19
|
+
}
|
|
20
|
+
finally {
|
|
21
|
+
host.process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
host.process.on("SIGINT", ignore).on("SIGTERM", ignore).on("disconnect", disconnect);
|
|
25
|
+
let reported = false;
|
|
26
|
+
const report = (outcome) => {
|
|
27
|
+
if (reported)
|
|
28
|
+
return;
|
|
29
|
+
reported = true;
|
|
30
|
+
host.process.send(outcome);
|
|
31
|
+
};
|
|
32
|
+
const child = host.launch(command, args);
|
|
33
|
+
child.once("error", (error) => report({ type: "paideia.process.launch-error", message: error.message }));
|
|
34
|
+
child.once("exit", (code, signal) => report({ type: "paideia.process.exited", code, signal }));
|
|
35
|
+
return () => {
|
|
36
|
+
clearInterval(hold);
|
|
37
|
+
host.process.removeListener("SIGINT", ignore).removeListener("SIGTERM", ignore).removeListener("disconnect", disconnect);
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
41
|
+
try {
|
|
42
|
+
supervisePaideia(process.argv.slice(2));
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
46
|
+
process.exitCode = 1;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { issueProductStateSourceSnapshot, runProductStateCloneWorkflow } from "../deployment/productStateClone.js";
|
|
5
|
+
const requestSchema = z.object({ version: z.literal("spawnfile.product-state-clone-request.v1"), authority_receipt_path: z.string().min(1).max(4096), docker_command: z.string().min(1).max(4096), destination: z.string().min(1).max(4096), proof_path: z.string().min(1).max(4096), receipt_path: z.string().min(1).max(4096), candidate_run_id: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$/u) }).strict();
|
|
6
|
+
const authorityRequestSchema = z.object({ version: z.literal("spawnfile.product-state-source-authority-request.v1"), docker_command: z.string().min(1).max(4096), container: z.string().min(1).max(255), source_run_id: z.string().min(1).max(128), mount_path: z.string().min(1).max(4096), candidate_volume_name: z.string().min(1).max(255), candidate_resource_identity: z.string().regex(/^sha256:[a-f0-9]{64}$/u), receipt_path: z.string().min(1).max(4096), proof_path: z.string().min(1).max(4096) }).strict();
|
|
7
|
+
export const isProductStateCloneInvocation = (argv) => argv[0] === "product-state" && ["authority", "clone"].includes(argv[1] ?? "");
|
|
8
|
+
export const runProductStateCloneCommand = async (argv) => {
|
|
9
|
+
try {
|
|
10
|
+
if (argv.length !== 3)
|
|
11
|
+
throw new Error("usage");
|
|
12
|
+
const bytes = await readFile(argv[2]);
|
|
13
|
+
if (bytes.length > 65_536)
|
|
14
|
+
throw new Error("oversized");
|
|
15
|
+
if (argv[1] === "authority") {
|
|
16
|
+
const request = authorityRequestSchema.parse(JSON.parse(bytes.toString("utf8"))), snapshot = await issueProductStateSourceSnapshot({ dockerCommand: request.docker_command, container: request.container, sourceRunId: request.source_run_id, mountPath: request.mount_path, candidateVolumeName: request.candidate_volume_name, candidateResourceIdentity: request.candidate_resource_identity });
|
|
17
|
+
await mkdir(path.dirname(request.receipt_path), { recursive: true, mode: 0o700 });
|
|
18
|
+
await writeFile(request.proof_path, `${JSON.stringify(snapshot.proof)}\n`, { flag: "wx", mode: 0o600 });
|
|
19
|
+
await writeFile(request.receipt_path, `${JSON.stringify(snapshot.authority)}\n`, { flag: "wx", mode: 0o600 });
|
|
20
|
+
process.stdout.write(`${JSON.stringify(snapshot.authority)}\n`);
|
|
21
|
+
return 0;
|
|
22
|
+
}
|
|
23
|
+
const request = requestSchema.parse(JSON.parse(bytes.toString("utf8")));
|
|
24
|
+
process.stdout.write(`${JSON.stringify(await runProductStateCloneWorkflow({ authorityReceiptPath: request.authority_receipt_path, dockerCommand: request.docker_command, destination: request.destination, proofPath: request.proof_path, receiptPath: request.receipt_path, candidateRunId: request.candidate_run_id }))}\n`);
|
|
25
|
+
return 0;
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
// Carry the cause. A bare "failed" is undiagnosable in CI, where this runs
|
|
29
|
+
// against a different Docker and architecture than any developer machine.
|
|
30
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
31
|
+
process.stderr.write(`error: Product-state clone failed: ${detail}\n`);
|
|
32
|
+
return 1;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import { type RecordingDeploymentHandlers } from "../recording/index.js";
|
|
3
|
+
import type { CliStreams } from "./runCli.js";
|
|
4
|
+
import { type UsageCommandLiveHandlers } from "./usageCommandLive.js";
|
|
5
|
+
export interface RecordSyncOptions {
|
|
6
|
+
deployment?: string;
|
|
7
|
+
out?: string;
|
|
8
|
+
dockerCommand?: string;
|
|
9
|
+
timeout?: string;
|
|
10
|
+
}
|
|
11
|
+
export type RecordCommandHandlers = UsageCommandLiveHandlers & RecordingDeploymentHandlers;
|
|
12
|
+
export declare const executeRecordSyncCommand: (inputPath: string, options: RecordSyncOptions, handlers?: RecordCommandHandlers) => Promise<{
|
|
13
|
+
exitCode: 0 | 1 | 2;
|
|
14
|
+
output?: string;
|
|
15
|
+
error?: string;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const registerRecordCommands: (program: Command, streams: CliStreams, setExitCode: (code: 0 | 1 | 2) => void, handlers?: RecordCommandHandlers) => void;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { resolveProjectOutputDirectory } from "../filesystem/index.js";
|
|
2
|
+
import { syncDeploymentMoments } from "../recording/index.js";
|
|
3
|
+
import { DEFAULT_OUTPUT_DIRECTORY, errorExitCode } from "../shared/index.js";
|
|
4
|
+
import { selectUsageDeployment } from "./usageCommandLive.js";
|
|
5
|
+
import { resolveUsageDeploymentSource } from "./usageDeploymentSource.js";
|
|
6
|
+
export const executeRecordSyncCommand = async (inputPath, options, handlers = {}) => {
|
|
7
|
+
try {
|
|
8
|
+
const timeoutMs = options.timeout === undefined ? undefined : Number(options.timeout);
|
|
9
|
+
if (timeoutMs !== undefined && (!Number.isFinite(timeoutMs) || timeoutMs <= 0)) {
|
|
10
|
+
return { exitCode: 2, error: "--timeout must be a positive number of milliseconds" };
|
|
11
|
+
}
|
|
12
|
+
const outputDirectory = resolveProjectOutputDirectory(inputPath, options.out, DEFAULT_OUTPUT_DIRECTORY);
|
|
13
|
+
const source = await resolveUsageDeploymentSource(inputPath, options, handlers, outputDirectory);
|
|
14
|
+
const records = await source.loader(source.outputDirectory);
|
|
15
|
+
const record = selectUsageDeployment(records, options.deployment);
|
|
16
|
+
if ("error" in record)
|
|
17
|
+
return { exitCode: 2, error: record.error.replace("spawnfile usage", "spawnfile record sync") };
|
|
18
|
+
const recordPath = records.find((entry) => entry.record === record).path;
|
|
19
|
+
const result = await syncDeploymentMoments({ record, recordPath, timeoutMs, dockerCommand: options.dockerCommand }, handlers);
|
|
20
|
+
return {
|
|
21
|
+
exitCode: result.failures.length ? 1 : 0,
|
|
22
|
+
output: `Records: ${result.written} written / ${result.skipped} skipped / ${result.nonExact} non-exact`,
|
|
23
|
+
...((result.failures.length || result.warnings.length) ? { error: [...result.failures, ...new Set(result.warnings)].join("\n") } : {})
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
return { exitCode: errorExitCode(error), error: error instanceof Error ? error.message : String(error) };
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
export const registerRecordCommands = (program, streams, setExitCode, handlers = {}) => {
|
|
31
|
+
program.command("record").description("Compose training moment records from deployed wake evidence")
|
|
32
|
+
.command("sync").argument("[path]", "Project directory or Spawnfile path", process.cwd())
|
|
33
|
+
.option("--deployment <name>", "Deployment record name").option("--out <dir>", "Compile output directory")
|
|
34
|
+
.option("--docker-command <command>", "Docker command").option("--timeout <ms>", "Bound Docker reads in milliseconds")
|
|
35
|
+
.action(async (inputPath, options) => {
|
|
36
|
+
const result = await executeRecordSyncCommand(inputPath, options, handlers);
|
|
37
|
+
setExitCode(result.exitCode);
|
|
38
|
+
if (result.error)
|
|
39
|
+
streams.stderr(result.error);
|
|
40
|
+
if (result.output)
|
|
41
|
+
streams.stdout(result.output);
|
|
42
|
+
});
|
|
43
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import { type ReleaseDependencies } from "../release/index.js";
|
|
3
|
+
import type { CliStreams } from "./runCli.js";
|
|
4
|
+
/** `90s`, `30m`, `2h`, `500ms`. A bare number is refused: the unit is never guessed. */
|
|
5
|
+
export declare const parseReleaseDuration: (value: string, flag: string) => number;
|
|
6
|
+
export declare const registerReleaseCommand: (program: Command, streams: CliStreams, setExitCode: (code: number) => void, dependencies?: () => ReleaseDependencies) => void;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { createDefaultReleaseDependencies, releaseExitCode, resolveNotifierConfig, resolvePostDeployHook, runRelease } from "../release/index.js";
|
|
2
|
+
import { SpawnfileError } from "../shared/index.js";
|
|
3
|
+
import { envFileAliasOption, resolveEnvFileOption, runtimeEnvFileOption } from "./envFileOption.js";
|
|
4
|
+
const UNITS = { h: 3_600_000, m: 60_000, ms: 1, s: 1_000 };
|
|
5
|
+
/** `90s`, `30m`, `2h`, `500ms`. A bare number is refused: the unit is never guessed. */
|
|
6
|
+
export const parseReleaseDuration = (value, flag) => {
|
|
7
|
+
const match = /^(\d+)(ms|s|m|h)$/u.exec(value.trim());
|
|
8
|
+
if (!match)
|
|
9
|
+
throw new SpawnfileError("validation_error", `${flag} must be a duration like 90s, 30m or 2h`);
|
|
10
|
+
const ms = Number(match[1]) * UNITS[match[2]];
|
|
11
|
+
if (!Number.isSafeInteger(ms) || ms <= 0)
|
|
12
|
+
throw new SpawnfileError("validation_error", `${flag} must be positive`);
|
|
13
|
+
return ms;
|
|
14
|
+
};
|
|
15
|
+
export const registerReleaseCommand = (program, streams, setExitCode, dependencies = createDefaultReleaseDependencies) => {
|
|
16
|
+
program
|
|
17
|
+
.command("release")
|
|
18
|
+
.description("Build and deploy only when the image inputs changed, draining running turns first")
|
|
19
|
+
.argument("[path]", "Project directory or Spawnfile path", process.cwd())
|
|
20
|
+
.requiredOption("--deployment <name>", "Detached deployment to release into")
|
|
21
|
+
.addOption(runtimeEnvFileOption("Runtime secrets; must set SPAWNFILE_DAIMON_CONTROL_TOKEN to drain"))
|
|
22
|
+
.addOption(envFileAliasOption())
|
|
23
|
+
.option("--auth-profile <name>", "Local Spawnfile auth profile")
|
|
24
|
+
.option("--context <name>", "Docker context for the build and deployment target")
|
|
25
|
+
.option("--docker-command <command>", "Docker command")
|
|
26
|
+
.option("-o, --out <directory>", "Compile output directory")
|
|
27
|
+
.option("--image-repository <name>", "Repository for release image tags (default spawnfile-<project>)")
|
|
28
|
+
.option("--drain-timeout <duration>", "How long running turns may take to finish before the release is abandoned", "30m")
|
|
29
|
+
.option("--no-drain", "Deploy without draining (kills in-flight turns)")
|
|
30
|
+
.option("--force", "Release even when the running identity is unchanged")
|
|
31
|
+
.option("--dev-inputs", "Hash working-tree bundle inputs instead of requiring a clean commit")
|
|
32
|
+
.option("--notify-command <path>", "Executable run on failure; receives the notification JSON on stdin")
|
|
33
|
+
.option("--notify-webhook-env <name>", "Environment variable holding an https URL to POST the notification to")
|
|
34
|
+
.option("--notify-deferred-after <duration>", "Notify once when a release has been deferred this long", "24h")
|
|
35
|
+
.option("--post-deploy-command <path>", "Executable run (no shell) on the new container's host after it settled; non-zero fails the release")
|
|
36
|
+
.option("--post-deploy-arg <arg>", "Argument for --post-deploy-command (repeatable)", (value, previous = []) => [...previous, value])
|
|
37
|
+
.option("--post-deploy-timeout <duration>", "How long --post-deploy-command may run", "10m")
|
|
38
|
+
.action(async (inputPath, options) => {
|
|
39
|
+
let notifier;
|
|
40
|
+
try {
|
|
41
|
+
notifier = resolveNotifierConfig(options);
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
throw new SpawnfileError("validation_error", error.message);
|
|
45
|
+
}
|
|
46
|
+
const envFile = resolveEnvFileOption(options);
|
|
47
|
+
let postDeploy;
|
|
48
|
+
try {
|
|
49
|
+
postDeploy = resolvePostDeployHook({ ...options, timeoutMs: parseReleaseDuration(options.postDeployTimeout, "--post-deploy-timeout") });
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
throw new SpawnfileError("validation_error", error.message);
|
|
53
|
+
}
|
|
54
|
+
const drainTimeoutMs = parseReleaseDuration(options.drainTimeout, "--drain-timeout");
|
|
55
|
+
const notifyDeferredAfterMs = parseReleaseDuration(options.notifyDeferredAfter, "--notify-deferred-after");
|
|
56
|
+
const abort = new AbortController();
|
|
57
|
+
const onSignal = () => abort.abort();
|
|
58
|
+
process.once("SIGTERM", onSignal);
|
|
59
|
+
process.once("SIGINT", onSignal);
|
|
60
|
+
try {
|
|
61
|
+
const request = {
|
|
62
|
+
authProfileName: options.authProfile ?? null,
|
|
63
|
+
bundleIdentity: options.devInputs ? "dev" : "release",
|
|
64
|
+
deployment: options.deployment,
|
|
65
|
+
dockerCommand: options.dockerCommand ?? "docker",
|
|
66
|
+
...(options.context ? { dockerContext: options.context } : {}),
|
|
67
|
+
drain: options.drain,
|
|
68
|
+
drainPollMs: 5_000,
|
|
69
|
+
drainTimeoutMs,
|
|
70
|
+
envFileEnv: {},
|
|
71
|
+
...(envFile ? { envFilePath: envFile } : {}),
|
|
72
|
+
force: options.force === true,
|
|
73
|
+
...(options.imageRepository ? { imageRepository: options.imageRepository } : {}),
|
|
74
|
+
inputPath,
|
|
75
|
+
log: streams.stdout,
|
|
76
|
+
notifier,
|
|
77
|
+
notifyDeferredAfterMs,
|
|
78
|
+
...(options.out ? { outputDirectory: options.out } : {}),
|
|
79
|
+
postDeploy,
|
|
80
|
+
settle: { pollMs: 5_000, polls: 36, stablePolls: 3 },
|
|
81
|
+
signal: abort.signal
|
|
82
|
+
};
|
|
83
|
+
const outcome = await runRelease(request, dependencies());
|
|
84
|
+
setExitCode(releaseExitCode(outcome));
|
|
85
|
+
}
|
|
86
|
+
finally {
|
|
87
|
+
process.off("SIGTERM", onSignal);
|
|
88
|
+
process.off("SIGINT", onSignal);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
};
|
package/dist/cli/runCli.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { importClaudeCodeAuth, importCodexAuth, importEnvFile, initializeTargetSecretSourceLifecycle, provisionCredentials, requireAuthProfile } from "../auth/index.js";
|
|
2
|
-
import { addAgentProject, addProjectSurface, addProjectModelFallback, addSubagentProject, addTeamProject, buildOrganizationView, buildCompilePlan, buildProject, buildUpReceipt, clearProjectModelFallbacks, compileProject, initProject, publishProject, upProject, removeProjectSurface, runProject, setProjectPrimaryModel, setProjectRuntime, setProjectSurfaceAccess, showProjectSurfaces, syncProjectAuth } from "../compiler/index.js";
|
|
1
|
+
import { importClaudeCodeAuth, importCodexAuth, importGrokAuth, importEnvFile, initializeTargetSecretSourceLifecycle, provisionCredentials, requireAuthProfile } from "../auth/index.js";
|
|
2
|
+
import { addAgentProject, addProjectSurface, addProjectModelFallback, addSubagentProject, addTeamProject, buildOrganizationView, buildCompilePlan, buildProject, buildUpReceipt, clearProjectModelFallbacks, compileProject, createTrainingContext, createTrainingPlan, loadTrainingProject, resolveTrainingPlan, materializeTrainingMoment, lowerTrainingExecution, allocateTrainingOutputParent, initProject, listInitTemplates, publishProject, upProject, removeProjectSurface, runProject, setProjectPrimaryModel, setProjectRuntime, setProjectSurfaceAccess, showProjectSurfaces, syncProjectAuth } from "../compiler/index.js";
|
|
3
3
|
import { devActivityProject, devApplyProject, devRestartProject, devStopProject, devUpProject } from "../dev/index.js";
|
|
4
4
|
import { consumeImageUp } from "../distribution/index.js";
|
|
5
|
-
import { downDeployment, exportRunArtifacts } from "../deployment/index.js";
|
|
5
|
+
import { createDockerProbeGateway, downDeployment, exportRunArtifacts, inspectDockerDeployment, listDeploymentRecords, listHomeDeploymentRecords } from "../deployment/index.js";
|
|
6
6
|
import { listRuntimeAdapters } from "../runtime/index.js";
|
|
7
|
+
import { delegatePaideiaTraining } from "./paideiaDelegation.js";
|
|
7
8
|
export interface CliStreams {
|
|
8
9
|
stderr: (message: string) => void;
|
|
9
10
|
stdout: (message: string) => void;
|
|
@@ -14,6 +15,14 @@ export interface CliRenderEnvironment {
|
|
|
14
15
|
stdoutIsTty: boolean;
|
|
15
16
|
}
|
|
16
17
|
export interface CliHandlers {
|
|
18
|
+
createTrainingContext: typeof createTrainingContext;
|
|
19
|
+
createTrainingPlan: typeof createTrainingPlan;
|
|
20
|
+
lowerTrainingExecution: typeof lowerTrainingExecution;
|
|
21
|
+
allocateTrainingOutputParent: typeof allocateTrainingOutputParent;
|
|
22
|
+
loadTrainingProject: typeof loadTrainingProject;
|
|
23
|
+
resolveTrainingPlan: typeof resolveTrainingPlan;
|
|
24
|
+
materializeTrainingMoment: typeof materializeTrainingMoment;
|
|
25
|
+
delegatePaideiaTraining: typeof delegatePaideiaTraining;
|
|
17
26
|
buildCompilePlan: typeof buildCompilePlan;
|
|
18
27
|
buildOrganizationView: typeof buildOrganizationView;
|
|
19
28
|
buildProject: typeof buildProject;
|
|
@@ -27,12 +36,18 @@ export interface CliHandlers {
|
|
|
27
36
|
clearProjectModelFallbacks: typeof clearProjectModelFallbacks;
|
|
28
37
|
importClaudeCodeAuth: typeof importClaudeCodeAuth;
|
|
29
38
|
importCodexAuth: typeof importCodexAuth;
|
|
39
|
+
importGrokAuth: typeof importGrokAuth;
|
|
30
40
|
importEnvFile: typeof importEnvFile;
|
|
31
41
|
initProject: typeof initProject;
|
|
42
|
+
listInitTemplates: typeof listInitTemplates;
|
|
32
43
|
initializeTargetSecretSourceLifecycle: typeof initializeTargetSecretSourceLifecycle;
|
|
33
44
|
provisionCredentials: typeof provisionCredentials;
|
|
34
45
|
exportRunArtifacts: typeof exportRunArtifacts;
|
|
35
46
|
downDeployment: typeof downDeployment;
|
|
47
|
+
createDockerProbeGateway: typeof createDockerProbeGateway;
|
|
48
|
+
inspectDockerDeployment: typeof inspectDockerDeployment;
|
|
49
|
+
listDeploymentRecords: typeof listDeploymentRecords;
|
|
50
|
+
listHomeDeploymentRecords: typeof listHomeDeploymentRecords;
|
|
36
51
|
listRuntimeAdapters: typeof listRuntimeAdapters;
|
|
37
52
|
removeProjectSurface: typeof removeProjectSurface;
|
|
38
53
|
requireAuthProfile: typeof requireAuthProfile;
|
|
@@ -56,6 +71,7 @@ export interface RunCliOptions {
|
|
|
56
71
|
renderEnvironment?: CliRenderEnvironment;
|
|
57
72
|
stdin?: AsyncIterable<unknown>;
|
|
58
73
|
streams?: CliStreams;
|
|
74
|
+
signal?: AbortSignal;
|
|
59
75
|
}
|
|
60
76
|
type RunCli = {
|
|
61
77
|
(argv: string[], options?: RunCliOptions): Promise<number>;
|