@ariacompute/engine-rn 1.20.1 → 1.22.0

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 CHANGED
@@ -18,7 +18,7 @@ on disk is loaded directly; otherwise the SDK downloads it from the regional
18
18
  public hub (same as `aria-engine download`: `.com` → Hugging Face, `.cn` →
19
19
  ModelScope; `site` defaults to `https://ariacompute.com`) into
20
20
  `~/.ariacompute/models/{model}` and then loads it. Dashboard is not used. A
21
- Dashboard `sk-` / `bfvk-` token is ignored for hub auth. Token is optional for
21
+ Dashboard `sk-` / `sk-bf-` token is ignored for hub auth. Token is optional for
22
22
  public models. Gated files: pass `hfToken` / `modelscopeApiToken` (same as
23
23
  `aria-engine setup`); if omitted, reads `~/.ariacompute/engine.yml`. Instance
24
24
  `setup` is in-memory only (does not write that file). A valid cached bundle is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariacompute/engine-rn",
3
- "version": "1.20.1",
3
+ "version": "1.22.0",
4
4
  "description": "React Native binding for Aria Engine",
5
5
  "main": "src/index.js",
6
6
  "license": "MIT",
package/src/index.js CHANGED
@@ -76,7 +76,7 @@ function hubBearer(token) {
76
76
  const t = (token || '').trim();
77
77
  if (!t) return undefined;
78
78
  const low = t.toLowerCase();
79
- if (low.startsWith('sk-') || low.startsWith('bfvk-')) return undefined;
79
+ if (low.startsWith('sk-')) return undefined;
80
80
  return t;
81
81
  }
82
82
 
@@ -216,7 +216,7 @@ async function fetchHubFile(source, model, file, dest, token, required) {
216
216
  if (e && (e.status === 401 || e.status === 403)) {
217
217
  const field = source === 'modelscope' ? 'modelscope_api_token' : 'hf_token';
218
218
  throw new Error(
219
- `auth failed HTTP ${e.status}; set ${field} via aria-engine setup (do not pass a Dashboard sk-/bfvk- key as the hub token)`,
219
+ `auth failed HTTP ${e.status}; set ${field} via aria-engine setup (do not pass a Dashboard sk-/sk-bf- key as the hub token)`,
220
220
  );
221
221
  }
222
222
  }
package/src/setup.js CHANGED
@@ -7,13 +7,8 @@ const CN_UPGRADE = 'https://gitee.com/ariacompute';
7
7
 
8
8
  function defaultSetupConfig() {
9
9
  return {
10
- // Local (router registration)
11
10
  router: '',
12
11
  router_api_key: '',
13
- // OAuth (Aria Compute)
14
- serve_site: '',
15
- serve_api_key: '',
16
- // Hub / compute
17
12
  site_url: '',
18
13
  upgrade_url: '',
19
14
  compute: 'auto',
@@ -46,22 +41,8 @@ function fillSetupUrls(cfg) {
46
41
  function validateRouterApiKey(key) {
47
42
  const t = (key || '').trim();
48
43
  if (!t) return;
49
- if (t.startsWith('bfvk-')) {
50
- throw new Error(
51
- 'OAuth key detected (bfvk-); use serve_api_key / [2/2] OAuth (Aria Compute)',
52
- );
53
- }
54
- }
55
-
56
- function validateServeApiKey(key) {
57
- const t = (key || '').trim();
58
- if (!t) return;
59
- if (t.startsWith('sk-aria_')) {
60
- throw new Error('Local router key detected (sk-aria_); use router_api_key / [1/2] Local');
61
- }
62
- if (!t.startsWith('bfvk-')) {
63
- throw new Error('serve_api_key must start with bfvk-');
64
- }
44
+ if (t.startsWith('sk-aria_') || t.startsWith('sk-bf-')) return;
45
+ throw new Error('router_api_key must start with sk-aria_ or sk-bf-');
65
46
  }
66
47
 
67
48
  function applySetup(existing, updates) {
@@ -74,7 +55,6 @@ function applySetup(existing, updates) {
74
55
  throw new Error(`invalid compute: ${out.compute}`);
75
56
  }
76
57
  validateRouterApiKey(out.router_api_key);
77
- validateServeApiKey(out.serve_api_key);
78
58
  return fillSetupUrls(out);
79
59
  }
80
60