@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 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
- registerFull(api) {
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
- private catchUpSession;
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.
@@ -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
@@ -1,4 +1,5 @@
1
1
  const VALID_TASK_TYPES = new Set([
2
+ "single_agent_message",
2
3
  "agent_panel_turn",
3
4
  "market_install",
4
5
  "agency_install",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawhive/openclaw-plugin",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "ClawHive channel plugin for OpenClaw",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://github.com/optimalAIs/clawhive#readme",