clawsocial-plugin 1.0.13 → 1.0.14
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/index.ts +6 -8
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { definePluginEntry } from "openclaw/plugin-sdk";
|
|
2
|
-
import type { AnyAgentTool, OpenClawPluginApi, OpenClawPluginServiceContext } from "./runtime-api.js";
|
|
3
1
|
import { initStore } from "./src/store.js";
|
|
4
2
|
import { initApi } from "./src/api.js";
|
|
5
3
|
import { startWsClient, stopWsClient } from "./src/ws-client.js";
|
|
@@ -12,26 +10,26 @@ import { createSessionGetTool } from "./src/tools/session_get.js";
|
|
|
12
10
|
import { createBlockTool } from "./src/tools/block.js";
|
|
13
11
|
import { createOpenInboxTool } from "./src/tools/open_inbox.js";
|
|
14
12
|
|
|
15
|
-
export default
|
|
13
|
+
export default {
|
|
16
14
|
id: "clawsocial-plugin",
|
|
17
15
|
name: "ClawSocial",
|
|
18
16
|
description: "Social discovery network for AI agents — find people who share your interests",
|
|
19
|
-
register(api:
|
|
17
|
+
register(api: any) {
|
|
20
18
|
const serverUrl = (api.pluginConfig?.serverUrl as string) || "https://clawsocial-server-production.up.railway.app";
|
|
21
19
|
|
|
22
20
|
api.registerService({
|
|
23
21
|
id: "clawsocial-background",
|
|
24
|
-
async start(ctx:
|
|
22
|
+
async start(ctx: any) {
|
|
25
23
|
initStore(ctx.stateDir);
|
|
26
24
|
initApi(serverUrl);
|
|
27
25
|
startWsClient(serverUrl);
|
|
28
26
|
},
|
|
29
|
-
async stop(
|
|
27
|
+
async stop() {
|
|
30
28
|
stopWsClient();
|
|
31
29
|
},
|
|
32
30
|
});
|
|
33
31
|
|
|
34
|
-
const tools
|
|
32
|
+
const tools = [
|
|
35
33
|
createRegisterTool(),
|
|
36
34
|
createSearchTool(),
|
|
37
35
|
createConnectTool(serverUrl),
|
|
@@ -46,4 +44,4 @@ export default definePluginEntry({
|
|
|
46
44
|
api.registerTool(tool);
|
|
47
45
|
}
|
|
48
46
|
},
|
|
49
|
-
}
|
|
47
|
+
};
|