@aryacode/dsh-local-llm 0.8.2 → 0.8.4

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/lib/index.d.ts CHANGED
@@ -1725,7 +1725,7 @@ declare class NInferController {
1725
1725
  name: string;
1726
1726
  label: string;
1727
1727
  port: number;
1728
- modelName: string;
1728
+ modelName?: string;
1729
1729
  defaults: NInferSettings;
1730
1730
  wsl?: {
1731
1731
  distribution: string;
package/lib/index.js CHANGED
@@ -2657,6 +2657,18 @@ function libraryAdapter(controller, ensure, gate, checkIdle, attachments, strata
2657
2657
  originalModel: model
2658
2658
  });
2659
2659
  /**
2660
+ * The label the other Arya engines show: `qwen3.8-27b` becomes `Arya - Qwen3.8 27B`.
2661
+ *
2662
+ * The model list is what a person reads in the picker, so a bare artifact id is
2663
+ * a poor label next to the existing `Arya - …` entries. Each segment is
2664
+ * capitalised, and a lowercase letter that follows a trailing digit — a size or
2665
+ * quantisation suffix such as `27b` — is uppercased the way these artifacts are
2666
+ * written on the tin.
2667
+ */
2668
+ const aryaLabel = (name) => "Arya - " + name.split(/[-_]/u).filter((part) => part !== "").map((part) => {
2669
+ return (part.charAt(0).toUpperCase() + part.slice(1)).replace(/(\d)([a-z])$/u, (_match, digit, letter) => digit + letter.toUpperCase());
2670
+ }).join(" ");
2671
+ /**
2660
2672
  * Every model this installation has, loaded or not.
2661
2673
  *
2662
2674
  * The engine serves one model at a time, but it can switch: `POST
@@ -2713,7 +2725,7 @@ function libraryAdapter(controller, ensure, gate, checkIdle, attachments, strata
2713
2725
  const state = await ninfer.status();
2714
2726
  if (typeof state.modelName === "string" && state.modelName !== "") {
2715
2727
  const model = {
2716
- ...info("ninfer:" + state.modelName, state.modelName, Number(state.context) || 8192, state.vision === true, "ninfer", state.modelName),
2728
+ ...info("ninfer:" + state.modelName, aryaLabel(state.modelName), Number(state.context) || 8192, state.vision === true, "ninfer", state.modelName),
2717
2729
  defaultMaxTokens: outputDefault(Number(state.context) || 8192, ninfer.outputTokens()),
2718
2730
  reasoning: ninferReasoning
2719
2731
  };
@@ -3008,7 +3020,7 @@ var NInferController = class {
3008
3020
  };
3009
3021
  this.directory = resolve(config.directory);
3010
3022
  this.port = config.port;
3011
- this.modelName = config.modelName;
3023
+ this.modelName = config.modelName || config.name;
3012
3024
  if (config.wsl && (!/^[A-Za-z0-9._-]+$/.test(config.wsl.distribution) || !/^\/[A-Za-z0-9/._-]+$/.test(config.wsl.binary) || !/^\/[A-Za-z0-9/.:_-]+$/.test(config.wsl.libraryPath))) throw Error("Invalid NInfer WSL configuration.");
3013
3025
  if (!/^[a-z0-9][a-z0-9._-]+$/.test(config.name) || !/^[a-z0-9._-]+$/.test(config.label) || !/^[a-zA-Z0-9/._-]+@sha256:[a-f0-9]{64}$/.test(config.image) || !Number.isInteger(config.port) || config.port < 1024 || config.port > 65535 || !/^[A-Za-z]:[\\/]/.test(config.artifact) || config.artifact.includes(",")) throw Error("Invalid pinned NInfer configuration.");
3014
3026
  }
package/package.json CHANGED
@@ -1,73 +1,73 @@
1
- {
2
- "name": "@aryacode/dsh-local-llm",
3
- "version": "0.8.2",
4
- "description": "AryaStrata engine controls with the local NInfer Qwen3.8 dense model for AryaAI",
5
- "type": "module",
6
- "main": "lib/index.js",
7
- "types": "lib/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./lib/index.d.ts",
11
- "default": "./lib/index.js"
12
- },
13
- "./client": "./lib/client.js",
14
- "./package.json": "./package.json",
15
- "./locale/*.json": "./locale/*.json"
16
- },
17
- "dsh": {
18
- "bundle": {
19
- "patch": "./cordis.patch.yml"
20
- },
21
- "client": {
22
- "platform": "web",
23
- "inject": [
24
- "@deepseek-ai/dsh-client-locale",
25
- "@deepseek-ai/dsh-client-ui-layout",
26
- "@deepseek-ai/dsh-client-ui-renderer",
27
- "@deepseek-ai/dsh-client-ui-slots"
28
- ]
29
- }
30
- },
31
- "scripts": {
32
- "build": "tsdown",
33
- "typecheck": "tsc --noEmit",
34
- "prebuild": "node scripts/theme.mjs",
35
- "test": "node --test tests/*.test.mjs",
36
- "test:ui": "node tests/control-center-ui.mjs"
37
- },
38
- "devDependencies": {
39
- "@deepseek-ai/cordis": "^4.0.4",
40
- "@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.2",
41
- "@deepseek-ai/dsh-llm-pi-ai": "^0.2.0-rc.2",
42
- "@types/node": "^22.10.0",
43
- "@types/react": "~18.3.1",
44
- "react": "^18.2.0",
45
- "tsdown": "^0.22.14",
46
- "typescript": "^5.6.0"
47
- },
48
- "files": [
49
- "icon.svg",
50
- "locale/*.json",
51
- "lib/index.js",
52
- "lib/index.d.ts",
53
- "lib/client.js",
54
- "lib/client.js.map",
55
- "lib/openai-completions-*.js",
56
- "lib/event-stream-*.js",
57
- "cordis.patch.yml",
58
- "blue.png",
59
- "README.md",
60
- "LEGACY-CONTROL-CENTER.md",
61
- "scripts/freetoken-control.py",
62
- "scripts/ninfer-control.py"
63
- ],
64
- "dependencies": {
65
- "@earendil-works/pi-ai": "^0.87.1",
66
- "saxes": "^6.0.0",
67
- "systeminformation": "5.33.15"
68
- },
69
- "peerDependencies": {
70
- "@deepseek-ai/dsh-llm-pi-ai": "^0.2.0-rc.2"
71
- },
72
- "icon": "./icon.svg"
73
- }
1
+ {
2
+ "name": "@aryacode/dsh-local-llm",
3
+ "version": "0.8.4",
4
+ "description": "AryaStrata engine controls with the local NInfer Qwen3.8 dense model for AryaAI",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "types": "lib/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/index.d.ts",
11
+ "default": "./lib/index.js"
12
+ },
13
+ "./client": "./lib/client.js",
14
+ "./package.json": "./package.json",
15
+ "./locale/*.json": "./locale/*.json"
16
+ },
17
+ "dsh": {
18
+ "bundle": {
19
+ "patch": "./cordis.patch.yml"
20
+ },
21
+ "client": {
22
+ "platform": "web",
23
+ "inject": [
24
+ "@deepseek-ai/dsh-client-locale",
25
+ "@deepseek-ai/dsh-client-ui-layout",
26
+ "@deepseek-ai/dsh-client-ui-renderer",
27
+ "@deepseek-ai/dsh-client-ui-slots"
28
+ ]
29
+ }
30
+ },
31
+ "devDependencies": {
32
+ "@deepseek-ai/cordis": "^4.0.4",
33
+ "@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.2",
34
+ "@deepseek-ai/dsh-llm-pi-ai": "^0.2.0-rc.2",
35
+ "@types/node": "^22.10.0",
36
+ "@types/react": "~18.3.1",
37
+ "react": "^18.2.0",
38
+ "tsdown": "^0.22.14",
39
+ "typescript": "^5.6.0"
40
+ },
41
+ "files": [
42
+ "icon.svg",
43
+ "locale/*.json",
44
+ "lib/index.js",
45
+ "lib/index.d.ts",
46
+ "lib/client.js",
47
+ "lib/client.js.map",
48
+ "lib/openai-completions-*.js",
49
+ "lib/event-stream-*.js",
50
+ "cordis.patch.yml",
51
+ "blue.png",
52
+ "README.md",
53
+ "LEGACY-CONTROL-CENTER.md",
54
+ "scripts/freetoken-control.py",
55
+ "scripts/ninfer-control.py"
56
+ ],
57
+ "dependencies": {
58
+ "@earendil-works/pi-ai": "^0.87.1",
59
+ "saxes": "^6.0.0",
60
+ "systeminformation": "5.33.15"
61
+ },
62
+ "peerDependencies": {
63
+ "@deepseek-ai/dsh-llm-pi-ai": "^0.2.0-rc.2"
64
+ },
65
+ "icon": "./icon.svg",
66
+ "scripts": {
67
+ "build": "tsdown",
68
+ "typecheck": "tsc --noEmit",
69
+ "prebuild": "node scripts/theme.mjs",
70
+ "test": "node --test tests/*.test.mjs",
71
+ "test:ui": "node tests/control-center-ui.mjs"
72
+ }
73
+ }