spawnfile 0.1.13 → 0.1.17
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 +61 -121
- package/dist/audit/auditCli.d.ts +19 -0
- package/dist/audit/auditCli.js +63 -0
- package/dist/audit/checks.d.ts +100 -0
- package/dist/audit/checks.js +279 -0
- package/dist/audit/checksShared.d.ts +74 -0
- package/dist/audit/checksShared.js +37 -0
- package/dist/audit/generateAudit.d.ts +19 -0
- package/dist/audit/generateAudit.js +122 -0
- package/dist/audit/index.d.ts +4 -0
- package/dist/audit/index.js +4 -0
- package/dist/audit/readAudit.d.ts +50 -0
- package/dist/audit/readAudit.js +59 -0
- package/dist/audit/types.d.ts +40 -0
- package/dist/audit/types.js +8 -0
- package/dist/auth/credentialEnvFile.d.ts +11 -0
- package/dist/auth/credentialEnvFile.js +60 -0
- package/dist/auth/credentialProvisioning.d.ts +15 -0
- package/dist/auth/credentialProvisioning.js +75 -0
- package/dist/auth/credentialProvisioningReceipt.d.ts +28 -0
- package/dist/auth/credentialProvisioningReceipt.js +70 -0
- package/dist/auth/credentialProvisioningRequest.d.ts +51 -0
- package/dist/auth/credentialProvisioningRequest.js +169 -0
- package/dist/auth/credentialWorldBindings.d.ts +21 -0
- package/dist/auth/credentialWorldBindings.js +104 -0
- package/dist/auth/importers.d.ts +10 -0
- package/dist/auth/importers.js +29 -4
- package/dist/auth/index.d.ts +9 -0
- package/dist/auth/index.js +8 -0
- package/dist/auth/paths.d.ts +12 -1
- package/dist/auth/paths.js +21 -0
- package/dist/auth/profileStore.js +9 -9
- package/dist/auth/targetSecretSourceAuthor.d.ts +18 -0
- package/dist/auth/targetSecretSourceAuthor.js +52 -0
- package/dist/auth/targetSecretSourceFsIdentity.d.ts +40 -0
- package/dist/auth/targetSecretSourceFsIdentity.js +42 -0
- package/dist/auth/targetSecretSourceFsPublish.d.ts +17 -0
- package/dist/auth/targetSecretSourceFsPublish.js +51 -0
- package/dist/auth/targetSecretSourceFsPublishImmutable.d.ts +17 -0
- package/dist/auth/targetSecretSourceFsPublishImmutable.js +468 -0
- package/dist/auth/targetSecretSourceFsRead.d.ts +14 -0
- package/dist/auth/targetSecretSourceFsRead.js +189 -0
- package/dist/auth/targetSecretSourceGrant.d.ts +16 -0
- package/dist/auth/targetSecretSourceGrant.js +99 -0
- package/dist/auth/targetSecretSourceGrantRecords.d.ts +84 -0
- package/dist/auth/targetSecretSourceGrantRecords.js +214 -0
- package/dist/auth/targetSecretSourceLifecycle.d.ts +30 -0
- package/dist/auth/targetSecretSourceLifecycle.js +52 -0
- package/dist/auth/targetSecretSourceOwnerEntropy.d.ts +6 -0
- package/dist/auth/targetSecretSourceOwnerEntropy.js +28 -0
- package/dist/auth/targetSecretSourceRecordCommon.d.ts +14 -0
- package/dist/auth/targetSecretSourceRecordCommon.js +100 -0
- package/dist/auth/targetSecretSourceRecordPublish.d.ts +10 -0
- package/dist/auth/targetSecretSourceRecordPublish.js +104 -0
- package/dist/auth/targetSecretSourceResolver.d.ts +10 -0
- package/dist/auth/targetSecretSourceResolver.js +137 -0
- package/dist/auth/targetSecretSourceRevoke.d.ts +20 -0
- package/dist/auth/targetSecretSourceRevoke.js +92 -0
- package/dist/auth/targetSecretSourceRotate.d.ts +19 -0
- package/dist/auth/targetSecretSourceRotate.js +121 -0
- package/dist/auth/targetSecretSourceVersionRecords.d.ts +49 -0
- package/dist/auth/targetSecretSourceVersionRecords.js +166 -0
- package/dist/auth/trainingAuth.d.ts +21 -0
- package/dist/auth/trainingAuth.js +86 -0
- package/dist/auth/types.d.ts +1 -1
- package/dist/cli/artifactsCommands.d.ts +27 -0
- package/dist/cli/artifactsCommands.js +132 -0
- package/dist/cli/authCommands.d.ts +5 -0
- package/dist/cli/authCommands.js +230 -0
- 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.d.ts +3 -0
- package/dist/cli/compileBuildCommands.js +48 -0
- package/dist/cli/composedLifecycleContractSet.d.ts +21 -0
- package/dist/cli/composedLifecycleContractSet.js +204 -0
- package/dist/cli/containerBundleCommand.d.ts +6 -0
- package/dist/cli/containerBundleCommand.js +116 -0
- package/dist/cli/devCommands.js +2 -0
- package/dist/cli/downCommand.d.ts +25 -0
- package/dist/cli/downCommand.js +145 -0
- package/dist/cli/evidenceExportHelperCommand.d.ts +13 -0
- package/dist/cli/evidenceExportHelperCommand.js +51 -0
- package/dist/cli/index.js +15 -3
- package/dist/cli/lifecycleCommands.d.ts +1 -1
- package/dist/cli/lifecycleCommands.js +11 -181
- package/dist/cli/lifecycleMachine.d.ts +25 -0
- package/dist/cli/lifecycleMachine.js +78 -0
- package/dist/cli/lifecyclePlan.d.ts +35 -0
- package/dist/cli/lifecyclePlan.js +240 -0
- package/dist/cli/lifecyclePlanningCommands.d.ts +3 -0
- package/dist/cli/lifecyclePlanningCommands.js +30 -0
- package/dist/cli/paideiaDelegation.d.ts +17 -0
- package/dist/cli/paideiaDelegation.js +210 -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/runCli.d.ts +19 -2
- package/dist/cli/runCli.js +58 -74
- package/dist/cli/runPublishCommands.d.ts +3 -0
- package/dist/cli/runPublishCommands.js +70 -0
- package/dist/cli/statusCommand.d.ts +3 -33
- package/dist/cli/statusCommand.js +19 -249
- package/dist/cli/statusCommandLive.d.ts +20 -0
- package/dist/cli/statusCommandLive.js +188 -0
- package/dist/cli/statusCommandOptions.d.ts +40 -0
- package/dist/cli/statusCommandOptions.js +42 -0
- package/dist/cli/targetCliRoute.d.ts +2 -0
- package/dist/cli/targetCliRoute.js +30 -0
- package/dist/cli/targetCommands.d.ts +30 -0
- package/dist/cli/targetCommands.js +227 -0
- package/dist/cli/targetComposedPreparationCommand.d.ts +6 -0
- package/dist/cli/targetComposedPreparationCommand.js +39 -0
- 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/targetDefaultArtifactAuthority.d.ts +5 -0
- package/dist/cli/targetDefaultArtifactAuthority.js +28 -0
- package/dist/cli/targetDefaultAuthorities.d.ts +55 -0
- package/dist/cli/targetDefaultAuthorities.js +213 -0
- package/dist/cli/targetDefaultConfig.d.ts +75 -0
- package/dist/cli/targetDefaultConfig.js +334 -0
- package/dist/cli/targetDefaultConfigStdin.d.ts +13 -0
- package/dist/cli/targetDefaultConfigStdin.js +221 -0
- package/dist/cli/targetDefaultEnvelope.d.ts +1 -0
- package/dist/cli/targetDefaultEnvelope.js +13 -0
- package/dist/cli/targetDefaultHandlerFactory.d.ts +28 -0
- package/dist/cli/targetDefaultHandlerFactory.js +268 -0
- package/dist/cli/targetDefaultHandlers.d.ts +21 -0
- package/dist/cli/targetDefaultHandlers.js +72 -0
- package/dist/cli/targetDefaultJournalAuthority.d.ts +35 -0
- package/dist/cli/targetDefaultJournalAuthority.js +135 -0
- package/dist/cli/targetDefaultWorldClock.d.ts +4 -0
- package/dist/cli/targetDefaultWorldClock.js +14 -0
- package/dist/cli/targetDefaultWorldQueries.d.ts +5 -0
- package/dist/cli/targetDefaultWorldQueries.js +11 -0
- package/dist/cli/targetDefaultWorldReadiness.d.ts +4 -0
- package/dist/cli/targetDefaultWorldReadiness.js +17 -0
- package/dist/cli/targetEvidenceHelperResolution.d.ts +14 -0
- package/dist/cli/targetEvidenceHelperResolution.js +23 -0
- package/dist/cli/targetLookupCli.d.ts +3 -0
- package/dist/cli/targetLookupCli.js +31 -0
- package/dist/cli/targetLookupCommands.d.ts +12 -0
- package/dist/cli/targetLookupCommands.js +69 -0
- package/dist/cli/targetOperationDispatch.d.ts +58 -0
- package/dist/cli/targetOperationDispatch.js +21 -0
- package/dist/cli/targetProductionCommands.d.ts +5 -0
- package/dist/cli/targetProductionCommands.js +45 -0
- package/dist/cli/targetReceiptOutput.d.ts +14 -0
- package/dist/cli/targetReceiptOutput.js +21 -0
- package/dist/cli/targetRequestFile.d.ts +14 -0
- package/dist/cli/targetRequestFile.js +63 -0
- package/dist/cli/targetSecretSourceInput.d.ts +28 -0
- package/dist/cli/targetSecretSourceInput.js +121 -0
- package/dist/cli/targetWorldClockCommand.d.ts +10 -0
- package/dist/cli/targetWorldClockCommand.js +42 -0
- package/dist/cli/targetWorldReadinessCommand.d.ts +10 -0
- package/dist/cli/targetWorldReadinessCommand.js +43 -0
- package/dist/cli/trainCommand.d.ts +3 -0
- package/dist/cli/trainCommand.js +61 -0
- package/dist/cli/upCommand.d.ts +3 -0
- package/dist/cli/upCommand.js +162 -0
- package/dist/cli/upImageCommand.d.ts +11 -0
- package/dist/cli/upImageCommand.js +41 -0
- package/dist/cli/upLifecycleInvocation.d.ts +41 -0
- package/dist/cli/upLifecycleInvocation.js +48 -0
- package/dist/cli/upLifecycleRecovery.d.ts +4 -0
- package/dist/cli/upLifecycleRecovery.js +197 -0
- 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/workspaceResourceMigrationCommand.d.ts +8 -0
- package/dist/cli/workspaceResourceMigrationCommand.js +36 -0
- package/dist/compiler/agentNodeMerge.d.ts +2 -0
- package/dist/compiler/agentNodeMerge.js +79 -0
- package/dist/compiler/agentSurfaces.js +11 -1
- package/dist/compiler/buildCompilePlan.js +17 -0
- package/dist/compiler/buildCompilePlanAgent.d.ts +11 -0
- package/dist/compiler/buildCompilePlanAgent.js +56 -0
- package/dist/compiler/buildCompilePlanTeams.d.ts +2 -1
- package/dist/compiler/buildCompilePlanTeams.js +9 -1
- package/dist/compiler/buildCompilePlanTraversal.js +75 -82
- package/dist/compiler/buildProject.d.ts +11 -0
- package/dist/compiler/buildProject.js +77 -2
- package/dist/compiler/compilePlanHelpers.js +5 -0
- package/dist/compiler/compileProject.d.ts +15 -0
- package/dist/compiler/compileProject.js +31 -75
- package/dist/compiler/compileProjectPolicy.d.ts +5 -0
- package/dist/compiler/compileProjectPolicy.js +21 -0
- package/dist/compiler/compileProjectReports.d.ts +9 -0
- package/dist/compiler/compileProjectReports.js +52 -0
- package/dist/compiler/compileProjectSupport.js +9 -0
- package/dist/compiler/containerArtifactSummaries.d.ts +7 -0
- package/dist/compiler/containerArtifactSummaries.js +138 -0
- package/dist/compiler/containerArtifacts.d.ts +12 -0
- package/dist/compiler/containerArtifacts.js +180 -127
- package/dist/compiler/containerArtifactsPlans.d.ts +5 -3
- package/dist/compiler/containerArtifactsPlans.js +54 -124
- package/dist/compiler/containerArtifactsRender.d.ts +5 -2
- package/dist/compiler/containerArtifactsRender.js +106 -70
- package/dist/compiler/containerArtifactsTypes.d.ts +20 -0
- package/dist/compiler/containerBackedMountRender.d.ts +56 -0
- package/dist/compiler/containerBackedMountRender.js +101 -0
- package/dist/compiler/containerConfigEnvRender.d.ts +3 -0
- package/dist/compiler/containerConfigEnvRender.js +54 -0
- package/dist/compiler/containerDaimonBrokerRender.d.ts +112 -0
- package/dist/compiler/containerDaimonBrokerRender.js +191 -0
- package/dist/compiler/containerDaimonGrokWorkerProvisioning.d.ts +38 -0
- package/dist/compiler/containerDaimonGrokWorkerProvisioning.js +108 -0
- package/dist/compiler/containerDaimonGrokWorkerRender.d.ts +172 -0
- package/dist/compiler/containerDaimonGrokWorkerRender.js +268 -0
- package/dist/compiler/containerDaimonOwnershipGuardRender.d.ts +12 -0
- package/dist/compiler/containerDaimonOwnershipGuardRender.js +191 -0
- package/dist/compiler/containerDaimonUidEntrypointRender.d.ts +24 -0
- package/dist/compiler/containerDaimonUidEntrypointRender.js +297 -0
- package/dist/compiler/containerEntrypointRender.d.ts +8 -0
- package/dist/compiler/containerEntrypointRender.js +82 -72
- package/dist/compiler/containerEntrypointShell.d.ts +5 -0
- package/dist/compiler/containerEntrypointShell.js +29 -0
- package/dist/compiler/containerPackageOverrides.d.ts +27 -0
- package/dist/compiler/containerPackageOverrides.js +63 -0
- 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/containerTargetPlanResolution.d.ts +20 -0
- package/dist/compiler/containerTargetPlanResolution.js +97 -0
- package/dist/compiler/containerTargetResources.d.ts +22 -1
- package/dist/compiler/containerTargetResources.js +94 -2
- package/dist/compiler/containerVolumeBootstrap.d.ts +3 -0
- package/dist/compiler/containerVolumeBootstrap.js +3 -0
- package/dist/compiler/containerWorkspaceResourceRender.js +49 -1
- package/dist/compiler/daimonTelemetryArtifacts.d.ts +22 -0
- package/dist/compiler/daimonTelemetryArtifacts.js +56 -0
- package/dist/compiler/deploymentLineage.d.ts +40 -0
- package/dist/compiler/deploymentLineage.js +50 -0
- package/dist/compiler/dockerBuildContext.d.ts +16 -0
- package/dist/compiler/dockerBuildContext.js +159 -0
- package/dist/compiler/dockerBuildSkip.d.ts +30 -0
- package/dist/compiler/dockerBuildSkip.js +81 -0
- package/dist/compiler/index.d.ts +7 -0
- package/dist/compiler/index.js +7 -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/memoryArtifacts.d.ts +26 -0
- package/dist/compiler/memoryArtifacts.js +210 -0
- package/dist/compiler/memoryResolution.d.ts +4 -0
- package/dist/compiler/memoryResolution.js +147 -0
- package/dist/compiler/modelEnv.d.ts +7 -0
- package/dist/compiler/modelEnv.js +13 -1
- package/dist/compiler/moltnetAllowedWakeSendersValidation.d.ts +2 -0
- package/dist/compiler/moltnetAllowedWakeSendersValidation.js +42 -0
- package/dist/compiler/moltnetArtifactPaths.d.ts +31 -0
- package/dist/compiler/moltnetArtifactPaths.js +51 -0
- package/dist/compiler/moltnetArtifactTypes.d.ts +56 -0
- package/dist/compiler/moltnetArtifactTypes.js +1 -0
- package/dist/compiler/moltnetArtifacts.d.ts +3 -41
- package/dist/compiler/moltnetArtifacts.js +87 -101
- package/dist/compiler/moltnetBinaries.d.ts +33 -4
- package/dist/compiler/moltnetBinaries.js +173 -26
- package/dist/compiler/moltnetClientConfig.js +7 -2
- package/dist/compiler/moltnetConfigLowering.d.ts +18 -1
- package/dist/compiler/moltnetConfigLowering.js +92 -6
- package/dist/compiler/moltnetExternalParticipantArtifact.d.ts +38 -0
- package/dist/compiler/moltnetExternalParticipantArtifact.js +188 -0
- package/dist/compiler/moltnetNodeConfig.js +7 -2
- package/dist/compiler/moltnetReleaseAuthority.d.ts +40 -0
- package/dist/compiler/moltnetReleaseAuthority.js +102 -0
- package/dist/compiler/moltnetReleaseDownload.d.ts +12 -0
- package/dist/compiler/moltnetReleaseDownload.js +85 -0
- package/dist/compiler/moltnetRepresentativeResolution.d.ts +2 -1
- package/dist/compiler/moltnetRepresentativeResolution.js +17 -3
- package/dist/compiler/moltnetResolution.js +67 -21
- package/dist/compiler/moltnetRoomMemberships.js +52 -9
- 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.d.ts +9 -0
- package/dist/compiler/moltnetServerPlans.js +151 -0
- package/dist/compiler/organizationExternalParticipants.d.ts +3 -0
- package/dist/compiler/organizationExternalParticipants.js +176 -0
- package/dist/compiler/organizationIdentity.d.ts +21 -0
- package/dist/compiler/organizationIdentity.js +64 -0
- package/dist/compiler/organizationIdentityGraph.d.ts +15 -0
- package/dist/compiler/organizationIdentityGraph.js +115 -0
- package/dist/compiler/organizationReadyEvidence.d.ts +57 -0
- package/dist/compiler/organizationReadyEvidence.js +281 -0
- package/dist/compiler/projectManifestGraph.d.ts +4 -0
- package/dist/compiler/projectManifestGraph.js +24 -0
- package/dist/compiler/runProject.d.ts +8 -2
- package/dist/compiler/runProject.js +62 -27
- package/dist/compiler/runProjectAuth.d.ts +10 -2
- package/dist/compiler/runProjectAuth.js +105 -11
- package/dist/compiler/runProjectDaimonCodexDocker.d.ts +3 -0
- package/dist/compiler/runProjectDaimonCodexDocker.js +36 -0
- package/dist/compiler/runProjectDocker.d.ts +11 -0
- package/dist/compiler/runProjectDocker.js +64 -16
- 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.d.ts +7 -0
- package/dist/compiler/runProjectLifecycle.js +40 -0
- package/dist/compiler/syncProjectAuth.js +4 -1
- package/dist/compiler/teamContextActiveEnvironments.d.ts +13 -0
- package/dist/compiler/teamContextActiveEnvironments.js +255 -0
- package/dist/compiler/teamContextSupport.js +32 -40
- package/dist/compiler/teamContextTypes.d.ts +2 -0
- package/dist/compiler/training/broker/declaration.d.ts +45 -0
- package/dist/compiler/training/broker/declaration.js +55 -0
- package/dist/compiler/training/broker/entrypoint.d.ts +39 -0
- package/dist/compiler/training/broker/entrypoint.js +111 -0
- package/dist/compiler/training/broker/index.d.ts +10 -0
- package/dist/compiler/training/broker/index.js +10 -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 +196 -0
- package/dist/compiler/training/broker/paths.js +241 -0
- package/dist/compiler/training/broker/processes.d.ts +42 -0
- package/dist/compiler/training/broker/processes.js +99 -0
- package/dist/compiler/training/broker/projection.d.ts +51 -0
- package/dist/compiler/training/broker/projection.js +76 -0
- package/dist/compiler/training/broker/provisioning.d.ts +87 -0
- package/dist/compiler/training/broker/provisioning.js +213 -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 +41 -0
- package/dist/compiler/training/broker/registration.js +102 -0
- package/dist/compiler/training/broker/runtime.d.ts +25 -0
- package/dist/compiler/training/broker/runtime.js +173 -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 +109 -0
- package/dist/compiler/training/broker/supervisor.js +173 -0
- package/dist/compiler/training/container/contract.d.ts +31 -0
- package/dist/compiler/training/container/contract.js +33 -0
- package/dist/compiler/training/container/index.d.ts +4 -0
- package/dist/compiler/training/container/index.js +2 -0
- package/dist/compiler/training/container/launch.d.ts +18 -0
- package/dist/compiler/training/container/launch.js +173 -0
- package/dist/compiler/training/container/prepare.d.ts +8 -0
- package/dist/compiler/training/container/prepare.js +80 -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 +36 -0
- package/dist/compiler/training/container/security.js +58 -0
- package/dist/compiler/training/context.d.ts +7 -0
- package/dist/compiler/training/context.js +93 -0
- package/dist/compiler/training/contract.d.ts +142 -0
- package/dist/compiler/training/contract.js +34 -0
- package/dist/compiler/training/index.d.ts +4 -0
- package/dist/compiler/training/index.js +3 -0
- package/dist/compiler/training/preparation/assets/Dockerfile +98 -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 +43 -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 +182 -0
- package/dist/compiler/training/preparation/contract.js +94 -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 +25 -0
- package/dist/compiler/training/preparation/files.js +85 -0
- package/dist/compiler/training/preparation/image.d.ts +28 -0
- package/dist/compiler/training/preparation/image.js +102 -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 +23 -0
- package/dist/compiler/training/preparation/inputs.js +93 -0
- package/dist/compiler/training/preparation/prepare.d.ts +33 -0
- package/dist/compiler/training/preparation/prepare.js +186 -0
- package/dist/compiler/training/preparation/scratch.d.ts +19 -0
- package/dist/compiler/training/preparation/scratch.js +48 -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 +506 -0
- package/dist/compiler/training/repair/contract.js +31 -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 +230 -0
- package/dist/compiler/training/repair/prepare.js +74 -0
- package/dist/compiler/training/repair/witness.d.ts +203 -0
- package/dist/compiler/training/repair/witness.js +42 -0
- package/dist/compiler/types.d.ts +84 -1
- package/dist/compiler/upProject.d.ts +31 -1
- package/dist/compiler/upProject.js +197 -22
- package/dist/compiler/upProjectHandoff.d.ts +62 -0
- package/dist/compiler/upProjectHandoff.js +204 -0
- package/dist/compiler/upReceipt.d.ts +36 -0
- package/dist/compiler/upReceipt.js +127 -0
- package/dist/compiler/updateProjectModels.js +43 -60
- package/dist/compiler/updateProjectRuntime.js +22 -35
- package/dist/compiler/updateProjectSurfaces.js +53 -47
- package/dist/compiler/view/types.d.ts +1 -1
- package/dist/compiler/workspaceBundleArtifacts.d.ts +3 -0
- package/dist/compiler/workspaceBundleArtifacts.js +106 -0
- package/dist/compiler/workspaceResources.d.ts +4 -1
- package/dist/compiler/workspaceResources.js +12 -7
- package/dist/compiler/worldBindings.d.ts +39 -0
- package/dist/compiler/worldBindings.js +247 -0
- package/dist/compiler/worldBindingsFile.d.ts +5 -0
- package/dist/compiler/worldBindingsFile.js +162 -0
- package/dist/deployment/artifactsExport.d.ts +49 -0
- package/dist/deployment/artifactsExport.js +217 -0
- package/dist/deployment/artifactsExportDocker.d.ts +48 -0
- package/dist/deployment/artifactsExportDocker.js +91 -0
- package/dist/deployment/artifactsExportPlan.d.ts +24 -0
- package/dist/deployment/artifactsExportPlan.js +185 -0
- package/dist/deployment/artifactsExportTypes.d.ts +50 -0
- package/dist/deployment/artifactsExportTypes.js +52 -0
- package/dist/deployment/buildImageCacheStore.d.ts +23 -0
- package/dist/deployment/buildImageCacheStore.js +54 -0
- 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/deploymentLifecycleCorrelation.d.ts +11 -0
- package/dist/deployment/deploymentLifecycleCorrelation.js +33 -0
- package/dist/deployment/dockerInspect.d.ts +9 -0
- package/dist/deployment/dockerInspect.js +24 -1
- package/dist/deployment/dockerLabels.d.ts +2 -0
- package/dist/deployment/dockerLabels.js +2 -0
- package/dist/deployment/dockerLogs.js +5 -10
- package/dist/deployment/dockerManager.d.ts +51 -0
- package/dist/deployment/dockerManager.js +124 -1
- package/dist/deployment/dockerProbeGateway.d.ts +17 -0
- package/dist/deployment/dockerProbeGateway.js +80 -6
- package/dist/deployment/dockerRecover.js +9 -1
- package/dist/deployment/dockerTeardown.d.ts +32 -0
- package/dist/deployment/dockerTeardown.js +61 -0
- package/dist/deployment/downDeployment.d.ts +39 -0
- package/dist/deployment/downDeployment.js +248 -0
- package/dist/deployment/downReceiptTypes.d.ts +36 -0
- package/dist/deployment/downReceiptTypes.js +45 -0
- package/dist/deployment/index.d.ts +20 -0
- package/dist/deployment/index.js +21 -0
- package/dist/deployment/lifecycleCompletion.d.ts +37 -0
- package/dist/deployment/lifecycleCompletion.js +236 -0
- package/dist/deployment/lifecycleCompletionContracts.d.ts +224 -0
- package/dist/deployment/lifecycleCompletionContracts.js +140 -0
- package/dist/deployment/lifecycleCompletionHeartbeat.d.ts +2 -0
- package/dist/deployment/lifecycleCompletionHeartbeat.js +50 -0
- package/dist/deployment/lifecycleCompletionLookup.d.ts +18 -0
- package/dist/deployment/lifecycleCompletionLookup.js +88 -0
- package/dist/deployment/lifecycleCompletionOwner.d.ts +8 -0
- package/dist/deployment/lifecycleCompletionOwner.js +31 -0
- package/dist/deployment/lifecycleCompletionParsing.d.ts +12 -0
- package/dist/deployment/lifecycleCompletionParsing.js +108 -0
- package/dist/deployment/lifecycleCompletionPaths.d.ts +12 -0
- package/dist/deployment/lifecycleCompletionPaths.js +19 -0
- package/dist/deployment/lifecycleCompletionPublication.d.ts +7 -0
- package/dist/deployment/lifecycleCompletionPublication.js +49 -0
- package/dist/deployment/lifecycleCompletionRecovery.d.ts +21 -0
- package/dist/deployment/lifecycleCompletionRecovery.js +56 -0
- package/dist/deployment/lifecycleCompletionRoot.d.ts +21 -0
- package/dist/deployment/lifecycleCompletionRoot.js +243 -0
- package/dist/deployment/lifecycleCompletionStore.d.ts +6 -0
- package/dist/deployment/lifecycleCompletionStore.js +151 -0
- 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.d.ts +17 -0
- package/dist/deployment/organizationHandoffAuthorityFsClient.js +187 -0
- package/dist/deployment/organizationHandoffAuthorityFsElection.d.ts +21 -0
- package/dist/deployment/organizationHandoffAuthorityFsElection.js +57 -0
- package/dist/deployment/organizationHandoffAuthorityFsWorker.d.ts +1 -0
- package/dist/deployment/organizationHandoffAuthorityFsWorker.js +431 -0
- package/dist/deployment/organizationHandoffAuthorityFsWorkerParent.fixture.d.ts +1 -0
- package/dist/deployment/organizationHandoffAuthorityFsWorkerParent.fixture.js +26 -0
- package/dist/deployment/organizationHandoffAuthorityFsWorkerStall.fixture.d.ts +1 -0
- package/dist/deployment/organizationHandoffAuthorityFsWorkerStall.fixture.js +16 -0
- package/dist/deployment/organizationHandoffAuthorityStore.d.ts +41 -0
- package/dist/deployment/organizationHandoffAuthorityStore.js +355 -0
- package/dist/deployment/organizationHandoffAuthorityTypes.d.ts +76 -0
- package/dist/deployment/organizationHandoffAuthorityTypes.js +149 -0
- package/dist/deployment/organizationHandoffTypes.d.ts +29 -0
- package/dist/deployment/organizationHandoffTypes.js +80 -0
- package/dist/deployment/organizationReady.d.ts +54 -0
- package/dist/deployment/organizationReady.js +232 -0
- package/dist/deployment/privateArtifactsExport.d.ts +18 -0
- package/dist/deployment/privateArtifactsExport.js +80 -0
- package/dist/deployment/productStateClone.d.ts +43 -0
- package/dist/deployment/productStateClone.js +319 -0
- package/dist/deployment/record.d.ts +26 -1
- package/dist/deployment/record.js +49 -4
- package/dist/deployment/target.d.ts +1 -35
- package/dist/deployment/target.js +1 -96
- package/dist/deployment/upLifecycleRecoveryState.d.ts +23 -0
- package/dist/deployment/upLifecycleRecoveryState.js +12 -0
- package/dist/deployment/upReceiptTypes.d.ts +137 -0
- package/dist/deployment/upReceiptTypes.js +191 -0
- 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 +24 -9
- package/dist/distribution/buildDistributionReport.d.ts +2 -1
- package/dist/distribution/buildDistributionReport.js +2 -1
- package/dist/distribution/consumeImage.d.ts +2 -0
- package/dist/distribution/consumeImage.js +98 -73
- package/dist/distribution/consumeImageDaimonDocker.d.ts +3 -0
- package/dist/distribution/consumeImageDaimonDocker.js +45 -0
- package/dist/distribution/consumeImageLifecycle.d.ts +17 -0
- package/dist/distribution/consumeImageLifecycle.js +231 -0
- package/dist/distribution/consumeImageSupport.d.ts +12 -0
- package/dist/distribution/consumeImageSupport.js +15 -0
- package/dist/distribution/distributionReportSchema.d.ts +16 -1
- package/dist/distribution/distributionReportSchema.js +21 -3
- 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 +3 -3
- package/dist/distribution/index.js +2 -2
- package/dist/distribution/preflight.js +5 -1
- package/dist/distribution/types.d.ts +21 -1
- package/dist/distribution/types.js +4 -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/io.d.ts +2 -0
- package/dist/filesystem/io.js +16 -1
- package/dist/filesystem/paths.js +10 -1
- package/dist/ledger/causalConformanceCli.d.ts +1 -0
- package/dist/ledger/causalConformanceCli.js +41 -0
- package/dist/ledger/causeNamespace.d.ts +8 -0
- package/dist/ledger/causeNamespace.js +24 -0
- package/dist/ledger/conformance.d.ts +83 -0
- package/dist/ledger/conformance.js +259 -0
- package/dist/ledger/emitters.d.ts +76 -0
- package/dist/ledger/emitters.js +188 -0
- package/dist/ledger/index.d.ts +4 -0
- package/dist/ledger/index.js +4 -0
- package/dist/ledger/principal.d.ts +96 -0
- package/dist/ledger/principal.js +121 -0
- package/dist/manifest/executionSchemas.d.ts +27 -0
- package/dist/manifest/executionSchemas.js +21 -2
- package/dist/manifest/externalParticipantSchemas.d.ts +18 -0
- package/dist/manifest/externalParticipantSchemas.js +17 -0
- package/dist/manifest/index.d.ts +1 -0
- package/dist/manifest/index.js +1 -0
- package/dist/manifest/inlineAgentMember.d.ts +2 -0
- package/dist/manifest/inlineAgentMember.js +9 -0
- package/dist/manifest/loadManifest.js +14 -8
- package/dist/manifest/mcpSchemas.d.ts +18 -0
- package/dist/manifest/mcpSchemas.js +44 -0
- package/dist/manifest/memorySchemas.d.ts +245 -0
- package/dist/manifest/memorySchemas.js +148 -0
- package/dist/manifest/renderSpawnfile.js +22 -131
- package/dist/manifest/renderSpawnfileNetworks.js +20 -2
- package/dist/manifest/renderSpawnfileSurfaces.d.ts +2 -0
- package/dist/manifest/renderSpawnfileSurfaces.js +134 -0
- package/dist/manifest/renderSpawnfileWorkspace.js +5 -0
- package/dist/manifest/scheduleSchemas.d.ts +3 -1
- package/dist/manifest/scheduleSchemas.js +91 -5
- package/dist/manifest/schemas.d.ts +2034 -40
- package/dist/manifest/schemas.js +82 -33
- package/dist/manifest/surfaceSchemas.d.ts +17 -0
- package/dist/manifest/surfaceSchemas.js +24 -1
- package/dist/manifest/teamNetworkAccessSchemas.d.ts +6 -2
- package/dist/manifest/teamNetworkAccessSchemas.js +11 -0
- package/dist/manifest/teamNetworkAuthSchemas.d.ts +48 -0
- package/dist/manifest/teamNetworkAuthSchemas.js +103 -0
- package/dist/manifest/teamNetworkSchemas.d.ts +25 -190
- package/dist/manifest/teamNetworkSchemas.js +21 -317
- package/dist/manifest/teamNetworkServerSchemas.d.ts +155 -0
- package/dist/manifest/teamNetworkServerSchemas.js +215 -0
- package/dist/manifest/workspaceSchemas.d.ts +16 -0
- package/dist/manifest/workspaceSchemas.js +11 -0
- package/dist/ownership/siblingBuildFreshness.d.ts +20 -0
- package/dist/ownership/siblingBuildFreshness.js +20 -0
- package/dist/report/types.d.ts +173 -1
- package/dist/runtime/common.d.ts +63 -1
- package/dist/runtime/common.js +88 -3
- package/dist/runtime/container.d.ts +28 -1
- package/dist/runtime/container.js +78 -29
- package/dist/runtime/containerPackageOverrides.d.ts +37 -0
- package/dist/runtime/containerPackageOverrides.js +33 -0
- package/dist/runtime/daimon/adapter.d.ts +14 -0
- package/dist/runtime/daimon/adapter.js +243 -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 +25 -0
- package/dist/runtime/daimon/config.js +272 -0
- package/dist/runtime/daimon/contractManifest.d.ts +295 -0
- package/dist/runtime/daimon/contractManifest.js +319 -0
- package/dist/runtime/daimon/grokModel.d.ts +19 -0
- package/dist/runtime/daimon/grokModel.js +33 -0
- package/dist/runtime/daimon/grokWorkerConfigBytes.d.ts +26 -0
- package/dist/runtime/daimon/grokWorkerConfigBytes.js +36 -0
- package/dist/runtime/daimon/grokWorkerContract.d.ts +22 -0
- package/dist/runtime/daimon/grokWorkerContract.js +48 -0
- package/dist/runtime/daimon/memory.d.ts +57 -0
- package/dist/runtime/daimon/memory.js +125 -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 +3 -0
- package/dist/runtime/daimon/scheduleAuthority.js +17 -0
- package/dist/runtime/index.d.ts +6 -0
- package/dist/runtime/index.js +6 -0
- package/dist/runtime/install.d.ts +3 -0
- package/dist/runtime/install.js +3 -0
- package/dist/runtime/localDaimonAuthority.d.ts +11 -0
- package/dist/runtime/localDaimonAuthority.js +77 -0
- package/dist/runtime/mnemeMcp.d.ts +28 -0
- package/dist/runtime/mnemeMcp.js +135 -0
- package/dist/runtime/openclaw/adapter.js +17 -6
- package/dist/runtime/openclaw/mcp.d.ts +10 -0
- package/dist/runtime/openclaw/mcp.js +69 -0
- package/dist/runtime/openclaw/runAuth.js +2 -2
- package/dist/runtime/openclaw/scaffold.js +1 -1
- package/dist/runtime/openclaw/schedules.d.ts +38 -0
- package/dist/runtime/openclaw/schedules.js +74 -0
- package/dist/runtime/pi/adapter.d.ts +1 -2
- package/dist/runtime/pi/adapter.js +87 -58
- package/dist/runtime/pi/appActivitySource.js +114 -2
- package/dist/runtime/pi/appAgentConfig.d.ts +11 -0
- package/dist/runtime/pi/appAgentConfig.js +264 -0
- package/dist/runtime/pi/appCliEnginesSource.d.ts +1 -0
- package/dist/runtime/pi/appCliEnginesSource.js +183 -0
- package/dist/runtime/pi/appCliSource.d.ts +1 -0
- package/dist/runtime/pi/appCliSource.js +353 -0
- package/dist/runtime/pi/appControlSource.d.ts +1 -0
- package/dist/runtime/pi/appControlSource.js +390 -0
- package/dist/runtime/pi/appControlWakeIdentitySource.d.ts +1 -0
- package/dist/runtime/pi/appControlWakeIdentitySource.js +19 -0
- package/dist/runtime/pi/appCoreSource.d.ts +4 -1
- package/dist/runtime/pi/appCoreSource.js +104 -214
- package/dist/runtime/pi/appPreludeSource.js +140 -52
- package/dist/runtime/pi/appScheduleSource.d.ts +1 -0
- package/dist/runtime/pi/appScheduleSource.js +84 -0
- package/dist/runtime/pi/appScriptedEngine.d.ts +31 -0
- package/dist/runtime/pi/appScriptedEngine.js +42 -0
- package/dist/runtime/pi/appSource.d.ts +4 -1
- package/dist/runtime/pi/appSource.js +6 -2
- package/dist/runtime/pi/appTemplate.d.ts +8 -22
- package/dist/runtime/pi/appTemplate.js +9 -126
- package/dist/runtime/pi/appTemplateTypes.d.ts +64 -0
- package/dist/runtime/pi/appTemplateTypes.js +18 -0
- package/dist/runtime/pi/appWakeContextSource.d.ts +1 -0
- package/dist/runtime/pi/appWakeContextSource.js +398 -0
- package/dist/runtime/pi/containerTargets.d.ts +4 -0
- package/dist/runtime/pi/containerTargets.js +57 -0
- package/dist/runtime/pi/runAuth.js +126 -9
- package/dist/runtime/pi/testHelpers.d.ts +2 -0
- package/dist/runtime/pi/testHelpers.js +40 -0
- package/dist/runtime/picoclaw/adapter.js +25 -29
- package/dist/runtime/picoclaw/mcp.d.ts +4 -0
- package/dist/runtime/picoclaw/mcp.js +43 -0
- package/dist/runtime/picoclaw/memory.d.ts +7 -0
- package/dist/runtime/picoclaw/memory.js +17 -0
- package/dist/runtime/picoclaw/runAuth.js +1 -1
- package/dist/runtime/picoclaw/scaffold.js +1 -1
- package/dist/runtime/picoclaw/schedules.d.ts +26 -0
- package/dist/runtime/picoclaw/schedules.js +62 -3
- package/dist/runtime/registry.d.ts +3 -0
- package/dist/runtime/registry.js +19 -2
- package/dist/runtime/scheduleUtils.d.ts +3 -0
- package/dist/runtime/scheduleUtils.js +19 -0
- package/dist/runtime/types.d.ts +50 -2
- package/dist/runtime/usageLedger.d.ts +158 -0
- package/dist/runtime/usageLedger.js +269 -0
- package/dist/runtime/usageLedgerRead.d.ts +48 -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/errors.d.ts +1 -1
- package/dist/shared/errors.js +2 -2
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.js +3 -0
- package/dist/shared/redaction.d.ts +2 -0
- package/dist/shared/redaction.js +10 -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/status/buildStatus.d.ts +1 -0
- package/dist/status/buildStatus.js +2 -0
- package/dist/status/compileReport.d.ts +22 -0
- package/dist/status/compileReport.js +16 -2
- package/dist/status/compiledProbeCollection.d.ts +21 -0
- package/dist/status/compiledProbeCollection.js +27 -0
- package/dist/status/imageStatusReport.js +6 -0
- package/dist/status/index.d.ts +3 -0
- package/dist/status/index.js +3 -0
- package/dist/status/lifecycleProbes.d.ts +19 -0
- package/dist/status/lifecycleProbes.js +174 -0
- package/dist/status/moltnetProbes.d.ts +7 -8
- package/dist/status/moltnetProbes.js +27 -198
- package/dist/status/moltnetWiringProbes.d.ts +19 -0
- package/dist/status/moltnetWiringProbes.js +178 -0
- package/dist/target/cleanupRun.d.ts +41 -0
- package/dist/target/cleanupRun.js +139 -0
- package/dist/target/cleanupRunDocker.d.ts +16 -0
- package/dist/target/cleanupRunDocker.js +66 -0
- package/dist/target/cleanupRunDockerPreflight.d.ts +17 -0
- package/dist/target/cleanupRunDockerPreflight.js +224 -0
- package/dist/target/composedPreparation.d.ts +205 -0
- package/dist/target/composedPreparation.js +223 -0
- package/dist/target/containerBundle.d.ts +82 -0
- package/dist/target/containerBundle.js +243 -0
- package/dist/target/containerBundleArchive.d.ts +31 -0
- package/dist/target/containerBundleArchive.js +140 -0
- package/dist/target/containerBundleAuthority.d.ts +25 -0
- package/dist/target/containerBundleAuthority.js +65 -0
- package/dist/target/containerBundleContracts.d.ts +114 -0
- package/dist/target/containerBundleContracts.js +173 -0
- package/dist/target/containerBundleFilesystemStore.d.ts +3 -0
- package/dist/target/containerBundleFilesystemStore.js +247 -0
- package/dist/target/containerBundlePolicy.d.ts +33 -0
- package/dist/target/containerBundlePolicy.js +64 -0
- package/dist/target/containerBundleStore.d.ts +127 -0
- package/dist/target/containerBundleStore.js +284 -0
- package/dist/target/contracts.d.ts +538 -0
- package/dist/target/contracts.js +373 -0
- package/dist/target/dockerArtifactIdentityTypes.d.ts +56 -0
- package/dist/target/dockerArtifactIdentityTypes.js +1 -0
- package/dist/target/dockerArtifactInspection.d.ts +40 -0
- package/dist/target/dockerArtifactInspection.js +125 -0
- package/dist/target/dockerArtifacts.d.ts +21 -0
- package/dist/target/dockerArtifacts.js +110 -0
- package/dist/target/dockerArtifactsProvider.d.ts +41 -0
- package/dist/target/dockerArtifactsProvider.js +476 -0
- package/dist/target/dockerBaseImage.d.ts +2 -0
- package/dist/target/dockerBaseImage.js +11 -0
- package/dist/target/dockerCommandExecutor.d.ts +38 -0
- package/dist/target/dockerCommandExecutor.js +251 -0
- package/dist/target/dockerCommandExecutorCore.d.ts +35 -0
- package/dist/target/dockerCommandExecutorCore.js +275 -0
- package/dist/target/dockerContainerBundleBuilder.d.ts +8 -0
- package/dist/target/dockerContainerBundleBuilder.js +256 -0
- package/dist/target/dockerContextSnapshot.d.ts +21 -0
- package/dist/target/dockerContextSnapshot.js +158 -0
- package/dist/target/dockerEndpointFingerprint.d.ts +1 -0
- package/dist/target/dockerEndpointFingerprint.js +9 -0
- package/dist/target/dockerPreparedArtifact.d.ts +48 -0
- package/dist/target/dockerPreparedArtifact.js +131 -0
- package/dist/target/dockerProjectionJson.d.ts +1 -0
- package/dist/target/dockerProjectionJson.js +80 -0
- package/dist/target/dockerPublicArtifactSnapshot.d.ts +17 -0
- package/dist/target/dockerPublicArtifactSnapshot.js +83 -0
- package/dist/target/dockerResources.d.ts +26 -0
- package/dist/target/dockerResources.js +162 -0
- package/dist/target/dockerResourcesProvider.d.ts +44 -0
- package/dist/target/dockerResourcesProvider.js +207 -0
- package/dist/target/dockerSecrets.d.ts +39 -0
- package/dist/target/dockerSecrets.js +249 -0
- package/dist/target/dockerSecretsAuthority.d.ts +26 -0
- package/dist/target/dockerSecretsAuthority.js +216 -0
- package/dist/target/dockerSecretsLifecycle.d.ts +25 -0
- package/dist/target/dockerSecretsLifecycle.js +133 -0
- package/dist/target/dockerSecretsProvider.d.ts +68 -0
- package/dist/target/dockerSecretsProvider.js +329 -0
- package/dist/target/dockerTarget.d.ts +53 -0
- package/dist/target/dockerTarget.js +48 -0
- package/dist/target/dockerTargetBinding.d.ts +13 -0
- package/dist/target/dockerTargetBinding.js +95 -0
- package/dist/target/dockerTargetExecFile.d.ts +19 -0
- package/dist/target/dockerTargetExecFile.js +194 -0
- package/dist/target/dockerWorldClock.d.ts +17 -0
- package/dist/target/dockerWorldClock.js +111 -0
- package/dist/target/dockerWorldReadiness.d.ts +17 -0
- package/dist/target/dockerWorldReadiness.js +119 -0
- package/dist/target/dockerWorldService.d.ts +23 -0
- package/dist/target/dockerWorldService.js +216 -0
- package/dist/target/dockerWorldServiceAuthority.d.ts +80 -0
- package/dist/target/dockerWorldServiceAuthority.js +182 -0
- package/dist/target/dockerWorldServiceLifecycle.d.ts +41 -0
- package/dist/target/dockerWorldServiceLifecycle.js +275 -0
- package/dist/target/dockerWorldServiceProvider.d.ts +64 -0
- package/dist/target/dockerWorldServiceProvider.js +330 -0
- package/dist/target/dockerWorldServiceStore.d.ts +73 -0
- package/dist/target/dockerWorldServiceStore.js +367 -0
- package/dist/target/evidenceExport.d.ts +57 -0
- package/dist/target/evidenceExport.js +527 -0
- package/dist/target/evidenceExportArchive.d.ts +10 -0
- package/dist/target/evidenceExportArchive.js +302 -0
- package/dist/target/evidenceExportContract.d.ts +27 -0
- package/dist/target/evidenceExportContract.js +40 -0
- package/dist/target/evidenceExportOperationsTestKit.d.ts +87 -0
- package/dist/target/evidenceExportOperationsTestKit.js +312 -0
- package/dist/target/evidenceExportProvider.d.ts +87 -0
- package/dist/target/evidenceExportProvider.js +197 -0
- package/dist/target/evidenceExportPublicationTypes.d.ts +16 -0
- package/dist/target/evidenceExportPublicationTypes.js +1 -0
- package/dist/target/evidenceExportStore.d.ts +70 -0
- package/dist/target/evidenceExportStore.js +498 -0
- package/dist/target/evidenceExportStorePublication.d.ts +7 -0
- package/dist/target/evidenceExportStorePublication.js +395 -0
- package/dist/target/handles.d.ts +20 -0
- package/dist/target/handles.js +56 -0
- package/dist/target/index.d.ts +12 -0
- package/dist/target/index.js +11 -0
- package/dist/target/journal.d.ts +59 -0
- package/dist/target/journal.js +529 -0
- package/dist/target/journalFilesystem.d.ts +3 -0
- package/dist/target/journalFilesystem.js +111 -0
- package/dist/target/journalRoot.d.ts +4 -0
- package/dist/target/journalRoot.js +6 -0
- package/dist/target/organizationAttachment.d.ts +23 -0
- package/dist/target/organizationAttachment.js +263 -0
- package/dist/target/organizationAttachmentAuthority.d.ts +65 -0
- package/dist/target/organizationAttachmentAuthority.js +161 -0
- package/dist/target/organizationAttachmentLifecycle.d.ts +17 -0
- package/dist/target/organizationAttachmentLifecycle.js +101 -0
- package/dist/target/organizationAttachmentProvider.d.ts +76 -0
- package/dist/target/organizationAttachmentProvider.js +289 -0
- package/dist/target/organizationAttachmentStore.d.ts +51 -0
- package/dist/target/organizationAttachmentStore.js +316 -0
- package/dist/target/publicArtifactSnapshot.d.ts +72 -0
- package/dist/target/publicArtifactSnapshot.js +184 -0
- package/dist/target/topologyActivation.d.ts +51 -0
- package/dist/target/topologyActivation.js +149 -0
- package/dist/target/topologyAttestation.d.ts +37 -0
- package/dist/target/topologyAttestation.js +300 -0
- package/dist/target/topologyAttestationErrors.d.ts +1 -0
- package/dist/target/topologyAttestationErrors.js +1 -0
- package/dist/target/worldClock.d.ts +60 -0
- package/dist/target/worldClock.js +129 -0
- package/dist/target/worldReadiness.d.ts +103 -0
- package/dist/target/worldReadiness.js +153 -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 +21 -0
- package/package.json +57 -14
- package/runtimes.yaml +11 -23
- package/dist/runtime/openclaw/scaffold-assets/CLAUDE.md +0 -5
- package/dist/runtime/picoclaw/scaffold-assets/CLAUDE.md +0 -5
- /package/dist/runtime/openclaw/scaffold-assets/{AGENTS.md → WORKSPACE_AGENTS.md} +0 -0
- /package/dist/runtime/picoclaw/scaffold-assets/{AGENTS.md → WORKSPACE_AGENTS.md} +0 -0
|
@@ -1,113 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { resolveNoopolisRunId } from "../runtime/index.js";
|
|
2
|
+
import { createExclusiveReattachVolumeName, SpawnfileError } from "../shared/index.js";
|
|
3
|
+
import { createMoltnetCausalDirectory, createMoltnetDaimonReceiptStorePath, createMoltnetNetworkStateDirectory, createMoltnetServerConfigPath, createMoltnetOpenTokenDirectory, createMoltnetNativeServerConfig, createMoltnetNodeConfigPath, resolveMoltnetClientAuth, resolveMoltnetStorePersistenceMountPath } from "./moltnetConfigLowering.js";
|
|
3
4
|
import { assertNetworkBindingEnvUniqueness } from "./networkBinding.js";
|
|
4
|
-
import { listConcreteMoltnetRoomMemberIds } from "./moltnetRoomMemberships.js";
|
|
5
|
-
import { assertCompatibleMoltnetNetworkName, assertCompatibleMoltnetRoomPolicy, assertCompatibleMoltnetServer } from "./moltnetRoomPolicyCompatibility.js";
|
|
6
5
|
import { createMoltnetNodeConfigContent } from "./moltnetNodeConfig.js";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import { createPersistentVolumeName, isNetworkHttpEnabled, toContainerRootfsPath } from "./moltnetArtifactPaths.js";
|
|
7
|
+
import { createMoltnetExternalParticipantArtifactFiles } from "./moltnetExternalParticipantArtifact.js";
|
|
8
|
+
import { resolveMoltnetServerPlans } from "./moltnetServerPlans.js";
|
|
10
9
|
const createServerKey = (networkId) => networkId;
|
|
11
|
-
const
|
|
12
|
-
const createPersistentVolumeName = (planRoot, id, explicitName) => {
|
|
13
|
-
if (explicitName && explicitName.trim().length > 0) {
|
|
14
|
-
return explicitName.trim();
|
|
15
|
-
}
|
|
16
|
-
const project = truncateSegment(slugify(planRoot.split("/").slice(-2, -1)[0] ?? "project") || "project", 32);
|
|
17
|
-
const suffix = truncateSegment(slugify(id) || "state", 48);
|
|
18
|
-
return `spawnfile-${project}-${suffix}-${createShortHash(`${planRoot}:${id}`)}`;
|
|
19
|
-
};
|
|
20
|
-
const toContainerRootfsPath = (rootfsPath) => `/${rootfsPath.replace(`${ROOTFS_PREFIX}/`, "")}`;
|
|
21
|
-
const isNetworkHttpEnabled = (network) => network.server?.mode === "managed" && network.server.human_ingress === true;
|
|
22
|
-
const resolveNetworkPort = (network, fallbackPort) => network.server?.mode === "managed" ? network.server.listen.port : fallbackPort;
|
|
23
|
-
export const generateMoltnetArtifacts = async (plan) => {
|
|
10
|
+
export const generateMoltnetArtifacts = async (plan, deploymentLineage = "compile") => {
|
|
24
11
|
const teamNodes = plan.nodes
|
|
25
12
|
.filter((node) => node.kind === "team")
|
|
26
13
|
.filter((node) => (node.value.networks?.length ?? 0) > 0);
|
|
27
14
|
if (teamNodes.length === 0) {
|
|
28
15
|
return null;
|
|
29
16
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (existingRoom) {
|
|
50
|
-
existingRoom.members = [
|
|
51
|
-
...new Set([...existingRoom.members, ...concreteMembers])
|
|
52
|
-
].sort();
|
|
53
|
-
assertCompatibleMoltnetRoomPolicy(network.id, room.id, "visibility", existingRoom.visibility, room.visibility);
|
|
54
|
-
assertCompatibleMoltnetRoomPolicy(network.id, room.id, "write_policy", existingRoom.write_policy, room.write_policy);
|
|
55
|
-
existingRoom.visibility ??= room.visibility;
|
|
56
|
-
existingRoom.write_policy ??= room.write_policy;
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
existingPlan.rooms.push({
|
|
60
|
-
id: room.id,
|
|
61
|
-
members: concreteMembers,
|
|
62
|
-
...(room.name ? { name: room.name } : {}),
|
|
63
|
-
...(room.visibility ? { visibility: room.visibility } : {}),
|
|
64
|
-
...(room.write_policy ? { write_policy: room.write_policy } : {})
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
existingPlan.rooms.sort((left, right) => left.id.localeCompare(right.id));
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
const port = server.mode === "managed" ? resolveNetworkPort(network, nextPort) : undefined;
|
|
72
|
-
const serverId = `${teamNode.slug}-${network.id}`;
|
|
73
|
-
serverPlans.set(serverKey, {
|
|
74
|
-
baseUrl: resolveMoltnetBaseUrl(server),
|
|
75
|
-
...(server.mode === "managed"
|
|
76
|
-
? { configPath: toContainerRootfsPath(createMoltnetServerConfigPath(serverId)) }
|
|
77
|
-
: {}),
|
|
78
|
-
id: serverId,
|
|
79
|
-
mode: server.mode,
|
|
80
|
-
name: network.name,
|
|
81
|
-
networkId: network.id,
|
|
82
|
-
...(port ? { port } : {}),
|
|
83
|
-
rooms: network.rooms.map((room) => ({
|
|
84
|
-
id: room.id,
|
|
85
|
-
members: listConcreteMoltnetRoomMemberIds(plan, teamNode.value, network.id, room),
|
|
86
|
-
...(room.name ? { name: room.name } : {}),
|
|
87
|
-
...(room.visibility ? { visibility: room.visibility } : {}),
|
|
88
|
-
...(room.write_policy ? { write_policy: room.write_policy } : {})
|
|
89
|
-
})),
|
|
90
|
-
server,
|
|
91
|
-
secretPatches: [],
|
|
92
|
-
teamSource: teamNode.value.source
|
|
93
|
-
});
|
|
94
|
-
if (port) {
|
|
95
|
-
nextPort = Math.max(nextPort, port + 1);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
17
|
+
// Run-scoping key for the RUN-SCOPED mounts derived below — the causal
|
|
18
|
+
// event log and per-network Moltnet runtime state (see
|
|
19
|
+
// createPersistentVolumeName's doc comment). Read once per compile so every
|
|
20
|
+
// such mount in this compile agrees on the same value. Durable stores and
|
|
21
|
+
// token directories deliberately do NOT use it; see durableVolumeName.
|
|
22
|
+
const runId = resolveNoopolisRunId(process.env);
|
|
23
|
+
/**
|
|
24
|
+
* Deployment-stable name for state that must be REATTACHED across a
|
|
25
|
+
* redeploy, never recreated empty: durable Moltnet `sqlite`/`json` stores
|
|
26
|
+
* and the open-mode agent token directories. An author-declared name
|
|
27
|
+
* (`server.store.persistence.name`) is honoured verbatim so an operator can
|
|
28
|
+
* pre-create or migrate the volume under that exact name; otherwise the
|
|
29
|
+
* name comes from the plan root plus the deployment lineage, exactly as
|
|
30
|
+
* durable memory banks are named (`memoryArtifacts.ts`'s
|
|
31
|
+
* `durableMemoryVolumeName`).
|
|
32
|
+
*/
|
|
33
|
+
const durableVolumeName = (mountId, declaredName) => declaredName?.trim()
|
|
34
|
+
|| createExclusiveReattachVolumeName(`${plan.root}\0${deploymentLineage}`, mountId);
|
|
35
|
+
const serverPlans = resolveMoltnetServerPlans(plan, teamNodes);
|
|
100
36
|
const nodePlans = [];
|
|
101
37
|
const nodePlanKeys = new Set();
|
|
102
38
|
const configFiles = [];
|
|
103
39
|
const persistentMounts = new Map();
|
|
40
|
+
const external = createMoltnetExternalParticipantArtifactFiles(plan.moltnetExternalParticipantIntents ?? []);
|
|
41
|
+
const receiptStoreOwners = new Map();
|
|
42
|
+
configFiles.push(...external.files);
|
|
104
43
|
const addPersistentMount = (mount) => {
|
|
105
44
|
const existing = persistentMounts.get(mount.id);
|
|
106
45
|
if (!existing) {
|
|
107
46
|
persistentMounts.set(mount.id, mount);
|
|
108
47
|
return;
|
|
109
48
|
}
|
|
110
|
-
if (existing.mountPath !== mount.mountPath ||
|
|
49
|
+
if (existing.mountPath !== mount.mountPath ||
|
|
50
|
+
existing.volumeName !== mount.volumeName ||
|
|
51
|
+
existing.lifecycle !== mount.lifecycle ||
|
|
52
|
+
existing.declaredVolumeName !== mount.declaredVolumeName) {
|
|
111
53
|
throw new SpawnfileError("validation_error", `Moltnet persistent mount ${mount.id} resolves to conflicting targets`);
|
|
112
54
|
}
|
|
113
55
|
};
|
|
@@ -127,18 +69,34 @@ export const generateMoltnetArtifacts = async (plan) => {
|
|
|
127
69
|
mode: 0o600,
|
|
128
70
|
path: createMoltnetServerConfigPath(serverPlan.id)
|
|
129
71
|
});
|
|
72
|
+
// Always mounted, independent of the network's store.kind/persistence:
|
|
73
|
+
// this is the causal/social record (message.accepted/message.denied
|
|
74
|
+
// events), the A5/memetics ground truth for what happened in a run, and
|
|
75
|
+
// it must survive container teardown even for a purely in-memory
|
|
76
|
+
// (non-durable) room store — e.g. office-sim's fixture. Lives in its own
|
|
77
|
+
// `causal/` subdirectory, never the server config's own directory, so
|
|
78
|
+
// this volume never shadows a rebuilt image's Moltnet.json.
|
|
79
|
+
const causalMountId = `moltnet-${serverPlan.networkId}-causal`;
|
|
80
|
+
addPersistentMount({
|
|
81
|
+
id: causalMountId,
|
|
82
|
+
mountPath: createMoltnetCausalDirectory(serverPlan.configPath),
|
|
83
|
+
reason: `managed Moltnet causal event log for ${serverPlan.networkId}`,
|
|
84
|
+
volumeName: createPersistentVolumeName(plan.root, causalMountId, runId)
|
|
85
|
+
});
|
|
130
86
|
const storeMountPath = resolveMoltnetStorePersistenceMountPath(serverPlan.networkId, serverPlan.server.store);
|
|
131
87
|
if (storeMountPath) {
|
|
132
88
|
const mountId = `moltnet-${serverPlan.networkId}-store`;
|
|
133
89
|
const store = serverPlan.server.store;
|
|
134
|
-
const
|
|
90
|
+
const explicitVolumeName = store.kind === "sqlite" || store.kind === "json"
|
|
135
91
|
? store.persistence?.name
|
|
136
92
|
: undefined;
|
|
137
93
|
addPersistentMount({
|
|
94
|
+
...(explicitVolumeName?.trim() ? { declaredVolumeName: explicitVolumeName.trim() } : {}),
|
|
138
95
|
id: mountId,
|
|
96
|
+
lifecycle: "exclusive-reattach",
|
|
139
97
|
mountPath: storeMountPath,
|
|
140
98
|
reason: `managed Moltnet ${serverPlan.server.store.kind} store for ${serverPlan.networkId}`,
|
|
141
|
-
volumeName:
|
|
99
|
+
volumeName: durableVolumeName(mountId, explicitVolumeName)
|
|
142
100
|
});
|
|
143
101
|
}
|
|
144
102
|
}
|
|
@@ -166,20 +124,36 @@ export const generateMoltnetArtifacts = async (plan) => {
|
|
|
166
124
|
if (!network) {
|
|
167
125
|
throw new SpawnfileError("validation_error", `Unable to find Moltnet network ${attachment.network} for ${agentNode.name}`);
|
|
168
126
|
}
|
|
169
|
-
if (
|
|
127
|
+
if (serverPlan.server.mode === "managed" &&
|
|
128
|
+
serverPlan.server.direct_messages === false &&
|
|
129
|
+
attachment.dms) {
|
|
170
130
|
throw new SpawnfileError("validation_error", `Moltnet network ${attachment.network} disables direct messages but ${agentNode.name} declares dms`);
|
|
171
131
|
}
|
|
172
|
-
if (!network.server) {
|
|
173
|
-
throw new SpawnfileError("validation_error", `Moltnet network ${attachment.network} must declare server`);
|
|
174
|
-
}
|
|
175
132
|
const configPath = createMoltnetNodeConfigPath(teamNode.slug, attachment.network, attachment.memberId);
|
|
133
|
+
const receiptStorePath = agentNode.runtime.name === "daimon"
|
|
134
|
+
? createMoltnetDaimonReceiptStorePath(attachment.network, attachment.memberId)
|
|
135
|
+
: undefined;
|
|
136
|
+
if (receiptStorePath) {
|
|
137
|
+
const owner = `${attachment.network}\u0000${attachment.memberId}`;
|
|
138
|
+
const existingOwner = receiptStoreOwners.get(receiptStorePath);
|
|
139
|
+
if (existingOwner !== undefined && existingOwner !== owner) {
|
|
140
|
+
throw new SpawnfileError("validation_error", "Daimon receipt-store paths collide");
|
|
141
|
+
}
|
|
142
|
+
receiptStoreOwners.set(receiptStorePath, owner);
|
|
143
|
+
const networkRoot = createMoltnetNetworkStateDirectory(attachment.network);
|
|
144
|
+
const covered = [...persistentMounts.values()].some((mount) => networkRoot === mount.mountPath || networkRoot.startsWith(`${mount.mountPath}/`));
|
|
145
|
+
if (!covered) {
|
|
146
|
+
const mountId = `moltnet-${attachment.network}-runtime-state`;
|
|
147
|
+
addPersistentMount({ id: mountId, mountPath: networkRoot, reason: `Moltnet runtime state for ${attachment.network}`, volumeName: createPersistentVolumeName(plan.root, mountId, runId) });
|
|
148
|
+
}
|
|
149
|
+
}
|
|
176
150
|
const nodePlanKey = `${attachment.network}::${attachment.memberId}`;
|
|
177
151
|
if (nodePlanKeys.has(nodePlanKey)) {
|
|
178
152
|
throw new SpawnfileError("validation_error", `Duplicate Moltnet node attachment for ${attachment.network}/${attachment.memberId}`);
|
|
179
153
|
}
|
|
180
154
|
nodePlanKeys.add(nodePlanKey);
|
|
181
155
|
if (agentNode.runtime.name === "pi") {
|
|
182
|
-
const clientAuth = resolveMoltnetClientAuth(serverPlan.server, attachment.network, attachment.memberId, node.slug);
|
|
156
|
+
const clientAuth = resolveMoltnetClientAuth(serverPlan.server, attachment.network, attachment.memberId, node.slug, attachment.auth?.tokenId);
|
|
183
157
|
const usesPerAttachmentOpenToken = clientAuth.mode === "open" &&
|
|
184
158
|
clientAuth.staticToken !== true &&
|
|
185
159
|
Boolean(clientAuth.tokenEnv || clientAuth.tokenPath);
|
|
@@ -187,9 +161,10 @@ export const generateMoltnetArtifacts = async (plan) => {
|
|
|
187
161
|
const mountId = `agent-${node.slug}-moltnet-tokens`;
|
|
188
162
|
addPersistentMount({
|
|
189
163
|
id: mountId,
|
|
164
|
+
lifecycle: "exclusive-reattach",
|
|
190
165
|
mountPath: createMoltnetOpenTokenDirectory(node.slug),
|
|
191
166
|
reason: `Moltnet open-mode generated agent tokens for ${agentNode.name}`,
|
|
192
|
-
volumeName:
|
|
167
|
+
volumeName: durableVolumeName(mountId)
|
|
193
168
|
});
|
|
194
169
|
}
|
|
195
170
|
}
|
|
@@ -206,9 +181,10 @@ export const generateMoltnetArtifacts = async (plan) => {
|
|
|
206
181
|
const mountId = `agent-${node.slug}-moltnet-tokens`;
|
|
207
182
|
addPersistentMount({
|
|
208
183
|
id: mountId,
|
|
184
|
+
lifecycle: "exclusive-reattach",
|
|
209
185
|
mountPath: createMoltnetOpenTokenDirectory(node.slug),
|
|
210
186
|
reason: `Moltnet open-mode generated agent tokens for ${agentNode.name}`,
|
|
211
|
-
volumeName:
|
|
187
|
+
volumeName: durableVolumeName(mountId)
|
|
212
188
|
});
|
|
213
189
|
}
|
|
214
190
|
configFiles.push({
|
|
@@ -218,7 +194,14 @@ export const generateMoltnetArtifacts = async (plan) => {
|
|
|
218
194
|
});
|
|
219
195
|
nodePlans.push({
|
|
220
196
|
configPath: toContainerRootfsPath(configPath),
|
|
221
|
-
|
|
197
|
+
...(clientAuth.credentialAgentId
|
|
198
|
+
? { credentialAgentId: clientAuth.credentialAgentId }
|
|
199
|
+
: {}),
|
|
200
|
+
...(clientAuth.credentialId ? { credentialId: clientAuth.credentialId } : {}),
|
|
201
|
+
...(clientAuth.tokenEnv ? { credentialSecret: clientAuth.tokenEnv } : {}),
|
|
202
|
+
memberId: attachment.memberId,
|
|
203
|
+
networkId: attachment.network,
|
|
204
|
+
...(receiptStorePath ? { receiptStorePath } : {})
|
|
222
205
|
});
|
|
223
206
|
}
|
|
224
207
|
}
|
|
@@ -229,6 +212,9 @@ export const generateMoltnetArtifacts = async (plan) => {
|
|
|
229
212
|
})));
|
|
230
213
|
return {
|
|
231
214
|
files: configFiles,
|
|
215
|
+
...(external.artifacts.length > 0
|
|
216
|
+
? { externalParticipantArtifacts: external.artifacts }
|
|
217
|
+
: {}),
|
|
232
218
|
nodePlans: nodePlans.sort((left, right) => left.configPath.localeCompare(right.configPath)),
|
|
233
219
|
persistentMounts: [...persistentMounts.values()].sort((left, right) => left.id.localeCompare(right.id)),
|
|
234
220
|
ports: [...new Set(managedServerPlans.map((serverPlan) => serverPlan.port).filter((port) => port !== undefined))].sort((left, right) => left - right),
|
|
@@ -1,7 +1,36 @@
|
|
|
1
|
+
import { type MoltnetBridgeCapabilities, type MoltnetTargetArchitecture } from "./moltnetReleaseAuthority.js";
|
|
2
|
+
import { type MoltnetExecutionHost, type LocalMoltnetReleaseIdentity } from "./localMoltnetAuthority.js";
|
|
3
|
+
/** Explicit operator override for a locally staged, authority-bound release. */
|
|
4
|
+
export declare const MOLTNET_RELEASE_DIR_ENV = "SPAWNFILE_MOLTNET_RELEASE_DIR";
|
|
5
|
+
/** Explicit development-only local archive authority; never consulted by production compiles. */
|
|
6
|
+
export declare const MOLTNET_LOCAL_RELEASE_DIR_ENV = "SPAWNFILE_LOCAL_MOLTNET_RELEASE_DIR";
|
|
7
|
+
export declare const MOLTNET_ALLOW_LOCAL_E2E_ENV = "SPAWNFILE_ALLOW_LOCAL_E2E";
|
|
1
8
|
export declare const MOLTNET_BIN_DIRECTORY = "moltnet-bin";
|
|
2
9
|
export declare const MOLTNET_BINARY_NAMES: readonly ["moltnet"];
|
|
3
|
-
export
|
|
10
|
+
export declare const MOLTNET_RELEASE_IDENTITY_VERSION: "spawnfile.moltnet-release-identity.v1";
|
|
11
|
+
export declare const MOLTNET_RELEASE_STAMP_VERSION: "spawnfile.moltnet-release-stamp.v1";
|
|
12
|
+
export type { MoltnetTargetArchitecture } from "./moltnetReleaseAuthority.js";
|
|
13
|
+
/** Re-exported so existing importers keep one shape; defined in the lowest layer. */
|
|
14
|
+
export type { MoltnetBridgeCapabilities } from "./moltnetReleaseAuthority.js";
|
|
15
|
+
interface MoltnetIdentityBase {
|
|
16
|
+
readonly architecture: MoltnetTargetArchitecture;
|
|
17
|
+
readonly asset: string;
|
|
18
|
+
readonly asset_sha256: `sha256:${string}`;
|
|
19
|
+
readonly capabilities: MoltnetBridgeCapabilities;
|
|
20
|
+
readonly version: typeof MOLTNET_RELEASE_IDENTITY_VERSION;
|
|
21
|
+
}
|
|
22
|
+
export interface PublishedMoltnetReleaseIdentity extends MoltnetIdentityBase {
|
|
23
|
+
readonly capabilities: MoltnetBridgeCapabilities;
|
|
24
|
+
readonly release_version: string;
|
|
25
|
+
readonly source_revision: string;
|
|
26
|
+
}
|
|
27
|
+
export type MoltnetReleaseIdentity = PublishedMoltnetReleaseIdentity | LocalMoltnetReleaseIdentity;
|
|
28
|
+
export interface MoltnetBinaryStageOptions {
|
|
29
|
+
readonly architecture?: MoltnetTargetArchitecture;
|
|
30
|
+
/** Overrides the detected execution host for the local-build capability probe. Tests only. */
|
|
31
|
+
readonly executionHost?: MoltnetExecutionHost;
|
|
32
|
+
/** Explicit local source directory; bytes remain bound to trusted authority. */
|
|
33
|
+
readonly releaseDirectory?: string;
|
|
34
|
+
}
|
|
4
35
|
export declare const resolveMoltnetCliCommand: () => Promise<string>;
|
|
5
|
-
export declare const stageMoltnetBinaries: (outputDirectory: string, options?:
|
|
6
|
-
architecture?: MoltnetTargetArchitecture;
|
|
7
|
-
}) => Promise<boolean>;
|
|
36
|
+
export declare const stageMoltnetBinaries: (outputDirectory: string, options?: MoltnetBinaryStageOptions) => Promise<MoltnetReleaseIdentity>;
|
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
import { execFile as execFileCallback } from "node:child_process";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
2
3
|
import path from "node:path";
|
|
3
|
-
import { chmod } from "node:fs/promises";
|
|
4
|
+
import { chmod, readFile } from "node:fs/promises";
|
|
4
5
|
import { promisify } from "node:util";
|
|
5
6
|
import { ensureDirectory, fileExists } from "../filesystem/index.js";
|
|
6
7
|
import { SpawnfileError } from "../shared/index.js";
|
|
8
|
+
import { parseMoltnetBridgeCapabilities, parseTrustedMoltnetReleaseAuthority, readTrustedMoltnetReleaseAuthority, trustedMoltnetReleaseAsset } from "./moltnetReleaseAuthority.js";
|
|
9
|
+
import { downloadTrustedMoltnetReleaseAsset } from "./moltnetReleaseDownload.js";
|
|
10
|
+
import { readLocalMoltnetReleaseIdentity } from "./localMoltnetAuthority.js";
|
|
7
11
|
const execFile = promisify(execFileCallback);
|
|
8
12
|
const MOLTNET_CLI_ENV = "SPAWNFILE_MOLTNET_CLI";
|
|
9
|
-
|
|
13
|
+
/** Explicit operator override for a locally staged, authority-bound release. */
|
|
14
|
+
export const MOLTNET_RELEASE_DIR_ENV = "SPAWNFILE_MOLTNET_RELEASE_DIR";
|
|
15
|
+
/** Explicit development-only local archive authority; never consulted by production compiles. */
|
|
16
|
+
export const MOLTNET_LOCAL_RELEASE_DIR_ENV = "SPAWNFILE_LOCAL_MOLTNET_RELEASE_DIR";
|
|
17
|
+
export const MOLTNET_ALLOW_LOCAL_E2E_ENV = "SPAWNFILE_ALLOW_LOCAL_E2E";
|
|
10
18
|
const MOLTNET_TARGET_ARCH_ENV = "SPAWNFILE_MOLTNET_TARGET_ARCH";
|
|
11
|
-
const LOCAL_MOLTNET_CLI_PATH = path.resolve(process.cwd(), "moltnet", "bin", "moltnet");
|
|
12
19
|
const MOLTNET_TARGET_OS = "linux";
|
|
13
20
|
export const MOLTNET_BIN_DIRECTORY = "moltnet-bin";
|
|
14
21
|
export const MOLTNET_BINARY_NAMES = ["moltnet"];
|
|
22
|
+
export const MOLTNET_RELEASE_IDENTITY_VERSION = "spawnfile.moltnet-release-identity.v1";
|
|
23
|
+
export const MOLTNET_RELEASE_STAMP_VERSION = "spawnfile.moltnet-release-stamp.v1";
|
|
24
|
+
const SHA256 = /^[a-f0-9]{64}$/u;
|
|
25
|
+
const REVISION = /^[a-f0-9]{40}$/u;
|
|
26
|
+
const PINNED_VERSION = /^v?\d+\.\d+\.\d+(?:-\d+-g[a-f0-9]{7,40})?$/u;
|
|
15
27
|
const normalizeTargetArchitecture = (architecture) => {
|
|
16
28
|
switch (architecture) {
|
|
17
29
|
case "amd64":
|
|
@@ -42,7 +54,120 @@ const resolveTargetArchitecture = (architecture) => {
|
|
|
42
54
|
throw new SpawnfileError("compile_error", `Moltnet container installs do not support host architecture ${process.arch}`);
|
|
43
55
|
}
|
|
44
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* The platform executing this compile, for the local-build capability probe.
|
|
59
|
+
*
|
|
60
|
+
* Deliberately NOT `resolveTargetArchitecture()`: that helper honours the
|
|
61
|
+
* `SPAWNFILE_MOLTNET_TARGET_ARCH` build-target override and falls back to
|
|
62
|
+
* `process.arch`, so passing it as the host made the host and the target the
|
|
63
|
+
* same value by construction and pinned the probe to its direct-exec branch.
|
|
64
|
+
* This reads the real host only, and reports `architecture: undefined` for a
|
|
65
|
+
* CPU that is not a nameable Moltnet target rather than throwing -- an
|
|
66
|
+
* unsupported host is not a compile error, it just cannot exec the binary
|
|
67
|
+
* directly.
|
|
68
|
+
*
|
|
69
|
+
* Private: this module's export surface is pinned by test.
|
|
70
|
+
*/
|
|
71
|
+
const resolveMoltnetExecutionHost = () => ({
|
|
72
|
+
...(process.arch === "arm64"
|
|
73
|
+
? { architecture: "arm64" }
|
|
74
|
+
: process.arch === "x64" ? { architecture: "amd64" } : {}),
|
|
75
|
+
platform: process.platform
|
|
76
|
+
});
|
|
45
77
|
const createReleaseAssetName = (architecture) => `moltnet_${MOLTNET_TARGET_OS}_${architecture}.tar.gz`;
|
|
78
|
+
const createReleaseStampName = (architecture) => `moltnet_release_stamp_${architecture}.json`;
|
|
79
|
+
const exactKeys = (value, keys) => Object.keys(value).sort().join("\0") === [...keys].sort().join("\0");
|
|
80
|
+
const parseReleaseStamp = (raw, architecture) => {
|
|
81
|
+
let parsed;
|
|
82
|
+
try {
|
|
83
|
+
parsed = JSON.parse(raw);
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
throw new SpawnfileError("compile_error", "Moltnet release capability stamp is not valid JSON");
|
|
87
|
+
}
|
|
88
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
89
|
+
throw new SpawnfileError("compile_error", "Moltnet release capability stamp has an invalid shape");
|
|
90
|
+
}
|
|
91
|
+
const value = parsed;
|
|
92
|
+
const expectedKeys = [
|
|
93
|
+
"arch", "asset", "built_at", "capabilities", "pi_bridge", "sha256",
|
|
94
|
+
"source_revision", "stamp_version", "version"
|
|
95
|
+
];
|
|
96
|
+
const capabilities = value.capabilities;
|
|
97
|
+
if (!exactKeys(value, expectedKeys)
|
|
98
|
+
|| value.stamp_version !== MOLTNET_RELEASE_STAMP_VERSION
|
|
99
|
+
|| value.arch !== architecture
|
|
100
|
+
|| value.asset !== createReleaseAssetName(architecture)
|
|
101
|
+
|| typeof value.built_at !== "string"
|
|
102
|
+
|| !Number.isFinite(Date.parse(value.built_at))
|
|
103
|
+
|| parseMoltnetBridgeCapabilities(capabilities) === null
|
|
104
|
+
|| value.pi_bridge !== true
|
|
105
|
+
|| typeof value.sha256 !== "string"
|
|
106
|
+
|| !SHA256.test(value.sha256)
|
|
107
|
+
|| typeof value.source_revision !== "string"
|
|
108
|
+
|| !REVISION.test(value.source_revision)
|
|
109
|
+
|| typeof value.version !== "string"
|
|
110
|
+
|| !PINNED_VERSION.test(value.version)) {
|
|
111
|
+
throw new SpawnfileError("compile_error", `Moltnet release capability stamp must be strict, pinned, and assert only the pi-bridge capability for ${architecture}`);
|
|
112
|
+
}
|
|
113
|
+
const describedRevision = value.version.match(/-g([a-f0-9]{7,40})$/u)?.[1];
|
|
114
|
+
if (describedRevision && !value.source_revision.startsWith(describedRevision)) {
|
|
115
|
+
throw new SpawnfileError("compile_error", "Moltnet release version does not match its source revision");
|
|
116
|
+
}
|
|
117
|
+
return value;
|
|
118
|
+
};
|
|
119
|
+
const verifyReleaseIdentity = async (releaseDirectory, architecture, authority) => {
|
|
120
|
+
const trustedAuthority = parseTrustedMoltnetReleaseAuthority(authority);
|
|
121
|
+
const trustedAsset = trustedMoltnetReleaseAsset(trustedAuthority, architecture);
|
|
122
|
+
const asset = createReleaseAssetName(architecture);
|
|
123
|
+
const assetPath = path.join(releaseDirectory, asset);
|
|
124
|
+
const stampPath = path.join(releaseDirectory, createReleaseStampName(architecture));
|
|
125
|
+
if (!(await fileExists(assetPath))) {
|
|
126
|
+
throw new SpawnfileError("compile_error", `Moltnet release asset ${assetPath} does not exist`);
|
|
127
|
+
}
|
|
128
|
+
if (!(await fileExists(stampPath))) {
|
|
129
|
+
throw new SpawnfileError("compile_error", `Moltnet release asset ${asset} has no required capability stamp ${stampPath}`);
|
|
130
|
+
}
|
|
131
|
+
const stamp = parseReleaseStamp((await readFile(stampPath)).toString("utf8"), architecture);
|
|
132
|
+
const sha256 = createHash("sha256").update(await readFile(assetPath)).digest("hex");
|
|
133
|
+
if (stamp.sha256 !== sha256) {
|
|
134
|
+
throw new SpawnfileError("compile_error", `Moltnet release stamp sha256 does not match ${asset} (stale or tampered artifact)`);
|
|
135
|
+
}
|
|
136
|
+
if (stamp.version !== trustedAuthority.release_version
|
|
137
|
+
|| stamp.source_revision !== trustedAuthority.source_revision
|
|
138
|
+
|| stamp.asset !== trustedAsset.asset
|
|
139
|
+
|| `sha256:${sha256}` !== trustedAsset.asset_sha256) {
|
|
140
|
+
throw new SpawnfileError("compile_error", `Moltnet release stamp and asset do not match trusted pinned authority for ${architecture}`);
|
|
141
|
+
}
|
|
142
|
+
return Object.freeze({
|
|
143
|
+
architecture,
|
|
144
|
+
asset,
|
|
145
|
+
asset_sha256: `sha256:${sha256}`,
|
|
146
|
+
capabilities: stamp.capabilities,
|
|
147
|
+
release_version: stamp.version,
|
|
148
|
+
source_revision: stamp.source_revision,
|
|
149
|
+
version: MOLTNET_RELEASE_IDENTITY_VERSION
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
const stageMoltnetReleaseAsset = async (outputDirectory, releaseAssetPath, identity) => {
|
|
153
|
+
const installDirectory = path.join(outputDirectory, MOLTNET_BIN_DIRECTORY);
|
|
154
|
+
await ensureDirectory(installDirectory);
|
|
155
|
+
try {
|
|
156
|
+
await execFile("tar", ["-C", installDirectory, "-xzf", releaseAssetPath]);
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
160
|
+
throw new SpawnfileError("compile_error", `Unable to extract Moltnet release asset ${releaseAssetPath}: ${reason}`);
|
|
161
|
+
}
|
|
162
|
+
for (const binaryName of MOLTNET_BINARY_NAMES) {
|
|
163
|
+
const binaryPath = path.join(installDirectory, binaryName);
|
|
164
|
+
if (!(await fileExists(binaryPath))) {
|
|
165
|
+
throw new SpawnfileError("compile_error", `Moltnet release asset ${releaseAssetPath} did not contain ${binaryName}`);
|
|
166
|
+
}
|
|
167
|
+
await chmod(binaryPath, 0o755);
|
|
168
|
+
}
|
|
169
|
+
return identity;
|
|
170
|
+
};
|
|
46
171
|
const isCommandNotFoundError = (error) => typeof error === "object" &&
|
|
47
172
|
error !== null &&
|
|
48
173
|
"code" in error &&
|
|
@@ -67,6 +192,18 @@ const resolveConfiguredReleaseDirectory = async () => {
|
|
|
67
192
|
}
|
|
68
193
|
return configuredDirectory;
|
|
69
194
|
};
|
|
195
|
+
const resolveConfiguredLocalReleaseDirectory = async () => {
|
|
196
|
+
const configuredDirectory = process.env[MOLTNET_LOCAL_RELEASE_DIR_ENV]?.trim();
|
|
197
|
+
if (!configuredDirectory)
|
|
198
|
+
return null;
|
|
199
|
+
if (process.env[MOLTNET_ALLOW_LOCAL_E2E_ENV] !== "1") {
|
|
200
|
+
throw new SpawnfileError("compile_error", "Local Moltnet identity requires explicit SPAWNFILE_ALLOW_LOCAL_E2E=1 opt-in");
|
|
201
|
+
}
|
|
202
|
+
if (!path.isAbsolute(configuredDirectory) || !(await fileExists(configuredDirectory))) {
|
|
203
|
+
throw new SpawnfileError("compile_error", "Local Moltnet release directory is invalid");
|
|
204
|
+
}
|
|
205
|
+
return configuredDirectory;
|
|
206
|
+
};
|
|
70
207
|
const findPathMoltnetCli = async () => {
|
|
71
208
|
try {
|
|
72
209
|
await execFile("moltnet", ["version"]);
|
|
@@ -89,36 +226,46 @@ export const resolveMoltnetCliCommand = async () => {
|
|
|
89
226
|
if (pathCli) {
|
|
90
227
|
return pathCli;
|
|
91
228
|
}
|
|
92
|
-
if (await fileExists(LOCAL_MOLTNET_CLI_PATH)) {
|
|
93
|
-
return validateMoltnetCli(LOCAL_MOLTNET_CLI_PATH, LOCAL_MOLTNET_CLI_PATH);
|
|
94
|
-
}
|
|
95
229
|
return validateMoltnetCli("moltnet", "PATH");
|
|
96
230
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return false;
|
|
231
|
+
const stageMoltnetBinariesAtReleaseDirectory = async (outputDirectory, releaseDirectory, options = {}) => {
|
|
232
|
+
if (!path.isAbsolute(releaseDirectory) || !(await fileExists(releaseDirectory))) {
|
|
233
|
+
throw new SpawnfileError("compile_error", "Trusted Moltnet release directory is invalid");
|
|
101
234
|
}
|
|
102
235
|
const architecture = resolveTargetArchitecture(options.architecture);
|
|
236
|
+
const authority = await readTrustedMoltnetReleaseAuthority();
|
|
237
|
+
const identity = await verifyReleaseIdentity(releaseDirectory, architecture, authority);
|
|
103
238
|
const releaseAssetPath = path.join(releaseDirectory, createReleaseAssetName(architecture));
|
|
104
|
-
|
|
105
|
-
|
|
239
|
+
return stageMoltnetReleaseAsset(outputDirectory, releaseAssetPath, identity);
|
|
240
|
+
};
|
|
241
|
+
export const stageMoltnetBinaries = async (outputDirectory, options = {}) => {
|
|
242
|
+
const localReleaseDirectory = await resolveConfiguredLocalReleaseDirectory();
|
|
243
|
+
if (localReleaseDirectory) {
|
|
244
|
+
const architecture = resolveTargetArchitecture(options.architecture);
|
|
245
|
+
const identity = await readLocalMoltnetReleaseIdentity(localReleaseDirectory, architecture, options.executionHost ?? resolveMoltnetExecutionHost());
|
|
246
|
+
return stageMoltnetReleaseAsset(outputDirectory, path.join(localReleaseDirectory, createReleaseAssetName(architecture)), identity);
|
|
106
247
|
}
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
248
|
+
const releaseDirectory = options.releaseDirectory
|
|
249
|
+
?? await resolveConfiguredReleaseDirectory();
|
|
250
|
+
if (releaseDirectory) {
|
|
251
|
+
return stageMoltnetBinariesAtReleaseDirectory(outputDirectory, releaseDirectory, { architecture: options.architecture });
|
|
111
252
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
253
|
+
const architecture = resolveTargetArchitecture(options.architecture);
|
|
254
|
+
const authority = await readTrustedMoltnetReleaseAuthority();
|
|
255
|
+
const trustedAsset = trustedMoltnetReleaseAsset(authority, architecture);
|
|
256
|
+
const downloaded = await downloadTrustedMoltnetReleaseAsset(authority, architecture);
|
|
257
|
+
try {
|
|
258
|
+
return await stageMoltnetReleaseAsset(outputDirectory, downloaded.assetPath, Object.freeze({
|
|
259
|
+
architecture,
|
|
260
|
+
asset: trustedAsset.asset,
|
|
261
|
+
asset_sha256: trustedAsset.asset_sha256,
|
|
262
|
+
capabilities: authority.capabilities,
|
|
263
|
+
release_version: authority.release_version,
|
|
264
|
+
source_revision: authority.source_revision,
|
|
265
|
+
version: MOLTNET_RELEASE_IDENTITY_VERSION
|
|
266
|
+
}));
|
|
115
267
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
if (!(await fileExists(binaryPath))) {
|
|
119
|
-
throw new SpawnfileError("compile_error", `Moltnet release asset ${releaseAssetPath} did not contain ${binaryName}`);
|
|
120
|
-
}
|
|
121
|
-
await chmod(binaryPath, 0o755);
|
|
268
|
+
finally {
|
|
269
|
+
await downloaded.cleanup();
|
|
122
270
|
}
|
|
123
|
-
return true;
|
|
124
271
|
};
|
|
@@ -24,7 +24,7 @@ const createAttachmentConfig = (node, artifacts, attachment, agentSlug) => {
|
|
|
24
24
|
throw new SpawnfileError("compile_error", `Moltnet client config requires a resolved member id for ${node.name}`);
|
|
25
25
|
}
|
|
26
26
|
const serverPlan = findServerPlan(artifacts, attachment);
|
|
27
|
-
const auth = resolveMoltnetClientAuth(serverPlan.server, attachment.network, attachment.memberId, agentSlug);
|
|
27
|
+
const auth = resolveMoltnetClientAuth(serverPlan.server, attachment.network, attachment.memberId, agentSlug, attachment.auth?.tokenId, node.runtime.name);
|
|
28
28
|
return {
|
|
29
29
|
agent_name: node.name,
|
|
30
30
|
auth: {
|
|
@@ -38,7 +38,12 @@ const createAttachmentConfig = (node, artifacts, attachment, agentSlug) => {
|
|
|
38
38
|
? {
|
|
39
39
|
dms: {
|
|
40
40
|
enabled: attachment.dms.enabled,
|
|
41
|
-
...(attachment.dms.wake ? { wake: attachment.dms.wake } : {})
|
|
41
|
+
...(attachment.dms.wake ? { wake: attachment.dms.wake } : {}),
|
|
42
|
+
...(attachment.dms.allowedWakeSenders !== undefined
|
|
43
|
+
? {
|
|
44
|
+
allowed_wake_senders: [...attachment.dms.allowedWakeSenders]
|
|
45
|
+
}
|
|
46
|
+
: {})
|
|
42
47
|
}
|
|
43
48
|
}
|
|
44
49
|
: {}),
|
|
@@ -4,6 +4,8 @@ export interface MoltnetSecretPatch {
|
|
|
4
4
|
jsonPath: string;
|
|
5
5
|
}
|
|
6
6
|
export interface MoltnetClientAuthPlan {
|
|
7
|
+
credentialAgentId?: string;
|
|
8
|
+
credentialId?: string;
|
|
7
9
|
mode: "bearer" | "none" | "open";
|
|
8
10
|
registration?: "disabled" | "open" | "token";
|
|
9
11
|
staticToken?: boolean;
|
|
@@ -11,6 +13,7 @@ export interface MoltnetClientAuthPlan {
|
|
|
11
13
|
tokenPath?: string;
|
|
12
14
|
}
|
|
13
15
|
export interface MoltnetNativeRoomConfig {
|
|
16
|
+
federation?: "all" | "none" | string[];
|
|
14
17
|
id: string;
|
|
15
18
|
members: string[];
|
|
16
19
|
name?: string;
|
|
@@ -31,16 +34,30 @@ type ManagedMoltnetStore = Extract<TeamNetworkServer, {
|
|
|
31
34
|
export declare const createMoltnetOpenTokenDirectory: (agentSlug: string) => string;
|
|
32
35
|
export declare const createMoltnetOpenTokenPath: (networkId: string, memberId: string, agentSlug?: string) => string;
|
|
33
36
|
export declare const createMoltnetNetworkStateDirectory: (networkId: string) => string;
|
|
37
|
+
export declare const createMoltnetDaimonReceiptStorePath: (networkId: string, memberId: string) => string;
|
|
34
38
|
export declare const createDefaultMoltnetStorePath: (networkId: string, kind: "json" | "sqlite", mountPath?: string) => string;
|
|
35
39
|
export declare const resolveMoltnetStorePath: (networkId: string, store: ManagedMoltnetStore) => string | null;
|
|
36
40
|
export declare const resolveMoltnetStorePersistenceMountPath: (networkId: string, store: ManagedMoltnetStore) => string | null;
|
|
37
41
|
export declare const createMoltnetServerConfigPath: (serverId: string) => string;
|
|
42
|
+
/**
|
|
43
|
+
* Dedicated causal-log subdirectory, a SIBLING of (never the same directory
|
|
44
|
+
* as) the server's own Moltnet.json config file. Deliberately kept separate
|
|
45
|
+
* so a persistent volume mounted here (to survive container teardown/
|
|
46
|
+
* restart, see moltnetArtifacts.ts's causal persistent mount) never masks a
|
|
47
|
+
* rebuilt image's freshly-baked Moltnet.json — which carries secrets
|
|
48
|
+
* patched in at container start via secretPatches — with a stale copy left
|
|
49
|
+
* over in a prior run's volume. Takes the already-container-absolute
|
|
50
|
+
* `configPath` (MoltnetServerPlan.configPath, post toContainerRootfsPath),
|
|
51
|
+
* not the rootfs-prefixed emit path.
|
|
52
|
+
*/
|
|
53
|
+
export declare const createMoltnetCausalDirectory: (configPath: string) => string;
|
|
54
|
+
export declare const createMoltnetCausalEventsPath: (configPath: string) => string;
|
|
38
55
|
export declare const createMoltnetNodeConfigPath: (teamSlug: string, networkId: string, agentId: string) => string;
|
|
39
56
|
export declare const renderMoltnetListenAddr: (server: Extract<TeamNetworkServer, {
|
|
40
57
|
mode: "managed";
|
|
41
58
|
}>) => string;
|
|
42
59
|
export declare const resolveMoltnetBaseUrl: (server: TeamNetworkServer) => string;
|
|
43
|
-
export declare const resolveMoltnetClientAuth: (server: TeamNetworkServer, networkId: string, memberId: string, agentSlug?: string) => MoltnetClientAuthPlan;
|
|
60
|
+
export declare const resolveMoltnetClientAuth: (server: TeamNetworkServer, networkId: string, memberId: string, agentSlug?: string, attachmentTokenId?: string, runtimeName?: string) => MoltnetClientAuthPlan;
|
|
44
61
|
export declare const createMoltnetNativeServerConfig: ({ networkId, networkName, rooms, server }: MoltnetNativeServerConfigInput) => {
|
|
45
62
|
config: Record<string, unknown>;
|
|
46
63
|
secretPatches: MoltnetSecretPatch[];
|