@clawhive/openclaw-plugin 0.2.0 → 0.2.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.
- package/dist/index.js +15 -1
- package/dist/src/transport/realtime.d.ts +1 -1
- package/dist/src/wake.d.ts +1 -1
- package/dist/src/wake.js +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -151,6 +151,18 @@ async function startRuntime(api) {
|
|
|
151
151
|
pluginNodeId,
|
|
152
152
|
userId: resolvedUserId,
|
|
153
153
|
onWake: (event) => {
|
|
154
|
+
if (event.taskType === "single_agent_message") {
|
|
155
|
+
const sessionId = typeof event.payload.sessionId === "string"
|
|
156
|
+
? event.payload.sessionId
|
|
157
|
+
: null;
|
|
158
|
+
if (sessionId) {
|
|
159
|
+
const sequence = typeof event.payload.sequence === "number"
|
|
160
|
+
? event.payload.sequence
|
|
161
|
+
: 1;
|
|
162
|
+
void transport.catchUpSession(sessionId, Math.max(sequence - 1, 0));
|
|
163
|
+
}
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
154
166
|
if (event.taskType === "agent_panel_turn") {
|
|
155
167
|
agentPanelLoop.wake();
|
|
156
168
|
return;
|
|
@@ -304,8 +316,10 @@ const clawhiveEntry = defineChannelPluginEntry({
|
|
|
304
316
|
name: "ClawHive",
|
|
305
317
|
description: "ClawHive channel plugin",
|
|
306
318
|
plugin: clawhiveChannelPlugin,
|
|
307
|
-
|
|
319
|
+
registerCliMetadata(api) {
|
|
308
320
|
registerClawHiveCli(api);
|
|
321
|
+
},
|
|
322
|
+
registerFull(api) {
|
|
309
323
|
api.on("gateway_start", async () => {
|
|
310
324
|
try {
|
|
311
325
|
await startRuntime(api);
|
|
@@ -36,7 +36,7 @@ export declare class RealtimeTransport implements TransportAdapter {
|
|
|
36
36
|
private connect;
|
|
37
37
|
private handleRow;
|
|
38
38
|
private dispatchInbound;
|
|
39
|
-
|
|
39
|
+
catchUpSession(sessionId: string, afterSequence: number, beforeSequence?: number): Promise<void>;
|
|
40
40
|
private ensureFreshSession;
|
|
41
41
|
/**
|
|
42
42
|
* Recover from an invalidated refresh token by re-registering the plugin node.
|
package/dist/src/wake.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SupabaseClient } from "@supabase/supabase-js";
|
|
2
|
-
export type PluginWakeTaskType = "agent_panel_turn" | "market_install" | "agency_install";
|
|
2
|
+
export type PluginWakeTaskType = "single_agent_message" | "agent_panel_turn" | "market_install" | "agency_install";
|
|
3
3
|
export type PluginWakeEvent = {
|
|
4
4
|
id: string;
|
|
5
5
|
payload: Record<string, unknown>;
|
package/dist/src/wake.js
CHANGED