spawnfile 0.1.12 → 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 +58 -12
- 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/runtimeCredentials.js +18 -2
- 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/devCommands.d.ts +3 -0
- package/dist/cli/devCommands.js +115 -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 -179
- 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 +15 -2
- package/dist/cli/runCli.js +31 -71
- package/dist/cli/runPublishCommands.d.ts +3 -0
- package/dist/cli/runPublishCommands.js +70 -0
- package/dist/cli/statusCommand.d.ts +3 -32
- package/dist/cli/statusCommand.js +37 -233
- 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 +20 -1
- package/dist/compiler/buildProject.js +121 -7
- package/dist/compiler/compilePlanHelpers.js +2 -0
- package/dist/compiler/compileProject.d.ts +15 -0
- package/dist/compiler/compileProject.js +29 -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/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 +40 -81
- 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 +60 -53
- 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/containerPackageRender.d.ts +15 -0
- package/dist/compiler/containerPackageRender.js +63 -0
- package/dist/compiler/containerTargetPlanResolution.d.ts +20 -0
- package/dist/compiler/containerTargetPlanResolution.js +97 -0
- package/dist/compiler/containerTargetResources.js +3 -1
- 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 +56 -95
- package/dist/compiler/moltnetBinaries.d.ts +21 -1
- package/dist/compiler/moltnetBinaries.js +156 -28
- package/dist/compiler/moltnetClientConfig.js +18 -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/moltnetRuntimeConfig.js +11 -0
- 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 +37 -22
- 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 +187 -19
- 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 +257 -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.d.ts +17 -0
- package/dist/deployment/dockerRecover.js +137 -0
- 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 +17 -0
- package/dist/deployment/index.js +18 -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/activity.d.ts +14 -0
- package/dist/dev/activity.js +48 -0
- package/dist/dev/docker.d.ts +16 -0
- package/dist/dev/docker.js +71 -0
- package/dist/dev/index.d.ts +2 -0
- package/dist/dev/index.js +2 -0
- package/dist/dev/project.d.ts +35 -0
- package/dist/dev/project.js +170 -0
- 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 +37 -0
- package/dist/runtime/common.js +56 -1
- package/dist/runtime/container.d.ts +29 -1
- package/dist/runtime/container.js +127 -11
- 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/install.d.ts +1 -1
- package/dist/runtime/install.js +43 -1
- 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 +4 -0
- package/dist/runtime/pi/adapter.js +231 -0
- package/dist/runtime/pi/appActivitySource.d.ts +1 -0
- package/dist/runtime/pi/appActivitySource.js +199 -0
- 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 -0
- package/dist/runtime/pi/appCoreSource.js +244 -0
- package/dist/runtime/pi/appPreludeSource.d.ts +1 -0
- package/dist/runtime/pi/appPreludeSource.js +191 -0
- 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 -0
- package/dist/runtime/pi/appSource.js +12 -0
- package/dist/runtime/pi/appTemplate.d.ts +14 -0
- package/dist/runtime/pi/appTemplate.js +27 -0
- 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.d.ts +2 -0
- package/dist/runtime/pi/runAuth.js +185 -0
- 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/registry.js +3 -0
- package/dist/runtime/scheduleUtils.d.ts +2 -0
- package/dist/runtime/scheduleUtils.js +15 -0
- package/dist/runtime/types.d.ts +26 -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/deployments.js +5 -12
- 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 +29 -8
- package/runtimes.yaml +28 -27
- 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,76 @@
|
|
|
1
|
+
import { type OpaqueTargetHandle } from "./contracts.js";
|
|
2
|
+
import { type DockerResourceSpec } from "./dockerResourcesProvider.js";
|
|
3
|
+
export declare const ORGANIZATION_ATTACHMENT_ERROR = "Docker organization attachment failed";
|
|
4
|
+
export declare const ORGANIZATION_NETWORK_INSPECTION_FORMAT = "[{\"Id\":{{json .Id}},\"Name\":{{json .Name}},\"Labels\":{{json .Labels}},\"Internal\":{{json .Internal}}}]";
|
|
5
|
+
export declare const ORGANIZATION_EGRESS_NETWORK_INSPECTION_FORMAT = "[{\"Id\":{{json .Id}},\"Name\":{{json .Name}},\"Internal\":{{json .Internal}}}]";
|
|
6
|
+
/**
|
|
7
|
+
* A semantic-only organization projection for the owner-side topology
|
|
8
|
+
* attestor. It neither returns nor accepts any discovered network name.
|
|
9
|
+
*/
|
|
10
|
+
export declare const organizationTopologyInspectionFormat: (networkName: string) => string;
|
|
11
|
+
declare const DEPLOYMENT_LABEL_KEYS: readonly ["com.spawnfile.compile_fingerprint", "com.spawnfile.deployment", "com.spawnfile.project", "com.spawnfile.run_id", "com.spawnfile.unit", "com.spawnfile.version"];
|
|
12
|
+
export interface DockerOrganizationAttachmentExecutor {
|
|
13
|
+
(file: string, args: string[], options: {
|
|
14
|
+
signal?: AbortSignal;
|
|
15
|
+
timeout: number;
|
|
16
|
+
}): Promise<{
|
|
17
|
+
stderr: string;
|
|
18
|
+
stdout: string;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
export type DockerOrganizationAttachmentFailureKind = "not_found";
|
|
22
|
+
export declare class DockerOrganizationAttachmentProviderError extends Error {
|
|
23
|
+
readonly kind: DockerOrganizationAttachmentFailureKind;
|
|
24
|
+
constructor(kind: DockerOrganizationAttachmentFailureKind);
|
|
25
|
+
}
|
|
26
|
+
export type OrganizationDeploymentLabels = Readonly<Record<(typeof DEPLOYMENT_LABEL_KEYS)[number], string>>;
|
|
27
|
+
export interface DockerOrganizationAttachmentSpec {
|
|
28
|
+
readonly containerId: string;
|
|
29
|
+
readonly containerInspectionFormat: string;
|
|
30
|
+
readonly deploymentLabels: OrganizationDeploymentLabels;
|
|
31
|
+
readonly network: DockerResourceSpec;
|
|
32
|
+
readonly receiptLabels: Readonly<Record<string, string>>;
|
|
33
|
+
readonly resultHandle: OpaqueTargetHandle;
|
|
34
|
+
}
|
|
35
|
+
export declare const parseOrganizationContainerId: (raw: unknown) => string;
|
|
36
|
+
export declare const parseOrganizationDeploymentLabels: (raw: unknown) => OrganizationDeploymentLabels;
|
|
37
|
+
export declare const createDockerOrganizationAttachmentSpec: (input: {
|
|
38
|
+
readonly containerId: unknown;
|
|
39
|
+
readonly dataNetworkOperationHandle: OpaqueTargetHandle;
|
|
40
|
+
readonly dataNetworkRequestDigest: string;
|
|
41
|
+
readonly deploymentLabels: unknown;
|
|
42
|
+
readonly operationHandle: OpaqueTargetHandle;
|
|
43
|
+
readonly organizationHandoffHandle: OpaqueTargetHandle;
|
|
44
|
+
readonly requestDigest: string;
|
|
45
|
+
readonly runId: string;
|
|
46
|
+
readonly selectedTargetHandle: OpaqueTargetHandle;
|
|
47
|
+
}) => DockerOrganizationAttachmentSpec;
|
|
48
|
+
export declare const executeDockerOrganizationAttachment: (input: {
|
|
49
|
+
readonly args: string[];
|
|
50
|
+
readonly executor: DockerOrganizationAttachmentExecutor;
|
|
51
|
+
readonly signal?: AbortSignal;
|
|
52
|
+
readonly timeoutMs: number;
|
|
53
|
+
}) => Promise<{
|
|
54
|
+
stderr: string;
|
|
55
|
+
stdout: string;
|
|
56
|
+
}>;
|
|
57
|
+
export declare const parseExpectedOrganizationNetwork: (stdout: string, spec: DockerOrganizationAttachmentSpec) => string | null;
|
|
58
|
+
export declare const parseExpectedOrganizationContainer: (stdout: string, spec: DockerOrganizationAttachmentSpec) => {
|
|
59
|
+
readonly attached: boolean;
|
|
60
|
+
} | null;
|
|
61
|
+
/**
|
|
62
|
+
* The attached organization keeps exactly its owner-managed egress attachment
|
|
63
|
+
* plus the target-owned private data attachment. This is intentionally a
|
|
64
|
+
* boolean validator so private Docker names cannot escape the provider layer.
|
|
65
|
+
*/
|
|
66
|
+
export declare const parseExpectedOrganizationEgressNetwork: (stdout: string, spec: DockerOrganizationAttachmentSpec) => {
|
|
67
|
+
readonly dataNetworkId: string;
|
|
68
|
+
readonly id: string;
|
|
69
|
+
readonly name: string;
|
|
70
|
+
} | null;
|
|
71
|
+
/** Validates exactly one owner-managed non-internal egress network by name. */
|
|
72
|
+
export declare const isExpectedOrganizationEgressNetwork: (stdout: string, expected: {
|
|
73
|
+
readonly id: string;
|
|
74
|
+
readonly name: string;
|
|
75
|
+
}) => boolean;
|
|
76
|
+
export {};
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import { assertOrdinaryJsonGraph, parseOpaqueTargetHandle, parseRunId } from "./contracts.js";
|
|
4
|
+
import { createDockerResourceSpec } from "./dockerResourcesProvider.js";
|
|
5
|
+
export const ORGANIZATION_ATTACHMENT_ERROR = "Docker organization attachment failed";
|
|
6
|
+
export const ORGANIZATION_NETWORK_INSPECTION_FORMAT = "[{\"Id\":{{json .Id}},\"Name\":{{json .Name}},\"Labels\":{{json .Labels}},\"Internal\":{{json .Internal}}}]";
|
|
7
|
+
export const ORGANIZATION_EGRESS_NETWORK_INSPECTION_FORMAT = "[{\"Id\":{{json .Id}},\"Name\":{{json .Name}},\"Internal\":{{json .Internal}}}]";
|
|
8
|
+
/**
|
|
9
|
+
* A semantic-only organization projection for the owner-side topology
|
|
10
|
+
* attestor. It neither returns nor accepts any discovered network name.
|
|
11
|
+
*/
|
|
12
|
+
export const organizationTopologyInspectionFormat = (networkName) => {
|
|
13
|
+
if (!/^spfn_[a-f0-9]{58}$/u.test(networkName))
|
|
14
|
+
return fail();
|
|
15
|
+
const labels = DEPLOYMENT_LABEL_KEYS
|
|
16
|
+
.map((key) => `${JSON.stringify(key)}:{{json (index .Config.Labels ${JSON.stringify(key)})}}`)
|
|
17
|
+
.join(",");
|
|
18
|
+
return `[{"Id":{{json .Id}},"Labels":{${labels}},"DataAttached":{{if index .NetworkSettings.Networks ${JSON.stringify(networkName)}}}true{{else}}false{{end}},"DataNetworkId":{{json (index .NetworkSettings.Networks ${JSON.stringify(networkName)}).NetworkID}},"NetworkAttachmentCount":{{len .NetworkSettings.Networks}},"NetworkMode":{{json .HostConfig.NetworkMode}},"EgressNetworkName":{{range $name, $network := .NetworkSettings.Networks}}{{if ne $name ${JSON.stringify(networkName)}}}{{json $name}}{{end}}{{end}},"EgressNetworkId":{{range $name, $network := .NetworkSettings.Networks}}{{if ne $name ${JSON.stringify(networkName)}}}{{json $network.NetworkID}}{{end}}{{end}}}]`;
|
|
19
|
+
};
|
|
20
|
+
const MAX_OUTPUT_BYTES = 32_768;
|
|
21
|
+
const DOCKER_ID_PATTERN = /^[a-f0-9]{64}$/u;
|
|
22
|
+
const LABEL_VALUE_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$/u;
|
|
23
|
+
const DEPLOYMENT_LABEL_KEYS = Object.freeze([
|
|
24
|
+
"com.spawnfile.compile_fingerprint",
|
|
25
|
+
"com.spawnfile.deployment",
|
|
26
|
+
"com.spawnfile.project",
|
|
27
|
+
"com.spawnfile.run_id",
|
|
28
|
+
"com.spawnfile.unit",
|
|
29
|
+
"com.spawnfile.version"
|
|
30
|
+
]);
|
|
31
|
+
export class DockerOrganizationAttachmentProviderError extends Error {
|
|
32
|
+
kind;
|
|
33
|
+
constructor(kind) {
|
|
34
|
+
super(ORGANIZATION_ATTACHMENT_ERROR);
|
|
35
|
+
this.kind = kind;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const fail = () => { throw new Error(ORGANIZATION_ATTACHMENT_ERROR); };
|
|
39
|
+
const ordinary = (raw) => {
|
|
40
|
+
try {
|
|
41
|
+
assertOrdinaryJsonGraph(raw);
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return fail();
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const bytes = (value) => Buffer.byteLength(value, "utf8");
|
|
48
|
+
const exactKeys = (value, expected) => {
|
|
49
|
+
const actual = Object.keys(value).sort();
|
|
50
|
+
const sorted = [...expected].sort();
|
|
51
|
+
return actual.length === sorted.length
|
|
52
|
+
&& actual.every((key, index) => key === sorted[index]);
|
|
53
|
+
};
|
|
54
|
+
const exactRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value)
|
|
55
|
+
&& Object.getPrototypeOf(value) === Object.prototype;
|
|
56
|
+
const digest = (domain, value) => createHash("sha256")
|
|
57
|
+
.update(`spawnfile.target-organization-attachment.${domain}.v1\0`, "utf8")
|
|
58
|
+
.update(value, "utf8")
|
|
59
|
+
.digest("hex");
|
|
60
|
+
const label = (prefix, value) => `${prefix}${digest("label", value).slice(0, 63)}`;
|
|
61
|
+
export const parseOrganizationContainerId = (raw) => {
|
|
62
|
+
if (typeof raw !== "string" || !DOCKER_ID_PATTERN.test(raw))
|
|
63
|
+
return fail();
|
|
64
|
+
return raw;
|
|
65
|
+
};
|
|
66
|
+
export const parseOrganizationDeploymentLabels = (raw) => {
|
|
67
|
+
ordinary(raw);
|
|
68
|
+
if (!exactRecord(raw) || !exactKeys(raw, DEPLOYMENT_LABEL_KEYS))
|
|
69
|
+
return fail();
|
|
70
|
+
for (const key of DEPLOYMENT_LABEL_KEYS) {
|
|
71
|
+
if (typeof raw[key] !== "string" || !LABEL_VALUE_PATTERN.test(raw[key]))
|
|
72
|
+
return fail();
|
|
73
|
+
}
|
|
74
|
+
return Object.freeze(Object.fromEntries(DEPLOYMENT_LABEL_KEYS.map((key) => [key, raw[key]])));
|
|
75
|
+
};
|
|
76
|
+
const containerInspectionFormat = (networkName) => {
|
|
77
|
+
const labels = DEPLOYMENT_LABEL_KEYS
|
|
78
|
+
.map((key) => `${JSON.stringify(key)}:{{json (index .Config.Labels ${JSON.stringify(key)})}}`)
|
|
79
|
+
.join(",");
|
|
80
|
+
return `[{"Id":{{json .Id}},"Labels":{${labels}},"Attached":{{if index .NetworkSettings.Networks ${JSON.stringify(networkName)}}}true{{else}}false{{end}}}]`;
|
|
81
|
+
};
|
|
82
|
+
export const createDockerOrganizationAttachmentSpec = (input) => {
|
|
83
|
+
const containerId = parseOrganizationContainerId(input.containerId);
|
|
84
|
+
const deploymentLabels = parseOrganizationDeploymentLabels(input.deploymentLabels);
|
|
85
|
+
const organizationHandoffHandle = parseOpaqueTargetHandle(input.organizationHandoffHandle);
|
|
86
|
+
const operationHandle = parseOpaqueTargetHandle(input.operationHandle);
|
|
87
|
+
if (!/^sha256:[a-f0-9]{64}$/u.test(input.requestDigest)
|
|
88
|
+
|| !/^sha256:[a-f0-9]{64}$/u.test(input.dataNetworkRequestDigest))
|
|
89
|
+
return fail();
|
|
90
|
+
const runId = parseRunId(input.runId);
|
|
91
|
+
const selectedTargetHandle = parseOpaqueTargetHandle(input.selectedTargetHandle);
|
|
92
|
+
const network = createDockerResourceSpec({
|
|
93
|
+
kind: "data_network",
|
|
94
|
+
operationHandle: parseOpaqueTargetHandle(input.dataNetworkOperationHandle),
|
|
95
|
+
requestDigest: input.dataNetworkRequestDigest,
|
|
96
|
+
runId,
|
|
97
|
+
selectedTargetHandle
|
|
98
|
+
});
|
|
99
|
+
const authority = `${operationHandle}\0${input.requestDigest}\0${organizationHandoffHandle}\0${network.resultHandle}`;
|
|
100
|
+
const receiptLabels = Object.freeze({
|
|
101
|
+
spawnfile_attachment_v1_handoff: label("h", organizationHandoffHandle),
|
|
102
|
+
spawnfile_attachment_v1_kind: "organization_attachment",
|
|
103
|
+
spawnfile_attachment_v1_network: label("n", network.resultHandle),
|
|
104
|
+
spawnfile_attachment_v1_operation: label("o", `${operationHandle}\0${input.requestDigest}`),
|
|
105
|
+
spawnfile_attachment_v1_target: label("t", selectedTargetHandle),
|
|
106
|
+
spawnfile_attachment_v1_version: "v1"
|
|
107
|
+
});
|
|
108
|
+
return Object.freeze({
|
|
109
|
+
containerId,
|
|
110
|
+
containerInspectionFormat: containerInspectionFormat(network.name),
|
|
111
|
+
deploymentLabels,
|
|
112
|
+
network,
|
|
113
|
+
receiptLabels,
|
|
114
|
+
resultHandle: parseOpaqueTargetHandle(`opaque_${digest("result", authority)}`)
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
const isUtf8 = (value) => Buffer.from(value, "utf8").toString("utf8") === value;
|
|
118
|
+
const boundedText = (value) => typeof value === "string" && isUtf8(value) && bytes(value) <= MAX_OUTPUT_BYTES;
|
|
119
|
+
export const executeDockerOrganizationAttachment = async (input) => {
|
|
120
|
+
try {
|
|
121
|
+
const result = await input.executor("docker", input.args, {
|
|
122
|
+
signal: input.signal,
|
|
123
|
+
timeout: input.timeoutMs
|
|
124
|
+
});
|
|
125
|
+
if (!result || !boundedText(result.stdout) || !boundedText(result.stderr))
|
|
126
|
+
return fail();
|
|
127
|
+
return result;
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
if (error instanceof DockerOrganizationAttachmentProviderError)
|
|
131
|
+
throw error;
|
|
132
|
+
return fail();
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
const skipWhitespace = (source, index) => {
|
|
136
|
+
while (index < source.length && /[\t\n\r ]/u.test(source[index]))
|
|
137
|
+
index += 1;
|
|
138
|
+
return index;
|
|
139
|
+
};
|
|
140
|
+
const stringEnd = (source, start) => {
|
|
141
|
+
let index = start + 1;
|
|
142
|
+
while (index < source.length) {
|
|
143
|
+
if (source[index] === "\\") {
|
|
144
|
+
index += 2;
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
if (source[index] === "\"")
|
|
148
|
+
return index + 1;
|
|
149
|
+
index += 1;
|
|
150
|
+
}
|
|
151
|
+
return fail();
|
|
152
|
+
};
|
|
153
|
+
const duplicateFreeValue = (source, start) => {
|
|
154
|
+
let index = skipWhitespace(source, start);
|
|
155
|
+
const token = source[index];
|
|
156
|
+
if (token === "\"")
|
|
157
|
+
return stringEnd(source, index);
|
|
158
|
+
if (token === "{") {
|
|
159
|
+
index = skipWhitespace(source, index + 1);
|
|
160
|
+
const keys = new Set();
|
|
161
|
+
if (source[index] === "}")
|
|
162
|
+
return index + 1;
|
|
163
|
+
while (true) {
|
|
164
|
+
if (source[index] !== "\"")
|
|
165
|
+
return fail();
|
|
166
|
+
const end = stringEnd(source, index);
|
|
167
|
+
const key = JSON.parse(source.slice(index, end));
|
|
168
|
+
if (keys.has(key))
|
|
169
|
+
return fail();
|
|
170
|
+
keys.add(key);
|
|
171
|
+
index = skipWhitespace(source, end);
|
|
172
|
+
if (source[index] !== ":")
|
|
173
|
+
return fail();
|
|
174
|
+
index = duplicateFreeValue(source, index + 1);
|
|
175
|
+
index = skipWhitespace(source, index);
|
|
176
|
+
if (source[index] === "}")
|
|
177
|
+
return index + 1;
|
|
178
|
+
if (source[index] !== ",")
|
|
179
|
+
return fail();
|
|
180
|
+
index = skipWhitespace(source, index + 1);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
if (token === "[") {
|
|
184
|
+
index = skipWhitespace(source, index + 1);
|
|
185
|
+
if (source[index] === "]")
|
|
186
|
+
return index + 1;
|
|
187
|
+
while (true) {
|
|
188
|
+
index = duplicateFreeValue(source, index);
|
|
189
|
+
index = skipWhitespace(source, index);
|
|
190
|
+
if (source[index] === "]")
|
|
191
|
+
return index + 1;
|
|
192
|
+
if (source[index] !== ",")
|
|
193
|
+
return fail();
|
|
194
|
+
index = skipWhitespace(source, index + 1);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
while (index < source.length && !/[\t\n\r ,}\]]/u.test(source[index]))
|
|
198
|
+
index += 1;
|
|
199
|
+
if (index === start)
|
|
200
|
+
return fail();
|
|
201
|
+
return index;
|
|
202
|
+
};
|
|
203
|
+
const parseProjection = (stdout) => {
|
|
204
|
+
try {
|
|
205
|
+
if (!boundedText(stdout))
|
|
206
|
+
return null;
|
|
207
|
+
const end = duplicateFreeValue(stdout, 0);
|
|
208
|
+
if (skipWhitespace(stdout, end) !== stdout.length)
|
|
209
|
+
return null;
|
|
210
|
+
const raw = JSON.parse(stdout);
|
|
211
|
+
assertOrdinaryJsonGraph(raw);
|
|
212
|
+
if (!Array.isArray(raw) || raw.length !== 1 || !exactRecord(raw[0]))
|
|
213
|
+
return null;
|
|
214
|
+
return raw[0];
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
export const parseExpectedOrganizationNetwork = (stdout, spec) => {
|
|
221
|
+
const record = parseProjection(stdout);
|
|
222
|
+
if (!record || !exactKeys(record, ["Id", "Internal", "Labels", "Name"])
|
|
223
|
+
|| record.Name !== spec.network.name || record.Internal !== true
|
|
224
|
+
|| !exactRecord(record.Labels)) {
|
|
225
|
+
return null;
|
|
226
|
+
}
|
|
227
|
+
const labels = record.Labels;
|
|
228
|
+
if (!exactKeys(labels, Object.keys(spec.network.labels))
|
|
229
|
+
|| Object.entries(spec.network.labels).some(([key, value]) => labels[key] !== value)) {
|
|
230
|
+
return null;
|
|
231
|
+
}
|
|
232
|
+
try {
|
|
233
|
+
return parseOrganizationContainerId(record.Id);
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
return null;
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
export const parseExpectedOrganizationContainer = (stdout, spec) => {
|
|
240
|
+
const record = parseProjection(stdout);
|
|
241
|
+
if (!record || !exactKeys(record, ["Attached", "Id", "Labels"])
|
|
242
|
+
|| record.Id !== spec.containerId || typeof record.Attached !== "boolean")
|
|
243
|
+
return null;
|
|
244
|
+
try {
|
|
245
|
+
const labels = parseOrganizationDeploymentLabels(record.Labels);
|
|
246
|
+
if (DEPLOYMENT_LABEL_KEYS.some((key) => labels[key] !== spec.deploymentLabels[key]))
|
|
247
|
+
return null;
|
|
248
|
+
return Object.freeze({ attached: record.Attached });
|
|
249
|
+
}
|
|
250
|
+
catch {
|
|
251
|
+
return null;
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* The attached organization keeps exactly its owner-managed egress attachment
|
|
256
|
+
* plus the target-owned private data attachment. This is intentionally a
|
|
257
|
+
* boolean validator so private Docker names cannot escape the provider layer.
|
|
258
|
+
*/
|
|
259
|
+
export const parseExpectedOrganizationEgressNetwork = (stdout, spec) => {
|
|
260
|
+
const record = parseProjection(stdout);
|
|
261
|
+
if (!record || !exactKeys(record, ["DataAttached", "DataNetworkId", "EgressNetworkId", "EgressNetworkName", "Id", "Labels", "NetworkAttachmentCount", "NetworkMode"])
|
|
262
|
+
|| record.Id !== spec.containerId || record.DataAttached !== true
|
|
263
|
+
|| record.NetworkAttachmentCount !== 2 || typeof record.EgressNetworkName !== "string"
|
|
264
|
+
|| typeof record.EgressNetworkId !== "string"
|
|
265
|
+
|| typeof record.DataNetworkId !== "string"
|
|
266
|
+
|| typeof record.NetworkMode !== "string" || record.NetworkMode === "host"
|
|
267
|
+
|| record.NetworkMode === "none" || record.NetworkMode.startsWith("container:")
|
|
268
|
+
|| record.EgressNetworkName === spec.network.name
|
|
269
|
+
|| !/^[A-Za-z0-9][A-Za-z0-9_.-]{0,254}$/u.test(record.EgressNetworkName))
|
|
270
|
+
return null;
|
|
271
|
+
try {
|
|
272
|
+
const labels = parseOrganizationDeploymentLabels(record.Labels);
|
|
273
|
+
return DEPLOYMENT_LABEL_KEYS.every((key) => labels[key] === spec.deploymentLabels[key])
|
|
274
|
+
? Object.freeze({
|
|
275
|
+
dataNetworkId: parseOrganizationContainerId(record.DataNetworkId),
|
|
276
|
+
id: parseOrganizationContainerId(record.EgressNetworkId),
|
|
277
|
+
name: record.EgressNetworkName
|
|
278
|
+
}) : null;
|
|
279
|
+
}
|
|
280
|
+
catch {
|
|
281
|
+
return null;
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
/** Validates exactly one owner-managed non-internal egress network by name. */
|
|
285
|
+
export const isExpectedOrganizationEgressNetwork = (stdout, expected) => {
|
|
286
|
+
const record = parseProjection(stdout);
|
|
287
|
+
return Boolean(record && exactKeys(record, ["Id", "Internal", "Name"])
|
|
288
|
+
&& record.Id === expected.id && record.Name === expected.name && record.Internal === false);
|
|
289
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type OpaqueTargetHandle } from "./contracts.js";
|
|
2
|
+
import { type DockerOrganizationAttachmentSpec } from "./organizationAttachmentProvider.js";
|
|
3
|
+
import { type OrganizationAttachmentResolution } from "./organizationAttachmentAuthority.js";
|
|
4
|
+
declare const ATTACHMENT_VERSION: "spawnfile.target-organization-attachment.private-binding.v1";
|
|
5
|
+
declare const MUTATION_ADMISSION_VERSION: "spawnfile.target-organization-attachment.private-mutation-admission.v1";
|
|
6
|
+
export interface OrganizationAttachmentBinding {
|
|
7
|
+
readonly attachment_handle: OpaqueTargetHandle;
|
|
8
|
+
readonly data_network: {
|
|
9
|
+
readonly handle: OpaqueTargetHandle;
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly labels: Readonly<Record<string, string>>;
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly operation_handle: OpaqueTargetHandle;
|
|
14
|
+
readonly request_digest: string;
|
|
15
|
+
};
|
|
16
|
+
readonly receipt_labels: Readonly<Record<string, string>>;
|
|
17
|
+
readonly resolution: OrganizationAttachmentResolution;
|
|
18
|
+
readonly version: typeof ATTACHMENT_VERSION;
|
|
19
|
+
}
|
|
20
|
+
export interface OrganizationAttachmentAuthorityStore {
|
|
21
|
+
bindAttachment(binding: OrganizationAttachmentBinding): Promise<void>;
|
|
22
|
+
bindMutationAdmission(admission: OrganizationAttachmentMutationAdmission): Promise<void>;
|
|
23
|
+
bindResolution(resolution: OrganizationAttachmentResolution): Promise<void>;
|
|
24
|
+
loadAttachment(handle: OpaqueTargetHandle): Promise<OrganizationAttachmentBinding>;
|
|
25
|
+
requireMutationAdmission(admission: OrganizationAttachmentMutationAdmission): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
export interface OrganizationAttachmentMutationAdmission {
|
|
28
|
+
readonly attachment_handle: OpaqueTargetHandle;
|
|
29
|
+
readonly container_id: string;
|
|
30
|
+
readonly data_network_id: string;
|
|
31
|
+
readonly operation: "attach_organization" | "detach_organization";
|
|
32
|
+
readonly operation_handle: OpaqueTargetHandle;
|
|
33
|
+
readonly request_digest: string;
|
|
34
|
+
readonly version: typeof MUTATION_ADMISSION_VERSION;
|
|
35
|
+
}
|
|
36
|
+
export declare const createOrganizationAttachmentBinding: (input: {
|
|
37
|
+
readonly dataNetworkOperationHandle: OpaqueTargetHandle;
|
|
38
|
+
readonly dataNetworkRequestDigest: string;
|
|
39
|
+
readonly networkId: unknown;
|
|
40
|
+
readonly resolution: unknown;
|
|
41
|
+
readonly spec: DockerOrganizationAttachmentSpec;
|
|
42
|
+
}) => OrganizationAttachmentBinding;
|
|
43
|
+
export declare const parseOrganizationAttachmentBinding: (raw: unknown) => OrganizationAttachmentBinding;
|
|
44
|
+
export declare const createOrganizationAttachmentMutationAdmission: (input: {
|
|
45
|
+
readonly binding: OrganizationAttachmentBinding;
|
|
46
|
+
readonly operation: "attach_organization" | "detach_organization";
|
|
47
|
+
readonly operationHandle: OpaqueTargetHandle;
|
|
48
|
+
readonly requestDigest: string;
|
|
49
|
+
}) => OrganizationAttachmentMutationAdmission;
|
|
50
|
+
export declare const initializeOrganizationAttachmentAuthorityStore: (root: unknown) => Promise<OrganizationAttachmentAuthorityStore>;
|
|
51
|
+
export {};
|