@atomic-chat/core 0.5.1 → 0.13.6
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 +46 -5
- package/dist/core/atomic-core.js +25 -0
- package/dist/core/atomic-core.js.map +1 -1
- package/dist/core/create.js +523 -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 +38 -0
- package/dist/core/prism.js +43 -0
- package/dist/core/prism.js.map +1 -0
- package/dist/core/public-server.d.ts +7 -0
- package/dist/core/public-server.js +5 -2
- 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/tensorrt-llm.d.ts +169 -0
- package/dist/core/tensorrt-llm.js +428 -0
- package/dist/core/tensorrt-llm.js.map +1 -0
- package/dist/core/types.d.ts +43 -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 +71 -0
- package/dist/decision/process.js +142 -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 +7 -4
- package/dist/diffusion/args.js +31 -7
- package/dist/diffusion/args.js.map +1 -1
- package/dist/diffusion/compat.d.ts +1 -1
- package/dist/diffusion/compat.js +6 -2
- package/dist/diffusion/compat.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 +64 -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 +21 -1
- package/dist/diffusion/tracker.js +43 -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/validate.js +2 -2
- package/dist/diffusion/validate.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/diffusion/workflow.d.ts +8 -2
- package/dist/diffusion/workflow.js +13 -5
- package/dist/diffusion/workflow.js.map +1 -1
- package/dist/downloads/downloader.d.ts +22 -0
- package/dist/downloads/downloader.js +57 -2
- package/dist/downloads/downloader.js.map +1 -1
- package/dist/downloads/protocol.d.ts +3 -8
- package/dist/downloads/protocol.js.map +1 -1
- package/dist/downloads/segmented.d.ts +40 -0
- package/dist/downloads/segmented.js +170 -0
- package/dist/downloads/segmented.js.map +1 -0
- 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 +70 -0
- package/dist/embedding/process.js +140 -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 +28 -0
- package/dist/models/compatibility/inspect.js +90 -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 +62 -0
- package/dist/models/compatibility/service.js +138 -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 +57 -0
- package/dist/models/gguf/tensors.js +239 -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 +283 -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 +284 -0
- package/dist/runtime/managed-text/lifecycle.js +896 -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 +33 -0
- package/dist/runtime/managed-text/readiness.js +88 -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 +16 -0
- package/dist/runtime/shared/ports.js +42 -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 +247 -0
- package/dist/runtime/tensorrt-llm/adapter.js +1028 -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 +22 -0
- package/dist/runtime/tensorrt-llm/check.js.map +1 -0
- package/dist/runtime/tensorrt-llm/compatibility.d.ts +124 -0
- package/dist/runtime/tensorrt-llm/compatibility.js +213 -0
- package/dist/runtime/tensorrt-llm/compatibility.js.map +1 -0
- package/dist/runtime/tensorrt-llm/cuda-graphs.d.ts +32 -0
- package/dist/runtime/tensorrt-llm/cuda-graphs.js +33 -0
- package/dist/runtime/tensorrt-llm/cuda-graphs.js.map +1 -0
- package/dist/runtime/tensorrt-llm/delete.d.ts +15 -0
- package/dist/runtime/tensorrt-llm/delete.js +60 -0
- package/dist/runtime/tensorrt-llm/delete.js.map +1 -0
- package/dist/runtime/tensorrt-llm/engine.d.ts +3 -0
- package/dist/runtime/tensorrt-llm/engine.js +30 -0
- package/dist/runtime/tensorrt-llm/engine.js.map +1 -0
- package/dist/runtime/tensorrt-llm/guest-files.d.ts +8 -0
- package/dist/runtime/tensorrt-llm/guest-files.js +49 -0
- package/dist/runtime/tensorrt-llm/guest-files.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 +41 -0
- package/dist/runtime/tensorrt-llm/kv-cache.js +48 -0
- package/dist/runtime/tensorrt-llm/kv-cache.js.map +1 -0
- package/dist/runtime/tensorrt-llm/location.d.ts +20 -0
- package/dist/runtime/tensorrt-llm/location.js +48 -0
- package/dist/runtime/tensorrt-llm/location.js.map +1 -0
- package/dist/runtime/tensorrt-llm/model-dir.d.ts +38 -0
- package/dist/runtime/tensorrt-llm/model-dir.js +137 -0
- package/dist/runtime/tensorrt-llm/model-dir.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/quant-format.d.ts +65 -0
- package/dist/runtime/tensorrt-llm/quant-format.js +189 -0
- package/dist/runtime/tensorrt-llm/quant-format.js.map +1 -0
- package/dist/runtime/tensorrt-llm/registry.d.ts +26 -0
- package/dist/runtime/tensorrt-llm/registry.js +68 -0
- package/dist/runtime/tensorrt-llm/registry.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/runtime.d.ts +130 -0
- package/dist/runtime/tensorrt-llm/runtime.js +395 -0
- package/dist/runtime/tensorrt-llm/runtime.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 +16 -1
- 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 +172 -10
- 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 +18 -0
- package/dist/server/public/gates.js +41 -14
- package/dist/server/public/gates.js.map +1 -1
- package/dist/server/public/index.d.ts +6 -2
- package/dist/server/public/index.js +23 -7
- 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 +91 -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 +2 -2
- 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,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TensorRT-LLM as a managed engine (change `add-vllm-runtime`, design D3): its adapter, its settings,
|
|
3
|
+
* its memory rule and checkpoint quirks for the shared check, its route policy, and its descriptor in
|
|
4
|
+
* conf. Registered by core like any other managed engine.
|
|
5
|
+
*/
|
|
6
|
+
import { TENSORRT_LLM_DESCRIPTOR_SOURCE, TENSORRT_LLM_ENGINE_ID } from '../environment/index.js';
|
|
7
|
+
import { tensorrtLlmAdapter } from './adapter.js';
|
|
8
|
+
import { tensorrtLlmCheckEngine, tensorrtLlmLaunchPlan } from './compatibility.js';
|
|
9
|
+
import { tensorrtLlmRoutePolicy } from './route-policy.js';
|
|
10
|
+
import { tensorrtLlmSettings } from './settings.js';
|
|
11
|
+
function memorySizing(settings) {
|
|
12
|
+
return {
|
|
13
|
+
contextLength: settings.context_length,
|
|
14
|
+
kvCacheFreeGpuMemoryFraction: settings.kv_cache_free_gpu_memory_fraction,
|
|
15
|
+
cudaGraphs: settings.cuda_graphs,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export const TENSORRT_LLM_ENGINE = {
|
|
19
|
+
engine_id: TENSORRT_LLM_ENGINE_ID,
|
|
20
|
+
provider: TENSORRT_LLM_ENGINE_ID,
|
|
21
|
+
label: 'TensorRT-LLM',
|
|
22
|
+
descriptor: TENSORRT_LLM_DESCRIPTOR_SOURCE,
|
|
23
|
+
adapter: tensorrtLlmAdapter,
|
|
24
|
+
settings: tensorrtLlmSettings,
|
|
25
|
+
check: (settings) => tensorrtLlmCheckEngine(memorySizing(settings)),
|
|
26
|
+
// Whether `auto` captures CUDA graphs, decided on the card as it stands right before the container.
|
|
27
|
+
launchPlan: (settings, checkpoint, gpu, host) => tensorrtLlmLaunchPlan(memorySizing(settings), checkpoint, gpu, host),
|
|
28
|
+
routePolicy: tensorrtLlmRoutePolicy,
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=engine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../../../src/runtime/tensorrt-llm/engine.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAEhG,OAAO,EAAE,kBAAkB,EAA4B,MAAM,cAAc,CAAA;AAC3E,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAA2B,MAAM,oBAAoB,CAAA;AAC3G,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAEnD,SAAS,YAAY,CAAC,QAA6B;IACjD,OAAO;QACL,aAAa,EAAE,QAAQ,CAAC,cAAc;QACtC,4BAA4B,EAAE,QAAQ,CAAC,iCAAiC;QACxE,UAAU,EAAE,QAAQ,CAAC,WAAW;KACjC,CAAA;AACH,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAA2C;IACzE,SAAS,EAAE,sBAAsB;IACjC,QAAQ,EAAE,sBAAsB;IAChC,KAAK,EAAE,cAAc;IACrB,UAAU,EAAE,8BAA8B;IAC1C,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,EAAE,mBAAmB;IAC7B,KAAK,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,sBAAsB,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACnE,oGAAoG;IACpG,UAAU,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAC9C,qBAAqB,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,CAAC;IACtE,WAAW,EAAE,sBAAsB;CACpC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type GuestMount, type WslDistributionTransport } from '../wsl/index.js';
|
|
2
|
+
/** Sizing and removing model and cache folders; the Linux default walks the file system itself. */
|
|
3
|
+
export interface ModelFileOps {
|
|
4
|
+
/** Bytes under each path; a path that is not there is 0. */
|
|
5
|
+
sizes(paths: string[]): Promise<Map<string, number>>;
|
|
6
|
+
remove(paths: string[]): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare function guestModelFiles(transport: WslDistributionTransport, mount?: GuestMount): ModelFileOps;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The files of `tensorrt-llm` models and engine caches on Windows (change `add-tensorrt-llm-windows`,
|
|
3
|
+
* task 2.8, design D5): they live in the WSL guest's ext4, and core sees them through
|
|
4
|
+
* `\\wsl.localhost`. Listing and reading a `model.yml` through that path is fine; sizing or deleting
|
|
5
|
+
* tens of gigabytes through it is not — thousands of 9p round trips for what `du` and `rm` do in the
|
|
6
|
+
* guest at once. So sizes and removals run as commands in the guest, as root, with the guest paths
|
|
7
|
+
* behind the UNC ones (`guestPathFor`, which refuses anything outside the distribution). One `du`
|
|
8
|
+
* call for every path counts a hard-linked file once, as the Linux walk does.
|
|
9
|
+
*/
|
|
10
|
+
import { AtomicCoreError } from '../../contracts/index.js';
|
|
11
|
+
import { WSL_LOCALHOST_MOUNT } from '../wsl/index.js';
|
|
12
|
+
const TIMEOUT_MS = 30 * 60_000;
|
|
13
|
+
export function guestModelFiles(transport, mount = WSL_LOCALHOST_MOUNT) {
|
|
14
|
+
const toGuest = (paths) => paths.map((path) => mount.guestPath(transport.name, path));
|
|
15
|
+
return {
|
|
16
|
+
sizes: async (paths) => {
|
|
17
|
+
const sizes = new Map(paths.map((path) => [path, 0]));
|
|
18
|
+
if (paths.length === 0)
|
|
19
|
+
return sizes;
|
|
20
|
+
const guest = toGuest(paths);
|
|
21
|
+
const answer = await transport.exec(['du', '-s', '-b', '--', ...guest], {
|
|
22
|
+
user: 'root',
|
|
23
|
+
timeoutMs: TIMEOUT_MS,
|
|
24
|
+
});
|
|
25
|
+
// `du` exits 1 when one path is missing, and still prints every other.
|
|
26
|
+
for (const line of answer.stdout.split('\n')) {
|
|
27
|
+
const match = /^(\d+)\t(.+)$/.exec(line);
|
|
28
|
+
if (match === null)
|
|
29
|
+
continue;
|
|
30
|
+
const index = guest.indexOf(match[2]);
|
|
31
|
+
if (index !== -1)
|
|
32
|
+
sizes.set(paths[index], Number(match[1]));
|
|
33
|
+
}
|
|
34
|
+
return sizes;
|
|
35
|
+
},
|
|
36
|
+
remove: async (paths) => {
|
|
37
|
+
if (paths.length === 0)
|
|
38
|
+
return;
|
|
39
|
+
const answer = await transport.exec(['rm', '-rf', '--', ...toGuest(paths)], {
|
|
40
|
+
user: 'root',
|
|
41
|
+
timeoutMs: TIMEOUT_MS,
|
|
42
|
+
});
|
|
43
|
+
if (answer.code !== 0) {
|
|
44
|
+
throw new AtomicCoreError('IO_ERROR', 'The files could not be removed in the Atomic Chat distribution.', answer.stderr.trim());
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=guest-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guest-files.js","sourceRoot":"","sources":["../../../src/runtime/tensorrt-llm/guest-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,mBAAmB,EAAkD,MAAM,iBAAiB,CAAA;AASrG,MAAM,UAAU,GAAG,EAAE,GAAG,MAAM,CAAA;AAE9B,MAAM,UAAU,eAAe,CAC7B,SAAmC,EACnC,QAAoB,mBAAmB;IAEvC,MAAM,OAAO,GAAG,CAAC,KAAe,EAAY,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA;IACzG,OAAO;QACL,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YACrB,MAAM,KAAK,GAAG,IAAI,GAAG,CAAiB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;YACrE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,KAAK,CAAA;YACpC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,CAAA;YAC5B,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,EAAE;gBACtE,IAAI,EAAE,MAAM;gBACZ,SAAS,EAAE,UAAU;aACtB,CAAC,CAAA;YACF,uEAAuE;YACvE,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC7C,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBACxC,IAAI,KAAK,KAAK,IAAI;oBAAE,SAAQ;gBAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAW,CAAC,CAAA;gBAC/C,IAAI,KAAK,KAAK,CAAC,CAAC;oBAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAW,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;YACvE,CAAC;YACD,OAAO,KAAK,CAAA;QACd,CAAC;QACD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YACtB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAM;YAC9B,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE;gBAC1E,IAAI,EAAE,MAAM;gBACZ,SAAS,EAAE,UAAU;aACtB,CAAC,CAAA;YACF,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;gBACtB,MAAM,IAAI,eAAe,CACvB,UAAU,EACV,iEAAiE,EACjE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CACrB,CAAA;YACH,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { GpuFacts } from '../../contracts/index.js';
|
|
2
|
+
import type { DockerExec } from '../container/index.js';
|
|
3
|
+
import type { HostExec } from '../environment/index.js';
|
|
4
|
+
import type { HostMemory } from './compatibility.js';
|
|
5
|
+
/** `linux-probe.ts`'s own `nvidia-smi` query: UUID, name, compute capability, memory, driver. */
|
|
6
|
+
export declare const NVIDIA_SMI_GPU_QUERY: string[];
|
|
7
|
+
export declare const PROC_MEMINFO_PATH = "/proc/meminfo";
|
|
8
|
+
/** `/proc/meminfo`'s `MemAvailable` line, in bytes; `null` when the text has no such line, or it does not parse. */
|
|
9
|
+
export declare function parseMemAvailableBytes(meminfo: string): number | null;
|
|
10
|
+
/** `/proc/meminfo`'s `MemTotal` line, in bytes; `null` when the text has no such line, or it does not parse. */
|
|
11
|
+
export declare function parseMemTotalBytes(meminfo: string): number | null;
|
|
12
|
+
export interface ReadHostMemoryDeps {
|
|
13
|
+
/** `null` for ENOENT or any other read failure — `LinuxProbeDeps.readFile`'s own convention. */
|
|
14
|
+
readFile: (path: string) => Promise<string | null>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* `MemAvailable` and `MemTotal`, a unified-memory card's free memory and size (design D13): each `0`,
|
|
18
|
+
* never a guess, when `/proc/meminfo` cannot be read or that line does not parse. `0` is the safe
|
|
19
|
+
* direction here — unlike SELinux below, an unreadable `/proc/meminfo` only ever makes a
|
|
20
|
+
* unified-memory card under-report (its check fails short, it ranks last for the default card),
|
|
21
|
+
* never over-report, so this never needs to fail the whole probe the way an unanswered
|
|
22
|
+
* `docker info` does.
|
|
23
|
+
*/
|
|
24
|
+
export declare function readHostMemory(deps: ReadHostMemoryDeps): Promise<HostMemory>;
|
|
25
|
+
export interface ProbeTensorrtLlmGpusDeps {
|
|
26
|
+
exec: HostExec;
|
|
27
|
+
/** `nvidia-smi` by name on a real host; the test host's own stand-in otherwise. */
|
|
28
|
+
nvidiaSmi: string;
|
|
29
|
+
}
|
|
30
|
+
/** Just the cards: the query and parser `probeTensorrtLlmHost` and the check route both share. */
|
|
31
|
+
export declare function probeTensorrtLlmGpus(deps: ProbeTensorrtLlmGpusDeps): Promise<GpuFacts[]>;
|
|
32
|
+
export interface TensorrtLlmHostFacts {
|
|
33
|
+
gpus: GpuFacts[];
|
|
34
|
+
selinux: boolean;
|
|
35
|
+
memory: HostMemory;
|
|
36
|
+
}
|
|
37
|
+
export interface ProbeTensorrtLlmHostDeps extends ProbeTensorrtLlmGpusDeps, ReadHostMemoryDeps {
|
|
38
|
+
docker: DockerExec;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A `docker info` that does not answer, or answers without a daemon behind it, refuses the load
|
|
42
|
+
* (findings-2.14-r1.md item 2): whether our mounts need the shared `:z` label is then unknown, and
|
|
43
|
+
* guessing "no SELinux" would start a container that cannot read its own weights on an enforcing host.
|
|
44
|
+
*/
|
|
45
|
+
export declare function probeTensorrtLlmHost(deps: ProbeTensorrtLlmHostDeps): Promise<TensorrtLlmHostFacts>;
|
|
46
|
+
export interface ProbeTensorrtLlmGpusAndMemoryDeps extends ProbeTensorrtLlmGpusDeps, ReadHostMemoryDeps {
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* What `POST /models/tensorrt-llm/check` needs from the machine (task 2.16): the cards and
|
|
50
|
+
* the host's memory, never Docker (see the file banner).
|
|
51
|
+
*/
|
|
52
|
+
export declare function probeTensorrtLlmGpusAndMemory(deps: ProbeTensorrtLlmGpusAndMemoryDeps): Promise<{
|
|
53
|
+
gpus: GpuFacts[];
|
|
54
|
+
memory: HostMemory;
|
|
55
|
+
}>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a `tensorrt-llm` load asks the machine right before it starts a container (task 2.14), plus
|
|
3
|
+
* what the compatibility check (task 2.16) needs on its own: which NVIDIA cards there are —
|
|
4
|
+
* `nvidia-smi`, the same query and parser the host assessment uses, so a saved `gpu_id` names a card
|
|
5
|
+
* the same way everywhere (`GPU-<uuid>`) — `/proc/meminfo`'s `MemAvailable` and `MemTotal` (design
|
|
6
|
+
* D13: a unified-memory card's free memory and size, for `checkModelCompatibility` and for
|
|
7
|
+
* `selectLaunchGpu`'s ranking, design D12b), and, for a load only, whether Docker runs with
|
|
8
|
+
* SELinux, read from `docker info` over the system socket through the core's one executor (design
|
|
9
|
+
* D15: our mounts then carry `:z`). Everything here is asked fresh rather than cached: a card can
|
|
10
|
+
* disappear between two loads, and the spec wants that noticed ("Выбранная карта исчезла").
|
|
11
|
+
*
|
|
12
|
+
* `probeTensorrtLlmGpusAndMemory` (the check route, `check.ts`) deliberately never asks Docker
|
|
13
|
+
* anything: a compatibility question has to answer the same whether or not the engine is even
|
|
14
|
+
* installed yet, so unlike `probeTensorrtLlmHost` (the load path, which genuinely cannot start a
|
|
15
|
+
* container without knowing SELinux) it must never fail closed on `docker info`.
|
|
16
|
+
*/
|
|
17
|
+
import { AtomicCoreError } from '../../contracts/index.js';
|
|
18
|
+
import { withSystemSocket } from '../container/index.js';
|
|
19
|
+
import { parseDockerInfo, parseNvidiaSmi } from '../environment/index.js';
|
|
20
|
+
/** `linux-probe.ts`'s own `nvidia-smi` query: UUID, name, compute capability, memory, driver. */
|
|
21
|
+
export const NVIDIA_SMI_GPU_QUERY = [
|
|
22
|
+
'--query-gpu=uuid,name,compute_cap,memory.total,memory.free,driver_version',
|
|
23
|
+
'--format=csv,noheader,nounits',
|
|
24
|
+
];
|
|
25
|
+
export const PROC_MEMINFO_PATH = '/proc/meminfo';
|
|
26
|
+
const MEM_AVAILABLE_LINE = /^MemAvailable:\s*(\d+)\s*kB\s*$/m;
|
|
27
|
+
const MEM_TOTAL_LINE = /^MemTotal:\s*(\d+)\s*kB\s*$/m;
|
|
28
|
+
function parseMeminfoLine(meminfo, line) {
|
|
29
|
+
const match = line.exec(meminfo);
|
|
30
|
+
if (match === null)
|
|
31
|
+
return null;
|
|
32
|
+
const kib = Number.parseInt(match[1], 10);
|
|
33
|
+
return Number.isFinite(kib) ? kib * 1024 : null;
|
|
34
|
+
}
|
|
35
|
+
/** `/proc/meminfo`'s `MemAvailable` line, in bytes; `null` when the text has no such line, or it does not parse. */
|
|
36
|
+
export function parseMemAvailableBytes(meminfo) {
|
|
37
|
+
return parseMeminfoLine(meminfo, MEM_AVAILABLE_LINE);
|
|
38
|
+
}
|
|
39
|
+
/** `/proc/meminfo`'s `MemTotal` line, in bytes; `null` when the text has no such line, or it does not parse. */
|
|
40
|
+
export function parseMemTotalBytes(meminfo) {
|
|
41
|
+
return parseMeminfoLine(meminfo, MEM_TOTAL_LINE);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* `MemAvailable` and `MemTotal`, a unified-memory card's free memory and size (design D13): each `0`,
|
|
45
|
+
* never a guess, when `/proc/meminfo` cannot be read or that line does not parse. `0` is the safe
|
|
46
|
+
* direction here — unlike SELinux below, an unreadable `/proc/meminfo` only ever makes a
|
|
47
|
+
* unified-memory card under-report (its check fails short, it ranks last for the default card),
|
|
48
|
+
* never over-report, so this never needs to fail the whole probe the way an unanswered
|
|
49
|
+
* `docker info` does.
|
|
50
|
+
*/
|
|
51
|
+
export async function readHostMemory(deps) {
|
|
52
|
+
const text = await deps.readFile(PROC_MEMINFO_PATH);
|
|
53
|
+
if (text === null)
|
|
54
|
+
return { availableBytes: 0, totalBytes: 0 };
|
|
55
|
+
return { availableBytes: parseMemAvailableBytes(text) ?? 0, totalBytes: parseMemTotalBytes(text) ?? 0 };
|
|
56
|
+
}
|
|
57
|
+
/** Just the cards: the query and parser `probeTensorrtLlmHost` and the check route both share. */
|
|
58
|
+
export async function probeTensorrtLlmGpus(deps) {
|
|
59
|
+
return parseNvidiaSmi(await deps.exec(deps.nvidiaSmi, NVIDIA_SMI_GPU_QUERY)).gpus;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A `docker info` that does not answer, or answers without a daemon behind it, refuses the load
|
|
63
|
+
* (findings-2.14-r1.md item 2): whether our mounts need the shared `:z` label is then unknown, and
|
|
64
|
+
* guessing "no SELinux" would start a container that cannot read its own weights on an enforcing host.
|
|
65
|
+
*/
|
|
66
|
+
export async function probeTensorrtLlmHost(deps) {
|
|
67
|
+
const [gpus, info, memory] = await Promise.all([
|
|
68
|
+
probeTensorrtLlmGpus(deps),
|
|
69
|
+
deps.docker(withSystemSocket(['info', '--format', '{{json .}}'])).catch(() => null),
|
|
70
|
+
readHostMemory(deps),
|
|
71
|
+
]);
|
|
72
|
+
const docker = parseDockerInfo(info, null);
|
|
73
|
+
if (!docker.daemon_reachable) {
|
|
74
|
+
throw new AtomicCoreError('MANAGED_PREREQUISITE_BLOCKED', 'Docker did not answer `docker info`, so whether SELinux needs our mounts relabelled is unknown; ' +
|
|
75
|
+
'the model is not loaded. Check that the Docker daemon is running.', [info?.stderr, ...docker.server_errors].filter((line) => line !== undefined && line !== '').join('; '));
|
|
76
|
+
}
|
|
77
|
+
return { gpus, selinux: docker.selinux, memory };
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* What `POST /models/tensorrt-llm/check` needs from the machine (task 2.16): the cards and
|
|
81
|
+
* the host's memory, never Docker (see the file banner).
|
|
82
|
+
*/
|
|
83
|
+
export async function probeTensorrtLlmGpusAndMemory(deps) {
|
|
84
|
+
const [gpus, memory] = await Promise.all([probeTensorrtLlmGpus(deps), readHostMemory(deps)]);
|
|
85
|
+
return { gpus, memory };
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=host-facts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-facts.js","sourceRoot":"","sources":["../../../src/runtime/tensorrt-llm/host-facts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIzE,iGAAiG;AACjG,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,2EAA2E;IAC3E,+BAA+B;CAChC,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAA;AAChD,MAAM,kBAAkB,GAAG,kCAAkC,CAAA;AAC7D,MAAM,cAAc,GAAG,8BAA8B,CAAA;AAErD,SAAS,gBAAgB,CAAC,OAAe,EAAE,IAAY;IACrD,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAChC,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IAC/B,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAW,EAAE,EAAE,CAAC,CAAA;IACnD,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;AACjD,CAAC;AAED,oHAAoH;AACpH,MAAM,UAAU,sBAAsB,CAAC,OAAe;IACpD,OAAO,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAA;AACtD,CAAC;AAED,gHAAgH;AAChH,MAAM,UAAU,kBAAkB,CAAC,OAAe;IAChD,OAAO,gBAAgB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAA;AAClD,CAAC;AAOD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAwB;IAC3D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAA;IACnD,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,EAAE,cAAc,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAAA;IAC9D,OAAO,EAAE,cAAc,EAAE,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAA;AACzG,CAAC;AAQD,kGAAkG;AAClG,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,IAA8B;IACvE,OAAO,cAAc,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAA;AACnF,CAAC;AAYD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,IAA8B;IACvE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC7C,oBAAoB,CAAC,IAAI,CAAC;QAC1B,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;QACnF,cAAc,CAAC,IAAI,CAAC;KACrB,CAAC,CAAA;IACF,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAC1C,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAC7B,MAAM,IAAI,eAAe,CACvB,8BAA8B,EAC9B,kGAAkG;YAChG,mEAAmE,EACrE,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CACvG,CAAA;IACH,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,CAAA;AAClD,CAAC;AAID;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,IAAuC;IAEvC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IAC5F,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAA;AACzB,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `tensorrt-llm` provider (openspec change `add-tensorrt-llm-linux`).
|
|
3
|
+
*
|
|
4
|
+
* `compatibility.ts` is TensorRT-LLM's memory rule and checkpoint quirks plugged into the shared
|
|
5
|
+
* check skeleton (`../managed-models/`, change `add-vllm-runtime`), behind
|
|
6
|
+
* `POST /atomic/v1/models/tensorrt-llm/check` (spec `tensorrt-llm-models`); the shared naming rule
|
|
7
|
+
* and the GPU-selection rule the load path reuses are re-exported from there. `adapter.ts` (task 2.13) is the `ManagedTextAdapter`
|
|
8
|
+
* the engine-neutral load lifecycle (`../managed-text/`) plugs into. Task 2.14 adds the provider
|
|
9
|
+
* itself: `runtime.ts` (the `LocalRuntime`), `settings.ts` (stored settings → adapter settings),
|
|
10
|
+
* `route-policy.ts` (what the public server must refuse or map for a session), `installation.ts`
|
|
11
|
+
* (the ready installation and its pinned descriptor), `host-facts.ts` (cards, SELinux and
|
|
12
|
+
* `MemAvailable`/`MemTotal`, per load) and `model-dir.ts` (the single-model lookup `runtime.ts`'s
|
|
13
|
+
* load path uses). Task 2.16 wires the pure check in: `registry.ts` (the full model listing scan),
|
|
14
|
+
* `check.ts` (the route handler behind `compatibility.ts`'s pure verdict) and `prelaunch.ts` (the
|
|
15
|
+
* file-and-compatibility re-check `runtime.ts`'s load path runs before a container is created).
|
|
16
|
+
* Task 2.24 adds `delete.ts`: a deleted model's engine caches and folder, with the bytes freed.
|
|
17
|
+
*
|
|
18
|
+
* Public API of this module is exported from this file only.
|
|
19
|
+
*/
|
|
20
|
+
export * from './compatibility.js';
|
|
21
|
+
export * from '../managed-models/quant-format.js';
|
|
22
|
+
export * from './adapter.js';
|
|
23
|
+
export * from './kv-cache.js';
|
|
24
|
+
export * from './settings.js';
|
|
25
|
+
export * from './route-policy.js';
|
|
26
|
+
export * from './installation.js';
|
|
27
|
+
export * from './host-facts.js';
|
|
28
|
+
export * from './check.js';
|
|
29
|
+
export * from './prelaunch.js';
|
|
30
|
+
export * from './engine.js';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `tensorrt-llm` provider (openspec change `add-tensorrt-llm-linux`).
|
|
3
|
+
*
|
|
4
|
+
* `compatibility.ts` is TensorRT-LLM's memory rule and checkpoint quirks plugged into the shared
|
|
5
|
+
* check skeleton (`../managed-models/`, change `add-vllm-runtime`), behind
|
|
6
|
+
* `POST /atomic/v1/models/tensorrt-llm/check` (spec `tensorrt-llm-models`); the shared naming rule
|
|
7
|
+
* and the GPU-selection rule the load path reuses are re-exported from there. `adapter.ts` (task 2.13) is the `ManagedTextAdapter`
|
|
8
|
+
* the engine-neutral load lifecycle (`../managed-text/`) plugs into. Task 2.14 adds the provider
|
|
9
|
+
* itself: `runtime.ts` (the `LocalRuntime`), `settings.ts` (stored settings → adapter settings),
|
|
10
|
+
* `route-policy.ts` (what the public server must refuse or map for a session), `installation.ts`
|
|
11
|
+
* (the ready installation and its pinned descriptor), `host-facts.ts` (cards, SELinux and
|
|
12
|
+
* `MemAvailable`/`MemTotal`, per load) and `model-dir.ts` (the single-model lookup `runtime.ts`'s
|
|
13
|
+
* load path uses). Task 2.16 wires the pure check in: `registry.ts` (the full model listing scan),
|
|
14
|
+
* `check.ts` (the route handler behind `compatibility.ts`'s pure verdict) and `prelaunch.ts` (the
|
|
15
|
+
* file-and-compatibility re-check `runtime.ts`'s load path runs before a container is created).
|
|
16
|
+
* Task 2.24 adds `delete.ts`: a deleted model's engine caches and folder, with the bytes freed.
|
|
17
|
+
*
|
|
18
|
+
* Public API of this module is exported from this file only.
|
|
19
|
+
*/
|
|
20
|
+
export * from './compatibility.js';
|
|
21
|
+
export * from '../managed-models/quant-format.js';
|
|
22
|
+
export * from './adapter.js';
|
|
23
|
+
export * from './kv-cache.js';
|
|
24
|
+
export * from './settings.js';
|
|
25
|
+
export * from './route-policy.js';
|
|
26
|
+
export * from './installation.js';
|
|
27
|
+
export * from './host-facts.js';
|
|
28
|
+
export * from './check.js';
|
|
29
|
+
export * from './prelaunch.js';
|
|
30
|
+
export * from './engine.js';
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtime/tensorrt-llm/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,cAAc,oBAAoB,CAAA;AAClC,cAAc,mCAAmC,CAAA;AACjD,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PlatformImage, RuntimeDescriptor, RuntimeInstallation } from '../../contracts/index.js';
|
|
2
|
+
import type { InstallationStore, RuntimeDescriptorProvider } from '../environment/index.js';
|
|
3
|
+
export type ContainerPlatform = 'linux/amd64' | 'linux/arm64';
|
|
4
|
+
/** `process.arch` to the descriptor's image key; null for a CPU no image is published for. */
|
|
5
|
+
export declare function containerPlatformFor(arch: string): ContainerPlatform | null;
|
|
6
|
+
export interface ReadyInstallation {
|
|
7
|
+
installation: RuntimeInstallation;
|
|
8
|
+
descriptor: RuntimeDescriptor;
|
|
9
|
+
/** The descriptor's image for this host's platform, pinned by digest. */
|
|
10
|
+
image: PlatformImage;
|
|
11
|
+
}
|
|
12
|
+
export interface ResolveReadyInstallationDeps {
|
|
13
|
+
/** The setup operation's installation records (`InstallationStore`); a torn or foreign file is skipped there. */
|
|
14
|
+
installations: Pick<InstallationStore, 'list'>;
|
|
15
|
+
descriptors: Pick<RuntimeDescriptorProvider, 'forInstallation'>;
|
|
16
|
+
/** This host's container platform; null when the CPU has no published image. */
|
|
17
|
+
platform: ContainerPlatform | null;
|
|
18
|
+
/** The managed engine the load is for (change `add-vllm-runtime`); `tensorrt-llm` when omitted. */
|
|
19
|
+
engineId?: string;
|
|
20
|
+
/** That engine in messages; defaults to its known name, else its id. */
|
|
21
|
+
label?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function resolveReadyInstallation(deps: ResolveReadyInstallationDeps): Promise<ReadyInstallation>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which TensorRT-LLM installation a load runs (spec `tensorrt-llm-runtime`, "Загрузка без готовой
|
|
3
|
+
* установки"; design D7): only a `ready` one, only with the descriptor it was pinned to
|
|
4
|
+
* (`active_descriptor_id`, read from the descriptor cache — never fetched, so a release published
|
|
5
|
+
* since cannot change what runs), and only with that descriptor's image for this host's CPU. Anything
|
|
6
|
+
* short of that refuses the load with `MANAGED_ADAPTER_UNAVAILABLE` before a container exists.
|
|
7
|
+
*
|
|
8
|
+
* The installations themselves are read by the setup operation's own store (`InstallationStore`,
|
|
9
|
+
* `../environment/installations.ts`): the records under the shared per-user root that both scopes
|
|
10
|
+
* read, so a setup finished by the app is `ready` for the CLI core too. There is one reader of that
|
|
11
|
+
* format; this file only decides which of its installations a load may run.
|
|
12
|
+
*/
|
|
13
|
+
import { AtomicCoreError } from '../../contracts/index.js';
|
|
14
|
+
/** The engine a load needs an installation of when the caller names none (the descriptor's own `engine_id`). */
|
|
15
|
+
const ENGINE_ID = 'tensorrt-llm';
|
|
16
|
+
const LABELS = { 'tensorrt-llm': 'TensorRT-LLM' };
|
|
17
|
+
/** `process.arch` to the descriptor's image key; null for a CPU no image is published for. */
|
|
18
|
+
export function containerPlatformFor(arch) {
|
|
19
|
+
if (arch === 'x64')
|
|
20
|
+
return 'linux/amd64';
|
|
21
|
+
if (arch === 'arm64')
|
|
22
|
+
return 'linux/arm64';
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
function unavailable(message, details) {
|
|
26
|
+
return new AtomicCoreError('MANAGED_ADAPTER_UNAVAILABLE', message, details);
|
|
27
|
+
}
|
|
28
|
+
export async function resolveReadyInstallation(deps) {
|
|
29
|
+
const engineId = deps.engineId ?? ENGINE_ID;
|
|
30
|
+
const label = deps.label ?? LABELS[engineId] ?? engineId;
|
|
31
|
+
const ours = (await deps.installations.list())
|
|
32
|
+
.map((record) => record.installation)
|
|
33
|
+
.filter((i) => i.engine_id === engineId);
|
|
34
|
+
const ready = ours.find((i) => i.status === 'ready' && i.active_descriptor_id !== null);
|
|
35
|
+
if (ready === undefined) {
|
|
36
|
+
const status = ours.map((i) => `${i.installation_id}: ${i.status}`).join(', ');
|
|
37
|
+
throw unavailable(ours.length === 0
|
|
38
|
+
? `The ${label} engine is not installed; set it up before loading a model.`
|
|
39
|
+
: `The ${label} engine is not ready; finish or repair its setup before loading a model.`, status === '' ? undefined : status);
|
|
40
|
+
}
|
|
41
|
+
const resolved = await deps.descriptors.forInstallation(ready.active_descriptor_id);
|
|
42
|
+
if (resolved.kind !== 'available')
|
|
43
|
+
throw resolved.error;
|
|
44
|
+
const { descriptor } = resolved;
|
|
45
|
+
if (descriptor.engine_id !== engineId) {
|
|
46
|
+
throw new AtomicCoreError('MANAGED_METADATA_INVALID', 'The installation is pinned to a descriptor of another engine.', `${descriptor.descriptor_id}: ${descriptor.engine_id}`);
|
|
47
|
+
}
|
|
48
|
+
if (deps.platform === null) {
|
|
49
|
+
throw unavailable(`${label} publishes no image for this CPU architecture.`);
|
|
50
|
+
}
|
|
51
|
+
return { installation: ready, descriptor, image: descriptor.image[deps.platform] };
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=installation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installation.js","sourceRoot":"","sources":["../../../src/runtime/tensorrt-llm/installation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAI1D,gHAAgH;AAChH,MAAM,SAAS,GAAG,cAAc,CAAA;AAChC,MAAM,MAAM,GAA2B,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA;AAIzE,8FAA8F;AAC9F,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,IAAI,IAAI,KAAK,KAAK;QAAE,OAAO,aAAa,CAAA;IACxC,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,aAAa,CAAA;IAC1C,OAAO,IAAI,CAAA;AACb,CAAC;AAqBD,SAAS,WAAW,CAAC,OAAe,EAAE,OAAgB;IACpD,OAAO,IAAI,eAAe,CAAC,6BAA6B,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;AAC7E,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,IAAkC;IAElC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,SAAS,CAAA;IAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAA;IACxD,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;SAC3C,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC;SACpC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAA;IAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,IAAI,CAAC,CAAC,oBAAoB,KAAK,IAAI,CAAC,CAAA;IACvF,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,eAAe,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC9E,MAAM,WAAW,CACf,IAAI,CAAC,MAAM,KAAK,CAAC;YACf,CAAC,CAAC,OAAO,KAAK,6DAA6D;YAC3E,CAAC,CAAC,OAAO,KAAK,0EAA0E,EAC1F,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CACnC,CAAA;IACH,CAAC;IACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,KAAK,CAAC,oBAA8B,CAAC,CAAA;IAC7F,IAAI,QAAQ,CAAC,IAAI,KAAK,WAAW;QAAE,MAAM,QAAQ,CAAC,KAAK,CAAA;IACvD,MAAM,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAA;IAC/B,IAAI,UAAU,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;QACtC,MAAM,IAAI,eAAe,CACvB,0BAA0B,EAC1B,+DAA+D,EAC/D,GAAG,UAAU,CAAC,aAAa,KAAK,UAAU,CAAC,SAAS,EAAE,CACvD,CAAA;IACH,CAAC;IACD,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;QAC3B,MAAM,WAAW,CAAC,GAAG,KAAK,gDAAgD,CAAC,CAAA;IAC7E,CAAC;IACD,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAA;AACpF,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The KV-cache numbers the launch (`adapter.ts`) and the memory check (`compatibility.ts`) must agree
|
|
3
|
+
* on, in one module both import: the pure policy never reaches into the adapter (and through it the
|
|
4
|
+
* managed-text lifecycle) for a constant.
|
|
5
|
+
*/
|
|
6
|
+
/** The one default KV-cache fraction: the launch passes it (`adapter.ts`'s `buildTensorrtLlmLaunch`, through the validated settings), the model check
|
|
7
|
+
* and the pre-launch check size their reserve with it (`compatibility.ts`'s `kvCacheReserveBytes`,
|
|
8
|
+
* through the same validated settings), and `src/settings/schema/tensorrt-llm.json` stores it
|
|
9
|
+
* (pinned equal by `settings.test.ts`). Below `trtllm-serve`'s own 0.9 on purpose: at 0.9 an 8 GB
|
|
10
|
+
* card ran out of memory on the engine's non-KV allocations after the KV cache took its share
|
|
11
|
+
* (budget table `_no_capture_init_kv_cache: 3.50 / 0.35`); 0.85 failed too, 0.8 loaded (docs/decisions/2026-09-29-tensorrt-llm-kv-cache-fraction-0-8-and-oom-read-from-the-whole-log.md). */
|
|
12
|
+
export declare const TENSORRT_LLM_DEFAULT_KV_CACHE_FREE_FRACTION = 0.8;
|
|
13
|
+
/**
|
|
14
|
+
* How many full contexts the KV cache holds on a unified-memory card: one full-context request plus
|
|
15
|
+
* a concurrent one. A starting value, not a measurement (docs/decisions/2026-09-29-tensorrt-llm-
|
|
16
|
+
* unified-memory-kv-cache-bounded-by-tokens.md).
|
|
17
|
+
*/
|
|
18
|
+
export declare const TENSORRT_LLM_UNIFIED_KV_CONTEXTS = 2;
|
|
19
|
+
/**
|
|
20
|
+
* Tokens in one KV-cache block: `KvCacheConfig.tokens_per_block`'s default in 1.3.0rc29, logged by
|
|
21
|
+
* both cache managers ("tokens per block=32", "KVCacheV2Scheduler: tokens_per_block=32"). The engine
|
|
22
|
+
* turns `kv_cache_config.max_tokens` into whole blocks, rounding down: 2096 tokens became 65 blocks,
|
|
23
|
+
* a 2080-token sequence for a 2096-token context, and the readiness check refused the load as out of
|
|
24
|
+
* memory on a card with 17 GiB free (RTX 5090 Laptop, 2026-10-09). Re-check with each engine image.
|
|
25
|
+
*/
|
|
26
|
+
export declare const TENSORRT_LLM_TOKENS_PER_BLOCK = 32;
|
|
27
|
+
/** `tokens` rounded up to whole KV-cache blocks: what the engine keeps when asked for at least that many. */
|
|
28
|
+
export declare function tensorrtLlmWholeBlockTokens(tokens: number): number;
|
|
29
|
+
/**
|
|
30
|
+
* The `kv_cache_config.max_tokens` that holds `sequences` sequences at full context at once: each
|
|
31
|
+
* sequence takes whole blocks of its own, so the blocks are counted per sequence before multiplying
|
|
32
|
+
* (2 × 2096 tokens is 131 blocks, but two 2096-token sequences need 66 each).
|
|
33
|
+
*/
|
|
34
|
+
export declare function tensorrtLlmKvTokens(contextLength: number, sequences: number): number;
|
|
35
|
+
/**
|
|
36
|
+
* The `kv_cache_config.max_tokens` a unified-memory launch writes, and the token count its memory
|
|
37
|
+
* check reserves KV for. On a unified-memory card (GB10/DGX Spark) "free GPU memory" is the system's
|
|
38
|
+
* free RAM, so `--kv_cache_free_gpu_memory_fraction` alone would hand most of the machine's memory to
|
|
39
|
+
* the KV cache whatever the context length; this bounds it to what the configured context needs.
|
|
40
|
+
*/
|
|
41
|
+
export declare function tensorrtLlmUnifiedKvMaxTokens(contextLength: number): number;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The KV-cache numbers the launch (`adapter.ts`) and the memory check (`compatibility.ts`) must agree
|
|
3
|
+
* on, in one module both import: the pure policy never reaches into the adapter (and through it the
|
|
4
|
+
* managed-text lifecycle) for a constant.
|
|
5
|
+
*/
|
|
6
|
+
/** The one default KV-cache fraction: the launch passes it (`adapter.ts`'s `buildTensorrtLlmLaunch`, through the validated settings), the model check
|
|
7
|
+
* and the pre-launch check size their reserve with it (`compatibility.ts`'s `kvCacheReserveBytes`,
|
|
8
|
+
* through the same validated settings), and `src/settings/schema/tensorrt-llm.json` stores it
|
|
9
|
+
* (pinned equal by `settings.test.ts`). Below `trtllm-serve`'s own 0.9 on purpose: at 0.9 an 8 GB
|
|
10
|
+
* card ran out of memory on the engine's non-KV allocations after the KV cache took its share
|
|
11
|
+
* (budget table `_no_capture_init_kv_cache: 3.50 / 0.35`); 0.85 failed too, 0.8 loaded (docs/decisions/2026-09-29-tensorrt-llm-kv-cache-fraction-0-8-and-oom-read-from-the-whole-log.md). */
|
|
12
|
+
export const TENSORRT_LLM_DEFAULT_KV_CACHE_FREE_FRACTION = 0.8;
|
|
13
|
+
/**
|
|
14
|
+
* How many full contexts the KV cache holds on a unified-memory card: one full-context request plus
|
|
15
|
+
* a concurrent one. A starting value, not a measurement (docs/decisions/2026-09-29-tensorrt-llm-
|
|
16
|
+
* unified-memory-kv-cache-bounded-by-tokens.md).
|
|
17
|
+
*/
|
|
18
|
+
export const TENSORRT_LLM_UNIFIED_KV_CONTEXTS = 2;
|
|
19
|
+
/**
|
|
20
|
+
* Tokens in one KV-cache block: `KvCacheConfig.tokens_per_block`'s default in 1.3.0rc29, logged by
|
|
21
|
+
* both cache managers ("tokens per block=32", "KVCacheV2Scheduler: tokens_per_block=32"). The engine
|
|
22
|
+
* turns `kv_cache_config.max_tokens` into whole blocks, rounding down: 2096 tokens became 65 blocks,
|
|
23
|
+
* a 2080-token sequence for a 2096-token context, and the readiness check refused the load as out of
|
|
24
|
+
* memory on a card with 17 GiB free (RTX 5090 Laptop, 2026-10-09). Re-check with each engine image.
|
|
25
|
+
*/
|
|
26
|
+
export const TENSORRT_LLM_TOKENS_PER_BLOCK = 32;
|
|
27
|
+
/** `tokens` rounded up to whole KV-cache blocks: what the engine keeps when asked for at least that many. */
|
|
28
|
+
export function tensorrtLlmWholeBlockTokens(tokens) {
|
|
29
|
+
return Math.ceil(tokens / TENSORRT_LLM_TOKENS_PER_BLOCK) * TENSORRT_LLM_TOKENS_PER_BLOCK;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The `kv_cache_config.max_tokens` that holds `sequences` sequences at full context at once: each
|
|
33
|
+
* sequence takes whole blocks of its own, so the blocks are counted per sequence before multiplying
|
|
34
|
+
* (2 × 2096 tokens is 131 blocks, but two 2096-token sequences need 66 each).
|
|
35
|
+
*/
|
|
36
|
+
export function tensorrtLlmKvTokens(contextLength, sequences) {
|
|
37
|
+
return sequences * tensorrtLlmWholeBlockTokens(contextLength);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The `kv_cache_config.max_tokens` a unified-memory launch writes, and the token count its memory
|
|
41
|
+
* check reserves KV for. On a unified-memory card (GB10/DGX Spark) "free GPU memory" is the system's
|
|
42
|
+
* free RAM, so `--kv_cache_free_gpu_memory_fraction` alone would hand most of the machine's memory to
|
|
43
|
+
* the KV cache whatever the context length; this bounds it to what the configured context needs.
|
|
44
|
+
*/
|
|
45
|
+
export function tensorrtLlmUnifiedKvMaxTokens(contextLength) {
|
|
46
|
+
return tensorrtLlmKvTokens(contextLength, TENSORRT_LLM_UNIFIED_KV_CONTEXTS);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=kv-cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kv-cache.js","sourceRoot":"","sources":["../../../src/runtime/tensorrt-llm/kv-cache.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;8LAK8L;AAC9L,MAAM,CAAC,MAAM,2CAA2C,GAAG,GAAG,CAAA;AAE9D;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAA;AAEjD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAA;AAE/C,6GAA6G;AAC7G,MAAM,UAAU,2BAA2B,CAAC,MAAc;IACxD,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,6BAA6B,CAAC,GAAG,6BAA6B,CAAA;AAC1F,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,aAAqB,EAAE,SAAiB;IAC1E,OAAO,SAAS,GAAG,2BAA2B,CAAC,aAAa,CAAC,CAAA;AAC/D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAAC,aAAqB;IACjE,OAAO,mBAAmB,CAAC,aAAa,EAAE,gCAAgC,CAAC,CAAA;AAC7E,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TensorrtLlmModelLocation } from '../../contracts/index.js';
|
|
2
|
+
import type { WindowsEnvironmentRecord } from '../environment/index.js';
|
|
3
|
+
import { type GuestMount, type WslDistributionTransport } from '../wsl/index.js';
|
|
4
|
+
/** Linux: `<data>/tensorrt-llm/models`, with the free space of the volume it is (or will be) on. */
|
|
5
|
+
export declare function linuxModelLocation(root: string, freeBytes?: (path: string) => Promise<number | null>): Promise<TensorrtLlmModelLocation>;
|
|
6
|
+
export interface WindowsModelLocationDeps {
|
|
7
|
+
records: {
|
|
8
|
+
read(): Promise<WindowsEnvironmentRecord | null>;
|
|
9
|
+
};
|
|
10
|
+
/** This scope's `scope_key` (`readOrCreateGuestScopeKey`). */
|
|
11
|
+
scopeKey: () => Promise<string>;
|
|
12
|
+
transport: (distribution: string) => WslDistributionTransport;
|
|
13
|
+
/** Free bytes on the Windows volume holding `path` (`WindowsHost.freeDiskBytes`). */
|
|
14
|
+
volumeFreeBytes: (path: string) => Promise<number | null>;
|
|
15
|
+
/** How core reaches the guest's files; `\\wsl.localhost` unless a test says otherwise. */
|
|
16
|
+
mount?: GuestMount;
|
|
17
|
+
}
|
|
18
|
+
/** The guest folder of this scope's `tensorrt-llm` models. */
|
|
19
|
+
export declare function guestModelsRoot(scopeKey: string): string;
|
|
20
|
+
export declare function windowsModelLocation(deps: WindowsModelLocationDeps): Promise<TensorrtLlmModelLocation>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where `tensorrt-llm` models live, as clients must use it (change `add-tensorrt-llm-windows`, task
|
|
3
|
+
* 2.8, design D6; spec `tensorrt-llm-models` "Core сообщает расположение моделей"). One answer, from
|
|
4
|
+
* core, on every platform, so a client never derives the folder itself: on Linux the data folder's own
|
|
5
|
+
* `<data>/tensorrt-llm/models` as before; on Windows the scope's folder in Atomic Chat's WSL
|
|
6
|
+
* distribution, `\\wsl.localhost\<distribution>\var\lib\atomic-chat\scopes\<scope_key>\models\tensorrt-llm`,
|
|
7
|
+
* created (and handed to uid 1000) before a client writes into it. The free space on Windows is the
|
|
8
|
+
* smaller of the guest's own and the Windows volume's that holds the distribution's disk image: the
|
|
9
|
+
* guest's disk can grow only as far as that volume lets it. Before the distribution exists there is no
|
|
10
|
+
* such folder: `MANAGED_ADAPTER_UNAVAILABLE`, and no download starts.
|
|
11
|
+
*/
|
|
12
|
+
import { AtomicCoreError } from '../../contracts/index.js';
|
|
13
|
+
import { freeBytesAtNearest, parseDfAvail } from '../environment/index.js';
|
|
14
|
+
import { ensureGuestScope, guestScopeRoot, WSL_LOCALHOST_MOUNT, } from '../wsl/index.js';
|
|
15
|
+
/** Linux: `<data>/tensorrt-llm/models`, with the free space of the volume it is (or will be) on. */
|
|
16
|
+
export async function linuxModelLocation(root, freeBytes = freeBytesAtNearest) {
|
|
17
|
+
return { root, free_bytes: await freeBytes(root).catch(() => null) };
|
|
18
|
+
}
|
|
19
|
+
/** The guest folder of this scope's `tensorrt-llm` models. */
|
|
20
|
+
export function guestModelsRoot(scopeKey) {
|
|
21
|
+
return `${guestScopeRoot(scopeKey)}/models/tensorrt-llm`;
|
|
22
|
+
}
|
|
23
|
+
export async function windowsModelLocation(deps) {
|
|
24
|
+
const record = await deps.records.read();
|
|
25
|
+
if (record === null) {
|
|
26
|
+
throw new AtomicCoreError('MANAGED_ADAPTER_UNAVAILABLE', 'TensorRT-LLM models live in Atomic Chat’s WSL distribution, which is not set up yet.');
|
|
27
|
+
}
|
|
28
|
+
const key = await deps.scopeKey();
|
|
29
|
+
const transport = deps.transport(record.distribution.name);
|
|
30
|
+
const guestRoot = guestModelsRoot(key);
|
|
31
|
+
// A distribution unregistered behind the app's back is no environment at all for a client.
|
|
32
|
+
await ensureGuestScope(transport, key).catch((error) => {
|
|
33
|
+
throw new AtomicCoreError('MANAGED_ADAPTER_UNAVAILABLE', 'Atomic Chat’s WSL distribution does not answer; set the environment up again.', error instanceof Error ? error.message : String(error));
|
|
34
|
+
});
|
|
35
|
+
const [guest, volume] = await Promise.all([
|
|
36
|
+
transport
|
|
37
|
+
.exec(['df', '--output=avail', '-B1', guestRoot], { user: 'root', timeoutMs: 120_000 })
|
|
38
|
+
.then(parseDfAvail)
|
|
39
|
+
.catch(() => null),
|
|
40
|
+
deps.volumeFreeBytes(record.distribution.path).catch(() => null),
|
|
41
|
+
]);
|
|
42
|
+
const known = [guest, volume].filter((value) => value !== null);
|
|
43
|
+
return {
|
|
44
|
+
root: (deps.mount ?? WSL_LOCALHOST_MOUNT).hostPath(record.distribution.name, guestRoot),
|
|
45
|
+
free_bytes: known.length === 0 ? null : Math.min(...known),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=location.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location.js","sourceRoot":"","sources":["../../../src/runtime/tensorrt-llm/location.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE1D,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE1E,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,mBAAmB,GAGpB,MAAM,iBAAiB,CAAA;AAExB,oGAAoG;AACpG,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,IAAY,EACZ,YAAsD,kBAAkB;IAExE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,CAAA;AACtE,CAAC;AAaD,8DAA8D;AAC9D,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,OAAO,GAAG,cAAc,CAAC,QAAQ,CAAC,sBAAsB,CAAA;AAC1D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,IAA8B;IAE9B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAA;IACxC,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QACpB,MAAM,IAAI,eAAe,CACvB,6BAA6B,EAC7B,sFAAsF,CACvF,CAAA;IACH,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAA;IACjC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;IAC1D,MAAM,SAAS,GAAG,eAAe,CAAC,GAAG,CAAC,CAAA;IACtC,2FAA2F;IAC3F,MAAM,gBAAgB,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;QAC9D,MAAM,IAAI,eAAe,CACvB,6BAA6B,EAC7B,+EAA+E,EAC/E,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACvD,CAAA;IACH,CAAC,CAAC,CAAA;IACF,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACxC,SAAS;aACN,IAAI,CAAC,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;aACtF,IAAI,CAAC,YAAY,CAAC;aAClB,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;QACpB,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;KACjE,CAAC,CAAA;IACF,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAmB,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,CAAA;IAChF,OAAO;QACL,IAAI,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,mBAAmB,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC;QACvF,UAAU,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;KAC3D,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CheckpointFile } from './compatibility.js';
|
|
2
|
+
/** `model.yml`'s own fields, parsed and typed; nothing here is derived. */
|
|
3
|
+
export interface TensorrtLlmModelYmlDocument {
|
|
4
|
+
/** `null` when `model.yml` does not carry one (tolerated: `readTensorrtLlmModel`'s own contract). */
|
|
5
|
+
repository: string | null;
|
|
6
|
+
revision: string | null;
|
|
7
|
+
architectures: string[];
|
|
8
|
+
quantization: string | null;
|
|
9
|
+
files: CheckpointFile[];
|
|
10
|
+
}
|
|
11
|
+
export interface TensorrtLlmModel {
|
|
12
|
+
id: string;
|
|
13
|
+
/** The checkpoint directory as core sees it; mounted read-only into the container. */
|
|
14
|
+
dir: string;
|
|
15
|
+
repository: string | null;
|
|
16
|
+
revision: string | null;
|
|
17
|
+
/** `architectures[0]`: the Hugging Face class name the descriptor's `model_families` is keyed by. */
|
|
18
|
+
architecture: string | null;
|
|
19
|
+
quantization: string | null;
|
|
20
|
+
/** The revision's file listing exactly as `model.yml` recorded it (the pre-launch check's input). */
|
|
21
|
+
files: CheckpointFile[];
|
|
22
|
+
/** Weight bytes of `files` (`weightBytes`), 0 when `model.yml` lists none. */
|
|
23
|
+
weightBytes: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* `model.yml`'s codec (`parse` only — the app and the CLI write it, core never does, spec
|
|
27
|
+
* `tensorrt-llm-models`): `MANAGED_METADATA_INVALID` when `text` is not valid YAML or not a mapping.
|
|
28
|
+
* `repository`/`revision`/`architectures`/`quantization` tolerate absence or the wrong type by
|
|
29
|
+
* reading as `null`/`[]`, the same way `readTensorrtLlmModel`'s own tests already expect for a bare
|
|
30
|
+
* `model.yml` — a model missing optional metadata is still a model, not a broken one. `files` is the
|
|
31
|
+
* one field held to a stricter rule (task 2.16w round 1, finding 4): the array itself may be absent
|
|
32
|
+
* (`[]`), but once present every entry must be well-formed (`fileList`/`parseFileEntry`) —
|
|
33
|
+
* silently dropping a malformed entry would leave a shard unverified, a checkpoint's weight bytes
|
|
34
|
+
* under-counted, or an `hf_quant_config.json` entry quietly lost.
|
|
35
|
+
*/
|
|
36
|
+
export declare function parseTensorrtLlmModelYml(text: string, path: string): TensorrtLlmModelYmlDocument;
|
|
37
|
+
/** `MODEL_NOT_FOUND` without a readable `model.yml`; `MANAGED_METADATA_INVALID` when it is not a mapping. */
|
|
38
|
+
export declare function readTensorrtLlmModel(modelsDir: string, modelId: string): Promise<TensorrtLlmModel>;
|