@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
package/dist/core/create.js
CHANGED
|
@@ -3,29 +3,42 @@
|
|
|
3
3
|
* the runtimes and backend services, start the control listener, construct the facade, reap what a
|
|
4
4
|
* previous owner left running and only then publish the endpoint.
|
|
5
5
|
*/
|
|
6
|
+
import { randomUUID } from 'node:crypto';
|
|
6
7
|
import { homedir } from 'node:os';
|
|
7
8
|
import { join } from 'node:path';
|
|
9
|
+
import { AtomicCoreError, ENGINE_KINDS } from '../contracts/index.js';
|
|
8
10
|
import { dataLayout, nodeDataFolderEnv, resolveCliDataFolder, resolveDataFolder } from '../config/index.js';
|
|
9
11
|
import { CoreEmitter } from '../events/index.js';
|
|
10
12
|
import { InstanceLock, ProcessJournal, writeControlToken } from '../lock/index.js';
|
|
11
13
|
import { EmbedService, ModelCapabilityService, ModelRegistry } from '../models/index.js';
|
|
12
|
-
import { LlamacppRuntime } from '../runtime/llamacpp/index.js';
|
|
14
|
+
import { LlamacppRuntime, processPackDirs } from '../runtime/llamacpp/index.js';
|
|
13
15
|
import { ExternalSessions } from '../runtime/index.js';
|
|
14
16
|
import { FoundationModelsRuntime } from '../runtime/foundation-models/index.js';
|
|
15
17
|
import { MlxRuntime } from '../runtime/mlx/index.js';
|
|
16
18
|
import { SettingsStore } from '../settings/index.js';
|
|
19
|
+
import { TRANSCRIPTION_MODEL_ID } from '../speculative/index.js';
|
|
17
20
|
import { ApiKeyStore, ChatGptAuth } from '../credentials/index.js';
|
|
18
21
|
import { CloudRegistry, listSubscriptionModels } from '../cloud/index.js';
|
|
19
|
-
import {
|
|
20
|
-
import { BackendService, ensureBackend, ensureTurboquantCudart, ensureUpstreamCudart, ManifestSessionCache, OptimalBackendStore, fetchLiveManifest,
|
|
22
|
+
import { HardwareService, nodeProbeDeps, probeSystemInfo, probeUnifiedMemory } from '../hardware/index.js';
|
|
23
|
+
import { BackendAdvisor, BackendService, PrismCatalogService, TurboquantCatalogService, ensureBackend, ensureTurboquantCudart, ensureUpstreamCudart, ManifestSessionCache, probeLinuxRocmHost, OptimalBackendStore, fetchLiveManifest, manifestTransportFromFetch, readRuntimeSettings, resolveBackendExe, selectInstalledBackend, } from '../backend/index.js';
|
|
24
|
+
import { noticeEngineInstall, wireDecision } from '../decision/index.js';
|
|
25
|
+
import { EngineBuildEngine, EnginesService, LlamacppEngine, ManagedEngine, hostEngines, } from '../engines/index.js';
|
|
26
|
+
import { DEFAULT_ENVIRONMENT_ID } from '../runtime/environment/index.js';
|
|
27
|
+
import { noticeEmbeddingEngineInstall, wireEmbedding } from '../embedding/index.js';
|
|
21
28
|
import { wireDiffusion } from '../diffusion/index.js';
|
|
22
|
-
import {
|
|
29
|
+
import { EngineBuildsService, EngineManifestSource, IDLE_ENGINE_HOST, manifestKinds, } from '../engine-builds/index.js';
|
|
30
|
+
import { Downloader, availableDiskSpace, defaultAvailableSpace, policyFetchFor } from '../downloads/index.js';
|
|
23
31
|
import { lanAddresses, reapTunnelOrphan, wireRemoteAccess } from '../remote-access/index.js';
|
|
24
32
|
import { ClientRegistry, CLIENT_EXPIRY_MS, ControlServer } from '../server/index.js';
|
|
25
33
|
import { captureReport, createCoreReporter, processFailureReport, reportCoreEvents, } from '../telemetry/index.js';
|
|
26
34
|
import { CORE_VERSION } from '../version.js';
|
|
35
|
+
import { wireManagedEnvironment } from './managed-environment.js';
|
|
36
|
+
import { compatibilityFor, wireModelSetups } from './model-setup/index.js';
|
|
37
|
+
import { currentPrismPack, wirePrismCompatibility } from './prism.js';
|
|
38
|
+
import { DIFFUSION_GPU_PROVIDER, wireGpuResidency } from './gpu-residency.js';
|
|
27
39
|
import { reapOrphans } from './reap-orphans.js';
|
|
28
|
-
import { sessionsOf } from './sessions.js';
|
|
40
|
+
import { sessionsOf, unknownProvider } from './sessions.js';
|
|
41
|
+
import { leftoverContainers, managedEngineRegistry, managedModelDeleter, managedModelExclusivity, managedSessionUnloader, managedModelLocation, managedModelRegistry, createStoreMigration, windowsModelFilesFor, wiredExec, wireManagedEngine, wireManagedModelCheck, } from './managed-engines.js';
|
|
29
42
|
import { LOCAL_PROVIDER } from './types.js';
|
|
30
43
|
/**
|
|
31
44
|
* Take ownership of a data folder and start the control listener. `construct` builds the facade
|
|
@@ -34,6 +47,12 @@ import { LOCAL_PROVIDER } from './types.js';
|
|
|
34
47
|
export async function createAtomicCore(options, construct) {
|
|
35
48
|
const log = options.logger ?? (() => { });
|
|
36
49
|
const warn = (message) => log('warn', message);
|
|
50
|
+
// The core logger as the local runtimes and diffusion take it: they may also say `debug`, which is
|
|
51
|
+
// dropped here, because the host's `logger` only understands three levels.
|
|
52
|
+
const runtimeLog = (level, message) => {
|
|
53
|
+
if (level !== 'debug')
|
|
54
|
+
log(level, message);
|
|
55
|
+
};
|
|
37
56
|
const scope = options.ownerScope ?? 'cli';
|
|
38
57
|
const root = options.dataFolder ??
|
|
39
58
|
(scope === 'app'
|
|
@@ -105,11 +124,20 @@ export async function createAtomicCore(options, construct) {
|
|
|
105
124
|
const externalSessions = new ExternalSessions({ emit: (name, payload) => emitter.emit(name, payload) });
|
|
106
125
|
const journal = await ProcessJournal.open(layout);
|
|
107
126
|
const clients = new ClientRegistry();
|
|
127
|
+
const platform = options.platform ?? process.platform;
|
|
108
128
|
// One per core process, in memory: hardware changes between runs, and a stale file claiming
|
|
109
|
-
// a GPU that is gone would pick a backend that cannot start. The same
|
|
129
|
+
// a GPU that is gone would pick a backend that cannot start. The same service is deliberately
|
|
110
130
|
// shared by control and the runtime: accepting an override that load never reads is worse
|
|
111
|
-
// than rejecting the endpoint, because it tells the app a hardware handover succeeded.
|
|
112
|
-
|
|
131
|
+
// than rejecting the endpoint, because it tells the app a hardware handover succeeded. The
|
|
132
|
+
// probe starts now and runs while the rest is wired; the first load waits for it.
|
|
133
|
+
const hardware = new HardwareService({
|
|
134
|
+
probe: options.hardware?.probe ??
|
|
135
|
+
(() => probeSystemInfo(nodeProbeDeps({ platform, arch: process.arch, env: options.env ?? process.env }))),
|
|
136
|
+
arch: process.arch,
|
|
137
|
+
platform,
|
|
138
|
+
log,
|
|
139
|
+
});
|
|
140
|
+
hardware.start();
|
|
113
141
|
// One downloader per core process: it owns the active-task table that `cancel` works from, so
|
|
114
142
|
// two of them would each know only half of what is running.
|
|
115
143
|
const downloader = new Downloader({
|
|
@@ -121,9 +149,9 @@ export async function createAtomicCore(options, construct) {
|
|
|
121
149
|
const registries = new Map([
|
|
122
150
|
[LOCAL_PROVIDER, new ModelRegistry(layout, LOCAL_PROVIDER)],
|
|
123
151
|
['llamacpp', new ModelRegistry(layout, 'llamacpp')],
|
|
152
|
+
['atomic-prism', new ModelRegistry(layout, 'atomic-prism')],
|
|
124
153
|
]);
|
|
125
|
-
|
|
126
|
-
// Both llama.cpp providers run through one runtime class; what differs — backend ids, the
|
|
154
|
+
// The three llama.cpp providers run through one runtime class; what differs — backend ids, the
|
|
127
155
|
// argument rules and Windows CUDA runtime repair — is decided by the provider it is given.
|
|
128
156
|
const llamacppRuntime = (provider) => new LlamacppRuntime({
|
|
129
157
|
layout,
|
|
@@ -137,24 +165,48 @@ export async function createAtomicCore(options, construct) {
|
|
|
137
165
|
const backendDir = join(layout.provider(provider).backendsDir, repairVersion, repairBackend);
|
|
138
166
|
const taskId = `${provider}-cudart-${repairVersion}/${repairBackend}`.replace(/[^A-Za-z0-9_/:-]/g, '_');
|
|
139
167
|
const deps = { layout, downloader, platform, log: (message) => log('warn', message) };
|
|
168
|
+
// A PrismML pack is installed with its CUDA runtime in place; there is nothing to repair.
|
|
169
|
+
if (provider === 'atomic-prism')
|
|
170
|
+
return Promise.resolve();
|
|
140
171
|
const repair = provider === 'llamacpp'
|
|
141
172
|
? ensureTurboquantCudart(repairBackend, backendDir, taskId, deps)
|
|
142
173
|
: ensureUpstreamCudart(repairVersion, repairBackend, backendDir, taskId, deps);
|
|
143
174
|
return repair.then(() => { }, (e) => log('warn', `cudart pre-flight for ${repairVersion}/${repairBackend} failed: ${String(e)}`));
|
|
144
175
|
}),
|
|
145
176
|
cpuInfo: async () => {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
// The no-AVX policy knows `x86_64`, not Node's `x64`: pass the raw name and it never fires.
|
|
150
|
-
return { arch: platformArch(process.arch), extensions: hardware.cpuExtensions([]) };
|
|
177
|
+
// Unknown flags stay `undefined`: the no-AVX preflight fires on a positive signal only.
|
|
178
|
+
const facts = await hardware.facts();
|
|
179
|
+
return facts.cpuExtensions ? { arch: facts.arch, extensions: facts.cpuExtensions } : undefined;
|
|
151
180
|
},
|
|
181
|
+
// The voice model the app loads next to a chat model: auxiliary, like an embedding model —
|
|
182
|
+
// never auto-unloaded, never evicted by GPU residency, never evicting.
|
|
183
|
+
transcriptionModelId: TRANSCRIPTION_MODEL_ID,
|
|
184
|
+
claimGpu: (claim, signal) => gpuResidency.hook(provider)(claim, signal),
|
|
185
|
+
checkCompatibility: (target) => prismCompatibility.gate(provider, target),
|
|
186
|
+
unifiedMemory: async () => probeUnifiedMemory(nodeProbeDeps({ platform, arch: process.arch, env: options.env ?? process.env })),
|
|
187
|
+
log: runtimeLog,
|
|
152
188
|
...(options.fetch ? { fetch: options.fetch } : {}),
|
|
189
|
+
...(options.backendOutput ? { backendOutput: options.backendOutput } : {}),
|
|
153
190
|
});
|
|
191
|
+
// The managed engines this core can run (change `add-vllm-runtime`, design D3).
|
|
192
|
+
const managedEngines = managedEngineRegistry();
|
|
154
193
|
const runtimes = new Map([
|
|
155
194
|
[LOCAL_PROVIDER, llamacppRuntime('llamacpp-upstream')],
|
|
156
195
|
['llamacpp', llamacppRuntime('llamacpp')],
|
|
196
|
+
['atomic-prism', llamacppRuntime('atomic-prism')],
|
|
157
197
|
]);
|
|
198
|
+
// The facade, constructed last: what GPU residency and an engine removal stop a session through,
|
|
199
|
+
// exactly as a client's unload would. Read when they act, never before.
|
|
200
|
+
const facade = () => core;
|
|
201
|
+
// GPU residency (task 2.15, spec `gpu-residency`): one resident model per card across every local
|
|
202
|
+
// engine of this core. Every part is read at claim time — image generation, the Docker executor's
|
|
203
|
+
// leftovers and the facade are wired further down.
|
|
204
|
+
const gpuResidency = wireGpuResidency({
|
|
205
|
+
runtimes,
|
|
206
|
+
diffusion: () => diffusion,
|
|
207
|
+
leftovers: () => managedLeftovers(),
|
|
208
|
+
sessions: facade,
|
|
209
|
+
});
|
|
158
210
|
if (platform === 'darwin') {
|
|
159
211
|
const mlxRegistry = new ModelRegistry(layout, 'mlx');
|
|
160
212
|
registries.set('mlx', mlxRegistry);
|
|
@@ -163,17 +215,26 @@ export async function createAtomicCore(options, construct) {
|
|
|
163
215
|
registry: mlxRegistry,
|
|
164
216
|
instanceId: lock.instanceId,
|
|
165
217
|
resourcesDir: options.resourcesDir,
|
|
218
|
+
// The newest of the installer's `mlx-server` and the ones the core downloaded, per load.
|
|
219
|
+
resolveBinary: () => engineBuilds.resolveMlxBinary(),
|
|
166
220
|
readSettings: async () => settings.get('mlx'),
|
|
167
221
|
journal,
|
|
168
222
|
emit: (name, payload) => emitter.emit(name, payload),
|
|
223
|
+
claimGpu: gpuResidency.hook('mlx'),
|
|
224
|
+
log: runtimeLog,
|
|
225
|
+
...(options.backendOutput ? { backendOutput: options.backendOutput } : {}),
|
|
169
226
|
}));
|
|
170
227
|
runtimes.set('foundation-models', new FoundationModelsRuntime({
|
|
171
228
|
instanceId: lock.instanceId,
|
|
172
229
|
resourcesDir: options.resourcesDir,
|
|
173
230
|
journal,
|
|
174
231
|
emit: (name, payload) => emitter.emit(name, payload),
|
|
232
|
+
log: runtimeLog,
|
|
233
|
+
...(options.backendOutput ? { backendOutput: options.backendOutput } : {}),
|
|
175
234
|
}));
|
|
176
235
|
}
|
|
236
|
+
// The public server's trusted hosts, kept in this one array for every session gateway to read.
|
|
237
|
+
const managedTrustedHosts = [];
|
|
177
238
|
const optimalStore = await OptimalBackendStore.open(layout.core.optimalBackend, (provider, state) => {
|
|
178
239
|
emitter.emit('backend:optimal-changed', { provider, ...state });
|
|
179
240
|
});
|
|
@@ -188,6 +249,71 @@ export async function createAtomicCore(options, construct) {
|
|
|
188
249
|
unload: (provider, modelId) => core.unload(provider, modelId),
|
|
189
250
|
fetch: options.fetch ?? fetch,
|
|
190
251
|
});
|
|
252
|
+
// The proxy policy of one request decides that request's fetch; nothing about it is kept.
|
|
253
|
+
const fetchFor = (proxy) => policyFetchFor({ proxy: proxy ?? null }, options.fetch ?? fetch);
|
|
254
|
+
// One release-index service for the fork: its memory TTL and in-flight coalescing only help
|
|
255
|
+
// when every caller shares them.
|
|
256
|
+
const turboquantCatalog = new TurboquantCatalogService({
|
|
257
|
+
layout,
|
|
258
|
+
fetchFor,
|
|
259
|
+
platform,
|
|
260
|
+
log: (level, message) => log(level, message),
|
|
261
|
+
});
|
|
262
|
+
// Test hooks (docs/contracts.md "Test hooks"): where the PrismML manifest, the model rules and
|
|
263
|
+
// model files are read from. Unset in production.
|
|
264
|
+
const prismManifestUrl = env['ATOMIC_PRISM_MANIFEST_URL'];
|
|
265
|
+
const prismRulesUrl = env['ATOMIC_PRISM_MODEL_RULES_URL'];
|
|
266
|
+
const hfEndpoint = env['ATOMIC_HF_ENDPOINT'];
|
|
267
|
+
const prismCatalog = new PrismCatalogService({
|
|
268
|
+
layout,
|
|
269
|
+
fetchFor,
|
|
270
|
+
...(prismManifestUrl ? { url: prismManifestUrl } : {}),
|
|
271
|
+
log,
|
|
272
|
+
});
|
|
273
|
+
// One compatibility service for the control routes and every llama.cpp load gate; the gate
|
|
274
|
+
// reads only what is cached, so a load never waits on the network for it.
|
|
275
|
+
const prismCompatibility = wirePrismCompatibility({
|
|
276
|
+
layout,
|
|
277
|
+
settings,
|
|
278
|
+
hardware,
|
|
279
|
+
prismCatalog,
|
|
280
|
+
fetch: fetchFor(),
|
|
281
|
+
...(prismRulesUrl ? { rulesUrl: prismRulesUrl } : {}),
|
|
282
|
+
env,
|
|
283
|
+
log,
|
|
284
|
+
});
|
|
285
|
+
const allowPrismCandidates = () => settings.get('atomic-prism')['allow_candidate_builds'] === true;
|
|
286
|
+
const advisors = new Map();
|
|
287
|
+
const backendAdvisor = (provider) => {
|
|
288
|
+
const existing = advisors.get(provider);
|
|
289
|
+
if (existing)
|
|
290
|
+
return existing;
|
|
291
|
+
const created = new BackendAdvisor({
|
|
292
|
+
provider,
|
|
293
|
+
layout,
|
|
294
|
+
hardware: () => hardware.facts(),
|
|
295
|
+
currentVersionBackend: () => String(settings.get(provider)['version_backend'] ?? ''),
|
|
296
|
+
optimalStore,
|
|
297
|
+
emit: (name, payload) => emitter.emit(name, payload),
|
|
298
|
+
fetchFor,
|
|
299
|
+
manifestCache,
|
|
300
|
+
turboquantCatalog,
|
|
301
|
+
prismCatalog,
|
|
302
|
+
allowCandidateBuilds: allowPrismCandidates,
|
|
303
|
+
// The Windows tier check runs `--list-devices` on the installed pack of that tier.
|
|
304
|
+
listDevices: async (installed) => {
|
|
305
|
+
const exePath = await resolveBackendExe(layout, provider, installed.version, installed.backend);
|
|
306
|
+
if (!exePath)
|
|
307
|
+
return [];
|
|
308
|
+
const runtime = core.runtime(provider);
|
|
309
|
+
return runtime instanceof LlamacppRuntime ? runtime.getDevices(exePath) : [];
|
|
310
|
+
},
|
|
311
|
+
platform,
|
|
312
|
+
log: (level, message) => log(level, message),
|
|
313
|
+
});
|
|
314
|
+
advisors.set(provider, created);
|
|
315
|
+
return created;
|
|
316
|
+
};
|
|
191
317
|
const backendServices = new Map();
|
|
192
318
|
const backendService = (provider) => {
|
|
193
319
|
const existing = backendServices.get(provider);
|
|
@@ -198,16 +324,32 @@ export async function createAtomicCore(options, construct) {
|
|
|
198
324
|
provider,
|
|
199
325
|
downloader,
|
|
200
326
|
optimalStore,
|
|
327
|
+
prismCatalog,
|
|
328
|
+
resourcesDir: options.resourcesDir,
|
|
329
|
+
// An install or removal by any route; an update and an activation report themselves.
|
|
330
|
+
onChanged: (reason) => emitter.emit('engine:changed', { engine: provider, reason }),
|
|
331
|
+
// Read when a removal or update acts: the runtime's load queue and what its sessions, the
|
|
332
|
+
// decision model and the embedding model run from (change `unify-engine-lifecycle`, 2.4).
|
|
333
|
+
host: {
|
|
334
|
+
exclusive: (fn) => {
|
|
335
|
+
const runtime = runtimes.get(provider);
|
|
336
|
+
return runtime instanceof LlamacppRuntime ? runtime.exclusive(fn) : fn();
|
|
337
|
+
},
|
|
338
|
+
inUse: async () => {
|
|
339
|
+
const runtime = runtimes.get(provider);
|
|
340
|
+
return [
|
|
341
|
+
...(runtime instanceof LlamacppRuntime ? runtime.buildDirsInUse() : []),
|
|
342
|
+
...processPackDirs([decision.getStatus(), embedding.getStatus()]),
|
|
343
|
+
];
|
|
344
|
+
},
|
|
345
|
+
},
|
|
201
346
|
readManifest: async (proxy) => {
|
|
202
347
|
const cached = manifestCache.get();
|
|
203
348
|
if (cached)
|
|
204
349
|
return cached;
|
|
205
|
-
const fetchImpl = proxy
|
|
206
|
-
? createPolicyFetch({ proxy, ignore_ssl: proxy.ignore_ssl })
|
|
207
|
-
: (options.fetch ?? fetch);
|
|
208
350
|
return fetchLiveManifest({
|
|
209
351
|
cache: manifestCache,
|
|
210
|
-
transports: [manifestTransportFromFetch('core fetch',
|
|
352
|
+
transports: [manifestTransportFromFetch('core fetch', fetchFor(proxy))],
|
|
211
353
|
onWarn: (message) => log('warn', message),
|
|
212
354
|
});
|
|
213
355
|
},
|
|
@@ -215,22 +357,289 @@ export async function createAtomicCore(options, construct) {
|
|
|
215
357
|
backendServices.set(provider, created);
|
|
216
358
|
return created;
|
|
217
359
|
};
|
|
360
|
+
// One model-setup runner per core: it owns the in-memory table of runs and the shared engine
|
|
361
|
+
// installs that a cancel works from. The records survive a restart as `interrupted`.
|
|
362
|
+
const modelFile = async (provider, modelId) => {
|
|
363
|
+
const registry = registries.get(provider);
|
|
364
|
+
if (!(registry instanceof ModelRegistry))
|
|
365
|
+
throw unknownProvider(provider, registries.keys());
|
|
366
|
+
const yml = await registry.read(modelId);
|
|
367
|
+
return {
|
|
368
|
+
modelPath: registry.resolvePaths(yml).modelPath,
|
|
369
|
+
...(yml.model_sha256 ? { sha256: yml.model_sha256 } : {}),
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
const modelSetupDeps = {
|
|
373
|
+
layout,
|
|
374
|
+
compatibility: prismCompatibility,
|
|
375
|
+
prismCatalog,
|
|
376
|
+
hardware: () => hardware.facts(),
|
|
377
|
+
offer: () => ({ coreVersion: CORE_VERSION, allowCandidates: allowPrismCandidates() }),
|
|
378
|
+
currentPack: () => currentPrismPack({ layout, settings, hardware }),
|
|
379
|
+
installEngine: (version, backend, opts) => backendService('atomic-prism').install(version, backend, opts),
|
|
380
|
+
selectEngine: (versionBackend) => settings.update('atomic-prism', { version_backend: versionBackend }),
|
|
381
|
+
downloader,
|
|
382
|
+
register: async (provider, modelId, yml) => {
|
|
383
|
+
await registries.get(provider).write(modelId, yml);
|
|
384
|
+
},
|
|
385
|
+
modelFile,
|
|
386
|
+
emit: (name, payload) => emitter.emit(name, payload),
|
|
387
|
+
freeBytes: () => availableDiskSpace(layout.root, undefined),
|
|
388
|
+
fetchFor,
|
|
389
|
+
newId: () => randomUUID(),
|
|
390
|
+
...(hfEndpoint ? { hfEndpoint } : {}),
|
|
391
|
+
env,
|
|
392
|
+
platform,
|
|
393
|
+
...(platform === 'linux' ? { rocmProbe: () => probeLinuxRocmHost() } : {}),
|
|
394
|
+
log,
|
|
395
|
+
};
|
|
396
|
+
const modelSetups = wireModelSetups(modelSetupDeps);
|
|
218
397
|
const diffusion = wireDiffusion({
|
|
219
398
|
layout,
|
|
220
399
|
journal,
|
|
221
400
|
instanceId: lock.instanceId,
|
|
401
|
+
hardware,
|
|
222
402
|
emit: (name, payload) => emitter.emit(name, payload),
|
|
223
|
-
log:
|
|
403
|
+
log: runtimeLog,
|
|
224
404
|
platform,
|
|
225
405
|
env,
|
|
406
|
+
claimGpu: gpuResidency.hook(DIFFUSION_GPU_PROVIDER),
|
|
226
407
|
...(options.diffusion ? { overrides: options.diffusion } : {}),
|
|
408
|
+
...(options.backendOutput ? { backendOutput: options.backendOutput } : {}),
|
|
227
409
|
});
|
|
410
|
+
// sd.cpp and MLX builds (change `move-sdcpp-mlx-install-to-core`): the core reads conf's
|
|
411
|
+
// manifests, installs, activates and removes them; image generation and the MLX runtime lend it
|
|
412
|
+
// their load locks and their sessions.
|
|
413
|
+
const engineManifestKinds = manifestKinds(layout);
|
|
414
|
+
const mlxRuntime = runtimes.get('mlx');
|
|
415
|
+
const engineBuilds = new EngineBuildsService({
|
|
416
|
+
dataFolder: layout.root,
|
|
417
|
+
roots: { 'sd-cpp': layout.diffusion.backendsDir, 'mlx': layout.provider('mlx').backendsDir },
|
|
418
|
+
failedBackendsFile: join(layout.diffusion.root, 'failed-backends.json'),
|
|
419
|
+
resourcesDir: options.resourcesDir,
|
|
420
|
+
platform,
|
|
421
|
+
downloader,
|
|
422
|
+
manifests: {
|
|
423
|
+
'sd-cpp': new EngineManifestSource(engineManifestKinds['sd-cpp'], { env, fetchFor, log }),
|
|
424
|
+
'mlx': new EngineManifestSource(engineManifestKinds.mlx, { env, fetchFor, log }),
|
|
425
|
+
},
|
|
426
|
+
hardware: () => hardware.facts(),
|
|
427
|
+
hosts: {
|
|
428
|
+
'sd-cpp': diffusion.engineHost(),
|
|
429
|
+
// Off macOS there is no MLX runtime: nothing runs, so nothing to hold off or unload.
|
|
430
|
+
'mlx': mlxRuntime instanceof MlxRuntime ? mlxRuntime.engineHost() : IDLE_ENGINE_HOST,
|
|
431
|
+
},
|
|
432
|
+
availableSpace: defaultAvailableSpace,
|
|
433
|
+
emit: (name, payload) => emitter.emit(name, payload),
|
|
434
|
+
log,
|
|
435
|
+
});
|
|
436
|
+
// The managed container environment and the one Docker executor of this core (task 2.6). The
|
|
437
|
+
// `tensorrt-llm` provider (task 2.14) takes `managedContainers`, never a second executor, and the
|
|
438
|
+
// environment's machine (`managedHost`: the e2e stand-in under `ATOMIC_MANAGED_TEST_HOST`, whose
|
|
439
|
+
// platform counts as Linux). A removal unloads the provider's loaded model first.
|
|
440
|
+
// TensorRT-LLM's models move into the managed model store before anything lists or loads one
|
|
441
|
+
// (change `add-vllm-runtime`, design D5), under this core's lock on its data folder. On Linux the
|
|
442
|
+
// old root is in the data folder; on Windows it is in the guest and moves on first use (below).
|
|
443
|
+
const storeMigration = createStoreMigration(log);
|
|
444
|
+
if (process.platform !== 'win32')
|
|
445
|
+
await storeMigration.onLinux(layout);
|
|
446
|
+
const { managed, containers: managedContainers, platform: managedPlatform, host: managedHost, arch: managedArch, windows: managedWindows, } = wireManagedEnvironment({
|
|
447
|
+
env,
|
|
448
|
+
platform,
|
|
449
|
+
layout,
|
|
450
|
+
instanceId: lock.instanceId,
|
|
451
|
+
emit: (name, payload) => emitter.emit(name, payload),
|
|
452
|
+
newId: () => randomUUID(),
|
|
453
|
+
log,
|
|
454
|
+
onWarn: (message) => log('warn', message),
|
|
455
|
+
...(options.fetch ? { fetch: options.fetch } : {}),
|
|
456
|
+
...(options.dockerPath !== undefined ? { dockerPath: options.dockerPath } : {}),
|
|
457
|
+
engines: managedEngines.descriptorSources(),
|
|
458
|
+
storeMigration: storeMigration.current,
|
|
459
|
+
unloadEngineSessions: managedSessionUnloader(() => managedRuntimes, facade),
|
|
460
|
+
});
|
|
461
|
+
// Containers a previous core left that startup reconcile could not confirm stopped: they hold every
|
|
462
|
+
// card for GPU residency until a retried stop is confirmed.
|
|
463
|
+
const managedLeftovers = leftoverContainers({
|
|
464
|
+
containers: managedContainers,
|
|
465
|
+
instanceId: lock.instanceId,
|
|
466
|
+
log,
|
|
467
|
+
dockerConfigDir: layout.managed.dockerConfigDir,
|
|
468
|
+
// On Windows the executor is the guest's docker through WSL: its retries go the same way.
|
|
469
|
+
...(managedWindows === undefined ? {} : { exec: wiredExec }),
|
|
470
|
+
});
|
|
471
|
+
// Every engine of the managed engine registry, wired the same way (change `add-vllm-runtime`,
|
|
472
|
+
// design D3): offered on Linux and on Windows with Atomic Chat's WSL distribution, absent elsewhere.
|
|
473
|
+
// `engine_id` is the provider id, so each runtime registers under its own engine id.
|
|
474
|
+
const managedRuntimes = new Map();
|
|
475
|
+
const releaseElsewhere = managedModelExclusivity(() => managedRuntimes, facade);
|
|
476
|
+
const managedModelChecks = {};
|
|
477
|
+
for (const engine of managedEngines.list()) {
|
|
478
|
+
const provider = engine.provider;
|
|
479
|
+
// Shared by the runtime and its model check: one settings reader, not two.
|
|
480
|
+
const settingsOf = () => settings.get(provider);
|
|
481
|
+
const runtime = wireManagedEngine(engine, {
|
|
482
|
+
platform: managedPlatform,
|
|
483
|
+
arch: managedArch,
|
|
484
|
+
...(managedWindows === undefined ? {} : { windows: managedWindows }),
|
|
485
|
+
layout,
|
|
486
|
+
instanceId: lock.instanceId,
|
|
487
|
+
scope,
|
|
488
|
+
descriptors: managed.descriptors,
|
|
489
|
+
installations: managed.installations,
|
|
490
|
+
containers: managedContainers,
|
|
491
|
+
host: managedHost,
|
|
492
|
+
trustedHosts: managedTrustedHosts,
|
|
493
|
+
settings: settingsOf,
|
|
494
|
+
emit: (name, payload) => emitter.emit(name, payload),
|
|
495
|
+
log,
|
|
496
|
+
claimGpu: gpuResidency.hook(provider),
|
|
497
|
+
// One store model, one managed provider (design D11): another engine lets it go first.
|
|
498
|
+
releaseModelElsewhere: releaseElsewhere(engine.provider),
|
|
499
|
+
// The engine container runs as this core's own user (final review I-1, ADR
|
|
500
|
+
// 2026-09-29-the-engine-container-runs-as-the-invoking-user).
|
|
501
|
+
containerUser: process.getuid !== undefined && process.getgid !== undefined
|
|
502
|
+
? { uid: process.getuid(), gid: process.getgid() }
|
|
503
|
+
: null,
|
|
504
|
+
});
|
|
505
|
+
if (runtime !== null) {
|
|
506
|
+
runtimes.set(provider, runtime);
|
|
507
|
+
managedRuntimes.set(engine.provider, runtime);
|
|
508
|
+
}
|
|
509
|
+
// `POST /models/<engine>/check`: composed apart from the runtime (its own deps, never Docker), so
|
|
510
|
+
// a compatibility question answers the same whether or not the engine is even installed yet.
|
|
511
|
+
const check = wireManagedModelCheck(managedPlatform, engine, {
|
|
512
|
+
descriptors: managed.descriptors,
|
|
513
|
+
installations: managed.installations,
|
|
514
|
+
host: managedHost,
|
|
515
|
+
settings: settingsOf,
|
|
516
|
+
arch: managedArch,
|
|
517
|
+
...(managedWindows === undefined ? {} : { windows: managedWindows }),
|
|
518
|
+
});
|
|
519
|
+
if (check !== null)
|
|
520
|
+
managedModelChecks[engine.provider] = check;
|
|
521
|
+
}
|
|
522
|
+
// The managed models' registry: the same gate as the runtimes, so the two are never offered one
|
|
523
|
+
// without the other.
|
|
524
|
+
const storeRegistry = managedModelRegistry(managedPlatform, layout, managedWindows);
|
|
525
|
+
for (const provider of managedRuntimes.keys())
|
|
526
|
+
registries.set(provider, storeRegistry);
|
|
527
|
+
// Windows moves this scope's TensorRT-LLM models into the store in the guest before the first look
|
|
528
|
+
// at it (`windowsStoreMigration`); the outcome goes to the environment diagnostics.
|
|
529
|
+
if (managedWindows !== undefined && managedRuntimes.size > 0)
|
|
530
|
+
storeMigration.onWindows(managedWindows);
|
|
531
|
+
/** A managed runtime, or `PROVIDER_NOT_FOUND` where this core does not offer it. */
|
|
532
|
+
const managedOr = (provider) => {
|
|
533
|
+
const runtime = managedRuntimes.get(provider);
|
|
534
|
+
if (runtime === undefined)
|
|
535
|
+
throw unknownProvider(provider, runtimes.keys());
|
|
536
|
+
return runtime;
|
|
537
|
+
};
|
|
538
|
+
// Deleting a downloaded model: wherever a managed provider is offered.
|
|
539
|
+
const managedModelDelete = managedRuntimes.size === 0
|
|
540
|
+
? null
|
|
541
|
+
: managedModelDeleter({
|
|
542
|
+
runtimes: () => managedRuntimes,
|
|
543
|
+
sessions: facade,
|
|
544
|
+
registry: storeRegistry,
|
|
545
|
+
paths: layout.managed,
|
|
546
|
+
...(managedWindows === undefined
|
|
547
|
+
? {}
|
|
548
|
+
: { windowsFiles: windowsModelFilesFor(managedWindows, layout) }),
|
|
549
|
+
});
|
|
550
|
+
// The decision model: its own process outside the sessions registry. Started (in the background,
|
|
551
|
+
// nothing waits for it) only once the facade exists, below.
|
|
552
|
+
// Both start on the user's own llama.cpp build first when it is new enough: it runs on this machine.
|
|
553
|
+
const upstreamBackend = () => String(settings.get('llamacpp-upstream')['version_backend'] ?? '');
|
|
554
|
+
const decision = wireDecision({
|
|
555
|
+
layout,
|
|
556
|
+
settings,
|
|
557
|
+
upstreamBackend,
|
|
558
|
+
journal,
|
|
559
|
+
instanceId: lock.instanceId,
|
|
560
|
+
hardware,
|
|
561
|
+
emit: (name, payload) => emitter.emit(name, payload),
|
|
562
|
+
on: (name, listener) => emitter.on(name, listener),
|
|
563
|
+
log: runtimeLog,
|
|
564
|
+
platform,
|
|
565
|
+
env,
|
|
566
|
+
...(options.decision ? { overrides: options.decision } : {}),
|
|
567
|
+
...(options.backendOutput ? { backendOutput: options.backendOutput } : {}),
|
|
568
|
+
});
|
|
569
|
+
// The embedding model the public `/v1/embeddings` serves by name: its own process too, started
|
|
570
|
+
// with the decision model below.
|
|
571
|
+
const embedding = wireEmbedding({
|
|
572
|
+
layout,
|
|
573
|
+
settings,
|
|
574
|
+
upstreamBackend,
|
|
575
|
+
journal,
|
|
576
|
+
instanceId: lock.instanceId,
|
|
577
|
+
emit: (name, payload) => emitter.emit(name, payload),
|
|
578
|
+
on: (name, listener) => emitter.on(name, listener),
|
|
579
|
+
log: runtimeLog,
|
|
580
|
+
platform,
|
|
581
|
+
env,
|
|
582
|
+
...(options.embedding ? { overrides: options.embedding } : {}),
|
|
583
|
+
...(options.backendOutput ? { backendOutput: options.backendOutput } : {}),
|
|
584
|
+
});
|
|
585
|
+
// The `/engines` layer (change `unify-engine-lifecycle`): one handle per engine of this host, over
|
|
586
|
+
// the system that installs it. Every part is read when a command arrives.
|
|
587
|
+
const engineHandles = [];
|
|
588
|
+
for (const engine of hostEngines(platform, [...managedRuntimes.keys()])) {
|
|
589
|
+
const kind = ENGINE_KINDS[engine];
|
|
590
|
+
if (kind === 'llamacpp') {
|
|
591
|
+
const provider = engine;
|
|
592
|
+
engineHandles.push(new LlamacppEngine({
|
|
593
|
+
engine: provider,
|
|
594
|
+
backends: backendService(provider),
|
|
595
|
+
advisor: backendAdvisor(provider),
|
|
596
|
+
currentVersionBackend: () => String(settings.get(provider)['version_backend'] ?? ''),
|
|
597
|
+
selectVersionBackend: async (versionBackend) => {
|
|
598
|
+
await settings.update(provider, { version_backend: versionBackend });
|
|
599
|
+
},
|
|
600
|
+
// The facade's unload, as a client's would go: it also lets go of the model's claims.
|
|
601
|
+
unloadSessions: async () => {
|
|
602
|
+
for (const modelId of runtimes.get(provider)?.getLoadedModels() ?? []) {
|
|
603
|
+
const result = await core.unload(provider, modelId);
|
|
604
|
+
if (!result.success)
|
|
605
|
+
throw new AtomicCoreError('LLAMA_CPP_PROCESS_ERROR', result.error ?? `The unload of ${modelId} failed.`);
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
emit: (name, payload) => emitter.emit(name, payload),
|
|
609
|
+
onInstalled: (installed) => {
|
|
610
|
+
noticeEngineInstall(decision, provider, installed);
|
|
611
|
+
noticeEmbeddingEngineInstall(embedding, provider, installed);
|
|
612
|
+
},
|
|
613
|
+
log: (level, message) => log(level, message),
|
|
614
|
+
}));
|
|
615
|
+
}
|
|
616
|
+
else if (kind === 'engine-build') {
|
|
617
|
+
engineHandles.push(new EngineBuildEngine({ engine: engine, builds: engineBuilds }));
|
|
618
|
+
}
|
|
619
|
+
else {
|
|
620
|
+
const runtime = managedRuntimes.get(engine);
|
|
621
|
+
if (runtime !== undefined)
|
|
622
|
+
engineHandles.push(new ManagedEngine({
|
|
623
|
+
engine,
|
|
624
|
+
environmentId: DEFAULT_ENVIRONMENT_ID,
|
|
625
|
+
platform: managedArch === 'arm64' ? 'linux/arm64' : 'linux/amd64',
|
|
626
|
+
installations: () => managed.installations.list(),
|
|
627
|
+
newSetup: (engineId) => managed.descriptors.forNewSetup(engineId),
|
|
628
|
+
residentModels: () => runtime.residentModels(),
|
|
629
|
+
environment: managed.service,
|
|
630
|
+
}));
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
const engines = new EnginesService({ engines: engineHandles });
|
|
228
634
|
const control = await ControlServer.start({
|
|
229
635
|
token,
|
|
230
636
|
instanceId: lock.instanceId,
|
|
231
637
|
version: CORE_VERSION,
|
|
232
638
|
ownerScope: scope,
|
|
233
639
|
dataFolder: layout.root,
|
|
640
|
+
environments: managed.service,
|
|
641
|
+
environmentsSnapshot: managed.environments,
|
|
642
|
+
environmentOperations: managed.operations,
|
|
234
643
|
emitter,
|
|
235
644
|
clients,
|
|
236
645
|
sessions: () => sessionsOf(runtimes),
|
|
@@ -247,7 +656,16 @@ export async function createAtomicCore(options, construct) {
|
|
|
247
656
|
: Promise.resolve('unavailable');
|
|
248
657
|
},
|
|
249
658
|
models: {
|
|
250
|
-
capabilities: (provider, modelId) =>
|
|
659
|
+
capabilities: async (provider, modelId) => managedEngines.has(provider)
|
|
660
|
+
? managedOr(provider).capabilities(modelId)
|
|
661
|
+
: capabilities.capabilities(provider, modelId),
|
|
662
|
+
logs: async (provider, modelId) => {
|
|
663
|
+
if (managedEngines.has(provider))
|
|
664
|
+
return managedOr(provider).logs(modelId);
|
|
665
|
+
if (!runtimes.has(provider))
|
|
666
|
+
throw unknownProvider(provider, runtimes.keys());
|
|
667
|
+
throw new AtomicCoreError('INVALID_ARGUMENT', `The provider "${provider}" runs no container, so it keeps no model logs.`, provider);
|
|
668
|
+
},
|
|
251
669
|
validateGguf: (path) => capabilities.validateGguf(path),
|
|
252
670
|
devices: async (provider) => {
|
|
253
671
|
// Asking a backend what devices it sees needs a backend; with none installed the
|
|
@@ -260,14 +678,42 @@ export async function createAtomicCore(options, construct) {
|
|
|
260
678
|
},
|
|
261
679
|
embed: (provider, modelId, input, ubatchSize) => embeddings.embed(provider, modelId, input, ubatchSize),
|
|
262
680
|
},
|
|
681
|
+
modelSetups: {
|
|
682
|
+
compatibility: (request) => compatibilityFor(modelSetupDeps, request),
|
|
683
|
+
plan: (request) => modelSetups.plan(request),
|
|
684
|
+
families: () => prismCompatibility.families(),
|
|
685
|
+
start: (request) => modelSetups.start(request),
|
|
686
|
+
list: () => modelSetups.list(),
|
|
687
|
+
get: (setupId) => modelSetups.get(setupId),
|
|
688
|
+
cancel: (setupId) => modelSetups.cancel(setupId),
|
|
689
|
+
resume: (setupId, opts) => modelSetups.resume(setupId, opts),
|
|
690
|
+
snapshot: () => modelSetups.snapshot(),
|
|
691
|
+
},
|
|
692
|
+
managedModelChecks,
|
|
693
|
+
...(managedModelDelete !== null ? { managedModelDelete } : {}),
|
|
694
|
+
// Where clients put tensorrt-llm models (change `add-tensorrt-llm-windows`, task 2.8): wherever
|
|
695
|
+
// the provider itself is offered.
|
|
696
|
+
...(managedRuntimes.size > 0
|
|
697
|
+
? { managedModelLocation: managedModelLocation(managedPlatform, layout, managedWindows) }
|
|
698
|
+
: {}),
|
|
263
699
|
backends: {
|
|
264
700
|
list: (provider, current) => backendService(provider).listInstalled(current),
|
|
265
|
-
install: (provider, version, backend, opts) =>
|
|
266
|
-
|
|
701
|
+
install: async (provider, version, backend, opts) => {
|
|
702
|
+
const result = await backendService(provider).install(version, backend, opts);
|
|
703
|
+
// The core emits no `backend:download-finished` for its own installs, so the decision
|
|
704
|
+
// module hears about a new TurboQuant build here: it may be the first to serve `--decision`.
|
|
705
|
+
noticeEngineInstall(decision, provider, result.installed);
|
|
706
|
+
noticeEmbeddingEngineInstall(embedding, provider, result.installed);
|
|
707
|
+
return result;
|
|
708
|
+
},
|
|
709
|
+
remove: (provider, version, backend) => backendService(provider).remove(version, backend, () => String(settings.get(provider)['version_backend'] ?? '')),
|
|
267
710
|
cancel: (taskId) => downloader.cancel(taskId),
|
|
268
711
|
getOptimal: (provider) => backendService(provider).getOptimalCache(),
|
|
269
712
|
setOptimal: (provider, record, expectedRevision) => backendService(provider).setOptimalCache(record, expectedRevision),
|
|
270
713
|
optimalSnapshot: () => optimalStore.snapshot(),
|
|
714
|
+
catalog: (provider, request) => backendAdvisor(provider).catalog(request),
|
|
715
|
+
recommend: (provider, request) => backendAdvisor(provider).recommend(request),
|
|
716
|
+
checkUpdates: (provider, request) => backendAdvisor(provider).checkUpdates(request),
|
|
271
717
|
},
|
|
272
718
|
disk: { available: (path) => availableDiskSpace(layout.root, path) },
|
|
273
719
|
remoteAccess: {
|
|
@@ -277,6 +723,31 @@ export async function createAtomicCore(options, construct) {
|
|
|
277
723
|
stop: () => core.stopRemoteAccess(),
|
|
278
724
|
},
|
|
279
725
|
diffusion,
|
|
726
|
+
engineBuilds,
|
|
727
|
+
engines,
|
|
728
|
+
decision: {
|
|
729
|
+
status: () => decision.getStatus(),
|
|
730
|
+
config: () => decision.getConfig(),
|
|
731
|
+
configure: (patch) => decision.configure(patch),
|
|
732
|
+
load: () => decision.load(),
|
|
733
|
+
unload: () => decision.unload(),
|
|
734
|
+
score: (request) => decision.scoreCandidates(request.task, request.criterion, request.candidates, {
|
|
735
|
+
...(request.timeout_ms !== undefined ? { timeoutMs: request.timeout_ms } : {}),
|
|
736
|
+
...(request.truncation !== undefined ? { truncation: request.truncation } : {}),
|
|
737
|
+
}),
|
|
738
|
+
decide: (request) => decision.decide(request.state, request.questions, {
|
|
739
|
+
...(request.timeout_ms !== undefined ? { timeoutMs: request.timeout_ms } : {}),
|
|
740
|
+
...(request.truncation !== undefined ? { truncation: request.truncation } : {}),
|
|
741
|
+
}),
|
|
742
|
+
},
|
|
743
|
+
embedding: {
|
|
744
|
+
status: () => embedding.getStatus(),
|
|
745
|
+
config: () => embedding.getConfig(),
|
|
746
|
+
configure: (patch) => embedding.configure(patch),
|
|
747
|
+
load: () => embedding.load(),
|
|
748
|
+
unload: () => embedding.unload(),
|
|
749
|
+
embed: (body) => embedding.embed(body),
|
|
750
|
+
},
|
|
280
751
|
settings: {
|
|
281
752
|
get: (provider) => settings.get(provider),
|
|
282
753
|
revision: () => settings.revision,
|
|
@@ -355,6 +826,10 @@ export async function createAtomicCore(options, construct) {
|
|
|
355
826
|
externalSessions,
|
|
356
827
|
appLeaseTimer,
|
|
357
828
|
diffusion,
|
|
829
|
+
managed,
|
|
830
|
+
managedTrustedHosts,
|
|
831
|
+
decision,
|
|
832
|
+
embedding,
|
|
358
833
|
errors: reporter,
|
|
359
834
|
telemetry: reporter,
|
|
360
835
|
remoteAccess: await wireRemoteAccess({
|
|
@@ -370,12 +845,31 @@ export async function createAtomicCore(options, construct) {
|
|
|
370
845
|
}),
|
|
371
846
|
});
|
|
372
847
|
await reapOrphans(journal, lock.instanceId, log);
|
|
848
|
+
// Model containers a previous core left running are stopped and removed before the first load is
|
|
849
|
+
// served, like `reapOrphans` above does for native backends. Linux with a docker CLI only. This
|
|
850
|
+
// wires the executor first, so a setup recovered just below (a pull in flight) finds it; the
|
|
851
|
+
// `tensorrt-llm` provider uses the same handle. A failure here is not "no docker": the handle
|
|
852
|
+
// tries again at the next load, which says the runtime failed to initialise, and why.
|
|
853
|
+
await managedContainers
|
|
854
|
+
.resolve()
|
|
855
|
+
.catch((e) => warn(`managed runtime container reconcile: ${String(e)}`));
|
|
856
|
+
// A setup the previous core was in the middle of is reconciled against the machine before the
|
|
857
|
+
// endpoint is published, so the first snapshot a client sees already describes it.
|
|
858
|
+
await managed.recover().catch((e) => warn(`managed runtime recovery: ${String(e)}`));
|
|
859
|
+
// Before the first load (design D5): downloaded engine builds no newer than the installer's, the
|
|
860
|
+
// ones a session kept on the last install, the leftovers of an interrupted install.
|
|
861
|
+
await engineBuilds.startupCleanup();
|
|
862
|
+
// A model setup a stopped core left mid-way becomes `interrupted`, resumable from its files.
|
|
863
|
+
await modelSetups.recover().catch((e) => warn(`model setup recovery: ${String(e)}`));
|
|
373
864
|
// A tunnel is worse to orphan than a backend: it keeps a public URL pointed at a local port.
|
|
374
865
|
await reapTunnelOrphan(layout.core.remoteAccessTunnel, { log: warn });
|
|
375
866
|
// Atomic Chat 2.0.40 journalled its tunnel at the data root and reaped it at its own startup; the
|
|
376
867
|
// app that replaced it does not. Same checks, and the file is consumed. Only the app owner's folder
|
|
377
868
|
// can hold it: a CLI owner refuses the app's folder, and one app instance runs at a time.
|
|
378
869
|
await reapTunnelOrphan(layout.legacyRemoteAccessTunnel, { log: warn });
|
|
870
|
+
// An enabled and configured decision model starts now; its shutdown belongs to the facade.
|
|
871
|
+
decision.start();
|
|
872
|
+
embedding.start();
|
|
379
873
|
await lock.publish(control.host, control.port);
|
|
380
874
|
log('info', `core ${CORE_VERSION} owns ${layout.root} (control ${control.url})`);
|
|
381
875
|
return core;
|