@simplexai/localmodels-darwin-arm64 0.1.0-dev.38 → 0.1.0-dev.39

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.
Files changed (61) hide show
  1. package/bootstrap.identity +1 -1
  2. package/bootstrap.sha256 +60 -54
  3. package/modules/localmodels/__init__.py +1 -1
  4. package/modules/localmodels/__main__.py +4 -0
  5. package/modules/localmodels/bifrost_config.py +19 -0
  6. package/modules/localmodels/catalog.json +18 -6
  7. package/modules/localmodels/cli_parser.py +26 -3
  8. package/modules/localmodels/deploy.py +37 -9
  9. package/modules/localmodels/deploy_steps.py +6 -3
  10. package/modules/localmodels/download-mirrors.json +52 -4
  11. package/modules/localmodels/engines-b11583.json +20 -4
  12. package/modules/localmodels/engines-b12167.json +5 -1
  13. package/modules/localmodels/engines-strata-0.1.47.json +5 -1
  14. package/modules/localmodels/engines-strata-0.1.49.2.json +5 -1
  15. package/modules/localmodels/engines-strata-0.1.59.1.json +5 -1
  16. package/modules/localmodels/engines-strata-poly-0.1.45-poly.9.json +5 -1
  17. package/modules/localmodels/engines-whisper-b5454.json +5 -1
  18. package/modules/localmodels/engines.json +55 -11
  19. package/modules/localmodels/frontend.py +5 -2
  20. package/modules/localmodels/guard.py +15 -6
  21. package/modules/localmodels/harness.py +65 -33
  22. package/modules/localmodels/harness_gateway.py +9 -3
  23. package/modules/localmodels/hf_repo.py +15 -8
  24. package/modules/localmodels/library_gateway.py +15 -13
  25. package/modules/localmodels/metal_probe.py +16 -6
  26. package/modules/localmodels/npm_signatures.py +131 -0
  27. package/modules/localmodels/npm_transport.py +26 -10
  28. package/modules/localmodels/process_identity.py +21 -5
  29. package/modules/localmodels/region.py +244 -0
  30. package/modules/localmodels/remote_ops.py +69 -13
  31. package/modules/localmodels/remote_ops_download.py +210 -10
  32. package/modules/localmodels/remote_ops_prepare.py +61 -8
  33. package/modules/localmodels/runtime-lock.json +13 -13
  34. package/modules/localmodels/runtime_args.py +4 -2
  35. package/modules/localmodels/runtime_cli.py +19 -37
  36. package/modules/localmodels/runtime_discovery.py +30 -0
  37. package/modules/localmodels/runtime_install.py +81 -6
  38. package/modules/localmodels/runtime_io.py +61 -5
  39. package/modules/localmodels/runtime_pi.py +79 -0
  40. package/modules/localmodels/runtime_process.py +99 -15
  41. package/modules/localmodels/runtime_releases.py +51 -71
  42. package/modules/localmodels/service_probe.py +62 -4
  43. package/modules/localmodels/setup_inspection.py +21 -4
  44. package/modules/localmodels/setup_text.py +6 -0
  45. package/modules/localmodels/source_byok.py +484 -0
  46. package/modules/localmodels/source_byok_probe.py +275 -0
  47. package/modules/localmodels/source_cli.py +426 -0
  48. package/modules/localmodels/stack_args.py +2 -1
  49. package/modules/localmodels/stack_binding.py +47 -4
  50. package/modules/localmodels/stack_events.py +3 -0
  51. package/modules/localmodels/stack_hardware.py +17 -3
  52. package/modules/localmodels/tools.json +1364 -14
  53. package/modules/localmodels/transport.py +2 -0
  54. package/modules/{simplex_localmodels-0.1.0.dev38.dist-info → simplex_localmodels-0.1.0.dev39.dist-info}/METADATA +1 -1
  55. package/modules/{simplex_localmodels-0.1.0.dev38.dist-info → simplex_localmodels-0.1.0.dev39.dist-info}/RECORD +57 -51
  56. package/package.json +1 -1
  57. package/tool.json +1 -1
  58. /package/modules/{simplex_localmodels-0.1.0.dev38.dist-info → simplex_localmodels-0.1.0.dev39.dist-info}/WHEEL +0 -0
  59. /package/modules/{simplex_localmodels-0.1.0.dev38.dist-info → simplex_localmodels-0.1.0.dev39.dist-info}/entry_points.txt +0 -0
  60. /package/modules/{simplex_localmodels-0.1.0.dev38.dist-info → simplex_localmodels-0.1.0.dev39.dist-info}/licenses/NOTICE +0 -0
  61. /package/modules/{simplex_localmodels-0.1.0.dev38.dist-info → simplex_localmodels-0.1.0.dev39.dist-info}/licenses/localmodels/HERMES-LICENSE +0 -0
@@ -38,6 +38,10 @@
38
38
  "repo": "XHToken/Spark-X2.6-1.7B-GGUF",
39
39
  "path": "Spark-X2.6-1.7B-Q8_0.gguf"
40
40
  },
41
+ "91cb2811aebb47ac916aa619d27d4cdd7f4143106b7917accb8ead4cd7f5cbd9": {
42
+ "repo": "XHToken/Spark-X2.6-4B-GGUF",
43
+ "path": "Spark-X2.6-4B-Q4_K_M.gguf"
44
+ },
41
45
  "145c2aa606820663f26ad530b8fc141ed885e2e9ca29f9be7c3bfe8931d58b81": {
42
46
  "repo": "XHToken/Spark-X2.6-4B-GGUF",
43
47
  "path": "Spark-X2.6-4B-Q8_0.gguf"
@@ -114,6 +118,30 @@
114
118
  "repo": "ukisai/Swift-1.5-Qwen3.8-Flash-Next-GSQ-RCO-GGUF",
115
119
  "path": "mmproj-Swift-Qwen3.8-Flash-Next-BF16.gguf"
116
120
  },
121
+ "d13ce8f90855547bdaebe7312f531a1f2c4f822178d3103951f27fe884395cfa": {
122
+ "repo": "unsloth/DeepSeek-V4-Flash-0731-GGUF",
123
+ "path": "UD-Q4_K_XL/DeepSeek-V4-Flash-0731-UD-Q4_K_XL-00001-of-00005.gguf"
124
+ },
125
+ "d5b61668950f4743aacd677675d7fcf7507dbe1db6d304e8ff97ed1f00827bee": {
126
+ "repo": "unsloth/DeepSeek-V4-Flash-0731-GGUF",
127
+ "path": "UD-Q4_K_XL/DeepSeek-V4-Flash-0731-UD-Q4_K_XL-00002-of-00005.gguf"
128
+ },
129
+ "9705db7e589f360685ca7bd48100b270d78d228d4f5aa980508f3b2778af5494": {
130
+ "repo": "unsloth/DeepSeek-V4-Flash-0731-GGUF",
131
+ "path": "UD-Q4_K_XL/DeepSeek-V4-Flash-0731-UD-Q4_K_XL-00003-of-00005.gguf"
132
+ },
133
+ "7f13a68e3ca64208454c4ba32cc2757c0cbe78e3e5576c3142bf7007ca97da42": {
134
+ "repo": "unsloth/DeepSeek-V4-Flash-0731-GGUF",
135
+ "path": "UD-Q4_K_XL/DeepSeek-V4-Flash-0731-UD-Q4_K_XL-00004-of-00005.gguf"
136
+ },
137
+ "ed0d93164d3784968d6ce40d6d201ba98337f16e7db1b31fe495b2b0f334cc09": {
138
+ "repo": "unsloth/DeepSeek-V4-Flash-0731-GGUF",
139
+ "path": "UD-Q4_K_XL/DeepSeek-V4-Flash-0731-UD-Q4_K_XL-00005-of-00005.gguf"
140
+ },
141
+ "2c7ac54b0b64a99df1f139a9f1371a00198265e1d6a614b77597d20a655a4249": {
142
+ "repo": "unsloth/DeepSeek-V4-Flash-0731-GGUF",
143
+ "path": "dspark-DeepSeek-V4-Flash-0731-Q8_0.gguf"
144
+ },
117
145
  "0f2cbdc4f578b5a53f521bcb1a5f5297cd54ea72ebf6c8ce80b570cc5645bac1": {
118
146
  "repo": "unsloth/Nemotron-3-Nano-30B-A3B-GGUF",
119
147
  "path": "Nemotron-3-Nano-30B-A3B-IQ4_XS.gguf"
@@ -146,6 +174,10 @@
146
174
  "repo": "unsloth/Qwen3.6-35B-A3B-MTP-GGUF",
147
175
  "path": "Qwen3.6-35B-A3B-UD-IQ4_XS.gguf"
148
176
  },
177
+ "8966dd0cd8c543c4228490a2a8b0e0814fc4f1e6a8e199ceed4de6754ae7b8e1": {
178
+ "repo": "unsloth/Qwen3.6-35B-A3B-MTP-GGUF",
179
+ "path": "Qwen3.6-35B-A3B-UD-Q3_K_M.gguf"
180
+ },
149
181
  "0b21525e972670ed59e1812e170b27c26355381f0656ecc4e25617ece7dac58b": {
150
182
  "repo": "unsloth/Qwen3.6-35B-A3B-MTP-GGUF",
151
183
  "path": "Qwen3.6-35B-A3B-UD-Q4_K_M.gguf"
@@ -162,13 +194,29 @@
162
194
  "repo": "unsloth/Qwen3.8-27B-GGUF",
163
195
  "path": "Qwen3.8-27B-UD-IQ3_S.gguf"
164
196
  },
165
- "322e194ff79741c7baa497c240f677f54b201b0efab44ca8e50f122b39123482": {
166
- "repo": "unsloth/Qwen3.8-27B-GGUF",
167
- "path": "Qwen3.8-27B-UD-Q4_K_M.gguf"
168
- },
169
197
  "83ee4f4f205fa514161778c41df1ea14144faa0f713510893b63c2395f5c2d53": {
170
198
  "repo": "unsloth/Qwen3.8-27B-GGUF",
171
199
  "path": "mmproj-BF16.gguf"
200
+ },
201
+ "9d5644b371ffac921427c8021cc7242dab8e3ba37d7b48d1e79fe3770fbf9915": {
202
+ "repo": "unsloth/Qwen3.8-Flash-Next-GGUF",
203
+ "path": "UD-IQ3_XXS/Qwen3.8-Flash-Next-UD-IQ3_XXS-00001-of-00004.gguf"
204
+ },
205
+ "aacaff3bdb9032c2c3be428167930809735f65d3cfb204eba07d85e421e7ddf4": {
206
+ "repo": "unsloth/Qwen3.8-Flash-Next-GGUF",
207
+ "path": "UD-IQ3_XXS/Qwen3.8-Flash-Next-UD-IQ3_XXS-00002-of-00004.gguf"
208
+ },
209
+ "ef8f14e790ab471b363f146d5e8664eefbaf03e5776f317a1fb96a2bc7707b07": {
210
+ "repo": "unsloth/Qwen3.8-Flash-Next-GGUF",
211
+ "path": "UD-IQ3_XXS/Qwen3.8-Flash-Next-UD-IQ3_XXS-00003-of-00004.gguf"
212
+ },
213
+ "5de8b5dbf89409acc39468decafd4a4a95b13c29d88a14b0356107897829ec36": {
214
+ "repo": "unsloth/Qwen3.8-Flash-Next-GGUF",
215
+ "path": "UD-IQ3_XXS/Qwen3.8-Flash-Next-UD-IQ3_XXS-00004-of-00004.gguf"
216
+ },
217
+ "2e788f8c511d8093c7b43cb87b2fd7e14228340318057f8fb20c86df2efe2355": {
218
+ "repo": "unsloth/Qwen3.8-Flash-Next-GGUF",
219
+ "path": "mmproj-BF16.gguf"
172
220
  }
173
221
  }
174
222
  }
@@ -17,7 +17,11 @@
17
17
  "name": "llama-b11583-bin-ubuntu-x64.tar.gz",
18
18
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11583/llama-b11583-bin-ubuntu-x64.tar.gz",
19
19
  "sha256": "a4a681375770db521d15c66bd28339617b833ffc3bcc0a01ff93a883bac80438",
20
- "size_bytes": 17724487
20
+ "size_bytes": 17724487,
21
+ "npm_copy": {
22
+ "package": "@simplexai/engine-llama-b11583-bin-ubuntu-x64",
23
+ "version": "0.0.0-sha256-a4a681375770db52"
24
+ }
21
25
  }
22
26
  ],
23
27
  "min_glibc": "2.34"
@@ -34,7 +38,11 @@
34
38
  "name": "llama-b11583-bin-ubuntu-arm64.tar.gz",
35
39
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11583/llama-b11583-bin-ubuntu-arm64.tar.gz",
36
40
  "sha256": "fc84ae8a184996ba515824fcc6f8da0fb0c26ec404a07bf1f1b407bf9528c3e2",
37
- "size_bytes": 13839236
41
+ "size_bytes": 13839236,
42
+ "npm_copy": {
43
+ "package": "@simplexai/engine-llama-b11583-bin-ubuntu-arm64",
44
+ "version": "0.0.0-sha256-fc84ae8a184996ba"
45
+ }
38
46
  }
39
47
  ]
40
48
  },
@@ -52,7 +60,11 @@
52
60
  "name": "llama-b11583-bin-ubuntu-cuda-12.8-x64.tar.gz",
53
61
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11583/llama-b11583-bin-ubuntu-cuda-12.8-x64.tar.gz",
54
62
  "sha256": "62296a3706f02f657afbe39b8770aafdd7bb84165ab607a5cb463de5e0cecaa4",
55
- "size_bytes": 171591976
63
+ "size_bytes": 171591976,
64
+ "npm_copy": {
65
+ "package": "@simplexai/engine-llama-b11583-bin-ubuntu-cuda-12.8-x64",
66
+ "version": "0.0.0-sha256-62296a3706f02f65"
67
+ }
56
68
  },
57
69
  {
58
70
  "name": "cudart-llama-b11583-bin-ubuntu-cuda-12.8-x64.tar.gz",
@@ -94,7 +106,11 @@
94
106
  "name": "llama-b11583-bin-macos-arm64.tar.gz",
95
107
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11583/llama-b11583-bin-macos-arm64.tar.gz",
96
108
  "sha256": "d23832f4b847a722a64c9bf57e518c3df81dfab325942182ff17792d5d33351f",
97
- "size_bytes": 12112217
109
+ "size_bytes": 12112217,
110
+ "npm_copy": {
111
+ "package": "@simplexai/engine-llama-b11583-bin-macos-arm64",
112
+ "version": "0.0.0-sha256-d23832f4b847a722"
113
+ }
98
114
  }
99
115
  ]
100
116
  }
@@ -14,7 +14,11 @@
14
14
  "name": "llama-b12167-bin-macos-arm64.tar.gz",
15
15
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b12167/llama-b12167-bin-macos-arm64.tar.gz",
16
16
  "sha256": "2b7324ea05035e2cd7ba4ca54b695575c65752e2cef15291a4531b8a1fafbe12",
17
- "size_bytes": 16674382
17
+ "size_bytes": 16674382,
18
+ "npm_copy": {
19
+ "package": "@simplexai/engine-llama-b12167-bin-macos-arm64",
20
+ "version": "0.0.0-sha256-2b7324ea05035e2c"
21
+ }
18
22
  }
19
23
  ]
20
24
  }
@@ -17,7 +17,11 @@
17
17
  "name": "strata-control-0.1.47-linux-x86_64.tar.gz",
18
18
  "url": "https://github.com/Niko1221/Strata/releases/download/v0.2.2/strata-control-0.1.47-linux-x86_64.tar.gz",
19
19
  "sha256": "7ac52e3d4ef8f50466fa0cc662be218975373309214519aa0b68fafd39e66fe8",
20
- "size_bytes": 98643722
20
+ "size_bytes": 98643722,
21
+ "npm_copy": {
22
+ "package": "@simplexai/engine-strata-control-0.1.47-linux-x86_64",
23
+ "version": "0.0.0-sha256-7ac52e3d4ef8f504"
24
+ }
21
25
  },
22
26
  {
23
27
  "name": "strata-engine-0.1.47-linux-x86_64-cuda-cuda13.tar.gz",
@@ -17,7 +17,11 @@
17
17
  "name": "strata-control-0.1.49.2-linux-x86_64.tar.gz",
18
18
  "url": "https://github.com/Niko1221/Strata/releases/download/v0.2.4/strata-control-0.1.49.2-linux-x86_64.tar.gz",
19
19
  "sha256": "2f905fe9e7f0c0f7e1d055a414acc0b3dae6db2d42e7f6a97e57e8ff7d3cf9c6",
20
- "size_bytes": 98918561
20
+ "size_bytes": 98918561,
21
+ "npm_copy": {
22
+ "package": "@simplexai/engine-strata-control-0.1.49.2-linux-x86_64",
23
+ "version": "0.0.0-sha256-2f905fe9e7f0c0f7"
24
+ }
21
25
  },
22
26
  {
23
27
  "name": "strata-engine-0.1.48-control-0.1.49.2-linux-x86_64-cuda-cuda13.tar.gz",
@@ -17,7 +17,11 @@
17
17
  "name": "strata-control-0.1.59.1-linux-x86_64.tar.gz",
18
18
  "url": "https://github.com/Niko1221/Strata/releases/download/v0.2.13/strata-control-0.1.59.1-linux-x86_64.tar.gz",
19
19
  "sha256": "73fb612848cf00fa1072623029b35405bbbb63e3f4c688fe6f38c78e3fc022ac",
20
- "size_bytes": 100087576
20
+ "size_bytes": 100087576,
21
+ "npm_copy": {
22
+ "package": "@simplexai/engine-strata-control-0.1.59.1-linux-x86_64",
23
+ "version": "0.0.0-sha256-73fb612848cf00fa"
24
+ }
21
25
  },
22
26
  {
23
27
  "name": "strata-engine-0.1.59-control-0.1.59.1-linux-x86_64-cuda-cuda13.tar.gz",
@@ -17,7 +17,11 @@
17
17
  "name": "strata-poly-0.1.45-poly.9-linux-x64-cuda13.tar.gz",
18
18
  "url": "https://d2ikbbcl3j6jz9.cloudfront.net/cli/localmodels/engines/strata-poly/0.1.45-poly.9/strata-poly-0.1.45-poly.9-linux-x64-cuda13.tar.gz",
19
19
  "sha256": "d670d71cb3ecef513b7d54875aa5253a9949dd2e871a0adf0e4f642418e9302b",
20
- "size_bytes": 77879738
20
+ "size_bytes": 77879738,
21
+ "npm_copy": {
22
+ "package": "@simplexai/engine-strata-poly-0.1.45-poly.9-linux-x64-cuda13",
23
+ "version": "0.0.0-sha256-d670d71cb3ecef51"
24
+ }
21
25
  },
22
26
  {
23
27
  "name": "cudart-strata-poly-linux-x64-cuda13.0.3.tar.gz",
@@ -19,7 +19,11 @@
19
19
  "name": "whisper-bin-ubuntu-x64.tar.gz",
20
20
  "url": "https://github.com/ggml-org/whisper.cpp/releases/download/b5454/whisper-bin-ubuntu-x64.tar.gz",
21
21
  "sha256": "a72becf15d7917f990f6313867a52638b82b7f9ef237fb0c980dac56a135781c",
22
- "size_bytes": 10364195
22
+ "size_bytes": 10364195,
23
+ "npm_copy": {
24
+ "package": "@simplexai/engine-whisper-bin-ubuntu-x64",
25
+ "version": "0.0.0-sha256-a72becf15d7917f9"
26
+ }
23
27
  }
24
28
  ]
25
29
  }
@@ -18,7 +18,11 @@
18
18
  "name": "llama-b11370-bin-ubuntu-cuda-12.8-x64.tar.gz",
19
19
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11370/llama-b11370-bin-ubuntu-cuda-12.8-x64.tar.gz",
20
20
  "sha256": "047089347a554f06ada3d8036be8c74cba0e77add5188f31fd502303de5d272c",
21
- "size_bytes": 171364601
21
+ "size_bytes": 171364601,
22
+ "npm_copy": {
23
+ "package": "@simplexai/engine-llama-b11370-bin-ubuntu-cuda-12.8-x64",
24
+ "version": "0.0.0-sha256-047089347a554f06"
25
+ }
22
26
  },
23
27
  {
24
28
  "name": "cudart-llama-b11370-bin-ubuntu-cuda-12.8-x64.tar.gz",
@@ -65,7 +69,11 @@
65
69
  "name": "llama-b11370-bin-ubuntu-cuda-13.4-x64.tar.gz",
66
70
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11370/llama-b11370-bin-ubuntu-cuda-13.4-x64.tar.gz",
67
71
  "sha256": "81ced34431758b1d1932cf7eb99852598c76bec1885009f4519ad4f54bb0159b",
68
- "size_bytes": 152247644
72
+ "size_bytes": 152247644,
73
+ "npm_copy": {
74
+ "package": "@simplexai/engine-llama-b11370-bin-ubuntu-cuda-13.4-x64",
75
+ "version": "0.0.0-sha256-81ced34431758b1d"
76
+ }
69
77
  },
70
78
  {
71
79
  "name": "cudart-llama-b11370-bin-ubuntu-cuda-13.4-x64.tar.gz",
@@ -89,7 +97,11 @@
89
97
  "name": "llama-b11370-bin-ubuntu-cuda-13.4-arm64.tar.gz",
90
98
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11370/llama-b11370-bin-ubuntu-cuda-13.4-arm64.tar.gz",
91
99
  "sha256": "d417ce88799fb5bca9a51b53c36585fec9d7a8e7415873424919af0cb64d33e2",
92
- "size_bytes": 147493813
100
+ "size_bytes": 147493813,
101
+ "npm_copy": {
102
+ "package": "@simplexai/engine-llama-b11370-bin-ubuntu-cuda-13.4-arm64",
103
+ "version": "0.0.0-sha256-d417ce88799fb5bc"
104
+ }
93
105
  },
94
106
  {
95
107
  "name": "cudart-llama-b11370-bin-ubuntu-cuda-13.4-arm64.tar.gz",
@@ -111,7 +123,11 @@
111
123
  "name": "llama-b11370-bin-ubuntu-vulkan-x64.tar.gz",
112
124
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11370/llama-b11370-bin-ubuntu-vulkan-x64.tar.gz",
113
125
  "sha256": "46bb8add9cf46dee199692cf7852927758d7b2ad663949d81c8c80974032a398",
114
- "size_bytes": 31577653
126
+ "size_bytes": 31577653,
127
+ "npm_copy": {
128
+ "package": "@simplexai/engine-llama-b11370-bin-ubuntu-vulkan-x64",
129
+ "version": "0.0.0-sha256-46bb8add9cf46dee"
130
+ }
115
131
  }
116
132
  ]
117
133
  },
@@ -127,7 +143,11 @@
127
143
  "name": "llama-b11370-bin-ubuntu-vulkan-arm64.tar.gz",
128
144
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11370/llama-b11370-bin-ubuntu-vulkan-arm64.tar.gz",
129
145
  "sha256": "cb8ab033dd9565e0d82aa3b6c407527966661d8a1736ae083c417338025d4e9d",
130
- "size_bytes": 24820336
146
+ "size_bytes": 24820336,
147
+ "npm_copy": {
148
+ "package": "@simplexai/engine-llama-b11370-bin-ubuntu-vulkan-arm64",
149
+ "version": "0.0.0-sha256-cb8ab033dd9565e0"
150
+ }
131
151
  }
132
152
  ]
133
153
  },
@@ -159,7 +179,11 @@
159
179
  "name": "llama-b11370-bin-ubuntu-x64.tar.gz",
160
180
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11370/llama-b11370-bin-ubuntu-x64.tar.gz",
161
181
  "sha256": "1c86f91cb0e2bbf5bce7eae7c0ce6beb95137e41251b1dbb19839175d624d0cf",
162
- "size_bytes": 17634362
182
+ "size_bytes": 17634362,
183
+ "npm_copy": {
184
+ "package": "@simplexai/engine-llama-b11370-bin-ubuntu-x64",
185
+ "version": "0.0.0-sha256-1c86f91cb0e2bbf5"
186
+ }
163
187
  }
164
188
  ],
165
189
  "min_glibc": "2.34"
@@ -176,7 +200,11 @@
176
200
  "name": "llama-b11370-bin-ubuntu-arm64.tar.gz",
177
201
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11370/llama-b11370-bin-ubuntu-arm64.tar.gz",
178
202
  "sha256": "2589668b61f4b2a2baa1a860c45e3dbd75af89e3620340589929632d981d28f2",
179
- "size_bytes": 13661001
203
+ "size_bytes": 13661001,
204
+ "npm_copy": {
205
+ "package": "@simplexai/engine-llama-b11370-bin-ubuntu-arm64",
206
+ "version": "0.0.0-sha256-2589668b61f4b2a2"
207
+ }
180
208
  }
181
209
  ]
182
210
  },
@@ -189,7 +217,11 @@
189
217
  "name": "llama-b11370-bin-macos-arm64.tar.gz",
190
218
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11370/llama-b11370-bin-macos-arm64.tar.gz",
191
219
  "sha256": "9d7d074ca8db0c2233af760ca2ad89182a52c909abdcbfa3b94e27fb78de9355",
192
- "size_bytes": 11894187
220
+ "size_bytes": 11894187,
221
+ "npm_copy": {
222
+ "package": "@simplexai/engine-llama-b11370-bin-macos-arm64",
223
+ "version": "0.0.0-sha256-9d7d074ca8db0c22"
224
+ }
193
225
  }
194
226
  ]
195
227
  },
@@ -202,7 +234,11 @@
202
234
  "name": "llama-b11370-bin-macos-x64.tar.gz",
203
235
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11370/llama-b11370-bin-macos-x64.tar.gz",
204
236
  "sha256": "2bdcdc8936621840fc246198da8a7d4e87d2db58ae232c6126ee54b594be3746",
205
- "size_bytes": 11445204
237
+ "size_bytes": 11445204,
238
+ "npm_copy": {
239
+ "package": "@simplexai/engine-llama-b11370-bin-macos-x64",
240
+ "version": "0.0.0-sha256-2bdcdc8936621840"
241
+ }
206
242
  }
207
243
  ]
208
244
  },
@@ -238,7 +274,11 @@
238
274
  "name": "llama-b11370-bin-win-cuda-13.4-x64.zip",
239
275
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11370/llama-b11370-bin-win-cuda-13.4-x64.zip",
240
276
  "sha256": "05a1e951d7eb3fb32a8159b6f6dc06f5e8f681154b57369d585ae4100bae4999",
241
- "size_bytes": 152876036
277
+ "size_bytes": 152876036,
278
+ "npm_copy": {
279
+ "package": "@simplexai/engine-llama-b11370-bin-win-cuda-13.4-x64",
280
+ "version": "0.0.0-sha256-05a1e951d7eb3fb3"
281
+ }
242
282
  },
243
283
  {
244
284
  "name": "cudart-llama-bin-win-cuda-13.4-x64.zip",
@@ -258,7 +298,11 @@
258
298
  "name": "llama-b11370-bin-win-cpu-x64.zip",
259
299
  "url": "https://github.com/ggml-org/llama.cpp/releases/download/b11370/llama-b11370-bin-win-cpu-x64.zip",
260
300
  "sha256": "e433a6b1592af1deedf001dcc1abc933e990be8dc94e5d28104c3c4406a1d35f",
261
- "size_bytes": 19333283
301
+ "size_bytes": 19333283,
302
+ "npm_copy": {
303
+ "package": "@simplexai/engine-llama-b11370-bin-win-cpu-x64",
304
+ "version": "0.0.0-sha256-e433a6b1592af1de"
305
+ }
262
306
  }
263
307
  ]
264
308
  }
@@ -18,7 +18,7 @@ import sys
18
18
  from collections.abc import Callable
19
19
  from pathlib import Path
20
20
 
21
- from localmodels import hosts
21
+ from localmodels import hosts, region
22
22
  from localmodels.component import front_venv, venv_python
23
23
  from localmodels.records import Plan
24
24
 
@@ -105,8 +105,11 @@ def install(
105
105
  [interpreter or sys.executable, "-m", "venv", "--without-pip", str(venv)],
106
106
  _installer(python, source),
107
107
  ]
108
+ env = region.pip_environment() # hash-locked; in cn a China index unless pip has its own
108
109
  for command in steps:
109
- result = subprocess.run(command, capture_output=True, text=True, timeout=1200, check=False)
110
+ result = subprocess.run(
111
+ command, capture_output=True, text=True, timeout=1200, check=False, env=env
112
+ )
110
113
  if result.returncode:
111
114
  raise FrontendError(
112
115
  f"{' '.join(command[:4])} failed: {(result.stderr or result.stdout).strip()[-400:]}"
@@ -15,7 +15,7 @@ import sys
15
15
  from pathlib import Path
16
16
  from typing import Literal, TypedDict
17
17
 
18
- from localmodels import cli_help, http_local, probe
18
+ from localmodels import cli_help, http_local, probe, region
19
19
  from localmodels.catalog import ComponentRecipe, component_recipe
20
20
  from localmodels.contracts import decode
21
21
  from localmodels.privacy import PrivacyError, PrivacySession, Span, parse_spans, strict_json
@@ -148,7 +148,9 @@ def _check_tree(directory: Path) -> None:
148
148
 
149
149
 
150
150
  def _run(command: list[str], *, timeout: int) -> None:
151
- result = subprocess.run(command, capture_output=True, timeout=timeout, check=False)
151
+ result = subprocess.run(
152
+ command, capture_output=True, timeout=timeout, check=False, env=region.pip_environment()
153
+ )
152
154
  if result.returncode:
153
155
  raise PrivacyError("CPU runtime setup failed; rerun the same approved plan")
154
156
 
@@ -231,14 +233,19 @@ def _download(directory: Path, recipe: ComponentRecipe) -> None:
231
233
  or _sha(target) != item["sha256"]
232
234
  ):
233
235
  marker.unlink()
234
- fetch(
235
- f"https://huggingface.co/{recipe['repo']}/resolve/{recipe['revision']}/{path}",
236
+ switch = fetch(
237
+ f"{region.HF_API}/{recipe['repo']}/resolve/{recipe['revision']}/{path}",
236
238
  str(target),
237
239
  str(item["sha256"]),
238
240
  int(str(item["size_bytes"])),
239
241
  path,
242
+ None,
243
+ where,
240
244
  )
245
+ if switch:
246
+ region.fallback_to(switch)
241
247
 
248
+ where = region.current_region()
242
249
  with concurrent.futures.ThreadPoolExecutor(max_workers=6) as pool:
243
250
  list(pool.map(download, [dict(item) for item in recipe["files"]]))
244
251
 
@@ -346,8 +353,10 @@ def _prepare_parsers(commands: argparse._SubParsersAction[argparse.ArgumentParse
346
353
  cli_help.document(
347
354
  command,
348
355
  "Prepare the plan's directory: copy the worker and its runtime lock, download the pinned "
349
- "model files from huggingface.co with size and SHA256 checks, create a venv with this "
350
- "Python and pip install the hash-locked CPU wheels, then verify every file. Refuses "
356
+ "model files from huggingface.co (hf-mirror.com first in region cn) with size and SHA256 "
357
+ "checks, create a venv with this Python and pip install the hash-locked CPU wheels (from "
358
+ "a China PyPI mirror in region cn unless pip has an index of its own), then verify every "
359
+ "file. Refuses "
351
360
  "unless --approve equals the plan's plan_id and a plan built now (same Python, same "
352
361
  "package) is identical, the directory is empty or marked as this recipe's, and free disk "
353
362
  "and available RAM leave headroom. Prints a short JSON result; after an interruption "
@@ -9,6 +9,7 @@ artifacts, with ownership recorded for safe removal. The controller must be the
9
9
  from __future__ import annotations
10
10
 
11
11
  import contextlib
12
+ import hashlib
12
13
  import json
13
14
  import os
14
15
  import re
@@ -19,7 +20,7 @@ from collections.abc import Callable
19
20
  from pathlib import Path
20
21
  from typing import Any, Literal, TypedDict, cast
21
22
 
22
- from localmodels import harness_probe, hosts
23
+ from localmodels import harness_probe, hosts, region
23
24
  from localmodels.contracts import decode
24
25
  from localmodels.harness_cleanup import (
25
26
  changed as changed,
@@ -47,7 +48,8 @@ from localmodels.harness_probe import shown_pi_model as shown_pi_model
47
48
  from localmodels.npm_transport import Artifact as Artifact
48
49
  from localmodels.npm_transport import ToolBuild as ToolBuild
49
50
  from localmodels.npm_transport import install_bifrost
50
- from localmodels.remote_ops import fetch
51
+ from localmodels.remote_ops import Archive, fetch
52
+ from localmodels.remote_ops_download import npm_copies
51
53
  from localmodels.runtime_io import error_cause
52
54
  from localmodels.stack_events import ToolEvents
53
55
  from localmodels.tool_archive import (
@@ -97,9 +99,21 @@ class NpmArtifact(TypedDict):
97
99
  integrity: str
98
100
 
99
101
 
102
+ class _PiModuleOptional(NpmArtifact, total=False):
103
+ install_script: str # "skipped": npm would run one; scripts/pin_pi.py says why it is not
104
+
105
+
106
+ class PiModule(_PiModuleOptional):
107
+ path: (
108
+ str # its place under the package root, npm's lockfile key: node_modules/a[/node_modules/b]
109
+ )
110
+
111
+
100
112
  class PiLock(NpmArtifact):
113
+ """pi and its whole production dependency tree, written by scripts/pin_pi.py."""
114
+
101
115
  entry: str
102
- modules: list[NpmArtifact]
116
+ modules: list[PiModule]
103
117
 
104
118
 
105
119
  class MagpieLock(TypedDict):
@@ -275,7 +289,7 @@ def tool_build(builds: list[ToolBuild], platform: str, arch: str, tool: str) ->
275
289
  return match
276
290
 
277
291
 
278
- def tool_artifact(item: ToolBuild | NpmArtifact) -> Artifact:
292
+ def tool_artifact(item: ToolBuild | NpmArtifact | PiModule) -> Artifact:
279
293
  artifact: Artifact = {
280
294
  "name": item["name"],
281
295
  "url": item["url"],
@@ -284,6 +298,10 @@ def tool_artifact(item: ToolBuild | NpmArtifact) -> Artifact:
284
298
  }
285
299
  if "npm" in item:
286
300
  artifact["npm"] = cast(ToolBuild, item)["npm"]
301
+ if "npm_copy" in item:
302
+ artifact["npm_copy"] = cast(ToolBuild, item)["npm_copy"]
303
+ if "path" in item:
304
+ artifact["path"] = cast(PiModule, item)["path"]
287
305
  return artifact
288
306
 
289
307
 
@@ -498,7 +516,13 @@ def _fetch(tools_dir: Path, artifact: Artifact, log: Callable[[str], None]) -> P
498
516
  return path
499
517
  with contextlib.redirect_stdout(_Events(log)):
500
518
  fetch(
501
- artifact["url"], str(path), artifact["sha256"], artifact["size_bytes"], artifact["name"]
519
+ artifact["url"],
520
+ str(path),
521
+ artifact["sha256"],
522
+ artifact["size_bytes"],
523
+ artifact["name"],
524
+ npm_copies(cast(Archive, artifact)),
525
+ region.current_region(),
502
526
  )
503
527
  return path
504
528
 
@@ -522,6 +546,41 @@ def _install_tree(tools_dir: Path, name: str, unpack: Callable[[Path], None], ma
522
546
  return final
523
547
 
524
548
 
549
+ def _install_pi(
550
+ tools_dir: Path,
551
+ bin_dir: Path,
552
+ action: ToolAction,
553
+ pi: PiLock,
554
+ node: str,
555
+ log: Callable[[str], None],
556
+ ) -> list[str]:
557
+ """pi's package with its dependency tree, each module at the plan's path, and the wrapper
558
+ in ``bin_dir``; returns the tree and the wrapper."""
559
+ modules = action["artifacts"][1:]
560
+ if any("path" not in m for m in modules): # plans saved before 2026-11-18
561
+ raise HarnessError("this plan installs pi without its dependency tree; plan again")
562
+ archives = [_fetch(tools_dir, a, log) for a in action["artifacts"]]
563
+
564
+ def unpack_pi(dest: Path) -> None:
565
+ _safe_extract(archives[0], dest)
566
+ for module, archive in zip(modules, archives[1:], strict=True):
567
+ target = dest.joinpath(*module["path"].split("/"))
568
+ target.mkdir(parents=True)
569
+ _safe_extract(archive, target)
570
+
571
+ marker = hashlib.sha256(",".join(a["sha256"] for a in action["artifacts"]).encode())
572
+ tree = _install_tree(tools_dir, f"pi-{pi['version']}", unpack_pi, marker.hexdigest())
573
+ wrapper = bin_dir / launcher_name()
574
+ bin_dir.mkdir(parents=True, exist_ok=True)
575
+ if wrapper.exists() and not _owned_wrapper(str(wrapper)):
576
+ raise HarnessError(f"{wrapper} exists and localmodels did not create it; not overwritten")
577
+ about = f"{OWNED_WRAPPER} for {pi['package']}@{pi['version']}; remove this file and {tree}"
578
+ write_launcher(wrapper, [node, str(tree / pi["entry"])], about)
579
+ wrapper.chmod(0o755)
580
+ log(f"pi {pi['version']} installed: {wrapper}")
581
+ return [str(tree), str(wrapper)]
582
+
583
+
525
584
  def install_tools(plan: ToolPlan, log: Callable[[str], None] = lambda message: None) -> list[str]:
526
585
  """Install the tools the plan marks ``install``; returns the paths created (owned)."""
527
586
  lock = load_lock()
@@ -543,34 +602,7 @@ def install_tools(plan: ToolPlan, log: Callable[[str], None] = lambda message: N
543
602
  owned.append(str(tree))
544
603
  log(f"Node.js {lock['node']['version']} installed to {tree}")
545
604
  if actions["pi"]["action"] == "install":
546
- pi = lock["pi"]
547
- archives = [_fetch(tools_dir, a, log) for a in actions["pi"]["artifacts"]]
548
-
549
- def unpack_pi(dest: Path) -> None:
550
- _safe_extract(archives[0], dest)
551
- for module, archive in zip(pi["modules"], archives[1:], strict=False):
552
- target = dest / "node_modules" / module["package"]
553
- target.mkdir(parents=True)
554
- _safe_extract(archive, target)
555
-
556
- tree = _install_tree(
557
- tools_dir,
558
- f"pi-{pi['version']}",
559
- unpack_pi,
560
- ",".join(a["sha256"] for a in actions["pi"]["artifacts"]),
561
- )
562
- owned.append(str(tree))
563
- wrapper = bin_dir / launcher_name()
564
- bin_dir.mkdir(parents=True, exist_ok=True)
565
- if wrapper.exists() and not _owned_wrapper(str(wrapper)):
566
- raise HarnessError(
567
- f"{wrapper} exists and localmodels did not create it; not overwritten"
568
- )
569
- about = f"{OWNED_WRAPPER} for {pi['package']}@{pi['version']}; remove this file and {tree}"
570
- write_launcher(wrapper, [node, str(tree / pi["entry"])], about)
571
- wrapper.chmod(0o755)
572
- owned.append(str(wrapper))
573
- log(f"pi {pi['version']} installed: {wrapper}")
605
+ owned += _install_pi(tools_dir, bin_dir, actions["pi"], lock["pi"], node, log)
574
606
  if "bifrost" in actions and actions["bifrost"]["action"] == "install":
575
607
  from localmodels import gateway_bifrost
576
608
 
@@ -346,15 +346,21 @@ def stop_gateway(
346
346
 
347
347
 
348
348
  def private_home(plan: harness.ToolPlan) -> None:
349
- """Create the stack's private client context (``tools/gateway-home``) 0700 before anything is
350
- written into it, as Magpie's ``_serve`` does. One that exists must already be private: it is
351
- never loosened or repaired automatically, the user is told how to fix it."""
349
+ """Create the private client context before wiring clients, without repairing existing state."""
352
350
  if "environment" in plan:
353
351
  return
354
352
  home = harness_probe.gateway_home(plan["tools_dir"])
355
353
  try:
356
354
  runtime_io.private_directory(home)
357
355
  except ValueError as exc:
356
+ if sys.platform == "win32":
357
+ raise harness.HarnessError(
358
+ f"{home} is not a private directory for the current Windows user ({exc});"
359
+ " no config changed. Close Linger and stop the localmodels gateway if it is"
360
+ " running. If you confirm localmodels created this folder, rename it in File"
361
+ " Explorer to keep a backup (ask an administrator if denied), then retry"
362
+ " without elevation."
363
+ ) from exc
358
364
  raise harness.HarnessError(
359
365
  f"{home} is not a directory private to the current user ({exc}; should be 0700); no"
360
366
  f" config changed. Once you confirm this tool created it, run chmod 700 {home} and retry"