@dhfpub/clawpool-openclaw 0.4.1 → 0.4.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/README.md +2 -2
- package/dist/index.js +14 -19
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ This plugin is the Clawpool channel transport for OpenClaw.
|
|
|
4
4
|
|
|
5
5
|
Compatibility:
|
|
6
6
|
|
|
7
|
-
- Requires `OpenClaw
|
|
7
|
+
- Requires `OpenClaw >= 2026.3.13`
|
|
8
8
|
|
|
9
9
|
Its runtime remains focused on channel responsibilities:
|
|
10
10
|
|
|
@@ -31,7 +31,7 @@ If you are reading the admin plugin documentation first, also read:
|
|
|
31
31
|
|
|
32
32
|
## Install
|
|
33
33
|
|
|
34
|
-
Before install, confirm your local OpenClaw version is greater than `2026.3.13`.
|
|
34
|
+
Before install, confirm your local OpenClaw version is greater than or equal to `2026.3.13`.
|
|
35
35
|
|
|
36
36
|
### Base Channel Transport
|
|
37
37
|
|
package/dist/index.js
CHANGED
|
@@ -5,10 +5,8 @@ import { emptyPluginConfigSchema } from "openclaw/plugin-sdk/core";
|
|
|
5
5
|
import {
|
|
6
6
|
applyAccountNameToChannelSection as applyAccountNameToChannelSection2,
|
|
7
7
|
deleteAccountFromConfigSection,
|
|
8
|
-
formatPairingApproveHint,
|
|
9
8
|
setAccountEnabledInConfigSection
|
|
10
9
|
} from "openclaw/plugin-sdk/core";
|
|
11
|
-
import { waitUntilAbort } from "openclaw/plugin-sdk/channel-lifecycle";
|
|
12
10
|
|
|
13
11
|
// src/account-id.ts
|
|
14
12
|
var DEFAULT_ACCOUNT_ID = "default";
|
|
@@ -27,7 +25,7 @@ function normalizeAccountId(raw) {
|
|
|
27
25
|
import {
|
|
28
26
|
jsonResult,
|
|
29
27
|
readStringParam
|
|
30
|
-
} from "openclaw/plugin-sdk
|
|
28
|
+
} from "openclaw/plugin-sdk";
|
|
31
29
|
|
|
32
30
|
// src/accounts.ts
|
|
33
31
|
function rawAibotConfig(cfg) {
|
|
@@ -2003,11 +2001,6 @@ var clawpoolExecApprovalAdapter = {
|
|
|
2003
2001
|
beforeDeliverPending: () => void 0
|
|
2004
2002
|
};
|
|
2005
2003
|
|
|
2006
|
-
// src/monitor.ts
|
|
2007
|
-
import {
|
|
2008
|
-
createReplyPrefixOptions
|
|
2009
|
-
} from "openclaw/plugin-sdk/channel-runtime";
|
|
2010
|
-
|
|
2011
2004
|
// src/active-reply-runs.ts
|
|
2012
2005
|
var runsByEvent = /* @__PURE__ */ new Map();
|
|
2013
2006
|
var eventKeyBySession = /* @__PURE__ */ new Map();
|
|
@@ -3046,7 +3039,7 @@ function shouldTreatDispatchAsRespondedWithoutVisibleOutput(result) {
|
|
|
3046
3039
|
import {
|
|
3047
3040
|
resolveOutboundMediaUrls,
|
|
3048
3041
|
sendMediaWithLeadingCaption
|
|
3049
|
-
} from "openclaw/plugin-sdk
|
|
3042
|
+
} from "openclaw/plugin-sdk";
|
|
3050
3043
|
|
|
3051
3044
|
// src/outbound-text-delivery-plan.ts
|
|
3052
3045
|
function buildAibotTextSendPlan(params) {
|
|
@@ -3642,12 +3635,7 @@ async function processEvent(params) {
|
|
|
3642
3635
|
inboundEventAccepted = true;
|
|
3643
3636
|
}
|
|
3644
3637
|
const outboundQuotedMessageId = normalizeNumericMessageId(event.msg_id);
|
|
3645
|
-
const
|
|
3646
|
-
cfg: config,
|
|
3647
|
-
agentId: route.agentId,
|
|
3648
|
-
channel: "clawpool",
|
|
3649
|
-
accountId: account.accountId
|
|
3650
|
-
});
|
|
3638
|
+
const prefixOptions = {};
|
|
3651
3639
|
const tableMode = core.channel.text.resolveMarkdownTableMode({
|
|
3652
3640
|
cfg: config,
|
|
3653
3641
|
channel: "clawpool",
|
|
@@ -3916,8 +3904,7 @@ async function processEvent(params) {
|
|
|
3916
3904
|
}
|
|
3917
3905
|
},
|
|
3918
3906
|
replyOptions: {
|
|
3919
|
-
abortSignal: runAbortController.signal
|
|
3920
|
-
onModelSelected
|
|
3907
|
+
abortSignal: runAbortController.signal
|
|
3921
3908
|
}
|
|
3922
3909
|
});
|
|
3923
3910
|
runtime2.log(
|
|
@@ -4251,6 +4238,14 @@ var AibotConfigSchema = {
|
|
|
4251
4238
|
additionalProperties: true,
|
|
4252
4239
|
properties: {}
|
|
4253
4240
|
};
|
|
4241
|
+
function waitForAbort(signal) {
|
|
4242
|
+
if (signal.aborted) {
|
|
4243
|
+
return Promise.resolve();
|
|
4244
|
+
}
|
|
4245
|
+
return new Promise((resolve) => {
|
|
4246
|
+
signal.addEventListener("abort", () => resolve(), { once: true });
|
|
4247
|
+
});
|
|
4248
|
+
}
|
|
4254
4249
|
function chunkTextForOutbound(text, limit) {
|
|
4255
4250
|
if (!text) return [];
|
|
4256
4251
|
if (limit <= 0 || text.length <= limit) return [text];
|
|
@@ -4386,7 +4381,7 @@ var aibotPlugin = {
|
|
|
4386
4381
|
allowFrom: account.config.allowFrom ?? [],
|
|
4387
4382
|
policyPath: `${basePath}dmPolicy`,
|
|
4388
4383
|
allowFromPath: basePath,
|
|
4389
|
-
approveHint:
|
|
4384
|
+
approveHint: "openclaw pairing approve clawpool <code>"
|
|
4390
4385
|
};
|
|
4391
4386
|
}
|
|
4392
4387
|
},
|
|
@@ -4626,7 +4621,7 @@ var aibotPlugin = {
|
|
|
4626
4621
|
}
|
|
4627
4622
|
});
|
|
4628
4623
|
try {
|
|
4629
|
-
await
|
|
4624
|
+
await waitForAbort(ctx.abortSignal);
|
|
4630
4625
|
} finally {
|
|
4631
4626
|
monitor.stop();
|
|
4632
4627
|
ctx.setStatus({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhfpub/clawpool-openclaw",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "OpenClaw channel plugin for ClawPool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"esbuild": "0.27.4"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"openclaw": "
|
|
58
|
+
"openclaw": ">=2026.3.13"
|
|
59
59
|
},
|
|
60
60
|
"openclaw": {
|
|
61
61
|
"extensions": [
|