@happycastle/oh-my-openclaw 0.21.0 → 0.21.2
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.
|
@@ -105,10 +105,12 @@ export function registerSubagentTracker(api) {
|
|
|
105
105
|
const wakeMessage = requesterSessionKey
|
|
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
|
-
|
|
109
|
-
|
|
108
|
+
// Use /hooks/wake to directly inject system event into the main session
|
|
109
|
+
// and trigger an immediate heartbeat. /hooks/agent creates a NEW isolated
|
|
110
|
+
// session which is not what we want — we need the main agent to wake up.
|
|
111
|
+
const result = await callHooksWake(wakeMessage, { gateway_url: config.gateway_url, hooks_token: config.hooks_token }, api.logger);
|
|
110
112
|
if (result.ok) {
|
|
111
|
-
api.logger.info(`${LOG_PREFIX} Wake
|
|
113
|
+
api.logger.info(`${LOG_PREFIX} Wake triggered from subagent_ended: runId=${runId}`);
|
|
112
114
|
}
|
|
113
115
|
else {
|
|
114
116
|
api.logger.warn(`${LOG_PREFIX} Wake from subagent_ended failed: ${result.error ?? `status ${result.status}`}`);
|
|
@@ -128,12 +130,12 @@ export function registerSubagentTracker(api) {
|
|
|
128
130
|
const callerSession = getCallerSessionKey(matchedRunId);
|
|
129
131
|
clearSubagentTracking(matchedRunId);
|
|
130
132
|
api.logger.info(`${LOG_PREFIX} Sub-agent announce detected: runId=${matchedRunId} (callerSession=${callerSession ?? 'unknown'})`);
|
|
131
|
-
//
|
|
133
|
+
// Use /hooks/wake to directly inject into main session and trigger heartbeat
|
|
132
134
|
const config = getConfig(api);
|
|
133
135
|
if (config.webhook_bridge_enabled && config.gateway_url && config.hooks_token) {
|
|
134
|
-
void callHooksWake(`[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 }, api.logger
|
|
136
|
+
void callHooksWake(`[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 }, api.logger).then((result) => {
|
|
135
137
|
if (result.ok) {
|
|
136
|
-
api.logger.info(`${LOG_PREFIX} Wake
|
|
138
|
+
api.logger.info(`${LOG_PREFIX} Wake triggered after sub-agent announce: runId=${matchedRunId}`);
|
|
137
139
|
}
|
|
138
140
|
else {
|
|
139
141
|
api.logger.warn(`${LOG_PREFIX} Wake after announce failed: ${result.error ?? `status ${result.status}`}`);
|
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.2",
|
|
6
6
|
"skills": [
|
|
7
7
|
"skills"
|
|
8
8
|
],
|
package/package.json
CHANGED