spawnfile 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/auth/importers.js +21 -5
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.js +1 -0
- package/dist/auth/profileStore.js +4 -1
- package/dist/auth/trainingGrokWriteback.d.ts +4 -0
- package/dist/auth/trainingGrokWriteback.js +119 -0
- package/dist/auth/trainingGrokWritebackLock.d.ts +5 -0
- package/dist/auth/trainingGrokWritebackLock.js +56 -0
- package/dist/cli/authCommands.js +9 -5
- package/dist/cli/compileBuildCommands.js +4 -0
- package/dist/cli/devCommands.js +4 -2
- package/dist/cli/downCommand.d.ts +2 -0
- package/dist/cli/downCommand.js +3 -0
- package/dist/cli/envFileOption.d.ts +18 -0
- package/dist/cli/envFileOption.js +20 -0
- package/dist/cli/lifecycleCommands.d.ts +1 -1
- package/dist/cli/lifecycleCommands.js +3 -1
- package/dist/cli/lifecyclePlan.d.ts +1 -0
- package/dist/cli/lifecyclePlan.js +2 -0
- package/dist/cli/paideiaDelegation.d.ts +2 -1
- package/dist/cli/paideiaDelegation.js +5 -4
- package/dist/cli/recordCommands.d.ts +17 -0
- package/dist/cli/recordCommands.js +43 -0
- package/dist/cli/releaseCommand.d.ts +6 -0
- package/dist/cli/releaseCommand.js +91 -0
- package/dist/cli/runCli.d.ts +7 -1
- package/dist/cli/runCli.js +11 -6
- package/dist/cli/runPublishCommands.js +5 -3
- package/dist/cli/trainCommand.js +73 -20
- package/dist/cli/upCommand.js +5 -1
- package/dist/cli/volumeCommands.d.ts +8 -0
- package/dist/cli/volumeCommands.js +53 -0
- package/dist/compiler/agentNodeMerge.js +3 -2
- package/dist/compiler/buildCompilePlan.js +4 -0
- package/dist/compiler/buildCompilePlanAgent.js +3 -1
- package/dist/compiler/buildCompilePlanTraversal.js +2 -0
- package/dist/compiler/buildCompilePlanTraversalHelpers.d.ts +2 -2
- package/dist/compiler/buildCompilePlanTraversalHelpers.js +4 -3
- package/dist/compiler/buildProject.d.ts +10 -0
- package/dist/compiler/buildProject.js +14 -2
- package/dist/compiler/cleanCompileOutput.d.ts +2 -0
- package/dist/compiler/cleanCompileOutput.js +14 -0
- package/dist/compiler/compilePlanHelpers.js +2 -0
- package/dist/compiler/compileProject.d.ts +10 -0
- package/dist/compiler/compileProject.js +29 -3
- package/dist/compiler/containerArtifactSummaries.js +1 -0
- package/dist/compiler/containerArtifacts.d.ts +4 -4
- package/dist/compiler/containerArtifacts.js +18 -34
- package/dist/compiler/containerArtifactsPlans.js +7 -0
- package/dist/compiler/containerArtifactsTypes.d.ts +7 -0
- package/dist/compiler/containerDaimonBrokerRender.d.ts +3 -1
- package/dist/compiler/containerDaimonBrokerRender.js +6 -3
- package/dist/compiler/containerDaimonGrokTaskClock.d.ts +5 -0
- package/dist/compiler/containerDaimonGrokTaskClock.js +29 -0
- package/dist/compiler/containerDaimonGrokWorkerProvisioning.d.ts +1 -1
- package/dist/compiler/containerDaimonGrokWorkerProvisioning.js +38 -16
- package/dist/compiler/containerDaimonGrokWorkerRender.d.ts +33 -8
- package/dist/compiler/containerDaimonGrokWorkerRender.js +18 -5
- package/dist/compiler/containerDaimonOwnershipGuardRender.d.ts +14 -1
- package/dist/compiler/containerDaimonOwnershipGuardRender.js +15 -2
- package/dist/compiler/containerDaimonUidEntrypointRender.js +6 -12
- package/dist/compiler/containerTargetResources.d.ts +10 -0
- package/dist/compiler/containerTargetResources.js +21 -13
- package/dist/compiler/containerWorkspaceResourceRender.js +4 -1
- package/dist/compiler/index.d.ts +2 -0
- package/dist/compiler/index.js +2 -0
- package/dist/compiler/mcpPlaceholders.d.ts +11 -0
- package/dist/compiler/mcpPlaceholders.js +58 -0
- package/dist/compiler/mcpServerInheritance.d.ts +18 -0
- package/dist/compiler/mcpServerInheritance.js +43 -0
- package/dist/compiler/moltnetArtifactTypes.d.ts +1 -0
- package/dist/compiler/moltnetArtifacts.js +1 -0
- package/dist/compiler/preflightCompilePlan.d.ts +9 -0
- package/dist/compiler/preflightCompilePlan.js +38 -0
- package/dist/compiler/recordingAgentFacts.d.ts +4 -0
- package/dist/compiler/recordingAgentFacts.js +35 -0
- package/dist/compiler/recordingCapability.d.ts +4 -0
- package/dist/compiler/recordingCapability.js +22 -0
- package/dist/compiler/recordingReport.d.ts +4 -0
- package/dist/compiler/recordingReport.js +18 -0
- package/dist/compiler/runProject.d.ts +2 -1
- package/dist/compiler/runProject.js +2 -0
- package/dist/compiler/surfaces.d.ts +1 -2
- package/dist/compiler/surfaces.js +0 -1
- package/dist/compiler/syncProjectAuth.js +2 -1
- package/dist/compiler/training/broker/clockProbe.d.ts +6 -0
- package/dist/compiler/training/broker/clockProbe.js +27 -0
- package/dist/compiler/training/broker/declaration.d.ts +4 -2
- package/dist/compiler/training/broker/declaration.js +4 -2
- package/dist/compiler/training/broker/entrypoint.js +33 -18
- package/dist/compiler/training/broker/evaluatorSecrets.d.ts +2 -0
- package/dist/compiler/training/broker/evaluatorSecrets.js +60 -0
- package/dist/compiler/training/broker/index.d.ts +3 -2
- package/dist/compiler/training/broker/index.js +3 -2
- package/dist/compiler/training/broker/main.js +1 -1
- package/dist/compiler/training/broker/paths.d.ts +96 -56
- package/dist/compiler/training/broker/paths.js +97 -89
- package/dist/compiler/training/broker/processes.d.ts +9 -0
- package/dist/compiler/training/broker/processes.js +4 -1
- package/dist/compiler/training/broker/projection.d.ts +3 -2
- package/dist/compiler/training/broker/projection.js +21 -9
- package/dist/compiler/training/broker/provisioning.d.ts +6 -15
- package/dist/compiler/training/broker/provisioning.js +71 -53
- package/dist/compiler/training/broker/registration.d.ts +3 -1
- package/dist/compiler/training/broker/registration.js +29 -21
- package/dist/compiler/training/broker/reset.d.ts +9 -0
- package/dist/compiler/training/broker/reset.js +71 -0
- package/dist/compiler/training/broker/runtime.d.ts +10 -13
- package/dist/compiler/training/broker/runtime.js +69 -115
- package/dist/compiler/training/broker/supervisor.d.ts +10 -11
- package/dist/compiler/training/broker/supervisor.js +22 -23
- package/dist/compiler/training/broker/taskClock.d.ts +5 -0
- package/dist/compiler/training/broker/taskClock.js +41 -0
- package/dist/compiler/training/compiledAgent.d.ts +21 -0
- package/dist/compiler/training/compiledAgent.js +62 -0
- package/dist/compiler/training/container/contract.d.ts +23 -0
- package/dist/compiler/training/container/contract.js +23 -5
- package/dist/compiler/training/container/evaluators.d.ts +48 -0
- package/dist/compiler/training/container/evaluators.js +50 -0
- package/dist/compiler/training/container/grokWriteback.d.ts +8 -0
- package/dist/compiler/training/container/grokWriteback.js +26 -0
- package/dist/compiler/training/container/index.d.ts +2 -1
- package/dist/compiler/training/container/index.js +2 -1
- package/dist/compiler/training/container/launch.d.ts +3 -0
- package/dist/compiler/training/container/launch.js +119 -28
- package/dist/compiler/training/container/nativeSlots.d.ts +14 -0
- package/dist/compiler/training/container/nativeSlots.js +13 -0
- package/dist/compiler/training/container/outputCopy.d.ts +2 -0
- package/dist/compiler/training/container/outputCopy.js +72 -0
- package/dist/compiler/training/container/outputVolume.d.ts +27 -0
- package/dist/compiler/training/container/outputVolume.js +161 -0
- package/dist/compiler/training/container/prepare.d.ts +3 -1
- package/dist/compiler/training/container/prepare.js +57 -12
- package/dist/compiler/training/container/security.d.ts +5 -3
- package/dist/compiler/training/container/security.js +15 -5
- package/dist/compiler/training/container/subjectIsolation.d.ts +5 -0
- package/dist/compiler/training/container/subjectIsolation.js +15 -0
- package/dist/compiler/training/context.d.ts +8 -0
- package/dist/compiler/training/context.js +12 -12
- package/dist/compiler/training/contract.d.ts +2 -0
- package/dist/compiler/training/contract.js +2 -0
- package/dist/compiler/training/execution.d.ts +417 -0
- package/dist/compiler/training/execution.js +160 -0
- package/dist/compiler/training/index.d.ts +8 -0
- package/dist/compiler/training/index.js +7 -0
- package/dist/compiler/training/moments.d.ts +80 -0
- package/dist/compiler/training/moments.js +118 -0
- package/dist/compiler/training/output.d.ts +2 -0
- package/dist/compiler/training/output.js +20 -0
- package/dist/compiler/training/plan/contract.d.ts +287 -0
- package/dist/compiler/training/plan/contract.js +49 -0
- package/dist/compiler/training/plan/index.d.ts +5 -0
- package/dist/compiler/training/plan/index.js +4 -0
- package/dist/compiler/training/plan/load.d.ts +9 -0
- package/dist/compiler/training/plan/load.js +153 -0
- package/dist/compiler/training/plan/references.d.ts +19 -0
- package/dist/compiler/training/plan/references.js +57 -0
- package/dist/compiler/training/plan/resolve.d.ts +4 -0
- package/dist/compiler/training/plan/resolve.js +73 -0
- package/dist/compiler/training/plan/targets.d.ts +11 -0
- package/dist/compiler/training/plan/targets.js +71 -0
- package/dist/compiler/training/plan/types.d.ts +36 -0
- package/dist/compiler/training/plan/types.js +1 -0
- package/dist/compiler/training/preparation/assets/Dockerfile +13 -2
- package/dist/compiler/training/preparation/assets/package-lock.json +2 -2
- package/dist/compiler/training/preparation/broker.d.ts +3 -3
- package/dist/compiler/training/preparation/broker.js +6 -4
- package/dist/compiler/training/preparation/contract.d.ts +27 -2
- package/dist/compiler/training/preparation/contract.js +23 -4
- package/dist/compiler/training/preparation/files.d.ts +5 -1
- package/dist/compiler/training/preparation/files.js +76 -15
- package/dist/compiler/training/preparation/image.js +9 -4
- package/dist/compiler/training/preparation/inputs.d.ts +1 -0
- package/dist/compiler/training/preparation/inputs.js +18 -10
- package/dist/compiler/training/preparation/prepare.d.ts +5 -0
- package/dist/compiler/training/preparation/prepare.js +66 -29
- package/dist/compiler/training/preparation/scratch.d.ts +6 -17
- package/dist/compiler/training/preparation/scratch.js +89 -23
- package/dist/compiler/training/repair/contract.d.ts +338 -4
- package/dist/compiler/training/repair/contract.js +2 -0
- package/dist/compiler/training/repair/index.d.ts +1 -1
- package/dist/compiler/training/repair/index.js +1 -1
- package/dist/compiler/training/repair/prepare.d.ts +155 -3
- package/dist/compiler/training/repair/prepare.js +6 -2
- package/dist/compiler/training/repair/witness.d.ts +152 -3
- package/dist/compiler/training/repair/witness.js +8 -2
- package/dist/compiler/training/resolution.d.ts +25 -0
- package/dist/compiler/training/resolution.js +69 -0
- package/dist/compiler/training/rewind/contract.d.ts +321 -0
- package/dist/compiler/training/rewind/contract.js +39 -0
- package/dist/compiler/training/rewind/deployedResource.d.ts +22 -0
- package/dist/compiler/training/rewind/deployedResource.js +19 -0
- package/dist/compiler/training/rewind/feed.d.ts +12 -0
- package/dist/compiler/training/rewind/feed.js +182 -0
- package/dist/compiler/training/rewind/feedContent.d.ts +6 -0
- package/dist/compiler/training/rewind/feedContent.js +38 -0
- package/dist/compiler/training/rewind/git.d.ts +8 -0
- package/dist/compiler/training/rewind/git.js +159 -0
- package/dist/compiler/training/rewind/gitArchive.d.ts +2 -0
- package/dist/compiler/training/rewind/gitArchive.js +7 -0
- package/dist/compiler/training/rewind/gitHistory.d.ts +3 -0
- package/dist/compiler/training/rewind/gitHistory.js +55 -0
- package/dist/compiler/training/rewind/gitProcess.d.ts +19 -0
- package/dist/compiler/training/rewind/gitProcess.js +81 -0
- package/dist/compiler/training/rewind/gitTree.d.ts +14 -0
- package/dist/compiler/training/rewind/gitTree.js +90 -0
- package/dist/compiler/training/rewind/history.d.ts +28 -0
- package/dist/compiler/training/rewind/history.js +239 -0
- package/dist/compiler/training/rewind/index.d.ts +18 -0
- package/dist/compiler/training/rewind/index.js +15 -0
- package/dist/compiler/training/rewind/inputs.d.ts +9 -0
- package/dist/compiler/training/rewind/inputs.js +67 -0
- package/dist/compiler/training/rewind/instant.d.ts +4 -0
- package/dist/compiler/training/rewind/instant.js +24 -0
- package/dist/compiler/training/rewind/leakCheck.d.ts +10 -0
- package/dist/compiler/training/rewind/leakCheck.js +56 -0
- package/dist/compiler/training/rewind/leakFeed.d.ts +5 -0
- package/dist/compiler/training/rewind/leakFeed.js +25 -0
- package/dist/compiler/training/rewind/leakFiles.d.ts +10 -0
- package/dist/compiler/training/rewind/leakFiles.js +106 -0
- package/dist/compiler/training/rewind/leakGit.d.ts +3 -0
- package/dist/compiler/training/rewind/leakGit.js +78 -0
- package/dist/compiler/training/rewind/leakGitPayload.d.ts +4 -0
- package/dist/compiler/training/rewind/leakGitPayload.js +57 -0
- package/dist/compiler/training/rewind/leakInputs.d.ts +7 -0
- package/dist/compiler/training/rewind/leakInputs.js +135 -0
- package/dist/compiler/training/rewind/leakLayout.d.ts +2 -0
- package/dist/compiler/training/rewind/leakLayout.js +17 -0
- package/dist/compiler/training/rewind/leakProvenance.d.ts +3 -0
- package/dist/compiler/training/rewind/leakProvenance.js +88 -0
- package/dist/compiler/training/rewind/materialize.d.ts +136 -0
- package/dist/compiler/training/rewind/materialize.js +212 -0
- package/dist/compiler/training/rewind/memory.d.ts +10 -0
- package/dist/compiler/training/rewind/memory.js +84 -0
- package/dist/compiler/training/rewind/memorySchemas.d.ts +87 -0
- package/dist/compiler/training/rewind/memorySchemas.js +50 -0
- package/dist/compiler/training/rewind/moltnet.d.ts +2 -0
- package/dist/compiler/training/rewind/moltnet.js +54 -0
- package/dist/compiler/training/rewind/moltnetJson.d.ts +13 -0
- package/dist/compiler/training/rewind/moltnetJson.js +180 -0
- package/dist/compiler/training/rewind/moltnetSchemas.d.ts +1226 -0
- package/dist/compiler/training/rewind/moltnetSchemas.js +75 -0
- package/dist/compiler/training/rewind/moltnetSqlite.d.ts +31 -0
- package/dist/compiler/training/rewind/moltnetSqlite.js +192 -0
- package/dist/compiler/training/rewind/moltnetSqliteData.d.ts +10 -0
- package/dist/compiler/training/rewind/moltnetSqliteData.js +113 -0
- package/dist/compiler/training/rewind/recordInput.d.ts +40 -0
- package/dist/compiler/training/rewind/recordInput.js +49 -0
- package/dist/compiler/training/rewind/recordedBundle.d.ts +4 -0
- package/dist/compiler/training/rewind/recordedBundle.js +58 -0
- package/dist/compiler/training/rewind/recordedCommit.d.ts +2 -0
- package/dist/compiler/training/rewind/recordedCommit.js +10 -0
- package/dist/compiler/training/rewind/select.d.ts +18 -0
- package/dist/compiler/training/rewind/select.js +64 -0
- package/dist/compiler/training/rewind/snapshotManifest.d.ts +42 -0
- package/dist/compiler/training/rewind/snapshotManifest.js +134 -0
- package/dist/compiler/training/rewind/taskClock.d.ts +12 -0
- package/dist/compiler/training/rewind/taskClock.js +40 -0
- package/dist/compiler/training/rewind/timestamps.d.ts +4 -0
- package/dist/compiler/training/rewind/timestamps.js +26 -0
- package/dist/compiler/training/rewind/types.d.ts +43 -0
- package/dist/compiler/training/rewind/types.js +1 -0
- package/dist/compiler/training/rewind/volumes.d.ts +12 -0
- package/dist/compiler/training/rewind/volumes.js +58 -0
- package/dist/compiler/training/selection.d.ts +7 -0
- package/dist/compiler/training/selection.js +15 -0
- package/dist/compiler/types.d.ts +6 -3
- package/dist/compiler/upProject.d.ts +1 -0
- package/dist/compiler/upProject.js +21 -5
- package/dist/compiler/workspaceBundleArtifacts.d.ts +16 -1
- package/dist/compiler/workspaceBundleArtifacts.js +69 -20
- package/dist/compiler/workspaceBundleCache.d.ts +23 -0
- package/dist/compiler/workspaceBundleCache.js +79 -0
- package/dist/compiler/workspaceBundleDependencies.d.ts +21 -0
- package/dist/compiler/workspaceBundleDependencies.js +122 -0
- package/dist/compiler/workspaceBundleFiles.d.ts +51 -0
- package/dist/compiler/workspaceBundleFiles.js +251 -0
- package/dist/compiler/workspaceBundleGenerated.d.ts +25 -0
- package/dist/compiler/workspaceBundleGenerated.js +103 -0
- package/dist/compiler/workspaceBundleGit.d.ts +64 -0
- package/dist/compiler/workspaceBundleGit.js +154 -0
- package/dist/compiler/workspaceBundleKey.d.ts +34 -0
- package/dist/compiler/workspaceBundleKey.js +17 -0
- package/dist/compiler/workspaceBundleResolve.d.ts +56 -0
- package/dist/compiler/workspaceBundleResolve.js +144 -0
- package/dist/compiler/workspaceBundleRun.d.ts +41 -0
- package/dist/compiler/workspaceBundleRun.js +79 -0
- package/dist/compiler/workspaceBundleTar.d.ts +47 -0
- package/dist/compiler/workspaceBundleTar.js +140 -0
- package/dist/compiler/workspaceBundleTree.d.ts +15 -0
- package/dist/compiler/workspaceBundleTree.js +58 -0
- package/dist/compiler/workspaceGitFetch.d.ts +41 -0
- package/dist/compiler/workspaceGitFetch.js +155 -0
- package/dist/compiler/workspaceGitPins.d.ts +33 -0
- package/dist/compiler/workspaceGitPins.js +127 -0
- package/dist/compiler/workspaceResources.d.ts +5 -1
- package/dist/compiler/workspaceResources.js +32 -5
- package/dist/deployment/activation.d.ts +3 -0
- package/dist/deployment/activation.js +12 -0
- package/dist/deployment/canaryCutover.d.ts +1 -1
- package/dist/deployment/candidateRecording.d.ts +8 -0
- package/dist/deployment/candidateRecording.js +22 -0
- package/dist/deployment/dockerManager.d.ts +5 -3
- package/dist/deployment/dockerManager.js +12 -2
- package/dist/deployment/downDeployment.d.ts +2 -0
- package/dist/deployment/downDeployment.js +6 -2
- package/dist/deployment/homeStore.d.ts +9 -1
- package/dist/deployment/homeStore.js +16 -53
- package/dist/deployment/index.d.ts +6 -0
- package/dist/deployment/index.js +6 -0
- package/dist/deployment/pidLock.d.ts +25 -0
- package/dist/deployment/pidLock.js +81 -0
- package/dist/deployment/record.d.ts +85 -1
- package/dist/deployment/record.js +11 -5
- package/dist/deployment/recordPublication.d.ts +15 -0
- package/dist/deployment/recordPublication.js +76 -0
- package/dist/deployment/recordedMemoryRetention.d.ts +18 -0
- package/dist/deployment/recordedMemoryRetention.js +27 -0
- package/dist/deployment/resourceLog.d.ts +140 -0
- package/dist/deployment/resourceLog.js +78 -0
- package/dist/distribution/buildDistributionReport.d.ts +3 -0
- package/dist/distribution/buildDistributionReport.js +5 -0
- package/dist/distribution/consumeImage.d.ts +3 -0
- package/dist/distribution/consumeImage.js +23 -31
- package/dist/distribution/consumeImageLifecycle.d.ts +4 -1
- package/dist/distribution/consumeImageLifecycle.js +14 -3
- package/dist/distribution/consumeImageSupport.d.ts +7 -0
- package/dist/distribution/consumeImageSupport.js +25 -0
- package/dist/distribution/distributionReportSchema.d.ts +47 -0
- package/dist/distribution/distributionReportSchema.js +20 -0
- package/dist/distribution/renderImageInterface.js +1 -1
- package/dist/distribution/types.d.ts +15 -0
- package/dist/filesystem/durableWrite.d.ts +10 -0
- package/dist/filesystem/durableWrite.js +87 -0
- package/dist/filesystem/index.d.ts +2 -0
- package/dist/filesystem/index.js +2 -0
- package/dist/filesystem/retainedJsonl.d.ts +23 -0
- package/dist/filesystem/retainedJsonl.js +123 -0
- package/dist/manifest/commandSchemas.d.ts +5 -0
- package/dist/manifest/commandSchemas.js +5 -0
- package/dist/manifest/executionSchemas.d.ts +20 -0
- package/dist/manifest/executionSchemas.js +13 -3
- package/dist/manifest/index.d.ts +2 -0
- package/dist/manifest/index.js +2 -0
- package/dist/manifest/loadManifest.js +3 -26
- package/dist/manifest/mcpSchemas.d.ts +61 -0
- package/dist/manifest/mcpSchemas.js +57 -11
- package/dist/manifest/memorySchemas.d.ts +1 -1
- package/dist/manifest/memorySchemas.js +1 -1
- package/dist/manifest/parseManifest.d.ts +7 -0
- package/dist/manifest/parseManifest.js +65 -0
- package/dist/manifest/renderSpawnfile.js +4 -1
- package/dist/manifest/renderSpawnfileWorkspace.js +6 -2
- package/dist/manifest/schemas.d.ts +1206 -132
- package/dist/manifest/schemas.js +14 -4
- package/dist/manifest/teamNetworkSchemas.d.ts +1 -1
- package/dist/manifest/trainingDataSchemas.d.ts +357 -0
- package/dist/manifest/trainingDataSchemas.js +31 -0
- package/dist/manifest/trainingSchemas.d.ts +49 -0
- package/dist/manifest/trainingSchemas.js +44 -0
- package/dist/manifest/volumeFeedSchemas.d.ts +52 -0
- package/dist/manifest/volumeFeedSchemas.js +104 -0
- package/dist/manifest/workspaceSchemas.d.ts +182 -5
- package/dist/manifest/workspaceSchemas.js +111 -7
- package/dist/recording/compose.d.ts +3 -0
- package/dist/recording/compose.js +93 -0
- package/dist/recording/deployment.d.ts +15 -0
- package/dist/recording/deployment.js +38 -0
- package/dist/recording/history.d.ts +16 -0
- package/dist/recording/history.js +47 -0
- package/dist/recording/index.d.ts +9 -0
- package/dist/recording/index.js +9 -0
- package/dist/recording/moment.d.ts +61 -0
- package/dist/recording/moment.js +36 -0
- package/dist/recording/parse.d.ts +15 -0
- package/dist/recording/parse.js +74 -0
- package/dist/recording/read.d.ts +8 -0
- package/dist/recording/read.js +61 -0
- package/dist/recording/store.d.ts +10 -0
- package/dist/recording/store.js +94 -0
- package/dist/recording/sync.d.ts +24 -0
- package/dist/recording/sync.js +126 -0
- package/dist/recording/types.d.ts +45 -0
- package/dist/recording/types.js +2 -0
- package/dist/release/drainControl.d.ts +54 -0
- package/dist/release/drainControl.js +137 -0
- package/dist/release/drainPhase.d.ts +37 -0
- package/dist/release/drainPhase.js +161 -0
- package/dist/release/index.d.ts +11 -0
- package/dist/release/index.js +11 -0
- package/dist/release/ledger.d.ts +75 -0
- package/dist/release/ledger.js +111 -0
- package/dist/release/notify.d.ts +58 -0
- package/dist/release/notify.js +126 -0
- package/dist/release/pending.d.ts +35 -0
- package/dist/release/pending.js +60 -0
- package/dist/release/postDeploy.d.ts +32 -0
- package/dist/release/postDeploy.js +62 -0
- package/dist/release/releaseDefaults.d.ts +9 -0
- package/dist/release/releaseDefaults.js +115 -0
- package/dist/release/releaseDocker.d.ts +38 -0
- package/dist/release/releaseDocker.js +94 -0
- package/dist/release/releaseTypes.d.ts +94 -0
- package/dist/release/releaseTypes.js +1 -0
- package/dist/release/runRelease.d.ts +9 -0
- package/dist/release/runRelease.js +218 -0
- package/dist/release/swap.d.ts +23 -0
- package/dist/release/swap.js +55 -0
- package/dist/release/types.d.ts +50 -0
- package/dist/release/types.js +29 -0
- package/dist/report/index.d.ts +1 -0
- package/dist/report/index.js +1 -0
- package/dist/report/recording.d.ts +57 -0
- package/dist/report/recording.js +26 -0
- package/dist/report/types.d.ts +58 -0
- package/dist/runtime/container.js +8 -13
- package/dist/runtime/daimon/adapter.js +15 -4
- package/dist/runtime/daimon/config.d.ts +4 -0
- package/dist/runtime/daimon/config.js +53 -4
- package/dist/runtime/daimon/contract-manifest.json +1 -0
- package/dist/runtime/daimon/contract-manifest.sha256 +1 -0
- package/dist/runtime/daimon/contractManifest.d.ts +59 -8
- package/dist/runtime/daimon/contractManifest.js +26 -10
- package/dist/runtime/daimon/grokTurnLimits.d.ts +25 -0
- package/dist/runtime/daimon/grokTurnLimits.js +51 -0
- package/dist/runtime/daimon/grokWorkerConfigBytes.d.ts +17 -0
- package/dist/runtime/daimon/grokWorkerConfigBytes.js +17 -0
- package/dist/runtime/daimon/grokWorkerContract.d.ts +5 -0
- package/dist/runtime/daimon/grokWorkerContract.js +13 -1
- package/dist/runtime/daimon/recording.d.ts +19 -0
- package/dist/runtime/daimon/recording.js +50 -0
- package/dist/runtime/daimon/scheduleAuthority.d.ts +8 -0
- package/dist/runtime/daimon/scheduleAuthority.js +19 -5
- package/dist/runtime/daimon/wakeMoments.d.ts +15 -0
- package/dist/runtime/daimon/wakeMoments.js +17 -0
- package/dist/runtime/daimonInstall.d.ts +3 -0
- package/dist/runtime/daimonInstall.js +25 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/install.d.ts +2 -0
- package/dist/runtime/install.js +1 -0
- package/dist/runtime/openclaw/adapter.js +3 -0
- package/dist/runtime/pi/adapter.js +3 -0
- package/dist/runtime/pi/containerTargets.js +6 -0
- package/dist/runtime/picoclaw/adapter.js +3 -0
- package/dist/runtime/registry.d.ts +3 -0
- package/dist/runtime/registry.js +13 -1
- package/dist/runtime/types.d.ts +15 -0
- package/dist/runtime/usageLedgerRead.d.ts +6 -0
- package/dist/runtime/usageLedgerRead.js +3 -3
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.js +1 -0
- package/dist/shared/recording.d.ts +8 -0
- package/dist/shared/recording.js +25 -0
- package/dist/target/dockerCommandExecutorCore.js +1 -1
- package/dist/target/dockerTargetBinding.js +2 -1
- package/dist/volume/feedLand.d.ts +31 -0
- package/dist/volume/feedLand.js +174 -0
- package/dist/volume/feedLandings.d.ts +45 -0
- package/dist/volume/feedLandings.js +111 -0
- package/dist/volume/feedLayout.d.ts +61 -0
- package/dist/volume/feedLayout.js +234 -0
- package/dist/volume/feedLock.d.ts +7 -0
- package/dist/volume/feedLock.js +131 -0
- package/dist/volume/feedManifest.d.ts +27 -0
- package/dist/volume/feedManifest.js +123 -0
- package/dist/volume/feedPrepare.d.ts +16 -0
- package/dist/volume/feedPrepare.js +228 -0
- package/dist/volume/feedProject.d.ts +39 -0
- package/dist/volume/feedProject.js +92 -0
- package/dist/volume/feedRecord.d.ts +55 -0
- package/dist/volume/feedRecord.js +148 -0
- package/dist/volume/feedRef.d.ts +43 -0
- package/dist/volume/feedRef.js +117 -0
- package/dist/volume/feedRefresh.d.ts +15 -0
- package/dist/volume/feedRefresh.js +187 -0
- package/dist/volume/feedSource.d.ts +66 -0
- package/dist/volume/feedSource.js +104 -0
- package/dist/volume/feedTarget.d.ts +70 -0
- package/dist/volume/feedTarget.js +9 -0
- package/dist/volume/feedTestKit.d.ts +11 -0
- package/dist/volume/feedTestKit.js +45 -0
- package/dist/volume/feedVerify.d.ts +18 -0
- package/dist/volume/feedVerify.js +104 -0
- package/dist/volume/index.d.ts +13 -0
- package/dist/volume/index.js +13 -0
- package/package.json +3 -3
- package/runtimes.yaml +8 -6
|
@@ -1,33 +1,51 @@
|
|
|
1
|
-
import { lstat, realpath } from "node:fs/promises";
|
|
1
|
+
import { lstat, mkdir, realpath } from "node:fs/promises";
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { trainingContextSchema } from "../contract.js";
|
|
5
5
|
import { trainingContainerConfigSchema } from "./contract.js";
|
|
6
|
+
import { allocateTrainingOutputParent } from "../execution.js";
|
|
7
|
+
import { assertTrainingSubjectIsolation } from "./subjectIsolation.js";
|
|
6
8
|
const inside = (root, value) => value === root || value.startsWith(`${root}/`);
|
|
7
|
-
export const prepareTrainingContainer = async (raw, context, args) => {
|
|
9
|
+
export const prepareTrainingContainer = async (raw, context, args, options = {}) => {
|
|
8
10
|
const config = trainingContainerConfigSchema.parse(raw);
|
|
11
|
+
await assertTrainingSubjectIsolation(config, context);
|
|
9
12
|
const entries = [...config.inputs, config.output];
|
|
13
|
+
const protectedLeaves = [...config.auth, ...config.evaluatorSecrets ?? []];
|
|
10
14
|
const home = path.resolve(os.homedir());
|
|
11
15
|
const globalConfigRoots = [".codex", ".claude", ".grok", ".ssh", ".config"].map((name) => path.join(home, name));
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
let missingOutput = false;
|
|
17
|
+
for (const entry of [...entries, ...protectedLeaves]) {
|
|
18
|
+
let canonical;
|
|
19
|
+
try {
|
|
20
|
+
canonical = await realpath(entry.source);
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
if (entry !== config.output || !options.createOutput || error.code !== "ENOENT")
|
|
24
|
+
throw error;
|
|
25
|
+
canonical = path.resolve(entry.source);
|
|
26
|
+
missingOutput = true;
|
|
27
|
+
}
|
|
14
28
|
if (canonical !== entry.source)
|
|
15
29
|
throw Error("Training bind sources must be canonical, without symlink aliases");
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
30
|
+
if (entry !== config.output || !missingOutput) {
|
|
31
|
+
const stat = await lstat(canonical);
|
|
32
|
+
if (stat.isSymbolicLink() || (!stat.isFile() && !stat.isDirectory()))
|
|
33
|
+
throw Error("Training binds require regular files or directories");
|
|
34
|
+
if (config.evaluatorSecrets?.includes(entry) && stat.nlink !== 1)
|
|
35
|
+
throw Error("Evaluator secrets must not have hardlink aliases");
|
|
36
|
+
if (protectedLeaves.includes(entry) && !stat.isFile())
|
|
37
|
+
throw Error("Auth must be a single regular leaf file");
|
|
38
|
+
}
|
|
21
39
|
if (entries.includes(entry)) {
|
|
22
40
|
if (["/", "/etc", "/var", "/run", "/tmp", "/opt", "/usr", "/Users", "/home", home].includes(canonical) || globalConfigRoots.some((root) => inside(root, canonical)))
|
|
23
41
|
throw Error("Host homes, configuration and system roots cannot be training inputs");
|
|
24
|
-
if (
|
|
42
|
+
if (protectedLeaves.some((auth) => inside(canonical, auth.source)))
|
|
25
43
|
throw Error("Auth must not be exposed through input or output mounts");
|
|
26
44
|
}
|
|
27
45
|
}
|
|
28
46
|
if (config.inputs.some((entry, index) => config.inputs.some((other, otherIndex) => index !== otherIndex && inside(entry.source, other.source))))
|
|
29
47
|
throw Error("Training input source roots must not overlap");
|
|
30
|
-
if (!(await lstat(config.output.source)).isDirectory())
|
|
48
|
+
if (!missingOutput && !(await lstat(config.output.source)).isDirectory())
|
|
31
49
|
throw Error("Training output must be an existing directory");
|
|
32
50
|
if (config.inputs.some((entry) => inside(entry.source, config.output.source) || inside(config.output.source, entry.source)))
|
|
33
51
|
throw Error("Training output and inputs must not overlap");
|
|
@@ -48,7 +66,7 @@ export const prepareTrainingContainer = async (raw, context, args) => {
|
|
|
48
66
|
let viewerPort;
|
|
49
67
|
for (let index = 0; index < mappedArgs.length; index++) {
|
|
50
68
|
const flag = mappedArgs[index];
|
|
51
|
-
if (["--train", "--test", "--out", "--cost-config"].includes(flag)) {
|
|
69
|
+
if (["--train", "--validation", "--test", "--out", "--cost-config"].includes(flag)) {
|
|
52
70
|
const value = mappedArgs[++index];
|
|
53
71
|
if (!value)
|
|
54
72
|
throw Error(`Missing ${flag} path`);
|
|
@@ -76,5 +94,32 @@ export const prepareTrainingContainer = async (raw, context, args) => {
|
|
|
76
94
|
mappedArgs[index] = String(port);
|
|
77
95
|
}
|
|
78
96
|
}
|
|
97
|
+
{
|
|
98
|
+
const flags = mappedArgs.filter(arg => arg === "--concurrency" || arg.startsWith("--concurrency="));
|
|
99
|
+
if (flags.length > 1)
|
|
100
|
+
throw Error("Training accepts one --concurrency value");
|
|
101
|
+
const flag = flags[0];
|
|
102
|
+
if (flag !== undefined) {
|
|
103
|
+
const value = flag === "--concurrency" ? mappedArgs[mappedArgs.indexOf(flag) + 1] : flag.slice("--concurrency=".length);
|
|
104
|
+
if (!value || !/^[1-8]$/u.test(value) || Number(value) > config.slots) {
|
|
105
|
+
throw Error("Training concurrency must fit the provisioned slots");
|
|
106
|
+
}
|
|
107
|
+
if (flag !== "--concurrency")
|
|
108
|
+
mappedArgs.splice(mappedArgs.indexOf(flag), 1, "--concurrency", value);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (missingOutput) {
|
|
112
|
+
await allocateTrainingOutputParent(config.output.source);
|
|
113
|
+
try {
|
|
114
|
+
await mkdir(config.output.source, { mode: 0o700 });
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
if (error.code !== "EEXIST")
|
|
118
|
+
throw error;
|
|
119
|
+
}
|
|
120
|
+
if (await realpath(config.output.source) !== config.output.source || !(await lstat(config.output.source)).isDirectory()) {
|
|
121
|
+
throw Error("Training output must be a canonical directory");
|
|
122
|
+
}
|
|
123
|
+
}
|
|
79
124
|
return { config, context: mapped, args: mappedArgs, ...(viewerPort === undefined ? {} : { viewerPort }) };
|
|
80
125
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
export declare const TRAINING_BROKER_ENTRYPOINT = "/opt/training/bin/train-broker";
|
|
2
|
+
/** Same output directory is the same resumable run; different outputs never share a counter. */
|
|
3
|
+
export declare const trainingRunRequestMount: (outputSource: string, args: readonly string[]) => string;
|
|
2
4
|
/**
|
|
3
|
-
*
|
|
5
|
+
* Disposable state of a broker-capable training container, all on tmpfs.
|
|
4
6
|
*
|
|
5
7
|
* The image root stays read-only and nothing here is a host bind, so a trial's
|
|
6
8
|
* worker home, workspace, turn store, wake-acceptance store and ledgers are
|
|
7
9
|
* on a filesystem that enforces unix ownership — which is what lets the slot
|
|
8
10
|
* supervisor's worker-uid canaries mean anything (P0 §5: a host bind under
|
|
9
11
|
* Docker Desktop or Colima silently ignores `chown`). The Grok realm is the
|
|
10
|
-
*
|
|
12
|
+
* credential mount. The run request counter has its own persistent named volume.
|
|
11
13
|
*/
|
|
12
|
-
export declare const trainingBrokerTmpfsTargets: () => readonly {
|
|
14
|
+
export declare const trainingBrokerTmpfsTargets: (slots?: number) => readonly {
|
|
13
15
|
path: string;
|
|
14
16
|
size: string;
|
|
15
17
|
mode: string;
|
|
@@ -1,26 +1,36 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
1
2
|
import { DAIMON_DOCKER_RUNTIME_SECURITY_ARGS, materializeDaimonGrokSeccompProfile } from "../../../shared/index.js";
|
|
2
3
|
import { DAIMON_GROK_ENGINE_BROKER } from "../../../runtime/daimon/contractManifest.js";
|
|
3
4
|
import { DAIMON_GROK_TURN_USAGE_LEDGER } from "../../../runtime/daimon/contractManifest.js";
|
|
4
5
|
import { DAIMON_WAKE_FUSE_DIRECTORY } from "../../../runtime/daimon/config.js";
|
|
5
|
-
import { TRAINING_BROKER_TMPDIR, TRAINING_GRANT_HOME_ROOT, TRAINING_INFERENCE_DIRECTORY, TRAINING_PAIDEIA_ROOT,
|
|
6
|
+
import { TRAINING_BROKER_TMPDIR, TRAINING_GRANT_HOME_ROOT, TRAINING_INFERENCE_DIRECTORY, TRAINING_PAIDEIA_ROOT, trainingSlotDescriptors, TRAINING_TURN_STORE_ROOT, TRAINING_RUN_REQUEST_STORE, TRAINING_SUPERVISOR_DIRECTORY, TRAINING_WORKER_ROOT } from "../broker/paths.js";
|
|
6
7
|
export const TRAINING_BROKER_ENTRYPOINT = "/opt/training/bin/train-broker";
|
|
8
|
+
/** Same output directory is the same resumable run; different outputs never share a counter. */
|
|
9
|
+
export const trainingRunRequestMount = (outputSource, args) => {
|
|
10
|
+
const index = args.indexOf("--out"), output = args[index + 1];
|
|
11
|
+
if (index < 0 || !output || args.lastIndexOf("--out") !== index)
|
|
12
|
+
throw Error("Brokered training requires one --out directory");
|
|
13
|
+
const identity = createHash("sha256").update(JSON.stringify([outputSource, output])).digest("hex");
|
|
14
|
+
return `type=volume,src=spawnfile-training-budget-${identity},dst=${TRAINING_RUN_REQUEST_STORE}`;
|
|
15
|
+
};
|
|
7
16
|
/**
|
|
8
|
-
*
|
|
17
|
+
* Disposable state of a broker-capable training container, all on tmpfs.
|
|
9
18
|
*
|
|
10
19
|
* The image root stays read-only and nothing here is a host bind, so a trial's
|
|
11
20
|
* worker home, workspace, turn store, wake-acceptance store and ledgers are
|
|
12
21
|
* on a filesystem that enforces unix ownership — which is what lets the slot
|
|
13
22
|
* supervisor's worker-uid canaries mean anything (P0 §5: a host bind under
|
|
14
23
|
* Docker Desktop or Colima silently ignores `chown`). The Grok realm is the
|
|
15
|
-
*
|
|
24
|
+
* credential mount. The run request counter has its own persistent named volume.
|
|
16
25
|
*/
|
|
17
|
-
export const trainingBrokerTmpfsTargets = () => [
|
|
26
|
+
export const trainingBrokerTmpfsTargets = (slots = 4) => [
|
|
18
27
|
{ path: "/tmp", size: "1g", mode: "1777" },
|
|
19
28
|
{ path: "/var/tmp", size: "256m", mode: "1777" },
|
|
20
29
|
{ path: "/work", size: "4g", mode: "0755" },
|
|
21
30
|
{ path: "/home/training", size: "1g", mode: "0755" },
|
|
22
31
|
{ path: TRAINING_PAIDEIA_ROOT, size: "64m", mode: "0755" },
|
|
23
|
-
{ path:
|
|
32
|
+
...trainingSlotDescriptors(slots).map(p => ({ path: p.root, size: "4g", mode: "0711" })),
|
|
33
|
+
{ path: TRAINING_TURN_STORE_ROOT, size: "256m", mode: "0700" },
|
|
24
34
|
{ path: TRAINING_GRANT_HOME_ROOT, size: "64m", mode: "0755" },
|
|
25
35
|
{ path: TRAINING_INFERENCE_DIRECTORY, size: "64m", mode: "0755" },
|
|
26
36
|
{ path: TRAINING_SUPERVISOR_DIRECTORY, size: "16m", mode: "0755" },
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type TrainingContext } from "../contract.js";
|
|
2
|
+
/** Resolve host-side subject policy; the public v1 context carries no sandbox authority. */
|
|
3
|
+
export declare const assertTrainingSubjectIsolation: (config: {
|
|
4
|
+
subjectIsolation?: "codex-native-sandbox";
|
|
5
|
+
}, context: TrainingContext) => Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { resolveDaimonEngine } from "../../../runtime/daimon/config.js";
|
|
2
|
+
import { resolveTrainingContextGraph } from "../context.js";
|
|
3
|
+
import { trainingContextSchema } from "../contract.js";
|
|
4
|
+
/** Resolve host-side subject policy; the public v1 context carries no sandbox authority. */
|
|
5
|
+
export const assertTrainingSubjectIsolation = async (config, context) => {
|
|
6
|
+
if (config.subjectIsolation !== "codex-native-sandbox")
|
|
7
|
+
return;
|
|
8
|
+
const parsed = trainingContextSchema.parse(context);
|
|
9
|
+
const { selected } = await resolveTrainingContextGraph(parsed.project.manifest, parsed.agent.id);
|
|
10
|
+
const agent = selected.value;
|
|
11
|
+
if (agent.runtime.name !== "daimon" || resolveDaimonEngine(agent) !== "codex" ||
|
|
12
|
+
agent.runtime.options.codex_policy !== "workspace-no-network" || agent.execution?.sandbox?.mode !== "workspace") {
|
|
13
|
+
throw Error("codex-native-sandbox subject isolation requires the selected training agent to use runtime daimon, engine codex, and strict codex_policy: workspace-no-network (execution.sandbox.mode: workspace)");
|
|
14
|
+
}
|
|
15
|
+
};
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
import type { CompilePlanNode, ResolvedAgentNode } from "../types.js";
|
|
1
2
|
import { type TrainingContext } from "./contract.js";
|
|
2
3
|
export interface CreateTrainingContextOptions {
|
|
3
4
|
agent?: string;
|
|
4
5
|
packageVersion: string;
|
|
5
6
|
}
|
|
7
|
+
/** Internal host-side resolution shared by context capture and subject admission. */
|
|
8
|
+
export declare const resolveTrainingContextGraph: (inputPath: string, selector?: string) => Promise<{
|
|
9
|
+
plan: import("../types.js").CompilePlan;
|
|
10
|
+
selected: CompilePlanNode & {
|
|
11
|
+
value: ResolvedAgentNode;
|
|
12
|
+
};
|
|
13
|
+
}>;
|
|
6
14
|
/** Resolves the complete project, preserving inherited selection and source provenance. */
|
|
7
15
|
export declare const createTrainingContext: (inputPath: string, options: CreateTrainingContextOptions) => Promise<TrainingContext>;
|
|
@@ -6,6 +6,8 @@ import { getManifestPath } from "../../filesystem/index.js";
|
|
|
6
6
|
import { buildCompilePlan } from "../buildCompilePlan.js";
|
|
7
7
|
import { stableStringify } from "../helpers.js";
|
|
8
8
|
import { resolveEffectiveModelTarget } from "../modelEnv.js";
|
|
9
|
+
import { pinWorkspaceBundle } from "../workspaceBundleResolve.js";
|
|
10
|
+
import { selectTrainingAgent } from "./selection.js";
|
|
9
11
|
import { TRAINING_CONTEXT_VERSION, trainingContextSchema } from "./contract.js";
|
|
10
12
|
const sha256 = (value) => `sha256:${createHash("sha256").update(value).digest("hex")}`;
|
|
11
13
|
const invalid = (message) => { throw new SpawnfileError("validation_error", message); };
|
|
@@ -13,17 +15,15 @@ const inside = (root, file) => {
|
|
|
13
15
|
const relative = path.relative(root, file);
|
|
14
16
|
return relative !== "" && relative !== ".." && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative);
|
|
15
17
|
};
|
|
16
|
-
/**
|
|
17
|
-
export const
|
|
18
|
+
/** Internal host-side resolution shared by context capture and subject admission. */
|
|
19
|
+
export const resolveTrainingContextGraph = async (inputPath, selector) => {
|
|
18
20
|
const plan = await buildCompilePlan(await realpath(getManifestPath(inputPath)));
|
|
19
21
|
const agents = plan.nodes.filter((node) => node.kind === "agent");
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
? "Training requires --agent with an exact node id when the project does not contain exactly one agent"
|
|
26
|
-
: `No canonical agent matches ${options.agent}`);
|
|
22
|
+
return { plan, selected: selectTrainingAgent(agents, selector) };
|
|
23
|
+
};
|
|
24
|
+
/** Resolves the complete project, preserving inherited selection and source provenance. */
|
|
25
|
+
export const createTrainingContext = async (inputPath, options) => {
|
|
26
|
+
const { plan, selected } = await resolveTrainingContextGraph(inputPath, options.agent);
|
|
27
27
|
const agent = selected.value;
|
|
28
28
|
const manifest = await realpath(plan.root);
|
|
29
29
|
const root = path.dirname(manifest);
|
|
@@ -83,11 +83,11 @@ export const createTrainingContext = async (inputPath, options) => {
|
|
|
83
83
|
model: primary ? { provider: primary.provider, name: primary.name, authMethod: primary.auth.method } : null
|
|
84
84
|
},
|
|
85
85
|
sources, documents, skills,
|
|
86
|
-
resources: (agent.workspaceResources ?? []).map((resource) => ({
|
|
86
|
+
resources: await Promise.all((agent.workspaceResources ?? []).map(async (resource) => ({
|
|
87
87
|
id: resource.id, kind: resource.kind, mount: resource.mount, mode: resource.mode, sharing: resource.sharing,
|
|
88
88
|
definitionDigest: sha256(stableStringify(resource)),
|
|
89
|
-
pin: resource.kind === "bundle" ? resource
|
|
90
|
-
})),
|
|
89
|
+
pin: resource.kind === "bundle" ? await pinWorkspaceBundle(resource) : resource.kind === "git" ? resource.ref ?? null : null
|
|
90
|
+
}))),
|
|
91
91
|
requirements: { nativeCompilation: true, isolatedPreparation: true }
|
|
92
92
|
});
|
|
93
93
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const TRAINING_CONTEXT_VERSION: "spawnfile.training-context.v1";
|
|
3
|
+
export declare const TRAINING_EXECUTION_CAPABILITY_LABEL = "com.spawnfile.training.execution";
|
|
4
|
+
export declare const TRAINING_EXECUTION_VERSION = "spawnfile.training-execution.v1";
|
|
3
5
|
export declare const trainingSourceSchema: z.ZodObject<{
|
|
4
6
|
sourcePath: z.ZodString;
|
|
5
7
|
destinationPath: z.ZodString;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export const TRAINING_CONTEXT_VERSION = "spawnfile.training-context.v1";
|
|
3
|
+
export const TRAINING_EXECUTION_CAPABILITY_LABEL = "com.spawnfile.training.execution";
|
|
4
|
+
export const TRAINING_EXECUTION_VERSION = "spawnfile.training-execution.v1";
|
|
3
5
|
const digest = z.string().regex(/^sha256:[a-f0-9]{64}$/u);
|
|
4
6
|
const absolutePath = z.string().min(1).regex(/^(?:\/|[A-Za-z]:[\\/])/u);
|
|
5
7
|
const relativePath = z.string().min(1).regex(/^(?!\/)(?!.*(?:^|\/)\.\.(?:\/|$))[^\\]+$/u);
|