openclaw-extension-typex 1.0.19 → 1.0.21

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/plugin.d.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import type { ChannelMessageActionAdapter } from "openclaw/plugin-sdk/channel-contract";
1
2
  export declare const typexPlugin: {
2
- id: "openclaw-extension-typex";
3
+ id: string;
3
4
  meta: {
4
5
  id: string;
5
6
  label: string;
@@ -9,8 +10,14 @@ export declare const typexPlugin: {
9
10
  docsLabel: string;
10
11
  blurb: string;
11
12
  order: number;
13
+ showInSetup: boolean;
14
+ exposure: {
15
+ setup: boolean;
16
+ docs: boolean;
17
+ configured: boolean;
18
+ };
12
19
  };
13
- onboarding: import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).ChannelOnboardingAdapter;
20
+ setupWizard: import("openclaw/plugin-sdk/setup", { with: { "resolution-mode": "import" } }).ChannelSetupWizardAdapter;
14
21
  capabilities: {
15
22
  chatTypes: ("group" | "direct")[];
16
23
  media: true;
@@ -18,8 +25,15 @@ export declare const typexPlugin: {
18
25
  threads: false;
19
26
  polls: false;
20
27
  nativeCommands: false;
21
- blockStreaming: false;
28
+ blockStreaming: true;
29
+ };
30
+ agentPrompt: {
31
+ messageToolHints: () => string[];
22
32
  };
33
+ agentTools: ({ cfg }: {
34
+ cfg?: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
35
+ }) => import("openclaw/plugin-sdk/channel-contract", { with: { "resolution-mode": "import" } }).ChannelAgentTool[];
36
+ actions: ChannelMessageActionAdapter;
23
37
  reload: {
24
38
  configPrefixes: string[];
25
39
  };
@@ -27,14 +41,14 @@ export declare const typexPlugin: {
27
41
  messaging: {
28
42
  normalizeTarget: (t: string) => string;
29
43
  targetResolver: {
30
- looksLikeId: () => true;
44
+ looksLikeId: (raw: string) => boolean;
31
45
  hint: string;
32
46
  };
33
47
  };
34
- configSchema: import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).ChannelConfigSchema;
48
+ configSchema: import("../node_modules/openclaw/dist/plugin-sdk/src/channels/plugins/types.plugin.js", { with: { "resolution-mode": "import" } }).ChannelConfigSchema;
35
49
  config: {
36
- listAccountIds: (cfg: import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).OpenClawConfig) => string[];
37
- resolveAccount: (cfg: import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).OpenClawConfig, accountId: string | null | undefined) => {
50
+ listAccountIds: (cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig) => string[];
51
+ resolveAccount: (cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig, accountId: string | null | undefined) => {
38
52
  accountId: string;
39
53
  name: any;
40
54
  enabled: boolean;
@@ -42,16 +56,16 @@ export declare const typexPlugin: {
42
56
  tokenSource: string;
43
57
  config: any;
44
58
  };
45
- defaultAccountId: (cfg: import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).OpenClawConfig) => string;
59
+ defaultAccountId: (cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig) => string;
46
60
  setAccountEnabled: ({ cfg }: {
47
- cfg: import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).OpenClawConfig;
61
+ cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
48
62
  accountId: string;
49
63
  enabled: boolean;
50
- }) => import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).OpenClawConfig;
64
+ }) => import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
51
65
  deleteAccount: ({ cfg }: {
52
- cfg: import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).OpenClawConfig;
66
+ cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
53
67
  accountId: string;
54
- }) => import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).OpenClawConfig;
68
+ }) => import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
55
69
  isConfigured: (acc: any) => any;
56
70
  describeAccount: (acc: any) => {
57
71
  accountId: any;
@@ -60,11 +74,18 @@ export declare const typexPlugin: {
60
74
  configured: any;
61
75
  tokenSource: any;
62
76
  };
63
- resolveAllowFrom: () => never[];
64
- formatAllowFrom: () => never[];
77
+ resolveAllowFrom: ({ cfg, accountId }: {
78
+ cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
79
+ accountId?: string | null;
80
+ }) => any;
81
+ formatAllowFrom: ({ allowFrom }: {
82
+ cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
83
+ accountId?: string | null;
84
+ allowFrom: Array<string | number>;
85
+ }) => string[];
65
86
  };
66
87
  gateway: {
67
- startAccount: (ctx: import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).ChannelGatewayContext<any>) => Promise<void>;
88
+ startAccount: (ctx: import("openclaw/plugin-sdk/channel-contract", { with: { "resolution-mode": "import" } }).ChannelGatewayContext<any>) => Promise<void>;
68
89
  };
69
90
  security: {
70
91
  resolveDmPolicy: () => {
@@ -77,12 +98,34 @@ export declare const typexPlugin: {
77
98
  };
78
99
  };
79
100
  groups: {
80
- resolveRequireMention: ({ cfg, groupId }: import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).ChannelGroupContext) => any;
101
+ resolveRequireMention: ({ cfg, groupId }: import("openclaw/plugin-sdk/channel-contract", { with: { "resolution-mode": "import" } }).ChannelGroupContext) => any;
81
102
  };
82
103
  directory: {
83
104
  self: () => Promise<null>;
84
- listPeers: () => Promise<never[]>;
85
- listGroups: () => Promise<never[]>;
105
+ listPeers: ({ cfg, accountId, query, limit }: any) => Promise<{
106
+ kind: "user" | "group" | "channel";
107
+ id: string;
108
+ name?: string;
109
+ raw?: unknown;
110
+ }[]>;
111
+ listGroups: ({ cfg, accountId, query, limit }: any) => Promise<{
112
+ kind: "group";
113
+ id: string;
114
+ name: string;
115
+ raw: any;
116
+ }[]>;
117
+ listPeersLive: (params: any) => Promise<{
118
+ kind: "user" | "group" | "channel";
119
+ id: string;
120
+ name?: string;
121
+ raw?: unknown;
122
+ }[]>;
123
+ listGroupsLive: (params: any) => Promise<{
124
+ kind: "group";
125
+ id: string;
126
+ name: string;
127
+ raw: any;
128
+ }[]>;
86
129
  };
87
130
  status: {
88
131
  defaultRuntime: {
@@ -95,9 +138,9 @@ export declare const typexPlugin: {
95
138
  collectStatusIssues: () => never[];
96
139
  buildChannelSummary: ({ snapshot }: {
97
140
  account: any;
98
- cfg: import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).OpenClawConfig;
141
+ cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
99
142
  defaultAccountId: string;
100
- snapshot: import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).ChannelAccountSnapshot;
143
+ snapshot: import("openclaw/plugin-sdk/channel-contract", { with: { "resolution-mode": "import" } }).ChannelAccountSnapshot;
101
144
  }) => Promise<{
102
145
  configured: boolean | undefined;
103
146
  tokenSource: string | undefined;
@@ -114,8 +157,8 @@ export declare const typexPlugin: {
114
157
  }>;
115
158
  buildAccountSnapshot: ({ account, runtime }: {
116
159
  account: any;
117
- cfg: import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).OpenClawConfig;
118
- runtime?: import("openclaw/plugin-sdk", { with: { "resolution-mode": "import" } }).ChannelAccountSnapshot;
160
+ cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
161
+ runtime?: import("openclaw/plugin-sdk/channel-contract", { with: { "resolution-mode": "import" } }).ChannelAccountSnapshot;
119
162
  probe?: unknown;
120
163
  audit?: unknown;
121
164
  }) => {
package/dist/plugin.js CHANGED
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.typexPlugin = void 0;
4
- const plugin_sdk_1 = require("openclaw/plugin-sdk");
4
+ const channel_core_1 = require("openclaw/plugin-sdk/channel-core");
5
+ const account_id_1 = require("openclaw/plugin-sdk/account-id");
6
+ const agent_tools_send_js_1 = require("./agent-tools-send.js");
5
7
  const monitor_js_1 = require("./client/monitor.js");
8
+ const directory_js_1 = require("./directory.js");
6
9
  const outbound_js_1 = require("./client/outbound.js");
7
10
  const config_schema_js_1 = require("./config-schema.js");
8
11
  const onboarding_js_1 = require("./onboarding.js");
@@ -15,11 +18,52 @@ const meta = {
15
18
  docsLabel: "typex",
16
19
  blurb: "TypeX bot via QR Code login.",
17
20
  order: 100,
21
+ showInSetup: true,
22
+ exposure: { setup: true, docs: true, configured: true },
23
+ };
24
+ function listEnabledTypeXAccounts(cfg, accountId) {
25
+ const typexCfg = (cfg?.channels?.["openclaw-extension-typex"] ?? {});
26
+ const accounts = (typexCfg.accounts ?? {});
27
+ if (accountId) {
28
+ const resolvedAccountId = accountId || account_id_1.DEFAULT_ACCOUNT_ID;
29
+ const account = accounts[resolvedAccountId] ||
30
+ (resolvedAccountId === account_id_1.DEFAULT_ACCOUNT_ID ? typexCfg : undefined);
31
+ if (account?.enabled !== false && typeof account?.token === "string" && account.token.trim()) {
32
+ return [{ accountId: resolvedAccountId }];
33
+ }
34
+ return [];
35
+ }
36
+ const enabled = [];
37
+ for (const [listedAccountId, account] of Object.entries(accounts)) {
38
+ if (account?.enabled === false) {
39
+ continue;
40
+ }
41
+ if (typeof account?.token !== "string" || !account.token.trim()) {
42
+ continue;
43
+ }
44
+ enabled.push({ accountId: listedAccountId });
45
+ }
46
+ if (enabled.length === 0 &&
47
+ typexCfg.enabled !== false &&
48
+ typeof typexCfg.token === "string" &&
49
+ typexCfg.token.trim()) {
50
+ enabled.push({ accountId: account_id_1.DEFAULT_ACCOUNT_ID });
51
+ }
52
+ return enabled;
53
+ }
54
+ function describeTypeXMessageTool({ cfg, accountId, }) {
55
+ const enabledAccounts = listEnabledTypeXAccounts(cfg, accountId);
56
+ return {
57
+ actions: enabledAccounts.length > 0 ? ["send"] : [],
58
+ };
59
+ }
60
+ const typexMessageActions = {
61
+ describeMessageTool: describeTypeXMessageTool,
18
62
  };
19
63
  exports.typexPlugin = {
20
64
  id: "openclaw-extension-typex",
21
65
  meta,
22
- onboarding: onboarding_js_1.typexOnboardingAdapter,
66
+ setupWizard: onboarding_js_1.typexSetupWizard,
23
67
  capabilities: {
24
68
  chatTypes: ["direct", "group"],
25
69
  media: true,
@@ -27,28 +71,43 @@ exports.typexPlugin = {
27
71
  threads: false,
28
72
  polls: false,
29
73
  nativeCommands: false,
30
- blockStreaming: false,
74
+ blockStreaming: true,
75
+ },
76
+ agentPrompt: {
77
+ messageToolHints: () => [
78
+ "- TypeX: normal聊天时直接正常回复当前会话,不要调用发送工具。",
79
+ "- TypeX 单聊里如果用户明确要求“帮我发给/转给某人”,优先使用 `typex_send_by_name`,不要只把草稿贴回当前聊天。",
80
+ "- `typex_send_by_name` 适用于 user 身份代发,支持按名字匹配现有会话或联系人;传 `recipient`、`message`,需要转发本地图片/文件时再传 `mediaPath`。",
81
+ "- TypeX 群聊里如果用户要求 bot 在当前群里发给某个成员,优先使用 `typex_send_in_group`;传当前群 `chatId`、成员名 `memberName`,以及 `message` 或 `mediaPath`。",
82
+ "- 当前 TypeX 群上下文里,群 chat id 通常会出现在上下文的 `To: chat:<id>` 一类字段中;给 `typex_send_in_group` 时传这个 id。",
83
+ "- 如果名字匹配不唯一或目标不存在,先简短追问,不要猜。",
84
+ ],
31
85
  },
86
+ agentTools: ({ cfg }) => [(0, agent_tools_send_js_1.createTypeXSendByNameTool)({ cfg }), (0, agent_tools_send_js_1.createTypeXSendInGroupTool)({ cfg })],
87
+ actions: typexMessageActions,
32
88
  reload: { configPrefixes: ["channels.typex"] },
33
89
  outbound: outbound_js_1.typexOutbound,
34
90
  messaging: {
35
- normalizeTarget: (t) => t,
91
+ normalizeTarget: (t) => t.trim().replace(/^typex:/i, ""),
36
92
  targetResolver: {
37
- looksLikeId: () => true,
38
- hint: "chat_id",
93
+ looksLikeId: (raw) => {
94
+ const trimmed = raw.trim();
95
+ return /^(?:\d+|user:\d+|chat:\d+|group:\d+)$/i.test(trimmed);
96
+ },
97
+ hint: "<name | chat_id | user:id | chat:id>",
39
98
  },
40
99
  },
41
- configSchema: (0, plugin_sdk_1.buildChannelConfigSchema)(config_schema_js_1.TypeXConfigSchema),
100
+ configSchema: (0, channel_core_1.buildChannelConfigSchema)(config_schema_js_1.TypeXConfigSchema),
42
101
  config: {
43
102
  listAccountIds: (cfg) => {
44
103
  const accs = cfg.channels?.['openclaw-extension-typex']?.accounts || {};
45
104
  return Object.keys(accs);
46
105
  },
47
106
  resolveAccount: (cfg, accountId) => {
48
- const id = accountId || plugin_sdk_1.DEFAULT_ACCOUNT_ID;
107
+ const id = accountId || account_id_1.DEFAULT_ACCOUNT_ID;
49
108
  const globalCheck = cfg.channels?.['openclaw-extension-typex'];
50
109
  const account = cfg.channels?.['openclaw-extension-typex']?.accounts?.[id] ||
51
- (id === plugin_sdk_1.DEFAULT_ACCOUNT_ID ? globalCheck : undefined);
110
+ (id === account_id_1.DEFAULT_ACCOUNT_ID ? globalCheck : undefined);
52
111
  return {
53
112
  accountId: id,
54
113
  name: account?.name || "TypeX",
@@ -61,7 +120,7 @@ exports.typexPlugin = {
61
120
  defaultAccountId: (cfg) => {
62
121
  const accs = cfg.channels?.['openclaw-extension-typex']?.accounts || {};
63
122
  const first = Object.keys(accs)[0];
64
- return first || plugin_sdk_1.DEFAULT_ACCOUNT_ID;
123
+ return first || account_id_1.DEFAULT_ACCOUNT_ID;
65
124
  },
66
125
  setAccountEnabled: ({ cfg }) => cfg,
67
126
  deleteAccount: ({ cfg }) => cfg,
@@ -73,8 +132,16 @@ exports.typexPlugin = {
73
132
  configured: acc.configured,
74
133
  tokenSource: acc.tokenSource,
75
134
  }),
76
- resolveAllowFrom: () => [],
77
- formatAllowFrom: () => [],
135
+ resolveAllowFrom: ({ cfg, accountId }) => {
136
+ const typexCfg = (cfg.channels?.['openclaw-extension-typex'] ?? {});
137
+ const account = typexCfg.accounts?.[accountId ?? account_id_1.DEFAULT_ACCOUNT_ID];
138
+ const allowFrom = account?.allowFrom ?? typexCfg.allowFrom ?? [];
139
+ return allowFrom.map((e) => String(e));
140
+ },
141
+ formatAllowFrom: ({ allowFrom }) => allowFrom
142
+ .map((entry) => String(entry).trim())
143
+ .filter(Boolean)
144
+ .map((entry) => entry.replace(/^typex:/i, "")),
78
145
  },
79
146
  gateway: {
80
147
  startAccount: async (ctx) => {
@@ -137,14 +204,10 @@ exports.typexPlugin = {
137
204
  return groupCfg?.requireMention ?? typexCfg?.requireMention ?? true;
138
205
  },
139
206
  },
140
- directory: {
141
- self: async () => null,
142
- listPeers: async () => [],
143
- listGroups: async () => [],
144
- },
207
+ directory: directory_js_1.typexDirectory,
145
208
  status: {
146
209
  defaultRuntime: {
147
- accountId: plugin_sdk_1.DEFAULT_ACCOUNT_ID,
210
+ accountId: account_id_1.DEFAULT_ACCOUNT_ID,
148
211
  running: false,
149
212
  lastStartAt: null,
150
213
  lastStopAt: null,
@@ -0,0 +1,181 @@
1
+ declare const _default: {
2
+ plugin: {
3
+ id: string;
4
+ meta: {
5
+ id: string;
6
+ label: string;
7
+ selectionLabel: string;
8
+ detailLabel: string;
9
+ docsPath: string;
10
+ docsLabel: string;
11
+ blurb: string;
12
+ order: number;
13
+ showInSetup: boolean;
14
+ exposure: {
15
+ setup: boolean;
16
+ docs: boolean;
17
+ configured: boolean;
18
+ };
19
+ };
20
+ setupWizard: import("openclaw/plugin-sdk/setup", { with: { "resolution-mode": "import" } }).ChannelSetupWizardAdapter;
21
+ capabilities: {
22
+ chatTypes: ("group" | "direct")[];
23
+ media: true;
24
+ reactions: false;
25
+ threads: false;
26
+ polls: false;
27
+ nativeCommands: false;
28
+ blockStreaming: true;
29
+ };
30
+ agentPrompt: {
31
+ messageToolHints: () => string[];
32
+ };
33
+ agentTools: ({ cfg }: {
34
+ cfg?: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
35
+ }) => import("openclaw/plugin-sdk/channel-contract", { with: { "resolution-mode": "import" } }).ChannelAgentTool[];
36
+ actions: import("openclaw/plugin-sdk/channel-contract", { with: { "resolution-mode": "import" } }).ChannelMessageActionAdapter;
37
+ reload: {
38
+ configPrefixes: string[];
39
+ };
40
+ outbound: any;
41
+ messaging: {
42
+ normalizeTarget: (t: string) => string;
43
+ targetResolver: {
44
+ looksLikeId: (raw: string) => boolean;
45
+ hint: string;
46
+ };
47
+ };
48
+ configSchema: import("../node_modules/openclaw/dist/plugin-sdk/src/channels/plugins/types.plugin.js", { with: { "resolution-mode": "import" } }).ChannelConfigSchema;
49
+ config: {
50
+ listAccountIds: (cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig) => string[];
51
+ resolveAccount: (cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig, accountId: string | null | undefined) => {
52
+ accountId: string;
53
+ name: any;
54
+ enabled: boolean;
55
+ configured: boolean;
56
+ tokenSource: string;
57
+ config: any;
58
+ };
59
+ defaultAccountId: (cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig) => string;
60
+ setAccountEnabled: ({ cfg }: {
61
+ cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
62
+ accountId: string;
63
+ enabled: boolean;
64
+ }) => import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
65
+ deleteAccount: ({ cfg }: {
66
+ cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
67
+ accountId: string;
68
+ }) => import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
69
+ isConfigured: (acc: any) => any;
70
+ describeAccount: (acc: any) => {
71
+ accountId: any;
72
+ name: any;
73
+ enabled: any;
74
+ configured: any;
75
+ tokenSource: any;
76
+ };
77
+ resolveAllowFrom: ({ cfg, accountId }: {
78
+ cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
79
+ accountId?: string | null;
80
+ }) => any;
81
+ formatAllowFrom: ({ allowFrom }: {
82
+ cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
83
+ accountId?: string | null;
84
+ allowFrom: Array<string | number>;
85
+ }) => string[];
86
+ };
87
+ gateway: {
88
+ startAccount: (ctx: import("openclaw/plugin-sdk/channel-contract", { with: { "resolution-mode": "import" } }).ChannelGatewayContext<any>) => Promise<void>;
89
+ };
90
+ security: {
91
+ resolveDmPolicy: () => {
92
+ policy: string;
93
+ allowFrom: never[];
94
+ policyPath: string;
95
+ allowFromPath: string;
96
+ approveHint: string;
97
+ normalizeEntry: (s: string) => string;
98
+ };
99
+ };
100
+ groups: {
101
+ resolveRequireMention: ({ cfg, groupId }: import("openclaw/plugin-sdk/channel-contract", { with: { "resolution-mode": "import" } }).ChannelGroupContext) => any;
102
+ };
103
+ directory: {
104
+ self: () => Promise<null>;
105
+ listPeers: ({ cfg, accountId, query, limit }: any) => Promise<{
106
+ kind: "user" | "group" | "channel";
107
+ id: string;
108
+ name?: string;
109
+ raw?: unknown;
110
+ }[]>;
111
+ listGroups: ({ cfg, accountId, query, limit }: any) => Promise<{
112
+ kind: "group";
113
+ id: string;
114
+ name: string;
115
+ raw: any;
116
+ }[]>;
117
+ listPeersLive: (params: any) => Promise<{
118
+ kind: "user" | "group" | "channel";
119
+ id: string;
120
+ name?: string;
121
+ raw?: unknown;
122
+ }[]>;
123
+ listGroupsLive: (params: any) => Promise<{
124
+ kind: "group";
125
+ id: string;
126
+ name: string;
127
+ raw: any;
128
+ }[]>;
129
+ };
130
+ status: {
131
+ defaultRuntime: {
132
+ accountId: string;
133
+ running: false;
134
+ lastStartAt: null;
135
+ lastStopAt: null;
136
+ lastError: null;
137
+ };
138
+ collectStatusIssues: () => never[];
139
+ buildChannelSummary: ({ snapshot }: {
140
+ account: any;
141
+ cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
142
+ defaultAccountId: string;
143
+ snapshot: import("openclaw/plugin-sdk/channel-contract", { with: { "resolution-mode": "import" } }).ChannelAccountSnapshot;
144
+ }) => Promise<{
145
+ configured: boolean | undefined;
146
+ tokenSource: string | undefined;
147
+ running: boolean | undefined;
148
+ lastStartAt: number | null | undefined;
149
+ lastStopAt: number | null | undefined;
150
+ lastError: string | null | undefined;
151
+ probe: unknown;
152
+ lastProbeAt: number | null | undefined;
153
+ }>;
154
+ probeAccount: () => Promise<{
155
+ ok: boolean;
156
+ timestamp: number;
157
+ }>;
158
+ buildAccountSnapshot: ({ account, runtime }: {
159
+ account: any;
160
+ cfg: import("openclaw/plugin-sdk/channel-core", { with: { "resolution-mode": "import" } }).OpenClawConfig;
161
+ runtime?: import("openclaw/plugin-sdk/channel-contract", { with: { "resolution-mode": "import" } }).ChannelAccountSnapshot;
162
+ probe?: unknown;
163
+ audit?: unknown;
164
+ }) => {
165
+ accountId: any;
166
+ name: any;
167
+ enabled: any;
168
+ configured: any;
169
+ tokenSource: any;
170
+ running: boolean;
171
+ lastStartAt: number | null;
172
+ lastStopAt: number | null;
173
+ lastError: string | null;
174
+ lastInboundAt: null;
175
+ lastOutboundAt: null;
176
+ };
177
+ logSelfId: () => void;
178
+ };
179
+ };
180
+ };
181
+ export default _default;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const channel_core_1 = require("openclaw/plugin-sdk/channel-core");
4
+ const plugin_js_1 = require("./plugin.js");
5
+ exports.default = (0, channel_core_1.defineSetupPluginEntry)(plugin_js_1.typexPlugin);
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { DmPolicy, GroupPolicy, MarkdownConfig, DmConfig } from "openclaw/plugin-sdk";
1
+ import type { DmConfig, DmPolicy, GroupPolicy, MarkdownConfig } from "openclaw/plugin-sdk/config-runtime";
2
2
  export type TypeXGroupConfig = {
3
3
  requireMention?: boolean;
4
4
  /** If specified, only load these skills for this group. Omit = all skills; empty = no skills. */
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "id": "openclaw-extension-typex",
3
+ "kind": "channel",
3
4
  "name": "TypeX",
4
- "version": "1.0.19",
5
+ "version": "1.0.21",
5
6
  "description": "TypeX channel integration for OpenClaw",
6
7
  "channels": [
7
8
  "openclaw-extension-typex"
@@ -15,9 +16,9 @@
15
16
  "channel": {
16
17
  "id": "openclaw-extension-typex",
17
18
  "label": "TypeX",
18
- "selectionLabel": "TypeX (QR Code Login)",
19
+ "selectionLabel": "TypeX (QR Code / Bot Token Login)",
19
20
  "detailLabel": "TypeX Bot",
20
- "blurb": "TypeX bot via QR Code login.",
21
+ "blurb": "TypeX bot via QR Code / Bot Token login.",
21
22
  "aliases": [
22
23
  "openclaw-extension-typex"
23
24
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-extension-typex",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "TypeX channel integration for OpenClaw",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,7 +12,10 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "build": "tsc",
15
- "prepublishOnly": "npm run build"
15
+ "commitlint": "node scripts/commitlint.mjs",
16
+ "verify:domain": "node scripts/verify-typex-domain.mjs",
17
+ "check:release": "npm run verify:domain && npm run build",
18
+ "prepublishOnly": "npm run check:release"
16
19
  },
17
20
  "keywords": [
18
21
  "openclaw",
@@ -20,15 +23,15 @@
20
23
  "typex",
21
24
  "bot"
22
25
  ],
23
- "author": "Your Name",
26
+ "author": "yuki397",
24
27
  "license": "MIT",
25
28
  "peerDependencies": {
26
- "openclaw": "*"
29
+ "openclaw": "^2026.4.2"
27
30
  },
28
31
  "devDependencies": {
29
32
  "@types/node": "^20.0.0",
30
33
  "@types/qrcode-terminal": "^0.12.2",
31
- "openclaw": "latest",
34
+ "openclaw": "^2026.4.2",
32
35
  "typescript": "^5.0.0"
33
36
  },
34
37
  "dependencies": {
@@ -38,6 +41,23 @@
38
41
  "openclaw": {
39
42
  "extensions": [
40
43
  "./dist/index.js"
41
- ]
44
+ ],
45
+ "setupEntry": "./dist/setup-entry.js",
46
+ "channel": {
47
+ "id": "openclaw-extension-typex",
48
+ "label": "TypeX",
49
+ "selectionLabel": "TypeX (QR Code / Bot Token Login)",
50
+ "detailLabel": "TypeX Bot",
51
+ "docsPath": "/channels/typex",
52
+ "docsLabel": "typex",
53
+ "blurb": "TypeX bot via QR Code / Bot Token login.",
54
+ "order": 100,
55
+ "quickstartAllowFrom": true,
56
+ "exposure": {
57
+ "configured": true,
58
+ "setup": true,
59
+ "docs": true
60
+ }
61
+ }
42
62
  }
43
63
  }