@clawlabz/clawskin 1.0.0 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawlabz/clawskin",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "description": "Pixel Agent Skin Engine \u2014 Procedural 32\u00d732 character generator with scenes, animations & customization",
6
6
  "keywords": [
@@ -177,8 +177,9 @@ class ClawSkinApp {
177
177
  if (window._connPanel) {
178
178
  window._connPanel.render(this.settings.load());
179
179
  }
180
- // Use previously saved token if available; never read token from /api/config
181
- this.gateway.connect(config.gatewayUrl, saved.token || '');
180
+ // Use token from local config, fall back to previously saved token
181
+ const token = config.token || saved.token || '';
182
+ this.gateway.connect(config.gatewayUrl, token);
182
183
  return;
183
184
  }
184
185
  }
package/serve.cjs CHANGED
@@ -46,9 +46,9 @@ function getLocalGatewayConfig() {
46
46
  const port = gw.port || 18789;
47
47
  return {
48
48
  gatewayUrl: `ws://localhost:${port}`,
49
- // Only expose that auth is token-based, never send the actual token.
50
- // The user must enter the token manually in the UI.
51
- hasAuth: !!(gw.auth && gw.auth.mode === 'token'),
49
+ // Safe to expose token on localhost serve.cjs binds to 127.0.0.1 by default.
50
+ // The token never leaves the local machine.
51
+ token: (gw.auth && gw.auth.token) || '',
52
52
  };
53
53
  } catch { continue; }
54
54
  }