@dcrays/dcgchat 0.2.8 → 0.2.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcrays/dcgchat",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "type": "module",
5
5
  "description": "OpenClaw channel plugin for 书灵墨宝 (WebSocket)",
6
6
  "main": "index.ts",
package/src/bot.ts CHANGED
@@ -131,7 +131,7 @@ export async function handleDcgchatMessage(params: {
131
131
 
132
132
  const route = core.channel.routing.resolveAgentRoute({
133
133
  cfg,
134
- channel: "dcgchat-test",
134
+ channel: "dcgchat",
135
135
  accountId: account.accountId,
136
136
  peer: { kind: "direct", id: userId },
137
137
  });
@@ -168,13 +168,13 @@ export async function handleDcgchatMessage(params: {
168
168
  ChatType: "direct",
169
169
  SenderName: userId,
170
170
  SenderId: userId,
171
- Provider: "dcgchat-test" as const,
172
- Surface: "dcgchat-test" as const,
171
+ Provider: "dcgchat" as const,
172
+ Surface: "dcgchat" as const,
173
173
  MessageSid: msg.content.message_id,
174
174
  Timestamp: Date.now(),
175
175
  WasMentioned: true,
176
176
  CommandAuthorized: true,
177
- OriginatingChannel: "dcgchat-test" as const,
177
+ OriginatingChannel: "dcgchat" as const,
178
178
  OriginatingTo: `user:${userId}`,
179
179
  ...mediaPayload,
180
180
  });
package/src/channel.ts CHANGED
@@ -8,7 +8,7 @@ import { getMsgParams } from "./tool.js";
8
8
 
9
9
  export function resolveAccount(cfg: OpenClawConfig, accountId?: string | null): ResolvedDcgchatAccount {
10
10
  const id = accountId ?? DEFAULT_ACCOUNT_ID;
11
- const raw = (cfg.channels?.["dcgchat-test"] as DcgchatConfig | undefined) ?? {};
11
+ const raw = (cfg.channels?.["dcgchat"] as DcgchatConfig | undefined) ?? {};
12
12
  return {
13
13
  accountId: id,
14
14
  enabled: raw.enabled !== false,
@@ -22,13 +22,13 @@ export function resolveAccount(cfg: OpenClawConfig, accountId?: string | null):
22
22
  }
23
23
 
24
24
  export const dcgchatPlugin: ChannelPlugin<ResolvedDcgchatAccount> = {
25
- id: "dcgchat-test",
25
+ id: "dcgchat",
26
26
  meta: {
27
- id: "dcgchat-test",
27
+ id: "dcgchat",
28
28
  label: "书灵墨宝",
29
29
  selectionLabel: "书灵墨宝",
30
30
  docsPath: "/channels/dcgchat",
31
- docsLabel: "dcgchat-test",
31
+ docsLabel: "dcgchat",
32
32
  blurb: "连接 OpenClaw 与 书灵墨宝 产品",
33
33
  order: 80,
34
34
  },
@@ -68,8 +68,8 @@ export const dcgchatPlugin: ChannelPlugin<ResolvedDcgchatAccount> = {
68
68
  ...cfg,
69
69
  channels: {
70
70
  ...cfg.channels,
71
- "dcgchat-test": {
72
- ...(cfg.channels?.["dcgchat-test"] as Record<string, unknown> | undefined),
71
+ "dcgchat": {
72
+ ...(cfg.channels?.["dcgchat"] as Record<string, unknown> | undefined),
73
73
  enabled,
74
74
  },
75
75
  },
@@ -140,7 +140,7 @@ export const dcgchatPlugin: ChannelPlugin<ResolvedDcgchatAccount> = {
140
140
  log(`[dcgchat][${ctx.accountId ?? DEFAULT_ACCOUNT_ID}] outbound -> ${ws?.readyState}: ${ctx.text}`);
141
141
  }
142
142
  return {
143
- channel: "dcgchat-test",
143
+ channel: "dcgchat",
144
144
  messageId: `dcg-${Date.now()}`,
145
145
  chatId: params.userId.toString(),
146
146
  };
@@ -218,7 +218,7 @@ export const dcgchatPlugin: ChannelPlugin<ResolvedDcgchatAccount> = {
218
218
  log(`[dcgchat][${ctx.accountId ?? DEFAULT_ACCOUNT_ID}] outbound -> ${ws?.readyState}: ${ctx.text}`);
219
219
  }
220
220
  return {
221
- channel: "dcgchat-test",
221
+ channel: "dcgchat",
222
222
  messageId: `dcg-${Date.now()}`,
223
223
  chatId: params.userId.toString(),
224
224
  };
package/src/request.ts CHANGED
@@ -22,7 +22,7 @@ export const signKey = {
22
22
  develop: "FE93D3322CB94E978CE95BD4AA2A37D7",
23
23
  };
24
24
 
25
- const env = "test";
25
+ const env = "production";
26
26
  export const version = "1.0.0";
27
27
 
28
28
  /**