@atomic-chat/core 0.5.1
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 +46 -0
- package/dist/app-daemon.d.ts +2 -0
- package/dist/app-daemon.js +72 -0
- package/dist/app-daemon.js.map +1 -0
- package/dist/backend/catalog/archive.d.ts +70 -0
- package/dist/backend/catalog/archive.js +138 -0
- package/dist/backend/catalog/archive.js.map +1 -0
- package/dist/backend/catalog/bundled-manifest-baseline.d.ts +2 -0
- package/dist/backend/catalog/bundled-manifest-baseline.js +49 -0
- package/dist/backend/catalog/bundled-manifest-baseline.js.map +1 -0
- package/dist/backend/catalog/cuda-family.d.ts +54 -0
- package/dist/backend/catalog/cuda-family.js +93 -0
- package/dist/backend/catalog/cuda-family.js.map +1 -0
- package/dist/backend/catalog/index.d.ts +6 -0
- package/dist/backend/catalog/index.js +7 -0
- package/dist/backend/catalog/index.js.map +1 -0
- package/dist/backend/catalog/manifest.d.ts +102 -0
- package/dist/backend/catalog/manifest.js +233 -0
- package/dist/backend/catalog/manifest.js.map +1 -0
- package/dist/backend/catalog/migrate.d.ts +40 -0
- package/dist/backend/catalog/migrate.js +135 -0
- package/dist/backend/catalog/migrate.js.map +1 -0
- package/dist/backend/index.d.ts +18 -0
- package/dist/backend/index.js +19 -0
- package/dist/backend/index.js.map +1 -0
- package/dist/backend/install/index.d.ts +3 -0
- package/dist/backend/install/index.js +4 -0
- package/dist/backend/install/index.js.map +1 -0
- package/dist/backend/install/runtime-backend.d.ts +22 -0
- package/dist/backend/install/runtime-backend.js +95 -0
- package/dist/backend/install/runtime-backend.js.map +1 -0
- package/dist/backend/install/service.d.ts +119 -0
- package/dist/backend/install/service.js +218 -0
- package/dist/backend/install/service.js.map +1 -0
- package/dist/backend/installed/index.d.ts +3 -0
- package/dist/backend/installed/index.js +4 -0
- package/dist/backend/installed/index.js.map +1 -0
- package/dist/backend/installed/installed.d.ts +93 -0
- package/dist/backend/installed/installed.js +209 -0
- package/dist/backend/installed/installed.js.map +1 -0
- package/dist/backend/installed/scan.d.ts +39 -0
- package/dist/backend/installed/scan.js +105 -0
- package/dist/backend/installed/scan.js.map +1 -0
- package/dist/backend/optimal/index.d.ts +3 -0
- package/dist/backend/optimal/index.js +4 -0
- package/dist/backend/optimal/index.js.map +1 -0
- package/dist/backend/optimal/optimal-cache.d.ts +90 -0
- package/dist/backend/optimal/optimal-cache.js +198 -0
- package/dist/backend/optimal/optimal-cache.js.map +1 -0
- package/dist/backend/optimal/optimal-store.d.ts +24 -0
- package/dist/backend/optimal/optimal-store.js +103 -0
- package/dist/backend/optimal/optimal-store.js.map +1 -0
- package/dist/backend/select/amd-rocm-pci-ids.d.ts +3 -0
- package/dist/backend/select/amd-rocm-pci-ids.js +57 -0
- package/dist/backend/select/amd-rocm-pci-ids.js.map +1 -0
- package/dist/backend/select/categories.d.ts +49 -0
- package/dist/backend/select/categories.js +178 -0
- package/dist/backend/select/categories.js.map +1 -0
- package/dist/backend/select/features.d.ts +81 -0
- package/dist/backend/select/features.js +221 -0
- package/dist/backend/select/features.js.map +1 -0
- package/dist/backend/select/index.d.ts +9 -0
- package/dist/backend/select/index.js +10 -0
- package/dist/backend/select/index.js.map +1 -0
- package/dist/backend/select/recovery.d.ts +51 -0
- package/dist/backend/select/recovery.js +108 -0
- package/dist/backend/select/recovery.js.map +1 -0
- package/dist/backend/select/tiers.d.ts +76 -0
- package/dist/backend/select/tiers.js +179 -0
- package/dist/backend/select/tiers.js.map +1 -0
- package/dist/backend/turboquant.d.ts +134 -0
- package/dist/backend/turboquant.js +587 -0
- package/dist/backend/turboquant.js.map +1 -0
- package/dist/backend/types.d.ts +139 -0
- package/dist/backend/types.js +13 -0
- package/dist/backend/types.js.map +1 -0
- package/dist/backend/version.d.ts +59 -0
- package/dist/backend/version.js +168 -0
- package/dist/backend/version.js.map +1 -0
- package/dist/cli/bin.d.ts +2 -0
- package/dist/cli/bin.js +10 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/cloud.d.ts +13 -0
- package/dist/cli/cloud.js +146 -0
- package/dist/cli/cloud.js.map +1 -0
- package/dist/cli/commands/daemon.d.ts +4 -0
- package/dist/cli/commands/daemon.js +88 -0
- package/dist/cli/commands/daemon.js.map +1 -0
- package/dist/cli/commands/index.d.ts +16 -0
- package/dist/cli/commands/index.js +17 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/models.d.ts +4 -0
- package/dist/cli/commands/models.js +52 -0
- package/dist/cli/commands/models.js.map +1 -0
- package/dist/cli/commands/serve.d.ts +16 -0
- package/dist/cli/commands/serve.js +263 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/commands/server.d.ts +4 -0
- package/dist/cli/commands/server.js +126 -0
- package/dist/cli/commands/server.js.map +1 -0
- package/dist/cli/commands/shared.d.ts +10 -0
- package/dist/cli/commands/shared.js +34 -0
- package/dist/cli/commands/shared.js.map +1 -0
- package/dist/cli/commands/shutdown.d.ts +4 -0
- package/dist/cli/commands/shutdown.js +32 -0
- package/dist/cli/commands/shutdown.js.map +1 -0
- package/dist/cli/commands/telemetry.d.ts +8 -0
- package/dist/cli/commands/telemetry.js +50 -0
- package/dist/cli/commands/telemetry.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.js +8 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/io.d.ts +46 -0
- package/dist/cli/io.js +101 -0
- package/dist/cli/io.js.map +1 -0
- package/dist/cli/launch.d.ts +50 -0
- package/dist/cli/launch.js +327 -0
- package/dist/cli/launch.js.map +1 -0
- package/dist/cli/main.d.ts +10 -0
- package/dist/cli/main.js +109 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/owner.d.ts +39 -0
- package/dist/cli/owner.js +179 -0
- package/dist/cli/owner.js.map +1 -0
- package/dist/client/control-client.d.ts +213 -0
- package/dist/client/control-client.js +368 -0
- package/dist/client/control-client.js.map +1 -0
- package/dist/client/index.d.ts +7 -0
- package/dist/client/index.js +8 -0
- package/dist/client/index.js.map +1 -0
- package/dist/cloud/chatgpt.d.ts +63 -0
- package/dist/cloud/chatgpt.js +233 -0
- package/dist/cloud/chatgpt.js.map +1 -0
- package/dist/cloud/index.d.ts +8 -0
- package/dist/cloud/index.js +9 -0
- package/dist/cloud/index.js.map +1 -0
- package/dist/cloud/registry.d.ts +51 -0
- package/dist/cloud/registry.js +148 -0
- package/dist/cloud/registry.js.map +1 -0
- package/dist/config/data-folder.d.ts +57 -0
- package/dist/config/data-folder.js +150 -0
- package/dist/config/data-folder.js.map +1 -0
- package/dist/config/index.d.ts +9 -0
- package/dist/config/index.js +10 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/paths.d.ts +98 -0
- package/dist/config/paths.js +109 -0
- package/dist/config/paths.js.map +1 -0
- package/dist/contracts/control-api.d.ts +61 -0
- package/dist/contracts/control-api.js +7 -0
- package/dist/contracts/control-api.js.map +1 -0
- package/dist/contracts/diffusion.d.ts +477 -0
- package/dist/contracts/diffusion.js +10 -0
- package/dist/contracts/diffusion.js.map +1 -0
- package/dist/contracts/errors.d.ts +61 -0
- package/dist/contracts/errors.js +70 -0
- package/dist/contracts/errors.js.map +1 -0
- package/dist/contracts/events.d.ts +270 -0
- package/dist/contracts/events.js +7 -0
- package/dist/contracts/events.js.map +1 -0
- package/dist/contracts/hardware.d.ts +53 -0
- package/dist/contracts/hardware.js +12 -0
- package/dist/contracts/hardware.js.map +1 -0
- package/dist/contracts/index.d.ts +12 -0
- package/dist/contracts/index.js +13 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/model-yml.d.ts +28 -0
- package/dist/contracts/model-yml.js +23 -0
- package/dist/contracts/model-yml.js.map +1 -0
- package/dist/contracts/remote-access.d.ts +43 -0
- package/dist/contracts/remote-access.js +12 -0
- package/dist/contracts/remote-access.js.map +1 -0
- package/dist/contracts/session.d.ts +39 -0
- package/dist/contracts/session.js +7 -0
- package/dist/contracts/session.js.map +1 -0
- package/dist/contracts/settings.d.ts +106 -0
- package/dist/contracts/settings.js +17 -0
- package/dist/contracts/settings.js.map +1 -0
- package/dist/core/atomic-core.d.ts +149 -0
- package/dist/core/atomic-core.js +289 -0
- package/dist/core/atomic-core.js.map +1 -0
- package/dist/core/create.d.ts +12 -0
- package/dist/core/create.js +393 -0
- package/dist/core/create.js.map +1 -0
- package/dist/core/index.d.ts +10 -0
- package/dist/core/index.js +9 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/public-server.d.ts +76 -0
- package/dist/core/public-server.js +143 -0
- package/dist/core/public-server.js.map +1 -0
- package/dist/core/reap-orphans.d.ts +7 -0
- package/dist/core/reap-orphans.js +40 -0
- package/dist/core/reap-orphans.js.map +1 -0
- package/dist/core/sessions.d.ts +60 -0
- package/dist/core/sessions.js +180 -0
- package/dist/core/sessions.js.map +1 -0
- package/dist/core/types.d.ts +61 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/credentials/api-keys.d.ts +41 -0
- package/dist/credentials/api-keys.js +156 -0
- package/dist/credentials/api-keys.js.map +1 -0
- package/dist/credentials/chatgpt-auth.d.ts +73 -0
- package/dist/credentials/chatgpt-auth.js +167 -0
- package/dist/credentials/chatgpt-auth.js.map +1 -0
- package/dist/credentials/chatgpt-oauth.d.ts +97 -0
- package/dist/credentials/chatgpt-oauth.js +329 -0
- package/dist/credentials/chatgpt-oauth.js.map +1 -0
- package/dist/credentials/chatgpt-store.d.ts +33 -0
- package/dist/credentials/chatgpt-store.js +110 -0
- package/dist/credentials/chatgpt-store.js.map +1 -0
- package/dist/credentials/index.d.ts +11 -0
- package/dist/credentials/index.js +12 -0
- package/dist/credentials/index.js.map +1 -0
- package/dist/diffusion/args.d.ts +102 -0
- package/dist/diffusion/args.js +291 -0
- package/dist/diffusion/args.js.map +1 -0
- package/dist/diffusion/compat.d.ts +20 -0
- package/dist/diffusion/compat.js +58 -0
- package/dist/diffusion/compat.js.map +1 -0
- package/dist/diffusion/containment.d.ts +15 -0
- package/dist/diffusion/containment.js +32 -0
- package/dist/diffusion/containment.js.map +1 -0
- package/dist/diffusion/errors.d.ts +28 -0
- package/dist/diffusion/errors.js +63 -0
- package/dist/diffusion/errors.js.map +1 -0
- package/dist/diffusion/gallery.d.ts +76 -0
- package/dist/diffusion/gallery.js +307 -0
- package/dist/diffusion/gallery.js.map +1 -0
- package/dist/diffusion/http.d.ts +16 -0
- package/dist/diffusion/http.js +41 -0
- package/dist/diffusion/http.js.map +1 -0
- package/dist/diffusion/idle.d.ts +23 -0
- package/dist/diffusion/idle.js +45 -0
- package/dist/diffusion/idle.js.map +1 -0
- package/dist/diffusion/image-job.d.ts +25 -0
- package/dist/diffusion/image-job.js +176 -0
- package/dist/diffusion/image-job.js.map +1 -0
- package/dist/diffusion/index.d.ts +35 -0
- package/dist/diffusion/index.js +36 -0
- package/dist/diffusion/index.js.map +1 -0
- package/dist/diffusion/install.d.ts +61 -0
- package/dist/diffusion/install.js +287 -0
- package/dist/diffusion/install.js.map +1 -0
- package/dist/diffusion/job-kind.d.ts +74 -0
- package/dist/diffusion/job-kind.js +7 -0
- package/dist/diffusion/job-kind.js.map +1 -0
- package/dist/diffusion/jobs.d.ts +90 -0
- package/dist/diffusion/jobs.js +433 -0
- package/dist/diffusion/jobs.js.map +1 -0
- package/dist/diffusion/mutex.d.ts +16 -0
- package/dist/diffusion/mutex.js +46 -0
- package/dist/diffusion/mutex.js.map +1 -0
- package/dist/diffusion/parse.d.ts +19 -0
- package/dist/diffusion/parse.js +274 -0
- package/dist/diffusion/parse.js.map +1 -0
- package/dist/diffusion/png.d.ts +77 -0
- package/dist/diffusion/png.js +335 -0
- package/dist/diffusion/png.js.map +1 -0
- package/dist/diffusion/progress.d.ts +74 -0
- package/dist/diffusion/progress.js +223 -0
- package/dist/diffusion/progress.js.map +1 -0
- package/dist/diffusion/recipe.d.ts +26 -0
- package/dist/diffusion/recipe.js +206 -0
- package/dist/diffusion/recipe.js.map +1 -0
- package/dist/diffusion/server-process.d.ts +59 -0
- package/dist/diffusion/server-process.js +235 -0
- package/dist/diffusion/server-process.js.map +1 -0
- package/dist/diffusion/service.d.ts +107 -0
- package/dist/diffusion/service.js +431 -0
- package/dist/diffusion/service.js.map +1 -0
- package/dist/diffusion/session.d.ts +58 -0
- package/dist/diffusion/session.js +226 -0
- package/dist/diffusion/session.js.map +1 -0
- package/dist/diffusion/state.d.ts +90 -0
- package/dist/diffusion/state.js +122 -0
- package/dist/diffusion/state.js.map +1 -0
- package/dist/diffusion/tracker.d.ts +46 -0
- package/dist/diffusion/tracker.js +153 -0
- package/dist/diffusion/tracker.js.map +1 -0
- package/dist/diffusion/types.d.ts +62 -0
- package/dist/diffusion/types.js +10 -0
- package/dist/diffusion/types.js.map +1 -0
- package/dist/diffusion/validate.d.ts +36 -0
- package/dist/diffusion/validate.js +166 -0
- package/dist/diffusion/validate.js.map +1 -0
- package/dist/diffusion/video-gallery.d.ts +56 -0
- package/dist/diffusion/video-gallery.js +252 -0
- package/dist/diffusion/video-gallery.js.map +1 -0
- package/dist/diffusion/video-job.d.ts +33 -0
- package/dist/diffusion/video-job.js +150 -0
- package/dist/diffusion/video-job.js.map +1 -0
- package/dist/diffusion/video-recipe.d.ts +12 -0
- package/dist/diffusion/video-recipe.js +141 -0
- package/dist/diffusion/video-recipe.js.map +1 -0
- package/dist/diffusion/wiring.d.ts +24 -0
- package/dist/diffusion/wiring.js +38 -0
- package/dist/diffusion/wiring.js.map +1 -0
- package/dist/diffusion/workflow.d.ts +33 -0
- package/dist/diffusion/workflow.js +78 -0
- package/dist/diffusion/workflow.js.map +1 -0
- package/dist/downloads/archive.d.ts +15 -0
- package/dist/downloads/archive.js +121 -0
- package/dist/downloads/archive.js.map +1 -0
- package/dist/downloads/disk-space.d.ts +18 -0
- package/dist/downloads/disk-space.js +32 -0
- package/dist/downloads/disk-space.js.map +1 -0
- package/dist/downloads/disk.d.ts +38 -0
- package/dist/downloads/disk.js +88 -0
- package/dist/downloads/disk.js.map +1 -0
- package/dist/downloads/downloader.d.ts +75 -0
- package/dist/downloads/downloader.js +479 -0
- package/dist/downloads/downloader.js.map +1 -0
- package/dist/downloads/index.d.ts +14 -0
- package/dist/downloads/index.js +15 -0
- package/dist/downloads/index.js.map +1 -0
- package/dist/downloads/protocol.d.ts +52 -0
- package/dist/downloads/protocol.js +153 -0
- package/dist/downloads/protocol.js.map +1 -0
- package/dist/downloads/proxy-fetch.d.ts +45 -0
- package/dist/downloads/proxy-fetch.js +571 -0
- package/dist/downloads/proxy-fetch.js.map +1 -0
- package/dist/downloads/verify.d.ts +22 -0
- package/dist/downloads/verify.js +74 -0
- package/dist/downloads/verify.js.map +1 -0
- package/dist/events/emitter.d.ts +44 -0
- package/dist/events/emitter.js +104 -0
- package/dist/events/emitter.js.map +1 -0
- package/dist/events/index.d.ts +5 -0
- package/dist/events/index.js +6 -0
- package/dist/events/index.js.map +1 -0
- package/dist/hardware/index.d.ts +7 -0
- package/dist/hardware/index.js +8 -0
- package/dist/hardware/index.js.map +1 -0
- package/dist/hardware/override.d.ts +46 -0
- package/dist/hardware/override.js +81 -0
- package/dist/hardware/override.js.map +1 -0
- package/dist/host/index.d.ts +15 -0
- package/dist/host/index.js +16 -0
- package/dist/host/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/catalog.d.ts +67 -0
- package/dist/integrations/catalog.js +385 -0
- package/dist/integrations/catalog.js.map +1 -0
- package/dist/integrations/config-io.d.ts +86 -0
- package/dist/integrations/config-io.js +229 -0
- package/dist/integrations/config-io.js.map +1 -0
- package/dist/integrations/configure/atomic-agent.d.ts +33 -0
- package/dist/integrations/configure/atomic-agent.js +127 -0
- package/dist/integrations/configure/atomic-agent.js.map +1 -0
- package/dist/integrations/configure/claude-code.d.ts +16 -0
- package/dist/integrations/configure/claude-code.js +45 -0
- package/dist/integrations/configure/claude-code.js.map +1 -0
- package/dist/integrations/configure/cline.d.ts +28 -0
- package/dist/integrations/configure/cline.js +70 -0
- package/dist/integrations/configure/cline.js.map +1 -0
- package/dist/integrations/configure/codex.d.ts +17 -0
- package/dist/integrations/configure/codex.js +43 -0
- package/dist/integrations/configure/codex.js.map +1 -0
- package/dist/integrations/configure/copilot.d.ts +10 -0
- package/dist/integrations/configure/copilot.js +14 -0
- package/dist/integrations/configure/copilot.js.map +1 -0
- package/dist/integrations/configure/droid.d.ts +12 -0
- package/dist/integrations/configure/droid.js +47 -0
- package/dist/integrations/configure/droid.js.map +1 -0
- package/dist/integrations/configure/dsh.d.ts +34 -0
- package/dist/integrations/configure/dsh.js +146 -0
- package/dist/integrations/configure/dsh.js.map +1 -0
- package/dist/integrations/configure/env-agent.d.ts +26 -0
- package/dist/integrations/configure/env-agent.js +41 -0
- package/dist/integrations/configure/env-agent.js.map +1 -0
- package/dist/integrations/configure/goose.d.ts +12 -0
- package/dist/integrations/configure/goose.js +16 -0
- package/dist/integrations/configure/goose.js.map +1 -0
- package/dist/integrations/configure/hermes.d.ts +41 -0
- package/dist/integrations/configure/hermes.js +247 -0
- package/dist/integrations/configure/hermes.js.map +1 -0
- package/dist/integrations/configure/index.d.ts +25 -0
- package/dist/integrations/configure/index.js +26 -0
- package/dist/integrations/configure/index.js.map +1 -0
- package/dist/integrations/configure/json-tree.d.ts +16 -0
- package/dist/integrations/configure/json-tree.js +19 -0
- package/dist/integrations/configure/json-tree.js.map +1 -0
- package/dist/integrations/configure/kilo.d.ts +9 -0
- package/dist/integrations/configure/kilo.js +19 -0
- package/dist/integrations/configure/kilo.js.map +1 -0
- package/dist/integrations/configure/mimo.d.ts +9 -0
- package/dist/integrations/configure/mimo.js +19 -0
- package/dist/integrations/configure/mimo.js.map +1 -0
- package/dist/integrations/configure/muse.d.ts +9 -0
- package/dist/integrations/configure/muse.js +13 -0
- package/dist/integrations/configure/muse.js.map +1 -0
- package/dist/integrations/configure/openclaude.d.ts +13 -0
- package/dist/integrations/configure/openclaude.js +56 -0
- package/dist/integrations/configure/openclaude.js.map +1 -0
- package/dist/integrations/configure/openclaw.d.ts +24 -0
- package/dist/integrations/configure/openclaw.js +99 -0
- package/dist/integrations/configure/openclaw.js.map +1 -0
- package/dist/integrations/configure/opencode-style.d.ts +25 -0
- package/dist/integrations/configure/opencode-style.js +43 -0
- package/dist/integrations/configure/opencode-style.js.map +1 -0
- package/dist/integrations/configure/opencode.d.ts +9 -0
- package/dist/integrations/configure/opencode.js +19 -0
- package/dist/integrations/configure/opencode.js.map +1 -0
- package/dist/integrations/configure/openhands.d.ts +8 -0
- package/dist/integrations/configure/openhands.js +12 -0
- package/dist/integrations/configure/openhands.js.map +1 -0
- package/dist/integrations/configure/pi.d.ts +14 -0
- package/dist/integrations/configure/pi.js +49 -0
- package/dist/integrations/configure/pi.js.map +1 -0
- package/dist/integrations/configure/poolside.d.ts +8 -0
- package/dist/integrations/configure/poolside.js +12 -0
- package/dist/integrations/configure/poolside.js.map +1 -0
- package/dist/integrations/configure/registry.d.ts +41 -0
- package/dist/integrations/configure/registry.js +50 -0
- package/dist/integrations/configure/registry.js.map +1 -0
- package/dist/integrations/configure/zcode.d.ts +59 -0
- package/dist/integrations/configure/zcode.js +260 -0
- package/dist/integrations/configure/zcode.js.map +1 -0
- package/dist/integrations/configure/zed.d.ts +16 -0
- package/dist/integrations/configure/zed.js +61 -0
- package/dist/integrations/configure/zed.js.map +1 -0
- package/dist/integrations/detect.d.ts +29 -0
- package/dist/integrations/detect.js +43 -0
- package/dist/integrations/detect.js.map +1 -0
- package/dist/integrations/index.d.ts +9 -0
- package/dist/integrations/index.js +10 -0
- package/dist/integrations/index.js.map +1 -0
- package/dist/lock/control-token.d.ts +19 -0
- package/dist/lock/control-token.js +58 -0
- package/dist/lock/control-token.js.map +1 -0
- package/dist/lock/index.d.ts +10 -0
- package/dist/lock/index.js +11 -0
- package/dist/lock/index.js.map +1 -0
- package/dist/lock/instance-lock.d.ts +93 -0
- package/dist/lock/instance-lock.js +244 -0
- package/dist/lock/instance-lock.js.map +1 -0
- package/dist/lock/legacy-guard.d.ts +46 -0
- package/dist/lock/legacy-guard.js +87 -0
- package/dist/lock/legacy-guard.js.map +1 -0
- package/dist/lock/model-claim.d.ts +20 -0
- package/dist/lock/model-claim.js +84 -0
- package/dist/lock/model-claim.js.map +1 -0
- package/dist/lock/process-identity.d.ts +48 -0
- package/dist/lock/process-identity.js +180 -0
- package/dist/lock/process-identity.js.map +1 -0
- package/dist/lock/process-journal.d.ts +56 -0
- package/dist/lock/process-journal.js +113 -0
- package/dist/lock/process-journal.js.map +1 -0
- package/dist/models/capabilities.d.ts +73 -0
- package/dist/models/capabilities.js +123 -0
- package/dist/models/capabilities.js.map +1 -0
- package/dist/models/embed.d.ts +30 -0
- package/dist/models/embed.js +83 -0
- package/dist/models/embed.js.map +1 -0
- package/dist/models/gguf/classify.d.ts +29 -0
- package/dist/models/gguf/classify.js +89 -0
- package/dist/models/gguf/classify.js.map +1 -0
- package/dist/models/gguf/index.d.ts +5 -0
- package/dist/models/gguf/index.js +6 -0
- package/dist/models/gguf/index.js.map +1 -0
- package/dist/models/gguf/kv-cache.d.ts +27 -0
- package/dist/models/gguf/kv-cache.js +101 -0
- package/dist/models/gguf/kv-cache.js.map +1 -0
- package/dist/models/gguf/read-file.d.ts +11 -0
- package/dist/models/gguf/read-file.js +21 -0
- package/dist/models/gguf/read-file.js.map +1 -0
- package/dist/models/gguf/reader.d.ts +40 -0
- package/dist/models/gguf/reader.js +271 -0
- package/dist/models/gguf/reader.js.map +1 -0
- package/dist/models/gguf/support.d.ts +47 -0
- package/dist/models/gguf/support.js +48 -0
- package/dist/models/gguf/support.js.map +1 -0
- package/dist/models/hf.d.ts +35 -0
- package/dist/models/hf.js +140 -0
- package/dist/models/hf.js.map +1 -0
- package/dist/models/index.d.ts +14 -0
- package/dist/models/index.js +15 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/model-yml.d.ts +22 -0
- package/dist/models/model-yml.js +63 -0
- package/dist/models/model-yml.js.map +1 -0
- package/dist/models/registry.d.ts +51 -0
- package/dist/models/registry.js +102 -0
- package/dist/models/registry.js.map +1 -0
- package/dist/models/shards.d.ts +20 -0
- package/dist/models/shards.js +46 -0
- package/dist/models/shards.js.map +1 -0
- package/dist/remote-access/cloudflared-args.d.ts +41 -0
- package/dist/remote-access/cloudflared-args.js +59 -0
- package/dist/remote-access/cloudflared-args.js.map +1 -0
- package/dist/remote-access/cloudflared-output.d.ts +26 -0
- package/dist/remote-access/cloudflared-output.js +51 -0
- package/dist/remote-access/cloudflared-output.js.map +1 -0
- package/dist/remote-access/index.d.ts +16 -0
- package/dist/remote-access/index.js +17 -0
- package/dist/remote-access/index.js.map +1 -0
- package/dist/remote-access/journal.d.ts +63 -0
- package/dist/remote-access/journal.js +140 -0
- package/dist/remote-access/journal.js.map +1 -0
- package/dist/remote-access/lan-probe.d.ts +28 -0
- package/dist/remote-access/lan-probe.js +63 -0
- package/dist/remote-access/lan-probe.js.map +1 -0
- package/dist/remote-access/lan.d.ts +31 -0
- package/dist/remote-access/lan.js +90 -0
- package/dist/remote-access/lan.js.map +1 -0
- package/dist/remote-access/manager.d.ts +111 -0
- package/dist/remote-access/manager.js +316 -0
- package/dist/remote-access/manager.js.map +1 -0
- package/dist/remote-access/probe.d.ts +92 -0
- package/dist/remote-access/probe.js +186 -0
- package/dist/remote-access/probe.js.map +1 -0
- package/dist/remote-access/process.d.ts +66 -0
- package/dist/remote-access/process.js +160 -0
- package/dist/remote-access/process.js.map +1 -0
- package/dist/remote-access/spawner.d.ts +25 -0
- package/dist/remote-access/spawner.js +49 -0
- package/dist/remote-access/spawner.js.map +1 -0
- package/dist/remote-access/status.d.ts +39 -0
- package/dist/remote-access/status.js +49 -0
- package/dist/remote-access/status.js.map +1 -0
- package/dist/remote-access/wiring.d.ts +34 -0
- package/dist/remote-access/wiring.js +47 -0
- package/dist/remote-access/wiring.js.map +1 -0
- package/dist/router/index.d.ts +7 -0
- package/dist/router/index.js +8 -0
- package/dist/router/index.js.map +1 -0
- package/dist/router/resolve.d.ts +41 -0
- package/dist/router/resolve.js +53 -0
- package/dist/router/resolve.js.map +1 -0
- package/dist/runtime/foundation-models/errors.d.ts +28 -0
- package/dist/runtime/foundation-models/errors.js +48 -0
- package/dist/runtime/foundation-models/errors.js.map +1 -0
- package/dist/runtime/foundation-models/index.d.ts +8 -0
- package/dist/runtime/foundation-models/index.js +9 -0
- package/dist/runtime/foundation-models/index.js.map +1 -0
- package/dist/runtime/foundation-models/runtime.d.ts +73 -0
- package/dist/runtime/foundation-models/runtime.js +186 -0
- package/dist/runtime/foundation-models/runtime.js.map +1 -0
- package/dist/runtime/index.d.ts +5 -0
- package/dist/runtime/index.js +6 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/llamacpp/args.d.ts +90 -0
- package/dist/runtime/llamacpp/args.js +379 -0
- package/dist/runtime/llamacpp/args.js.map +1 -0
- package/dist/runtime/llamacpp/ctx-ladder.d.ts +16 -0
- package/dist/runtime/llamacpp/ctx-ladder.js +28 -0
- package/dist/runtime/llamacpp/ctx-ladder.js.map +1 -0
- package/dist/runtime/llamacpp/devices.d.ts +26 -0
- package/dist/runtime/llamacpp/devices.js +86 -0
- package/dist/runtime/llamacpp/devices.js.map +1 -0
- package/dist/runtime/llamacpp/errors.d.ts +34 -0
- package/dist/runtime/llamacpp/errors.js +137 -0
- package/dist/runtime/llamacpp/errors.js.map +1 -0
- package/dist/runtime/llamacpp/index.d.ts +14 -0
- package/dist/runtime/llamacpp/index.js +15 -0
- package/dist/runtime/llamacpp/index.js.map +1 -0
- package/dist/runtime/llamacpp/load-plan.d.ts +113 -0
- package/dist/runtime/llamacpp/load-plan.js +259 -0
- package/dist/runtime/llamacpp/load-plan.js.map +1 -0
- package/dist/runtime/llamacpp/policy.d.ts +70 -0
- package/dist/runtime/llamacpp/policy.js +191 -0
- package/dist/runtime/llamacpp/policy.js.map +1 -0
- package/dist/runtime/llamacpp/probe.d.ts +13 -0
- package/dist/runtime/llamacpp/probe.js +35 -0
- package/dist/runtime/llamacpp/probe.js.map +1 -0
- package/dist/runtime/llamacpp/runtime-device.d.ts +33 -0
- package/dist/runtime/llamacpp/runtime-device.js +169 -0
- package/dist/runtime/llamacpp/runtime-device.js.map +1 -0
- package/dist/runtime/llamacpp/runtime.d.ts +151 -0
- package/dist/runtime/llamacpp/runtime.js +535 -0
- package/dist/runtime/llamacpp/runtime.js.map +1 -0
- package/dist/runtime/mlx/args.d.ts +10 -0
- package/dist/runtime/mlx/args.js +44 -0
- package/dist/runtime/mlx/args.js.map +1 -0
- package/dist/runtime/mlx/config.d.ts +71 -0
- package/dist/runtime/mlx/config.js +91 -0
- package/dist/runtime/mlx/config.js.map +1 -0
- package/dist/runtime/mlx/errors.d.ts +21 -0
- package/dist/runtime/mlx/errors.js +73 -0
- package/dist/runtime/mlx/errors.js.map +1 -0
- package/dist/runtime/mlx/index.d.ts +12 -0
- package/dist/runtime/mlx/index.js +13 -0
- package/dist/runtime/mlx/index.js.map +1 -0
- package/dist/runtime/mlx/model-files.d.ts +29 -0
- package/dist/runtime/mlx/model-files.js +82 -0
- package/dist/runtime/mlx/model-files.js.map +1 -0
- package/dist/runtime/mlx/runtime.d.ts +77 -0
- package/dist/runtime/mlx/runtime.js +223 -0
- package/dist/runtime/mlx/runtime.js.map +1 -0
- package/dist/runtime/mlx/shard-repair.d.ts +25 -0
- package/dist/runtime/mlx/shard-repair.js +44 -0
- package/dist/runtime/mlx/shard-repair.js.map +1 -0
- package/dist/runtime/shared/env.d.ts +49 -0
- package/dist/runtime/shared/env.js +155 -0
- package/dist/runtime/shared/env.js.map +1 -0
- package/dist/runtime/shared/external-sessions.d.ts +67 -0
- package/dist/runtime/shared/external-sessions.js +155 -0
- package/dist/runtime/shared/external-sessions.js.map +1 -0
- package/dist/runtime/shared/index.d.ts +17 -0
- package/dist/runtime/shared/index.js +18 -0
- package/dist/runtime/shared/index.js.map +1 -0
- package/dist/runtime/shared/load-cancel.d.ts +45 -0
- package/dist/runtime/shared/load-cancel.js +95 -0
- package/dist/runtime/shared/load-cancel.js.map +1 -0
- package/dist/runtime/shared/local-runtime.d.ts +68 -0
- package/dist/runtime/shared/local-runtime.js +12 -0
- package/dist/runtime/shared/local-runtime.js.map +1 -0
- package/dist/runtime/shared/log-stream.d.ts +4 -0
- package/dist/runtime/shared/log-stream.js +28 -0
- package/dist/runtime/shared/log-stream.js.map +1 -0
- package/dist/runtime/shared/paths.d.ts +21 -0
- package/dist/runtime/shared/paths.js +63 -0
- package/dist/runtime/shared/paths.js.map +1 -0
- package/dist/runtime/shared/ports.d.ts +26 -0
- package/dist/runtime/shared/ports.js +45 -0
- package/dist/runtime/shared/ports.js.map +1 -0
- package/dist/runtime/shared/process.d.ts +95 -0
- package/dist/runtime/shared/process.js +224 -0
- package/dist/runtime/shared/process.js.map +1 -0
- package/dist/runtime/shared/sidecar.d.ts +86 -0
- package/dist/runtime/shared/sidecar.js +214 -0
- package/dist/runtime/shared/sidecar.js.map +1 -0
- package/dist/server/clients.d.ts +40 -0
- package/dist/server/clients.js +74 -0
- package/dist/server/clients.js.map +1 -0
- package/dist/server/control/index.d.ts +12 -0
- package/dist/server/control/index.js +12 -0
- package/dist/server/control/index.js.map +1 -0
- package/dist/server/control/router.d.ts +9 -0
- package/dist/server/control/router.js +61 -0
- package/dist/server/control/router.js.map +1 -0
- package/dist/server/control/routes/backends.d.ts +4 -0
- package/dist/server/control/routes/backends.js +47 -0
- package/dist/server/control/routes/backends.js.map +1 -0
- package/dist/server/control/routes/clients.d.ts +4 -0
- package/dist/server/control/routes/clients.js +30 -0
- package/dist/server/control/routes/clients.js.map +1 -0
- package/dist/server/control/routes/cloud.d.ts +4 -0
- package/dist/server/control/routes/cloud.js +32 -0
- package/dist/server/control/routes/cloud.js.map +1 -0
- package/dist/server/control/routes/diffusion-video.d.ts +10 -0
- package/dist/server/control/routes/diffusion-video.js +33 -0
- package/dist/server/control/routes/diffusion-video.js.map +1 -0
- package/dist/server/control/routes/diffusion.d.ts +15 -0
- package/dist/server/control/routes/diffusion.js +71 -0
- package/dist/server/control/routes/diffusion.js.map +1 -0
- package/dist/server/control/routes/disk.d.ts +4 -0
- package/dist/server/control/routes/disk.js +11 -0
- package/dist/server/control/routes/disk.js.map +1 -0
- package/dist/server/control/routes/external-sessions.d.ts +4 -0
- package/dist/server/control/routes/external-sessions.js +27 -0
- package/dist/server/control/routes/external-sessions.js.map +1 -0
- package/dist/server/control/routes/hardware.d.ts +4 -0
- package/dist/server/control/routes/hardware.js +14 -0
- package/dist/server/control/routes/hardware.js.map +1 -0
- package/dist/server/control/routes/lifecycle.d.ts +12 -0
- package/dist/server/control/routes/lifecycle.js +67 -0
- package/dist/server/control/routes/lifecycle.js.map +1 -0
- package/dist/server/control/routes/models.d.ts +7 -0
- package/dist/server/control/routes/models.js +59 -0
- package/dist/server/control/routes/models.js.map +1 -0
- package/dist/server/control/routes/public-server.d.ts +4 -0
- package/dist/server/control/routes/public-server.js +30 -0
- package/dist/server/control/routes/public-server.js.map +1 -0
- package/dist/server/control/routes/remote-access.d.ts +7 -0
- package/dist/server/control/routes/remote-access.js +16 -0
- package/dist/server/control/routes/remote-access.js.map +1 -0
- package/dist/server/control/routes/settings.d.ts +4 -0
- package/dist/server/control/routes/settings.js +58 -0
- package/dist/server/control/routes/settings.js.map +1 -0
- package/dist/server/control/routes/telemetry.d.ts +7 -0
- package/dist/server/control/routes/telemetry.js +46 -0
- package/dist/server/control/routes/telemetry.js.map +1 -0
- package/dist/server/control/server.d.ts +26 -0
- package/dist/server/control/server.js +111 -0
- package/dist/server/control/server.js.map +1 -0
- package/dist/server/control/types.d.ts +271 -0
- package/dist/server/control/types.js +6 -0
- package/dist/server/control/types.js.map +1 -0
- package/dist/server/http.d.ts +62 -0
- package/dist/server/http.js +220 -0
- package/dist/server/http.js.map +1 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +10 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/public/ctx.d.ts +23 -0
- package/dist/server/public/ctx.js +42 -0
- package/dist/server/public/ctx.js.map +1 -0
- package/dist/server/public/dynamic-hosts.d.ts +40 -0
- package/dist/server/public/dynamic-hosts.js +117 -0
- package/dist/server/public/dynamic-hosts.js.map +1 -0
- package/dist/server/public/errors.d.ts +36 -0
- package/dist/server/public/errors.js +120 -0
- package/dist/server/public/errors.js.map +1 -0
- package/dist/server/public/exchange.d.ts +42 -0
- package/dist/server/public/exchange.js +85 -0
- package/dist/server/public/exchange.js.map +1 -0
- package/dist/server/public/forward.d.ts +53 -0
- package/dist/server/public/forward.js +448 -0
- package/dist/server/public/forward.js.map +1 -0
- package/dist/server/public/gates.d.ts +49 -0
- package/dist/server/public/gates.js +181 -0
- package/dist/server/public/gates.js.map +1 -0
- package/dist/server/public/images-params.d.ts +50 -0
- package/dist/server/public/images-params.js +162 -0
- package/dist/server/public/images-params.js.map +1 -0
- package/dist/server/public/images.d.ts +12 -0
- package/dist/server/public/images.js +96 -0
- package/dist/server/public/images.js.map +1 -0
- package/dist/server/public/index.d.ts +58 -0
- package/dist/server/public/index.js +253 -0
- package/dist/server/public/index.js.map +1 -0
- package/dist/server/public/listing.d.ts +27 -0
- package/dist/server/public/listing.js +116 -0
- package/dist/server/public/listing.js.map +1 -0
- package/dist/server/public/responses.d.ts +11 -0
- package/dist/server/public/responses.js +158 -0
- package/dist/server/public/responses.js.map +1 -0
- package/dist/server/public/sse.d.ts +33 -0
- package/dist/server/public/sse.js +48 -0
- package/dist/server/public/sse.js.map +1 -0
- package/dist/server/public/static-assets.generated.d.ts +3 -0
- package/dist/server/public/static-assets.generated.js +6 -0
- package/dist/server/public/static-assets.generated.js.map +1 -0
- package/dist/server/public/static.d.ts +13 -0
- package/dist/server/public/static.js +75 -0
- package/dist/server/public/static.js.map +1 -0
- package/dist/server/public/subscription.d.ts +14 -0
- package/dist/server/public/subscription.js +56 -0
- package/dist/server/public/subscription.js.map +1 -0
- package/dist/server/public/telemetry.d.ts +65 -0
- package/dist/server/public/telemetry.js +284 -0
- package/dist/server/public/telemetry.js.map +1 -0
- package/dist/server/public/trace.d.ts +66 -0
- package/dist/server/public/trace.js +223 -0
- package/dist/server/public/trace.js.map +1 -0
- package/dist/server/public/types.d.ts +131 -0
- package/dist/server/public/types.js +9 -0
- package/dist/server/public/types.js.map +1 -0
- package/dist/server/public/videos-params.d.ts +95 -0
- package/dist/server/public/videos-params.js +220 -0
- package/dist/server/public/videos-params.js.map +1 -0
- package/dist/server/public/videos.d.ts +16 -0
- package/dist/server/public/videos.js +188 -0
- package/dist/server/public/videos.js.map +1 -0
- package/dist/server/public/wire.d.ts +53 -0
- package/dist/server/public/wire.js +174 -0
- package/dist/server/public/wire.js.map +1 -0
- package/dist/server/shims/anthropic.d.ts +52 -0
- package/dist/server/shims/anthropic.js +519 -0
- package/dist/server/shims/anthropic.js.map +1 -0
- package/dist/server/shims/chat-to-responses.d.ts +113 -0
- package/dist/server/shims/chat-to-responses.js +557 -0
- package/dist/server/shims/chat-to-responses.js.map +1 -0
- package/dist/server/shims/index.d.ts +8 -0
- package/dist/server/shims/index.js +9 -0
- package/dist/server/shims/index.js.map +1 -0
- package/dist/server/shims/json.d.ts +10 -0
- package/dist/server/shims/json.js +78 -0
- package/dist/server/shims/json.js.map +1 -0
- package/dist/server/shims/responses.d.ts +79 -0
- package/dist/server/shims/responses.js +543 -0
- package/dist/server/shims/responses.js.map +1 -0
- package/dist/server/state-file.d.ts +44 -0
- package/dist/server/state-file.js +107 -0
- package/dist/server/state-file.js.map +1 -0
- package/dist/settings/import.d.ts +61 -0
- package/dist/settings/import.js +104 -0
- package/dist/settings/import.js.map +1 -0
- package/dist/settings/index.d.ts +11 -0
- package/dist/settings/index.js +12 -0
- package/dist/settings/index.js.map +1 -0
- package/dist/settings/schema/foundation-models.json +1 -0
- package/dist/settings/schema/llamacpp-upstream.json +489 -0
- package/dist/settings/schema/llamacpp.json +475 -0
- package/dist/settings/schema/mlx.json +136 -0
- package/dist/settings/schema.d.ts +35 -0
- package/dist/settings/schema.js +196 -0
- package/dist/settings/schema.js.map +1 -0
- package/dist/settings/store.d.ts +168 -0
- package/dist/settings/store.js +350 -0
- package/dist/settings/store.js.map +1 -0
- package/dist/speculative/chat-template-overrides.d.ts +35 -0
- package/dist/speculative/chat-template-overrides.js +142 -0
- package/dist/speculative/chat-template-overrides.js.map +1 -0
- package/dist/speculative/dflash-registry.d.ts +50 -0
- package/dist/speculative/dflash-registry.js +258 -0
- package/dist/speculative/dflash-registry.js.map +1 -0
- package/dist/speculative/gemma-mtp-registry.d.ts +48 -0
- package/dist/speculative/gemma-mtp-registry.js +79 -0
- package/dist/speculative/gemma-mtp-registry.js.map +1 -0
- package/dist/speculative/index.d.ts +18 -0
- package/dist/speculative/index.js +19 -0
- package/dist/speculative/index.js.map +1 -0
- package/dist/speculative/mlx-dflash-registry.d.ts +39 -0
- package/dist/speculative/mlx-dflash-registry.js +230 -0
- package/dist/speculative/mlx-dflash-registry.js.map +1 -0
- package/dist/speculative/mlx-eagle3-registry.d.ts +24 -0
- package/dist/speculative/mlx-eagle3-registry.js +81 -0
- package/dist/speculative/mlx-eagle3-registry.js.map +1 -0
- package/dist/speculative/mlx-mtp-registry.d.ts +31 -0
- package/dist/speculative/mlx-mtp-registry.js +139 -0
- package/dist/speculative/mlx-mtp-registry.js.map +1 -0
- package/dist/speculative/transcription-registry.d.ts +72 -0
- package/dist/speculative/transcription-registry.js +94 -0
- package/dist/speculative/transcription-registry.js.map +1 -0
- package/dist/telemetry/config.d.ts +38 -0
- package/dist/telemetry/config.js +44 -0
- package/dist/telemetry/config.js.map +1 -0
- package/dist/telemetry/consent.d.ts +21 -0
- package/dist/telemetry/consent.js +35 -0
- package/dist/telemetry/consent.js.map +1 -0
- package/dist/telemetry/core-reporter.d.ts +47 -0
- package/dist/telemetry/core-reporter.js +72 -0
- package/dist/telemetry/core-reporter.js.map +1 -0
- package/dist/telemetry/daemon.d.ts +40 -0
- package/dist/telemetry/daemon.js +67 -0
- package/dist/telemetry/daemon.js.map +1 -0
- package/dist/telemetry/dsn.d.ts +15 -0
- package/dist/telemetry/dsn.js +32 -0
- package/dist/telemetry/dsn.js.map +1 -0
- package/dist/telemetry/envelope.d.ts +97 -0
- package/dist/telemetry/envelope.js +95 -0
- package/dist/telemetry/envelope.js.map +1 -0
- package/dist/telemetry/index.d.ts +18 -0
- package/dist/telemetry/index.js +19 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/policy.d.ts +39 -0
- package/dist/telemetry/policy.js +142 -0
- package/dist/telemetry/policy.js.map +1 -0
- package/dist/telemetry/reporter.d.ts +80 -0
- package/dist/telemetry/reporter.js +0 -0
- package/dist/telemetry/reporter.js.map +1 -0
- package/dist/telemetry/reports.d.ts +68 -0
- package/dist/telemetry/reports.js +212 -0
- package/dist/telemetry/reports.js.map +1 -0
- package/dist/telemetry/scrub.d.ts +19 -0
- package/dist/telemetry/scrub.js +75 -0
- package/dist/telemetry/scrub.js.map +1 -0
- package/dist/telemetry/stack.d.ts +21 -0
- package/dist/telemetry/stack.js +68 -0
- package/dist/telemetry/stack.js.map +1 -0
- package/dist/telemetry/store.d.ts +17 -0
- package/dist/telemetry/store.js +51 -0
- package/dist/telemetry/store.js.map +1 -0
- package/dist/telemetry/subscribe.d.ts +13 -0
- package/dist/telemetry/subscribe.js +19 -0
- package/dist/telemetry/subscribe.js.map +1 -0
- package/dist/telemetry/types.d.ts +40 -0
- package/dist/telemetry/types.js +2 -0
- package/dist/telemetry/types.js.map +1 -0
- package/dist/util/index.d.ts +5 -0
- package/dist/util/index.js +6 -0
- package/dist/util/index.js.map +1 -0
- package/dist/util/rust-number.d.ts +27 -0
- package/dist/util/rust-number.js +101 -0
- package/dist/util/rust-number.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/package.json +86 -0
- package/src/settings/schema/foundation-models.json +1 -0
- package/src/settings/schema/llamacpp-upstream.json +489 -0
- package/src/settings/schema/llamacpp.json +475 -0
- package/src/settings/schema/mlx.json +136 -0
|
@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C9D,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,IAAI,wBAAwB,CAAC,CAAA;AAC5E,CAAC;AAED,wGAAwG;AACxG,MAAM,UAAU,oBAAoB,CAClC,eAA0C,EAC1C,IAA6B;IAE7B,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAA;IAC3C,OAAO,kBAAkB,CAAC,eAAe,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAA;AACrF,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hardware feature gates and the supported-backend matrix. Port of the pure policy in
|
|
3
|
+
* `src-tauri/plugins/tauri-plugin-llamacpp-upstream/src/backend.rs` (`get_supported_features` with its
|
|
4
|
+
* compute-capability and Windows-ROCm gates, `determine_supported_backends`, `list_supported_backends`)
|
|
5
|
+
* and of the Windows family-aware filter in the extension's `listSupportedBackends` (`backend.ts`).
|
|
6
|
+
*
|
|
7
|
+
* Nothing here reads hardware, disk or network: the probe result (`GpuProbeInfo[]`, cpu extensions),
|
|
8
|
+
* the installed list and the remote catalog are parameters.
|
|
9
|
+
*/
|
|
10
|
+
import type { BackendFeatures, BackendVersion, GpuProbeInfo, SupportedFeatures } from '../types.js';
|
|
11
|
+
/**
|
|
12
|
+
* Minimum NVIDIA driver per CUDA tier (https://docs.nvidia.com/deploy/cuda-compatibility/).
|
|
13
|
+
* Windows floors follow the ggml-org native releases (CUDA 12.4 / 13.1; 13.1's documented minimum is
|
|
14
|
+
* 581.15 — `"581"` alone let 581.00–581.14 pre-release drivers through). Linux floors stay aligned
|
|
15
|
+
* with the TurboQuant plugin. Other OSes have no CUDA.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CUDA_DRIVER_FLOORS: {
|
|
18
|
+
readonly linux: {
|
|
19
|
+
readonly cuda11: "450.80.02";
|
|
20
|
+
readonly cuda12: "525.60.13";
|
|
21
|
+
readonly cuda13: "580";
|
|
22
|
+
};
|
|
23
|
+
readonly windows: {
|
|
24
|
+
readonly cuda11: "452.39";
|
|
25
|
+
readonly cuda12: "551.61";
|
|
26
|
+
readonly cuda13: "581.15";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Lowest compute capability a CUDA-13 build still carries kernels for: CUDA Toolkit 13.0 removed
|
|
31
|
+
* Maxwell (5.x), Pascal (6.x) and Volta (7.0), so Turing (7.5) is the floor. The driver gate cannot
|
|
32
|
+
* catch this on its own — R580 is the last branch still supporting those cards, so they report a
|
|
33
|
+
* driver above the 581.15 floor and previously sailed through to "no kernel image is available".
|
|
34
|
+
*/
|
|
35
|
+
export declare const MIN_CUDA13_COMPUTE_CAPABILITY: readonly [number, number];
|
|
36
|
+
/**
|
|
37
|
+
* NVML `"major.minor"` → `[major, minor]`; a missing minor is 0; unreadable input is `undefined`,
|
|
38
|
+
* which callers treat as "unknown — do not gate" (guessing "too old" would strand a Blackwell host).
|
|
39
|
+
*/
|
|
40
|
+
export declare function parseComputeCapability(raw: string): [number, number] | undefined;
|
|
41
|
+
/** Tuple comparison against the floor, so `10.0 ≥ 7.5` holds (a string compare gets Blackwell wrong). */
|
|
42
|
+
export declare function gpuMeetsCuda13ArchFloor(computeCapability: string | undefined): boolean;
|
|
43
|
+
export declare function isAmdGpu(gpu: GpuProbeInfo): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The Windows ROCm decision. The upstream archive statically carries HIP inside `ggml-hip.dll`, so
|
|
46
|
+
* an AMD driver is enough; what must be checked is the gfx architecture, and the PCI device id is the
|
|
47
|
+
* only pre-launch signal. Conservative: a card missing from the table falls back to Vulkan — 34.6 MB
|
|
48
|
+
* that works beats ~1 GB that may not — and the manual picker still offers ROCm.
|
|
49
|
+
*/
|
|
50
|
+
export declare function rocmSupportedWindows(hasAmdGpu: boolean, deviceIds: readonly number[]): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Which CPU/GPU tiers this host can run. The driver is system-wide, so *any* NVIDIA GPU over a floor
|
|
53
|
+
* enables that CUDA tier; architecture is per-card and must hold for *every* card (llama.cpp
|
|
54
|
+
* offloads across all visible devices), so one sub-7.5 GPU vetoes CUDA 13 for the whole host.
|
|
55
|
+
* Vulkan is on when any GPU carries `vulkan_info`; ROCm only on Windows via the PCI table. On any OS
|
|
56
|
+
* other than linux/windows only the CPU flags are set (no CUDA, no Vulkan — macOS has Metal).
|
|
57
|
+
*/
|
|
58
|
+
export declare function getSupportedFeatures(osType: string, cpuExtensions: readonly string[], gpus: readonly GpuProbeInfo[]): SupportedFeatures;
|
|
59
|
+
/** guest-js `normalizeFeatures`: missing flags read as `false`. */
|
|
60
|
+
export declare function normalizeFeatures(features: Partial<BackendFeatures> | null | undefined): BackendFeatures;
|
|
61
|
+
/**
|
|
62
|
+
* Backend ids installable on `<osType>-<arch>` given the detected features. Windows x64 always has
|
|
63
|
+
* CPU, then CUDA 12.4, the *family* ids `win-cuda-13-x64` / `win-rocm-x64` (concrete minors come
|
|
64
|
+
* from the manifest, ATO-105) and Vulkan. Linux x64: CPU, plus Vulkan — the CUDA and ROCm flags are
|
|
65
|
+
* ignored because ggml-org publishes no Linux CUDA/HIP archive (2026-05-28 ADR). arm64 Linux and
|
|
66
|
+
* Windows get a CPU placeholder; macOS its single arch build. Anything else is `INVALID_ARGUMENT`.
|
|
67
|
+
*/
|
|
68
|
+
export declare function determineSupportedBackends(osType: string, arch: string, features: BackendFeatures): string[];
|
|
69
|
+
/**
|
|
70
|
+
* Merge the remote catalog with the installed builds, keyed `"<version>|<backend>"`. A local entry
|
|
71
|
+
* replaces the remote one only when its `order` is greater (an installed build carries its mtime,
|
|
72
|
+
* a manifest entry 0). Sorted newest first by `compareBackendVersionsForSort`.
|
|
73
|
+
*/
|
|
74
|
+
export declare function listSupportedBackends(remote: readonly BackendVersion[], local: readonly BackendVersion[]): BackendVersion[];
|
|
75
|
+
/**
|
|
76
|
+
* The hardware gate on the merged catalog. Windows keeps only backends whose (normalised) id is in
|
|
77
|
+
* `supportedBackends`, matching concrete CUDA-13 and ROCm assets against their family ids so
|
|
78
|
+
* `win-cuda-13.4-x64` is accepted when `win-cuda-13-x64` is supported and flows downstream unchanged.
|
|
79
|
+
* Every other OS returns the list unfiltered (the manifest parser already applied the arch filter).
|
|
80
|
+
*/
|
|
81
|
+
export declare function filterBackendsBySupport(merged: readonly BackendVersion[], supportedBackends: readonly string[], osType: string): BackendVersion[];
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hardware feature gates and the supported-backend matrix. Port of the pure policy in
|
|
3
|
+
* `src-tauri/plugins/tauri-plugin-llamacpp-upstream/src/backend.rs` (`get_supported_features` with its
|
|
4
|
+
* compute-capability and Windows-ROCm gates, `determine_supported_backends`, `list_supported_backends`)
|
|
5
|
+
* and of the Windows family-aware filter in the extension's `listSupportedBackends` (`backend.ts`).
|
|
6
|
+
*
|
|
7
|
+
* Nothing here reads hardware, disk or network: the probe result (`GpuProbeInfo[]`, cpu extensions),
|
|
8
|
+
* the installed list and the remote catalog are parameters.
|
|
9
|
+
*/
|
|
10
|
+
import { AtomicCoreError } from '../../contracts/index.js';
|
|
11
|
+
import { isConcreteOfGpuFamily, mapOldBackendToNew, WIN_ROCM_FAMILY_ID } from '../catalog/index.js';
|
|
12
|
+
import { compareBackendVersionsForSort, compareVersions, parseRustU32, stripBom } from '../version.js';
|
|
13
|
+
import { isRocmSupportedPciId } from './amd-rocm-pci-ids.js';
|
|
14
|
+
// ---------------------------------------------------------------------------------------------
|
|
15
|
+
// Feature detection (get_supported_features)
|
|
16
|
+
// ---------------------------------------------------------------------------------------------
|
|
17
|
+
/**
|
|
18
|
+
* Minimum NVIDIA driver per CUDA tier (https://docs.nvidia.com/deploy/cuda-compatibility/).
|
|
19
|
+
* Windows floors follow the ggml-org native releases (CUDA 12.4 / 13.1; 13.1's documented minimum is
|
|
20
|
+
* 581.15 — `"581"` alone let 581.00–581.14 pre-release drivers through). Linux floors stay aligned
|
|
21
|
+
* with the TurboQuant plugin. Other OSes have no CUDA.
|
|
22
|
+
*/
|
|
23
|
+
export const CUDA_DRIVER_FLOORS = {
|
|
24
|
+
linux: { cuda11: '450.80.02', cuda12: '525.60.13', cuda13: '580' },
|
|
25
|
+
windows: { cuda11: '452.39', cuda12: '551.61', cuda13: '581.15' },
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Lowest compute capability a CUDA-13 build still carries kernels for: CUDA Toolkit 13.0 removed
|
|
29
|
+
* Maxwell (5.x), Pascal (6.x) and Volta (7.0), so Turing (7.5) is the floor. The driver gate cannot
|
|
30
|
+
* catch this on its own — R580 is the last branch still supporting those cards, so they report a
|
|
31
|
+
* driver above the 581.15 floor and previously sailed through to "no kernel image is available".
|
|
32
|
+
*/
|
|
33
|
+
export const MIN_CUDA13_COMPUTE_CAPABILITY = [7, 5];
|
|
34
|
+
/**
|
|
35
|
+
* NVML `"major.minor"` → `[major, minor]`; a missing minor is 0; unreadable input is `undefined`,
|
|
36
|
+
* which callers treat as "unknown — do not gate" (guessing "too old" would strand a Blackwell host).
|
|
37
|
+
*/
|
|
38
|
+
export function parseComputeCapability(raw) {
|
|
39
|
+
const parts = raw.trim().split('.');
|
|
40
|
+
const major = parseRustU32((parts[0] ?? '').trim());
|
|
41
|
+
if (major === undefined)
|
|
42
|
+
return undefined;
|
|
43
|
+
const minor = parseRustU32((parts[1] ?? '0').trim()) ?? 0;
|
|
44
|
+
return [major, minor];
|
|
45
|
+
}
|
|
46
|
+
/** Tuple comparison against the floor, so `10.0 ≥ 7.5` holds (a string compare gets Blackwell wrong). */
|
|
47
|
+
export function gpuMeetsCuda13ArchFloor(computeCapability) {
|
|
48
|
+
const cc = parseComputeCapability(computeCapability ?? '');
|
|
49
|
+
if (!cc)
|
|
50
|
+
return true;
|
|
51
|
+
const [floorMajor, floorMinor] = MIN_CUDA13_COMPUTE_CAPABILITY;
|
|
52
|
+
return cc[0] > floorMajor || (cc[0] === floorMajor && cc[1] >= floorMinor);
|
|
53
|
+
}
|
|
54
|
+
export function isAmdGpu(gpu) {
|
|
55
|
+
return typeof gpu.vendor === 'string' && gpu.vendor.toLowerCase() === 'amd';
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The Windows ROCm decision. The upstream archive statically carries HIP inside `ggml-hip.dll`, so
|
|
59
|
+
* an AMD driver is enough; what must be checked is the gfx architecture, and the PCI device id is the
|
|
60
|
+
* only pre-launch signal. Conservative: a card missing from the table falls back to Vulkan — 34.6 MB
|
|
61
|
+
* that works beats ~1 GB that may not — and the manual picker still offers ROCm.
|
|
62
|
+
*/
|
|
63
|
+
export function rocmSupportedWindows(hasAmdGpu, deviceIds) {
|
|
64
|
+
return hasAmdGpu && deviceIds.some((id) => isRocmSupportedPciId(id));
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Which CPU/GPU tiers this host can run. The driver is system-wide, so *any* NVIDIA GPU over a floor
|
|
68
|
+
* enables that CUDA tier; architecture is per-card and must hold for *every* card (llama.cpp
|
|
69
|
+
* offloads across all visible devices), so one sub-7.5 GPU vetoes CUDA 13 for the whole host.
|
|
70
|
+
* Vulkan is on when any GPU carries `vulkan_info`; ROCm only on Windows via the PCI table. On any OS
|
|
71
|
+
* other than linux/windows only the CPU flags are set (no CUDA, no Vulkan — macOS has Metal).
|
|
72
|
+
*/
|
|
73
|
+
export function getSupportedFeatures(osType, cpuExtensions, gpus) {
|
|
74
|
+
const features = {
|
|
75
|
+
avx: cpuExtensions.includes('avx'),
|
|
76
|
+
avx2: cpuExtensions.includes('avx2'),
|
|
77
|
+
avx512: cpuExtensions.includes('avx512'),
|
|
78
|
+
cuda11: false,
|
|
79
|
+
cuda12: false,
|
|
80
|
+
cuda13: false,
|
|
81
|
+
vulkan: false,
|
|
82
|
+
rocm: false,
|
|
83
|
+
};
|
|
84
|
+
const floors = osType === 'linux' || osType === 'windows' ? CUDA_DRIVER_FLOORS[osType] : undefined;
|
|
85
|
+
if (!floors)
|
|
86
|
+
return features;
|
|
87
|
+
const amdDeviceIds = [];
|
|
88
|
+
let hasAmdGpu = false;
|
|
89
|
+
let allNvidiaMeetCuda13Arch = true;
|
|
90
|
+
for (const gpu of gpus) {
|
|
91
|
+
const driver = gpu.driver_version ?? '';
|
|
92
|
+
if (isAmdGpu(gpu)) {
|
|
93
|
+
hasAmdGpu = true;
|
|
94
|
+
const deviceId = gpu.vulkan_info?.device_id;
|
|
95
|
+
if (typeof deviceId === 'number')
|
|
96
|
+
amdDeviceIds.push(deviceId);
|
|
97
|
+
}
|
|
98
|
+
const nvidia = gpu.nvidia_info;
|
|
99
|
+
if (nvidia) {
|
|
100
|
+
if (compareVersions(driver, floors.cuda11) >= 0)
|
|
101
|
+
features.cuda11 = true;
|
|
102
|
+
if (compareVersions(driver, floors.cuda12) >= 0)
|
|
103
|
+
features.cuda12 = true;
|
|
104
|
+
if (compareVersions(driver, floors.cuda13) >= 0)
|
|
105
|
+
features.cuda13 = true;
|
|
106
|
+
if (!gpuMeetsCuda13ArchFloor(nvidia.compute_capability))
|
|
107
|
+
allNvidiaMeetCuda13Arch = false;
|
|
108
|
+
}
|
|
109
|
+
if (gpu.vulkan_info)
|
|
110
|
+
features.vulkan = true;
|
|
111
|
+
}
|
|
112
|
+
features.cuda13 = features.cuda13 && allNvidiaMeetCuda13Arch;
|
|
113
|
+
if (osType === 'windows')
|
|
114
|
+
features.rocm = rocmSupportedWindows(hasAmdGpu, amdDeviceIds);
|
|
115
|
+
return features;
|
|
116
|
+
}
|
|
117
|
+
/** guest-js `normalizeFeatures`: missing flags read as `false`. */
|
|
118
|
+
export function normalizeFeatures(features) {
|
|
119
|
+
return {
|
|
120
|
+
cuda11: features?.cuda11 || false,
|
|
121
|
+
cuda12: features?.cuda12 || false,
|
|
122
|
+
cuda13: features?.cuda13 || false,
|
|
123
|
+
vulkan: features?.vulkan || false,
|
|
124
|
+
rocm: features?.rocm || false,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
// ---------------------------------------------------------------------------------------------
|
|
128
|
+
// Supported matrix (determine_supported_backends) and catalog merge (list_supported_backends)
|
|
129
|
+
// ---------------------------------------------------------------------------------------------
|
|
130
|
+
/**
|
|
131
|
+
* Backend ids installable on `<osType>-<arch>` given the detected features. Windows x64 always has
|
|
132
|
+
* CPU, then CUDA 12.4, the *family* ids `win-cuda-13-x64` / `win-rocm-x64` (concrete minors come
|
|
133
|
+
* from the manifest, ATO-105) and Vulkan. Linux x64: CPU, plus Vulkan — the CUDA and ROCm flags are
|
|
134
|
+
* ignored because ggml-org publishes no Linux CUDA/HIP archive (2026-05-28 ADR). arm64 Linux and
|
|
135
|
+
* Windows get a CPU placeholder; macOS its single arch build. Anything else is `INVALID_ARGUMENT`.
|
|
136
|
+
*/
|
|
137
|
+
export function determineSupportedBackends(osType, arch, features) {
|
|
138
|
+
const sysType = `${osType}-${arch}`;
|
|
139
|
+
const supported = [];
|
|
140
|
+
switch (sysType) {
|
|
141
|
+
case 'windows-x86_64':
|
|
142
|
+
supported.push('win-cpu-x64');
|
|
143
|
+
if (features.cuda12)
|
|
144
|
+
supported.push('win-cuda-12.4-x64');
|
|
145
|
+
if (features.cuda13)
|
|
146
|
+
supported.push('win-cuda-13-x64');
|
|
147
|
+
if (features.rocm)
|
|
148
|
+
supported.push(WIN_ROCM_FAMILY_ID);
|
|
149
|
+
if (features.vulkan)
|
|
150
|
+
supported.push('win-vulkan-x64');
|
|
151
|
+
break;
|
|
152
|
+
case 'windows-aarch64':
|
|
153
|
+
case 'windows-arm64':
|
|
154
|
+
supported.push('win-cpu-arm64');
|
|
155
|
+
break;
|
|
156
|
+
case 'linux-x86_64':
|
|
157
|
+
case 'linux-x86':
|
|
158
|
+
supported.push('linux-cpu-x64');
|
|
159
|
+
if (features.vulkan)
|
|
160
|
+
supported.push('linux-vulkan-x64');
|
|
161
|
+
break;
|
|
162
|
+
case 'linux-aarch64':
|
|
163
|
+
case 'linux-arm64':
|
|
164
|
+
supported.push('linux-cpu-arm64');
|
|
165
|
+
break;
|
|
166
|
+
case 'macos-x86_64':
|
|
167
|
+
case 'macos-x86':
|
|
168
|
+
supported.push('macos-x64');
|
|
169
|
+
break;
|
|
170
|
+
case 'macos-aarch64':
|
|
171
|
+
case 'macos-arm64':
|
|
172
|
+
supported.push('macos-arm64');
|
|
173
|
+
break;
|
|
174
|
+
default:
|
|
175
|
+
throw new AtomicCoreError('INVALID_ARGUMENT', `Unsupported system type: ${sysType}`);
|
|
176
|
+
}
|
|
177
|
+
return supported;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Merge the remote catalog with the installed builds, keyed `"<version>|<backend>"`. A local entry
|
|
181
|
+
* replaces the remote one only when its `order` is greater (an installed build carries its mtime,
|
|
182
|
+
* a manifest entry 0). Sorted newest first by `compareBackendVersionsForSort`.
|
|
183
|
+
*/
|
|
184
|
+
export function listSupportedBackends(remote, local) {
|
|
185
|
+
const merged = new Map();
|
|
186
|
+
for (const entry of remote)
|
|
187
|
+
merged.set(`${entry.version}|${entry.backend}`, { ...entry });
|
|
188
|
+
for (const entry of local) {
|
|
189
|
+
const key = `${entry.version}|${entry.backend}`;
|
|
190
|
+
const existing = merged.get(key);
|
|
191
|
+
if (!existing)
|
|
192
|
+
merged.set(key, { ...entry });
|
|
193
|
+
else if ((entry.order ?? 0) > (existing.order ?? 0))
|
|
194
|
+
merged.set(key, { ...entry });
|
|
195
|
+
}
|
|
196
|
+
return [...merged.values()].sort(compareBackendVersionsForSort);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* The hardware gate on the merged catalog. Windows keeps only backends whose (normalised) id is in
|
|
200
|
+
* `supportedBackends`, matching concrete CUDA-13 and ROCm assets against their family ids so
|
|
201
|
+
* `win-cuda-13.4-x64` is accepted when `win-cuda-13-x64` is supported and flows downstream unchanged.
|
|
202
|
+
* Every other OS returns the list unfiltered (the manifest parser already applied the arch filter).
|
|
203
|
+
*/
|
|
204
|
+
export function filterBackendsBySupport(merged, supportedBackends, osType) {
|
|
205
|
+
if (osType !== 'windows')
|
|
206
|
+
return [...merged];
|
|
207
|
+
const supportedSet = new Set(supportedBackends);
|
|
208
|
+
const cuda13Concrete = /^win-cuda-13\.\d+-(x64|arm64)$/;
|
|
209
|
+
const isSupported = (rawBackend, normalized) => {
|
|
210
|
+
if (supportedSet.has(normalized))
|
|
211
|
+
return true;
|
|
212
|
+
const m = cuda13Concrete.exec(rawBackend);
|
|
213
|
+
if (m)
|
|
214
|
+
return supportedSet.has(`win-cuda-13-${m[1]}`);
|
|
215
|
+
if (isConcreteOfGpuFamily(WIN_ROCM_FAMILY_ID, rawBackend))
|
|
216
|
+
return supportedSet.has(WIN_ROCM_FAMILY_ID);
|
|
217
|
+
return false;
|
|
218
|
+
};
|
|
219
|
+
return merged.filter((b) => isSupported(stripBom(b.backend), mapOldBackendToNew(b.backend)));
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=features.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features.js","sourceRoot":"","sources":["../../../src/backend/select/features.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAEnG,OAAO,EAAE,6BAA6B,EAAE,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAE5D,gGAAgG;AAChG,6CAA6C;AAC7C,gGAAgG;AAEhG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,KAAK,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE;I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AAA;IAC/C,MAAM,cAAc,GAAG,gCAAgC,CAAA;IACvD,MAAM,WAAW,GAAG,CAAC,UAAkB,EAAE,UAAkB,EAAW,EAAE;QACtE,IAAI,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC;YAAE,OAAO,IAAI,CAAA;QAC7C,MAAM,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACzC,IAAI,CAAC;YAAE,OAAO,YAAY,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;QACrD,IAAI,qBAAqB,CAAC,kBAAkB,EAAE,UAAU,CAAC;YAAE,OAAO,YAAY,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;QACtG,OAAO,KAAK,CAAA;IACd,CAAC,CAAA;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AAC9F,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hardware-gated backend selection: feature gates and the supported matrix, categories and
|
|
3
|
+
* priority, GPU tier probing, and the persisted `version_backend` startup recovery.
|
|
4
|
+
*/
|
|
5
|
+
export * from './amd-rocm-pci-ids.js';
|
|
6
|
+
export * from './features.js';
|
|
7
|
+
export * from './categories.js';
|
|
8
|
+
export * from './tiers.js';
|
|
9
|
+
export * from './recovery.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hardware-gated backend selection: feature gates and the supported matrix, categories and
|
|
3
|
+
* priority, GPU tier probing, and the persisted `version_backend` startup recovery.
|
|
4
|
+
*/
|
|
5
|
+
export * from './amd-rocm-pci-ids.js';
|
|
6
|
+
export * from './features.js';
|
|
7
|
+
export * from './categories.js';
|
|
8
|
+
export * from './tiers.js';
|
|
9
|
+
export * from './recovery.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/backend/select/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `configureBackends` startup recovery in `extensions/llamacpp-upstream-extension/src/index.ts`:
|
|
3
|
+
* persisted `version_backend` recovery and the bundled-build / same-type upgrade decisions,
|
|
4
|
+
* extracted from the settings/UI plumbing.
|
|
5
|
+
*
|
|
6
|
+
* Nothing here reads hardware, disk or network: the persisted values, the installed list, the
|
|
7
|
+
* probe result and the catalog are parameters.
|
|
8
|
+
*/
|
|
9
|
+
import type { BackendOption, BackendVersion, GpuProbeInfo } from '../types.js';
|
|
10
|
+
/** Persisted `version_backend` is unusable: empty, `none`, or not `<version>/<backend>`. */
|
|
11
|
+
export declare function isPersistedVersionBackendMissing(versionBackend: string | undefined | null): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* When the persisted `version_backend` was lost (wiped WebView storage, factory reset) but builds
|
|
14
|
+
* are still on disk, pick the best installed one so the user's GPU backend survives the restart
|
|
15
|
+
* instead of silently re-pinning the bundled CPU build. `null` when nothing usable is installed.
|
|
16
|
+
*/
|
|
17
|
+
export declare function recoverVersionBackendFromDisk(installed: readonly BackendVersion[], gpus: readonly GpuProbeInfo[]): string | null;
|
|
18
|
+
/**
|
|
19
|
+
* Apply the bundled build over the persisted value when that value is still not a concrete
|
|
20
|
+
* `<tag>/<backend>` after recovery — including the unresolved `latest/<backend>` sentinel, which
|
|
21
|
+
* an `includes('/')` check let through and left pinned in a retry loop (ATO-124).
|
|
22
|
+
*/
|
|
23
|
+
export declare function shouldApplyBundledBackend(versionBackendAfterRecovery: string | undefined | null): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Backend ids behind the static "Latest <variant>" dropdown entries, unfiltered by hardware on
|
|
26
|
+
* purpose (a manual override). Windows offers the minor-less CUDA / ROCm family ids; Linux CPU and
|
|
27
|
+
* Vulkan; macOS only `macos-arm64`, and only when the bundled (or current) build is that arch — an
|
|
28
|
+
* Intel host gets no sentinel because `latest/macos-x64` resolves to nothing.
|
|
29
|
+
*/
|
|
30
|
+
export declare function staticLatestVariants(osType: string, macHostVersionBackend?: string | null): string[];
|
|
31
|
+
/** `latest/<backend>` sentinels with their "Latest <label>" names. */
|
|
32
|
+
export declare function latestBackendOptions(variants: readonly string[]): BackendOption[];
|
|
33
|
+
/**
|
|
34
|
+
* Force-switch to the bundled build only when it is a *newer* release tag of the *same* type
|
|
35
|
+
* (app update bumped the engine). Comparing, not assuming: the bundled build is reported on every
|
|
36
|
+
* launch, so "the strings differ" would drag a runtime-updated user back to the installer's tag.
|
|
37
|
+
*/
|
|
38
|
+
export declare function isBundledNewerSameType(bundled: string | undefined | null, effective: string | undefined | null): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The auto-upgrade candidate: `best` when it differs from `effective` and is of the same backend
|
|
41
|
+
* type, else `null`. The caller must still check the candidate is installed on disk before
|
|
42
|
+
* switching — pointing config at a build that is not downloaded yet is exactly the CUDA→CPU
|
|
43
|
+
* regression this guards against.
|
|
44
|
+
*/
|
|
45
|
+
export declare function sameTypeUpgradeCandidate(effective: string | undefined | null, best: string | undefined | null): string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Fresh install or a saved backend that is genuinely gone: empty / `none` / malformed, or absent
|
|
48
|
+
* from the catalog *and* not installed. Absent-but-installed is kept (the catalog comes partly from
|
|
49
|
+
* a remote fetch that can fail or truncate; resetting on that alone regressed CUDA→CPU on restart).
|
|
50
|
+
*/
|
|
51
|
+
export declare function savedBackendVanished(effective: string | undefined | null, versionBackends: readonly BackendVersion[], savedVbIsInstalled: boolean): boolean;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `configureBackends` startup recovery in `extensions/llamacpp-upstream-extension/src/index.ts`:
|
|
3
|
+
* persisted `version_backend` recovery and the bundled-build / same-type upgrade decisions,
|
|
4
|
+
* extracted from the settings/UI plumbing.
|
|
5
|
+
*
|
|
6
|
+
* Nothing here reads hardware, disk or network: the persisted values, the installed list, the
|
|
7
|
+
* probe result and the catalog are parameters.
|
|
8
|
+
*/
|
|
9
|
+
import { friendlyBackendLabel, WIN_ROCM_FAMILY_ID } from '../catalog/index.js';
|
|
10
|
+
import { isConcreteVersionBackend, parseBuildNumber, stripBom } from '../version.js';
|
|
11
|
+
import { determineBestBackend } from './categories.js';
|
|
12
|
+
// ---------------------------------------------------------------------------------------------
|
|
13
|
+
// configureBackends startup decisions (index.ts:1070-1660), extracted from the settings/UI plumbing
|
|
14
|
+
// ---------------------------------------------------------------------------------------------
|
|
15
|
+
/** Persisted `version_backend` is unusable: empty, `none`, or not `<version>/<backend>`. */
|
|
16
|
+
export function isPersistedVersionBackendMissing(versionBackend) {
|
|
17
|
+
const vb = versionBackend || '';
|
|
18
|
+
return !vb || vb === 'none' || !vb.includes('/');
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* When the persisted `version_backend` was lost (wiped WebView storage, factory reset) but builds
|
|
22
|
+
* are still on disk, pick the best installed one so the user's GPU backend survives the restart
|
|
23
|
+
* instead of silently re-pinning the bundled CPU build. `null` when nothing usable is installed.
|
|
24
|
+
*/
|
|
25
|
+
export function recoverVersionBackendFromDisk(installed, gpus) {
|
|
26
|
+
if (installed.length === 0)
|
|
27
|
+
return null;
|
|
28
|
+
const recovered = determineBestBackend(installed, gpus);
|
|
29
|
+
return recovered.includes('/') ? recovered : null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Apply the bundled build over the persisted value when that value is still not a concrete
|
|
33
|
+
* `<tag>/<backend>` after recovery — including the unresolved `latest/<backend>` sentinel, which
|
|
34
|
+
* an `includes('/')` check let through and left pinned in a retry loop (ATO-124).
|
|
35
|
+
*/
|
|
36
|
+
export function shouldApplyBundledBackend(versionBackendAfterRecovery) {
|
|
37
|
+
return !isConcreteVersionBackend(versionBackendAfterRecovery ?? '');
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Backend ids behind the static "Latest <variant>" dropdown entries, unfiltered by hardware on
|
|
41
|
+
* purpose (a manual override). Windows offers the minor-less CUDA / ROCm family ids; Linux CPU and
|
|
42
|
+
* Vulkan; macOS only `macos-arm64`, and only when the bundled (or current) build is that arch — an
|
|
43
|
+
* Intel host gets no sentinel because `latest/macos-x64` resolves to nothing.
|
|
44
|
+
*/
|
|
45
|
+
export function staticLatestVariants(osType, macHostVersionBackend) {
|
|
46
|
+
if (osType === 'windows')
|
|
47
|
+
return ['win-cpu-x64', 'win-cuda-12-x64', 'win-cuda-13-x64', WIN_ROCM_FAMILY_ID, 'win-vulkan-x64'];
|
|
48
|
+
if (osType === 'linux')
|
|
49
|
+
return ['linux-cpu-x64', 'linux-vulkan-x64'];
|
|
50
|
+
if (osType === 'macos') {
|
|
51
|
+
const variant = stripBom(macHostVersionBackend ?? '')
|
|
52
|
+
.split('/')[1]
|
|
53
|
+
?.trim();
|
|
54
|
+
return variant === 'macos-arm64' ? [variant] : [];
|
|
55
|
+
}
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
/** `latest/<backend>` sentinels with their "Latest <label>" names. */
|
|
59
|
+
export function latestBackendOptions(variants) {
|
|
60
|
+
return variants.map((backend) => ({
|
|
61
|
+
value: `latest/${backend}`,
|
|
62
|
+
name: `Latest ${friendlyBackendLabel(backend)}`,
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Force-switch to the bundled build only when it is a *newer* release tag of the *same* type
|
|
67
|
+
* (app update bumped the engine). Comparing, not assuming: the bundled build is reported on every
|
|
68
|
+
* launch, so "the strings differ" would drag a runtime-updated user back to the installer's tag.
|
|
69
|
+
*/
|
|
70
|
+
export function isBundledNewerSameType(bundled, effective) {
|
|
71
|
+
if (!bundled || !effective || !effective.includes('/'))
|
|
72
|
+
return false;
|
|
73
|
+
const [bundledVersion, bundledType] = bundled.split('/');
|
|
74
|
+
const [currentVersion, currentType] = effective.split('/');
|
|
75
|
+
const bundledBuild = parseBuildNumber(stripBom(bundledVersion ?? ''));
|
|
76
|
+
const currentBuild = parseBuildNumber(stripBom(currentVersion ?? ''));
|
|
77
|
+
return (effective !== bundled &&
|
|
78
|
+
bundledType === currentType &&
|
|
79
|
+
bundledBuild !== null &&
|
|
80
|
+
currentBuild !== null &&
|
|
81
|
+
bundledBuild > currentBuild);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The auto-upgrade candidate: `best` when it differs from `effective` and is of the same backend
|
|
85
|
+
* type, else `null`. The caller must still check the candidate is installed on disk before
|
|
86
|
+
* switching — pointing config at a build that is not downloaded yet is exactly the CUDA→CPU
|
|
87
|
+
* regression this guards against.
|
|
88
|
+
*/
|
|
89
|
+
export function sameTypeUpgradeCandidate(effective, best) {
|
|
90
|
+
if (!effective || !best || effective === best || !effective.includes('/'))
|
|
91
|
+
return null;
|
|
92
|
+
const currentType = effective.split('/')[1]?.trim();
|
|
93
|
+
const bestType = best.split('/')[1]?.trim();
|
|
94
|
+
if (!currentType || !bestType || currentType !== bestType)
|
|
95
|
+
return null;
|
|
96
|
+
return best;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Fresh install or a saved backend that is genuinely gone: empty / `none` / malformed, or absent
|
|
100
|
+
* from the catalog *and* not installed. Absent-but-installed is kept (the catalog comes partly from
|
|
101
|
+
* a remote fetch that can fail or truncate; resetting on that alone regressed CUDA→CPU on restart).
|
|
102
|
+
*/
|
|
103
|
+
export function savedBackendVanished(effective, versionBackends, savedVbIsInstalled) {
|
|
104
|
+
const vb = effective || '';
|
|
105
|
+
const savedNotInList = !!vb && vb.includes('/') && !versionBackends.some((e) => `${e.version}/${e.backend}` === vb);
|
|
106
|
+
return !vb || vb === 'none' || !vb.includes('/') || (savedNotInList && !savedVbIsInstalled);
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=recovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recovery.js","sourceRoot":"","sources":["../../../src/backend/select/recovery.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAE9E,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAEtD,gGAAgG;AAChG,oGAAoG;AACpG,gGAAgG;AAEhG,4FAA4F;AAC5F,MAAM,UAAU,gCAAgC,CAAC,cAAyC;IACxF,MAAM,EAAE,GAAG,cAAc,IAAI,EAAE,CAAA;IAC/B,OAAO,CAAC,EAAE,IAAI,EAAE,KAAK,MAAM,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AAClD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAC3C,SAAoC,EACpC,IAA6B;IAE7B,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACvC,MAAM,SAAS,GAAG,oBAAoB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;IACvD,OAAO,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAA;AACnD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,2BAAsD;IAC9F,OAAO,CAAC,wBAAwB,CAAC,2BAA2B,IAAI,EAAE,CAAC,CAAA;AACrE,CAAC;AAED;;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C,EAAE,IAAI,EAAE,KAAK,MAAM,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,kBAAkB,CAAC,CAAA;AAC7F,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU tier probing and ideal-backend detection. Port of the decision halves of
|
|
3
|
+
* `detectIdealBackendType`, `tierEnumeratesDevices` and `hasCorroboratingGpu` in
|
|
4
|
+
* `extensions/llamacpp-upstream-extension/src/index.ts`.
|
|
5
|
+
*
|
|
6
|
+
* Nothing here reads hardware, disk or network: the probe result (`GpuProbeInfo[]`, cpu extensions)
|
|
7
|
+
* and the catalog are parameters; `--list-devices` is an injected function.
|
|
8
|
+
*/
|
|
9
|
+
import type { DeviceInfo } from '../../contracts/index.js';
|
|
10
|
+
import type { ArchSuffix, BackendFeatures, BackendVersion, GpuProbeInfo, IdealBackendResult, TierHealth, TierProbeDeps } from '../types.js';
|
|
11
|
+
export declare function hasDiscreteGpu(gpus: readonly GpuProbeInfo[]): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Integrated-only hosts (Intel UHD / AMD Vega iGPU on shared RAM) report plenty of "VRAM" yet run
|
|
14
|
+
* Vulkan far slower than the CPU build, so Vulkan is never the *optimal* pick for them.
|
|
15
|
+
*/
|
|
16
|
+
export declare function integratedGpuOnly(gpus: readonly GpuProbeInfo[]): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the hardware probe corroborates that `backendType` could use a GPU here: CUDA needs an
|
|
19
|
+
* NVIDIA GPU, Vulkan any GPU, anything else (CPU) is trivially corroborated so the picker can fall
|
|
20
|
+
* through. Vendor strings as `tauri-plugin-hardware/src/types.rs` serialises them.
|
|
21
|
+
*/
|
|
22
|
+
export declare function hasCorroboratingGpu(backendType: string, gpus: readonly GpuProbeInfo[]): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The decision inside `tierEnumeratesDevices`: not installed → `unverified` (nothing to probe);
|
|
25
|
+
* devices listed → `works`; nothing listed but the probe corroborates a matching GPU → `unverified`
|
|
26
|
+
* (`--list-devices` is known to come back empty on hosts whose inference path uses CUDA fine, ADR
|
|
27
|
+
* 2026-05-26); nothing listed and no corroboration → `broken`, degrade to the next tier.
|
|
28
|
+
*/
|
|
29
|
+
export declare function classifyTierProbe(input: {
|
|
30
|
+
installed: boolean;
|
|
31
|
+
devices: readonly DeviceInfo[] | null;
|
|
32
|
+
corroborated: boolean;
|
|
33
|
+
}): TierHealth;
|
|
34
|
+
/**
|
|
35
|
+
* Non-destructive runtime probe of one GPU tier: find the installed build of that type, run
|
|
36
|
+
* `--list-devices` through `deps.listDevices`, and classify. A throwing `listInstalled` is
|
|
37
|
+
* `unverified`; a throwing probe counts as "no devices". `onLog` receives the app's log lines.
|
|
38
|
+
*/
|
|
39
|
+
export declare function tierEnumeratesDevices(backendType: string, gpus: readonly GpuProbeInfo[], deps: TierProbeDeps, onLog?: (message: string) => void): Promise<TierHealth>;
|
|
40
|
+
/** First tier (top-down) whose probe is not `broken`, or `null`. */
|
|
41
|
+
export declare function pickFirstWorkingTier(tiers: readonly string[], probe: (tier: string) => Promise<TierHealth>): Promise<string | null>;
|
|
42
|
+
/**
|
|
43
|
+
* App regex for "any GPU backend in the catalog", kept verbatim. Note the `-` required right after
|
|
44
|
+
* the first digit: `win-cuda-13.3-x64` and `win-rocm-10.0-x64` do NOT match, only Vulkan ids do.
|
|
45
|
+
* It still works because ggml-org always publishes a Vulkan Windows asset next to CUDA.
|
|
46
|
+
*/
|
|
47
|
+
export declare function isGpuBackendId(backend: string): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Windows GPU tiers in preference order: CUDA 13, CUDA 12, ROCm (VRAM-gated; `features.rocm` is
|
|
50
|
+
* already PCI-gated), Vulkan (VRAM-gated, never on integrated-only hosts). Each tier is the first
|
|
51
|
+
* catalog entry matching its pattern — the catalog is sorted newest first, so that is the newest tag.
|
|
52
|
+
*/
|
|
53
|
+
export declare function windowsGpuTiers(features: BackendFeatures, available: readonly BackendVersion[], archSuffix: ArchSuffix, gpus: readonly GpuProbeInfo[]): string[];
|
|
54
|
+
export interface DetectIdealBackendInput {
|
|
55
|
+
osType: string;
|
|
56
|
+
arch: string;
|
|
57
|
+
cpuExtensions: readonly string[];
|
|
58
|
+
gpus: readonly GpuProbeInfo[];
|
|
59
|
+
/** Windows only: the hardware-gated catalog (`listSupportedBackends` + `filterBackendsBySupport`). */
|
|
60
|
+
listAvailableBackends: () => Promise<BackendVersion[]>;
|
|
61
|
+
/** Windows only: `tierEnumeratesDevices` bound to this host. */
|
|
62
|
+
probeTier: (tier: string) => Promise<TierHealth>;
|
|
63
|
+
onWarn?: (message: string) => void;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Which backend this host should ideally run. Windows: the first GPU tier that survives the probe;
|
|
67
|
+
* a GPU-capable host with no GPU backend in the catalog is `detection-failed` (the manifest was
|
|
68
|
+
* unreachable — ggml-org always publishes CUDA + Vulkan Windows assets), otherwise `cpu-optimal`.
|
|
69
|
+
* Linux x64: Vulkan when the loader enumerates a device with ≥ 2 GiB; a GPU the loader cannot see
|
|
70
|
+
* is `detection-failed` (ask again next launch, ATO-464); no accelerator is `cpu-optimal`. macOS and
|
|
71
|
+
* everything else: `cpu-optimal`. Any thrown error is `detection-failed`.
|
|
72
|
+
*
|
|
73
|
+
* The caller wraps this in its 20 s `withTimeout` (timeout → `detection-failed`) and, on Windows,
|
|
74
|
+
* supplies `listAvailableBackends` / `probeTier`.
|
|
75
|
+
*/
|
|
76
|
+
export declare function detectIdealBackendType(input: DetectIdealBackendInput): Promise<IdealBackendResult>;
|