@clawchatsai/connector 0.0.11 → 0.0.12

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/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * Spec: specs/multitenant-p2p.md sections 6.1-6.2
11
11
  */
12
12
  export declare const PLUGIN_ID = "connector";
13
- export declare const PLUGIN_VERSION = "0.0.1";
13
+ export declare const PLUGIN_VERSION = "0.0.12";
14
14
  interface PluginServiceContext {
15
15
  stateDir: string;
16
16
  logger: {
package/dist/index.js CHANGED
@@ -19,7 +19,7 @@ import { checkForUpdates, performUpdate } from './updater.js';
19
19
  // Inline from shared/api-version.ts to avoid rootDir conflict
20
20
  const CURRENT_API_VERSION = 1;
21
21
  export const PLUGIN_ID = 'connector';
22
- export const PLUGIN_VERSION = '0.0.1';
22
+ export const PLUGIN_VERSION = '0.0.12';
23
23
  /** Max DataChannel message size (~256KB, leave room for envelope) */
24
24
  const MAX_DC_MESSAGE_SIZE = 256 * 1024;
25
25
  /** Active DataChannel connections: connectionId → send function */
@@ -147,9 +147,7 @@ async function startShellChat(ctx, api) {
147
147
  signaling.on('auth-rejected', (reason) => {
148
148
  ctx.logger.error(`Signaling auth rejected: ${reason}`);
149
149
  });
150
- signaling.on('version-rejected', (current, minimum) => {
151
- ctx.logger.error(`Plugin version ${current} rejected, minimum: ${minimum}`);
152
- });
150
+ // version-rejected listener removed version check is now client-side
153
151
  signaling.on('force-update', async (targetVersion) => {
154
152
  ctx.logger.info(`Force update to ${targetVersion} requested`);
155
153
  try {
@@ -37,8 +37,7 @@ export declare class SignalingClient extends EventEmitter {
37
37
  /**
38
38
  * Open the WebSocket connection and perform the gateway-auth handshake.
39
39
  * Resolves once the socket is open (not necessarily authenticated yet).
40
- * Authentication outcome is signalled via 'connected' / 'auth-rejected' /
41
- * 'version-rejected' events.
40
+ * Authentication outcome is signalled via 'connected' / 'auth-rejected' events.
42
41
  */
43
42
  connect(): Promise<void>;
44
43
  /**
@@ -63,8 +63,7 @@ export class SignalingClient extends EventEmitter {
63
63
  /**
64
64
  * Open the WebSocket connection and perform the gateway-auth handshake.
65
65
  * Resolves once the socket is open (not necessarily authenticated yet).
66
- * Authentication outcome is signalled via 'connected' / 'auth-rejected' /
67
- * 'version-rejected' events.
66
+ * Authentication outcome is signalled via 'connected' / 'auth-rejected' events.
68
67
  */
69
68
  connect() {
70
69
  this.intentionalClose = false;
@@ -198,15 +197,8 @@ export class SignalingClient extends EventEmitter {
198
197
  this.emit('auth-rejected', reason);
199
198
  break;
200
199
  }
201
- case 'version-rejected': {
202
- const current = msg['current'] ?? PLUGIN_VERSION;
203
- const minimum = msg['minimum'] ?? '';
204
- console.error(`[SignalingClient] Version rejected: current=${current}, minimum=${minimum}`);
205
- // Do not reconnect — must upgrade first; auto-update logic is in updater.ts
206
- this.intentionalClose = true;
207
- this.emit('version-rejected', current, minimum);
208
- break;
209
- }
200
+ // version-rejected removed — version compatibility is now checked
201
+ // client-side via pluginVersion in connect-ready
210
202
  case 'ice-offer': {
211
203
  const offer = {
212
204
  connectionId: msg['connectionId'] ?? '',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawchatsai/connector",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "description": "ShellChat OpenClaw plugin — P2P tunnel + local API bridge",
6
6
  "main": "dist/index.js",