@insta-dev01/intclaw 1.1.1 → 1.1.3
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/config.ts +31 -0
- package/openclaw.plugin.json +2 -2
- package/package.json +2 -1
- package/src/channel.ts +0 -78
- package/src/config/schema.ts +10 -16
package/config.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IntClaw 插件全局配置
|
|
3
|
+
* 用于集中管理所有外部请求连接
|
|
4
|
+
*
|
|
5
|
+
* 方便开发者快速替换不同环境的连接地址
|
|
6
|
+
*/
|
|
7
|
+
export const INTCLAW_CONFIG = {
|
|
8
|
+
/**
|
|
9
|
+
* IntClaw 新版 API 基础路径
|
|
10
|
+
* 作用:用于获取 Access Token、发送机器人消息、下载文件等核心业务
|
|
11
|
+
*/
|
|
12
|
+
API_BASE_URL: 'https://api.intclaw.com',
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* IntClaw 旧版 OAPI 基础路径
|
|
16
|
+
* 作用:用于媒体文件上传、获取旧版 Token、查询用户信息等
|
|
17
|
+
*/
|
|
18
|
+
OAPI_BASE_URL: 'https://oapi.intclaw.com',
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* WebSocket 连接地址
|
|
22
|
+
* 作用:建立与 IntClaw 服务端的长连接,用于实时接收消息推送
|
|
23
|
+
*/
|
|
24
|
+
WS_ENDPOINT: 'wss://claw-dev.int-os.com/user-ws/',
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 媒体文件下载基础路径
|
|
28
|
+
* 作用:拼接媒体文件的下载链接,供前端或外部查看
|
|
29
|
+
*/
|
|
30
|
+
DOWNLOAD_BASE_URL: 'https://down.intclaw.com',
|
|
31
|
+
};
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "intclaw",
|
|
3
3
|
"name": "IntClaw Channel",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.3",
|
|
5
5
|
"description": "IntClaw (IntClaw) messaging channel via Stream mode with ai market streaming",
|
|
6
6
|
"author": "IntClaw Real Team",
|
|
7
7
|
"main": "index.ts",
|
|
8
|
-
"channels": ["intclaw"],
|
|
8
|
+
"channels": ["intclaw-connector"],
|
|
9
9
|
"configSchema": {
|
|
10
10
|
"type": "object",
|
|
11
11
|
"additionalProperties": false,
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insta-dev01/intclaw",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "IntClaw (IntClaw) channel connector — Stream mode with AI Card streaming",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"types": "index.ts",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"files": [
|
|
9
9
|
"index.ts",
|
|
10
|
+
"config.ts",
|
|
10
11
|
"src/**/*",
|
|
11
12
|
"openclaw.plugin.json",
|
|
12
13
|
"README.md",
|
package/src/channel.ts
CHANGED
|
@@ -97,64 +97,12 @@ export const intclawPlugin: ChannelPlugin<ResolvedIntclawAccount> = {
|
|
|
97
97
|
configSchema: {
|
|
98
98
|
schema: {
|
|
99
99
|
type: "object",
|
|
100
|
-
additionalProperties: false,
|
|
101
100
|
properties: {
|
|
102
101
|
enabled: { type: "boolean" },
|
|
103
102
|
defaultAccount: { type: "string" },
|
|
104
103
|
clientId: { oneOf: [{ type: "string" }, { type: "number" }] },
|
|
105
104
|
clientSecret: secretInputJsonSchema,
|
|
106
|
-
enableMediaUpload: { type: "boolean" },
|
|
107
105
|
systemPrompt: { type: "string" },
|
|
108
|
-
dmPolicy: { type: "string", enum: ["open", "pairing", "allowlist"] },
|
|
109
|
-
allowFrom: { type: "array", items: { oneOf: [{ type: "string" }, { type: "number" }] } },
|
|
110
|
-
groupPolicy: { type: "string", enum: ["open", "allowlist", "disabled"] },
|
|
111
|
-
groupAllowFrom: {
|
|
112
|
-
type: "array",
|
|
113
|
-
items: { oneOf: [{ type: "string" }, { type: "number" }] },
|
|
114
|
-
},
|
|
115
|
-
requireMention: { type: "boolean" },
|
|
116
|
-
groupSessionScope: {
|
|
117
|
-
type: "string",
|
|
118
|
-
enum: ["group", "group_sender"],
|
|
119
|
-
},
|
|
120
|
-
separateSessionByConversation: { type: "boolean" },
|
|
121
|
-
sharedMemoryAcrossConversations: { type: "boolean" },
|
|
122
|
-
historyLimit: { type: "integer", minimum: 0 },
|
|
123
|
-
dmHistoryLimit: { type: "integer", minimum: 0 },
|
|
124
|
-
textChunkLimit: { type: "integer", minimum: 1 },
|
|
125
|
-
mediaMaxMb: { type: "number", minimum: 0 },
|
|
126
|
-
typingIndicator: { type: "boolean" },
|
|
127
|
-
resolveSenderNames: { type: "boolean" },
|
|
128
|
-
tools: {
|
|
129
|
-
type: "object",
|
|
130
|
-
additionalProperties: false,
|
|
131
|
-
properties: {
|
|
132
|
-
media: { type: "boolean" },
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
groups: {
|
|
136
|
-
type: "object",
|
|
137
|
-
additionalProperties: {
|
|
138
|
-
type: "object",
|
|
139
|
-
properties: {
|
|
140
|
-
requireMention: { type: "boolean" },
|
|
141
|
-
tools: {
|
|
142
|
-
type: "object",
|
|
143
|
-
properties: {
|
|
144
|
-
allow: { type: "array", items: { type: "string" } },
|
|
145
|
-
deny: { type: "array", items: { type: "string" } },
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
enabled: { type: "boolean" },
|
|
149
|
-
allowFrom: { type: "array", items: { oneOf: [{ type: "string" }, { type: "number" }] } },
|
|
150
|
-
systemPrompt: { type: "string" },
|
|
151
|
-
groupSessionScope: {
|
|
152
|
-
type: "string",
|
|
153
|
-
enum: ["group", "group_sender"],
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
106
|
accounts: {
|
|
159
107
|
type: "object",
|
|
160
108
|
additionalProperties: {
|
|
@@ -164,33 +112,7 @@ export const intclawPlugin: ChannelPlugin<ResolvedIntclawAccount> = {
|
|
|
164
112
|
name: { type: "string" },
|
|
165
113
|
clientId: { oneOf: [{ type: "string" }, { type: "number" }] },
|
|
166
114
|
clientSecret: secretInputJsonSchema,
|
|
167
|
-
enableMediaUpload: { type: "boolean" },
|
|
168
115
|
systemPrompt: { type: "string" },
|
|
169
|
-
dmPolicy: { type: "string", enum: ["open", "pairing", "allowlist"] },
|
|
170
|
-
allowFrom: { type: "array", items: { oneOf: [{ type: "string" }, { type: "number" }] } },
|
|
171
|
-
groupPolicy: { type: "string", enum: ["open", "allowlist", "disabled"] },
|
|
172
|
-
groupAllowFrom: {
|
|
173
|
-
type: "array",
|
|
174
|
-
items: { oneOf: [{ type: "string" }, { type: "number" }] },
|
|
175
|
-
},
|
|
176
|
-
requireMention: { type: "boolean" },
|
|
177
|
-
groupSessionScope: {
|
|
178
|
-
type: "string",
|
|
179
|
-
enum: ["group", "group_sender"],
|
|
180
|
-
},
|
|
181
|
-
separateSessionByConversation: { type: "boolean" },
|
|
182
|
-
sharedMemoryAcrossConversations: { type: "boolean" },
|
|
183
|
-
historyLimit: { type: "integer", minimum: 0 },
|
|
184
|
-
textChunkLimit: { type: "integer", minimum: 1 },
|
|
185
|
-
mediaMaxMb: { type: "number", minimum: 0 },
|
|
186
|
-
typingIndicator: { type: "boolean" },
|
|
187
|
-
tools: {
|
|
188
|
-
type: "object",
|
|
189
|
-
additionalProperties: false,
|
|
190
|
-
properties: {
|
|
191
|
-
media: { type: "boolean" },
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
116
|
},
|
|
195
117
|
},
|
|
196
118
|
},
|
package/src/config/schema.ts
CHANGED
|
@@ -47,24 +47,24 @@ export const IntclawGroupSchema = z
|
|
|
47
47
|
.strict();
|
|
48
48
|
|
|
49
49
|
const IntclawSharedConfigShape = {
|
|
50
|
-
dmPolicy: DmPolicySchema.optional(),
|
|
50
|
+
dmPolicy: DmPolicySchema.optional().default("open"),
|
|
51
51
|
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
52
|
-
groupPolicy: GroupPolicySchema.optional(),
|
|
52
|
+
groupPolicy: GroupPolicySchema.optional().default("open"),
|
|
53
53
|
groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
54
|
-
requireMention: z.boolean().optional(),
|
|
54
|
+
requireMention: z.boolean().optional().default(true),
|
|
55
55
|
groups: z.record(z.string(), IntclawGroupSchema.optional()).optional(),
|
|
56
56
|
historyLimit: z.number().int().min(0).optional(),
|
|
57
57
|
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
58
58
|
textChunkLimit: z.number().int().positive().optional(),
|
|
59
59
|
mediaMaxMb: z.number().positive().optional(),
|
|
60
60
|
tools: IntclawToolsConfigSchema,
|
|
61
|
-
typingIndicator: z.boolean().optional(),
|
|
62
|
-
resolveSenderNames: z.boolean().optional(),
|
|
63
|
-
separateSessionByConversation: z.boolean().optional(),
|
|
64
|
-
sharedMemoryAcrossConversations: z.boolean().optional(),
|
|
65
|
-
groupSessionScope: GroupSessionScopeSchema,
|
|
66
|
-
asyncMode: z.boolean().optional(),
|
|
67
|
-
ackText: z.string().optional(),
|
|
61
|
+
typingIndicator: z.boolean().optional().default(true),
|
|
62
|
+
resolveSenderNames: z.boolean().optional().default(true),
|
|
63
|
+
separateSessionByConversation: z.boolean().optional().default(true),
|
|
64
|
+
sharedMemoryAcrossConversations: z.boolean().optional().default(false),
|
|
65
|
+
groupSessionScope: GroupSessionScopeSchema.optional().default("group"),
|
|
66
|
+
asyncMode: z.boolean().optional().default(false),
|
|
67
|
+
ackText: z.string().optional().default("🫡 任务已接收,处理中..."),
|
|
68
68
|
endpoint: z.string().optional(), // DWClient gateway endpoint
|
|
69
69
|
debug: z.boolean().optional(), // DWClient debug mode
|
|
70
70
|
};
|
|
@@ -93,12 +93,6 @@ export const IntclawConfigSchema = z
|
|
|
93
93
|
enableMediaUpload: z.boolean().optional(),
|
|
94
94
|
systemPrompt: z.string().optional(),
|
|
95
95
|
...IntclawSharedConfigShape,
|
|
96
|
-
dmPolicy: DmPolicySchema.optional().default("open"),
|
|
97
|
-
groupPolicy: GroupPolicySchema.optional().default("open"),
|
|
98
|
-
requireMention: z.boolean().optional().default(true),
|
|
99
|
-
separateSessionByConversation: z.boolean().optional().default(true),
|
|
100
|
-
sharedMemoryAcrossConversations: z.boolean().optional().default(false),
|
|
101
|
-
groupSessionScope: GroupSessionScopeSchema.optional().default("group"),
|
|
102
96
|
// Multi-account configuration
|
|
103
97
|
accounts: z.record(z.string(), IntclawAccountConfigSchema.optional()).optional(),
|
|
104
98
|
})
|