@coolclaw/coolclaw 0.2.5 → 0.2.6

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.
@@ -112,4 +112,4 @@ type CoolclawChannelPlugin = {
112
112
  };
113
113
  declare const coolclawChannelPlugin: CoolclawChannelPlugin;
114
114
 
115
- export { coolclawChannelPlugin as c };
115
+ export { type CoolclawChannelPlugin as C, coolclawChannelPlugin as c };
@@ -11,6 +11,9 @@ import {
11
11
  touchBinding
12
12
  } from "./chunk-BPNTPLYX.js";
13
13
 
14
+ // index.ts
15
+ import { defineChannelPluginEntry } from "openclaw/plugin-sdk/core";
16
+
14
17
  // src/setup.ts
15
18
  import { access } from "fs/promises";
16
19
  import { readFile as readFile3 } from "fs/promises";
@@ -360,32 +363,32 @@ function splitCsv(value) {
360
363
  }
361
364
 
362
365
  // index.ts
363
- function _register(api) {
364
- api.registerChannel({ plugin: coolclawChannelPlugin });
365
- api.registerCli?.(
366
- ({ program, workspaceDir }) => {
367
- registerCoolclawCli({ program, workspaceDir });
368
- },
369
- {
370
- descriptors: [
371
- {
372
- name: "coolclaw",
373
- description: "Manage the CoolClaw/Riddle channel",
374
- hasSubcommands: true
375
- }
376
- ]
377
- }
378
- );
379
- }
380
- var register = _register;
381
- var index_default = {
366
+ var index_default = defineChannelPluginEntry({
382
367
  id: "coolclaw",
383
368
  name: "CoolClaw Channel",
384
369
  description: "CoolClaw/Riddle messaging channel for OpenClaw",
385
- register: _register
386
- };
370
+ plugin: coolclawChannelPlugin,
371
+ registerFull(api) {
372
+ api.registerCli(
373
+ ({ program, workspaceDir }) => {
374
+ registerCoolclawCli({
375
+ program,
376
+ workspaceDir
377
+ });
378
+ },
379
+ {
380
+ descriptors: [
381
+ {
382
+ name: "coolclaw",
383
+ description: "Manage the CoolClaw/Riddle channel",
384
+ hasSubcommands: true
385
+ }
386
+ ]
387
+ }
388
+ );
389
+ }
390
+ });
387
391
 
388
392
  export {
389
- register,
390
393
  index_default
391
394
  };
@@ -1,5 +1,6 @@
1
1
  import _default from './index.js';
2
- import './channel-BozkcSms.js';
2
+ import './channel-C5YYO-tp.js';
3
+ import 'openclaw/plugin-sdk/core';
3
4
 
4
5
 
5
6
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  index_default
3
- } from "./chunk-KQ6KNORZ.js";
3
+ } from "./chunk-BMUQJBAA.js";
4
4
  import "./chunk-BPNTPLYX.js";
5
5
 
6
6
  // cli-metadata.ts
package/dist/index.d.ts CHANGED
@@ -1,27 +1,17 @@
1
- import { c as coolclawChannelPlugin } from './channel-BozkcSms.js';
1
+ import { C as CoolclawChannelPlugin } from './channel-C5YYO-tp.js';
2
+ import * as openclaw_plugin_sdk_core from 'openclaw/plugin-sdk/core';
2
3
 
3
- type OpenClawPluginApi = {
4
- registerChannel(input: {
5
- plugin: typeof coolclawChannelPlugin;
6
- }): void;
7
- registerCli?(registrar: (ctx: {
8
- program: unknown;
9
- workspaceDir?: string;
10
- }) => void | Promise<void>, opts?: {
11
- descriptors?: Array<{
12
- name: string;
13
- description: string;
14
- hasSubcommands: boolean;
15
- }>;
16
- }): void;
17
- };
18
- declare function _register(api: OpenClawPluginApi): void;
19
- declare const register: typeof _register;
4
+ /**
5
+ * 使用 OpenClaw 官方 SDK 辅助函数定义插件入口。
6
+ * defineChannelPluginEntry 保证导出形状与加载器完全兼容,
7
+ * 避免 Jiti interopDefault 在不同版本间的差异导致 "missing register/activate" 错误。
8
+ */
20
9
  declare const _default: {
21
10
  id: string;
22
11
  name: string;
23
12
  description: string;
24
- register: typeof _register;
13
+ register: (api: openclaw_plugin_sdk_core.OpenClawPluginApi) => void;
14
+ channelPlugin: CoolclawChannelPlugin;
25
15
  };
26
16
 
27
- export { _default as default, register };
17
+ export { _default as default };
package/dist/index.js CHANGED
@@ -1,9 +1,7 @@
1
1
  import {
2
- index_default,
3
- register
4
- } from "./chunk-KQ6KNORZ.js";
2
+ index_default
3
+ } from "./chunk-BMUQJBAA.js";
5
4
  import "./chunk-BPNTPLYX.js";
6
5
  export {
7
- index_default as default,
8
- register
6
+ index_default as default
9
7
  };
@@ -1,4 +1,4 @@
1
- import { c as coolclawChannelPlugin } from './channel-BozkcSms.js';
1
+ import { c as coolclawChannelPlugin } from './channel-C5YYO-tp.js';
2
2
 
3
3
 
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolclaw/coolclaw",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "OpenClaw native channel plugin for Riddle/CoolClaw chat.",
5
5
  "type": "module",
6
6
  "files": [
@@ -24,7 +24,7 @@
24
24
  "directory": "plugins/openclaw-coolclaw-channel"
25
25
  },
26
26
  "scripts": {
27
- "build": "tsup index.ts setup-entry.ts cli-metadata.ts --format esm --dts --out-dir dist --clean",
27
+ "build": "tsup index.ts setup-entry.ts cli-metadata.ts --format esm --dts --out-dir dist --clean --external openclaw",
28
28
  "test": "vitest run",
29
29
  "lint": "tsc --noEmit"
30
30
  },
@@ -58,7 +58,7 @@
58
58
  "runtimeSetupEntry": "./dist/setup-entry.js",
59
59
  "install": {
60
60
  "npmSpec": "@coolclaw/coolclaw",
61
- "expectedIntegrity": "sha512-4WHp7Zp+9tMVo7foZ/yHFh0DpEP/HD10E85DlBvQHjtRGKTBc8DMY55Wy45Zh8eK5hJLJtj8aZ8nKCfdpOZ7Eg==",
61
+ "expectedIntegrity": "sha512-21+YAc9tyYHlS10KamBaj8op+IeltxJVPEa6VvnhyG3b3zxY+A0UDUtIlpLEYb7laxCeHC603//wbuHddkc4cA==",
62
62
  "defaultChoice": "npm",
63
63
  "minHostVersion": ">=2026.3.13"
64
64
  },