multi-openim-channel 0.1.0 → 0.1.1
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.js +4 -2
- package/dist/types.d.ts +10 -11
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32,9 +32,11 @@ export default function register(api) {
|
|
|
32
32
|
sub
|
|
33
33
|
.command("setup")
|
|
34
34
|
.description("Interactive setup for a multi-openim account (default account: \"primary\")")
|
|
35
|
-
.
|
|
35
|
+
.option("--account <id>", "Account id to configure (default: primary)")
|
|
36
|
+
.action(async (opts) => {
|
|
36
37
|
const { runSetup } = await import("./setup.js");
|
|
37
|
-
|
|
38
|
+
const accountId = typeof opts?.account === "string" ? opts.account : undefined;
|
|
39
|
+
await runSetup({ accountId });
|
|
38
40
|
});
|
|
39
41
|
}
|
|
40
42
|
}, { commands: ["multi-openim"] });
|
package/dist/types.d.ts
CHANGED
|
@@ -137,6 +137,15 @@ export interface RegisterServiceParams {
|
|
|
137
137
|
start(): Promise<void> | void;
|
|
138
138
|
stop(): Promise<void> | void;
|
|
139
139
|
}
|
|
140
|
+
export interface CliCommandBuilder {
|
|
141
|
+
description(desc: string): CliCommandBuilder;
|
|
142
|
+
command(sub: string): CliCommandBuilder;
|
|
143
|
+
option(flags: string, description: string): CliCommandBuilder;
|
|
144
|
+
action(handler: (opts?: Record<string, unknown>) => Promise<void> | void): void;
|
|
145
|
+
}
|
|
146
|
+
export interface CliProgram {
|
|
147
|
+
command(name: string): CliCommandBuilder;
|
|
148
|
+
}
|
|
140
149
|
export interface PluginApi {
|
|
141
150
|
config?: unknown;
|
|
142
151
|
runtime?: unknown;
|
|
@@ -147,17 +156,7 @@ export interface PluginApi {
|
|
|
147
156
|
registerTool?(spec: RegisterToolParams): void;
|
|
148
157
|
registerService?(spec: RegisterServiceParams): void;
|
|
149
158
|
registerCli?(cb: (ctx: {
|
|
150
|
-
program:
|
|
151
|
-
command(name: string): {
|
|
152
|
-
description(desc: string): {
|
|
153
|
-
command(sub: string): {
|
|
154
|
-
description(d: string): {
|
|
155
|
-
action(handler: () => Promise<void> | void): void;
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
};
|
|
159
|
+
program: CliProgram;
|
|
161
160
|
}) => void, opts?: {
|
|
162
161
|
commands?: string[];
|
|
163
162
|
}): void;
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "multi-openim-channel",
|
|
3
3
|
"name": "Multi-OpenIM Channel",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"description": "Multi-account / multi-server OpenIM channel plugin for OpenClaw, with config-driven HTTP token refresh and an optional friend-API guard",
|
|
6
6
|
"author": "Multi-OpenIM",
|
|
7
7
|
"channels": ["multi-openim"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "multi-openim-channel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Multi-account / multi-server OpenIM channel plugin for OpenClaw, with config-driven token refresh and an optional friend-API guard",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Multi-OpenIM",
|