@happycastle/oh-my-openclaw 0.21.0 → 0.21.1
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LOG_PREFIX } from '../constants.js';
|
|
2
2
|
import { trackSubagentSpawn, clearSubagentTracking, getCallerSessionKey, getTrackedSubagents } from '../services/webhook-bridge.js';
|
|
3
|
-
import {
|
|
3
|
+
import { callHooksAgent } from '../utils/webhook-client.js';
|
|
4
4
|
import { getConfig } from '../utils/config.js';
|
|
5
5
|
const SPAWN_TOOL_NAME = 'sessions_spawn';
|
|
6
6
|
function extractSpawnResult(content) {
|
|
@@ -106,12 +106,16 @@ export function registerSubagentTracker(api) {
|
|
|
106
106
|
? `[System] Sub-agent completed (runId=${runId}, requester=${requesterSessionKey}). Process the result and continue pending work.`
|
|
107
107
|
: `[System] Sub-agent completed (runId=${runId}). Process the result and continue pending work.`;
|
|
108
108
|
const targetSession = requesterSessionKey ?? callerSession;
|
|
109
|
-
const result = await
|
|
109
|
+
const result = await callHooksAgent(wakeMessage, { gateway_url: config.gateway_url, hooks_token: config.hooks_token }, {
|
|
110
|
+
name: 'OmOC-SubagentComplete',
|
|
111
|
+
deliver: false,
|
|
112
|
+
...(targetSession ? { sessionKey: targetSession } : {}),
|
|
113
|
+
}, api.logger);
|
|
110
114
|
if (result.ok) {
|
|
111
|
-
api.logger.info(`${LOG_PREFIX}
|
|
115
|
+
api.logger.info(`${LOG_PREFIX} Agent turn triggered from subagent_ended: runId=${runId}`);
|
|
112
116
|
}
|
|
113
117
|
else {
|
|
114
|
-
api.logger.warn(`${LOG_PREFIX}
|
|
118
|
+
api.logger.warn(`${LOG_PREFIX} Agent turn from subagent_ended failed: ${result.error ?? `status ${result.status}`}`);
|
|
115
119
|
}
|
|
116
120
|
}
|
|
117
121
|
}, { priority: 120 });
|
|
@@ -131,12 +135,16 @@ export function registerSubagentTracker(api) {
|
|
|
131
135
|
// Send wake to ensure the main agent processes the announce and continues work
|
|
132
136
|
const config = getConfig(api);
|
|
133
137
|
if (config.webhook_bridge_enabled && config.gateway_url && config.hooks_token) {
|
|
134
|
-
void
|
|
138
|
+
void callHooksAgent(`[System] Sub-agent completed (runId=${matchedRunId}). Process the announce result and continue any pending work.`, { gateway_url: config.gateway_url, hooks_token: config.hooks_token }, {
|
|
139
|
+
name: 'OmOC-SubagentAnnounce',
|
|
140
|
+
deliver: false,
|
|
141
|
+
...(callerSession ? { sessionKey: callerSession } : {}),
|
|
142
|
+
}, api.logger).then((result) => {
|
|
135
143
|
if (result.ok) {
|
|
136
|
-
api.logger.info(`${LOG_PREFIX}
|
|
144
|
+
api.logger.info(`${LOG_PREFIX} Agent turn triggered after sub-agent announce: runId=${matchedRunId}`);
|
|
137
145
|
}
|
|
138
146
|
else {
|
|
139
|
-
api.logger.warn(`${LOG_PREFIX}
|
|
147
|
+
api.logger.warn(`${LOG_PREFIX} Agent turn after announce failed: ${result.error ?? `status ${result.status}`}`);
|
|
140
148
|
}
|
|
141
149
|
});
|
|
142
150
|
}
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "oh-my-openclaw",
|
|
3
3
|
"name": "Oh-My-OpenClaw",
|
|
4
4
|
"description": "Multi-agent orchestration plugin — 11 agents, category-based model routing, todo enforcer, ralph loop, agent setup CLI, and custom tools",
|
|
5
|
-
"version": "0.21.
|
|
5
|
+
"version": "0.21.1",
|
|
6
6
|
"skills": [
|
|
7
7
|
"skills"
|
|
8
8
|
],
|
package/package.json
CHANGED