shennian 0.2.88 → 0.2.90
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/assets/wechat-channel/macos/manifest.json +22 -0
- package/dist/assets/wechat-channel/macos/shennian-wechat-channel-helper +0 -0
- package/dist/bin/shennian.js +1 -1
- package/dist/publish-build-manifest.json +548 -0
- package/dist/scripts/wechat-rpa-confirmation.mjs +5 -97
- package/dist/src/agent-env.js +4 -105
- package/dist/src/agents/adapter.d.ts +6 -0
- package/dist/src/agents/adapter.js +1 -19
- package/dist/src/agents/claude.js +8 -305
- package/dist/src/agents/codex-control.d.ts +35 -0
- package/dist/src/agents/codex-control.js +2 -0
- package/dist/src/agents/codex-utils.js +7 -200
- package/dist/src/agents/codex.d.ts +8 -0
- package/dist/src/agents/codex.js +15 -863
- package/dist/src/agents/command-spec.js +2 -413
- package/dist/src/agents/config-status.js +1 -226
- package/dist/src/agents/cursor.js +1 -249
- package/dist/src/agents/custom.js +4 -271
- package/dist/src/agents/detect.js +1 -56
- package/dist/src/agents/external-channel-instructions.js +10 -94
- package/dist/src/agents/gemini.js +1 -173
- package/dist/src/agents/manager.js +13 -157
- package/dist/src/agents/model-registry/cache.js +1 -37
- package/dist/src/agents/model-registry/discovery.js +2 -187
- package/dist/src/agents/model-registry/parsers.js +4 -447
- package/dist/src/agents/model-registry/runner.js +1 -30
- package/dist/src/agents/model-registry/service.js +1 -78
- package/dist/src/agents/model-registry/types.js +1 -8
- package/dist/src/agents/model-registry.js +1 -18
- package/dist/src/agents/openclaw.js +2 -275
- package/dist/src/agents/opencode.js +1 -231
- package/dist/src/agents/pi-context.js +12 -217
- package/dist/src/agents/pi.js +14 -723
- package/dist/src/agents/platform-instructions.js +9 -54
- package/dist/src/channels/base.d.ts +4 -1
- package/dist/src/channels/base.js +1 -3
- package/dist/src/channels/registry.js +1 -30
- package/dist/src/channels/reply-split.js +10 -89
- package/dist/src/channels/runtime.d.ts +1 -0
- package/dist/src/channels/runtime.js +5 -533
- package/dist/src/channels/secret-registry.d.ts +1 -0
- package/dist/src/channels/secret-registry.js +1 -46
- package/dist/src/channels/websocket.js +8 -378
- package/dist/src/channels/wechat-channel/anchor.d.ts +10 -0
- package/dist/src/channels/wechat-channel/anchor.js +1 -0
- package/dist/src/channels/wechat-channel/client.d.ts +74 -0
- package/dist/src/channels/wechat-channel/client.js +1 -0
- package/dist/src/channels/wechat-channel/cooldown.d.ts +15 -0
- package/dist/src/channels/wechat-channel/cooldown.js +1 -0
- package/dist/src/channels/wechat-channel/fingerprint.d.ts +28 -0
- package/dist/src/channels/wechat-channel/fingerprint.js +1 -0
- package/dist/src/channels/wechat-channel/helper-assets.d.ts +37 -0
- package/dist/src/channels/wechat-channel/helper-assets.js +1 -0
- package/dist/src/channels/wechat-channel/helper-client.d.ts +25 -0
- package/dist/src/channels/wechat-channel/helper-client.js +3 -0
- package/dist/src/channels/wechat-channel/helper-protocol.d.ts +84 -0
- package/dist/src/channels/wechat-channel/helper-protocol.js +1 -0
- package/dist/src/channels/wechat-channel/index.d.ts +17 -0
- package/dist/src/channels/wechat-channel/index.js +1 -0
- package/dist/src/channels/wechat-channel/ledger.d.ts +33 -0
- package/dist/src/channels/wechat-channel/ledger.js +1 -0
- package/dist/src/channels/wechat-channel/media-resolver.d.ts +32 -0
- package/dist/src/channels/wechat-channel/media-resolver.js +1 -0
- package/dist/src/channels/wechat-channel/message-key.d.ts +19 -0
- package/dist/src/channels/wechat-channel/message-key.js +1 -0
- package/dist/src/channels/wechat-channel/observer.d.ts +64 -0
- package/dist/src/channels/wechat-channel/observer.js +1 -0
- package/dist/src/channels/wechat-channel/outbound-ledger.d.ts +69 -0
- package/dist/src/channels/wechat-channel/outbound-ledger.js +2 -0
- package/dist/src/channels/wechat-channel/outbound-sender.d.ts +26 -0
- package/dist/src/channels/wechat-channel/outbound-sender.js +1 -0
- package/dist/src/channels/wechat-channel/preflight.d.ts +37 -0
- package/dist/src/channels/wechat-channel/preflight.js +1 -0
- package/dist/src/channels/wechat-channel/runner.d.ts +34 -0
- package/dist/src/channels/wechat-channel/runner.js +1 -0
- package/dist/src/channels/wechat-channel/runtime.d.ts +45 -0
- package/dist/src/channels/wechat-channel/runtime.js +1 -0
- package/dist/src/channels/wechat-channel/scheduler.d.ts +35 -0
- package/dist/src/channels/wechat-channel/scheduler.js +1 -0
- package/dist/src/channels/wechat-rpa/macos-flow.js +1 -96
- package/dist/src/channels/wechat-rpa/macos.js +6 -48
- package/dist/src/channels/wechat-rpa/normalizer.js +7 -127
- package/dist/src/channels/wechat-rpa.d.ts +21 -0
- package/dist/src/channels/wechat-rpa.js +6 -1022
- package/dist/src/channels/wecom.js +4 -357
- package/dist/src/commands/agent.js +6 -131
- package/dist/src/commands/daemon-windows.js +8 -48
- package/dist/src/commands/daemon.js +19 -1013
- package/dist/src/commands/external-attachments.js +1 -51
- package/dist/src/commands/external.js +1 -137
- package/dist/src/commands/manager.js +2 -389
- package/dist/src/commands/pair-qr.js +1 -6
- package/dist/src/commands/pair.js +9 -287
- package/dist/src/commands/tools.js +1 -34
- package/dist/src/commands/upgrade.js +1 -198
- package/dist/src/config/index.js +1 -35
- package/dist/src/daemon-log.js +6 -58
- package/dist/src/env-path.js +1 -64
- package/dist/src/fs/boundary.js +1 -126
- package/dist/src/fs/handler.js +1 -130
- package/dist/src/fs/security.js +1 -32
- package/dist/src/fs/text-decoder.d.ts +10 -0
- package/dist/src/fs/text-decoder.js +1 -0
- package/dist/src/index.js +2 -404
- package/dist/src/log-reporter.js +1 -16
- package/dist/src/manager/prompt.js +29 -34
- package/dist/src/manager/registry.js +2 -269
- package/dist/src/manager/runtime.js +19 -1003
- package/dist/src/native-fusion/config.js +1 -5
- package/dist/src/native-fusion/opencode-parser.js +3 -123
- package/dist/src/native-fusion/parser-common.js +8 -264
- package/dist/src/native-fusion/parsers.js +8 -729
- package/dist/src/native-fusion/service.d.ts +10 -0
- package/dist/src/native-fusion/service.js +2 -198
- package/dist/src/native-fusion/state.js +1 -22
- package/dist/src/native-fusion/types.js +1 -1
- package/dist/src/region.js +1 -88
- package/dist/src/relay/client.js +1 -343
- package/dist/src/session/archive-zip.js +1 -220
- package/dist/src/session/handlers/agent-config.js +1 -150
- package/dist/src/session/handlers/agents.js +1 -55
- package/dist/src/session/handlers/chat.js +2 -733
- package/dist/src/session/handlers/control.js +1 -55
- package/dist/src/session/handlers/fs.js +1 -747
- package/dist/src/session/handlers/session-refresh.js +1 -35
- package/dist/src/session/handlers/skills.js +1 -121
- package/dist/src/session/handlers/title.js +1 -60
- package/dist/src/session/handlers/tool-detail.d.ts +3 -0
- package/dist/src/session/handlers/tool-detail.js +1 -0
- package/dist/src/session/manager.d.ts +3 -0
- package/dist/src/session/manager.js +1 -261
- package/dist/src/session/projection.js +1 -54
- package/dist/src/session/queue.js +4 -317
- package/dist/src/session/remote-attachments.js +1 -72
- package/dist/src/session/store.js +3 -109
- package/dist/src/session/types.d.ts +4 -0
- package/dist/src/session/types.js +1 -4
- package/dist/src/skills/registry.js +15 -148
- package/dist/src/skills/setup.js +1 -101
- package/dist/src/tools/markdown-to-pdf.js +10 -346
- package/dist/src/upgrade/engine.js +3 -347
- package/package.json +3 -2
- package/dist/scripts/wechat-rpa-download-candidates.mjs +0 -105
|
@@ -1,150 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// @test src/__tests__/agent-config-status.test.ts
|
|
3
|
-
// @test src/__tests__/agent-config-handler.test.ts
|
|
4
|
-
import { mkdir } from 'node:fs/promises';
|
|
5
|
-
import { createAgent } from '../../agents/adapter.js';
|
|
6
|
-
import { buildManagedAgentEnv, deleteManagedAgentProviderConfig, getAgentConfigSummary, upsertManagedAgentProviderConfig, } from '../../agents/config-status.js';
|
|
7
|
-
import { resolveShennianPath } from '../../config/index.js';
|
|
8
|
-
import { handleAgentsRefresh } from './agents.js';
|
|
9
|
-
const AGENT_TEST_TIMEOUT_MS = 30_000;
|
|
10
|
-
const AGENT_TEST_PROMPT = '这是一次神念连接测试。请只回复 OK,不要解释。';
|
|
11
|
-
const AGENT_TEST_WORK_DIR = resolveShennianPath('tmp', 'agent-config-test');
|
|
12
|
-
function normalizeAgent(value) {
|
|
13
|
-
if (value === 'codex' || value === 'claude' || value === 'pi')
|
|
14
|
-
return value;
|
|
15
|
-
throw new Error('Only Codex, Claude Code, and Nian provider config are supported');
|
|
16
|
-
}
|
|
17
|
-
export async function handleAgentConfigGet(runtime, req) {
|
|
18
|
-
const agent = normalizeAgent(req.params.agent);
|
|
19
|
-
runtime.client.sendRes({
|
|
20
|
-
type: 'res',
|
|
21
|
-
id: req.id,
|
|
22
|
-
ok: true,
|
|
23
|
-
payload: { agent, config: getAgentConfigSummary(agent) },
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
export async function handleAgentConfigUpsert(runtime, req) {
|
|
27
|
-
const agent = normalizeAgent(req.params.agent);
|
|
28
|
-
const baseUrl = typeof req.params.baseUrl === 'string' ? req.params.baseUrl.trim() : undefined;
|
|
29
|
-
const token = typeof req.params.token === 'string' ? req.params.token.trim() : undefined;
|
|
30
|
-
if (!baseUrl && !token)
|
|
31
|
-
throw new Error('Base URL or token is required');
|
|
32
|
-
upsertManagedAgentProviderConfig({ agent, baseUrl, token });
|
|
33
|
-
runtime.client.sendRes({
|
|
34
|
-
type: 'res',
|
|
35
|
-
id: req.id,
|
|
36
|
-
ok: true,
|
|
37
|
-
payload: { agent, config: getAgentConfigSummary(agent) },
|
|
38
|
-
});
|
|
39
|
-
await broadcastAgents(runtime);
|
|
40
|
-
}
|
|
41
|
-
export async function handleAgentConfigClear(runtime, req) {
|
|
42
|
-
const agent = normalizeAgent(req.params.agent);
|
|
43
|
-
deleteManagedAgentProviderConfig(agent);
|
|
44
|
-
runtime.client.sendRes({
|
|
45
|
-
type: 'res',
|
|
46
|
-
id: req.id,
|
|
47
|
-
ok: true,
|
|
48
|
-
payload: { agent, config: getAgentConfigSummary(agent) },
|
|
49
|
-
});
|
|
50
|
-
await broadcastAgents(runtime);
|
|
51
|
-
}
|
|
52
|
-
export async function handleAgentConfigTest(runtime, req) {
|
|
53
|
-
const agent = normalizeAgent(req.params.agent);
|
|
54
|
-
const summary = getAgentConfigSummary(agent);
|
|
55
|
-
try {
|
|
56
|
-
const result = await runAgentConfigTest(agent);
|
|
57
|
-
runtime.client.sendRes({
|
|
58
|
-
type: 'res',
|
|
59
|
-
id: req.id,
|
|
60
|
-
ok: true,
|
|
61
|
-
payload: { agent, config: getAgentConfigSummary(agent), test: result },
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
catch (err) {
|
|
65
|
-
runtime.client.sendRes({
|
|
66
|
-
type: 'res',
|
|
67
|
-
id: req.id,
|
|
68
|
-
ok: false,
|
|
69
|
-
payload: { agent, config: summary },
|
|
70
|
-
error: err instanceof Error ? err.message : String(err),
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
async function runAgentConfigTest(agent) {
|
|
75
|
-
const adapter = createAgent(agent);
|
|
76
|
-
if (!adapter)
|
|
77
|
-
throw new Error(`Unsupported agent: ${agent}`);
|
|
78
|
-
const sessionId = `agent-test-${agent}-${Date.now()}`;
|
|
79
|
-
await mkdir(AGENT_TEST_WORK_DIR, { recursive: true });
|
|
80
|
-
let settled = false;
|
|
81
|
-
let failWait = () => { };
|
|
82
|
-
const waitForReply = new Promise((resolve, reject) => {
|
|
83
|
-
const timeout = setTimeout(() => {
|
|
84
|
-
if (settled)
|
|
85
|
-
return;
|
|
86
|
-
settled = true;
|
|
87
|
-
reject(new Error('Agent test timed out after 30 seconds'));
|
|
88
|
-
}, AGENT_TEST_TIMEOUT_MS);
|
|
89
|
-
function finish(result) {
|
|
90
|
-
if (settled)
|
|
91
|
-
return;
|
|
92
|
-
settled = true;
|
|
93
|
-
clearTimeout(timeout);
|
|
94
|
-
resolve(result);
|
|
95
|
-
}
|
|
96
|
-
function fail(error) {
|
|
97
|
-
if (settled)
|
|
98
|
-
return;
|
|
99
|
-
settled = true;
|
|
100
|
-
clearTimeout(timeout);
|
|
101
|
-
reject(error);
|
|
102
|
-
}
|
|
103
|
-
failWait = fail;
|
|
104
|
-
adapter.on('agentEvent', (event) => {
|
|
105
|
-
if (event.state === 'delta' && event.text && !event.thinking) {
|
|
106
|
-
finish({ mode: 'agent-run', reply: event.text.slice(0, 120) });
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
if (event.state === 'final') {
|
|
110
|
-
finish({ mode: 'agent-run' });
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
if (event.state === 'error') {
|
|
114
|
-
fail(new Error(event.message || 'Agent test failed'));
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
adapter.on('error', fail);
|
|
118
|
-
});
|
|
119
|
-
try {
|
|
120
|
-
adapter.configure?.({
|
|
121
|
-
sessionId,
|
|
122
|
-
env: getManagedEnvForAgent(agent),
|
|
123
|
-
});
|
|
124
|
-
await adapter.start(sessionId, AGENT_TEST_WORK_DIR, null);
|
|
125
|
-
const sendPromise = adapter.send(AGENT_TEST_PROMPT).catch((err) => {
|
|
126
|
-
failWait(err instanceof Error ? err : new Error(String(err)));
|
|
127
|
-
});
|
|
128
|
-
return await Promise.race([waitForReply, sendPromise.then(() => waitForReply)]);
|
|
129
|
-
}
|
|
130
|
-
finally {
|
|
131
|
-
adapter.removeAllListeners();
|
|
132
|
-
await adapter.stop().catch(() => { });
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
async function broadcastAgents(runtime) {
|
|
136
|
-
const req = {
|
|
137
|
-
type: 'req',
|
|
138
|
-
id: `agent-config-refresh-${Date.now()}`,
|
|
139
|
-
method: 'agents.refresh',
|
|
140
|
-
params: {},
|
|
141
|
-
};
|
|
142
|
-
await handleAgentsRefresh(runtime, req);
|
|
143
|
-
}
|
|
144
|
-
export function getManagedEnvForAgent(agentType) {
|
|
145
|
-
// Re-export point kept here for session handlers to avoid reaching into storage internals.
|
|
146
|
-
// The implementation lives in agents/config-status.ts.
|
|
147
|
-
return agentType === 'codex' || agentType === 'claude' || agentType === 'pi'
|
|
148
|
-
? buildManagedAgentEnv(agentType)
|
|
149
|
-
: {};
|
|
150
|
-
}
|
|
1
|
+
import{mkdir as y}from"node:fs/promises";import{createAgent as w}from"../../agents/adapter.js";import{buildManagedAgentEnv as h,deleteManagedAgentProviderConfig as A,getAgentConfigSummary as s,upsertManagedAgentProviderConfig as E}from"../../agents/config-status.js";import{resolveShennianPath as T}from"../../config/index.js";import{handleAgentsRefresh as C}from"./agents.js";const k=3e4,R="\u8FD9\u662F\u4E00\u6B21\u795E\u5FF5\u8FDE\u63A5\u6D4B\u8BD5\u3002\u8BF7\u53EA\u56DE\u590D OK\uFF0C\u4E0D\u8981\u89E3\u91CA\u3002",p=T("tmp","agent-config-test");function c(e){if(e==="codex"||e==="claude"||e==="pi")return e;throw new Error("Only Codex, Claude Code, and Nian provider config are supported")}async function O(e,t){const n=c(t.params.agent);e.client.sendRes({type:"res",id:t.id,ok:!0,payload:{agent:n,config:s(n)}})}async function G(e,t){const n=c(t.params.agent),r=typeof t.params.baseUrl=="string"?t.params.baseUrl.trim():void 0,o=typeof t.params.token=="string"?t.params.token.trim():void 0;if(!r&&!o)throw new Error("Base URL or token is required");E({agent:n,baseUrl:r,token:o}),e.client.sendRes({type:"res",id:t.id,ok:!0,payload:{agent:n,config:s(n)}}),await m(e)}async function N(e,t){const n=c(t.params.agent);A(n),e.client.sendRes({type:"res",id:t.id,ok:!0,payload:{agent:n,config:s(n)}}),await m(e)}async function $(e,t){const n=c(t.params.agent),r=s(n);try{const o=await x(n);e.client.sendRes({type:"res",id:t.id,ok:!0,payload:{agent:n,config:s(n),test:o}})}catch(o){e.client.sendRes({type:"res",id:t.id,ok:!1,payload:{agent:n,config:r},error:o instanceof Error?o.message:String(o)})}}async function x(e){const t=w(e);if(!t)throw new Error(`Unsupported agent: ${e}`);const n=`agent-test-${e}-${Date.now()}`;await y(p,{recursive:!0});let r=!1,o=()=>{};const g=new Promise((d,i)=>{const l=setTimeout(()=>{r||(r=!0,i(new Error("Agent test timed out after 30 seconds")))},k);function u(a){r||(r=!0,clearTimeout(l),d(a))}function f(a){r||(r=!0,clearTimeout(l),i(a))}o=f,t.on("agentEvent",a=>{if(a.state==="delta"&&a.text&&!a.thinking){u({mode:"agent-run",reply:a.text.slice(0,120)});return}if(a.state==="final"){u({mode:"agent-run"});return}a.state==="error"&&f(new Error(a.message||"Agent test failed"))}),t.on("error",f)});try{t.configure?.({sessionId:n,env:_(e)}),await t.start(n,p,null);const d=t.send(R).catch(i=>{o(i instanceof Error?i:new Error(String(i)))});return await Promise.race([g,d.then(()=>g)])}finally{t.removeAllListeners(),await t.stop().catch(()=>{})}}async function m(e){const t={type:"req",id:`agent-config-refresh-${Date.now()}`,method:"agents.refresh",params:{}};await C(e,t)}function _(e){return e==="codex"||e==="claude"||e==="pi"?h(e):{}}export{_ as getManagedEnvForAgent,N as handleAgentConfigClear,O as handleAgentConfigGet,$ as handleAgentConfigTest,G as handleAgentConfigUpsert};
|
|
@@ -1,55 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// @test src/__tests__/model-switching.test.ts
|
|
3
|
-
import { SERVERS } from '../../region.js';
|
|
4
|
-
import { loadConfig } from '../../config/index.js';
|
|
5
|
-
import { detectAgents } from '../../agents/detect.js';
|
|
6
|
-
import { refreshAgentInfos } from '../../agents/model-registry.js';
|
|
7
|
-
import { resetCommandSpecCache } from '../../agents/command-spec.js';
|
|
8
|
-
async function refreshMachineAgents(runtime, req) {
|
|
9
|
-
const config = loadConfig();
|
|
10
|
-
const serverUrl = config.serverUrl ?? SERVERS.cn.url;
|
|
11
|
-
const detectedAgents = detectAgents();
|
|
12
|
-
const agentList = detectedAgents.map((agent) => agent.type);
|
|
13
|
-
if (detectedAgents.length === 0) {
|
|
14
|
-
runtime.client.sendRes({
|
|
15
|
-
type: 'res',
|
|
16
|
-
id: req.id,
|
|
17
|
-
ok: true,
|
|
18
|
-
payload: { agentList: [], agents: [] },
|
|
19
|
-
});
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
try {
|
|
23
|
-
const agents = await refreshAgentInfos(detectedAgents, {
|
|
24
|
-
serverUrl,
|
|
25
|
-
authToken: config.machineToken ?? config.accessToken,
|
|
26
|
-
});
|
|
27
|
-
runtime.client.sendRes({
|
|
28
|
-
type: 'res',
|
|
29
|
-
id: req.id,
|
|
30
|
-
ok: true,
|
|
31
|
-
payload: { agentList, agents },
|
|
32
|
-
});
|
|
33
|
-
runtime.client.sendEvent({
|
|
34
|
-
type: 'event',
|
|
35
|
-
event: 'machine.agents',
|
|
36
|
-
payload: { agentList, agents },
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
catch (err) {
|
|
40
|
-
runtime.client.sendRes({
|
|
41
|
-
type: 'res',
|
|
42
|
-
id: req.id,
|
|
43
|
-
ok: false,
|
|
44
|
-
error: err instanceof Error ? err.message : String(err),
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
export async function handleModelsRefresh(runtime, req) {
|
|
49
|
-
await refreshMachineAgents(runtime, req);
|
|
50
|
-
}
|
|
51
|
-
export async function handleAgentsRefresh(runtime, req) {
|
|
52
|
-
resetCommandSpecCache();
|
|
53
|
-
runtime.reloadCustomAgents();
|
|
54
|
-
await refreshMachineAgents(runtime, req);
|
|
55
|
-
}
|
|
1
|
+
import{SERVERS as i}from"../../region.js";import{loadConfig as d}from"../../config/index.js";import{detectAgents as f}from"../../agents/detect.js";import{refreshAgentInfos as l}from"../../agents/model-registry.js";import{resetCommandSpecCache as p}from"../../agents/command-spec.js";async function a(e,n){const s=d(),c=s.serverUrl??i.cn.url,o=f(),r=o.map(t=>t.type);if(o.length===0){e.client.sendRes({type:"res",id:n.id,ok:!0,payload:{agentList:[],agents:[]}});return}try{const t=await l(o,{serverUrl:c,authToken:s.machineToken??s.accessToken});e.client.sendRes({type:"res",id:n.id,ok:!0,payload:{agentList:r,agents:t}}),e.client.sendEvent({type:"event",event:"machine.agents",payload:{agentList:r,agents:t}})}catch(t){e.client.sendRes({type:"res",id:n.id,ok:!1,error:t instanceof Error?t.message:String(t)})}}async function k(e,n){await a(e,n)}async function A(e,n){p(),e.reloadCustomAgents(),await a(e,n)}export{A as handleAgentsRefresh,k as handleModelsRefresh};
|