feat: recognize CutOS agent runtime
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
const log = require('./logger');
|
||||
const { OPENCLAW, resolveAgentType } = require('./agent-type');
|
||||
|
||||
// ── channel handlers ──────────────────────────────────────────────────────────
|
||||
const handlers = {
|
||||
@@ -39,6 +40,15 @@ function handle(msg, send) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (api === 'channel.weixin' && resolveAgentType() !== OPENCLAW) {
|
||||
send({
|
||||
id: callId, api, method,
|
||||
action: 'finish', event: 'failed',
|
||||
code: 404, message: `api unavailable for agent type: ${resolveAgentType()}`,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// ── cancel ────────────────────────────────────────────────────────────────
|
||||
if (action === 'cancel') {
|
||||
const task = running.get(callId);
|
||||
|
||||
Reference in New Issue
Block a user