@workclaw/openclaw-workclaw 1.0.342 → 1.0.343
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/{anthropic-BX4T2YIB.js → anthropic-C1jzp_Rc.js} +1 -1
- package/dist/api.js +379 -0
- package/dist/{azure-openai-responses-CRtsnQnD.js → azure-openai-responses-zym2wxMB.js} +2 -2
- package/dist/{index-ZWLWkJXc.js → channel-CWeiUgV5.js} +2162 -5548
- package/dist/channel-bootstrap.runtime-B0t3vnup-S_ZINco5.js +5 -0
- package/dist/channel-entry-api.d.ts +3 -0
- package/dist/channel-entry-api.d.ts.map +1 -0
- package/dist/channel-entry-api.js +719 -0
- package/dist/channel-entry-contract-BDMmGZzs-4ZlSsA7g.js +252 -0
- package/dist/channel-plugin-api.d.ts +2 -0
- package/dist/channel-plugin-api.d.ts.map +1 -0
- package/dist/channel-plugin-api.js +4 -0
- package/dist/{cleanup-i9QIMqva-CYcFSfZC.js → cleanup-i9QIMqva-DceifGSO.js} +2 -2
- package/dist/config-QB0JLJHX.js +94 -0
- package/dist/{cron-tasks-handler-BIpSoLIG.js → cron-tasks-handler-CIhnDbA3.js} +1 -1
- package/dist/{google-BhYq3yh7.js → google-DqQHu2NY.js} +2 -2
- package/dist/{google-shared-sAeUdThk.js → google-shared-BeRWP6yE.js} +1 -1
- package/dist/{google-vertex-CFbea9mm.js → google-vertex-Cs1hEe_j.js} +2 -2
- package/dist/{host-hook-cleanup-BNlJQu7G-DZh9GtcC.js → host-hook-cleanup-BNlJQu7G-NNZIzDgg.js} +3 -2
- package/dist/index-DLeHpawu.js +1351 -0
- package/dist/index-DvlDhBhd.js +524 -0
- package/dist/{index-CXEk4j12.js → index-mQv9vOMk.js} +1 -1
- package/dist/index.d.ts +1 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -11
- package/dist/{legacy-config-issues-Czu0_ffE-BUj03gnH.js → legacy-config-issues-Czu0_ffE-C-SKoHc6.js} +4 -2
- package/dist/{message-oTt1u1XX-BHxJ4z66.js → message-oTt1u1XX-NFsrpDss.js} +5 -4
- package/dist/message.config.runtime-DmvQNASl.js +4 -0
- package/dist/{message.gateway.runtime-Ch5zdrYr.js → message.gateway.runtime-BIIf6teh.js} +3 -2
- package/dist/{mistral-DgMDMo1J.js → mistral-B0v4IfAz.js} +1 -1
- package/dist/models-config.runtime-cY4XGOI0.js +4 -0
- package/dist/{openai-codex-responses-D6j-616z.js → openai-codex-responses-tC0hde6o.js} +2 -2
- package/dist/{openai-completions-BtT6C5eC.js → openai-completions-w3FtI3rd.js} +1 -1
- package/dist/{openai-responses-Dtuy4M7B.js → openai-responses-rRjf4OAK.js} +2 -2
- package/dist/{openai-responses-shared-DZBSlU2d.js → openai-responses-shared-ZlolmuqL.js} +1 -1
- package/dist/{openrouter-DbsgRqzU.js → openrouter-CXWxTM8p.js} +1 -1
- package/dist/{photon_rs-CbOi7Vp0.js → photon_rs-CGHeuAJ1.js} +1 -1
- package/dist/{plugin-load-profile-DOnG9jJ5-zOQuKNoi.js → plugin-load-profile-DOnG9jJ5-B0ymqOTX.js} +9936 -9990
- package/dist/plugins-C54ejDC8-qGQvFNWW.js +8 -0
- package/dist/provider-discovery.runtime-ZgcVwu5_.js +4 -0
- package/dist/runtime-api-DU-e2Pen.js +391 -0
- package/dist/runtime-api.d.ts +2 -0
- package/dist/runtime-api.d.ts.map +1 -0
- package/dist/runtime-api.js +4 -0
- package/dist/{session-archive.runtime-BAljnZWW.js → session-archive.runtime-SvY1eJq4.js} +2 -2
- package/dist/setup-entry.js +2 -194
- package/dist/src/runtime.js +37 -0
- package/dist/src/secret-contract-api.js +7 -0
- package/dist/string-coerce-DyL154ka-BEV0SzzS.js +61 -0
- package/dist/subsystem-W8wAQXn1-BIMucqMi.js +4 -0
- package/dist/tools-api.d.ts +2 -0
- package/dist/tools-api.d.ts.map +1 -0
- package/dist/tools-api.js +4 -0
- package/dist/transcript.runtime-Dchg_w3u.js +5 -0
- package/dist/workclaw-client-CMjcFjJx.js +538 -0
- package/package.json +9 -5
- package/dist/channel-bootstrap.runtime-B0t3vnup-vflkdVI8.js +0 -5
- package/dist/config-Cw8JPyMQ.js +0 -94
- package/dist/message.config.runtime-DuzEAWuz.js +0 -4
- package/dist/models-config.runtime-DLspRp8e.js +0 -4
- package/dist/plugins-C54ejDC8-Df48OaX-.js +0 -8
- package/dist/provider-discovery.runtime-Dps3xmj0.js +0 -4
- package/dist/subsystem-W8wAQXn1-Dh_4L9-w.js +0 -4
- package/dist/transcript.runtime-B6llle92.js +0 -5
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
const LOG_LEVEL = {
|
|
2
|
+
// 测试环境
|
|
3
|
+
Test: "test",
|
|
4
|
+
// 生产环境
|
|
5
|
+
Production: "production"
|
|
6
|
+
};
|
|
7
|
+
function isLogLevel(value) {
|
|
8
|
+
return value === LOG_LEVEL.Test || value === LOG_LEVEL.Production;
|
|
9
|
+
}
|
|
10
|
+
class Logger {
|
|
11
|
+
logLevel = LOG_LEVEL.Production;
|
|
12
|
+
pluginApi = null;
|
|
13
|
+
/**
|
|
14
|
+
* 设置插件 API
|
|
15
|
+
*
|
|
16
|
+
* @param pluginApi - OpenClaw 插件 API
|
|
17
|
+
*/
|
|
18
|
+
setApi(pluginApi) {
|
|
19
|
+
this.pluginApi = pluginApi;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 设置日志级别
|
|
23
|
+
*
|
|
24
|
+
* @param logLevel - 日志级别
|
|
25
|
+
*/
|
|
26
|
+
setLevel(logLevel) {
|
|
27
|
+
this.logLevel = logLevel;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 记录信息日志(仅在 test 场景输出)
|
|
31
|
+
*
|
|
32
|
+
* @param message - 日志消息
|
|
33
|
+
*/
|
|
34
|
+
info(message) {
|
|
35
|
+
if (this.logLevel === LOG_LEVEL.Production) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.pluginApi?.logger?.info(message);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 记录警告日志(任何场景都输出)
|
|
42
|
+
*
|
|
43
|
+
* @param message - 日志消息
|
|
44
|
+
*/
|
|
45
|
+
warn(message) {
|
|
46
|
+
this.pluginApi?.logger?.warn(message);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 记录错误日志(任何场景都输出)
|
|
50
|
+
*
|
|
51
|
+
* @param message - 日志消息
|
|
52
|
+
*/
|
|
53
|
+
error(message) {
|
|
54
|
+
this.pluginApi?.logger?.error(message);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const logger = new Logger();
|
|
58
|
+
let runtime = null;
|
|
59
|
+
const wsByKey = /* @__PURE__ */ new Map();
|
|
60
|
+
const accountIdsByAppKey = /* @__PURE__ */ new Map();
|
|
61
|
+
const appKeyByAccountId = /* @__PURE__ */ new Map();
|
|
62
|
+
const reconnectSchedulers = /* @__PURE__ */ new Map();
|
|
63
|
+
const dispatchersByAppKey = /* @__PURE__ */ new Map();
|
|
64
|
+
const connectingPromises = /* @__PURE__ */ new Map();
|
|
65
|
+
const lastMessageAtByKey = /* @__PURE__ */ new Map();
|
|
66
|
+
function setWorkclawRuntime(next) {
|
|
67
|
+
runtime = next;
|
|
68
|
+
}
|
|
69
|
+
function getWorkclawRuntime() {
|
|
70
|
+
if (!runtime) {
|
|
71
|
+
throw new Error("Workclaw runtime not initialized");
|
|
72
|
+
}
|
|
73
|
+
return runtime;
|
|
74
|
+
}
|
|
75
|
+
function setWorkclawWsConnection(key, ws) {
|
|
76
|
+
wsByKey.set(key, ws);
|
|
77
|
+
}
|
|
78
|
+
function clearWorkclawWsConnection(key) {
|
|
79
|
+
wsByKey.delete(key);
|
|
80
|
+
}
|
|
81
|
+
function getWorkclawWsConnection(key) {
|
|
82
|
+
return wsByKey.get(key);
|
|
83
|
+
}
|
|
84
|
+
function setLastInboundAt(key, timestamp) {
|
|
85
|
+
lastMessageAtByKey.set(key, timestamp);
|
|
86
|
+
}
|
|
87
|
+
function getLastInboundAt(key) {
|
|
88
|
+
return lastMessageAtByKey.get(key);
|
|
89
|
+
}
|
|
90
|
+
const lastOutboundAtByKey = /* @__PURE__ */ new Map();
|
|
91
|
+
const connectionConfigCache = /* @__PURE__ */ new Map();
|
|
92
|
+
function setWorkclawConnectionConfig(accountId, config) {
|
|
93
|
+
connectionConfigCache.set(accountId, {
|
|
94
|
+
appKey: config.appKey,
|
|
95
|
+
appSecret: config.appSecret,
|
|
96
|
+
baseUrl: config.baseUrl ?? "",
|
|
97
|
+
websocketUrl: config.websocketUrl,
|
|
98
|
+
localIp: config.localIp,
|
|
99
|
+
allowInsecureTls: config.allowInsecureTls,
|
|
100
|
+
requestTimeout: config.requestTimeout
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function getWorkclawConnectionConfig(accountId) {
|
|
104
|
+
return connectionConfigCache.get(accountId);
|
|
105
|
+
}
|
|
106
|
+
function clearWorkclawConnectionConfig(accountId) {
|
|
107
|
+
connectionConfigCache.delete(accountId);
|
|
108
|
+
}
|
|
109
|
+
function setLastOutboundAt(key, timestamp) {
|
|
110
|
+
lastOutboundAtByKey.set(key, timestamp);
|
|
111
|
+
}
|
|
112
|
+
function getLastOutboundAt(key) {
|
|
113
|
+
return lastOutboundAtByKey.get(key);
|
|
114
|
+
}
|
|
115
|
+
function registerAccountContext(appKey, accountId, ctx) {
|
|
116
|
+
if (!accountIdsByAppKey.has(appKey)) {
|
|
117
|
+
accountIdsByAppKey.set(appKey, /* @__PURE__ */ new Set());
|
|
118
|
+
}
|
|
119
|
+
accountIdsByAppKey.get(appKey).add(accountId);
|
|
120
|
+
appKeyByAccountId.set(accountId, appKey);
|
|
121
|
+
if (!dispatchersByAppKey.has(appKey)) {
|
|
122
|
+
dispatchersByAppKey.set(appKey, /* @__PURE__ */ new Map());
|
|
123
|
+
}
|
|
124
|
+
dispatchersByAppKey.get(appKey).set(accountId, { ctx });
|
|
125
|
+
}
|
|
126
|
+
function unregisterAccountContext(appKey, accountId) {
|
|
127
|
+
accountIdsByAppKey.get(appKey)?.delete(accountId);
|
|
128
|
+
appKeyByAccountId.delete(accountId);
|
|
129
|
+
dispatchersByAppKey.get(appKey)?.delete(accountId);
|
|
130
|
+
}
|
|
131
|
+
function getAccountIdsByAppKey(appKey) {
|
|
132
|
+
return Array.from(accountIdsByAppKey.get(appKey) ?? []);
|
|
133
|
+
}
|
|
134
|
+
function getAppKeyByAccountId(accountId) {
|
|
135
|
+
return appKeyByAccountId.get(accountId);
|
|
136
|
+
}
|
|
137
|
+
function getDispatcherByAppKeyAndAccountId(appKey, accountId) {
|
|
138
|
+
return dispatchersByAppKey.get(appKey)?.get(accountId);
|
|
139
|
+
}
|
|
140
|
+
function getAllDispatchersByAppKey(appKey) {
|
|
141
|
+
return dispatchersByAppKey.get(appKey);
|
|
142
|
+
}
|
|
143
|
+
function setReconnectScheduler(appKey, scheduler) {
|
|
144
|
+
reconnectSchedulers.set(appKey, scheduler);
|
|
145
|
+
}
|
|
146
|
+
function getReconnectScheduler(appKey) {
|
|
147
|
+
return reconnectSchedulers.get(appKey);
|
|
148
|
+
}
|
|
149
|
+
function clearReconnectScheduler(appKey) {
|
|
150
|
+
reconnectSchedulers.delete(appKey);
|
|
151
|
+
}
|
|
152
|
+
function tryStartConnecting(appKey) {
|
|
153
|
+
const existingPromise = connectingPromises.get(appKey);
|
|
154
|
+
if (existingPromise !== void 0) {
|
|
155
|
+
return {
|
|
156
|
+
isConnector: false,
|
|
157
|
+
existingWs: wsByKey.get(appKey),
|
|
158
|
+
connectingPromise: existingPromise
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
let resolvePromise = () => {
|
|
162
|
+
};
|
|
163
|
+
const promise = new Promise((resolve) => {
|
|
164
|
+
resolvePromise = resolve;
|
|
165
|
+
});
|
|
166
|
+
promise._resolve = resolvePromise;
|
|
167
|
+
connectingPromises.set(appKey, promise);
|
|
168
|
+
return { isConnector: true, existingWs: void 0, connectingPromise: promise };
|
|
169
|
+
}
|
|
170
|
+
function finishConnecting(appKey, ws) {
|
|
171
|
+
const promise = connectingPromises.get(appKey);
|
|
172
|
+
if (promise) {
|
|
173
|
+
promise._resolve?.(ws ?? null);
|
|
174
|
+
connectingPromises.delete(appKey);
|
|
175
|
+
}
|
|
176
|
+
if (ws) {
|
|
177
|
+
wsByKey.set(appKey, ws);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
const runIdToToolContext = /* @__PURE__ */ new Map();
|
|
181
|
+
const toolCallIdToRunId = /* @__PURE__ */ new Map();
|
|
182
|
+
function getToolContext(runId) {
|
|
183
|
+
return runIdToToolContext.get(runId);
|
|
184
|
+
}
|
|
185
|
+
function setToolContext(runId, ctx) {
|
|
186
|
+
runIdToToolContext.set(runId, ctx);
|
|
187
|
+
}
|
|
188
|
+
function setToolCallIdToRunIdMapping(toolCallId, runId) {
|
|
189
|
+
toolCallIdToRunId.set(toolCallId, runId);
|
|
190
|
+
}
|
|
191
|
+
function getRunIdByToolCallId(toolCallId) {
|
|
192
|
+
return toolCallIdToRunId.get(toolCallId);
|
|
193
|
+
}
|
|
194
|
+
function deleteToolContext(runId) {
|
|
195
|
+
runIdToToolContext.delete(runId);
|
|
196
|
+
}
|
|
197
|
+
function clearAllToolContexts() {
|
|
198
|
+
runIdToToolContext.clear();
|
|
199
|
+
toolCallIdToRunId.clear();
|
|
200
|
+
}
|
|
201
|
+
async function spawnSubAgent(params) {
|
|
202
|
+
if (!runtime) {
|
|
203
|
+
throw new Error("Workclaw runtime not initialized");
|
|
204
|
+
}
|
|
205
|
+
try {
|
|
206
|
+
const sessionsSpawn = runtime?.sessions_spawn;
|
|
207
|
+
if (!sessionsSpawn || typeof sessionsSpawn !== "function") {
|
|
208
|
+
logger.warn(`【智小途-运行时】未提供 sessions_spawn,为智能体 ${params.agentId} 返回模拟响应`);
|
|
209
|
+
return {
|
|
210
|
+
ok: true,
|
|
211
|
+
summary: `[模拟] Agent ${params.agentId} 完成任务: ${params.task.substring(0, 50)}...`
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
const result = await sessionsSpawn({
|
|
215
|
+
agentId: params.agentId,
|
|
216
|
+
task: params.task,
|
|
217
|
+
label: params.label,
|
|
218
|
+
model: params.model
|
|
219
|
+
});
|
|
220
|
+
return {
|
|
221
|
+
ok: true,
|
|
222
|
+
sessionKey: result.sessionKey,
|
|
223
|
+
summary: result.summary
|
|
224
|
+
};
|
|
225
|
+
} catch (error) {
|
|
226
|
+
logger.error(`【智小途-运行时】创建子智能体失败: ${error.message}`);
|
|
227
|
+
return {
|
|
228
|
+
ok: false,
|
|
229
|
+
error: error.message
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
const __openclaw_workclaw_runtime_emitted = true;
|
|
234
|
+
function getToolStartHint(toolName) {
|
|
235
|
+
if (!toolName)
|
|
236
|
+
return "🔄 正在执行工具...";
|
|
237
|
+
const normalizedToolName = toolName.toLowerCase().trim();
|
|
238
|
+
const toolMap = {
|
|
239
|
+
// 📁 文件操作
|
|
240
|
+
"read": { emoji: "📖", title: "读取文件", hint: "正在读取文件", aliases: ["file_read", "read_file"] },
|
|
241
|
+
"write": { emoji: "✍️", title: "写入文件", hint: "正在写入文件", aliases: ["file_write", "write_file"] },
|
|
242
|
+
"edit": { emoji: "✏️", title: "编辑文件", hint: "正在编辑文件", aliases: ["file_edit", "modify"] },
|
|
243
|
+
// 💻 系统命令
|
|
244
|
+
"exec": { emoji: "⚡", title: "执行命令", hint: "正在执行命令", aliases: ["bash", "shell", "cmd", "command"] },
|
|
245
|
+
"process": { emoji: "🔄", title: "进程管理", hint: "正在处理进程", aliases: ["process_manager"] },
|
|
246
|
+
// 🌐 网络/浏览器
|
|
247
|
+
"web_fetch": { emoji: "🕸️", title: "获取网页", hint: "正在获取网页内容", aliases: ["fetch", "http_get", "http_request", "curl"] },
|
|
248
|
+
"web_search": { emoji: "🔍", title: "搜索网页", hint: "正在搜索网页", aliases: ["search", "google_search", "brave_search"] },
|
|
249
|
+
"browser": { emoji: "🌐", title: "浏览器控制", hint: "正在控制浏览器", aliases: ["browser_control", "playwright"] },
|
|
250
|
+
// 💬 消息/通信
|
|
251
|
+
"message": { emoji: "💌", title: "发送消息", hint: "正在发送消息", aliases: ["send_message", "mcp_deliver", "deliver", "notify"] },
|
|
252
|
+
"tts": { emoji: "🔊", title: "文字转语音", hint: "正在转换语音", aliases: ["text_to_speech", "speak"] },
|
|
253
|
+
// 🎭 会话管理
|
|
254
|
+
"sessions_spawn": { emoji: "🧬", title: "创建子代理", hint: "正在创建子代理", aliases: ["spawn", "create_agent", "new_session"] },
|
|
255
|
+
"sessions_send": { emoji: "📤", title: "跨会话发消息", hint: "正在发送跨会话消息", aliases: ["send_to_session", "forward"] },
|
|
256
|
+
"sessions_list": { emoji: "📋", title: "列出会话", hint: "正在列出会话", aliases: ["list_sessions"] },
|
|
257
|
+
"sessions_history": { emoji: "📜", title: "获取历史", hint: "正在获取历史消息", aliases: ["get_history", "history"] },
|
|
258
|
+
"sessions_yield": { emoji: "⏸️", title: "暂停让出", hint: "正在暂停等待", aliases: ["yield", "pause"] },
|
|
259
|
+
"subagents": { emoji: "🐛", title: "子代理管理", hint: "正在管理子代理", aliases: ["subagent_manager"] },
|
|
260
|
+
"agents_list": { emoji: "🤖", title: "列出代理", hint: "正在列出可用代理", aliases: ["list_agents"] },
|
|
261
|
+
// 🧠 记忆/知识
|
|
262
|
+
"memory_search": { emoji: "🔎", title: "搜索记忆", hint: "正在搜索记忆", aliases: ["search_memory", "recall"] },
|
|
263
|
+
"memory_get": { emoji: "📝", title: "读取记忆", hint: "正在读取记忆片段", aliases: ["get_memory", "read_memory"] },
|
|
264
|
+
// ⏰ 定时任务
|
|
265
|
+
"openclaw-workclaw-cron-add-params": { emoji: "⏱️", title: "创建定时任务", hint: "正在创建定时任务", aliases: ["cron_add", "add_timer"] },
|
|
266
|
+
"openclaw-workclaw-cron-update-params": { emoji: "🔧", title: "修改定时任务", hint: "正在修改定时任务", aliases: ["cron_update", "update_timer"] },
|
|
267
|
+
"openclaw-workclaw-cron-remove-params": { emoji: "🗑️", title: "删除定时任务", hint: "正在删除定时任务", aliases: ["cron_remove", "remove_timer"] },
|
|
268
|
+
"openclaw-workclaw-cron-notify-sync": { emoji: "🔔", title: "定时触发通知", hint: "定时任务已触发", aliases: ["cron_trigger", "notify"] },
|
|
269
|
+
"openclaw-workclaw-cron-add-sync": { emoji: "✅", title: "同步定时任务", hint: "正在同步到后端", aliases: [] },
|
|
270
|
+
"openclaw-workclaw-cron-update-sync": { emoji: "✅", title: "同步定时更新", hint: "正在同步更新", aliases: [] },
|
|
271
|
+
"openclaw-workclaw-cron-remove-sync": { emoji: "✅", title: "同步定时删除", hint: "正在同步删除", aliases: [] },
|
|
272
|
+
"openclaw-workclaw-cron-disable-params": { emoji: "⏸️", title: "禁用定时任务", hint: "正在禁用定时任务", aliases: ["cron_disable"] },
|
|
273
|
+
"openclaw-workclaw-cron-enable-params": { emoji: "▶️", title: "启用定时任务", hint: "正在启用定时任务", aliases: ["cron_enable"] },
|
|
274
|
+
// 📊 其他
|
|
275
|
+
"session_status": { emoji: "📊", title: "会话状态", hint: "正在获取会话状态", aliases: ["status", "get_status"] },
|
|
276
|
+
"canvas": { emoji: "🎨", title: "画布控制", hint: "正在控制画布", aliases: ["canvas_control", "draw"] }
|
|
277
|
+
};
|
|
278
|
+
if (toolMap[normalizedToolName]) {
|
|
279
|
+
const tool = toolMap[normalizedToolName];
|
|
280
|
+
return `${tool.emoji} ${tool.hint}...`;
|
|
281
|
+
}
|
|
282
|
+
for (const [_key, tool] of Object.entries(toolMap)) {
|
|
283
|
+
if (tool.aliases.includes(normalizedToolName)) {
|
|
284
|
+
return `${tool.emoji} ${tool.hint}...`;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return `🔄 正在执行 ${toolName}...`;
|
|
288
|
+
}
|
|
289
|
+
function getToolResultHint(toolName) {
|
|
290
|
+
if (!toolName)
|
|
291
|
+
return "✅ 工具执行完成";
|
|
292
|
+
const normalizedToolName = toolName.toLowerCase().trim();
|
|
293
|
+
const toolMap = {
|
|
294
|
+
// 📁 文件操作
|
|
295
|
+
"read": { emoji: "📖", title: "读取文件", hint: "已读取文件", aliases: ["file_read", "read_file"] },
|
|
296
|
+
"write": { emoji: "✍️", title: "写入文件", hint: "已写入文件", aliases: ["file_write", "write_file"] },
|
|
297
|
+
"edit": { emoji: "✏️", title: "编辑文件", hint: "已编辑文件", aliases: ["file_edit", "modify"] },
|
|
298
|
+
// 💻 系统命令
|
|
299
|
+
"exec": { emoji: "⚡", title: "执行命令", hint: "已执行命令", aliases: ["bash", "shell", "cmd", "command"] },
|
|
300
|
+
"process": { emoji: "🔄", title: "进程管理", hint: "已处理进程", aliases: ["process_manager"] },
|
|
301
|
+
// 🌐 网络/浏览器
|
|
302
|
+
"web_fetch": { emoji: "🕸️", title: "获取网页", hint: "已获取网页", aliases: ["fetch", "http_get", "http_request", "curl"] },
|
|
303
|
+
"web_search": { emoji: "🔍", title: "搜索网页", hint: "已搜索网页", aliases: ["search", "google_search", "brave_search"] },
|
|
304
|
+
"browser": { emoji: "🌐", title: "浏览器控制", hint: "已控制浏览器", aliases: ["browser_control", "playwright"] },
|
|
305
|
+
// 💬 消息/通信
|
|
306
|
+
"message": { emoji: "💌", title: "发送消息", hint: "已发送消息", aliases: ["send_message", "mcp_deliver", "deliver", "notify"] },
|
|
307
|
+
"tts": { emoji: "🔊", title: "文字转语音", hint: "已转换语音", aliases: ["text_to_speech", "speak"] },
|
|
308
|
+
// 🎭 会话管理
|
|
309
|
+
"sessions_spawn": { emoji: "🧬", title: "创建子代理", hint: "已创建子代理", aliases: ["spawn", "create_agent", "new_session"] },
|
|
310
|
+
"sessions_send": { emoji: "📤", title: "跨会话发消息", hint: "已发送跨会话消息", aliases: ["send_to_session", "forward"] },
|
|
311
|
+
"sessions_list": { emoji: "📋", title: "列出会话", hint: "已列出会话", aliases: ["list_sessions"] },
|
|
312
|
+
"sessions_history": { emoji: "📜", title: "获取历史", hint: "已获取历史消息", aliases: ["get_history", "history"] },
|
|
313
|
+
"sessions_yield": { emoji: "⏸️", title: "暂停让出", hint: "已暂停等待", aliases: ["yield", "pause"] },
|
|
314
|
+
"subagents": { emoji: "🐛", title: "子代理管理", hint: "已管理子代理", aliases: ["subagent_manager"] },
|
|
315
|
+
"agents_list": { emoji: "🤖", title: "列出代理", hint: "已列出代理", aliases: ["list_agents"] },
|
|
316
|
+
// 🧠 记忆/知识
|
|
317
|
+
"memory_search": { emoji: "🔎", title: "搜索记忆", hint: "已搜索记忆", aliases: ["search_memory", "recall"] },
|
|
318
|
+
"memory_get": { emoji: "📝", title: "读取记忆", hint: "已读取记忆", aliases: ["get_memory", "read_memory"] },
|
|
319
|
+
// ⏰ 定时任务
|
|
320
|
+
"openclaw-workclaw-cron-add-params": { emoji: "⏱️", title: "创建定时任务", hint: "已创建定时任务", aliases: ["cron_add", "add_timer"] },
|
|
321
|
+
"openclaw-workclaw-cron-update-params": { emoji: "🔧", title: "修改定时任务", hint: "已修改定时任务", aliases: ["cron_update", "update_timer"] },
|
|
322
|
+
"openclaw-workclaw-cron-remove-params": { emoji: "🗑️", title: "删除定时任务", hint: "已删除定时任务", aliases: ["cron_remove", "remove_timer"] },
|
|
323
|
+
"openclaw-workclaw-cron-notify-sync": { emoji: "🔔", title: "定时触发通知", hint: "定时任务已触发", aliases: ["cron_trigger", "notify"] },
|
|
324
|
+
"openclaw-workclaw-cron-add-sync": { emoji: "✅", title: "同步定时任务", hint: "已同步定时任务", aliases: [] },
|
|
325
|
+
"openclaw-workclaw-cron-update-sync": { emoji: "✅", title: "同步定时更新", hint: "已同步更新", aliases: [] },
|
|
326
|
+
"openclaw-workclaw-cron-remove-sync": { emoji: "✅", title: "同步定时删除", hint: "已同步删除", aliases: [] },
|
|
327
|
+
"openclaw-workclaw-cron-disable-params": { emoji: "⏸️", title: "禁用定时任务", hint: "已禁用定时任务", aliases: ["cron_disable"] },
|
|
328
|
+
"openclaw-workclaw-cron-enable-params": { emoji: "▶️", title: "启用定时任务", hint: "已启用定时任务", aliases: ["cron_enable"] },
|
|
329
|
+
// 📊 其他
|
|
330
|
+
"session_status": { emoji: "📊", title: "会话状态", hint: "已获取会话状态", aliases: ["status", "get_status"] },
|
|
331
|
+
"canvas": { emoji: "🎨", title: "画布控制", hint: "已控制画布", aliases: ["canvas_control", "draw"] }
|
|
332
|
+
};
|
|
333
|
+
if (toolMap[normalizedToolName]) {
|
|
334
|
+
const tool = toolMap[normalizedToolName];
|
|
335
|
+
return `${tool.emoji} ${tool.hint}`;
|
|
336
|
+
}
|
|
337
|
+
for (const [_key, tool] of Object.entries(toolMap)) {
|
|
338
|
+
if (tool.aliases.includes(normalizedToolName)) {
|
|
339
|
+
return `${tool.emoji} ${tool.hint}`;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return `✅ 已执行 ${toolName}`;
|
|
343
|
+
}
|
|
344
|
+
async function getWorkclawSecrets(params) {
|
|
345
|
+
const secrets = {};
|
|
346
|
+
if (params.appKey) {
|
|
347
|
+
secrets.appKey = params.appKey;
|
|
348
|
+
}
|
|
349
|
+
if (params.appSecret) {
|
|
350
|
+
secrets.appSecret = params.appSecret;
|
|
351
|
+
}
|
|
352
|
+
return secrets;
|
|
353
|
+
}
|
|
354
|
+
export {
|
|
355
|
+
getDispatcherByAppKeyAndAccountId as A,
|
|
356
|
+
getLastInboundAt as B,
|
|
357
|
+
getLastOutboundAt as C,
|
|
358
|
+
clearAllToolContexts as D,
|
|
359
|
+
getAccountIdsByAppKey as E,
|
|
360
|
+
getToolStartHint as F,
|
|
361
|
+
getWorkclawSecrets as G,
|
|
362
|
+
setLastInboundAt as H,
|
|
363
|
+
spawnSubAgent as I,
|
|
364
|
+
__openclaw_workclaw_runtime_emitted as _,
|
|
365
|
+
getWorkclawRuntime as a,
|
|
366
|
+
setWorkclawRuntime as b,
|
|
367
|
+
setToolCallIdToRunIdMapping as c,
|
|
368
|
+
deleteToolContext as d,
|
|
369
|
+
getToolContext as e,
|
|
370
|
+
getToolResultHint as f,
|
|
371
|
+
getWorkclawConnectionConfig as g,
|
|
372
|
+
getRunIdByToolCallId as h,
|
|
373
|
+
isLogLevel as i,
|
|
374
|
+
setToolContext as j,
|
|
375
|
+
getWorkclawWsConnection as k,
|
|
376
|
+
logger as l,
|
|
377
|
+
setWorkclawWsConnection as m,
|
|
378
|
+
clearWorkclawWsConnection as n,
|
|
379
|
+
getAppKeyByAccountId as o,
|
|
380
|
+
getAllDispatchersByAppKey as p,
|
|
381
|
+
getReconnectScheduler as q,
|
|
382
|
+
clearReconnectScheduler as r,
|
|
383
|
+
setLastOutboundAt as s,
|
|
384
|
+
clearWorkclawConnectionConfig as t,
|
|
385
|
+
unregisterAccountContext as u,
|
|
386
|
+
registerAccountContext as v,
|
|
387
|
+
tryStartConnecting as w,
|
|
388
|
+
setReconnectScheduler as x,
|
|
389
|
+
finishConnecting as y,
|
|
390
|
+
setWorkclawConnectionConfig as z
|
|
391
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-api.d.ts","sourceRoot":"","sources":["../runtime-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { aC as parseSessionArchiveTimestamp, aD as formatSessionArchiveTimestamp, aE as emitSessionTranscriptUpdate, aF as resolveSessionFilePath, aG as resolveSessionTranscriptPathInDir, aH as resolveSessionTranscriptPath } from "./
|
|
1
|
+
import { w as resolveRequiredHomeDir } from "./plugin-load-profile-DOnG9jJ5-B0ymqOTX.js";
|
|
2
|
+
import { aC as parseSessionArchiveTimestamp, aD as formatSessionArchiveTimestamp, aE as emitSessionTranscriptUpdate, aF as resolveSessionFilePath, aG as resolveSessionTranscriptPathInDir, aH as resolveSessionTranscriptPath } from "./channel-CWeiUgV5.js";
|
|
3
3
|
import fs__default from "node:fs";
|
|
4
4
|
import path__default from "node:path";
|
|
5
5
|
import os__default from "node:os";
|
package/dist/setup-entry.js
CHANGED
|
@@ -1,200 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createRequire } from "node:module";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
import fs__default from "node:fs";
|
|
5
|
-
import path__default from "node:path";
|
|
6
|
-
const nodeRequire = createRequire(import.meta.url);
|
|
7
|
-
const moduleLoaders = /* @__PURE__ */ new Map();
|
|
8
|
-
const loadedModuleExports = /* @__PURE__ */ new Map();
|
|
9
|
-
const disableBundledEntrySourceFallbackEnv = "OPENCLAW_DISABLE_BUNDLED_ENTRY_SOURCE_FALLBACK";
|
|
10
|
-
function isTruthyEnvFlag(value) {
|
|
11
|
-
return value !== void 0 && !/^(?:0|false)$/iu.test(value.trim());
|
|
12
|
-
}
|
|
13
|
-
function resolveSpecifierCandidates(modulePath) {
|
|
14
|
-
const ext = normalizeLowercaseStringOrEmpty(path__default.extname(modulePath));
|
|
15
|
-
if (ext === ".js") return [modulePath, modulePath.slice(0, -3) + ".ts"];
|
|
16
|
-
if (ext === ".mjs") return [modulePath, modulePath.slice(0, -4) + ".mts"];
|
|
17
|
-
if (ext === ".cjs") return [modulePath, modulePath.slice(0, -4) + ".cts"];
|
|
18
|
-
return [modulePath];
|
|
19
|
-
}
|
|
20
|
-
function resolveEntryBoundaryRoot(importMetaUrl) {
|
|
21
|
-
return path__default.dirname(fileURLToPath(importMetaUrl));
|
|
22
|
-
}
|
|
23
|
-
function addBundledEntryCandidates(candidates, basePath, boundaryRoot) {
|
|
24
|
-
for (const candidate of resolveSpecifierCandidates(basePath)) {
|
|
25
|
-
if (candidates.some((entry) => entry.path === candidate && entry.boundaryRoot === boundaryRoot)) continue;
|
|
26
|
-
candidates.push({
|
|
27
|
-
path: candidate,
|
|
28
|
-
boundaryRoot
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function resolveBundledEntryModuleCandidates(importMetaUrl, specifier) {
|
|
33
|
-
const importerPath = fileURLToPath(importMetaUrl);
|
|
34
|
-
const importerDir = path__default.dirname(importerPath);
|
|
35
|
-
const boundaryRoot = resolveEntryBoundaryRoot(importMetaUrl);
|
|
36
|
-
const candidates = [];
|
|
37
|
-
addBundledEntryCandidates(candidates, path__default.resolve(importerDir, specifier), boundaryRoot);
|
|
38
|
-
const sourceRelativeSpecifier = specifier.replace(/^\.\/src\//u, "./");
|
|
39
|
-
if (sourceRelativeSpecifier !== specifier) addBundledEntryCandidates(candidates, path__default.resolve(importerDir, sourceRelativeSpecifier), boundaryRoot);
|
|
40
|
-
const packageRoot = resolveLoaderPackageRoot({
|
|
41
|
-
modulePath: importerPath,
|
|
42
|
-
moduleUrl: importMetaUrl,
|
|
43
|
-
cwd: importerDir,
|
|
44
|
-
argv1: process.argv[1]
|
|
45
|
-
});
|
|
46
|
-
if (!packageRoot) return candidates;
|
|
47
|
-
const distExtensionsRoot = path__default.join(packageRoot, "dist", "extensions") + path__default.sep;
|
|
48
|
-
if (!importerPath.startsWith(distExtensionsRoot)) return candidates;
|
|
49
|
-
if (isTruthyEnvFlag(process.env[disableBundledEntrySourceFallbackEnv])) return candidates;
|
|
50
|
-
const pluginDirName = path__default.basename(importerDir);
|
|
51
|
-
const sourcePluginRoot = path__default.join(packageRoot, "extensions", pluginDirName);
|
|
52
|
-
if (sourcePluginRoot === boundaryRoot) return candidates;
|
|
53
|
-
addBundledEntryCandidates(candidates, path__default.resolve(sourcePluginRoot, specifier), sourcePluginRoot);
|
|
54
|
-
if (sourceRelativeSpecifier !== specifier) addBundledEntryCandidates(candidates, path__default.resolve(sourcePluginRoot, sourceRelativeSpecifier), sourcePluginRoot);
|
|
55
|
-
return candidates;
|
|
56
|
-
}
|
|
57
|
-
function formatBundledEntryUnknownError(error) {
|
|
58
|
-
if (typeof error === "string") return error;
|
|
59
|
-
if (error === void 0) return "boundary validation failed";
|
|
60
|
-
try {
|
|
61
|
-
return JSON.stringify(error);
|
|
62
|
-
} catch {
|
|
63
|
-
return "non-serializable error";
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
function formatBundledEntryModuleOpenFailure(params) {
|
|
67
|
-
const importerPath = fileURLToPath(params.importMetaUrl);
|
|
68
|
-
const errorDetail = params.failure.error instanceof Error ? params.failure.error.message : formatBundledEntryUnknownError(params.failure.error);
|
|
69
|
-
return [
|
|
70
|
-
`bundled plugin entry "${params.specifier}" failed to open`,
|
|
71
|
-
`from "${importerPath}"`,
|
|
72
|
-
`(resolved "${params.resolvedPath}", plugin root "${params.boundaryRoot}",`,
|
|
73
|
-
`reason "${params.failure.reason}"): ${errorDetail}`
|
|
74
|
-
].join(" ");
|
|
75
|
-
}
|
|
76
|
-
function resolveBundledEntryModulePath(importMetaUrl, specifier) {
|
|
77
|
-
const candidates = resolveBundledEntryModuleCandidates(importMetaUrl, specifier);
|
|
78
|
-
const fallbackCandidate = candidates[0] ?? {
|
|
79
|
-
path: path__default.resolve(path__default.dirname(fileURLToPath(importMetaUrl)), specifier),
|
|
80
|
-
boundaryRoot: resolveEntryBoundaryRoot(importMetaUrl)
|
|
81
|
-
};
|
|
82
|
-
let firstFailure = null;
|
|
83
|
-
for (const candidate of candidates) {
|
|
84
|
-
const opened = openRootFileSync({
|
|
85
|
-
absolutePath: candidate.path,
|
|
86
|
-
rootPath: candidate.boundaryRoot,
|
|
87
|
-
boundaryLabel: "plugin root",
|
|
88
|
-
rejectHardlinks: false,
|
|
89
|
-
skipLexicalRootCheck: true
|
|
90
|
-
});
|
|
91
|
-
if (opened.ok) {
|
|
92
|
-
fs__default.closeSync(opened.fd);
|
|
93
|
-
return opened.path;
|
|
94
|
-
}
|
|
95
|
-
firstFailure ??= {
|
|
96
|
-
candidate,
|
|
97
|
-
failure: opened
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
const failure = firstFailure;
|
|
101
|
-
if (!failure) throw new Error(formatBundledEntryModuleOpenFailure({
|
|
102
|
-
importMetaUrl,
|
|
103
|
-
specifier,
|
|
104
|
-
resolvedPath: fallbackCandidate.path,
|
|
105
|
-
boundaryRoot: fallbackCandidate.boundaryRoot,
|
|
106
|
-
failure: {
|
|
107
|
-
ok: false,
|
|
108
|
-
reason: "path",
|
|
109
|
-
error: /* @__PURE__ */ new Error(`ENOENT: no such file or directory, lstat '${fallbackCandidate.path}'`)
|
|
110
|
-
}
|
|
111
|
-
}));
|
|
112
|
-
throw new Error(formatBundledEntryModuleOpenFailure({
|
|
113
|
-
importMetaUrl,
|
|
114
|
-
specifier,
|
|
115
|
-
resolvedPath: failure.candidate.path,
|
|
116
|
-
boundaryRoot: failure.candidate.boundaryRoot,
|
|
117
|
-
failure: failure.failure
|
|
118
|
-
}));
|
|
119
|
-
}
|
|
120
|
-
function getSourceModuleLoader(modulePath, options) {
|
|
121
|
-
return getCachedPluginSourceModuleLoader({
|
|
122
|
-
cache: moduleLoaders,
|
|
123
|
-
modulePath,
|
|
124
|
-
importerUrl: import.meta.url,
|
|
125
|
-
preferBuiltDist: true,
|
|
126
|
-
loaderFilename: import.meta.url,
|
|
127
|
-
...options.createLoaderForTest ? { createLoader: options.createLoaderForTest } : {}
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
function canTryNodeRequireBuiltModule(modulePath) {
|
|
131
|
-
return (modulePath.includes(`${path__default.sep}dist${path__default.sep}`) || modulePath.includes(`${path__default.sep}dist-runtime${path__default.sep}`)) && [
|
|
132
|
-
".js",
|
|
133
|
-
".mjs",
|
|
134
|
-
".cjs"
|
|
135
|
-
].includes(normalizeLowercaseStringOrEmpty(path__default.extname(modulePath)));
|
|
136
|
-
}
|
|
137
|
-
function loadBundledEntryModuleSync(importMetaUrl, specifier, options = {}) {
|
|
138
|
-
const modulePath = resolveBundledEntryModulePath(importMetaUrl, specifier);
|
|
139
|
-
const cached = loadedModuleExports.get(modulePath);
|
|
140
|
-
if (cached !== void 0) return cached;
|
|
141
|
-
let loaded;
|
|
142
|
-
const profile = shouldProfilePluginLoader();
|
|
143
|
-
const loadStartMs = profile ? performance.now() : 0;
|
|
144
|
-
let sourceLoaderReadyMs = 0;
|
|
145
|
-
if (canTryNodeRequireBuiltModule(modulePath)) try {
|
|
146
|
-
loaded = nodeRequire(modulePath);
|
|
147
|
-
} catch {
|
|
148
|
-
const moduleLoader = getSourceModuleLoader(modulePath, options);
|
|
149
|
-
sourceLoaderReadyMs = profile ? performance.now() : 0;
|
|
150
|
-
loaded = moduleLoader(toSafeImportPath(modulePath));
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
const moduleLoader = getSourceModuleLoader(modulePath, options);
|
|
154
|
-
sourceLoaderReadyMs = profile ? performance.now() : 0;
|
|
155
|
-
loaded = moduleLoader(toSafeImportPath(modulePath));
|
|
156
|
-
}
|
|
157
|
-
if (profile) {
|
|
158
|
-
const endMs = performance.now();
|
|
159
|
-
console.error(formatPluginLoadProfileLine({
|
|
160
|
-
phase: "bundled-entry-module-load",
|
|
161
|
-
pluginId: "(bundled-entry)",
|
|
162
|
-
source: modulePath,
|
|
163
|
-
elapsedMs: endMs - loadStartMs,
|
|
164
|
-
extras: [["sourceLoaderCreateMs", sourceLoaderReadyMs ? sourceLoaderReadyMs - loadStartMs : 0], ["sourceLoaderCallMs", sourceLoaderReadyMs ? endMs - sourceLoaderReadyMs : 0]]
|
|
165
|
-
}));
|
|
166
|
-
}
|
|
167
|
-
loadedModuleExports.set(modulePath, loaded);
|
|
168
|
-
return loaded;
|
|
169
|
-
}
|
|
170
|
-
function loadBundledEntryExportSync(importMetaUrl, reference, options) {
|
|
171
|
-
const loaded = loadBundledEntryModuleSync(importMetaUrl, reference.specifier, options);
|
|
172
|
-
const resolved = loaded && typeof loaded === "object" && "default" in loaded ? loaded.default : loaded;
|
|
173
|
-
if (!reference.exportName) return resolved;
|
|
174
|
-
const record = resolved ?? loaded;
|
|
175
|
-
if (!record || !(reference.exportName in record)) throw new Error(`missing export "${reference.exportName}" from bundled entry module ${reference.specifier}`);
|
|
176
|
-
return record[reference.exportName];
|
|
177
|
-
}
|
|
178
|
-
function defineBundledChannelSetupEntry({ importMetaUrl, plugin, secrets, runtime, legacyStateMigrations, legacySessionSurface, features }) {
|
|
179
|
-
const setChannelRuntime = runtime ? (pluginRuntime) => {
|
|
180
|
-
loadBundledEntryExportSync(importMetaUrl, runtime)(pluginRuntime);
|
|
181
|
-
} : void 0;
|
|
182
|
-
const loadLegacyStateMigrationDetector = legacyStateMigrations ? (options) => loadBundledEntryExportSync(importMetaUrl, legacyStateMigrations, options) : void 0;
|
|
183
|
-
const loadLegacySessionSurface = legacySessionSurface ? (options) => loadBundledEntryExportSync(importMetaUrl, legacySessionSurface, options) : void 0;
|
|
184
|
-
return {
|
|
185
|
-
kind: "bundled-channel-setup-entry",
|
|
186
|
-
loadSetupPlugin: (options) => loadBundledEntryExportSync(importMetaUrl, plugin, options),
|
|
187
|
-
...secrets ? { loadSetupSecrets: (options) => loadBundledEntryExportSync(importMetaUrl, secrets, options) } : {},
|
|
188
|
-
...loadLegacyStateMigrationDetector ? { loadLegacyStateMigrationDetector } : {},
|
|
189
|
-
...loadLegacySessionSurface ? { loadLegacySessionSurface } : {},
|
|
190
|
-
...setChannelRuntime ? { setChannelRuntime } : {},
|
|
191
|
-
...features ? { features } : {}
|
|
192
|
-
};
|
|
193
|
-
}
|
|
1
|
+
import { a as defineBundledChannelSetupEntry } from "./channel-entry-contract-BDMmGZzs-4ZlSsA7g.js";
|
|
194
2
|
const setupEntry = defineBundledChannelSetupEntry({
|
|
195
3
|
importMetaUrl: import.meta.url,
|
|
196
4
|
plugin: {
|
|
197
|
-
specifier: "./api.js",
|
|
5
|
+
specifier: "./channel-plugin-api.js",
|
|
198
6
|
exportName: "workclawPlugin"
|
|
199
7
|
},
|
|
200
8
|
secrets: {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { _, D, r, t, n, d, y, E, p, o, A, B, C, q, h, e, f, F, g, a, G, k, v, H, s, x, c, j, z, b, m, I, w, u } from "../runtime-api-DU-e2Pen.js";
|
|
2
|
+
export {
|
|
3
|
+
_ as __openclaw_workclaw_runtime_emitted,
|
|
4
|
+
D as clearAllToolContexts,
|
|
5
|
+
r as clearReconnectScheduler,
|
|
6
|
+
t as clearWorkclawConnectionConfig,
|
|
7
|
+
n as clearWorkclawWsConnection,
|
|
8
|
+
d as deleteToolContext,
|
|
9
|
+
y as finishConnecting,
|
|
10
|
+
E as getAccountIdsByAppKey,
|
|
11
|
+
p as getAllDispatchersByAppKey,
|
|
12
|
+
o as getAppKeyByAccountId,
|
|
13
|
+
A as getDispatcherByAppKeyAndAccountId,
|
|
14
|
+
B as getLastInboundAt,
|
|
15
|
+
C as getLastOutboundAt,
|
|
16
|
+
q as getReconnectScheduler,
|
|
17
|
+
h as getRunIdByToolCallId,
|
|
18
|
+
e as getToolContext,
|
|
19
|
+
f as getToolResultHint,
|
|
20
|
+
F as getToolStartHint,
|
|
21
|
+
g as getWorkclawConnectionConfig,
|
|
22
|
+
a as getWorkclawRuntime,
|
|
23
|
+
G as getWorkclawSecrets,
|
|
24
|
+
k as getWorkclawWsConnection,
|
|
25
|
+
v as registerAccountContext,
|
|
26
|
+
H as setLastInboundAt,
|
|
27
|
+
s as setLastOutboundAt,
|
|
28
|
+
x as setReconnectScheduler,
|
|
29
|
+
c as setToolCallIdToRunIdMapping,
|
|
30
|
+
j as setToolContext,
|
|
31
|
+
z as setWorkclawConnectionConfig,
|
|
32
|
+
b as setWorkclawRuntime,
|
|
33
|
+
m as setWorkclawWsConnection,
|
|
34
|
+
I as spawnSubAgent,
|
|
35
|
+
w as tryStartConnecting,
|
|
36
|
+
u as unregisterAccountContext
|
|
37
|
+
};
|