@openclaw/plugin-inspector 0.1.3 → 0.3.0

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.
@@ -13,7 +13,7 @@ export const syntheticRegistrationExecutionProfiles = {
13
13
  },
14
14
  registerChannel: {
15
15
  mode: "channel-opt-in",
16
- callableProperties: ["send", "receive"],
16
+ callableProperties: ["send", "sendMessage", "receive", "handleMessage"],
17
17
  option: "includeChannelRuntime",
18
18
  },
19
19
  registerCli: {
@@ -31,7 +31,7 @@ export const syntheticRegistrationExecutionProfiles = {
31
31
  },
32
32
  registerGatewayMethod: {
33
33
  mode: "direct",
34
- callableProperties: ["handler", "run", "execute"],
34
+ callableProperties: ["handler", "run", "execute", "invoke"],
35
35
  },
36
36
  registerHttpRoute: {
37
37
  mode: "direct",
@@ -58,12 +58,12 @@ export const syntheticRegistrationExecutionProfiles = {
58
58
  },
59
59
  registerService: {
60
60
  mode: "lifecycle-opt-in",
61
- callableProperties: ["start", "stop"],
61
+ callableProperties: ["start", "stop", "dispose"],
62
62
  option: "includeLifecycle",
63
63
  },
64
64
  registerSpeechProvider: {
65
65
  mode: "provider-opt-in",
66
- callableProperties: ["speak", "synthesize"],
66
+ callableProperties: ["speak", "synthesize", "tts"],
67
67
  option: "includeProviderCapabilities",
68
68
  },
69
69
  registerTool: {
@@ -214,6 +214,12 @@ export const defaultSyntheticRegistrationProbeInputs = {
214
214
  handler: commandProbeArgs,
215
215
  run: commandProbeArgs,
216
216
  },
217
+ registerChannel: {
218
+ handleMessage: channelReceiveProbeArgs,
219
+ receive: channelReceiveProbeArgs,
220
+ send: channelSendProbeArgs,
221
+ sendMessage: channelSendProbeArgs,
222
+ },
217
223
  registerGatewayMethod: {
218
224
  execute: gatewayProbeArgs,
219
225
  handler: gatewayProbeArgs,
@@ -452,7 +458,8 @@ async function runRegistrationProbes(entry, retainedEntry, captureIndex, options
452
458
  return [metadataOnlyResult(entry, captureIndex, profile.reason)];
453
459
  }
454
460
 
455
- const descriptor = retainedEntry.arguments?.[0] ?? retainedEntry.returnValue;
461
+ const descriptor =
462
+ retainedEntry.arguments?.find((value) => value && typeof value === "object") ?? retainedEntry.returnValue;
456
463
  if (!descriptor || typeof descriptor !== "object") {
457
464
  return [blockedResult(entry, captureIndex, "captured registration has no object descriptor")];
458
465
  }
@@ -522,6 +529,9 @@ function syntheticRegistrationEvent(registrar, property, options) {
522
529
  id: beforeToolCall.toolCallId,
523
530
  name: beforeToolCall.toolName,
524
531
  },
532
+ respond(ok, result, error) {
533
+ return { ok, result, ...(error ? { error } : {}) };
534
+ },
525
535
  };
526
536
  }
527
537
 
@@ -575,13 +585,56 @@ function commandProbeArgs(event) {
575
585
  function gatewayProbeArgs(event) {
576
586
  return [
577
587
  {
588
+ ...event,
578
589
  params: event.params,
579
590
  body: event.body,
580
591
  headers: event.headers,
592
+ respond: event.respond,
593
+ },
594
+ {
595
+ source: event.source,
596
+ logger: console,
597
+ },
598
+ ];
599
+ }
600
+
601
+ function channelSendProbeArgs(event) {
602
+ return [
603
+ {
604
+ source: event.source,
605
+ channelId: "fixture-channel",
606
+ accountId: "fixture-account",
607
+ to: "fixture-recipient",
608
+ text: "fixture message",
609
+ replyToId: "fixture-reply",
610
+ threadId: "fixture-thread",
611
+ logger: console,
612
+ signal: new AbortController().signal,
581
613
  },
614
+ ];
615
+ }
616
+
617
+ function channelReceiveProbeArgs(event) {
618
+ return [
582
619
  {
583
620
  source: event.source,
621
+ channelId: "fixture-channel",
622
+ accountId: "fixture-account",
623
+ message: {
624
+ id: "message-fixture",
625
+ text: "fixture inbound message",
626
+ sender: { id: "sender-fixture", displayName: "Fixture Sender" },
627
+ },
628
+ route: {
629
+ sessionKey: "fixture-session",
630
+ baseSessionKey: "fixture-base-session",
631
+ peer: { kind: "direct", id: "sender-fixture" },
632
+ chatType: "direct",
633
+ from: "sender-fixture",
634
+ to: "fixture-channel",
635
+ },
584
636
  logger: console,
637
+ signal: new AbortController().signal,
585
638
  },
586
639
  ];
587
640
  }
@@ -603,7 +656,10 @@ function lifecycleProbeArgs(event) {
603
656
  return [
604
657
  {
605
658
  source: event.source,
659
+ config: {},
606
660
  logger: console,
661
+ runtime: { env: {}, logger: console },
662
+ secrets: { get: async () => null, has: async () => false },
607
663
  signal: new AbortController().signal,
608
664
  },
609
665
  ];