openclaw-overlay-plugin 0.8.2 → 0.8.6

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.
Files changed (41) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +0 -4
  3. package/dist/index.js +137 -315
  4. package/dist/src/cli.js +1 -1
  5. package/dist/src/scripts/baemail/commands.d.ts +6 -6
  6. package/dist/src/scripts/messaging/inbox.d.ts +2 -2
  7. package/dist/src/scripts/messaging/poll.d.ts +1 -1
  8. package/dist/src/scripts/messaging/send.d.ts +1 -1
  9. package/dist/src/scripts/output.d.ts +5 -4
  10. package/dist/src/scripts/output.js +11 -2
  11. package/dist/src/scripts/overlay/advertisement.d.ts +2 -2
  12. package/dist/src/scripts/overlay/discover.d.ts +1 -1
  13. package/dist/src/scripts/overlay/registration.d.ts +2 -2
  14. package/dist/src/scripts/overlay/services.d.ts +4 -4
  15. package/dist/src/scripts/payment/commands.d.ts +3 -3
  16. package/dist/src/scripts/services/queue.d.ts +2 -2
  17. package/dist/src/scripts/services/request.d.ts +1 -1
  18. package/dist/src/scripts/services/respond.d.ts +2 -2
  19. package/dist/src/scripts/wallet/balance.d.ts +2 -2
  20. package/dist/src/scripts/wallet/setup.d.ts +4 -4
  21. package/dist/src/scripts/x-verification/commands.d.ts +6 -6
  22. package/index.ts +178 -383
  23. package/openclaw.plugin.json +4 -4
  24. package/package.json +1 -1
  25. package/src/cli.ts +1 -1
  26. package/src/scripts/baemail/commands.ts +6 -6
  27. package/src/scripts/messaging/inbox.ts +2 -2
  28. package/src/scripts/messaging/poll.ts +1 -1
  29. package/src/scripts/messaging/send.ts +1 -1
  30. package/src/scripts/output.ts +13 -4
  31. package/src/scripts/overlay/advertisement.ts +2 -2
  32. package/src/scripts/overlay/discover.ts +1 -1
  33. package/src/scripts/overlay/registration.ts +2 -2
  34. package/src/scripts/overlay/services.ts +4 -4
  35. package/src/scripts/payment/commands.ts +3 -3
  36. package/src/scripts/services/queue.ts +2 -2
  37. package/src/scripts/services/request.ts +1 -1
  38. package/src/scripts/services/respond.ts +2 -2
  39. package/src/scripts/wallet/balance.ts +2 -2
  40. package/src/scripts/wallet/setup.ts +4 -4
  41. package/src/scripts/x-verification/commands.ts +6 -6
@@ -24,12 +24,12 @@ export declare function loadBaemailConfig(): Promise<any>;
24
24
  /**
25
25
  * List recent baemail deliveries.
26
26
  */
27
- export declare function cmdBaemailLog(limitStr?: string): Promise<never>;
28
- export declare function cmdBaemailSetup(priceSatsStr: string, prioritySats?: string, urgentSats?: string, channel?: string): Promise<never>;
29
- export declare function cmdBaemailConfig(): Promise<never>;
30
- export declare function cmdBaemailBlock(pubkey: string): Promise<never>;
31
- export declare function cmdBaemailUnblock(pubkey: string): Promise<never>;
27
+ export declare function cmdBaemailLog(limitStr?: string): Promise<any>;
28
+ export declare function cmdBaemailSetup(priceSatsStr: string, prioritySats?: string, urgentSats?: string, channel?: string): Promise<any>;
29
+ export declare function cmdBaemailConfig(): Promise<any>;
30
+ export declare function cmdBaemailBlock(pubkey: string): Promise<any>;
31
+ export declare function cmdBaemailUnblock(pubkey: string): Promise<any>;
32
32
  /**
33
33
  * Refund a failed baemail delivery.
34
34
  */
35
- export declare function cmdBaemailRefund(requestId: string | undefined): Promise<never>;
35
+ export declare function cmdBaemailRefund(requestId: string | undefined): Promise<any>;
@@ -4,8 +4,8 @@
4
4
  /**
5
5
  * Inbox command: fetch pending messages.
6
6
  */
7
- export declare function cmdInbox(args: string[]): Promise<never>;
7
+ export declare function cmdInbox(args: string[]): Promise<any>;
8
8
  /**
9
9
  * Ack command: acknowledge processed messages.
10
10
  */
11
- export declare function cmdAck(messageIds: string[]): Promise<never>;
11
+ export declare function cmdAck(messageIds: string[]): Promise<any>;
@@ -4,4 +4,4 @@
4
4
  /**
5
5
  * Poll command: fetch all pending messages and process them.
6
6
  */
7
- export declare function cmdPoll(): Promise<never>;
7
+ export declare function cmdPoll(): Promise<any>;
@@ -4,4 +4,4 @@
4
4
  /**
5
5
  * Send command: send a typed message to another agent.
6
6
  */
7
- export declare function cmdSend(targetKey: string | undefined, type: string | undefined, payloadStr: string | undefined): Promise<never>;
7
+ export declare function cmdSend(targetKey: string | undefined, type: string | undefined, payloadStr: string | undefined): Promise<any>;
@@ -2,11 +2,12 @@
2
2
  * JSON output helpers for CLI commands.
3
3
  * All CLI output follows the { success, data/error } wrapper format.
4
4
  */
5
+ export declare function setNoExit(value: boolean): void;
5
6
  /**
6
- * Output a successful result and exit.
7
+ * Output a successful result and exit (unless noExit is set).
7
8
  */
8
- export declare function ok<T>(data: T): never;
9
+ export declare function ok<T>(data: T): any;
9
10
  /**
10
- * Output an error and exit.
11
+ * Output an error and exit (unless noExit is set).
11
12
  */
12
- export declare function fail(error: string | Error): never;
13
+ export declare function fail(error: string | Error): any;
@@ -2,18 +2,27 @@
2
2
  * JSON output helpers for CLI commands.
3
3
  * All CLI output follows the { success, data/error } wrapper format.
4
4
  */
5
+ // Global flag to prevent exit when used as a library
6
+ let noExitFlag = false;
7
+ export function setNoExit(value) {
8
+ noExitFlag = value;
9
+ }
5
10
  /**
6
- * Output a successful result and exit.
11
+ * Output a successful result and exit (unless noExit is set).
7
12
  */
8
13
  export function ok(data) {
14
+ if (noExitFlag)
15
+ return { success: true, data };
9
16
  console.log(JSON.stringify({ success: true, data }));
10
17
  process.exit(0);
11
18
  }
12
19
  /**
13
- * Output an error and exit.
20
+ * Output an error and exit (unless noExit is set).
14
21
  */
15
22
  export function fail(error) {
16
23
  const message = error instanceof Error ? error.message : String(error);
24
+ if (noExitFlag)
25
+ return { success: false, error: message };
17
26
  console.log(JSON.stringify({ success: false, error: message }));
18
27
  process.exit(1);
19
28
  }
@@ -8,9 +8,9 @@
8
8
  * Advertise a SHIP record.
9
9
  * Announce that you host a specific Topic Manager (tm_).
10
10
  */
11
- export declare function cmdAdvertiseSHIP(domain?: string, topic?: string): Promise<never>;
11
+ export declare function cmdAdvertiseSHIP(domain?: string, topic?: string): Promise<any>;
12
12
  /**
13
13
  * Advertise a SLAP record.
14
14
  * Announce that you host a specific Lookup Service (ls_).
15
15
  */
16
- export declare function cmdAdvertiseSLAP(domain?: string, service?: string): Promise<never>;
16
+ export declare function cmdAdvertiseSLAP(domain?: string, service?: string): Promise<any>;
@@ -4,4 +4,4 @@
4
4
  /**
5
5
  * Discover command: query the overlay for agents and services.
6
6
  */
7
- export declare function cmdDiscover(args: string[]): Promise<never>;
7
+ export declare function cmdDiscover(args: string[]): Promise<any>;
@@ -12,8 +12,8 @@
12
12
  /**
13
13
  * Register command: register this agent on the overlay network.
14
14
  */
15
- export declare function cmdRegister(): Promise<never>;
15
+ export declare function cmdRegister(): Promise<any>;
16
16
  /**
17
17
  * Unregister command: submit revocation tx to remove agent from overlay network.
18
18
  */
19
- export declare function cmdUnregister(): Promise<never>;
19
+ export declare function cmdUnregister(): Promise<any>;
@@ -14,16 +14,16 @@
14
14
  /**
15
15
  * Services command: list currently advertised services.
16
16
  */
17
- export declare function cmdServices(): Promise<never>;
17
+ export declare function cmdServices(): Promise<any>;
18
18
  /**
19
19
  * Advertise command: add a new service advertisement.
20
20
  */
21
- export declare function cmdAdvertise(serviceId: string | undefined, name: string | undefined, priceSatsStr: string | undefined, description?: string): Promise<never>;
21
+ export declare function cmdAdvertise(serviceId: string | undefined, name: string | undefined, priceSatsStr: string | undefined, description?: string): Promise<any>;
22
22
  /**
23
23
  * Remove command: remove a service from local registry.
24
24
  */
25
- export declare function cmdRemove(serviceId: string | undefined): Promise<never>;
25
+ export declare function cmdRemove(serviceId: string | undefined): Promise<any>;
26
26
  /**
27
27
  * Readvertise command: update an existing service advertisement.
28
28
  */
29
- export declare function cmdReadvertise(serviceId: string | undefined, name?: string, priceSatsStr?: string, description?: string): Promise<never>;
29
+ export declare function cmdReadvertise(serviceId: string | undefined, name?: string, priceSatsStr?: string, description?: string): Promise<any>;
@@ -4,12 +4,12 @@
4
4
  /**
5
5
  * Pay command: send satoshis to another agent.
6
6
  */
7
- export declare function cmdPay(pubkey: string | undefined, satoshis: string | undefined, description?: string): Promise<never>;
7
+ export declare function cmdPay(pubkey: string | undefined, satoshis: string | undefined, description?: string): Promise<any>;
8
8
  /**
9
9
  * Verify command: verify an incoming payment BEEF.
10
10
  */
11
- export declare function cmdVerify(beefBase64: string | undefined): Promise<never>;
11
+ export declare function cmdVerify(beefBase64: string | undefined): Promise<any>;
12
12
  /**
13
13
  * Accept command: accept and internalize a payment.
14
14
  */
15
- export declare function cmdAccept(beef: string | undefined, derivationPrefix: string | undefined, derivationSuffix: string | undefined, senderIdentityKey: string | undefined, description?: string): Promise<never>;
15
+ export declare function cmdAccept(beef: string | undefined, derivationPrefix: string | undefined, derivationSuffix: string | undefined, senderIdentityKey: string | undefined, description?: string): Promise<any>;
@@ -4,8 +4,8 @@
4
4
  /**
5
5
  * Service queue command: list pending service requests.
6
6
  */
7
- export declare function cmdServiceQueue(): Promise<never>;
7
+ export declare function cmdServiceQueue(): Promise<any>;
8
8
  /**
9
9
  * Research queue command: list pending research requests.
10
10
  */
11
- export declare function cmdResearchQueue(): Promise<never>;
11
+ export declare function cmdResearchQueue(): Promise<any>;
@@ -4,4 +4,4 @@
4
4
  /**
5
5
  * Request service command: send a service request with optional payment.
6
6
  */
7
- export declare function cmdRequestService(targetKey: string | undefined, serviceId: string | undefined, satsStr?: string, inputJsonStr?: string): Promise<never>;
7
+ export declare function cmdRequestService(targetKey: string | undefined, serviceId: string | undefined, satsStr?: string, inputJsonStr?: string): Promise<any>;
@@ -4,8 +4,8 @@
4
4
  /**
5
5
  * Respond to a service request.
6
6
  */
7
- export declare function cmdRespondService(requestId: string | undefined, recipientKey: string | undefined, serviceId: string | undefined, resultJson: string | undefined): Promise<never>;
7
+ export declare function cmdRespondService(requestId: string | undefined, recipientKey: string | undefined, serviceId: string | undefined, resultJson: string | undefined): Promise<any>;
8
8
  /**
9
9
  * Respond to a research request with results.
10
10
  */
11
- export declare function cmdResearchRespond(resultJsonPath: string | undefined): Promise<never>;
11
+ export declare function cmdResearchRespond(resultJsonPath: string | undefined): Promise<any>;
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Balance command: show wallet balance.
6
6
  */
7
- export declare function cmdBalance(): Promise<never>;
7
+ export declare function cmdBalance(): Promise<any>;
8
8
  /**
9
9
  * Import command: import external UTXO with merkle proof.
10
10
  *
@@ -15,7 +15,7 @@ export declare function cmdBalance(): Promise<never>;
15
15
  * If the transaction isn't yet on WoC (just broadcast), it will poll
16
16
  * with exponential backoff for up to 60 seconds.
17
17
  */
18
- export declare function cmdImport(txidArg: string | undefined, voutStr?: string): Promise<never>;
18
+ export declare function cmdImport(txidArg: string | undefined, voutStr?: string): Promise<any>;
19
19
  /**
20
20
  * Refund command: sweep wallet to an address.
21
21
  */
@@ -4,16 +4,16 @@
4
4
  /**
5
5
  * Setup command: create wallet and show identity.
6
6
  */
7
- export declare function cmdSetup(): Promise<never>;
7
+ export declare function cmdSetup(): Promise<any>;
8
8
  /**
9
9
  * Identity command: show identity public key.
10
10
  */
11
- export declare function cmdIdentity(): Promise<never>;
11
+ export declare function cmdIdentity(): Promise<any>;
12
12
  /**
13
13
  * Status command: show identity and balance.
14
14
  */
15
- export declare function cmdStatus(): Promise<never>;
15
+ export declare function cmdStatus(): Promise<any>;
16
16
  /**
17
17
  * Address command: show P2PKH receive address.
18
18
  */
19
- export declare function cmdAddress(): Promise<never>;
19
+ export declare function cmdAddress(): Promise<any>;
@@ -4,24 +4,24 @@
4
4
  /**
5
5
  * Start X verification: generate a tweet with identity key and signature.
6
6
  */
7
- export declare function cmdXVerifyStart(handleArg: string | undefined): Promise<never>;
7
+ export declare function cmdXVerifyStart(handleArg: string | undefined): Promise<any>;
8
8
  /**
9
9
  * Complete X verification by checking the posted tweet.
10
10
  */
11
- export declare function cmdXVerifyComplete(tweetUrl: string | undefined): Promise<never>;
11
+ export declare function cmdXVerifyComplete(tweetUrl: string | undefined): Promise<any>;
12
12
  /**
13
13
  * List verified X accounts (local cache).
14
14
  */
15
- export declare function cmdXVerifications(): Promise<never>;
15
+ export declare function cmdXVerifications(): Promise<any>;
16
16
  /**
17
17
  * Lookup X verifications from the overlay network.
18
18
  */
19
- export declare function cmdXLookup(query: string | undefined): Promise<never>;
19
+ export declare function cmdXLookup(query: string | undefined): Promise<any>;
20
20
  /**
21
21
  * List pending X engagement requests.
22
22
  */
23
- export declare function cmdXEngagementQueue(): Promise<never>;
23
+ export declare function cmdXEngagementQueue(): Promise<any>;
24
24
  /**
25
25
  * Mark an X engagement request as fulfilled.
26
26
  */
27
- export declare function cmdXEngagementFulfill(requestId: string | undefined, proofUrl?: string): Promise<never>;
27
+ export declare function cmdXEngagementFulfill(requestId: string | undefined, proofUrl?: string): Promise<any>;