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,109 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import path from "node:path/posix";
|
|
3
|
+
import { slugify } from "../compiler/helpers.js";
|
|
4
|
+
export const MNEME_PACKAGE = "@noopolis/mneme@0.1.1";
|
|
5
|
+
export const resolveMnemeMemoryRuntimeHomePath = (access) => {
|
|
6
|
+
const store = access.bank.store;
|
|
7
|
+
if (store.kind !== "sqlite" && store.kind !== "json") {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
if (store.persistence?.mount) {
|
|
11
|
+
return store.persistence.mount;
|
|
12
|
+
}
|
|
13
|
+
return store.path ? path.dirname(store.path) : null;
|
|
14
|
+
};
|
|
15
|
+
export const isMnemeMemoryAccessSupported = (access) => resolveMnemeMemoryRuntimeHomePath(access) !== null;
|
|
16
|
+
const memoryAccessKey = (access) => `${access.source}:${access.bank.id}`;
|
|
17
|
+
const sourceDiscriminatorFor = (access) => {
|
|
18
|
+
const nameSlug = slugify(`${access.declaringKind}-${access.bank.declaredName}`) || access.declaringKind;
|
|
19
|
+
const sourceHash = createHash("sha256").update(access.source).digest("hex").slice(0, 8);
|
|
20
|
+
return `${nameSlug}-${sourceHash}`;
|
|
21
|
+
};
|
|
22
|
+
const hasDuplicateBankId = (node, access) => {
|
|
23
|
+
const keys = new Set((node.memoryAccess ?? [])
|
|
24
|
+
.filter(isMnemeMemoryAccessSupported)
|
|
25
|
+
.filter((candidate) => candidate.bank.id === access.bank.id)
|
|
26
|
+
.map(memoryAccessKey));
|
|
27
|
+
return keys.size > 1;
|
|
28
|
+
};
|
|
29
|
+
export const mnemeMemoryServerBaseName = (node, access) => {
|
|
30
|
+
const bankSlug = slugify(access.bank.id) || "memory";
|
|
31
|
+
const sourceSuffix = hasDuplicateBankId(node, access) ? `-${sourceDiscriminatorFor(access)}` : "";
|
|
32
|
+
return `mneme-${bankSlug}${sourceSuffix}`;
|
|
33
|
+
};
|
|
34
|
+
export const mnemeMemoryServerName = (node, access, mode) => {
|
|
35
|
+
const baseName = mnemeMemoryServerBaseName(node, access);
|
|
36
|
+
return mode === "dream" ? `${baseName}-dream` : baseName;
|
|
37
|
+
};
|
|
38
|
+
const embeddingArgsFor = (access) => {
|
|
39
|
+
const vector = access.bank.index.vector;
|
|
40
|
+
if (!vector.enabled || !vector.model) {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
const provider = vector.provider ?? "ollama";
|
|
44
|
+
if (provider !== "ollama") {
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
return [
|
|
48
|
+
"--embedding-provider",
|
|
49
|
+
provider,
|
|
50
|
+
"--embedding-model",
|
|
51
|
+
vector.model,
|
|
52
|
+
...(vector.base_url ? ["--embedding-base-url", vector.base_url] : []),
|
|
53
|
+
...(vector.dimensions ? ["--embedding-dimensions", String(vector.dimensions)] : []),
|
|
54
|
+
...(vector.timeout_ms ? ["--embedding-timeout-ms", String(vector.timeout_ms)] : [])
|
|
55
|
+
];
|
|
56
|
+
};
|
|
57
|
+
export const buildMnemeMemoryMcpServers = (node, options = {}) => {
|
|
58
|
+
const result = {};
|
|
59
|
+
const seen = new Set();
|
|
60
|
+
const modes = options.modes ?? ["awake"];
|
|
61
|
+
for (const access of node.memoryAccess ?? []) {
|
|
62
|
+
const runtimeHome = resolveMnemeMemoryRuntimeHomePath(access);
|
|
63
|
+
if (!runtimeHome) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
const key = `${access.source}:${access.bank.id}`;
|
|
67
|
+
if (seen.has(key)) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
seen.add(key);
|
|
71
|
+
for (const mode of modes) {
|
|
72
|
+
const name = mnemeMemoryServerName(node, access, mode);
|
|
73
|
+
result[name] = {
|
|
74
|
+
enabled: true,
|
|
75
|
+
command: "mneme",
|
|
76
|
+
args: [
|
|
77
|
+
"mcp",
|
|
78
|
+
"--runtime-home",
|
|
79
|
+
runtimeHome,
|
|
80
|
+
"--agent-id",
|
|
81
|
+
slugify(node.name) || "agent",
|
|
82
|
+
"--mode",
|
|
83
|
+
mode,
|
|
84
|
+
"--source",
|
|
85
|
+
`spawnfile:${access.declaringKind}:${access.bank.id}`,
|
|
86
|
+
...embeddingArgsFor(access)
|
|
87
|
+
]
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return result;
|
|
92
|
+
};
|
|
93
|
+
export const hasScheduledMemoryConsolidation = (node) => (node.memoryAccess ?? []).some((access) => isMnemeMemoryAccessSupported(access) &&
|
|
94
|
+
access.bank.consolidation.mode === "scheduled" &&
|
|
95
|
+
Boolean(access.bank.consolidation.schedule));
|
|
96
|
+
export const hasUnsupportedMnemeMemoryAccess = (node) => {
|
|
97
|
+
const checked = new Set();
|
|
98
|
+
for (const access of node.memoryAccess ?? []) {
|
|
99
|
+
const key = `${access.source}:${access.bank.id}`;
|
|
100
|
+
if (checked.has(key)) {
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
checked.add(key);
|
|
104
|
+
if (!resolveMnemeMemoryRuntimeHomePath(access)) {
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return false;
|
|
109
|
+
};
|
|
@@ -6,6 +6,9 @@ import { prepareOpenClawRuntimeAuth } from "./runAuth.js";
|
|
|
6
6
|
import { createOpenClawAgentScaffold } from "./scaffold.js";
|
|
7
7
|
import { assertSupportedOpenClawSurfaces, buildOpenClawChannelConfig, buildOpenClawSurfaceEnvBindings } from "./surfaces.js";
|
|
8
8
|
import { buildOpenClawMoltnetConfig, buildOpenClawMoltnetEnvBindings, validateOpenClawMoltnetRuntimeOptions } from "./moltnet.js";
|
|
9
|
+
import { buildOpenClawMcpConfig, buildOpenClawMcpEnvBindings, openClawMemoryCapabilityFor } from "./mcp.js";
|
|
10
|
+
import { MNEME_PACKAGE } from "../mnemeMcp.js";
|
|
11
|
+
import { createOpenClawCronStoreFile } from "./schedules.js";
|
|
9
12
|
import { openClawStatusProbes } from "./statusProbes.js";
|
|
10
13
|
const buildEnvSecretRef = (envName) => ({
|
|
11
14
|
id: envName,
|
|
@@ -88,6 +91,10 @@ const buildOpenClawConfig = (node) => {
|
|
|
88
91
|
if (moltnet) {
|
|
89
92
|
config.moltnet = moltnet;
|
|
90
93
|
}
|
|
94
|
+
const mcp = buildOpenClawMcpConfig(node);
|
|
95
|
+
if (mcp) {
|
|
96
|
+
config.mcp = mcp;
|
|
97
|
+
}
|
|
91
98
|
// Bake the import-auth (claude-code/codex) OAuth structure at compile time so
|
|
92
99
|
// the image is self-sufficient; only the credential tokens are injected later.
|
|
93
100
|
const authBaked = applyOpenClawImportAuthConfig(config, resolveOpenClawImportAuthModes(node));
|
|
@@ -118,6 +125,7 @@ const createContainerTargets = async (inputs) => inputs.map((input) => {
|
|
|
118
125
|
]
|
|
119
126
|
: []),
|
|
120
127
|
...(buildOpenClawSurfaceEnvBindings(agent?.surfaces) ?? []),
|
|
128
|
+
...(agent ? buildOpenClawMcpEnvBindings(agent.mcpServers) : []),
|
|
121
129
|
...(agent ? (buildOpenClawMoltnetEnvBindings(agent.runtime.options) ?? []) : [])
|
|
122
130
|
];
|
|
123
131
|
return {
|
|
@@ -164,6 +172,7 @@ export const openClawAdapter = {
|
|
|
164
172
|
required: true
|
|
165
173
|
}
|
|
166
174
|
],
|
|
175
|
+
globalNpmPackages: [MNEME_PACKAGE],
|
|
167
176
|
homeEnv: "OPENCLAW_HOME",
|
|
168
177
|
instancePaths: {
|
|
169
178
|
configPathTemplate: "<instance-root>/home/.openclaw/<config-file>",
|
|
@@ -194,23 +203,25 @@ export const openClawAdapter = {
|
|
|
194
203
|
}
|
|
195
204
|
},
|
|
196
205
|
async compileAgent(node) {
|
|
206
|
+
const memoryCapability = openClawMemoryCapabilityFor(node);
|
|
207
|
+
const cronStoreFile = createOpenClawCronStoreFile(node);
|
|
197
208
|
return {
|
|
198
209
|
capabilities: createAgentCapabilities(node, {
|
|
199
|
-
|
|
210
|
+
memoryMessage: memoryCapability.message,
|
|
211
|
+
memoryOutcome: memoryCapability.outcome,
|
|
212
|
+
mcpOutcome: "supported",
|
|
200
213
|
subagentOutcome: node.subagents.length > 0 ? "degraded" : "supported"
|
|
201
214
|
}),
|
|
202
215
|
diagnostics: [
|
|
203
216
|
...(node.subagents.length > 0
|
|
204
217
|
? [createDiagnostic("warn", "OpenClaw subagents lower to routed sessions in v0.1")]
|
|
205
|
-
: []),
|
|
206
|
-
...(node.mcpServers.length > 0
|
|
207
|
-
? [createDiagnostic("warn", "OpenClaw MCP goes through mcporter bridge; direct config may not apply")]
|
|
208
218
|
: [])
|
|
209
219
|
],
|
|
210
220
|
files: [
|
|
211
221
|
...createDocumentFiles("workspace", node.docs),
|
|
212
222
|
...createSkillFiles("workspace/skills", node.skills),
|
|
213
223
|
...createOpenClawStateFiles(),
|
|
224
|
+
...(cronStoreFile ? [cronStoreFile] : []),
|
|
214
225
|
{
|
|
215
226
|
content: buildOpenClawConfig(node),
|
|
216
227
|
path: "openclaw.json"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ResolvedAgentNode } from "../../compiler/types.js";
|
|
2
|
+
import type { McpServer } from "../../manifest/index.js";
|
|
3
|
+
import type { RuntimeContainerConfigEnvBinding } from "../types.js";
|
|
4
|
+
export declare const buildOpenClawAuthoredMcpServers: (servers: McpServer[]) => Record<string, Record<string, unknown>>;
|
|
5
|
+
export declare const buildOpenClawMcpConfig: (node: ResolvedAgentNode) => Record<string, unknown> | undefined;
|
|
6
|
+
export declare const buildOpenClawMcpEnvBindings: (servers: McpServer[]) => RuntimeContainerConfigEnvBinding[];
|
|
7
|
+
export declare const openClawMemoryCapabilityFor: (node: ResolvedAgentNode) => {
|
|
8
|
+
message: string;
|
|
9
|
+
outcome: "degraded" | "supported";
|
|
10
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { buildMnemeMemoryMcpServers, hasScheduledMemoryConsolidation, hasUnsupportedMnemeMemoryAccess } from "../mnemeMcp.js";
|
|
2
|
+
const buildOpenClawAuthHeaders = (server) => server.auth
|
|
3
|
+
? { [server.auth.mode === "bearer" ? "Authorization" : server.auth.secret]: "" }
|
|
4
|
+
: undefined;
|
|
5
|
+
export const buildOpenClawAuthoredMcpServers = (servers) => {
|
|
6
|
+
const result = Object.create(null);
|
|
7
|
+
for (const server of servers) {
|
|
8
|
+
if (server.transport === "stdio" && server.auth?.mode === "bearer") {
|
|
9
|
+
throw new Error("OpenClaw stdio MCP servers do not support bearer auth");
|
|
10
|
+
}
|
|
11
|
+
const entry = { enabled: true };
|
|
12
|
+
if (server.transport === "stdio") {
|
|
13
|
+
entry.transport = "stdio";
|
|
14
|
+
entry.command = server.command;
|
|
15
|
+
if (server.args)
|
|
16
|
+
entry.args = server.args;
|
|
17
|
+
if (server.env)
|
|
18
|
+
entry.env = server.env;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
entry.transport = server.transport === "streamable_http" ? "streamable-http" : "sse";
|
|
22
|
+
entry.url = server.url;
|
|
23
|
+
const headers = buildOpenClawAuthHeaders(server);
|
|
24
|
+
if (headers)
|
|
25
|
+
entry.headers = headers;
|
|
26
|
+
}
|
|
27
|
+
result[server.name] = entry;
|
|
28
|
+
}
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
31
|
+
export const buildOpenClawMcpConfig = (node) => {
|
|
32
|
+
const servers = {
|
|
33
|
+
...buildOpenClawAuthoredMcpServers(node.mcpServers),
|
|
34
|
+
...buildMnemeMemoryMcpServers(node, {
|
|
35
|
+
modes: hasScheduledMemoryConsolidation(node) ? ["awake", "dream"] : ["awake"]
|
|
36
|
+
})
|
|
37
|
+
};
|
|
38
|
+
if (Object.keys(servers).length === 0) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
return { servers };
|
|
42
|
+
};
|
|
43
|
+
export const buildOpenClawMcpEnvBindings = (servers) => servers.flatMap((server) => server.auth
|
|
44
|
+
? [
|
|
45
|
+
{
|
|
46
|
+
envName: server.auth.secret,
|
|
47
|
+
jsonPath: [
|
|
48
|
+
"mcp",
|
|
49
|
+
"servers",
|
|
50
|
+
server.name,
|
|
51
|
+
"headers",
|
|
52
|
+
server.auth.mode === "bearer" ? "Authorization" : server.auth.secret
|
|
53
|
+
],
|
|
54
|
+
...(server.auth.mode === "bearer" ? { transform: "bearer" } : {})
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
: []);
|
|
58
|
+
export const openClawMemoryCapabilityFor = (node) => {
|
|
59
|
+
if (hasUnsupportedMnemeMemoryAccess(node)) {
|
|
60
|
+
return {
|
|
61
|
+
message: "OpenClaw lowers file-backed Mneme memory through generated MCP servers; non-file stores are not lowered",
|
|
62
|
+
outcome: "degraded"
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
message: "OpenClaw accesses Mneme memory through generated MCP servers",
|
|
67
|
+
outcome: "supported"
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -44,10 +44,10 @@ export const prepareOpenClawRuntimeAuth = async (input) => {
|
|
|
44
44
|
if (!input.instance.home_path) {
|
|
45
45
|
return { coveredModelSecrets: [], mountArgs: [] };
|
|
46
46
|
}
|
|
47
|
-
const claudeCode = input.authProfile
|
|
47
|
+
const claudeCode = input.authProfile?.imports["claude-code"]
|
|
48
48
|
? await loadImportedClaudeCodeCredential(input.authProfile.imports["claude-code"].path)
|
|
49
49
|
: null;
|
|
50
|
-
const codex = input.authProfile
|
|
50
|
+
const codex = input.authProfile?.imports.codex
|
|
51
51
|
? await loadImportedCodexCredential(input.authProfile.imports.codex.path)
|
|
52
52
|
: null;
|
|
53
53
|
const coveredModelSecrets = [];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ResolvedAgentNode } from "../../compiler/types.js";
|
|
2
|
+
import type { EmittedFile } from "../types.js";
|
|
3
|
+
type OpenClawCronSchedule = {
|
|
4
|
+
anchorMs?: number;
|
|
5
|
+
everyMs: number;
|
|
6
|
+
kind: "every";
|
|
7
|
+
} | {
|
|
8
|
+
expr: string;
|
|
9
|
+
kind: "cron";
|
|
10
|
+
staggerMs?: number;
|
|
11
|
+
tz?: string;
|
|
12
|
+
};
|
|
13
|
+
interface OpenClawCronJob {
|
|
14
|
+
agentId: string;
|
|
15
|
+
createdAtMs: number;
|
|
16
|
+
deleteAfterRun: boolean;
|
|
17
|
+
delivery: {
|
|
18
|
+
mode: "none";
|
|
19
|
+
};
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
failureAlert: false;
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
payload: {
|
|
25
|
+
deliver: false;
|
|
26
|
+
kind: "agentTurn";
|
|
27
|
+
lightContext: true;
|
|
28
|
+
message: string;
|
|
29
|
+
};
|
|
30
|
+
schedule: OpenClawCronSchedule;
|
|
31
|
+
sessionTarget: "isolated";
|
|
32
|
+
state: Record<string, never>;
|
|
33
|
+
updatedAtMs: number;
|
|
34
|
+
wakeMode: "now";
|
|
35
|
+
}
|
|
36
|
+
export declare const createOpenClawMemoryDreamJobs: (node: ResolvedAgentNode) => OpenClawCronJob[];
|
|
37
|
+
export declare const createOpenClawCronStoreFile: (node: ResolvedAgentNode) => EmittedFile | null;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { slugify } from "../../compiler/helpers.js";
|
|
2
|
+
import { isMnemeMemoryAccessSupported, mnemeMemoryServerName } from "../mnemeMcp.js";
|
|
3
|
+
import { parseEveryScheduleMs } from "../scheduleUtils.js";
|
|
4
|
+
const dreamPrompt = (bankId, serverName) => [
|
|
5
|
+
`Dream over Mneme memory bank ${bankId}.`,
|
|
6
|
+
"This is an isolated memory-maintenance session, not normal conversation.",
|
|
7
|
+
`Prefer the ${serverName} MCP tools when available.`,
|
|
8
|
+
"Search the active dream scope and read-only global scope for stale, duplicate, noisy, or important memories.",
|
|
9
|
+
"Use memory_summarize, memory_register, or memory_forget only when consolidation is evidence-backed."
|
|
10
|
+
].join(" ");
|
|
11
|
+
const scheduleFromMemoryConsolidation = (schedule) => {
|
|
12
|
+
const everyMs = parseEveryScheduleMs(schedule);
|
|
13
|
+
if (everyMs !== null) {
|
|
14
|
+
return { anchorMs: 0, everyMs, kind: "every" };
|
|
15
|
+
}
|
|
16
|
+
return { expr: schedule, kind: "cron", staggerMs: 0 };
|
|
17
|
+
};
|
|
18
|
+
export const createOpenClawMemoryDreamJobs = (node) => {
|
|
19
|
+
const jobs = [];
|
|
20
|
+
const seen = new Set();
|
|
21
|
+
for (const access of node.memoryAccess ?? []) {
|
|
22
|
+
const schedule = access.bank.consolidation.schedule;
|
|
23
|
+
if (!isMnemeMemoryAccessSupported(access) ||
|
|
24
|
+
access.bank.consolidation.mode !== "scheduled" ||
|
|
25
|
+
!schedule) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
const key = `${access.source}:${access.bank.id}`;
|
|
29
|
+
if (seen.has(key)) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
seen.add(key);
|
|
33
|
+
const dreamServerName = mnemeMemoryServerName(node, access, "dream");
|
|
34
|
+
const bankSlug = dreamServerName.replace(/^mneme-/u, "").replace(/-dream$/u, "");
|
|
35
|
+
const agentSlug = slugify(node.name) || "agent";
|
|
36
|
+
const id = `spawnfile-dream-${agentSlug}-${bankSlug}`;
|
|
37
|
+
jobs.push({
|
|
38
|
+
agentId: "main",
|
|
39
|
+
createdAtMs: 0,
|
|
40
|
+
deleteAfterRun: false,
|
|
41
|
+
delivery: { mode: "none" },
|
|
42
|
+
enabled: true,
|
|
43
|
+
failureAlert: false,
|
|
44
|
+
id,
|
|
45
|
+
name: id,
|
|
46
|
+
payload: {
|
|
47
|
+
deliver: false,
|
|
48
|
+
kind: "agentTurn",
|
|
49
|
+
lightContext: true,
|
|
50
|
+
message: dreamPrompt(access.bank.id, dreamServerName)
|
|
51
|
+
},
|
|
52
|
+
schedule: scheduleFromMemoryConsolidation(schedule),
|
|
53
|
+
sessionTarget: "isolated",
|
|
54
|
+
state: {},
|
|
55
|
+
updatedAtMs: 0,
|
|
56
|
+
wakeMode: "now"
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return jobs;
|
|
60
|
+
};
|
|
61
|
+
export const createOpenClawCronStoreFile = (node) => {
|
|
62
|
+
const jobs = createOpenClawMemoryDreamJobs(node);
|
|
63
|
+
if (jobs.length === 0) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
const store = {
|
|
67
|
+
jobs,
|
|
68
|
+
version: 1
|
|
69
|
+
};
|
|
70
|
+
return {
|
|
71
|
+
content: `${JSON.stringify(store, null, 2)}\n`,
|
|
72
|
+
path: "home/.openclaw/cron/jobs.json"
|
|
73
|
+
};
|
|
74
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { RuntimeAdapter } from "../types.js";
|
|
2
2
|
export declare const piAdapter: RuntimeAdapter;
|
|
3
3
|
export declare const daimonAdapter: RuntimeAdapter;
|
|
4
|
-
export declare const PI_RUNTIME_PACKAGE = "@earendil-works/pi-coding-agent@0.79.
|
|
4
|
+
export declare const PI_RUNTIME_PACKAGE = "@earendil-works/pi-coding-agent@0.79.10";
|
|
@@ -1,59 +1,36 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { listExecutionModelSecretNames } from "../../compiler/modelEnv.js";
|
|
1
|
+
import { readUtf8File, resolveProjectPath } from "../../filesystem/index.js";
|
|
3
2
|
import { SpawnfileError } from "../../shared/index.js";
|
|
4
3
|
import { createAgentCapabilities, createDiagnostic, createDocumentFiles, createSkillFiles } from "../common.js";
|
|
5
|
-
import {
|
|
4
|
+
import { resolveScriptedEngineCommandOption, resolveScriptedEngineStagedPath } from "./appScriptedEngine.js";
|
|
5
|
+
import { isPiEveryScheduleValue, PI_BUILTIN_TOOLS, PI_ENGINE_KINDS, PI_PACKAGE_NAME, PI_PACKAGE_VERSION, PI_THINKING_FORMATS, PI_THINKING_LEVELS } from "./appTemplate.js";
|
|
6
|
+
import { createPiContainerTargets, PI_CONFIG_FILE, PI_CONTROL_PORT, } from "./containerTargets.js";
|
|
6
7
|
import { preparePiRuntimeAuth } from "./runAuth.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Stages a `scripted`-engine's `engine_command` script into this agent's
|
|
10
|
+
* emitted workspace files, the same way `createDocumentFiles`/
|
|
11
|
+
* `createSkillFiles` stage docs/skills: read once at compile time (relative
|
|
12
|
+
* to the declaring manifest, via `resolveProjectPath(node.sourcePath ?? node.source, ...)`,
|
|
13
|
+
* mirroring `surfaces.ts`'s `loadResolvedDocuments`) and emitted as a
|
|
14
|
+
* `workspace/...` file, which `createContainerTargets` below relocates to
|
|
15
|
+
* `workspace/agents/<slug>/...` (`moveWorkspaceFileToAgentWorkspace`) just
|
|
16
|
+
* like every other per-agent workspace file. Returns `[]` for every engine
|
|
17
|
+
* other than `scripted` (and defensively for a `scripted` engine missing
|
|
18
|
+
* `engine_command`, though `validateRuntimeOptions` below already rejects
|
|
19
|
+
* that before `compileAgent` ever runs).
|
|
20
|
+
*/
|
|
21
|
+
const createScriptedEngineFiles = async (node) => {
|
|
22
|
+
const option = resolveScriptedEngineCommandOption(node);
|
|
23
|
+
const stagedPath = resolveScriptedEngineStagedPath(node);
|
|
24
|
+
if (!option || !stagedPath) {
|
|
23
25
|
return [];
|
|
24
26
|
}
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
...new Set(agentInputs.flatMap((input) => listExecutionModelSecretNames(input.value.execution)))
|
|
28
|
-
].map((secretName) => ({
|
|
29
|
-
envName: secretName,
|
|
30
|
-
relativePath: `secrets/${secretName}`
|
|
31
|
-
}));
|
|
27
|
+
const sourcePath = resolveProjectPath(node.sourcePath ?? node.source, option);
|
|
28
|
+
const content = await readUtf8File(sourcePath);
|
|
32
29
|
return [
|
|
33
30
|
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
content: renderPiAppConfig(agents),
|
|
39
|
-
path: PI_CONFIG_FILE
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
content: renderPiModelsConfig(agentInputs.map((input) => input.value)),
|
|
43
|
-
path: PI_MODELS_FILE
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
content: renderPiPackageJson(),
|
|
47
|
-
path: "runtime/package.json"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
content: renderPiApp(),
|
|
51
|
-
mode: 0o755,
|
|
52
|
-
path: "runtime/app.mjs"
|
|
53
|
-
}
|
|
54
|
-
],
|
|
55
|
-
id: "pi-app",
|
|
56
|
-
sourceIds: agentInputs.map((input) => input.id).sort()
|
|
31
|
+
content,
|
|
32
|
+
mode: 0o755,
|
|
33
|
+
path: `workspace/${stagedPath}`
|
|
57
34
|
}
|
|
58
35
|
];
|
|
59
36
|
};
|
|
@@ -77,6 +54,13 @@ const createScheduleDiagnostics = (node) => node.schedule?.kind === "cron"
|
|
|
77
54
|
createDiagnostic("warn", "Pi generated runtime app supports every schedules in Spawnfile v0.1; cron schedules are degraded")
|
|
78
55
|
]
|
|
79
56
|
: [];
|
|
57
|
+
const createMemoryConsolidationDiagnostics = (node) => (node.memoryAccess ?? []).flatMap((access) => access.bank.consolidation.mode === "scheduled" &&
|
|
58
|
+
access.bank.consolidation.schedule &&
|
|
59
|
+
!isPiEveryScheduleValue(access.bank.consolidation.schedule)
|
|
60
|
+
? [
|
|
61
|
+
createDiagnostic("warn", `Pi generated runtime app supports every memory consolidation schedules in Spawnfile v0.1; memory bank ${access.bank.id} consolidation is degraded`)
|
|
62
|
+
]
|
|
63
|
+
: []);
|
|
80
64
|
const moltnetCapabilityOptions = (node) => node.surfaces?.moltnet
|
|
81
65
|
? {
|
|
82
66
|
moltnetMessage: "Pi generated runtime app exposes a control endpoint for Moltnet bridge wake delivery",
|
|
@@ -138,9 +122,15 @@ export const piAdapter = {
|
|
|
138
122
|
},
|
|
139
123
|
port: PI_CONTROL_PORT,
|
|
140
124
|
portEnv: "SPAWNFILE_PI_CONTROL_PORT",
|
|
125
|
+
globalNpmPackages: ["@anthropic-ai/claude-code", "@openai/codex@0.142.3"],
|
|
126
|
+
postRootfsCommands: [
|
|
127
|
+
"curl -fsSL https://x.ai/cli/install.sh | GROK_BIN_DIR=/usr/local/bin bash",
|
|
128
|
+
"if [ -L /usr/local/bin/grok ]; then cp -L /usr/local/bin/grok /usr/local/bin/grok.real && mv /usr/local/bin/grok.real /usr/local/bin/grok && chmod 0755 /usr/local/bin/grok && ln -sf /usr/local/bin/grok /usr/local/bin/agent; fi",
|
|
129
|
+
"curl -fsSL https://antigravity.google/cli/install.sh | bash -s -- --dir /usr/local/bin"
|
|
130
|
+
],
|
|
141
131
|
standaloneBaseImage: "node:24-bookworm-slim",
|
|
142
132
|
startCommand: ["node", "<runtime-root>/app.mjs", "<config-path>"],
|
|
143
|
-
systemDeps: ["bash", "ca-certificates", "curl", "git", "procps"]
|
|
133
|
+
systemDeps: ["bash", "ca-certificates", "curl", "git", "procps", "tar"]
|
|
144
134
|
},
|
|
145
135
|
systemInstructionSurface: {
|
|
146
136
|
placement: "append_pointer",
|
|
@@ -152,6 +142,8 @@ export const piAdapter = {
|
|
|
152
142
|
const scheduleOutcome = scheduleOutcomeFor(node);
|
|
153
143
|
return {
|
|
154
144
|
capabilities: createAgentCapabilities(node, {
|
|
145
|
+
memoryMessage: "Daimon exposes Mneme memory through generated runtime turns",
|
|
146
|
+
memoryOutcome: "supported",
|
|
155
147
|
...moltnetCapabilityOptions(node),
|
|
156
148
|
mcpOutcome: node.mcpServers.length > 0 ? "degraded" : "supported",
|
|
157
149
|
sandboxOutcome: node.execution?.sandbox ? "degraded" : "supported",
|
|
@@ -161,6 +153,7 @@ export const piAdapter = {
|
|
|
161
153
|
}),
|
|
162
154
|
diagnostics: [
|
|
163
155
|
...createScheduleDiagnostics(node),
|
|
156
|
+
...createMemoryConsolidationDiagnostics(node),
|
|
164
157
|
...(node.execution?.sandbox
|
|
165
158
|
? [createDiagnostic("warn", "Pi runtime relies on container and workspace isolation; Pi itself is not a sandbox engine")]
|
|
166
159
|
: []),
|
|
@@ -173,18 +166,58 @@ export const piAdapter = {
|
|
|
173
166
|
],
|
|
174
167
|
files: [
|
|
175
168
|
...createDocumentFiles("workspace", node.docs),
|
|
176
|
-
...createSkillFiles("workspace/skills", node.skills)
|
|
169
|
+
...createSkillFiles("workspace/skills", node.skills),
|
|
170
|
+
...(await createScriptedEngineFiles(node))
|
|
177
171
|
]
|
|
178
172
|
};
|
|
179
173
|
},
|
|
180
174
|
async createContainerTargets(inputs) {
|
|
181
|
-
return
|
|
175
|
+
return createPiContainerTargets(inputs);
|
|
182
176
|
},
|
|
183
177
|
name: "pi",
|
|
184
178
|
prepareRuntimeAuth: preparePiRuntimeAuth,
|
|
185
179
|
validateRuntimeOptions(options) {
|
|
186
180
|
const diagnostics = [];
|
|
187
|
-
|
|
181
|
+
if (options.engine !== undefined &&
|
|
182
|
+
(typeof options.engine !== "string" ||
|
|
183
|
+
!PI_ENGINE_KINDS.includes(options.engine))) {
|
|
184
|
+
diagnostics.push(createDiagnostic("error", `Pi runtime option engine must be one of ${PI_ENGINE_KINDS.join(", ")}`));
|
|
185
|
+
}
|
|
186
|
+
if (options.engine === "scripted" &&
|
|
187
|
+
(typeof options.engine_command !== "string" || options.engine_command.trim().length === 0)) {
|
|
188
|
+
diagnostics.push(createDiagnostic("error", "Pi runtime option engine_command is required (a fixture-relative script path) when engine is scripted"));
|
|
189
|
+
}
|
|
190
|
+
if (options.thinking !== undefined &&
|
|
191
|
+
(typeof options.thinking !== "string" ||
|
|
192
|
+
!PI_THINKING_LEVELS.includes(options.thinking))) {
|
|
193
|
+
diagnostics.push(createDiagnostic("error", `Pi runtime option thinking must be one of ${PI_THINKING_LEVELS.join(", ")}`));
|
|
194
|
+
}
|
|
195
|
+
if (options.thinking_format !== undefined &&
|
|
196
|
+
(typeof options.thinking_format !== "string" ||
|
|
197
|
+
!PI_THINKING_FORMATS.includes(options.thinking_format))) {
|
|
198
|
+
diagnostics.push(createDiagnostic("error", `Pi runtime option thinking_format must be one of ${PI_THINKING_FORMATS.join(", ")}`));
|
|
199
|
+
}
|
|
200
|
+
if (options.tools !== undefined &&
|
|
201
|
+
(!Array.isArray(options.tools)
|
|
202
|
+
|| options.tools.some((item) => typeof item !== "string"
|
|
203
|
+
|| !PI_BUILTIN_TOOLS.includes(item))
|
|
204
|
+
|| new Set(options.tools).size !== options.tools.length)) {
|
|
205
|
+
diagnostics.push(createDiagnostic("error", `Pi runtime option tools must contain unique values from ${PI_BUILTIN_TOOLS.join(", ")}`));
|
|
206
|
+
}
|
|
207
|
+
if (options.raw_training_capture_turns !== undefined
|
|
208
|
+
&& (!Number.isSafeInteger(options.raw_training_capture_turns)
|
|
209
|
+
|| typeof options.raw_training_capture_turns !== "number"
|
|
210
|
+
|| options.raw_training_capture_turns < 1
|
|
211
|
+
|| options.raw_training_capture_turns > 100_000)) {
|
|
212
|
+
diagnostics.push(createDiagnostic("error", "Pi runtime option raw_training_capture_turns must be an integer between 1 and 100000"));
|
|
213
|
+
}
|
|
214
|
+
const unsupported = Object.keys(options).filter((key) => key !== "restrict_to_workspace"
|
|
215
|
+
&& key !== "engine"
|
|
216
|
+
&& key !== "engine_command"
|
|
217
|
+
&& key !== "thinking"
|
|
218
|
+
&& key !== "thinking_format"
|
|
219
|
+
&& key !== "tools"
|
|
220
|
+
&& key !== "raw_training_capture_turns");
|
|
188
221
|
for (const key of unsupported) {
|
|
189
222
|
diagnostics.push(createDiagnostic("warn", `Pi runtime option ${key} is not used yet`));
|
|
190
223
|
}
|