dsh-plugin-local-infer 0.1.2 → 0.1.3
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 +10 -2
- package/docs/zh/README.md +10 -2
- package/dsh/client.js +669 -191
- package/package.json +6 -1
- package/packages/core/lib/adapter.d.ts +44 -2
- package/packages/core/lib/deps.d.ts +4 -3
- package/packages/core/lib/index.d.ts +1 -1
- package/packages/core/lib/registrar.d.ts +5 -5
- package/packages/core/lib/registrar.js +3 -3
- package/packages/core/package.json +1 -1
- package/packages/providers/lib/acquire.d.ts +5 -3
- package/packages/providers/lib/acquire.js +30 -9
- package/packages/providers/lib/adapters.d.ts +19 -209
- package/packages/providers/lib/adapters.js +13 -886
- package/packages/providers/lib/deps.d.ts +24 -2
- package/packages/providers/lib/deps.js +23 -4
- package/packages/providers/lib/engines/hyperqwenAdapter.d.ts +38 -0
- package/packages/providers/lib/engines/hyperqwenAdapter.js +105 -0
- package/packages/providers/lib/{infernix.js → engines/infernix.js} +1 -1
- package/packages/providers/lib/engines/infernixAdapter.d.ts +53 -0
- package/packages/providers/lib/engines/infernixAdapter.js +202 -0
- package/packages/providers/lib/engines/llamacppAdapter.d.ts +51 -0
- package/packages/providers/lib/engines/llamacppAdapter.js +232 -0
- package/packages/providers/lib/{ninfer.js → engines/ninfer.js} +1 -1
- package/packages/providers/lib/engines/ninferAdapter.d.ts +82 -0
- package/packages/providers/lib/engines/ninferAdapter.js +324 -0
- package/packages/providers/lib/engines/strata.d.ts +53 -0
- package/packages/providers/lib/engines/strata.js +197 -0
- package/packages/providers/lib/engines/strataAdapter.d.ts +98 -0
- package/packages/providers/lib/engines/strataAdapter.js +427 -0
- package/packages/providers/lib/engines.d.ts +5 -4
- package/packages/providers/lib/engines.js +10 -10
- package/packages/providers/lib/guidelines.js +1 -1
- package/packages/providers/lib/index.d.ts +14 -9
- package/packages/providers/lib/index.js +17 -7
- package/packages/providers/lib/model-defaults.d.ts +5 -4
- package/packages/providers/lib/model-defaults.js +22 -4
- package/packages/providers/lib/platform.js +7 -1
- package/packages/providers/package.json +1 -1
- package/packages/service/lib/index.d.ts +13 -4
- package/packages/service/lib/index.js +79 -5
- package/packages/service/lib/types.d.ts +5 -4
- package/packages/service/package.json +1 -1
- package/packages/tool/package.json +1 -1
- package/packages/ui/lib/config.d.ts +79 -0
- package/packages/ui/lib/config.js +235 -0
- package/packages/ui/lib/deps.d.ts +3 -3
- package/packages/ui/lib/ops/engine.d.ts +108 -0
- package/packages/ui/lib/ops/engine.js +493 -0
- package/packages/ui/lib/ops/hf.d.ts +27 -0
- package/packages/ui/lib/ops/hf.js +60 -0
- package/packages/ui/lib/ops/logs.d.ts +23 -0
- package/packages/ui/lib/ops/logs.js +58 -0
- package/packages/ui/lib/ops/model.d.ts +79 -0
- package/packages/ui/lib/ops/model.js +130 -0
- package/packages/ui/lib/request.d.ts +106 -0
- package/packages/ui/lib/request.js +80 -0
- package/packages/ui/lib/route.d.ts +88 -420
- package/packages/ui/lib/route.js +111 -1843
- package/packages/ui/lib/routes/chat-template.d.ts +14 -0
- package/packages/ui/lib/routes/chat-template.js +37 -0
- package/packages/ui/lib/routes/deps.d.ts +16 -0
- package/packages/ui/lib/routes/deps.js +27 -0
- package/packages/ui/lib/routes/download.d.ts +16 -0
- package/packages/ui/lib/routes/download.js +48 -0
- package/packages/ui/lib/routes/get.d.ts +18 -0
- package/packages/ui/lib/routes/get.js +57 -0
- package/packages/ui/lib/routes/install.d.ts +16 -0
- package/packages/ui/lib/routes/install.js +36 -0
- package/packages/ui/lib/routes/launch.d.ts +18 -0
- package/packages/ui/lib/routes/launch.js +50 -0
- package/packages/ui/lib/routes/provider-delete.d.ts +15 -0
- package/packages/ui/lib/routes/provider-delete.js +37 -0
- package/packages/ui/lib/routes/register.d.ts +16 -0
- package/packages/ui/lib/routes/register.js +28 -0
- package/packages/ui/lib/routes/save.d.ts +18 -0
- package/packages/ui/lib/routes/save.js +139 -0
- package/packages/ui/lib/routes/stop.d.ts +16 -0
- package/packages/ui/lib/routes/stop.js +29 -0
- package/packages/ui/lib/routes/summary.d.ts +15 -0
- package/packages/ui/lib/routes/summary.js +26 -0
- package/packages/ui/lib/routes/unregister.d.ts +14 -0
- package/packages/ui/lib/routes/unregister.js +26 -0
- package/packages/ui/lib/viewmodels/deps.d.ts +31 -0
- package/packages/ui/lib/viewmodels/deps.js +89 -0
- package/packages/ui/lib/viewmodels/depsHelpers.d.ts +28 -0
- package/packages/ui/lib/viewmodels/depsHelpers.js +33 -0
- package/packages/ui/lib/viewmodels/summary.d.ts +140 -0
- package/packages/ui/lib/viewmodels/summary.js +225 -0
- package/packages/ui/lib/viewmodels/summaryHelpers.d.ts +30 -0
- package/packages/ui/lib/viewmodels/summaryHelpers.js +42 -0
- package/packages/ui/package.json +1 -1
- package/packages/providers/lib/strata.d.ts +0 -15
- package/packages/providers/lib/strata.js +0 -14
- /package/packages/providers/lib/{hyperqwen.d.ts → engines/hyperqwen.d.ts} +0 -0
- /package/packages/providers/lib/{hyperqwen.js → engines/hyperqwen.js} +0 -0
- /package/packages/providers/lib/{infernix.d.ts → engines/infernix.d.ts} +0 -0
- /package/packages/providers/lib/{llamacpp.d.ts → engines/llamacpp.d.ts} +0 -0
- /package/packages/providers/lib/{llamacpp.js → engines/llamacpp.js} +0 -0
- /package/packages/providers/lib/{ninfer.d.ts → engines/ninfer.d.ts} +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The small pure helpers the summary view model prices: the HF repo
|
|
3
|
+
* reference check the chat-template status runs, the template display label,
|
|
4
|
+
* and the model-value-to-registry-key map the estimator prices.
|
|
5
|
+
* @module dsh-plugin-local-infer/ui/viewmodels/summaryHelpers
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* isHfRepoReference reports whether a chat template value is a Hugging Face
|
|
9
|
+
* repo reference (an owner/name pair) rather than a local path: it carries a
|
|
10
|
+
* slash and does not start with one. Only repo references are auto-downloaded
|
|
11
|
+
* into the model directory; a local path is used in place.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isHfRepoReference(value: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* chatTemplateLabel resolves the display label for a chat template repo: the
|
|
16
|
+
* preset's label when the repo is a shipped preset, else the repo itself.
|
|
17
|
+
*/
|
|
18
|
+
export declare function chatTemplateLabel(repo: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* resolveModelRegistryId maps the card's model value onto the VramModel
|
|
21
|
+
* registry key the estimator prices. The card's Model field carries either a
|
|
22
|
+
* registry key (a default-model selection) or an artifact file name (a
|
|
23
|
+
* directory-scan selection, e.g. a .ninfer file); the default list maps the
|
|
24
|
+
* file name to the registry key the estimator knows, so a scanned model prices
|
|
25
|
+
* a real VramModel rather than reading as not-measured. A value that is
|
|
26
|
+
* already a registry key passes through, and a missing value falls back to
|
|
27
|
+
* the engine's first default model.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveModelRegistryId(engineId: string, model: unknown): string;
|
|
30
|
+
//# sourceMappingURL=summaryHelpers.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The small pure helpers the summary view model prices: the HF repo
|
|
3
|
+
* reference check the chat-template status runs, the template display label,
|
|
4
|
+
* and the model-value-to-registry-key map the estimator prices.
|
|
5
|
+
* @module dsh-plugin-local-infer/ui/viewmodels/summaryHelpers
|
|
6
|
+
*/
|
|
7
|
+
import { CHAT_TEMPLATE_OPTIONS, defaultModelsForEngine } from '../../../providers/lib/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* isHfRepoReference reports whether a chat template value is a Hugging Face
|
|
10
|
+
* repo reference (an owner/name pair) rather than a local path: it carries a
|
|
11
|
+
* slash and does not start with one. Only repo references are auto-downloaded
|
|
12
|
+
* into the model directory; a local path is used in place.
|
|
13
|
+
*/
|
|
14
|
+
export function isHfRepoReference(value) {
|
|
15
|
+
return value !== '' && !value.startsWith('/') && value.includes('/');
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* chatTemplateLabel resolves the display label for a chat template repo: the
|
|
19
|
+
* preset's label when the repo is a shipped preset, else the repo itself.
|
|
20
|
+
*/
|
|
21
|
+
export function chatTemplateLabel(repo) {
|
|
22
|
+
const preset = CHAT_TEMPLATE_OPTIONS.find((option) => option.value === repo);
|
|
23
|
+
return preset?.label ?? repo;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* resolveModelRegistryId maps the card's model value onto the VramModel
|
|
27
|
+
* registry key the estimator prices. The card's Model field carries either a
|
|
28
|
+
* registry key (a default-model selection) or an artifact file name (a
|
|
29
|
+
* directory-scan selection, e.g. a .ninfer file); the default list maps the
|
|
30
|
+
* file name to the registry key the estimator knows, so a scanned model prices
|
|
31
|
+
* a real VramModel rather than reading as not-measured. A value that is
|
|
32
|
+
* already a registry key passes through, and a missing value falls back to
|
|
33
|
+
* the engine's first default model.
|
|
34
|
+
*/
|
|
35
|
+
export function resolveModelRegistryId(engineId, model) {
|
|
36
|
+
if (typeof model === 'string' && model !== '') {
|
|
37
|
+
const entry = defaultModelsForEngine(engineId).find((candidate) => candidate.file === model);
|
|
38
|
+
return entry?.modelId ?? model;
|
|
39
|
+
}
|
|
40
|
+
return defaultModelsForEngine(engineId)[0]?.modelId ?? engineId;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=summaryHelpers.js.map
|
package/packages/ui/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-local-infer-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Web UI for the dsh local-inference plugin: the form-type-aware parameter form, the live VRAM Est. meter, the red hardware-warning banner, the engine lifecycle controls (build / deploy / stop), and the register-as-model confirmation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Strata parameter surface. Strata is the placeholder engine: the plan names
|
|
3
|
-
* it as a docker-only engine whose parameter data lands when the engine is
|
|
4
|
-
* available. The surface is empty until then, so the form renders no fields
|
|
5
|
-
* and the adapter renders a bare docker plan; adding a spec here is a data
|
|
6
|
-
* edit, never an adapter rewire.
|
|
7
|
-
* @module dsh-plugin-local-infer/providers/strata
|
|
8
|
-
*/
|
|
9
|
-
import type { ParameterSpec } from 'dsh-plugin-local-infer/core';
|
|
10
|
-
/**
|
|
11
|
-
* The Strata `ParameterSpec` surface, empty until the engine's flag set lands.
|
|
12
|
-
* The `StrataAdapter` composes this (currently nothing) into a docker plan.
|
|
13
|
-
*/
|
|
14
|
-
export declare const STRATA_PARAMETERS: readonly ParameterSpec[];
|
|
15
|
-
//# sourceMappingURL=strata.d.ts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Strata parameter surface. Strata is the placeholder engine: the plan names
|
|
3
|
-
* it as a docker-only engine whose parameter data lands when the engine is
|
|
4
|
-
* available. The surface is empty until then, so the form renders no fields
|
|
5
|
-
* and the adapter renders a bare docker plan; adding a spec here is a data
|
|
6
|
-
* edit, never an adapter rewire.
|
|
7
|
-
* @module dsh-plugin-local-infer/providers/strata
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* The Strata `ParameterSpec` surface, empty until the engine's flag set lands.
|
|
11
|
-
* The `StrataAdapter` composes this (currently nothing) into a docker plan.
|
|
12
|
-
*/
|
|
13
|
-
export const STRATA_PARAMETERS = [];
|
|
14
|
-
//# sourceMappingURL=strata.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|