@taptapai/taptapai-openclaw 0.1.1 → 0.2.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/openclaw.plugin.json +2 -2
- package/package.json +1 -1
- package/src/constants.ts +9 -6
- package/src/openclawConfig.ts +7 -0
package/openclaw.plugin.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"backendWsUrl": {
|
|
14
14
|
"type": "string",
|
|
15
|
-
"description": "WebSocket URL to the TapTapAI backend (e.g., wss://taptapai.example.com/ws/openclaw/v2).
|
|
15
|
+
"description": "WebSocket URL to the TapTapAI backend (e.g., wss://taptapai.example.com/ws/openclaw/v2). Set to an empty string to disable WS mode and use relay-only."
|
|
16
16
|
},
|
|
17
17
|
"wsToken": {
|
|
18
18
|
"type": "string",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"relayUrl": {
|
|
22
22
|
"type": "string",
|
|
23
|
-
"description": "Fallback HTTP relay URL (e.g., https://taptapai.example.com). Used when WebSocket is unavailable.
|
|
23
|
+
"description": "Fallback HTTP relay URL (e.g., https://taptapai.example.com). Used when WebSocket is unavailable. Set to an empty string to disable relay fallback."
|
|
24
24
|
},
|
|
25
25
|
"token": {
|
|
26
26
|
"type": "string",
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
// OpenClaw plugin id used in openclaw config: plugins.entries.<id>
|
|
2
|
+
// Keep stable: `taptapai-openclaw`.
|
|
1
3
|
export const PLUGIN_ID = "taptapai-openclaw";
|
|
4
|
+
|
|
5
|
+
// Legacy id used by a short-lived migration attempt.
|
|
2
6
|
export const LEGACY_PLUGIN_ID = "taptapai";
|
|
3
7
|
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
export const
|
|
8
|
-
export const
|
|
9
|
-
export const DEFAULT_RELAY_URL = "";
|
|
8
|
+
// Default hosted backend targets.
|
|
9
|
+
// NOTE: These are used to prefill first-run config; users can override them.
|
|
10
|
+
export const DEFAULT_BACKEND_HOST = "taptapai-openclaw.gettaptap.ai";
|
|
11
|
+
export const DEFAULT_BACKEND_WS_URL = "wss://taptapai-openclaw.gettaptap.ai/ws/openclaw/v2";
|
|
12
|
+
export const DEFAULT_RELAY_URL = "https://taptapai-openclaw.gettaptap.ai/";
|
|
10
13
|
|
|
11
14
|
export const MAX_RECONNECT_DELAY_MS = 30_000;
|
|
12
15
|
|
package/src/openclawConfig.ts
CHANGED
|
@@ -101,6 +101,13 @@ export function migrateLegacyPluginEntryKey(cfg: any): boolean {
|
|
|
101
101
|
if (!cfg.plugins.entries[LEGACY_PLUGIN_ID]) return false;
|
|
102
102
|
cfg.plugins.entries[PLUGIN_ID] = cfg.plugins.entries[LEGACY_PLUGIN_ID];
|
|
103
103
|
delete cfg.plugins.entries[LEGACY_PLUGIN_ID];
|
|
104
|
+
|
|
105
|
+
// Best-effort migration of install metadata to match the active id.
|
|
106
|
+
// This avoids confusing warnings like: "plugin id mismatch (manifest uses X, entry hints Y)".
|
|
107
|
+
if (cfg?.plugins?.installs && !cfg.plugins.installs[PLUGIN_ID] && cfg.plugins.installs[LEGACY_PLUGIN_ID]) {
|
|
108
|
+
cfg.plugins.installs[PLUGIN_ID] = cfg.plugins.installs[LEGACY_PLUGIN_ID];
|
|
109
|
+
delete cfg.plugins.installs[LEGACY_PLUGIN_ID];
|
|
110
|
+
}
|
|
104
111
|
return true;
|
|
105
112
|
} catch {
|
|
106
113
|
return false;
|