@coolclaw/coolclaw 0.3.1 → 0.3.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/{chunk-D4S6TJVL.js → chunk-ASAPYHCD.js} +2 -3
- package/dist/{chunk-BWFXW7X6.js → chunk-UQDUXUWV.js} +32 -3
- package/dist/cli-metadata.d.ts +1 -1
- package/dist/cli-metadata.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/setup-entry.d.ts +2 -2
- package/dist/setup-entry.js +2 -2
- package/package.json +4 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
coolclawChannelPlugin,
|
|
3
3
|
setCoolclawRuntime
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UQDUXUWV.js";
|
|
5
5
|
import {
|
|
6
6
|
runCoolclawSetup
|
|
7
7
|
} from "./chunk-A54AF634.js";
|
|
@@ -11,8 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-Q3NF4NWE.js";
|
|
12
12
|
|
|
13
13
|
// index.ts
|
|
14
|
-
import { defineChannelPluginEntry } from "openclaw/plugin-sdk/
|
|
15
|
-
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
|
14
|
+
import { defineChannelPluginEntry, buildChannelConfigSchema } from "openclaw/plugin-sdk/core";
|
|
16
15
|
|
|
17
16
|
// src/cli.ts
|
|
18
17
|
function registerCoolclawCli(options) {
|
|
@@ -681,9 +681,38 @@ function getPluginVersion() {
|
|
|
681
681
|
}
|
|
682
682
|
|
|
683
683
|
// src/channel.ts
|
|
684
|
-
import {
|
|
685
|
-
|
|
686
|
-
|
|
684
|
+
import {
|
|
685
|
+
createChatChannelPlugin
|
|
686
|
+
} from "openclaw/plugin-sdk/core";
|
|
687
|
+
function createAccountStatusSink(params) {
|
|
688
|
+
return (patch) => {
|
|
689
|
+
params.setStatus({ accountId: params.accountId, ...patch });
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
async function runPassiveAccountLifecycle(params) {
|
|
693
|
+
const handle = await params.start();
|
|
694
|
+
try {
|
|
695
|
+
await new Promise((resolve) => {
|
|
696
|
+
if (!params.abortSignal) return;
|
|
697
|
+
if (params.abortSignal.aborted) {
|
|
698
|
+
resolve();
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
params.abortSignal.addEventListener("abort", () => resolve(), { once: true });
|
|
702
|
+
});
|
|
703
|
+
} finally {
|
|
704
|
+
await params.stop?.(handle);
|
|
705
|
+
await params.onStop?.();
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
function logInboundDrop(params) {
|
|
709
|
+
const target = params.target ? ` target=${params.target}` : "";
|
|
710
|
+
params.log(`${params.channel}: drop ${params.reason}${target}`);
|
|
711
|
+
}
|
|
712
|
+
function logAckFailure(params) {
|
|
713
|
+
const target = params.target ? ` target=${params.target}` : "";
|
|
714
|
+
params.log(`${params.channel} ack cleanup failed${target}: ${String(params.error)}`);
|
|
715
|
+
}
|
|
687
716
|
var runtimeClients = /* @__PURE__ */ new Map();
|
|
688
717
|
function setRuntimeClient(accountKey, client) {
|
|
689
718
|
runtimeClients.set(accountKey, client);
|
package/dist/cli-metadata.d.ts
CHANGED
package/dist/cli-metadata.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OpenClawPluginApi, ChannelPlugin, PluginRuntime } from 'openclaw/plugin-sdk/
|
|
1
|
+
import { OpenClawPluginApi, ChannelPlugin, PluginRuntime } from 'openclaw/plugin-sdk/core';
|
|
2
2
|
import { C as CoolclawAccount } from './types-y7-Cr6xf.js';
|
|
3
3
|
|
|
4
4
|
declare const entry: {
|
package/dist/index.js
CHANGED
package/dist/setup-entry.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as openclaw_plugin_sdk_core from 'openclaw/plugin-sdk/core';
|
|
2
2
|
import { C as CoolclawAccount } from './types-y7-Cr6xf.js';
|
|
3
3
|
|
|
4
4
|
declare const _default: {
|
|
5
|
-
plugin:
|
|
5
|
+
plugin: openclaw_plugin_sdk_core.ChannelPlugin<CoolclawAccount, unknown, unknown>;
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export { _default as default };
|
package/dist/setup-entry.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
coolclawChannelPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UQDUXUWV.js";
|
|
4
4
|
import "./chunk-Q3NF4NWE.js";
|
|
5
5
|
|
|
6
6
|
// setup-entry.ts
|
|
7
|
-
import { defineSetupPluginEntry } from "openclaw/plugin-sdk/
|
|
7
|
+
import { defineSetupPluginEntry } from "openclaw/plugin-sdk/core";
|
|
8
8
|
var setup_entry_default = defineSetupPluginEntry(coolclawChannelPlugin);
|
|
9
9
|
export {
|
|
10
10
|
setup_entry_default as default
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coolclaw/coolclaw",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "OpenClaw native channel plugin for Riddle/CoolClaw chat.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"runtimeSetupEntry": "./dist/setup-entry.js",
|
|
60
60
|
"install": {
|
|
61
61
|
"npmSpec": "@coolclaw/coolclaw",
|
|
62
|
-
"expectedIntegrity": "sha512-
|
|
62
|
+
"expectedIntegrity": "sha512-JmNBFiIo4XPTkk1bqjtRZcP8HhdOJr1ng6OV6g0u0wFJA7IWFn3SxxNDtAbc6BnYRyDzY3MUj+Slaa7DoGXWPQ==",
|
|
63
63
|
"defaultChoice": "npm",
|
|
64
64
|
"minHostVersion": ">=2026.3.22"
|
|
65
65
|
},
|
|
@@ -77,7 +77,8 @@
|
|
|
77
77
|
},
|
|
78
78
|
"compat": {
|
|
79
79
|
"pluginApi": ">=2026.3.22",
|
|
80
|
-
"minGatewayVersion": "2026.3.22"
|
|
80
|
+
"minGatewayVersion": "2026.3.22",
|
|
81
|
+
"sdkImports": ["openclaw/plugin-sdk/core"]
|
|
81
82
|
},
|
|
82
83
|
"build": {
|
|
83
84
|
"openclawVersion": "2026.4.20",
|