@atomic-chat/core 0.5.1 → 0.13.2
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 +22 -0
- package/dist/app-daemon.js +20 -67
- package/dist/app-daemon.js.map +1 -1
- package/dist/backend/advisor/advisor.d.ts +132 -0
- package/dist/backend/advisor/advisor.js +537 -0
- package/dist/backend/advisor/advisor.js.map +1 -0
- package/dist/backend/advisor/index.d.ts +6 -0
- package/dist/backend/advisor/index.js +7 -0
- package/dist/backend/advisor/index.js.map +1 -0
- package/dist/backend/advisor/policy.d.ts +81 -0
- package/dist/backend/advisor/policy.js +154 -0
- package/dist/backend/advisor/policy.js.map +1 -0
- package/dist/backend/catalog/archive.d.ts +21 -7
- package/dist/backend/catalog/archive.js +57 -17
- package/dist/backend/catalog/archive.js.map +1 -1
- package/dist/backend/catalog/bundled-manifest-baseline.js +42 -26
- package/dist/backend/catalog/bundled-manifest-baseline.js.map +1 -1
- package/dist/backend/catalog/cuda-family.d.ts +12 -2
- package/dist/backend/catalog/cuda-family.js +30 -7
- package/dist/backend/catalog/cuda-family.js.map +1 -1
- package/dist/backend/catalog/index.d.ts +5 -0
- package/dist/backend/catalog/index.js +5 -0
- package/dist/backend/catalog/index.js.map +1 -1
- package/dist/backend/catalog/manifest.d.ts +5 -3
- package/dist/backend/catalog/manifest.js +12 -9
- package/dist/backend/catalog/manifest.js.map +1 -1
- package/dist/backend/catalog/migrate.d.ts +8 -6
- package/dist/backend/catalog/migrate.js +26 -15
- package/dist/backend/catalog/migrate.js.map +1 -1
- package/dist/backend/catalog/prism-catalog.d.ts +42 -0
- package/dist/backend/catalog/prism-catalog.js +101 -0
- package/dist/backend/catalog/prism-catalog.js.map +1 -0
- package/dist/backend/catalog/prism-manifest-baseline.d.ts +2 -0
- package/dist/backend/catalog/prism-manifest-baseline.js +11 -0
- package/dist/backend/catalog/prism-manifest-baseline.js.map +1 -0
- package/dist/backend/catalog/prism-manifest-baseline.json +134 -0
- package/dist/backend/catalog/prism-manifest.d.ts +90 -0
- package/dist/backend/catalog/prism-manifest.js +171 -0
- package/dist/backend/catalog/prism-manifest.js.map +1 -0
- package/dist/backend/catalog/turboquant-catalog.d.ts +60 -0
- package/dist/backend/catalog/turboquant-catalog.js +162 -0
- package/dist/backend/catalog/turboquant-catalog.js.map +1 -0
- package/dist/backend/catalog/turboquant-index.d.ts +104 -0
- package/dist/backend/catalog/turboquant-index.js +260 -0
- package/dist/backend/catalog/turboquant-index.js.map +1 -0
- package/dist/backend/index.d.ts +1 -0
- package/dist/backend/index.js +1 -0
- package/dist/backend/index.js.map +1 -1
- package/dist/backend/install/runtime-backend.d.ts +6 -6
- package/dist/backend/install/runtime-backend.js +23 -20
- package/dist/backend/install/runtime-backend.js.map +1 -1
- package/dist/backend/install/service.d.ts +106 -5
- package/dist/backend/install/service.js +247 -21
- package/dist/backend/install/service.js.map +1 -1
- package/dist/backend/installed/bundled.d.ts +19 -0
- package/dist/backend/installed/bundled.js +45 -0
- package/dist/backend/installed/bundled.js.map +1 -0
- package/dist/backend/installed/index.d.ts +1 -0
- package/dist/backend/installed/index.js +1 -0
- package/dist/backend/installed/index.js.map +1 -1
- package/dist/backend/installed/installed.js +3 -0
- package/dist/backend/installed/installed.js.map +1 -1
- package/dist/backend/optimal/optimal-cache.d.ts +27 -8
- package/dist/backend/optimal/optimal-cache.js +38 -19
- package/dist/backend/optimal/optimal-cache.js.map +1 -1
- package/dist/backend/optimal/optimal-store.js +1 -1
- package/dist/backend/optimal/optimal-store.js.map +1 -1
- package/dist/backend/select/categories.d.ts +2 -1
- package/dist/backend/select/categories.js +8 -1
- package/dist/backend/select/categories.js.map +1 -1
- package/dist/backend/select/features.d.ts +13 -5
- package/dist/backend/select/features.js +36 -6
- package/dist/backend/select/features.js.map +1 -1
- package/dist/backend/select/index.d.ts +2 -0
- package/dist/backend/select/index.js +2 -0
- package/dist/backend/select/index.js.map +1 -1
- package/dist/backend/select/prism.d.ts +54 -0
- package/dist/backend/select/prism.js +212 -0
- package/dist/backend/select/prism.js.map +1 -0
- package/dist/backend/select/recovery.d.ts +4 -2
- package/dist/backend/select/recovery.js +17 -5
- package/dist/backend/select/recovery.js.map +1 -1
- package/dist/backend/select/tiers.d.ts +20 -11
- package/dist/backend/select/tiers.js +49 -11
- package/dist/backend/select/tiers.js.map +1 -1
- package/dist/backend/select/turboquant-tiers.d.ts +45 -0
- package/dist/backend/select/turboquant-tiers.js +114 -0
- package/dist/backend/select/turboquant-tiers.js.map +1 -0
- package/dist/backend/types.d.ts +6 -69
- package/dist/cli/commands/backends.d.ts +10 -0
- package/dist/cli/commands/backends.js +142 -0
- package/dist/cli/commands/backends.js.map +1 -0
- package/dist/cli/commands/hardware.d.ts +13 -0
- package/dist/cli/commands/hardware.js +71 -0
- package/dist/cli/commands/hardware.js.map +1 -0
- package/dist/cli/commands/host-step.d.ts +28 -0
- package/dist/cli/commands/host-step.js +67 -0
- package/dist/cli/commands/host-step.js.map +1 -0
- package/dist/cli/commands/index.d.ts +4 -1
- package/dist/cli/commands/index.js +4 -1
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/serve.js +4 -4
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/cli/commands/shared.d.ts +6 -1
- package/dist/cli/commands/shared.js +7 -0
- package/dist/cli/commands/shared.js.map +1 -1
- package/dist/cli/io.d.ts +11 -0
- package/dist/cli/io.js +28 -3
- package/dist/cli/io.js.map +1 -1
- package/dist/cli/launch.js +2 -2
- package/dist/cli/launch.js.map +1 -1
- package/dist/cli/main.d.ts +1 -1
- package/dist/cli/main.js +11 -1
- package/dist/cli/main.js.map +1 -1
- package/dist/client/control-client.d.ts +128 -7
- package/dist/client/control-client.js +211 -12
- package/dist/client/control-client.js.map +1 -1
- package/dist/cloud/registry.js +9 -1
- package/dist/cloud/registry.js.map +1 -1
- package/dist/config/paths.d.ts +137 -0
- package/dist/config/paths.js +163 -0
- package/dist/config/paths.js.map +1 -1
- package/dist/contracts/backend-advisor.d.ts +225 -0
- package/dist/contracts/backend-advisor.js +14 -0
- package/dist/contracts/backend-advisor.js.map +1 -0
- package/dist/contracts/control-api.d.ts +7 -1
- package/dist/contracts/control-api.js +7 -1
- package/dist/contracts/control-api.js.map +1 -1
- package/dist/contracts/decision.d.ts +394 -0
- package/dist/contracts/decision.js +69 -0
- package/dist/contracts/decision.js.map +1 -0
- package/dist/contracts/diffusion.d.ts +62 -9
- package/dist/contracts/embedding.d.ts +103 -0
- package/dist/contracts/embedding.js +24 -0
- package/dist/contracts/embedding.js.map +1 -0
- package/dist/contracts/engine-builds.d.ts +108 -0
- package/dist/contracts/engine-builds.js +11 -0
- package/dist/contracts/engine-builds.js.map +1 -0
- package/dist/contracts/engines.d.ts +157 -0
- package/dist/contracts/engines.js +50 -0
- package/dist/contracts/engines.js.map +1 -0
- package/dist/contracts/environment.d.ts +774 -0
- package/dist/contracts/environment.js +116 -0
- package/dist/contracts/environment.js.map +1 -0
- package/dist/contracts/errors.d.ts +43 -2
- package/dist/contracts/errors.js +41 -0
- package/dist/contracts/errors.js.map +1 -1
- package/dist/contracts/events.d.ts +82 -4
- package/dist/contracts/hardware.d.ts +79 -6
- package/dist/contracts/hardware.js +9 -5
- package/dist/contracts/hardware.js.map +1 -1
- package/dist/contracts/index.d.ts +8 -0
- package/dist/contracts/index.js +8 -0
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/model-compatibility.d.ts +97 -0
- package/dist/contracts/model-compatibility.js +6 -0
- package/dist/contracts/model-compatibility.js.map +1 -0
- package/dist/contracts/model-setup.d.ts +115 -0
- package/dist/contracts/model-setup.js +33 -0
- package/dist/contracts/model-setup.js.map +1 -0
- package/dist/contracts/model-yml.d.ts +14 -0
- package/dist/contracts/model-yml.js +1 -0
- package/dist/contracts/model-yml.js.map +1 -1
- package/dist/contracts/session.d.ts +45 -2
- package/dist/contracts/session.js +14 -1
- package/dist/contracts/session.js.map +1 -1
- package/dist/contracts/settings.d.ts +44 -1
- package/dist/contracts/settings.js.map +1 -1
- package/dist/core/atomic-core.d.ts +44 -5
- package/dist/core/atomic-core.js +24 -0
- package/dist/core/atomic-core.js.map +1 -1
- package/dist/core/create.js +517 -23
- package/dist/core/create.js.map +1 -1
- package/dist/core/gpu/index.d.ts +6 -0
- package/dist/core/gpu/index.js +7 -0
- package/dist/core/gpu/index.js.map +1 -0
- package/dist/core/gpu/policy.d.ts +68 -0
- package/dist/core/gpu/policy.js +99 -0
- package/dist/core/gpu/policy.js.map +1 -0
- package/dist/core/gpu/residency.d.ts +44 -0
- package/dist/core/gpu/residency.js +101 -0
- package/dist/core/gpu/residency.js.map +1 -0
- package/dist/core/gpu-residency.d.ts +39 -0
- package/dist/core/gpu-residency.js +32 -0
- package/dist/core/gpu-residency.js.map +1 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/managed-engines.d.ts +207 -0
- package/dist/core/managed-engines.js +579 -0
- package/dist/core/managed-engines.js.map +1 -0
- package/dist/core/managed-environment.d.ts +72 -0
- package/dist/core/managed-environment.js +218 -0
- package/dist/core/managed-environment.js.map +1 -0
- package/dist/core/model-setup/index.d.ts +4 -0
- package/dist/core/model-setup/index.js +5 -0
- package/dist/core/model-setup/index.js.map +1 -0
- package/dist/core/model-setup/plan.d.ts +56 -0
- package/dist/core/model-setup/plan.js +158 -0
- package/dist/core/model-setup/plan.js.map +1 -0
- package/dist/core/model-setup/service.d.ts +92 -0
- package/dist/core/model-setup/service.js +329 -0
- package/dist/core/model-setup/service.js.map +1 -0
- package/dist/core/model-setup/store.d.ts +29 -0
- package/dist/core/model-setup/store.js +116 -0
- package/dist/core/model-setup/store.js.map +1 -0
- package/dist/core/model-setup/wiring.d.ts +59 -0
- package/dist/core/model-setup/wiring.js +132 -0
- package/dist/core/model-setup/wiring.js.map +1 -0
- package/dist/core/prism.d.ts +36 -0
- package/dist/core/prism.js +42 -0
- package/dist/core/prism.js.map +1 -0
- package/dist/core/public-server.d.ts +7 -0
- package/dist/core/public-server.js +2 -0
- package/dist/core/public-server.js.map +1 -1
- package/dist/core/sessions.d.ts +6 -1
- package/dist/core/sessions.js +18 -14
- package/dist/core/sessions.js.map +1 -1
- package/dist/core/types.d.ts +27 -1
- package/dist/core/types.js.map +1 -1
- package/dist/decision/args.d.ts +110 -0
- package/dist/decision/args.js +126 -0
- package/dist/decision/args.js.map +1 -0
- package/dist/decision/backoff.d.ts +25 -0
- package/dist/decision/backoff.js +33 -0
- package/dist/decision/backoff.js.map +1 -0
- package/dist/decision/engine-candidates.d.ts +52 -0
- package/dist/decision/engine-candidates.js +138 -0
- package/dist/decision/engine-candidates.js.map +1 -0
- package/dist/decision/engine-fallback.d.ts +41 -0
- package/dist/decision/engine-fallback.js +57 -0
- package/dist/decision/engine-fallback.js.map +1 -0
- package/dist/decision/engine-version.d.ts +27 -0
- package/dist/decision/engine-version.js +54 -0
- package/dist/decision/engine-version.js.map +1 -0
- package/dist/decision/engine.d.ts +114 -0
- package/dist/decision/engine.js +253 -0
- package/dist/decision/engine.js.map +1 -0
- package/dist/decision/http.d.ts +36 -0
- package/dist/decision/http.js +73 -0
- package/dist/decision/http.js.map +1 -0
- package/dist/decision/index.d.ts +20 -0
- package/dist/decision/index.js +21 -0
- package/dist/decision/index.js.map +1 -0
- package/dist/decision/model-facts.d.ts +32 -0
- package/dist/decision/model-facts.js +40 -0
- package/dist/decision/model-facts.js.map +1 -0
- package/dist/decision/outcome.d.ts +35 -0
- package/dist/decision/outcome.js +105 -0
- package/dist/decision/outcome.js.map +1 -0
- package/dist/decision/process.d.ts +67 -0
- package/dist/decision/process.js +133 -0
- package/dist/decision/process.js.map +1 -0
- package/dist/decision/readiness.d.ts +74 -0
- package/dist/decision/readiness.js +165 -0
- package/dist/decision/readiness.js.map +1 -0
- package/dist/decision/request.d.ts +11 -0
- package/dist/decision/request.js +56 -0
- package/dist/decision/request.js.map +1 -0
- package/dist/decision/service.d.ts +202 -0
- package/dist/decision/service.js +711 -0
- package/dist/decision/service.js.map +1 -0
- package/dist/decision/upstream-version.d.ts +23 -0
- package/dist/decision/upstream-version.js +34 -0
- package/dist/decision/upstream-version.js.map +1 -0
- package/dist/decision/wiring.d.ts +67 -0
- package/dist/decision/wiring.js +101 -0
- package/dist/decision/wiring.js.map +1 -0
- package/dist/diffusion/args.d.ts +4 -2
- package/dist/diffusion/args.js +10 -3
- package/dist/diffusion/args.js.map +1 -1
- package/dist/diffusion/image-job.js +1 -1
- package/dist/diffusion/image-job.js.map +1 -1
- package/dist/diffusion/install.d.ts +35 -11
- package/dist/diffusion/install.js +74 -49
- package/dist/diffusion/install.js.map +1 -1
- package/dist/diffusion/job-kind.d.ts +33 -7
- package/dist/diffusion/jobs.d.ts +6 -1
- package/dist/diffusion/jobs.js +60 -18
- package/dist/diffusion/jobs.js.map +1 -1
- package/dist/diffusion/parse.d.ts +1 -2
- package/dist/diffusion/parse.js +1 -13
- package/dist/diffusion/parse.js.map +1 -1
- package/dist/diffusion/progress.js +3 -0
- package/dist/diffusion/progress.js.map +1 -1
- package/dist/diffusion/server-process.d.ts +6 -0
- package/dist/diffusion/server-process.js +3 -2
- package/dist/diffusion/server-process.js.map +1 -1
- package/dist/diffusion/service.d.ts +52 -6
- package/dist/diffusion/service.js +215 -40
- package/dist/diffusion/service.js.map +1 -1
- package/dist/diffusion/session.d.ts +27 -3
- package/dist/diffusion/session.js +108 -17
- package/dist/diffusion/session.js.map +1 -1
- package/dist/diffusion/state.d.ts +19 -1
- package/dist/diffusion/state.js +10 -0
- package/dist/diffusion/state.js.map +1 -1
- package/dist/diffusion/tracker.d.ts +15 -1
- package/dist/diffusion/tracker.js +32 -6
- package/dist/diffusion/tracker.js.map +1 -1
- package/dist/diffusion/types.d.ts +7 -0
- package/dist/diffusion/types.js +11 -0
- package/dist/diffusion/types.js.map +1 -1
- package/dist/diffusion/video-estimate.d.ts +214 -0
- package/dist/diffusion/video-estimate.js +402 -0
- package/dist/diffusion/video-estimate.js.map +1 -0
- package/dist/diffusion/video-eta.d.ts +90 -0
- package/dist/diffusion/video-eta.js +248 -0
- package/dist/diffusion/video-eta.js.map +1 -0
- package/dist/diffusion/video-history.d.ts +45 -0
- package/dist/diffusion/video-history.js +121 -0
- package/dist/diffusion/video-history.js.map +1 -0
- package/dist/diffusion/video-job.d.ts +13 -5
- package/dist/diffusion/video-job.js +42 -15
- package/dist/diffusion/video-job.js.map +1 -1
- package/dist/diffusion/video-recipe.js +3 -0
- package/dist/diffusion/video-recipe.js.map +1 -1
- package/dist/diffusion/video-tiling.d.ts +54 -0
- package/dist/diffusion/video-tiling.js +70 -0
- package/dist/diffusion/video-tiling.js.map +1 -0
- package/dist/diffusion/wiring.d.ts +14 -1
- package/dist/diffusion/wiring.js +7 -0
- package/dist/diffusion/wiring.js.map +1 -1
- package/dist/downloads/protocol.d.ts +3 -8
- package/dist/downloads/protocol.js.map +1 -1
- package/dist/embedding/args.d.ts +39 -0
- package/dist/embedding/args.js +46 -0
- package/dist/embedding/args.js.map +1 -0
- package/dist/embedding/engine.d.ts +50 -0
- package/dist/embedding/engine.js +100 -0
- package/dist/embedding/engine.js.map +1 -0
- package/dist/embedding/ffmpeg.d.ts +18 -0
- package/dist/embedding/ffmpeg.js +63 -0
- package/dist/embedding/ffmpeg.js.map +1 -0
- package/dist/embedding/index.d.ts +16 -0
- package/dist/embedding/index.js +17 -0
- package/dist/embedding/index.js.map +1 -0
- package/dist/embedding/model-facts.d.ts +51 -0
- package/dist/embedding/model-facts.js +84 -0
- package/dist/embedding/model-facts.js.map +1 -0
- package/dist/embedding/process.d.ts +66 -0
- package/dist/embedding/process.js +131 -0
- package/dist/embedding/process.js.map +1 -0
- package/dist/embedding/readiness.d.ts +56 -0
- package/dist/embedding/readiness.js +114 -0
- package/dist/embedding/readiness.js.map +1 -0
- package/dist/embedding/request.d.ts +43 -0
- package/dist/embedding/request.js +285 -0
- package/dist/embedding/request.js.map +1 -0
- package/dist/embedding/service.d.ts +152 -0
- package/dist/embedding/service.js +602 -0
- package/dist/embedding/service.js.map +1 -0
- package/dist/embedding/wiring.d.ts +51 -0
- package/dist/embedding/wiring.js +79 -0
- package/dist/embedding/wiring.js.map +1 -0
- package/dist/engine-builds/builds.d.ts +54 -0
- package/dist/engine-builds/builds.js +151 -0
- package/dist/engine-builds/builds.js.map +1 -0
- package/dist/engine-builds/index.d.ts +10 -0
- package/dist/engine-builds/index.js +11 -0
- package/dist/engine-builds/index.js.map +1 -0
- package/dist/engine-builds/install.d.ts +42 -0
- package/dist/engine-builds/install.js +100 -0
- package/dist/engine-builds/install.js.map +1 -0
- package/dist/engine-builds/manifest.d.ts +121 -0
- package/dist/engine-builds/manifest.js +254 -0
- package/dist/engine-builds/manifest.js.map +1 -0
- package/dist/engine-builds/order.d.ts +24 -0
- package/dist/engine-builds/order.js +44 -0
- package/dist/engine-builds/order.js.map +1 -0
- package/dist/engine-builds/select.d.ts +123 -0
- package/dist/engine-builds/select.js +223 -0
- package/dist/engine-builds/select.js.map +1 -0
- package/dist/engine-builds/service.d.ts +123 -0
- package/dist/engine-builds/service.js +392 -0
- package/dist/engine-builds/service.js.map +1 -0
- package/dist/engines/descriptor-order.d.ts +28 -0
- package/dist/engines/descriptor-order.js +60 -0
- package/dist/engines/descriptor-order.js.map +1 -0
- package/dist/engines/engine-build.d.ts +23 -0
- package/dist/engines/engine-build.js +58 -0
- package/dist/engines/engine-build.js.map +1 -0
- package/dist/engines/index.d.ts +10 -0
- package/dist/engines/index.js +11 -0
- package/dist/engines/index.js.map +1 -0
- package/dist/engines/llamacpp.d.ts +71 -0
- package/dist/engines/llamacpp.js +176 -0
- package/dist/engines/llamacpp.js.map +1 -0
- package/dist/engines/managed.d.ts +49 -0
- package/dist/engines/managed.js +88 -0
- package/dist/engines/managed.js.map +1 -0
- package/dist/engines/service.d.ts +46 -0
- package/dist/engines/service.js +61 -0
- package/dist/engines/service.js.map +1 -0
- package/dist/engines/versions.d.ts +65 -0
- package/dist/engines/versions.js +259 -0
- package/dist/engines/versions.js.map +1 -0
- package/dist/hardware/cpu-flags.d.ts +44 -0
- package/dist/hardware/cpu-flags.js +206 -0
- package/dist/hardware/cpu-flags.js.map +1 -0
- package/dist/hardware/drm-sysfs.d.ts +51 -0
- package/dist/hardware/drm-sysfs.js +67 -0
- package/dist/hardware/drm-sysfs.js.map +1 -0
- package/dist/hardware/facts.d.ts +42 -0
- package/dist/hardware/facts.js +92 -0
- package/dist/hardware/facts.js.map +1 -0
- package/dist/hardware/index.d.ts +19 -3
- package/dist/hardware/index.js +19 -3
- package/dist/hardware/index.js.map +1 -1
- package/dist/hardware/merge.d.ts +55 -0
- package/dist/hardware/merge.js +141 -0
- package/dist/hardware/merge.js.map +1 -0
- package/dist/hardware/nvidia-smi.d.ts +43 -0
- package/dist/hardware/nvidia-smi.js +118 -0
- package/dist/hardware/nvidia-smi.js.map +1 -0
- package/dist/hardware/probe-common.d.ts +72 -0
- package/dist/hardware/probe-common.js +106 -0
- package/dist/hardware/probe-common.js.map +1 -0
- package/dist/hardware/probe-darwin.d.ts +20 -0
- package/dist/hardware/probe-darwin.js +76 -0
- package/dist/hardware/probe-darwin.js.map +1 -0
- package/dist/hardware/probe-linux.d.ts +9 -0
- package/dist/hardware/probe-linux.js +133 -0
- package/dist/hardware/probe-linux.js.map +1 -0
- package/dist/hardware/probe-windows.d.ts +7 -0
- package/dist/hardware/probe-windows.js +50 -0
- package/dist/hardware/probe-windows.js.map +1 -0
- package/dist/hardware/probe.d.ts +16 -0
- package/dist/hardware/probe.js +65 -0
- package/dist/hardware/probe.js.map +1 -0
- package/dist/hardware/service.d.ts +60 -0
- package/dist/hardware/service.js +114 -0
- package/dist/hardware/service.js.map +1 -0
- package/dist/hardware/vulkan.d.ts +47 -0
- package/dist/hardware/vulkan.js +148 -0
- package/dist/hardware/vulkan.js.map +1 -0
- package/dist/hardware/windows-video.d.ts +97 -0
- package/dist/hardware/windows-video.js +214 -0
- package/dist/hardware/windows-video.js.map +1 -0
- package/dist/host/app-daemon.d.ts +47 -0
- package/dist/host/app-daemon.js +146 -0
- package/dist/host/app-daemon.js.map +1 -0
- package/dist/host/index.d.ts +5 -3
- package/dist/host/index.js +5 -3
- package/dist/host/index.js.map +1 -1
- package/dist/host/log-file.d.ts +74 -0
- package/dist/host/log-file.js +214 -0
- package/dist/host/log-file.js.map +1 -0
- package/dist/host/recipes/enable-wsl.d.ts +63 -0
- package/dist/host/recipes/enable-wsl.js +73 -0
- package/dist/host/recipes/enable-wsl.js.map +1 -0
- package/dist/host/recipes/executor-io-windows.d.ts +69 -0
- package/dist/host/recipes/executor-io-windows.js +235 -0
- package/dist/host/recipes/executor-io-windows.js.map +1 -0
- package/dist/host/recipes/executor-io.d.ts +80 -0
- package/dist/host/recipes/executor-io.js +211 -0
- package/dist/host/recipes/executor-io.js.map +1 -0
- package/dist/host/recipes/executor.d.ts +81 -0
- package/dist/host/recipes/executor.js +678 -0
- package/dist/host/recipes/executor.js.map +1 -0
- package/dist/host/recipes/guest-executor.d.ts +29 -0
- package/dist/host/recipes/guest-executor.js +76 -0
- package/dist/host/recipes/guest-executor.js.map +1 -0
- package/dist/host/recipes/index.d.ts +16 -0
- package/dist/host/recipes/index.js +17 -0
- package/dist/host/recipes/index.js.map +1 -0
- package/dist/host/recipes/install-container-runtime.d.ts +389 -0
- package/dist/host/recipes/install-container-runtime.js +796 -0
- package/dist/host/recipes/install-container-runtime.js.map +1 -0
- package/dist/host/recipes/openpgp.d.ts +23 -0
- package/dist/host/recipes/openpgp.js +153 -0
- package/dist/host/recipes/openpgp.js.map +1 -0
- package/dist/host/recipes/request-file.d.ts +96 -0
- package/dist/host/recipes/request-file.js +103 -0
- package/dist/host/recipes/request-file.js.map +1 -0
- package/dist/lock/process-journal.d.ts +5 -2
- package/dist/lock/process-journal.js.map +1 -1
- package/dist/models/capabilities.d.ts +7 -0
- package/dist/models/capabilities.js +17 -1
- package/dist/models/capabilities.js.map +1 -1
- package/dist/models/compatibility/index.d.ts +10 -0
- package/dist/models/compatibility/index.js +11 -0
- package/dist/models/compatibility/index.js.map +1 -0
- package/dist/models/compatibility/inspect.d.ts +19 -0
- package/dist/models/compatibility/inspect.js +59 -0
- package/dist/models/compatibility/inspect.js.map +1 -0
- package/dist/models/compatibility/resolve.d.ts +59 -0
- package/dist/models/compatibility/resolve.js +219 -0
- package/dist/models/compatibility/resolve.js.map +1 -0
- package/dist/models/compatibility/rules-baseline.d.ts +2 -0
- package/dist/models/compatibility/rules-baseline.js +10 -0
- package/dist/models/compatibility/rules-baseline.js.map +1 -0
- package/dist/models/compatibility/rules-baseline.json +292 -0
- package/dist/models/compatibility/rules-service.d.ts +36 -0
- package/dist/models/compatibility/rules-service.js +109 -0
- package/dist/models/compatibility/rules-service.js.map +1 -0
- package/dist/models/compatibility/rules.d.ts +81 -0
- package/dist/models/compatibility/rules.js +164 -0
- package/dist/models/compatibility/rules.js.map +1 -0
- package/dist/models/compatibility/service.d.ts +59 -0
- package/dist/models/compatibility/service.js +137 -0
- package/dist/models/compatibility/service.js.map +1 -0
- package/dist/models/decision-checkpoint.d.ts +22 -0
- package/dist/models/decision-checkpoint.js +33 -0
- package/dist/models/decision-checkpoint.js.map +1 -0
- package/dist/models/gguf/classify.d.ts +27 -1
- package/dist/models/gguf/classify.js +78 -2
- package/dist/models/gguf/classify.js.map +1 -1
- package/dist/models/gguf/index.d.ts +1 -0
- package/dist/models/gguf/index.js +1 -0
- package/dist/models/gguf/index.js.map +1 -1
- package/dist/models/gguf/tensors.d.ts +56 -0
- package/dist/models/gguf/tensors.js +236 -0
- package/dist/models/gguf/tensors.js.map +1 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/index.js.map +1 -1
- package/dist/router/resolve.d.ts +7 -1
- package/dist/router/resolve.js +14 -1
- package/dist/router/resolve.js.map +1 -1
- package/dist/runtime/container/argv.d.ts +88 -0
- package/dist/runtime/container/argv.js +406 -0
- package/dist/runtime/container/argv.js.map +1 -0
- package/dist/runtime/container/docker-binary.d.ts +4 -0
- package/dist/runtime/container/docker-binary.js +34 -0
- package/dist/runtime/container/docker-binary.js.map +1 -0
- package/dist/runtime/container/env.d.ts +17 -0
- package/dist/runtime/container/env.js +52 -0
- package/dist/runtime/container/env.js.map +1 -0
- package/dist/runtime/container/exec.d.ts +27 -0
- package/dist/runtime/container/exec.js +79 -0
- package/dist/runtime/container/exec.js.map +1 -0
- package/dist/runtime/container/execution-journal.d.ts +55 -0
- package/dist/runtime/container/execution-journal.js +167 -0
- package/dist/runtime/container/execution-journal.js.map +1 -0
- package/dist/runtime/container/heartbeat.d.ts +47 -0
- package/dist/runtime/container/heartbeat.js +78 -0
- package/dist/runtime/container/heartbeat.js.map +1 -0
- package/dist/runtime/container/index.d.ts +30 -0
- package/dist/runtime/container/index.js +31 -0
- package/dist/runtime/container/index.js.map +1 -0
- package/dist/runtime/container/operations.d.ts +40 -0
- package/dist/runtime/container/operations.js +233 -0
- package/dist/runtime/container/operations.js.map +1 -0
- package/dist/runtime/container/pull.d.ts +48 -0
- package/dist/runtime/container/pull.js +280 -0
- package/dist/runtime/container/pull.js.map +1 -0
- package/dist/runtime/container/reconcile.d.ts +34 -0
- package/dist/runtime/container/reconcile.js +79 -0
- package/dist/runtime/container/reconcile.js.map +1 -0
- package/dist/runtime/container/types.d.ts +124 -0
- package/dist/runtime/container/types.js +2 -0
- package/dist/runtime/container/types.js.map +1 -0
- package/dist/runtime/container/watchdog.d.ts +114 -0
- package/dist/runtime/container/watchdog.js +418 -0
- package/dist/runtime/container/watchdog.js.map +1 -0
- package/dist/runtime/container/wiring.d.ts +78 -0
- package/dist/runtime/container/wiring.js +92 -0
- package/dist/runtime/container/wiring.js.map +1 -0
- package/dist/runtime/container/wsl-exec.d.ts +13 -0
- package/dist/runtime/container/wsl-exec.js +18 -0
- package/dist/runtime/container/wsl-exec.js.map +1 -0
- package/dist/runtime/environment/cached-document.d.ts +128 -0
- package/dist/runtime/environment/cached-document.js +218 -0
- package/dist/runtime/environment/cached-document.js.map +1 -0
- package/dist/runtime/environment/canonical-json.d.ts +78 -0
- package/dist/runtime/environment/canonical-json.js +86 -0
- package/dist/runtime/environment/canonical-json.js.map +1 -0
- package/dist/runtime/environment/descriptor-provider.d.ts +121 -0
- package/dist/runtime/environment/descriptor-provider.js +159 -0
- package/dist/runtime/environment/descriptor-provider.js.map +1 -0
- package/dist/runtime/environment/descriptor.d.ts +35 -0
- package/dist/runtime/environment/descriptor.js +239 -0
- package/dist/runtime/environment/descriptor.js.map +1 -0
- package/dist/runtime/environment/diagnostics.d.ts +50 -0
- package/dist/runtime/environment/diagnostics.js +114 -0
- package/dist/runtime/environment/diagnostics.js.map +1 -0
- package/dist/runtime/environment/document-fields.d.ts +39 -0
- package/dist/runtime/environment/document-fields.js +96 -0
- package/dist/runtime/environment/document-fields.js.map +1 -0
- package/dist/runtime/environment/environment-manifest-provider.d.ts +65 -0
- package/dist/runtime/environment/environment-manifest-provider.js +89 -0
- package/dist/runtime/environment/environment-manifest-provider.js.map +1 -0
- package/dist/runtime/environment/environment-manifest.d.ts +35 -0
- package/dist/runtime/environment/environment-manifest.js +131 -0
- package/dist/runtime/environment/environment-manifest.js.map +1 -0
- package/dist/runtime/environment/guest-host.d.ts +43 -0
- package/dist/runtime/environment/guest-host.js +88 -0
- package/dist/runtime/environment/guest-host.js.map +1 -0
- package/dist/runtime/environment/host-exec.d.ts +38 -0
- package/dist/runtime/environment/host-exec.js +145 -0
- package/dist/runtime/environment/host-exec.js.map +1 -0
- package/dist/runtime/environment/host-step-failure.d.ts +33 -0
- package/dist/runtime/environment/host-step-failure.js +34 -0
- package/dist/runtime/environment/host-step-failure.js.map +1 -0
- package/dist/runtime/environment/index.d.ts +56 -0
- package/dist/runtime/environment/index.js +57 -0
- package/dist/runtime/environment/index.js.map +1 -0
- package/dist/runtime/environment/installations.d.ts +25 -0
- package/dist/runtime/environment/installations.js +70 -0
- package/dist/runtime/environment/installations.js.map +1 -0
- package/dist/runtime/environment/inventory.d.ts +42 -0
- package/dist/runtime/environment/inventory.js +57 -0
- package/dist/runtime/environment/inventory.js.map +1 -0
- package/dist/runtime/environment/linux-blockers.d.ts +130 -0
- package/dist/runtime/environment/linux-blockers.js +251 -0
- package/dist/runtime/environment/linux-blockers.js.map +1 -0
- package/dist/runtime/environment/linux-docker-facts.d.ts +200 -0
- package/dist/runtime/environment/linux-docker-facts.js +342 -0
- package/dist/runtime/environment/linux-docker-facts.js.map +1 -0
- package/dist/runtime/environment/linux-docker-network.d.ts +80 -0
- package/dist/runtime/environment/linux-docker-network.js +195 -0
- package/dist/runtime/environment/linux-docker-network.js.map +1 -0
- package/dist/runtime/environment/linux-host.d.ts +22 -0
- package/dist/runtime/environment/linux-host.js +98 -0
- package/dist/runtime/environment/linux-host.js.map +1 -0
- package/dist/runtime/environment/linux-plan.d.ts +126 -0
- package/dist/runtime/environment/linux-plan.js +392 -0
- package/dist/runtime/environment/linux-plan.js.map +1 -0
- package/dist/runtime/environment/linux-probe.d.ts +245 -0
- package/dist/runtime/environment/linux-probe.js +315 -0
- package/dist/runtime/environment/linux-probe.js.map +1 -0
- package/dist/runtime/environment/linux-provisioner.d.ts +102 -0
- package/dist/runtime/environment/linux-provisioner.js +734 -0
- package/dist/runtime/environment/linux-provisioner.js.map +1 -0
- package/dist/runtime/environment/provisioner-descriptors.d.ts +17 -0
- package/dist/runtime/environment/provisioner-descriptors.js +62 -0
- package/dist/runtime/environment/provisioner-descriptors.js.map +1 -0
- package/dist/runtime/environment/recovery.d.ts +74 -0
- package/dist/runtime/environment/recovery.js +121 -0
- package/dist/runtime/environment/recovery.js.map +1 -0
- package/dist/runtime/environment/rootfs-download.d.ts +2 -0
- package/dist/runtime/environment/rootfs-download.js +47 -0
- package/dist/runtime/environment/rootfs-download.js.map +1 -0
- package/dist/runtime/environment/service.d.ts +280 -0
- package/dist/runtime/environment/service.js +776 -0
- package/dist/runtime/environment/service.js.map +1 -0
- package/dist/runtime/environment/state.d.ts +163 -0
- package/dist/runtime/environment/state.js +479 -0
- package/dist/runtime/environment/state.js.map +1 -0
- package/dist/runtime/environment/store-models.d.ts +19 -0
- package/dist/runtime/environment/store-models.js +30 -0
- package/dist/runtime/environment/store-models.js.map +1 -0
- package/dist/runtime/environment/store.d.ts +210 -0
- package/dist/runtime/environment/store.js +438 -0
- package/dist/runtime/environment/store.js.map +1 -0
- package/dist/runtime/environment/windows-environment-record.d.ts +48 -0
- package/dist/runtime/environment/windows-environment-record.js +89 -0
- package/dist/runtime/environment/windows-environment-record.js.map +1 -0
- package/dist/runtime/environment/windows-forwarding.d.ts +27 -0
- package/dist/runtime/environment/windows-forwarding.js +84 -0
- package/dist/runtime/environment/windows-forwarding.js.map +1 -0
- package/dist/runtime/environment/windows-guest-setup.d.ts +48 -0
- package/dist/runtime/environment/windows-guest-setup.js +157 -0
- package/dist/runtime/environment/windows-guest-setup.js.map +1 -0
- package/dist/runtime/environment/windows-host.d.ts +46 -0
- package/dist/runtime/environment/windows-host.js +163 -0
- package/dist/runtime/environment/windows-host.js.map +1 -0
- package/dist/runtime/environment/windows-plan.d.ts +78 -0
- package/dist/runtime/environment/windows-plan.js +216 -0
- package/dist/runtime/environment/windows-plan.js.map +1 -0
- package/dist/runtime/environment/windows-probe.d.ts +135 -0
- package/dist/runtime/environment/windows-probe.js +261 -0
- package/dist/runtime/environment/windows-probe.js.map +1 -0
- package/dist/runtime/environment/windows-provisioner.d.ts +113 -0
- package/dist/runtime/environment/windows-provisioner.js +782 -0
- package/dist/runtime/environment/windows-provisioner.js.map +1 -0
- package/dist/runtime/environment/wiring.d.ts +117 -0
- package/dist/runtime/environment/wiring.js +354 -0
- package/dist/runtime/environment/wiring.js.map +1 -0
- package/dist/runtime/foundation-models/runtime.d.ts +8 -0
- package/dist/runtime/foundation-models/runtime.js +5 -2
- package/dist/runtime/foundation-models/runtime.js.map +1 -1
- package/dist/runtime/llamacpp/args.d.ts +10 -1
- package/dist/runtime/llamacpp/args.js +43 -7
- package/dist/runtime/llamacpp/args.js.map +1 -1
- package/dist/runtime/llamacpp/fit-margin.d.ts +46 -0
- package/dist/runtime/llamacpp/fit-margin.js +47 -0
- package/dist/runtime/llamacpp/fit-margin.js.map +1 -0
- package/dist/runtime/llamacpp/index.d.ts +1 -0
- package/dist/runtime/llamacpp/index.js +1 -0
- package/dist/runtime/llamacpp/index.js.map +1 -1
- package/dist/runtime/llamacpp/load-plan.d.ts +23 -1
- package/dist/runtime/llamacpp/load-plan.js +82 -1
- package/dist/runtime/llamacpp/load-plan.js.map +1 -1
- package/dist/runtime/llamacpp/policy.d.ts +16 -0
- package/dist/runtime/llamacpp/policy.js +20 -0
- package/dist/runtime/llamacpp/policy.js.map +1 -1
- package/dist/runtime/llamacpp/probe.d.ts +21 -1
- package/dist/runtime/llamacpp/probe.js +32 -6
- package/dist/runtime/llamacpp/probe.js.map +1 -1
- package/dist/runtime/llamacpp/runtime.d.ts +56 -1
- package/dist/runtime/llamacpp/runtime.js +142 -15
- package/dist/runtime/llamacpp/runtime.js.map +1 -1
- package/dist/runtime/managed-engines/index.d.ts +8 -0
- package/dist/runtime/managed-engines/index.js +9 -0
- package/dist/runtime/managed-engines/index.js.map +1 -0
- package/dist/runtime/managed-engines/runtime.d.ts +140 -0
- package/dist/runtime/managed-engines/runtime.js +402 -0
- package/dist/runtime/managed-engines/runtime.js.map +1 -0
- package/dist/runtime/managed-engines/spec.d.ts +70 -0
- package/dist/runtime/managed-engines/spec.js +39 -0
- package/dist/runtime/managed-engines/spec.js.map +1 -0
- package/dist/runtime/managed-models/check.d.ts +50 -0
- package/dist/runtime/managed-models/check.js +157 -0
- package/dist/runtime/managed-models/check.js.map +1 -0
- package/dist/runtime/managed-models/compatibility.d.ts +256 -0
- package/dist/runtime/managed-models/compatibility.js +594 -0
- package/dist/runtime/managed-models/compatibility.js.map +1 -0
- package/dist/runtime/managed-models/delete.d.ts +15 -0
- package/dist/runtime/managed-models/delete.js +60 -0
- package/dist/runtime/managed-models/delete.js.map +1 -0
- package/dist/runtime/managed-models/guest-files.d.ts +8 -0
- package/dist/runtime/managed-models/guest-files.js +49 -0
- package/dist/runtime/managed-models/guest-files.js.map +1 -0
- package/dist/runtime/managed-models/index.d.ts +17 -0
- package/dist/runtime/managed-models/index.js +18 -0
- package/dist/runtime/managed-models/index.js.map +1 -0
- package/dist/runtime/managed-models/location.d.ts +22 -0
- package/dist/runtime/managed-models/location.js +53 -0
- package/dist/runtime/managed-models/location.js.map +1 -0
- package/dist/runtime/managed-models/migrate.d.ts +30 -0
- package/dist/runtime/managed-models/migrate.js +119 -0
- package/dist/runtime/managed-models/migrate.js.map +1 -0
- package/dist/runtime/managed-models/model-dir.d.ts +36 -0
- package/dist/runtime/managed-models/model-dir.js +136 -0
- package/dist/runtime/managed-models/model-dir.js.map +1 -0
- package/dist/runtime/managed-models/quant-format.d.ts +71 -0
- package/dist/runtime/managed-models/quant-format.js +299 -0
- package/dist/runtime/managed-models/quant-format.js.map +1 -0
- package/dist/runtime/managed-models/registry.d.ts +26 -0
- package/dist/runtime/managed-models/registry.js +66 -0
- package/dist/runtime/managed-models/registry.js.map +1 -0
- package/dist/runtime/managed-text/adapter.d.ts +266 -0
- package/dist/runtime/managed-text/adapter.js +96 -0
- package/dist/runtime/managed-text/adapter.js.map +1 -0
- package/dist/runtime/managed-text/backend-target.d.ts +3 -0
- package/dist/runtime/managed-text/backend-target.js +52 -0
- package/dist/runtime/managed-text/backend-target.js.map +1 -0
- package/dist/runtime/managed-text/deployment.d.ts +14 -0
- package/dist/runtime/managed-text/deployment.js +32 -0
- package/dist/runtime/managed-text/deployment.js.map +1 -0
- package/dist/runtime/managed-text/engine-cache.d.ts +15 -0
- package/dist/runtime/managed-text/engine-cache.js +64 -0
- package/dist/runtime/managed-text/engine-cache.js.map +1 -0
- package/dist/runtime/managed-text/gateway.d.ts +158 -0
- package/dist/runtime/managed-text/gateway.js +535 -0
- package/dist/runtime/managed-text/gateway.js.map +1 -0
- package/dist/runtime/managed-text/generation-defaults.d.ts +23 -0
- package/dist/runtime/managed-text/generation-defaults.js +51 -0
- package/dist/runtime/managed-text/generation-defaults.js.map +1 -0
- package/dist/runtime/managed-text/index.d.ts +26 -0
- package/dist/runtime/managed-text/index.js +27 -0
- package/dist/runtime/managed-text/index.js.map +1 -0
- package/dist/runtime/managed-text/lifecycle.d.ts +276 -0
- package/dist/runtime/managed-text/lifecycle.js +859 -0
- package/dist/runtime/managed-text/lifecycle.js.map +1 -0
- package/dist/runtime/managed-text/load-policy.d.ts +47 -0
- package/dist/runtime/managed-text/load-policy.js +111 -0
- package/dist/runtime/managed-text/load-policy.js.map +1 -0
- package/dist/runtime/managed-text/mount-source.d.ts +14 -0
- package/dist/runtime/managed-text/mount-source.js +18 -0
- package/dist/runtime/managed-text/mount-source.js.map +1 -0
- package/dist/runtime/managed-text/readiness.d.ts +13 -0
- package/dist/runtime/managed-text/readiness.js +24 -0
- package/dist/runtime/managed-text/readiness.js.map +1 -0
- package/dist/runtime/managed-text/request-rules.d.ts +18 -0
- package/dist/runtime/managed-text/request-rules.js +62 -0
- package/dist/runtime/managed-text/request-rules.js.map +1 -0
- package/dist/runtime/managed-text/types.d.ts +88 -0
- package/dist/runtime/managed-text/types.js +12 -0
- package/dist/runtime/managed-text/types.js.map +1 -0
- package/dist/runtime/managed-text/wsl-deployment.d.ts +24 -0
- package/dist/runtime/managed-text/wsl-deployment.js +70 -0
- package/dist/runtime/managed-text/wsl-deployment.js.map +1 -0
- package/dist/runtime/mlx/errors.d.ts +6 -1
- package/dist/runtime/mlx/errors.js +7 -2
- package/dist/runtime/mlx/errors.js.map +1 -1
- package/dist/runtime/mlx/runtime.d.ts +36 -1
- package/dist/runtime/mlx/runtime.js +85 -4
- package/dist/runtime/mlx/runtime.js.map +1 -1
- package/dist/runtime/shared/backend-output.d.ts +23 -0
- package/dist/runtime/shared/backend-output.js +32 -0
- package/dist/runtime/shared/backend-output.js.map +1 -0
- package/dist/runtime/shared/bounded-output.d.ts +24 -0
- package/dist/runtime/shared/bounded-output.js +63 -0
- package/dist/runtime/shared/bounded-output.js.map +1 -0
- package/dist/runtime/shared/external-sessions.js +9 -1
- package/dist/runtime/shared/external-sessions.js.map +1 -1
- package/dist/runtime/shared/gpu-occupancy.d.ts +60 -0
- package/dist/runtime/shared/gpu-occupancy.js +10 -0
- package/dist/runtime/shared/gpu-occupancy.js.map +1 -0
- package/dist/runtime/shared/index.d.ts +4 -0
- package/dist/runtime/shared/index.js +4 -0
- package/dist/runtime/shared/index.js.map +1 -1
- package/dist/runtime/shared/local-runtime.d.ts +35 -0
- package/dist/runtime/shared/ports.d.ts +6 -0
- package/dist/runtime/shared/ports.js +12 -1
- package/dist/runtime/shared/ports.js.map +1 -1
- package/dist/runtime/shared/process.d.ts +11 -0
- package/dist/runtime/shared/process.js +20 -0
- package/dist/runtime/shared/process.js.map +1 -1
- package/dist/runtime/shared/redact-args.d.ts +7 -0
- package/dist/runtime/shared/redact-args.js +26 -0
- package/dist/runtime/shared/redact-args.js.map +1 -0
- package/dist/runtime/shared/sidecar.d.ts +15 -0
- package/dist/runtime/shared/sidecar.js +43 -8
- package/dist/runtime/shared/sidecar.js.map +1 -1
- package/dist/runtime/tensorrt-llm/adapter.d.ts +250 -0
- package/dist/runtime/tensorrt-llm/adapter.js +1011 -0
- package/dist/runtime/tensorrt-llm/adapter.js.map +1 -0
- package/dist/runtime/tensorrt-llm/check.d.ts +12 -0
- package/dist/runtime/tensorrt-llm/check.js +21 -0
- package/dist/runtime/tensorrt-llm/check.js.map +1 -0
- package/dist/runtime/tensorrt-llm/compatibility.d.ts +100 -0
- package/dist/runtime/tensorrt-llm/compatibility.js +181 -0
- package/dist/runtime/tensorrt-llm/compatibility.js.map +1 -0
- package/dist/runtime/tensorrt-llm/engine.d.ts +3 -0
- package/dist/runtime/tensorrt-llm/engine.js +24 -0
- package/dist/runtime/tensorrt-llm/engine.js.map +1 -0
- package/dist/runtime/tensorrt-llm/host-facts.d.ts +55 -0
- package/dist/runtime/tensorrt-llm/host-facts.js +87 -0
- package/dist/runtime/tensorrt-llm/host-facts.js.map +1 -0
- package/dist/runtime/tensorrt-llm/index.d.ts +30 -0
- package/dist/runtime/tensorrt-llm/index.js +31 -0
- package/dist/runtime/tensorrt-llm/index.js.map +1 -0
- package/dist/runtime/tensorrt-llm/installation.d.ts +23 -0
- package/dist/runtime/tensorrt-llm/installation.js +53 -0
- package/dist/runtime/tensorrt-llm/installation.js.map +1 -0
- package/dist/runtime/tensorrt-llm/kv-cache.d.ts +25 -0
- package/dist/runtime/tensorrt-llm/kv-cache.js +28 -0
- package/dist/runtime/tensorrt-llm/kv-cache.js.map +1 -0
- package/dist/runtime/tensorrt-llm/prelaunch.d.ts +20 -0
- package/dist/runtime/tensorrt-llm/prelaunch.js +168 -0
- package/dist/runtime/tensorrt-llm/prelaunch.js.map +1 -0
- package/dist/runtime/tensorrt-llm/route-policy.d.ts +19 -0
- package/dist/runtime/tensorrt-llm/route-policy.js +17 -0
- package/dist/runtime/tensorrt-llm/route-policy.js.map +1 -0
- package/dist/runtime/tensorrt-llm/settings.d.ts +7 -0
- package/dist/runtime/tensorrt-llm/settings.js +48 -0
- package/dist/runtime/tensorrt-llm/settings.js.map +1 -0
- package/dist/runtime/vllm/adapter.d.ts +46 -0
- package/dist/runtime/vllm/adapter.js +425 -0
- package/dist/runtime/vllm/adapter.js.map +1 -0
- package/dist/runtime/vllm/engine.d.ts +16 -0
- package/dist/runtime/vllm/engine.js +37 -0
- package/dist/runtime/vllm/engine.js.map +1 -0
- package/dist/runtime/vllm/index.d.ts +11 -0
- package/dist/runtime/vllm/index.js +12 -0
- package/dist/runtime/vllm/index.js.map +1 -0
- package/dist/runtime/vllm/memory.d.ts +69 -0
- package/dist/runtime/vllm/memory.js +123 -0
- package/dist/runtime/vllm/memory.js.map +1 -0
- package/dist/runtime/vllm/settings.d.ts +52 -0
- package/dist/runtime/vllm/settings.js +151 -0
- package/dist/runtime/vllm/settings.js.map +1 -0
- package/dist/runtime/wsl/guest-paths.d.ts +33 -0
- package/dist/runtime/wsl/guest-paths.js +83 -0
- package/dist/runtime/wsl/guest-paths.js.map +1 -0
- package/dist/runtime/wsl/guest-scope.d.ts +14 -0
- package/dist/runtime/wsl/guest-scope.js +98 -0
- package/dist/runtime/wsl/guest-scope.js.map +1 -0
- package/dist/runtime/wsl/index.d.ts +12 -0
- package/dist/runtime/wsl/index.js +13 -0
- package/dist/runtime/wsl/index.js.map +1 -0
- package/dist/runtime/wsl/keeper.d.ts +29 -0
- package/dist/runtime/wsl/keeper.js +48 -0
- package/dist/runtime/wsl/keeper.js.map +1 -0
- package/dist/runtime/wsl/transport.d.ts +106 -0
- package/dist/runtime/wsl/transport.js +181 -0
- package/dist/runtime/wsl/transport.js.map +1 -0
- package/dist/server/control/index.d.ts +1 -1
- package/dist/server/control/router.js +15 -0
- package/dist/server/control/router.js.map +1 -1
- package/dist/server/control/routes/backends.js +26 -0
- package/dist/server/control/routes/backends.js.map +1 -1
- package/dist/server/control/routes/decision.d.ts +10 -0
- package/dist/server/control/routes/decision.js +43 -0
- package/dist/server/control/routes/decision.js.map +1 -0
- package/dist/server/control/routes/diffusion-video.js +4 -0
- package/dist/server/control/routes/diffusion-video.js.map +1 -1
- package/dist/server/control/routes/diffusion.d.ts +1 -1
- package/dist/server/control/routes/diffusion.js +4 -9
- package/dist/server/control/routes/diffusion.js.map +1 -1
- package/dist/server/control/routes/embedding.d.ts +9 -0
- package/dist/server/control/routes/embedding.js +43 -0
- package/dist/server/control/routes/embedding.js.map +1 -0
- package/dist/server/control/routes/engine-builds.d.ts +14 -0
- package/dist/server/control/routes/engine-builds.js +82 -0
- package/dist/server/control/routes/engine-builds.js.map +1 -0
- package/dist/server/control/routes/engines.d.ts +17 -0
- package/dist/server/control/routes/engines.js +152 -0
- package/dist/server/control/routes/engines.js.map +1 -0
- package/dist/server/control/routes/environments.d.ts +16 -0
- package/dist/server/control/routes/environments.js +207 -0
- package/dist/server/control/routes/environments.js.map +1 -0
- package/dist/server/control/routes/hardware.d.ts +1 -1
- package/dist/server/control/routes/hardware.js +11 -6
- package/dist/server/control/routes/hardware.js.map +1 -1
- package/dist/server/control/routes/model-setups.d.ts +11 -0
- package/dist/server/control/routes/model-setups.js +55 -0
- package/dist/server/control/routes/model-setups.js.map +1 -0
- package/dist/server/control/routes/models.d.ts +3 -2
- package/dist/server/control/routes/models.js +45 -2
- package/dist/server/control/routes/models.js.map +1 -1
- package/dist/server/control/types.d.ts +167 -9
- package/dist/server/control/types.js.map +1 -1
- package/dist/server/http.d.ts +9 -1
- package/dist/server/http.js +51 -1
- package/dist/server/http.js.map +1 -1
- package/dist/server/public/decision-preview.d.ts +17 -0
- package/dist/server/public/decision-preview.js +119 -0
- package/dist/server/public/decision-preview.js.map +1 -0
- package/dist/server/public/decision.d.ts +32 -0
- package/dist/server/public/decision.js +135 -0
- package/dist/server/public/decision.js.map +1 -0
- package/dist/server/public/embedding.d.ts +31 -0
- package/dist/server/public/embedding.js +126 -0
- package/dist/server/public/embedding.js.map +1 -0
- package/dist/server/public/errors.d.ts +2 -1
- package/dist/server/public/errors.js +5 -2
- package/dist/server/public/errors.js.map +1 -1
- package/dist/server/public/forward.js +75 -3
- package/dist/server/public/forward.js.map +1 -1
- package/dist/server/public/gates.d.ts +13 -0
- package/dist/server/public/gates.js +37 -14
- package/dist/server/public/gates.js.map +1 -1
- package/dist/server/public/index.d.ts +5 -2
- package/dist/server/public/index.js +14 -1
- package/dist/server/public/index.js.map +1 -1
- package/dist/server/public/listing.d.ts +13 -2
- package/dist/server/public/listing.js +33 -9
- package/dist/server/public/listing.js.map +1 -1
- package/dist/server/public/policy.d.ts +9 -0
- package/dist/server/public/policy.js +68 -0
- package/dist/server/public/policy.js.map +1 -0
- package/dist/server/public/responses.js +10 -0
- package/dist/server/public/responses.js.map +1 -1
- package/dist/server/public/trace.d.ts +2 -2
- package/dist/server/public/trace.js +6 -2
- package/dist/server/public/trace.js.map +1 -1
- package/dist/server/public/types.d.ts +84 -1
- package/dist/settings/decision.d.ts +15 -0
- package/dist/settings/decision.js +88 -0
- package/dist/settings/decision.js.map +1 -0
- package/dist/settings/embedding.d.ts +12 -0
- package/dist/settings/embedding.js +82 -0
- package/dist/settings/embedding.js.map +1 -0
- package/dist/settings/index.d.ts +2 -0
- package/dist/settings/index.js +2 -0
- package/dist/settings/index.js.map +1 -1
- package/dist/settings/schema/atomic-prism.json +433 -0
- package/dist/settings/schema/tensorrt-llm.json +253 -0
- package/dist/settings/schema/vllm.json +273 -0
- package/dist/settings/schema.js +58 -0
- package/dist/settings/schema.js.map +1 -1
- package/dist/settings/store.d.ts +13 -2
- package/dist/settings/store.js +44 -0
- package/dist/settings/store.js.map +1 -1
- package/dist/util/index.d.ts +1 -0
- package/dist/util/index.js +1 -0
- package/dist/util/index.js.map +1 -1
- package/dist/util/result.d.ts +19 -0
- package/dist/util/result.js +15 -0
- package/dist/util/result.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/src/settings/schema/atomic-prism.json +433 -0
- package/src/settings/schema/tensorrt-llm.json +253 -0
- package/src/settings/schema/vllm.json +273 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type HostExec } from './host-exec.js';
|
|
2
|
+
import type { LinuxProbeDeps, LinuxProbeOptions } from './linux-probe.js';
|
|
3
|
+
export declare const MANAGED_TEST_HOST_ENV = "ATOMIC_MANAGED_TEST_HOST";
|
|
4
|
+
/** Everything the Linux provisioner reads the machine through. */
|
|
5
|
+
export interface LinuxHost {
|
|
6
|
+
probeDeps: LinuxProbeDeps;
|
|
7
|
+
options: () => LinuxProbeOptions;
|
|
8
|
+
/** Overrides for the Docker executor: set only for the test host. */
|
|
9
|
+
dockerPath?: string;
|
|
10
|
+
dockerSocketPath?: string;
|
|
11
|
+
}
|
|
12
|
+
/** The account this core runs as; `root` for uid 0 whatever the passwd name says. */
|
|
13
|
+
export declare function currentUserName(info?: () => {
|
|
14
|
+
uid: number;
|
|
15
|
+
username: string;
|
|
16
|
+
}): string;
|
|
17
|
+
/** The real machine. `exec` is injectable so a test can run it without spawning anything. */
|
|
18
|
+
export declare function realLinuxHost(env: Record<string, string | undefined>, exec?: HostExec, dockerPath?: () => Promise<string | null>): LinuxHost;
|
|
19
|
+
/** The test hook's folder, or null when it is not set (always, outside tests). */
|
|
20
|
+
export declare function managedTestHostDir(env: Record<string, string | undefined>): string | null;
|
|
21
|
+
/** The machine a test describes in `dir` (see the module comment for the layout). */
|
|
22
|
+
export declare function testLinuxHost(dir: string, env: Record<string, string | undefined>, exec?: HostExec): LinuxHost;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `probeLinux`'s view of the real machine (task 2.6): the read-only commands, files and free-space
|
|
3
|
+
* check `LinuxProbeDeps` describes, over `node:*` builtins. `linux-probe.ts` stays pure; this is the
|
|
4
|
+
* one place the Linux provisioner's probe touches the host.
|
|
5
|
+
*
|
|
6
|
+
* `docker` is never looked up on `PATH` (carry-forward from 2.8/2.12): the probe runs the same
|
|
7
|
+
* absolute binary the executor does (`resolveDockerBinary`, the fixed system directories), resolved
|
|
8
|
+
* on every probe because the setup's own privileged step may have installed it since the last one.
|
|
9
|
+
* A host with no docker CLI in those directories reads as "no docker CLI", which is what it is.
|
|
10
|
+
*
|
|
11
|
+
* `ATOMIC_MANAGED_TEST_HOST` is a test hook only, the same kind as `ATOMIC_CHATGPT_*`: production
|
|
12
|
+
* never sets it. It names a folder standing in for a whole Linux machine — `bin/<command>` for every
|
|
13
|
+
* probe command and the docker CLI, `root/<path>` for every file the probe reads, `free-disk-bytes`
|
|
14
|
+
* for the free space, `docker.sock` for the Engine API — so the compiled core's e2e suite can drive
|
|
15
|
+
* a full setup on any host without a real Docker, GPU or package manager (brief 2.6 e2e list).
|
|
16
|
+
*/
|
|
17
|
+
import { readFile, stat, statfs } from 'node:fs/promises';
|
|
18
|
+
import { userInfo } from 'node:os';
|
|
19
|
+
import { join } from 'node:path';
|
|
20
|
+
import { resolveDockerBinary } from '../container/index.js';
|
|
21
|
+
import { hostExec } from './host-exec.js';
|
|
22
|
+
export const MANAGED_TEST_HOST_ENV = 'ATOMIC_MANAGED_TEST_HOST';
|
|
23
|
+
const NOT_THERE = { code: null, stdout: '', stderr: 'no docker CLI in the system directories' };
|
|
24
|
+
/** `readFile` per `LinuxProbeDeps`' contract: null only for ENOENT, a rejection for anything else. */
|
|
25
|
+
async function readIfPresent(path) {
|
|
26
|
+
try {
|
|
27
|
+
return await readFile(path, 'utf8');
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
if (error.code === 'ENOENT')
|
|
31
|
+
return null;
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** `pathExists` per `LinuxProbeDeps`' contract: false only when the path is not there (`ENOENT`, or
|
|
36
|
+
* `ENOTDIR` for a file standing where a directory would be), a rejection for anything else. */
|
|
37
|
+
async function exists(path) {
|
|
38
|
+
try {
|
|
39
|
+
await stat(path);
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
const code = error.code;
|
|
44
|
+
if (code === 'ENOENT' || code === 'ENOTDIR')
|
|
45
|
+
return false;
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async function freeBytesAt(path) {
|
|
50
|
+
const info = await statfs(path);
|
|
51
|
+
return Number(info.bavail) * Number(info.bsize);
|
|
52
|
+
}
|
|
53
|
+
/** The account this core runs as; `root` for uid 0 whatever the passwd name says. */
|
|
54
|
+
export function currentUserName(info = userInfo) {
|
|
55
|
+
const { uid, username } = info();
|
|
56
|
+
return uid === 0 ? 'root' : username;
|
|
57
|
+
}
|
|
58
|
+
/** The real machine. `exec` is injectable so a test can run it without spawning anything. */
|
|
59
|
+
export function realLinuxHost(env, exec = hostExec(), dockerPath = () => resolveDockerBinary()) {
|
|
60
|
+
return {
|
|
61
|
+
probeDeps: {
|
|
62
|
+
exec: async (command, args, overlay) => {
|
|
63
|
+
if (command !== 'docker')
|
|
64
|
+
return exec(command, args, overlay);
|
|
65
|
+
const path = await dockerPath();
|
|
66
|
+
return path === null ? NOT_THERE : exec(path, args, overlay);
|
|
67
|
+
},
|
|
68
|
+
readFile: readIfPresent,
|
|
69
|
+
pathExists: exists,
|
|
70
|
+
freeDiskBytes: freeBytesAt,
|
|
71
|
+
},
|
|
72
|
+
options: () => ({ user: currentUserName(), xdgRuntimeDir: env['XDG_RUNTIME_DIR'] ?? null }),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/** The test hook's folder, or null when it is not set (always, outside tests). */
|
|
76
|
+
export function managedTestHostDir(env) {
|
|
77
|
+
const dir = env[MANAGED_TEST_HOST_ENV];
|
|
78
|
+
return dir === undefined || dir.trim() === '' ? null : dir;
|
|
79
|
+
}
|
|
80
|
+
/** The machine a test describes in `dir` (see the module comment for the layout). */
|
|
81
|
+
export function testLinuxHost(dir, env, exec = hostExec()) {
|
|
82
|
+
const inRoot = (path) => join(dir, 'root', path);
|
|
83
|
+
return {
|
|
84
|
+
probeDeps: {
|
|
85
|
+
exec: (command, args, overlay) => exec(join(dir, 'bin', command), args, overlay),
|
|
86
|
+
readFile: (path) => readIfPresent(inRoot(path)),
|
|
87
|
+
pathExists: (path) => exists(inRoot(path)),
|
|
88
|
+
freeDiskBytes: async (path) => {
|
|
89
|
+
const pinned = await readIfPresent(join(dir, 'free-disk-bytes'));
|
|
90
|
+
return pinned === null ? freeBytesAt(inRoot(path)) : Number(pinned.trim());
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
options: () => ({ user: currentUserName(), xdgRuntimeDir: env['XDG_RUNTIME_DIR'] ?? null }),
|
|
94
|
+
dockerPath: join(dir, 'bin', 'docker'),
|
|
95
|
+
dockerSocketPath: join(dir, 'docker.sock'),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=linux-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linux-host.js","sourceRoot":"","sources":["../../../src/runtime/environment/linux-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAiB,MAAM,gBAAgB,CAAA;AAGxD,MAAM,CAAC,MAAM,qBAAqB,GAAG,0BAA0B,CAAA;AAW/D,MAAM,SAAS,GAAkB,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,yCAAyC,EAAE,CAAA;AAE9G,sGAAsG;AACtG,KAAK,UAAU,aAAa,CAAC,IAAY;IACvC,IAAI,CAAC;QACH,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IACrC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAA;QACnE,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC;AAED;gGACgG;AAChG,KAAK,UAAU,MAAM,CAAC,IAAY;IAChC,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,CAAC,CAAA;QAChB,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,GAAI,KAA+B,CAAC,IAAI,CAAA;QAClD,IAAI,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,SAAS;YAAE,OAAO,KAAK,CAAA;QACzD,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,IAAY;IACrC,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,CAAA;IAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACjD,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,eAAe,CAAC,OAAgD,QAAQ;IACtF,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,CAAA;IAChC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAA;AACtC,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,aAAa,CAC3B,GAAuC,EACvC,OAAiB,QAAQ,EAAE,EAC3B,aAA2C,GAAG,EAAE,CAAC,mBAAmB,EAAE;IAEtE,OAAO;QACL,SAAS,EAAE;YACT,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;gBACrC,IAAI,OAAO,KAAK,QAAQ;oBAAE,OAAO,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;gBAC7D,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAA;gBAC/B,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;YAC9D,CAAC;YACD,QAAQ,EAAE,aAAa;YACvB,UAAU,EAAE,MAAM;YAClB,aAAa,EAAE,WAAW;SAC3B;QACD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,aAAa,EAAE,GAAG,CAAC,iBAAiB,CAAC,IAAI,IAAI,EAAE,CAAC;KAC5F,CAAA;AACH,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,kBAAkB,CAAC,GAAuC;IACxE,MAAM,GAAG,GAAG,GAAG,CAAC,qBAAqB,CAAC,CAAA;IACtC,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAA;AAC5D,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,aAAa,CAC3B,GAAW,EACX,GAAuC,EACvC,OAAiB,QAAQ,EAAE;IAE3B,MAAM,MAAM,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;IAChE,OAAO;QACL,SAAS,EAAE;YACT,IAAI,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC;YAChF,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC/C,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC1C,aAAa,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;gBAC5B,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAA;gBAChE,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;YAC5E,CAAC;SACF;QACD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,aAAa,EAAE,GAAG,CAAC,iBAAiB,CAAC,IAAI,IAAI,EAAE,CAAC;QAC3F,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC;QACtC,gBAAgB,EAAE,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC;KAC3C,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turning `LinuxFacts` into a verdict: adopt the machine as it stands, install what is missing, or
|
|
3
|
+
* explain why neither is possible before anything asks for a password (design D2).
|
|
4
|
+
*
|
|
5
|
+
* Six kinds of answer, and only two of them ever propose a system change:
|
|
6
|
+
*
|
|
7
|
+
* - **Adopt.** The daemon answers the current user over the system socket and already exposes a
|
|
8
|
+
* GPU runtime. Nothing is missing, so nothing is proposed — on any distribution, including ones
|
|
9
|
+
* nobody has qualified an install recipe for (spec: "Дистрибутив вне рецепта, но Docker с GPU
|
|
10
|
+
* готов"). Per controller ruling (item 11), `availability` still reads `setup-required` here —
|
|
11
|
+
* 2.6 is the one that upgrades it to `supported` once the installation itself is `ready`.
|
|
12
|
+
* - **Relogin required.** This account (never root, design D4) is already a confirmed member of the
|
|
13
|
+
* `docker` group, but this login session predates that. A `relogin-required` blocker, never an
|
|
14
|
+
* install plan, on every distribution (round 3 ruling 4) — plus one blocker for each other
|
|
15
|
+
* component offline evidence shows missing (CLI, toolkit, GPU runtime, service), worded for the
|
|
16
|
+
* gate: "setup will do this after you log back in" on a recipe distribution, exact commands on
|
|
17
|
+
* Arch, the gate's own blocker elsewhere (round 4, item 1). If the account is a member *and* this
|
|
18
|
+
* session already shows it, yet the daemon still refuses the connection, that is not a relogin
|
|
19
|
+
* problem at all — `docker-access-unexplained` below (round 2, item 2).
|
|
20
|
+
* - **Group only.** Everything else is ready (Docker, the toolkit, the GPU runtime, the service),
|
|
21
|
+
* but the account is not (confirmedly) a member of the `docker` group yet. On a distribution that
|
|
22
|
+
* would otherwise qualify for an automatic install, this is a minimal plan: just the group add.
|
|
23
|
+
* Everywhere else (Arch, an immutable base, or a distribution nobody has qualified), automatic
|
|
24
|
+
* elevation is not offered even for one command — the answer is a blocker with the exact commands
|
|
25
|
+
* instead (round 2, item 5; round 3, ruling 6 for rpm-ostree's extra step).
|
|
26
|
+
* - **Install plan.** Docker or the toolkit is missing, but this machine's distribution, version
|
|
27
|
+
* and architecture are on the descriptor's `linux.install-container-runtime` recipe. The plan
|
|
28
|
+
* lists only the packages this machine is actually missing, never a whole-system upgrade.
|
|
29
|
+
* - **Blocked.** Either a fact no install can fix (no driver, a driver or card too old, the wrong
|
|
30
|
+
* architecture), or a Docker install this integration will not touch (snap, rootless, Docker
|
|
31
|
+
* Desktop without a system Engine, the `podman-docker` shim, or one the package database and
|
|
32
|
+
* `docker info` simply do not recognise), or an immutable base (rpm-ostree) without a working
|
|
33
|
+
* Docker already, or a `daemon.json` this probe cannot read or parse, or — Arch and its
|
|
34
|
+
* derivatives only — exact manual commands, because Arch has no qualified recipe and installing a
|
|
35
|
+
* single package without a full `pacman -Syu` can leave the system inconsistent (design D2).
|
|
36
|
+
*
|
|
37
|
+
* Blockers that no install fixes are checked first and unconditionally: a host that happens to
|
|
38
|
+
* already expose a GPU runtime is still refused if the driver is below `minimum_driver_version` or
|
|
39
|
+
* every card is below `minimum_compute_capability` — the spec requires that check to run "до
|
|
40
|
+
* всякого согласия" (before any consent), not only on a host that still needs setup.
|
|
41
|
+
*
|
|
42
|
+
* Decision order (each step returns; nothing later can override an earlier one):
|
|
43
|
+
* 1. Universal blockers, all collected together: unread facts, architecture, driver, GPU, compute
|
|
44
|
+
* capability, a Docker install method this integration never touches (snap, rootless, Desktop,
|
|
45
|
+
* podman-docker), disk space.
|
|
46
|
+
* 2. Adopt, when the daemon answers and exposes a GPU runtime.
|
|
47
|
+
* 3. Access paths, daemon unreachable only: relogin (+ missing components), then
|
|
48
|
+
* `docker-access-unexplained` (group effective *and* nothing else missing), then "ready except
|
|
49
|
+
* access" (root → unexplained; gated → `docker-group-manual`; recipe → group-only plan).
|
|
50
|
+
* 4. Distribution gating (`installGate` + `gateBlockerApplies`, the same decision the relogin path
|
|
51
|
+
* uses): immutable base with a package missing, Arch, unrecognised docker, not on the recipe; an
|
|
52
|
+
* immutable base with its packages layered gets the remaining steps one by one instead.
|
|
53
|
+
* 5. An unreadable `daemon.json` when the runtime is not already known to be configured.
|
|
54
|
+
* 6. No systemd (`/run/systemd/system` absent): the recipe's service steps need it.
|
|
55
|
+
* 7. The install plan.
|
|
56
|
+
*
|
|
57
|
+
* Next to every verdict, and never changing it: plan warnings (`LinuxAssessment.warnings`). One
|
|
58
|
+
* exists so far (task 2.23, F-4): Docker is not running yet and the host's routes cover every one
|
|
59
|
+
* of Docker's default address pools, so `docker.service` would not start (`linux-docker-network.ts`).
|
|
60
|
+
*/
|
|
61
|
+
import type { ManagedAvailability, RecipeDistribution } from '../../contracts/index.js';
|
|
62
|
+
import { type LinuxBlocker } from './linux-blockers.js';
|
|
63
|
+
import { type LinuxPlanWarning } from './linux-docker-network.js';
|
|
64
|
+
import type { LinuxFacts } from './linux-probe.js';
|
|
65
|
+
export type { InstallGate, LinuxBlocker, LinuxBlockerReason } from './linux-blockers.js';
|
|
66
|
+
export type { LinuxPlanWarning } from './linux-docker-network.js';
|
|
67
|
+
export type LinuxSystemChangeCode = 'add-repository' | 'install-packages' | 'configure-nvidia-runtime' | 'generate-cdi-spec' | 'enable-docker-service' | 'add-user-to-docker-group' | 'restart-docker';
|
|
68
|
+
/**
|
|
69
|
+
* One line of an install plan, structured rather than pre-rendered: `code` and `params` let a
|
|
70
|
+
* client (or the plan digest, task 2.6) key off the change itself, `text` is what a person reads
|
|
71
|
+
* before the OS authorization prompt.
|
|
72
|
+
*/
|
|
73
|
+
export interface LinuxSystemChange {
|
|
74
|
+
code: LinuxSystemChangeCode;
|
|
75
|
+
text: string;
|
|
76
|
+
params?: Record<string, string>;
|
|
77
|
+
}
|
|
78
|
+
export interface LinuxInstallPlan {
|
|
79
|
+
recipe_id: string;
|
|
80
|
+
requires_elevation: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Always `true` for a plan this module returns (controller ruling, item 10 — spec text states
|
|
83
|
+
* `requires_elevation: true, may_require_relogin: true` together for the install-plan
|
|
84
|
+
* requirement): even a plan whose only content is package installs can leave a member of the
|
|
85
|
+
* `docker` group who is not yet reading as one, and a client should always offer the "log out and
|
|
86
|
+
* back in" step rather than assume that never applies.
|
|
87
|
+
*/
|
|
88
|
+
may_require_relogin: boolean;
|
|
89
|
+
system_changes: LinuxSystemChange[];
|
|
90
|
+
}
|
|
91
|
+
export interface LinuxAssessment {
|
|
92
|
+
availability: ManagedAvailability;
|
|
93
|
+
/** The machine is usable as it stands: nothing to install, nothing to authorize. */
|
|
94
|
+
adopts_existing_engine: boolean;
|
|
95
|
+
install_plan: LinuxInstallPlan | null;
|
|
96
|
+
blockers: LinuxBlocker[];
|
|
97
|
+
/**
|
|
98
|
+
* What may go wrong later that nothing here can fix (task 2.23, F-4): shown with the plan, never a
|
|
99
|
+
* blocker, never part of the consent. Empty when there is nothing to say.
|
|
100
|
+
*/
|
|
101
|
+
warnings: LinuxPlanWarning[];
|
|
102
|
+
}
|
|
103
|
+
export interface LinuxAssessmentOptions {
|
|
104
|
+
/** `linux.install-container-runtime`, the host recipe's own id — not hardcoded here. */
|
|
105
|
+
recipeId: string;
|
|
106
|
+
/**
|
|
107
|
+
* This recipe's qualified distributions, from the environment manifest; null when no manifest is
|
|
108
|
+
* available (change `extract-environment-manifest`, D5): then no automatic setup is offered, while
|
|
109
|
+
* a ready host is adopted as ever. Arch never checks this list.
|
|
110
|
+
*/
|
|
111
|
+
recipeDistributions: RecipeDistribution[] | null;
|
|
112
|
+
minimumDriverVersion: string;
|
|
113
|
+
minimumComputeCapability: string;
|
|
114
|
+
requiredDiskBytes: number | null;
|
|
115
|
+
/** The account the plan would add to the `docker` group. Never `root` (design D4, item 9): root
|
|
116
|
+
* needs no group membership, so this account should never be `root` in practice, but this module
|
|
117
|
+
* still never proposes `usermod` for it even if it is. */
|
|
118
|
+
currentUser: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Compares two dotted version strings (`"580.65.06"`, `"8.9"`) segment by segment, numerically.
|
|
122
|
+
* A missing trailing segment counts as `0`, so `"8"` and `"8.0"` compare equal.
|
|
123
|
+
*/
|
|
124
|
+
export declare function compareDottedVersions(a: string, b: string): number;
|
|
125
|
+
/** Turn the facts into a verdict: usable now, installable, waiting on a relogin, or not on this machine. */
|
|
126
|
+
export declare function assessLinux(facts: LinuxFacts, options: LinuxAssessmentOptions): LinuxAssessment;
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turning `LinuxFacts` into a verdict: adopt the machine as it stands, install what is missing, or
|
|
3
|
+
* explain why neither is possible before anything asks for a password (design D2).
|
|
4
|
+
*
|
|
5
|
+
* Six kinds of answer, and only two of them ever propose a system change:
|
|
6
|
+
*
|
|
7
|
+
* - **Adopt.** The daemon answers the current user over the system socket and already exposes a
|
|
8
|
+
* GPU runtime. Nothing is missing, so nothing is proposed — on any distribution, including ones
|
|
9
|
+
* nobody has qualified an install recipe for (spec: "Дистрибутив вне рецепта, но Docker с GPU
|
|
10
|
+
* готов"). Per controller ruling (item 11), `availability` still reads `setup-required` here —
|
|
11
|
+
* 2.6 is the one that upgrades it to `supported` once the installation itself is `ready`.
|
|
12
|
+
* - **Relogin required.** This account (never root, design D4) is already a confirmed member of the
|
|
13
|
+
* `docker` group, but this login session predates that. A `relogin-required` blocker, never an
|
|
14
|
+
* install plan, on every distribution (round 3 ruling 4) — plus one blocker for each other
|
|
15
|
+
* component offline evidence shows missing (CLI, toolkit, GPU runtime, service), worded for the
|
|
16
|
+
* gate: "setup will do this after you log back in" on a recipe distribution, exact commands on
|
|
17
|
+
* Arch, the gate's own blocker elsewhere (round 4, item 1). If the account is a member *and* this
|
|
18
|
+
* session already shows it, yet the daemon still refuses the connection, that is not a relogin
|
|
19
|
+
* problem at all — `docker-access-unexplained` below (round 2, item 2).
|
|
20
|
+
* - **Group only.** Everything else is ready (Docker, the toolkit, the GPU runtime, the service),
|
|
21
|
+
* but the account is not (confirmedly) a member of the `docker` group yet. On a distribution that
|
|
22
|
+
* would otherwise qualify for an automatic install, this is a minimal plan: just the group add.
|
|
23
|
+
* Everywhere else (Arch, an immutable base, or a distribution nobody has qualified), automatic
|
|
24
|
+
* elevation is not offered even for one command — the answer is a blocker with the exact commands
|
|
25
|
+
* instead (round 2, item 5; round 3, ruling 6 for rpm-ostree's extra step).
|
|
26
|
+
* - **Install plan.** Docker or the toolkit is missing, but this machine's distribution, version
|
|
27
|
+
* and architecture are on the descriptor's `linux.install-container-runtime` recipe. The plan
|
|
28
|
+
* lists only the packages this machine is actually missing, never a whole-system upgrade.
|
|
29
|
+
* - **Blocked.** Either a fact no install can fix (no driver, a driver or card too old, the wrong
|
|
30
|
+
* architecture), or a Docker install this integration will not touch (snap, rootless, Docker
|
|
31
|
+
* Desktop without a system Engine, the `podman-docker` shim, or one the package database and
|
|
32
|
+
* `docker info` simply do not recognise), or an immutable base (rpm-ostree) without a working
|
|
33
|
+
* Docker already, or a `daemon.json` this probe cannot read or parse, or — Arch and its
|
|
34
|
+
* derivatives only — exact manual commands, because Arch has no qualified recipe and installing a
|
|
35
|
+
* single package without a full `pacman -Syu` can leave the system inconsistent (design D2).
|
|
36
|
+
*
|
|
37
|
+
* Blockers that no install fixes are checked first and unconditionally: a host that happens to
|
|
38
|
+
* already expose a GPU runtime is still refused if the driver is below `minimum_driver_version` or
|
|
39
|
+
* every card is below `minimum_compute_capability` — the spec requires that check to run "до
|
|
40
|
+
* всякого согласия" (before any consent), not only on a host that still needs setup.
|
|
41
|
+
*
|
|
42
|
+
* Decision order (each step returns; nothing later can override an earlier one):
|
|
43
|
+
* 1. Universal blockers, all collected together: unread facts, architecture, driver, GPU, compute
|
|
44
|
+
* capability, a Docker install method this integration never touches (snap, rootless, Desktop,
|
|
45
|
+
* podman-docker), disk space.
|
|
46
|
+
* 2. Adopt, when the daemon answers and exposes a GPU runtime.
|
|
47
|
+
* 3. Access paths, daemon unreachable only: relogin (+ missing components), then
|
|
48
|
+
* `docker-access-unexplained` (group effective *and* nothing else missing), then "ready except
|
|
49
|
+
* access" (root → unexplained; gated → `docker-group-manual`; recipe → group-only plan).
|
|
50
|
+
* 4. Distribution gating (`installGate` + `gateBlockerApplies`, the same decision the relogin path
|
|
51
|
+
* uses): immutable base with a package missing, Arch, unrecognised docker, not on the recipe; an
|
|
52
|
+
* immutable base with its packages layered gets the remaining steps one by one instead.
|
|
53
|
+
* 5. An unreadable `daemon.json` when the runtime is not already known to be configured.
|
|
54
|
+
* 6. No systemd (`/run/systemd/system` absent): the recipe's service steps need it.
|
|
55
|
+
* 7. The install plan.
|
|
56
|
+
*
|
|
57
|
+
* Next to every verdict, and never changing it: plan warnings (`LinuxAssessment.warnings`). One
|
|
58
|
+
* exists so far (task 2.23, F-4): Docker is not running yet and the host's routes cover every one
|
|
59
|
+
* of Docker's default address pools, so `docker.service` would not start (`linux-docker-network.ts`).
|
|
60
|
+
*/
|
|
61
|
+
import { blocker, daemonJsonUnreadableBlocker, effectiveGpuRuntime, dockerGroupManualBlocker, gateBlocker, gateBlockerApplies, initNotSystemdBlocker, installMethodBlocker, missingComponentBlockers, reloginRequiredBlocker, } from './linux-blockers.js';
|
|
62
|
+
import { dockerAddressPoolWarning } from './linux-docker-network.js';
|
|
63
|
+
const SUPPORTED_ARCHITECTURES = new Set(['x86_64', 'aarch64']);
|
|
64
|
+
/**
|
|
65
|
+
* Compares two dotted version strings (`"580.65.06"`, `"8.9"`) segment by segment, numerically.
|
|
66
|
+
* A missing trailing segment counts as `0`, so `"8"` and `"8.0"` compare equal.
|
|
67
|
+
*/
|
|
68
|
+
export function compareDottedVersions(a, b) {
|
|
69
|
+
const left = a.split('.').map((segment) => Number(segment) || 0);
|
|
70
|
+
const right = b.split('.').map((segment) => Number(segment) || 0);
|
|
71
|
+
const length = Math.max(left.length, right.length);
|
|
72
|
+
for (let index = 0; index < length; index++) {
|
|
73
|
+
const leftValue = left[index] ?? 0;
|
|
74
|
+
const rightValue = right[index] ?? 0;
|
|
75
|
+
if (leftValue !== rightValue)
|
|
76
|
+
return leftValue < rightValue ? -1 : 1;
|
|
77
|
+
}
|
|
78
|
+
return 0;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Whether this probe recognises *something* about how Docker got here. Arch's own `docker` package
|
|
82
|
+
* is not one `dpkg-query`/`rpm -q` ever see (round 3, item 1/ruling 1) — there is exactly one common
|
|
83
|
+
* source there, nothing to disambiguate against the way Debian/Fedora need — so `docker.cli`
|
|
84
|
+
* answering at all on a `pacman`-family host stands in for a real `install_method` match.
|
|
85
|
+
*/
|
|
86
|
+
function dockerInstallRecognised(facts, distribution) {
|
|
87
|
+
return facts.docker.install_method !== null || (distribution.family === 'pacman' && facts.docker.cli);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The one place the install gate is decided (`InstallGate` in `linux-blockers.ts` lists the order).
|
|
91
|
+
* Every path that could offer or refuse automatic setup reads this, never its own copy (round 4).
|
|
92
|
+
*/
|
|
93
|
+
function installGate(facts, distribution, options) {
|
|
94
|
+
if (facts.immutable_os)
|
|
95
|
+
return 'immutable';
|
|
96
|
+
if (distribution.family === 'pacman')
|
|
97
|
+
return 'pacman';
|
|
98
|
+
if (facts.docker.cli && facts.docker.install_method === null)
|
|
99
|
+
return 'unrecognised';
|
|
100
|
+
if (options.recipeDistributions === null)
|
|
101
|
+
return 'manifest-unavailable';
|
|
102
|
+
const qualified = options.recipeDistributions.some((entry) => entry.id === distribution.id &&
|
|
103
|
+
entry.version_id === distribution.version_id &&
|
|
104
|
+
entry.arch === facts.architecture);
|
|
105
|
+
return qualified ? 'recipe' : 'unqualified';
|
|
106
|
+
}
|
|
107
|
+
/** Turn the facts into a verdict: usable now, installable, waiting on a relogin, or not on this machine. */
|
|
108
|
+
export function assessLinux(facts, options) {
|
|
109
|
+
const warning = dockerAddressPoolWarning({
|
|
110
|
+
dockerRunning: facts.docker.daemon_reachable || facts.docker.service_active === true,
|
|
111
|
+
addressPoolsConfigured: facts.docker.address_pools_configured,
|
|
112
|
+
routes: facts.routes,
|
|
113
|
+
});
|
|
114
|
+
return { ...verdict(facts, options), warnings: warning === null ? [] : [warning] };
|
|
115
|
+
}
|
|
116
|
+
function verdict(facts, options) {
|
|
117
|
+
const blocked = (blockers) => ({
|
|
118
|
+
availability: 'prerequisite-blocked',
|
|
119
|
+
adopts_existing_engine: false,
|
|
120
|
+
install_plan: null,
|
|
121
|
+
blockers,
|
|
122
|
+
});
|
|
123
|
+
const universal = [];
|
|
124
|
+
for (const name of facts.unknown) {
|
|
125
|
+
universal.push(blocker('unknown-fact', `Could not determine ${name} on this system.`, { fact: name }));
|
|
126
|
+
}
|
|
127
|
+
if (facts.architecture !== null && !SUPPORTED_ARCHITECTURES.has(facts.architecture)) {
|
|
128
|
+
universal.push(blocker('unsupported-architecture', `This machine's architecture (${facts.architecture}) is not supported; only x86_64 and aarch64 can run this runtime.`, { actual: facts.architecture }));
|
|
129
|
+
}
|
|
130
|
+
if (facts.driver_version === null) {
|
|
131
|
+
if (!facts.unknown.includes('nvidia-driver')) {
|
|
132
|
+
universal.push(blocker('driver-missing', 'No NVIDIA driver was found. Install the driver for your card, then try again.'));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
if (compareDottedVersions(facts.driver_version, options.minimumDriverVersion) < 0) {
|
|
137
|
+
universal.push(blocker('driver-too-old', `The NVIDIA driver is too old: this engine needs ${options.minimumDriverVersion} or newer, this machine has ${facts.driver_version}.`, { required: options.minimumDriverVersion, actual: facts.driver_version }));
|
|
138
|
+
}
|
|
139
|
+
if (facts.gpus.length === 0) {
|
|
140
|
+
universal.push(blocker('no-gpu', 'The NVIDIA driver is installed but reports no usable GPU.'));
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
const best = facts.gpus.reduce((champion, gpu) => compareDottedVersions(gpu.compute_capability, champion.compute_capability) > 0 ? gpu : champion);
|
|
144
|
+
if (compareDottedVersions(best.compute_capability, options.minimumComputeCapability) < 0) {
|
|
145
|
+
universal.push(blocker('compute-capability-too-low', `Needs a GPU with compute capability ${options.minimumComputeCapability} or newer (Ampere+); the best card here has ${best.compute_capability}.`, { required: options.minimumComputeCapability, actual: best.compute_capability }));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// A Docker install this integration will never adopt or install over, regardless of whether it
|
|
150
|
+
// happens to expose a GPU runtime — there is no safe way to lay `docker-ce` next to or over it.
|
|
151
|
+
const methodBlocker = installMethodBlocker(facts.docker.install_method);
|
|
152
|
+
if (methodBlocker !== null)
|
|
153
|
+
universal.push(methodBlocker);
|
|
154
|
+
// Insufficient room for the engine image blocks an adopted host exactly as much as one that
|
|
155
|
+
// still needs Docker installed, so this is checked unconditionally rather than only on the
|
|
156
|
+
// install-plan path.
|
|
157
|
+
if (options.requiredDiskBytes !== null &&
|
|
158
|
+
facts.free_disk_bytes !== null &&
|
|
159
|
+
facts.free_disk_bytes < options.requiredDiskBytes) {
|
|
160
|
+
universal.push(blocker('insufficient-disk', 'There is not enough free disk space for the runtime image.', {
|
|
161
|
+
free: String(facts.free_disk_bytes),
|
|
162
|
+
required: String(options.requiredDiskBytes),
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
165
|
+
if (universal.length > 0)
|
|
166
|
+
return blocked(universal);
|
|
167
|
+
const dockerReady = facts.docker.daemon_reachable && facts.docker.gpu_runtime;
|
|
168
|
+
if (dockerReady) {
|
|
169
|
+
// Ruling (item 11): stays 'setup-required' here even though nothing is missing — 2.6 owns the
|
|
170
|
+
// upgrade to 'supported' once the runtime installation itself reads ready.
|
|
171
|
+
return { availability: 'setup-required', adopts_existing_engine: true, install_plan: null, blockers: [] };
|
|
172
|
+
}
|
|
173
|
+
// `distribution` is guaranteed non-null here: a null distribution already added 'distribution'
|
|
174
|
+
// to `facts.unknown`, which returned above.
|
|
175
|
+
const distribution = facts.distribution;
|
|
176
|
+
const gate = installGate(facts, distribution, options);
|
|
177
|
+
// Access paths. Group effectiveness is a session-level fact, decided before distribution gating on
|
|
178
|
+
// every distribution (round 3, ruling 4). Root never needs the group (design D4), so a root session
|
|
179
|
+
// is never sent to relogin (round 4, item B).
|
|
180
|
+
if (!facts.docker.daemon_reachable && facts.docker_group.configured === true) {
|
|
181
|
+
if (!facts.docker_group.effective && options.currentUser !== 'root') {
|
|
182
|
+
// The account is a confirmed member; this session predates it. Never an install plan: nothing
|
|
183
|
+
// can be elevated from a session that is about to be replaced. Everything else offline evidence
|
|
184
|
+
// shows missing is named now, each as its own blocker, not discovered after the relogin
|
|
185
|
+
// (round 4, item 1 — the refined ruling 4).
|
|
186
|
+
// The gate's own blocker follows under the same rule as the full-install path
|
|
187
|
+
// (`gateBlockerApplies`, round 5 item 2) — except on Arch, whose per-component blockers already
|
|
188
|
+
// carry its exact commands, minus the group line this account no longer needs.
|
|
189
|
+
const components = missingComponentBlockers(facts, gate);
|
|
190
|
+
const gated = components.length > 0 && gate !== 'recipe' && gate !== 'pacman' && gateBlockerApplies(gate, facts);
|
|
191
|
+
return blocked([
|
|
192
|
+
reloginRequiredBlocker(),
|
|
193
|
+
...components,
|
|
194
|
+
...(gated ? [gateBlocker(gate, facts, distribution, options.currentUser)] : []),
|
|
195
|
+
]);
|
|
196
|
+
}
|
|
197
|
+
if (facts.docker_group.effective && missingComponentBlockers(facts, gate).length === 0) {
|
|
198
|
+
// Membership is confirmed *and* this session already has it, nothing else is missing, yet the
|
|
199
|
+
// daemon still refused — relogin will not fix that, and this probe has no further diagnosis to
|
|
200
|
+
// offer (round 2, item 2). With something missing (Docker gone, the service stopped, ...) that
|
|
201
|
+
// missing piece explains the refusal, so the host falls through to gating and the plan — which
|
|
202
|
+
// is what keeps the relogin blockers' "setup will do this after you log back in" true
|
|
203
|
+
// (round 5, item 1).
|
|
204
|
+
return blocked([
|
|
205
|
+
blocker('docker-access-unexplained', 'The docker group already includes this account and this login session already has it, and ' +
|
|
206
|
+
'the daemon still did not answer over the system socket. Something other than group ' +
|
|
207
|
+
"membership is blocking access — check the socket's permissions or an AppArmor/SELinux " +
|
|
208
|
+
'policy — this integration cannot fix it automatically.'),
|
|
209
|
+
]);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// Nothing but group membership is missing: Docker, the toolkit, the GPU runtime and the service
|
|
213
|
+
// are all there by every signal this probe has (round 2, items 2/3/5). Reaching here, `configured`
|
|
214
|
+
// is `false` or `'unknown'` — or root, which the relogin path above skips.
|
|
215
|
+
const readyExceptAccess = facts.docker.cli &&
|
|
216
|
+
facts.toolkit_installed &&
|
|
217
|
+
dockerInstallRecognised(facts, distribution) &&
|
|
218
|
+
effectiveGpuRuntime(facts) &&
|
|
219
|
+
facts.docker.service_active === true &&
|
|
220
|
+
!facts.docker.daemon_reachable;
|
|
221
|
+
if (readyExceptAccess) {
|
|
222
|
+
// Root never benefits from `docker` group membership at all, so a root session landing here has
|
|
223
|
+
// the same unexplained problem as the confirmed-member case above, not a group to add (design
|
|
224
|
+
// D4, round 2 item 9).
|
|
225
|
+
if (options.currentUser === 'root') {
|
|
226
|
+
return blocked([
|
|
227
|
+
blocker('docker-access-unexplained', 'Running as root, and docker.service is active, but the daemon still did not answer over the ' +
|
|
228
|
+
'system socket. This is not a group-membership problem — root needs none — and this ' +
|
|
229
|
+
'integration has no further diagnosis to offer automatically.'),
|
|
230
|
+
]);
|
|
231
|
+
}
|
|
232
|
+
if (gate === 'manifest-unavailable') {
|
|
233
|
+
// Joining the group is the privileged step too: without the manifest it is not offered either.
|
|
234
|
+
return blocked([gateBlocker(gate, facts, distribution, options.currentUser)]);
|
|
235
|
+
}
|
|
236
|
+
if (gate !== 'recipe') {
|
|
237
|
+
return blocked([dockerGroupManualBlocker(facts.immutable_os, options.currentUser, true)]);
|
|
238
|
+
}
|
|
239
|
+
return {
|
|
240
|
+
availability: 'setup-required',
|
|
241
|
+
adopts_existing_engine: false,
|
|
242
|
+
install_plan: {
|
|
243
|
+
recipe_id: options.recipeId,
|
|
244
|
+
requires_elevation: true,
|
|
245
|
+
may_require_relogin: true,
|
|
246
|
+
system_changes: [
|
|
247
|
+
{
|
|
248
|
+
code: 'add-user-to-docker-group',
|
|
249
|
+
text: `Add ${options.currentUser} to the docker group. This grants access equivalent to root on this machine.`,
|
|
250
|
+
params: { user: options.currentUser },
|
|
251
|
+
},
|
|
252
|
+
],
|
|
253
|
+
},
|
|
254
|
+
blockers: [],
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
// Something real is missing beyond access — the toolkit, the runtime configuration, Docker
|
|
258
|
+
// itself, or the service is not even running. Distribution gating decides whether a plan may be
|
|
259
|
+
// offered at all: immutable base, Arch, an unrecognised docker, a distribution not on the recipe.
|
|
260
|
+
if (gate !== 'recipe') {
|
|
261
|
+
if (gateBlockerApplies(gate, facts)) {
|
|
262
|
+
return blocked([gateBlocker(gate, facts, distribution, options.currentUser)]);
|
|
263
|
+
}
|
|
264
|
+
// Only an immutable base with Docker and the toolkit already layered gets here: nothing to layer,
|
|
265
|
+
// so the remaining steps are named one by one with their commands (round 5, item 2).
|
|
266
|
+
const groupNeeded = !facts.docker.daemon_reachable &&
|
|
267
|
+
options.currentUser !== 'root' &&
|
|
268
|
+
facts.docker_group.configured !== true;
|
|
269
|
+
const steps = [
|
|
270
|
+
...missingComponentBlockers(facts, gate),
|
|
271
|
+
...(groupNeeded ? [dockerGroupManualBlocker(facts.immutable_os, options.currentUser, false)] : []),
|
|
272
|
+
];
|
|
273
|
+
return blocked(steps.length > 0 ? steps : [gateBlocker(gate, facts, distribution, options.currentUser)]);
|
|
274
|
+
}
|
|
275
|
+
// A daemon.json this probe cannot read or parse is not a safe target for `nvidia-ctk runtime
|
|
276
|
+
// configure`, whether or not the daemon answered (round 2 item 6; round 3 item 2) — asked only when
|
|
277
|
+
// the plan would run it: a runtime the daemon already loaded needs only the CDI spec (F-5).
|
|
278
|
+
if (!effectiveGpuRuntime(facts) && !facts.docker.nvidia_runtime && facts.docker.daemon_json_unreadable) {
|
|
279
|
+
return blocked([daemonJsonUnreadableBlocker()]);
|
|
280
|
+
}
|
|
281
|
+
// The recipe enables, starts and restarts Docker through systemd: without it the plan would fail
|
|
282
|
+
// only at the privileged step, after consent (the GB10 vast.ai container, PID 1 a shell). A host
|
|
283
|
+
// that already answers with a GPU runtime adopted above and never needs it.
|
|
284
|
+
// (A systemd check that could not run is the unread fact `init-system`, blocked above.)
|
|
285
|
+
if (facts.systemd === false)
|
|
286
|
+
return blocked([initNotSystemdBlocker()]);
|
|
287
|
+
return {
|
|
288
|
+
availability: 'setup-required',
|
|
289
|
+
adopts_existing_engine: false,
|
|
290
|
+
install_plan: buildInstallPlan(facts, distribution, options),
|
|
291
|
+
blockers: [],
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
const FAMILY_LABEL = { apt: 'apt', dnf: 'dnf' };
|
|
295
|
+
function buildInstallPlan(facts, distribution, options) {
|
|
296
|
+
// `docker info` is authoritative when it answered; otherwise the only evidence available is the
|
|
297
|
+
// read-only daemon.json/CDI check (item 3) — never guessed from silence.
|
|
298
|
+
const liveEvidence = facts.docker.daemon_reachable;
|
|
299
|
+
// The GPU reaches a container only through a CDI spec (task 2.23, F-5): without one the plan
|
|
300
|
+
// generates it, and registers the `nvidia` runtime too where no runtime of that name is there yet.
|
|
301
|
+
const gpuReady = effectiveGpuRuntime(facts);
|
|
302
|
+
const configureRuntime = !gpuReady && !facts.docker.nvidia_runtime;
|
|
303
|
+
// Never lay docker-ce over a working moby-engine/docker.io install (they conflict at the package
|
|
304
|
+
// level, design D2) or over anything else this probe already recognised; only a genuinely absent
|
|
305
|
+
// Docker gets the full package set. (A `cli && install_method === null` machine never reaches
|
|
306
|
+
// here — `assessLinux` blocks it first, item 15.)
|
|
307
|
+
const dockerPackages = facts.docker.install_method === null ? ['docker-ce', 'docker-ce-cli', 'containerd.io'] : [];
|
|
308
|
+
const toolkitPackages = facts.toolkit_installed ? [] : ['nvidia-container-toolkit'];
|
|
309
|
+
const missingPackages = [...dockerPackages, ...toolkitPackages];
|
|
310
|
+
const family = distribution.family === 'apt' || distribution.family === 'dnf' ? distribution.family : null;
|
|
311
|
+
const familyLabel = family === null ? 'package' : FAMILY_LABEL[family];
|
|
312
|
+
const systemChanges = [];
|
|
313
|
+
if (dockerPackages.length > 0) {
|
|
314
|
+
systemChanges.push({
|
|
315
|
+
code: 'add-repository',
|
|
316
|
+
text: `Add Docker's official ${familyLabel} repository and signing key (download.docker.com).`,
|
|
317
|
+
params: { vendor: 'docker', family: distribution.family },
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
if (toolkitPackages.length > 0) {
|
|
321
|
+
systemChanges.push({
|
|
322
|
+
code: 'add-repository',
|
|
323
|
+
text: `Add the NVIDIA Container Toolkit ${familyLabel} repository and signing key (nvidia.github.io/libnvidia-container).`,
|
|
324
|
+
params: { vendor: 'nvidia', family: distribution.family },
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
if (missingPackages.length > 0) {
|
|
328
|
+
systemChanges.push({
|
|
329
|
+
code: 'install-packages',
|
|
330
|
+
text: `Install the missing packages: ${missingPackages.join(', ')}.`,
|
|
331
|
+
params: { packages: missingPackages.join(',') },
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
if (configureRuntime) {
|
|
335
|
+
systemChanges.push({
|
|
336
|
+
code: 'configure-nvidia-runtime',
|
|
337
|
+
text: 'Configure the NVIDIA runtime for Docker (nvidia-ctk runtime configure --runtime=docker).',
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
if (!gpuReady) {
|
|
341
|
+
systemChanges.push({
|
|
342
|
+
code: 'generate-cdi-spec',
|
|
343
|
+
text: 'Generate the NVIDIA CDI specification Docker uses to pass the GPU into containers ' +
|
|
344
|
+
'(nvidia-ctk cdi generate --output=/var/run/cdi/nvidia.yaml), and keep it current after ' +
|
|
345
|
+
'driver updates and reboots with nvidia-cdi-refresh.path where the toolkit provides it.',
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
// Access steps are each emitted only when this specific thing is actually missing — never paired
|
|
349
|
+
// blindly (item 2). When `liveEvidence` is true, access is already proven, so neither applies.
|
|
350
|
+
// Root is never offered a group add (design D4, round 2 item 9): it needs no membership, and if
|
|
351
|
+
// access is still missing for root that is not what fixes it.
|
|
352
|
+
if (!liveEvidence) {
|
|
353
|
+
if (facts.docker.service_active !== true) {
|
|
354
|
+
systemChanges.push({ code: 'enable-docker-service', text: 'Enable and start docker.service.' });
|
|
355
|
+
}
|
|
356
|
+
if (facts.docker_group.configured !== true && options.currentUser !== 'root') {
|
|
357
|
+
systemChanges.push({
|
|
358
|
+
code: 'add-user-to-docker-group',
|
|
359
|
+
text: `Add ${options.currentUser} to the docker group. This grants access equivalent to root on this machine.`,
|
|
360
|
+
params: { user: options.currentUser },
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
// Reconfiguring the runtime on a Docker that is already running requires restarting it, which
|
|
365
|
+
// stops whatever containers are up (design D5). With live evidence the warning carries the real
|
|
366
|
+
// container count. A daemon that is active but not reachable by this user yet (task 2.6, the 2.5
|
|
367
|
+
// report's concern 2) gets the restart planned too: otherwise the runtime `nvidia-ctk` registers
|
|
368
|
+
// would only load at Docker's next start, and the setup would need a second elevation after the
|
|
369
|
+
// sign-in just to restart it. How many containers would stop cannot be asked of that daemon, so
|
|
370
|
+
// the warning says so instead of guessing a number.
|
|
371
|
+
if (configureRuntime && (liveEvidence || facts.docker.service_active === true)) {
|
|
372
|
+
const count = liveEvidence ? facts.docker.containers_running : null;
|
|
373
|
+
systemChanges.push({
|
|
374
|
+
code: 'restart-docker',
|
|
375
|
+
text: count === null
|
|
376
|
+
? 'Restart Docker to load the new runtime configuration; any running containers will stop.'
|
|
377
|
+
: count > 0
|
|
378
|
+
? `Restart Docker to load the new runtime configuration; ${count} running container(s) will stop.`
|
|
379
|
+
: 'Restart Docker to load the new runtime configuration.',
|
|
380
|
+
params: { running_containers: count === null ? 'unknown' : String(count) },
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
return {
|
|
384
|
+
recipe_id: options.recipeId,
|
|
385
|
+
requires_elevation: systemChanges.length > 0,
|
|
386
|
+
// Ruling (item 10): always true for a plan, regardless of whether this particular one happens
|
|
387
|
+
// to touch the docker group.
|
|
388
|
+
may_require_relogin: true,
|
|
389
|
+
system_changes: systemChanges,
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
//# sourceMappingURL=linux-plan.js.map
|