spawnfile 0.1.13 → 0.1.14
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 +50 -11
- 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/index.d.ts +7 -0
- package/dist/auth/index.js +7 -0
- package/dist/auth/paths.d.ts +11 -0
- package/dist/auth/paths.js +21 -0
- package/dist/auth/targetSecretSourceAuthor.d.ts +18 -0
- package/dist/auth/targetSecretSourceAuthor.js +52 -0
- package/dist/auth/targetSecretSourceFsPublish.d.ts +15 -0
- package/dist/auth/targetSecretSourceFsPublish.js +49 -0
- package/dist/auth/targetSecretSourceFsPublishImmutable.d.ts +16 -0
- package/dist/auth/targetSecretSourceFsPublishImmutable.js +435 -0
- package/dist/auth/targetSecretSourceFsRead.d.ts +14 -0
- package/dist/auth/targetSecretSourceFsRead.js +198 -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/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 +221 -0
- package/dist/cli/compileBuildCommands.d.ts +3 -0
- package/dist/cli/compileBuildCommands.js +35 -0
- package/dist/cli/containerBundleCommand.d.ts +6 -0
- package/dist/cli/containerBundleCommand.js +116 -0
- package/dist/cli/downCommand.d.ts +25 -0
- package/dist/cli/downCommand.js +134 -0
- package/dist/cli/index.js +6 -3
- package/dist/cli/lifecycleCommands.d.ts +1 -1
- package/dist/cli/lifecycleCommands.js +11 -181
- package/dist/cli/lifecycleMachine.d.ts +19 -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/runCli.d.ts +9 -2
- package/dist/cli/runCli.js +27 -71
- 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 +33 -0
- package/dist/cli/targetCommands.js +257 -0
- package/dist/cli/targetComposedPreparationCommand.d.ts +6 -0
- package/dist/cli/targetComposedPreparationCommand.js +39 -0
- package/dist/cli/targetDefaultArtifactAuthority.d.ts +5 -0
- package/dist/cli/targetDefaultArtifactAuthority.js +28 -0
- package/dist/cli/targetDefaultAuthorities.d.ts +53 -0
- package/dist/cli/targetDefaultAuthorities.js +210 -0
- package/dist/cli/targetDefaultConfig.d.ts +68 -0
- package/dist/cli/targetDefaultConfig.js +317 -0
- package/dist/cli/targetDefaultConfigStdin.d.ts +13 -0
- package/dist/cli/targetDefaultConfigStdin.js +215 -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 +247 -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/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/targetWorldClockCrossProcess.test-helper.d.ts +13 -0
- package/dist/cli/targetWorldClockCrossProcess.test-helper.js +109 -0
- package/dist/cli/targetWorldReadinessCommand.d.ts +10 -0
- package/dist/cli/targetWorldReadinessCommand.js +43 -0
- package/dist/cli/upCommand.d.ts +3 -0
- package/dist/cli/upCommand.js +133 -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 +53 -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 +1 -0
- package/dist/compiler/buildCompilePlanTeams.js +4 -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 +2 -0
- package/dist/compiler/compileProject.d.ts +13 -0
- package/dist/compiler/compileProject.js +26 -74
- 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/containerArtifactSummaries.d.ts +7 -0
- package/dist/compiler/containerArtifactSummaries.js +138 -0
- package/dist/compiler/containerArtifacts.d.ts +10 -0
- package/dist/compiler/containerArtifacts.js +126 -125
- package/dist/compiler/containerArtifactsPlans.d.ts +5 -3
- package/dist/compiler/containerArtifactsPlans.js +31 -118
- package/dist/compiler/containerArtifactsRender.d.ts +3 -1
- package/dist/compiler/containerArtifactsRender.js +15 -12
- package/dist/compiler/containerArtifactsTypes.d.ts +12 -0
- package/dist/compiler/containerConfigEnvRender.d.ts +3 -0
- package/dist/compiler/containerConfigEnvRender.js +54 -0
- package/dist/compiler/containerEntrypointRender.d.ts +1 -0
- package/dist/compiler/containerEntrypointRender.js +56 -52
- 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/containerTargetPlanResolution.d.ts +20 -0
- package/dist/compiler/containerTargetPlanResolution.js +97 -0
- package/dist/compiler/daimonTelemetryArtifacts.d.ts +22 -0
- package/dist/compiler/daimonTelemetryArtifacts.js +61 -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 +4 -0
- package/dist/compiler/index.js +4 -0
- package/dist/compiler/memoryArtifacts.d.ts +26 -0
- package/dist/compiler/memoryArtifacts.js +134 -0
- package/dist/compiler/memoryResolution.d.ts +4 -0
- package/dist/compiler/memoryResolution.js +147 -0
- package/dist/compiler/modelEnv.d.ts +2 -0
- package/dist/compiler/modelEnv.js +6 -0
- package/dist/compiler/moltnetAllowedWakeSendersValidation.d.ts +2 -0
- package/dist/compiler/moltnetAllowedWakeSendersValidation.js +42 -0
- package/dist/compiler/moltnetArtifactPaths.d.ts +26 -0
- package/dist/compiler/moltnetArtifactPaths.js +49 -0
- package/dist/compiler/moltnetArtifactTypes.d.ts +46 -0
- package/dist/compiler/moltnetArtifactTypes.js +1 -0
- package/dist/compiler/moltnetArtifacts.d.ts +2 -40
- package/dist/compiler/moltnetArtifacts.js +43 -97
- package/dist/compiler/moltnetBinaries.d.ts +21 -4
- package/dist/compiler/moltnetBinaries.js +134 -27
- package/dist/compiler/moltnetClientConfig.js +7 -2
- package/dist/compiler/moltnetConfigLowering.d.ts +16 -1
- package/dist/compiler/moltnetConfigLowering.js +67 -5
- 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 +17 -0
- package/dist/compiler/moltnetReleaseAuthority.js +73 -0
- package/dist/compiler/moltnetReleaseDownload.d.ts +12 -0
- package/dist/compiler/moltnetReleaseDownload.js +85 -0
- package/dist/compiler/moltnetRepresentativeResolution.d.ts +1 -0
- package/dist/compiler/moltnetRepresentativeResolution.js +16 -2
- package/dist/compiler/moltnetResolution.js +72 -20
- package/dist/compiler/moltnetRoomMemberships.js +37 -9
- package/dist/compiler/moltnetServerPlans.d.ts +9 -0
- package/dist/compiler/moltnetServerPlans.js +132 -0
- package/dist/compiler/organizationIdentity.d.ts +27 -0
- package/dist/compiler/organizationIdentity.js +297 -0
- package/dist/compiler/organizationReadyEvidence.d.ts +49 -0
- package/dist/compiler/organizationReadyEvidence.js +261 -0
- package/dist/compiler/projectManifestGraph.d.ts +4 -0
- package/dist/compiler/projectManifestGraph.js +24 -0
- package/dist/compiler/runProject.d.ts +4 -0
- package/dist/compiler/runProject.js +30 -21
- package/dist/compiler/runProjectAuth.d.ts +7 -1
- package/dist/compiler/runProjectAuth.js +87 -9
- package/dist/compiler/runProjectDocker.d.ts +7 -0
- package/dist/compiler/runProjectDocker.js +31 -8
- 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/types.d.ts +82 -1
- package/dist/compiler/upProject.d.ts +5 -0
- package/dist/compiler/upProject.js +256 -20
- package/dist/compiler/upReceipt.d.ts +36 -0
- package/dist/compiler/upReceipt.js +82 -0
- package/dist/compiler/updateProjectModels.js +42 -60
- package/dist/compiler/updateProjectRuntime.js +22 -35
- package/dist/compiler/updateProjectSurfaces.js +53 -47
- 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 +135 -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/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 +2 -10
- package/dist/deployment/dockerManager.d.ts +51 -0
- package/dist/deployment/dockerManager.js +118 -1
- package/dist/deployment/dockerProbeGateway.js +64 -5
- 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 +34 -0
- package/dist/deployment/downDeployment.js +147 -0
- package/dist/deployment/downReceiptTypes.d.ts +21 -0
- package/dist/deployment/downReceiptTypes.js +30 -0
- package/dist/deployment/index.d.ts +16 -0
- package/dist/deployment/index.js +17 -0
- package/dist/deployment/lifecycleCompletion.d.ts +37 -0
- package/dist/deployment/lifecycleCompletion.js +236 -0
- package/dist/deployment/lifecycleCompletionContracts.d.ts +158 -0
- package/dist/deployment/lifecycleCompletionContracts.js +106 -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 +9 -0
- package/dist/deployment/lifecycleCompletionPaths.js +16 -0
- package/dist/deployment/lifecycleCompletionPublication.d.ts +5 -0
- package/dist/deployment/lifecycleCompletionPublication.js +35 -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/organizationHandoffAuthorityFsClient.d.ts +17 -0
- package/dist/deployment/organizationHandoffAuthorityFsClient.js +132 -0
- package/dist/deployment/organizationHandoffAuthorityFsWorker.d.ts +1 -0
- package/dist/deployment/organizationHandoffAuthorityFsWorker.js +285 -0
- package/dist/deployment/organizationHandoffAuthorityFsWorkerParent.fixture.d.ts +1 -0
- package/dist/deployment/organizationHandoffAuthorityFsWorkerParent.fixture.js +26 -0
- package/dist/deployment/organizationHandoffAuthorityStore.d.ts +41 -0
- package/dist/deployment/organizationHandoffAuthorityStore.js +348 -0
- package/dist/deployment/organizationHandoffAuthorityTypes.d.ts +76 -0
- package/dist/deployment/organizationHandoffAuthorityTypes.js +148 -0
- package/dist/deployment/organizationHandoffTypes.d.ts +29 -0
- package/dist/deployment/organizationHandoffTypes.js +80 -0
- package/dist/deployment/organizationReady.d.ts +52 -0
- package/dist/deployment/organizationReady.js +200 -0
- package/dist/deployment/privateArtifactsExport.d.ts +18 -0
- package/dist/deployment/privateArtifactsExport.js +80 -0
- package/dist/deployment/providerRuntimeBoundaryScanner.test-helper.d.ts +8 -0
- package/dist/deployment/providerRuntimeBoundaryScanner.test-helper.js +60 -0
- package/dist/deployment/record.d.ts +26 -1
- package/dist/deployment/record.js +49 -4
- package/dist/deployment/simfileFixtureBoundary.test-helper.d.ts +8 -0
- package/dist/deployment/simfileFixtureBoundary.test-helper.js +103 -0
- package/dist/deployment/target.d.ts +1 -35
- package/dist/deployment/target.js +1 -96
- package/dist/deployment/upReceiptTypes.d.ts +111 -0
- package/dist/deployment/upReceiptTypes.js +164 -0
- package/dist/dev/project.js +15 -9
- package/dist/distribution/buildDistributionReport.d.ts +2 -1
- package/dist/distribution/buildDistributionReport.js +2 -1
- package/dist/distribution/distributionReportSchema.d.ts +5 -0
- package/dist/distribution/distributionReportSchema.js +7 -2
- package/dist/distribution/index.d.ts +2 -2
- package/dist/distribution/index.js +1 -1
- package/dist/distribution/types.d.ts +7 -0
- package/dist/distribution/types.js +1 -0
- 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/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 +17 -0
- package/dist/manifest/mcpSchemas.js +41 -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 +9 -2
- package/dist/manifest/renderSpawnfileSurfaces.d.ts +2 -0
- package/dist/manifest/renderSpawnfileSurfaces.js +134 -0
- package/dist/manifest/schemas.d.ts +1868 -99
- package/dist/manifest/schemas.js +78 -32
- package/dist/manifest/surfaceSchemas.d.ts +17 -0
- package/dist/manifest/surfaceSchemas.js +24 -1
- package/dist/manifest/teamNetworkAccessSchemas.d.ts +1 -1
- package/dist/manifest/teamNetworkAuthSchemas.d.ts +48 -0
- package/dist/manifest/teamNetworkAuthSchemas.js +103 -0
- package/dist/manifest/teamNetworkSchemas.d.ts +8 -187
- package/dist/manifest/teamNetworkSchemas.js +3 -317
- package/dist/manifest/teamNetworkServerSchemas.d.ts +150 -0
- package/dist/manifest/teamNetworkServerSchemas.js +199 -0
- package/dist/ownership/siblingBuildFreshness.d.ts +20 -0
- package/dist/ownership/siblingBuildFreshness.js +20 -0
- package/dist/ownership/simfileRunOperatorInputs.d.ts +103 -0
- package/dist/ownership/simfileRunOperatorInputs.js +139 -0
- package/dist/report/types.d.ts +142 -0
- package/dist/runtime/common.d.ts +35 -0
- package/dist/runtime/common.js +55 -0
- package/dist/runtime/container.d.ts +28 -1
- package/dist/runtime/container.js +38 -5
- package/dist/runtime/containerPackageOverrides.d.ts +37 -0
- package/dist/runtime/containerPackageOverrides.js +33 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.js +2 -0
- package/dist/runtime/mnemeMcp.d.ts +15 -0
- package/dist/runtime/mnemeMcp.js +109 -0
- package/dist/runtime/openclaw/adapter.js +15 -4
- 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 -1
- package/dist/runtime/pi/adapter.js +86 -53
- 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 +80 -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 +23 -27
- 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/scheduleUtils.d.ts +2 -0
- package/dist/runtime/scheduleUtils.js +15 -0
- package/dist/runtime/types.d.ts +25 -2
- package/dist/shared/errors.d.ts +1 -1
- package/dist/shared/errors.js +2 -2
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.js +1 -0
- package/dist/shared/redaction.d.ts +2 -0
- package/dist/shared/redaction.js +10 -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/cleanupRunDocker.test-helper.d.ts +67 -0
- package/dist/target/cleanupRunDocker.test-helper.js +238 -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 +449 -0
- package/dist/target/dockerCommandExecutor.d.ts +27 -0
- package/dist/target/dockerCommandExecutor.js +200 -0
- package/dist/target/dockerCommandExecutorCore.d.ts +34 -0
- package/dist/target/dockerCommandExecutorCore.js +273 -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 +99 -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 +52 -0
- package/dist/target/dockerTarget.js +48 -0
- package/dist/target/dockerTargetBinding.d.ts +14 -0
- package/dist/target/dockerTargetBinding.js +96 -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 +60 -0
- package/dist/target/dockerWorldServiceProvider.js +318 -0
- package/dist/target/dockerWorldServiceStore.d.ts +73 -0
- package/dist/target/dockerWorldServiceStore.js +367 -0
- package/dist/target/evidenceExport.d.ts +55 -0
- package/dist/target/evidenceExport.js +518 -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 +85 -0
- package/dist/target/evidenceExportProvider.js +187 -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 +41 -0
- package/dist/target/publicArtifactSnapshot.js +150 -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/moltnet-releases.json +20 -0
- package/package.json +27 -11
- package/runtimes.yaml +8 -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
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { createOrganizationHandoff, parseCanonicalSha256Digest } from "../deployment/organizationHandoffTypes.js";
|
|
2
|
+
import { parseOpaqueTargetHandle } from "./contracts.js";
|
|
3
|
+
import { createDockerArtifactSpec } from "./dockerArtifactsProvider.js";
|
|
4
|
+
import { DockerSecretProviderError, createExistingDockerSecretSpec } from "./dockerSecretsProvider.js";
|
|
5
|
+
import { DockerResourceProviderError, createDockerResourceSpec } from "./dockerResourcesProvider.js";
|
|
6
|
+
import { createWorldServiceAuthorization, parseWorldServiceResolution } from "./dockerWorldServiceAuthority.js";
|
|
7
|
+
import { DockerWorldServiceProviderError, createDockerWorldServiceSpec } from "./dockerWorldServiceProvider.js";
|
|
8
|
+
import { createWorldServiceBinding, worldServiceResourceBindings } from "./dockerWorldServiceStore.js";
|
|
9
|
+
import { createOrganizationAttachmentAuthorization, parseOrganizationAttachmentResolution } from "./organizationAttachmentAuthority.js";
|
|
10
|
+
import { DockerOrganizationAttachmentProviderError, createDockerOrganizationAttachmentSpec } from "./organizationAttachmentProvider.js";
|
|
11
|
+
import { createOrganizationAttachmentBinding } from "./organizationAttachmentStore.js";
|
|
12
|
+
const deploymentLabels = {
|
|
13
|
+
"com.spawnfile.compile_fingerprint": "sf1:compile",
|
|
14
|
+
"com.spawnfile.deployment": "test-deployment",
|
|
15
|
+
"com.spawnfile.project": "test-project",
|
|
16
|
+
"com.spawnfile.run_id": "run-one",
|
|
17
|
+
"com.spawnfile.unit": "world",
|
|
18
|
+
"com.spawnfile.version": "0.1"
|
|
19
|
+
};
|
|
20
|
+
export const canonicalCleanupBindings = (input) => {
|
|
21
|
+
const artifact = createDockerArtifactSpec({
|
|
22
|
+
artifactManifestDigest: `sha256:${"a".repeat(64)}`,
|
|
23
|
+
imageDigest: `sha256:${"b".repeat(64)}`,
|
|
24
|
+
imageReference: `registry.example/world@sha256:${"b".repeat(64)}`,
|
|
25
|
+
operationHandle: parseOpaqueTargetHandle("opaque_artifact00000001"),
|
|
26
|
+
requestDigest: `sha256:${"3".repeat(64)}`,
|
|
27
|
+
selectedTargetHandle: input.selected.handle
|
|
28
|
+
});
|
|
29
|
+
const worldAuthorization = createWorldServiceAuthorization({
|
|
30
|
+
dataNetworkHandle: input.network.resultHandle,
|
|
31
|
+
descriptorDigest: input.descriptorDigest,
|
|
32
|
+
evidenceMountPath: "/run/world/evidence",
|
|
33
|
+
evidenceVolumeHandle: input.evidence.resultHandle,
|
|
34
|
+
operationHandle: input.worldOperationHandle,
|
|
35
|
+
requestDigest: input.worldRequestDigest,
|
|
36
|
+
runId: input.runId,
|
|
37
|
+
secretBindingsHandle: input.secretHandle,
|
|
38
|
+
selectedTarget: input.selected,
|
|
39
|
+
worldArtifactHandle: artifact.resultHandle
|
|
40
|
+
});
|
|
41
|
+
const worldResolution = parseWorldServiceResolution({
|
|
42
|
+
artifact: {
|
|
43
|
+
artifact_manifest_digest: `sha256:${"a".repeat(64)}`,
|
|
44
|
+
identity_kind: "oci_image_manifest",
|
|
45
|
+
image_digest: artifact.imageDigest,
|
|
46
|
+
image_reference: artifact.imageReference,
|
|
47
|
+
operation_handle: parseOpaqueTargetHandle("opaque_artifact00000001"),
|
|
48
|
+
request_digest: `sha256:${"3".repeat(64)}`,
|
|
49
|
+
result_handle: artifact.resultHandle
|
|
50
|
+
},
|
|
51
|
+
authorization: worldAuthorization
|
|
52
|
+
});
|
|
53
|
+
const worldResources = worldServiceResourceBindings({
|
|
54
|
+
dataNetworkClaim: {
|
|
55
|
+
operationHandle: input.networkOperationHandle,
|
|
56
|
+
requestDigest: input.networkRequestDigest
|
|
57
|
+
},
|
|
58
|
+
evidenceVolumeClaim: {
|
|
59
|
+
operationHandle: input.evidenceOperationHandle,
|
|
60
|
+
requestDigest: input.evidenceRequestDigest
|
|
61
|
+
},
|
|
62
|
+
resolution: worldResolution
|
|
63
|
+
});
|
|
64
|
+
const resources = {
|
|
65
|
+
...worldResources,
|
|
66
|
+
secret_bindings: (() => {
|
|
67
|
+
const spec = createExistingDockerSecretSpec({
|
|
68
|
+
bindingsHandle: input.secretHandle,
|
|
69
|
+
runId: input.runId,
|
|
70
|
+
selectedTargetHandle: input.selected.handle
|
|
71
|
+
});
|
|
72
|
+
return { handle: spec.resultHandle, labels: spec.labels, name: spec.volumeName };
|
|
73
|
+
})()
|
|
74
|
+
};
|
|
75
|
+
const worldSpec = createDockerWorldServiceSpec({
|
|
76
|
+
dataNetwork: resources.data_network,
|
|
77
|
+
evidenceMountPath: worldAuthorization.evidence_mount_path,
|
|
78
|
+
evidenceVolume: resources.evidence_volume,
|
|
79
|
+
imageDigest: worldResolution.artifact.image_digest,
|
|
80
|
+
imageReference: worldResolution.artifact.image_reference,
|
|
81
|
+
operationHandle: worldAuthorization.operation_handle,
|
|
82
|
+
requestDigest: worldAuthorization.request_digest,
|
|
83
|
+
runId: input.runId,
|
|
84
|
+
secretBindings: resources.secret_bindings,
|
|
85
|
+
selectedTargetHandle: input.selected.handle
|
|
86
|
+
});
|
|
87
|
+
const world = createWorldServiceBinding({
|
|
88
|
+
containerId: "c".repeat(64),
|
|
89
|
+
dataNetwork: resources.data_network,
|
|
90
|
+
evidenceVolume: resources.evidence_volume,
|
|
91
|
+
resolution: worldResolution,
|
|
92
|
+
secretBindings: resources.secret_bindings,
|
|
93
|
+
spec: worldSpec
|
|
94
|
+
});
|
|
95
|
+
const attachmentAuthorization = createOrganizationAttachmentAuthorization({
|
|
96
|
+
descriptorDigest: input.descriptorDigest,
|
|
97
|
+
operationHandle: input.attachmentOperationHandle,
|
|
98
|
+
organizationHandoffHandle: parseOpaqueTargetHandle("opaque_handoff000000001"),
|
|
99
|
+
requestDigest: input.attachmentRequestDigest,
|
|
100
|
+
runId: input.runId,
|
|
101
|
+
selectedTarget: input.selected
|
|
102
|
+
});
|
|
103
|
+
const handoff = createOrganizationHandoff(input.runId, {
|
|
104
|
+
bindingDigest: parseCanonicalSha256Digest(`sha256:${"4".repeat(64)}`),
|
|
105
|
+
networkAttachmentHandle: parseOpaqueTargetHandle("opaque_networkattach001"),
|
|
106
|
+
selectedTargetReceiptDigest: parseCanonicalSha256Digest(`sha256:${"5".repeat(64)}`)
|
|
107
|
+
});
|
|
108
|
+
const attachmentResolution = parseOrganizationAttachmentResolution({
|
|
109
|
+
authorization: attachmentAuthorization,
|
|
110
|
+
descriptor_binding: {
|
|
111
|
+
binding_digest: handoff.binding_digest,
|
|
112
|
+
descriptor_digest: input.descriptorDigest
|
|
113
|
+
},
|
|
114
|
+
handoff,
|
|
115
|
+
network_attachment: {
|
|
116
|
+
container_id: world.container_id,
|
|
117
|
+
deployment_labels: deploymentLabels,
|
|
118
|
+
network_attachment_handle: handoff.network_attachment_handle
|
|
119
|
+
},
|
|
120
|
+
selected_target_binding: {
|
|
121
|
+
receipt: {
|
|
122
|
+
...input.selected,
|
|
123
|
+
version: "spawnfile.target-resource.selected-target.v1"
|
|
124
|
+
},
|
|
125
|
+
receipt_digest: handoff.selected_target_receipt_digest
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
const attachmentSpec = createDockerOrganizationAttachmentSpec({
|
|
129
|
+
containerId: world.container_id,
|
|
130
|
+
dataNetworkOperationHandle: input.networkOperationHandle,
|
|
131
|
+
dataNetworkRequestDigest: input.networkRequestDigest,
|
|
132
|
+
deploymentLabels,
|
|
133
|
+
operationHandle: input.attachmentOperationHandle,
|
|
134
|
+
organizationHandoffHandle: attachmentAuthorization.organization_handoff_handle,
|
|
135
|
+
requestDigest: input.attachmentRequestDigest,
|
|
136
|
+
runId: input.runId,
|
|
137
|
+
selectedTargetHandle: input.selected.handle
|
|
138
|
+
});
|
|
139
|
+
const attachment = createOrganizationAttachmentBinding({
|
|
140
|
+
dataNetworkOperationHandle: input.networkOperationHandle,
|
|
141
|
+
dataNetworkRequestDigest: input.networkRequestDigest,
|
|
142
|
+
networkId: "f".repeat(64),
|
|
143
|
+
resolution: attachmentResolution,
|
|
144
|
+
spec: attachmentSpec
|
|
145
|
+
});
|
|
146
|
+
return { attachment, world };
|
|
147
|
+
};
|
|
148
|
+
export const canonicalCleanupScenario = (input) => {
|
|
149
|
+
const bindings = canonicalCleanupBindings(input);
|
|
150
|
+
const calls = {
|
|
151
|
+
attachment: [],
|
|
152
|
+
secret: [],
|
|
153
|
+
world: []
|
|
154
|
+
};
|
|
155
|
+
const otherNetwork = createDockerResourceSpec({
|
|
156
|
+
kind: "data_network",
|
|
157
|
+
operationHandle: parseOpaqueTargetHandle("opaque_qqqqqqqqqqqqqqqq"),
|
|
158
|
+
requestDigest: `sha256:${"a".repeat(64)}`,
|
|
159
|
+
runId: input.runId,
|
|
160
|
+
selectedTargetHandle: input.selected.handle
|
|
161
|
+
});
|
|
162
|
+
const drift = canonicalCleanupBindings({
|
|
163
|
+
...input,
|
|
164
|
+
network: otherNetwork,
|
|
165
|
+
networkOperationHandle: parseOpaqueTargetHandle("opaque_qqqqqqqqqqqqqqqq"),
|
|
166
|
+
networkRequestDigest: `sha256:${"a".repeat(64)}`
|
|
167
|
+
});
|
|
168
|
+
return {
|
|
169
|
+
attachmentExecutor: async (_file, args) => {
|
|
170
|
+
calls.attachment.push([...args]);
|
|
171
|
+
if (args[2] === "network")
|
|
172
|
+
return {
|
|
173
|
+
stderr: "",
|
|
174
|
+
stdout: JSON.stringify([{
|
|
175
|
+
Id: bindings.attachment.data_network.id,
|
|
176
|
+
Internal: true,
|
|
177
|
+
Labels: bindings.attachment.data_network.labels,
|
|
178
|
+
Name: bindings.attachment.data_network.name
|
|
179
|
+
}])
|
|
180
|
+
};
|
|
181
|
+
throw new DockerOrganizationAttachmentProviderError("not_found");
|
|
182
|
+
},
|
|
183
|
+
bindings,
|
|
184
|
+
calls,
|
|
185
|
+
drift,
|
|
186
|
+
secretExecutor: async (_file, args) => {
|
|
187
|
+
calls.secret.push([...args]);
|
|
188
|
+
throw new DockerSecretProviderError("not_found");
|
|
189
|
+
},
|
|
190
|
+
worldExecutor: async (_file, args) => {
|
|
191
|
+
calls.world.push([...args]);
|
|
192
|
+
throw new DockerWorldServiceProviderError("not_found");
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
export const cleanupResourceExecutor = (specs) => {
|
|
197
|
+
const present = new Set(specs.map(({ name }) => name));
|
|
198
|
+
const calls = [];
|
|
199
|
+
const executor = async (_file, args) => {
|
|
200
|
+
calls.push(args);
|
|
201
|
+
const name = args.at(-1);
|
|
202
|
+
const spec = specs.find((candidate) => candidate.name === name);
|
|
203
|
+
if (!spec)
|
|
204
|
+
throw new Error("unknown resource");
|
|
205
|
+
if (args[3] === "inspect") {
|
|
206
|
+
if (!present.has(name))
|
|
207
|
+
throw new DockerResourceProviderError("not_found");
|
|
208
|
+
return {
|
|
209
|
+
stderr: "",
|
|
210
|
+
stdout: JSON.stringify([spec.kind === "data_network"
|
|
211
|
+
? { Internal: true, Labels: spec.labels, Name: name }
|
|
212
|
+
: { Labels: spec.labels, Name: name }])
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
if (args[3] === "rm") {
|
|
216
|
+
present.delete(name);
|
|
217
|
+
return { stderr: "", stdout: `${name}\n` };
|
|
218
|
+
}
|
|
219
|
+
throw new Error("unexpected resource command");
|
|
220
|
+
};
|
|
221
|
+
return { calls, executor, present };
|
|
222
|
+
};
|
|
223
|
+
export const cleanupAuthorityStores = (input = {}) => {
|
|
224
|
+
const loads = { attachment: 0, world: 0 };
|
|
225
|
+
return {
|
|
226
|
+
attachmentStore: {
|
|
227
|
+
loadAttachment: async () => (loads.attachment += 1, input.attachment)
|
|
228
|
+
},
|
|
229
|
+
evidenceExportStore: {
|
|
230
|
+
loadAdmission: async () => input.admission,
|
|
231
|
+
loadIndex: async () => input.index ?? null
|
|
232
|
+
},
|
|
233
|
+
loads,
|
|
234
|
+
worldStore: {
|
|
235
|
+
loadService: async () => (loads.world += 1, input.world)
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type TargetResourceRequest } from "./contracts.js";
|
|
2
|
+
import { type CleanupRunPlan } from "./cleanupRun.js";
|
|
3
|
+
import { type WorldServiceAuthorityStore } from "./dockerWorldServiceStore.js";
|
|
4
|
+
import { type EvidenceExportAuthorityStore } from "./evidenceExportStore.js";
|
|
5
|
+
import { type OrganizationAttachmentAuthorityStore } from "./organizationAttachmentStore.js";
|
|
6
|
+
import { type TargetJournalStore } from "./journal.js";
|
|
7
|
+
type CleanupRequest = Extract<TargetResourceRequest, {
|
|
8
|
+
operation: "cleanup_run";
|
|
9
|
+
}>;
|
|
10
|
+
export interface DockerCleanupRunPreflightOptions {
|
|
11
|
+
readonly attachmentStore: OrganizationAttachmentAuthorityStore;
|
|
12
|
+
readonly evidenceExportStore: EvidenceExportAuthorityStore;
|
|
13
|
+
readonly journal: TargetJournalStore;
|
|
14
|
+
readonly worldStore: WorldServiceAuthorityStore;
|
|
15
|
+
}
|
|
16
|
+
export declare const prepareDockerCleanupRun: (request: CleanupRequest, options: DockerCleanupRunPreflightOptions) => Promise<CleanupRunPlan>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { SpawnfileError } from "../shared/index.js";
|
|
2
|
+
import { parseTargetResourceExportIndex } from "./contracts.js";
|
|
3
|
+
import { createExistingDockerSecretSpec } from "./dockerSecretsProvider.js";
|
|
4
|
+
import { createDockerResourceSpec } from "./dockerResourcesProvider.js";
|
|
5
|
+
import { parseWorldServiceBinding } from "./dockerWorldServiceStore.js";
|
|
6
|
+
import { createEvidenceExportHandle, evidenceReceiptLabels, parseEvidenceVolumeAuthority } from "./evidenceExportProvider.js";
|
|
7
|
+
import { parseOrganizationAttachmentBinding } from "./organizationAttachmentStore.js";
|
|
8
|
+
const CLEANUP_ERROR = "Target cleanup failed";
|
|
9
|
+
const fail = () => {
|
|
10
|
+
throw new SpawnfileError("runtime_error", CLEANUP_ERROR);
|
|
11
|
+
};
|
|
12
|
+
const same = (left, right) => JSON.stringify(left) === JSON.stringify(right);
|
|
13
|
+
const requestDigest = (raw) => {
|
|
14
|
+
if (!/^sha256:[a-f0-9]{64}$/u.test(raw))
|
|
15
|
+
return fail();
|
|
16
|
+
return raw;
|
|
17
|
+
};
|
|
18
|
+
const resource = (handle, authority) => Object.freeze({ authority, handle });
|
|
19
|
+
const roleFor = (operation) => {
|
|
20
|
+
switch (operation) {
|
|
21
|
+
case "attach_organization": return "attachment";
|
|
22
|
+
case "create_data_network": return "dataNetwork";
|
|
23
|
+
case "create_evidence_volume": return "evidence";
|
|
24
|
+
case "prepare_secret_bindings": return "secrets";
|
|
25
|
+
case "create_world_service": return "world";
|
|
26
|
+
default: return null;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const completedEntries = async (request, options) => {
|
|
30
|
+
const snapshot = await options.journal.read();
|
|
31
|
+
if (snapshot.run_id !== request.run_id
|
|
32
|
+
|| snapshot.descriptor_digest !== request.descriptor_digest
|
|
33
|
+
|| !same(snapshot.selected_target, request.selected_target))
|
|
34
|
+
return fail();
|
|
35
|
+
const completed = [];
|
|
36
|
+
for (const entry of snapshot.entries) {
|
|
37
|
+
if (entry.state !== "completed")
|
|
38
|
+
continue;
|
|
39
|
+
const digest = requestDigest(entry.request_digest);
|
|
40
|
+
const resolved = await options.journal.resolveCompletedReceipt({
|
|
41
|
+
operationHandle: entry.operation_handle,
|
|
42
|
+
requestDigest: digest
|
|
43
|
+
});
|
|
44
|
+
if (!resolved)
|
|
45
|
+
return fail();
|
|
46
|
+
const receipt = resolved.receipt;
|
|
47
|
+
if (receipt.operation !== entry.operation
|
|
48
|
+
|| receipt.operation_handle !== entry.operation_handle
|
|
49
|
+
|| receipt.request_digest !== entry.request_digest
|
|
50
|
+
|| receipt.run_id !== request.run_id
|
|
51
|
+
|| receipt.descriptor_digest !== request.descriptor_digest
|
|
52
|
+
|| !same(receipt.selected_target, request.selected_target))
|
|
53
|
+
return fail();
|
|
54
|
+
completed.push({
|
|
55
|
+
entry: {
|
|
56
|
+
operation: entry.operation,
|
|
57
|
+
operation_handle: entry.operation_handle,
|
|
58
|
+
request_digest: digest
|
|
59
|
+
},
|
|
60
|
+
receipt
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return completed;
|
|
64
|
+
};
|
|
65
|
+
const exactRoles = (completed) => {
|
|
66
|
+
const roles = new Map();
|
|
67
|
+
for (const item of completed) {
|
|
68
|
+
const role = roleFor(item.entry.operation);
|
|
69
|
+
if (!role)
|
|
70
|
+
continue;
|
|
71
|
+
if (roles.has(role) || item.receipt.result_handle === null)
|
|
72
|
+
return fail();
|
|
73
|
+
roles.set(role, item);
|
|
74
|
+
}
|
|
75
|
+
return roles;
|
|
76
|
+
};
|
|
77
|
+
const requireRole = (roles, role, supplied) => {
|
|
78
|
+
const found = roles.get(role);
|
|
79
|
+
if ((found === undefined) !== (supplied === undefined))
|
|
80
|
+
return fail();
|
|
81
|
+
if (!found)
|
|
82
|
+
return null;
|
|
83
|
+
if (found.receipt.result_handle !== supplied)
|
|
84
|
+
return fail();
|
|
85
|
+
return found;
|
|
86
|
+
};
|
|
87
|
+
const specFor = (kind, completed, request) => {
|
|
88
|
+
const spec = createDockerResourceSpec({
|
|
89
|
+
kind,
|
|
90
|
+
operationHandle: completed.entry.operation_handle,
|
|
91
|
+
requestDigest: completed.entry.request_digest,
|
|
92
|
+
runId: request.run_id,
|
|
93
|
+
selectedTargetHandle: request.selected_target.handle
|
|
94
|
+
});
|
|
95
|
+
if (spec.resultHandle !== completed.receipt.result_handle)
|
|
96
|
+
return fail();
|
|
97
|
+
return spec;
|
|
98
|
+
};
|
|
99
|
+
const matchingWorld = (binding, request, network, evidence, secretAuthority) => {
|
|
100
|
+
const secretSpec = secretAuthority
|
|
101
|
+
? createExistingDockerSecretSpec(secretAuthority) : null;
|
|
102
|
+
if (binding.world_service_handle !== request.world_service_handle
|
|
103
|
+
|| binding.resolution.authorization.run_id !== request.run_id
|
|
104
|
+
|| binding.resolution.authorization.descriptor_digest !== request.descriptor_digest
|
|
105
|
+
|| !same(binding.resolution.authorization.selected_target, request.selected_target)
|
|
106
|
+
|| binding.resources.data_network.handle !== network.resultHandle
|
|
107
|
+
|| binding.resources.data_network.name !== network.name
|
|
108
|
+
|| !same(binding.resources.data_network.labels, network.labels)
|
|
109
|
+
|| binding.resources.evidence_volume.handle !== evidence?.resultHandle
|
|
110
|
+
|| binding.resources.evidence_volume.name !== evidence?.name
|
|
111
|
+
|| !same(binding.resources.evidence_volume.labels, evidence?.labels)
|
|
112
|
+
|| binding.resources.secret_bindings.handle !== secretSpec?.resultHandle
|
|
113
|
+
|| binding.resources.secret_bindings.name !== secretSpec?.volumeName
|
|
114
|
+
|| !same(binding.resources.secret_bindings.labels, secretSpec?.labels))
|
|
115
|
+
return fail();
|
|
116
|
+
};
|
|
117
|
+
const matchingAttachment = (binding, request, network) => {
|
|
118
|
+
if (binding.attachment_handle !== request.organization_attachment_handle
|
|
119
|
+
|| binding.resolution.authorization.run_id !== request.run_id
|
|
120
|
+
|| binding.resolution.authorization.descriptor_digest !== request.descriptor_digest
|
|
121
|
+
|| !same(binding.resolution.authorization.selected_target, request.selected_target)
|
|
122
|
+
|| binding.data_network.handle !== network.resultHandle
|
|
123
|
+
|| binding.data_network.name !== network.name
|
|
124
|
+
|| !same(binding.data_network.labels, network.labels))
|
|
125
|
+
return fail();
|
|
126
|
+
};
|
|
127
|
+
const exportState = async (evidence, completed, request, options) => {
|
|
128
|
+
const exports = completed.filter(({ entry }) => entry.operation === "export_evidence_volume");
|
|
129
|
+
if (!evidence) {
|
|
130
|
+
if (exports.length !== 0)
|
|
131
|
+
return fail();
|
|
132
|
+
return "not_requested";
|
|
133
|
+
}
|
|
134
|
+
if (exports.length === 0)
|
|
135
|
+
return "incomplete";
|
|
136
|
+
if (exports.length !== 1)
|
|
137
|
+
return fail();
|
|
138
|
+
const exported = exports[0];
|
|
139
|
+
if (exported.receipt.export_state !== "exported"
|
|
140
|
+
|| exported.receipt.result_handle === null)
|
|
141
|
+
return fail();
|
|
142
|
+
const admission = await options.evidenceExportStore.loadAdmission(exported.entry.operation_handle);
|
|
143
|
+
const evidenceAuthority = parseEvidenceVolumeAuthority(admission.evidence_volume);
|
|
144
|
+
if (admission.operation_handle !== exported.entry.operation_handle
|
|
145
|
+
|| admission.request_digest !== exported.entry.request_digest
|
|
146
|
+
|| evidenceAuthority.resultHandle !== evidence.resultHandle
|
|
147
|
+
|| evidenceAuthority.name !== evidence.name
|
|
148
|
+
|| !same(evidenceAuthority.labels, evidence.labels)
|
|
149
|
+
|| admission.run_id !== request.run_id
|
|
150
|
+
|| admission.descriptor_digest !== request.descriptor_digest
|
|
151
|
+
|| !same(admission.selected_target, request.selected_target))
|
|
152
|
+
return fail();
|
|
153
|
+
const loaded = await options.evidenceExportStore.loadIndex(admission);
|
|
154
|
+
if (!loaded)
|
|
155
|
+
return fail();
|
|
156
|
+
const index = parseTargetResourceExportIndex(loaded.index);
|
|
157
|
+
const expectedExportHandle = createEvidenceExportHandle({
|
|
158
|
+
evidenceVolumeHandle: evidence.resultHandle,
|
|
159
|
+
operationHandle: exported.entry.operation_handle,
|
|
160
|
+
requestDigest: exported.entry.request_digest
|
|
161
|
+
});
|
|
162
|
+
if (index.state !== "exported" || index.run_id !== request.run_id
|
|
163
|
+
|| index.export_handle !== expectedExportHandle
|
|
164
|
+
|| exported.receipt.result_handle !== expectedExportHandle
|
|
165
|
+
|| !same(index.labels, evidenceReceiptLabels(evidenceAuthority))
|
|
166
|
+
|| !same(exported.receipt.labels, index.labels))
|
|
167
|
+
return fail();
|
|
168
|
+
return "exported";
|
|
169
|
+
};
|
|
170
|
+
export const prepareDockerCleanupRun = async (request, options) => {
|
|
171
|
+
const completed = await completedEntries(request, options);
|
|
172
|
+
const roles = exactRoles(completed);
|
|
173
|
+
const networkCompleted = roles.get("dataNetwork");
|
|
174
|
+
const network = networkCompleted
|
|
175
|
+
? specFor("data_network", networkCompleted, request)
|
|
176
|
+
: null;
|
|
177
|
+
const evidenceCompleted = requireRole(roles, "evidence", request.evidence_volume_handle);
|
|
178
|
+
const secretCompleted = requireRole(roles, "secrets", request.secret_bindings_handle);
|
|
179
|
+
const worldCompleted = requireRole(roles, "world", request.world_service_handle);
|
|
180
|
+
const attachmentCompleted = requireRole(roles, "attachment", request.organization_attachment_handle);
|
|
181
|
+
if (!network && (worldCompleted || attachmentCompleted))
|
|
182
|
+
return fail();
|
|
183
|
+
const evidence = evidenceCompleted
|
|
184
|
+
? specFor("evidence_volume", evidenceCompleted, request) : null;
|
|
185
|
+
const worldBinding = worldCompleted
|
|
186
|
+
? parseWorldServiceBinding(await options.worldStore.loadService(worldCompleted.receipt.result_handle)) : null;
|
|
187
|
+
const attachmentBinding = attachmentCompleted
|
|
188
|
+
? parseOrganizationAttachmentBinding(await options.attachmentStore.loadAttachment(attachmentCompleted.receipt.result_handle)) : null;
|
|
189
|
+
const secretAuthority = secretCompleted
|
|
190
|
+
? Object.freeze({
|
|
191
|
+
bindingsHandle: secretCompleted.receipt.result_handle,
|
|
192
|
+
runId: request.run_id,
|
|
193
|
+
selectedTargetHandle: request.selected_target.handle
|
|
194
|
+
}) : null;
|
|
195
|
+
if (worldBinding) {
|
|
196
|
+
matchingWorld(worldBinding, request, network, evidence, secretAuthority);
|
|
197
|
+
}
|
|
198
|
+
if (attachmentBinding)
|
|
199
|
+
matchingAttachment(attachmentBinding, request, network);
|
|
200
|
+
if (worldBinding && attachmentBinding
|
|
201
|
+
&& (worldBinding.resources.data_network.handle
|
|
202
|
+
!== attachmentBinding.data_network.handle
|
|
203
|
+
|| worldBinding.resources.data_network.name
|
|
204
|
+
!== attachmentBinding.data_network.name
|
|
205
|
+
|| !same(worldBinding.resources.data_network.labels, attachmentBinding.data_network.labels)))
|
|
206
|
+
return fail();
|
|
207
|
+
const state = await exportState(evidence, completed, request, options);
|
|
208
|
+
if (request.cleanup_policy === "remove" && evidence && state !== "exported") {
|
|
209
|
+
return fail();
|
|
210
|
+
}
|
|
211
|
+
return Object.freeze({
|
|
212
|
+
attachment: attachmentBinding
|
|
213
|
+
? resource(attachmentBinding.attachment_handle, attachmentBinding) : null,
|
|
214
|
+
cleanupPolicy: request.cleanup_policy,
|
|
215
|
+
dataNetwork: network
|
|
216
|
+
? resource(network.resultHandle, Object.freeze(network)) : null,
|
|
217
|
+
evidence: evidence ? resource(evidence.resultHandle, Object.freeze(evidence)) : null,
|
|
218
|
+
exportState: state,
|
|
219
|
+
secrets: secretAuthority
|
|
220
|
+
? resource(secretAuthority.bindingsHandle, secretAuthority) : null,
|
|
221
|
+
world: worldBinding
|
|
222
|
+
? resource(worldBinding.world_service_handle, worldBinding) : null
|
|
223
|
+
});
|
|
224
|
+
};
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type SelectedTargetReceipt, type TargetResourceRequest } from "./contracts.js";
|
|
3
|
+
export declare const COMPOSED_PREPARATION_REQUEST_VERSION: "spawnfile.composed-preparation.request.v1";
|
|
4
|
+
export declare const COMPOSED_PREPARATION_RECEIPT_VERSION: "spawnfile.composed-preparation.receipt.v1";
|
|
5
|
+
export declare const composedPreparationRequestSchema: z.ZodObject<{
|
|
6
|
+
auth_profile: z.ZodString;
|
|
7
|
+
descriptor_digest: z.ZodString;
|
|
8
|
+
idempotency_key: z.ZodString;
|
|
9
|
+
organization: z.ZodObject<{
|
|
10
|
+
artifact_digest: z.ZodString;
|
|
11
|
+
world_bindings_digest: z.ZodString;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
run_id: z.ZodString;
|
|
14
|
+
secret_bindings: z.ZodArray<z.ZodObject<{
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
scope: z.ZodString;
|
|
17
|
+
source_handle: z.ZodString;
|
|
18
|
+
}, z.core.$strict>>;
|
|
19
|
+
target_selector: z.ZodString;
|
|
20
|
+
version: z.ZodLiteral<"spawnfile.composed-preparation.request.v1">;
|
|
21
|
+
world: z.ZodObject<{
|
|
22
|
+
artifact_manifest_digest: z.ZodString;
|
|
23
|
+
bundle_digest: z.ZodString;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
export declare const composedPreparationReceiptSchema: z.ZodObject<{
|
|
27
|
+
auth_profile: z.ZodString;
|
|
28
|
+
descriptor_digest: z.ZodString;
|
|
29
|
+
organization: z.ZodObject<{
|
|
30
|
+
artifact_digest: z.ZodString;
|
|
31
|
+
world_bindings_digest: z.ZodString;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
receipt_digest: z.ZodString;
|
|
34
|
+
request_digest: z.ZodString;
|
|
35
|
+
resources: z.ZodObject<{
|
|
36
|
+
data_network: z.ZodObject<{
|
|
37
|
+
cleanup_state: z.ZodNullable<z.ZodEnum<{
|
|
38
|
+
preserved: "preserved";
|
|
39
|
+
incomplete: "incomplete";
|
|
40
|
+
not_requested: "not_requested";
|
|
41
|
+
removed: "removed";
|
|
42
|
+
}>>;
|
|
43
|
+
descriptor_digest: z.ZodString;
|
|
44
|
+
export_state: z.ZodNullable<z.ZodEnum<{
|
|
45
|
+
exported: "exported";
|
|
46
|
+
incomplete: "incomplete";
|
|
47
|
+
not_requested: "not_requested";
|
|
48
|
+
}>>;
|
|
49
|
+
labels: z.ZodArray<z.ZodObject<{
|
|
50
|
+
key: z.ZodString;
|
|
51
|
+
value: z.ZodString;
|
|
52
|
+
}, z.core.$strict>>;
|
|
53
|
+
operation: z.ZodEnum<{
|
|
54
|
+
resolve_world_artifact: "resolve_world_artifact";
|
|
55
|
+
prepare_secret_bindings: "prepare_secret_bindings";
|
|
56
|
+
create_data_network: "create_data_network";
|
|
57
|
+
create_evidence_volume: "create_evidence_volume";
|
|
58
|
+
}>;
|
|
59
|
+
operation_handle: z.ZodString;
|
|
60
|
+
receipt_digest: z.ZodString;
|
|
61
|
+
request_digest: z.ZodString;
|
|
62
|
+
result_handle: z.ZodString;
|
|
63
|
+
resulting_revision: z.ZodNumber;
|
|
64
|
+
run_id: z.ZodString;
|
|
65
|
+
selected_target: z.ZodObject<{
|
|
66
|
+
fingerprint: z.ZodString;
|
|
67
|
+
handle: z.ZodString;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
version: z.ZodLiteral<"spawnfile.target-resource.receipt.v1">;
|
|
70
|
+
}, z.core.$strict>;
|
|
71
|
+
evidence_volume: z.ZodObject<{
|
|
72
|
+
cleanup_state: z.ZodNullable<z.ZodEnum<{
|
|
73
|
+
preserved: "preserved";
|
|
74
|
+
incomplete: "incomplete";
|
|
75
|
+
not_requested: "not_requested";
|
|
76
|
+
removed: "removed";
|
|
77
|
+
}>>;
|
|
78
|
+
descriptor_digest: z.ZodString;
|
|
79
|
+
export_state: z.ZodNullable<z.ZodEnum<{
|
|
80
|
+
exported: "exported";
|
|
81
|
+
incomplete: "incomplete";
|
|
82
|
+
not_requested: "not_requested";
|
|
83
|
+
}>>;
|
|
84
|
+
labels: z.ZodArray<z.ZodObject<{
|
|
85
|
+
key: z.ZodString;
|
|
86
|
+
value: z.ZodString;
|
|
87
|
+
}, z.core.$strict>>;
|
|
88
|
+
operation: z.ZodEnum<{
|
|
89
|
+
resolve_world_artifact: "resolve_world_artifact";
|
|
90
|
+
prepare_secret_bindings: "prepare_secret_bindings";
|
|
91
|
+
create_data_network: "create_data_network";
|
|
92
|
+
create_evidence_volume: "create_evidence_volume";
|
|
93
|
+
}>;
|
|
94
|
+
operation_handle: z.ZodString;
|
|
95
|
+
receipt_digest: z.ZodString;
|
|
96
|
+
request_digest: z.ZodString;
|
|
97
|
+
result_handle: z.ZodString;
|
|
98
|
+
resulting_revision: z.ZodNumber;
|
|
99
|
+
run_id: z.ZodString;
|
|
100
|
+
selected_target: z.ZodObject<{
|
|
101
|
+
fingerprint: z.ZodString;
|
|
102
|
+
handle: z.ZodString;
|
|
103
|
+
}, z.core.$strict>;
|
|
104
|
+
version: z.ZodLiteral<"spawnfile.target-resource.receipt.v1">;
|
|
105
|
+
}, z.core.$strict>;
|
|
106
|
+
secret_bindings: z.ZodObject<{
|
|
107
|
+
cleanup_state: z.ZodNullable<z.ZodEnum<{
|
|
108
|
+
preserved: "preserved";
|
|
109
|
+
incomplete: "incomplete";
|
|
110
|
+
not_requested: "not_requested";
|
|
111
|
+
removed: "removed";
|
|
112
|
+
}>>;
|
|
113
|
+
descriptor_digest: z.ZodString;
|
|
114
|
+
export_state: z.ZodNullable<z.ZodEnum<{
|
|
115
|
+
exported: "exported";
|
|
116
|
+
incomplete: "incomplete";
|
|
117
|
+
not_requested: "not_requested";
|
|
118
|
+
}>>;
|
|
119
|
+
labels: z.ZodArray<z.ZodObject<{
|
|
120
|
+
key: z.ZodString;
|
|
121
|
+
value: z.ZodString;
|
|
122
|
+
}, z.core.$strict>>;
|
|
123
|
+
operation: z.ZodEnum<{
|
|
124
|
+
resolve_world_artifact: "resolve_world_artifact";
|
|
125
|
+
prepare_secret_bindings: "prepare_secret_bindings";
|
|
126
|
+
create_data_network: "create_data_network";
|
|
127
|
+
create_evidence_volume: "create_evidence_volume";
|
|
128
|
+
}>;
|
|
129
|
+
operation_handle: z.ZodString;
|
|
130
|
+
receipt_digest: z.ZodString;
|
|
131
|
+
request_digest: z.ZodString;
|
|
132
|
+
result_handle: z.ZodString;
|
|
133
|
+
resulting_revision: z.ZodNumber;
|
|
134
|
+
run_id: z.ZodString;
|
|
135
|
+
selected_target: z.ZodObject<{
|
|
136
|
+
fingerprint: z.ZodString;
|
|
137
|
+
handle: z.ZodString;
|
|
138
|
+
}, z.core.$strict>;
|
|
139
|
+
version: z.ZodLiteral<"spawnfile.target-resource.receipt.v1">;
|
|
140
|
+
}, z.core.$strict>;
|
|
141
|
+
world_artifact: z.ZodObject<{
|
|
142
|
+
cleanup_state: z.ZodNullable<z.ZodEnum<{
|
|
143
|
+
preserved: "preserved";
|
|
144
|
+
incomplete: "incomplete";
|
|
145
|
+
not_requested: "not_requested";
|
|
146
|
+
removed: "removed";
|
|
147
|
+
}>>;
|
|
148
|
+
descriptor_digest: z.ZodString;
|
|
149
|
+
export_state: z.ZodNullable<z.ZodEnum<{
|
|
150
|
+
exported: "exported";
|
|
151
|
+
incomplete: "incomplete";
|
|
152
|
+
not_requested: "not_requested";
|
|
153
|
+
}>>;
|
|
154
|
+
labels: z.ZodArray<z.ZodObject<{
|
|
155
|
+
key: z.ZodString;
|
|
156
|
+
value: z.ZodString;
|
|
157
|
+
}, z.core.$strict>>;
|
|
158
|
+
operation: z.ZodEnum<{
|
|
159
|
+
resolve_world_artifact: "resolve_world_artifact";
|
|
160
|
+
prepare_secret_bindings: "prepare_secret_bindings";
|
|
161
|
+
create_data_network: "create_data_network";
|
|
162
|
+
create_evidence_volume: "create_evidence_volume";
|
|
163
|
+
}>;
|
|
164
|
+
operation_handle: z.ZodString;
|
|
165
|
+
receipt_digest: z.ZodString;
|
|
166
|
+
request_digest: z.ZodString;
|
|
167
|
+
result_handle: z.ZodString;
|
|
168
|
+
resulting_revision: z.ZodNumber;
|
|
169
|
+
run_id: z.ZodString;
|
|
170
|
+
selected_target: z.ZodObject<{
|
|
171
|
+
fingerprint: z.ZodString;
|
|
172
|
+
handle: z.ZodString;
|
|
173
|
+
}, z.core.$strict>;
|
|
174
|
+
version: z.ZodLiteral<"spawnfile.target-resource.receipt.v1">;
|
|
175
|
+
}, z.core.$strict>;
|
|
176
|
+
}, z.core.$strict>;
|
|
177
|
+
run_id: z.ZodString;
|
|
178
|
+
selected_target: z.ZodObject<{
|
|
179
|
+
fingerprint: z.ZodString;
|
|
180
|
+
handle: z.ZodString;
|
|
181
|
+
version: z.ZodLiteral<"spawnfile.target-resource.selected-target.v1">;
|
|
182
|
+
}, z.core.$strict>;
|
|
183
|
+
target_selector: z.ZodString;
|
|
184
|
+
version: z.ZodLiteral<"spawnfile.composed-preparation.receipt.v1">;
|
|
185
|
+
world: z.ZodObject<{
|
|
186
|
+
artifact_manifest_digest: z.ZodString;
|
|
187
|
+
bundle_digest: z.ZodString;
|
|
188
|
+
}, z.core.$strict>;
|
|
189
|
+
}, z.core.$strict>;
|
|
190
|
+
export type ComposedPreparationRequest = z.infer<typeof composedPreparationRequestSchema>;
|
|
191
|
+
export type ComposedPreparationReceipt = z.infer<typeof composedPreparationReceiptSchema>;
|
|
192
|
+
export interface ComposedPreparationMutationResult {
|
|
193
|
+
readonly receipt: unknown;
|
|
194
|
+
readonly receiptBytes: unknown;
|
|
195
|
+
}
|
|
196
|
+
export type ComposedPreparationHandlers = {
|
|
197
|
+
[Operation in TargetResourceRequest["operation"]]: (request: Extract<TargetResourceRequest, {
|
|
198
|
+
operation: Operation;
|
|
199
|
+
}>) => Promise<Operation extends "select_target" ? SelectedTargetReceipt : ComposedPreparationMutationResult>;
|
|
200
|
+
};
|
|
201
|
+
export declare const parseComposedPreparationRequest: (raw: unknown) => ComposedPreparationRequest;
|
|
202
|
+
export declare const createComposedPreparationRequestDigest: (raw: unknown) => `sha256:${string}`;
|
|
203
|
+
export declare const parseComposedPreparationReceipt: (raw: unknown) => ComposedPreparationReceipt;
|
|
204
|
+
export declare const createCanonicalComposedPreparationReceiptBytes: (raw: unknown) => string;
|
|
205
|
+
export declare const prepareComposedRun: (handlers: ComposedPreparationHandlers, raw: unknown) => Promise<ComposedPreparationReceipt>;
|