@wishee-ai/openclaw-connector 1.0.0 → 1.0.2
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/binding.js +6 -6
- package/dist/binding.js.map +1 -1
- package/dist/connector.js +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/openclaw.plugin.json +5 -2
- package/package.json +47 -11
package/dist/binding.js
CHANGED
|
@@ -8,7 +8,7 @@ import path from "node:path";
|
|
|
8
8
|
const BINDING_DIR = path.join(process.env.HOME || "/tmp", ".openclaw", "openclaw-connector");
|
|
9
9
|
const BINDING_FILE = path.join(BINDING_DIR, "binding.json");
|
|
10
10
|
const DEFAULT_BRIDGE_URL = "wss://ai-bridge.wishee.com.cn/ws";
|
|
11
|
-
const
|
|
11
|
+
const BIND_DEEPLINK_BASE = "wishee://openclaw/bind";
|
|
12
12
|
/**
|
|
13
13
|
* Load or create the binding state.
|
|
14
14
|
* Generates a new clawId + secret on first run.
|
|
@@ -53,13 +53,13 @@ export function markBound(state) {
|
|
|
53
53
|
fs.writeFileSync(BINDING_FILE, JSON.stringify(state, null, 2));
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
* Build the binding
|
|
56
|
+
* Build the binding deeplink encoded into the QR code. Scanning it with the
|
|
57
|
+
* WISHEE app opens the app, which reads clawId/secret and registers the
|
|
58
|
+
* binding against the bridge — no intermediate web page involved.
|
|
57
59
|
*/
|
|
58
60
|
export function getBindUrl(state) {
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
url.searchParams.set("secret", state.secret);
|
|
62
|
-
return url.toString();
|
|
61
|
+
const params = new URLSearchParams({ clawId: state.clawId, secret: state.secret });
|
|
62
|
+
return `${BIND_DEEPLINK_BASE}?${params.toString()}`;
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
* Display QR code in terminal for binding.
|
package/dist/binding.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binding.js","sourceRoot":"","sources":["../src/binding.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAS7B,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAC3B,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,MAAM,EAC1B,WAAW,EACX,oBAAoB,CACrB,CAAC;AACF,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;AAE5D,MAAM,kBAAkB,GAAG,kCAAkC,CAAC;AAC9D,MAAM,
|
|
1
|
+
{"version":3,"file":"binding.js","sourceRoot":"","sources":["../src/binding.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAS7B,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAC3B,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,MAAM,EAC1B,WAAW,EACX,oBAAoB,CACrB,CAAC;AACF,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;AAE5D,MAAM,kBAAkB,GAAG,kCAAkC,CAAC;AAC9D,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;AAEpD;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAkB;IACpD,IAAI,CAAC;QACH,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;YAChC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;YAC/D,IAAI,IAAI,EAAE,MAAM,IAAI,IAAI,EAAE,MAAM,EAAE,CA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AK,CAAC,MAAM,EAAE,CAAC,CAAC;IACnF,OAAO,GAAG,kBAAkB,IAAI,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,KAAmB,EAAE,MAAuC;IAC9F,MAAM,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAE9B,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;IAClD,MAAM,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;IACtE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEhB,IAAI,CAAC;QACH,kCAAkC;QAClC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAC/C,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC;QAC7D,QAAQ,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,EAAU,EAAE,EAAE;YAC5C,KAAK,MAAM,IAAI,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;gBAClC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,MAAM,CAAC,IAAI,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;IACxC,MAAM,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;AACnD,CAAC"}
|
package/dist/connector.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
|
2
2
|
import { startConnector, stopConnector } from "./connector.js";
|
|
3
3
|
export default definePluginEntry({
|
|
4
4
|
id: "openclaw-connector",
|
|
5
|
-
name: "
|
|
6
|
-
description: "Connects this OpenClaw instance to
|
|
5
|
+
name: "WISHEE OpenClaw Connector",
|
|
6
|
+
description: "Connects this OpenClaw instance to the WISHEE bridge via reverse WebSocket",
|
|
7
7
|
register(api) {
|
|
8
8
|
api.registerService({
|
|
9
9
|
id: "openclaw-connector",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/D,eAAe,iBAAiB,CAAC;IAC/B,EAAE,EAAE,oBAAoB;IACxB,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/D,eAAe,iBAAiB,CAAC;IAC/B,EAAE,EAAE,oBAAoB;IACxB,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,4EAA4E;IACzF,QAAQ,CAAC,GAAG;QACV,GAAG,CAAC,eAAe,CAAC;YAClB,EAAE,EAAE,oBAAoB;YACxB,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,cAAc,CAAC,GAAU,EAAE,GAAG,CAAC;YAC/C,IAAI,EAAE,GAAG,EAAE,CAAC,aAAa,EAAE;SAC5B,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "openclaw-connector",
|
|
3
|
-
"name": "
|
|
4
|
-
"description": "Connects this OpenClaw instance to
|
|
3
|
+
"name": "WISHEE OpenClaw Connector",
|
|
4
|
+
"description": "Connects this OpenClaw instance to the WISHEE bridge via reverse WebSocket",
|
|
5
|
+
"activation": {
|
|
6
|
+
"onStartup": true
|
|
7
|
+
},
|
|
5
8
|
"configSchema": {
|
|
6
9
|
"type": "object",
|
|
7
10
|
"additionalProperties": false,
|
package/package.json
CHANGED
|
@@ -1,17 +1,53 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wishee-ai/openclaw-connector",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Connect OpenClaw to
|
|
5
|
+
"description": "Connect OpenClaw to the WISHEE bridge via reverse WebSocket",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
-
"exports": {
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"openclaw.plugin.json"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"clean": "rm -rf dist",
|
|
18
|
+
"prebuild": "npm run clean",
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"prepublishOnly": "npm run build"
|
|
21
|
+
},
|
|
10
22
|
"license": "MIT",
|
|
11
|
-
"keywords": [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
23
|
+
"keywords": [
|
|
24
|
+
"openclaw",
|
|
25
|
+
"wishee",
|
|
26
|
+
"connector",
|
|
27
|
+
"bridge"
|
|
28
|
+
],
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"ws": "^8.18.0",
|
|
31
|
+
"qrcode-terminal": "^0.12.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"openclaw": "^2026.6.10",
|
|
35
|
+
"@types/ws": "^8.5.0",
|
|
36
|
+
"@types/qrcode-terminal": "^0.12.0",
|
|
37
|
+
"@types/node": "^22.0.0",
|
|
38
|
+
"typescript": "^5.7.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"openclaw": ">=2026.3.0"
|
|
42
|
+
},
|
|
43
|
+
"peerDependenciesMeta": {
|
|
44
|
+
"openclaw": {
|
|
45
|
+
"optional": true
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"openclaw": {
|
|
49
|
+
"extensions": [
|
|
50
|
+
"./dist/index.js"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
17
53
|
}
|