@2en/clawly-plugins 1.6.0 → 1.7.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/gateway-fetch.ts +5 -7
- package/index.ts +1 -1
- package/openclaw.plugin.json +3 -3
- package/package.json +1 -1
package/gateway-fetch.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared helpers for plugins that proxy to the Clawly
|
|
2
|
+
* Shared helpers for plugins that proxy to the Clawly skill-gateway backend.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import type {PluginApi} from './index'
|
|
@@ -10,14 +10,12 @@ export type HandlerResult = {ok: boolean; data?: unknown; error?: {code: string;
|
|
|
10
10
|
|
|
11
11
|
export function getGatewayConfig(api: PluginApi): GatewayCfg {
|
|
12
12
|
const cfg = api.pluginConfig && typeof api.pluginConfig === 'object' ? api.pluginConfig : {}
|
|
13
|
+
const c = cfg as Record<string, unknown>
|
|
13
14
|
const baseUrl =
|
|
14
|
-
typeof
|
|
15
|
-
? (
|
|
16
|
-
: ''
|
|
17
|
-
const token =
|
|
18
|
-
typeof (cfg as Record<string, unknown>).gatewayToken === 'string'
|
|
19
|
-
? ((cfg as Record<string, unknown>).gatewayToken as string)
|
|
15
|
+
typeof c.skillGatewayBaseUrl === 'string'
|
|
16
|
+
? (c.skillGatewayBaseUrl as string).replace(/\/$/, '')
|
|
20
17
|
: ''
|
|
18
|
+
const token = typeof c.skillGatewayToken === 'string' ? (c.skillGatewayToken as string) : ''
|
|
21
19
|
return {baseUrl, token}
|
|
22
20
|
}
|
|
23
21
|
|
package/index.ts
CHANGED
|
@@ -105,7 +105,7 @@ export default {
|
|
|
105
105
|
registerCronHook(api)
|
|
106
106
|
registerGateway(api)
|
|
107
107
|
|
|
108
|
-
// Email & calendar (optional — requires
|
|
108
|
+
// Email & calendar (optional — requires skillGatewayBaseUrl + skillGatewayToken in config)
|
|
109
109
|
const gw = getGatewayConfig(api)
|
|
110
110
|
if (gw.baseUrl && gw.token) {
|
|
111
111
|
registerEmail(api, gw)
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "clawly-plugins",
|
|
3
3
|
"name": "Clawly Plugins",
|
|
4
4
|
"description": "Clawly utility RPC methods (clawly.*): file access, presence, push notifications, agent messaging, memory browser, and ClawHub CLI bridge.",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.3.0",
|
|
6
6
|
"uiHints": {
|
|
7
7
|
"memoryDir": {
|
|
8
8
|
"label": "Memory directory",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"defaultNoInput": { "type": "boolean" },
|
|
47
47
|
"defaultTimeoutMs": { "type": "number", "minimum": 1000 },
|
|
48
48
|
"configPath": { "type": "string" },
|
|
49
|
-
"
|
|
50
|
-
"
|
|
49
|
+
"skillGatewayBaseUrl": { "type": "string" },
|
|
50
|
+
"skillGatewayToken": { "type": "string" }
|
|
51
51
|
},
|
|
52
52
|
"required": []
|
|
53
53
|
}
|