@rine-network/openclaw 0.3.0 → 0.4.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.
@@ -49,7 +49,7 @@ function asAllowFrom(v) {
49
49
  }
50
50
  return ["*"];
51
51
  }
52
- /** Opt-in payments posture: auto-pay defaults OFF (D2). */
52
+ /** Opt-in payments posture: auto-pay defaults OFF. */
53
53
  function asPayments(v) {
54
54
  return { autoPay: asRecord(v).autoPay === true };
55
55
  }
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as readRineCredentials, n as buildRineClient, o as resolveRineConfigFromCfg, r as sendRineReply, s as INTERNAL_TOOLS, t as rinePlugin } from "./channel-gwGzeOb6.js";
1
+ import { i as readRineCredentials, n as buildRineClient, o as resolveRineConfigFromCfg, r as sendRineReply, s as INTERNAL_TOOLS, t as rinePlugin } from "./channel-DqxESY90.js";
2
2
  import { i as normalizeStandardWebhook, n as normalizeA2A, t as isAllowed } from "./inbound-DEe69mNL.js";
3
3
  import { defineChannelPluginEntry } from "openclaw/plugin-sdk/channel-core";
4
4
  import { fetchAgents, resolveAgent } from "@rine-network/core";
@@ -102,7 +102,7 @@ function msgOf(err) {
102
102
  /**
103
103
  * Build the shared `onMessage` path all transports converge on.
104
104
  *
105
- * Invariants (acceptance §6):
105
+ * Invariants:
106
106
  * - dedupe by rine message id (Set, add-id-BEFORE-await race guard; delete-on-error
107
107
  * so a failed dispatch is retried; hourly clear bounds memory).
108
108
  * - mark-delivered ONLY after a successful dispatch (at-least-once).
@@ -158,7 +158,7 @@ function makeOnMessage(deps) {
158
158
  const WEBHOOK_TYPE = "rine.v1.webhook";
159
159
  /**
160
160
  * A one-way inbound: a Funnel webhook, or any self-addressed message (`from == to`). The agent
161
- * wakes to act via tools, but an auto-reply would target itself and be rejected (REQ-FSH-02).
161
+ * wakes to act via tools, but an auto-reply would target itself and be rejected.
162
162
  */
163
163
  function isOneWayEvent(msg) {
164
164
  return msg.type === WEBHOOK_TYPE || msg.selfSend === true;
@@ -183,7 +183,7 @@ function isX402Frame(msg) {
183
183
  *
184
184
  * The body also binds the reply target to the SENDER. Without this, a model that replies via the
185
185
  * optional `rine_send` tool can copy the message's own `to_agent_id` (= this agent's id, surfaced
186
- * by `rine_read`) and self-target, producing `Unknown target` (TODO-4). The auto-routing path is
186
+ * by `rine_read`) and self-target, producing `Unknown target`. The auto-routing path is
187
187
  * `rine_reply message_id=<id>`, which derives the recipient from the original sender server-side.
188
188
  */
189
189
  function pointerText(msg) {
@@ -387,7 +387,7 @@ async function deleteWebhook(client, webhookId, logger) {
387
387
  }
388
388
  }
389
389
  async function fallbackToSse(tc) {
390
- const { runSseTransport } = await import("./sse-BEULwHS1.js");
390
+ const { runSseTransport } = await import("./sse-CL8OTrkL.js");
391
391
  await runSseTransport(tc);
392
392
  }
393
393
  function waitUntilAbort(signal) {
@@ -406,12 +406,12 @@ const SERVICE_ID = "rine-notify";
406
406
  async function runTransport(tc) {
407
407
  switch (tc.config.transport) {
408
408
  case "poll": {
409
- const { runPollTransport } = await import("./poll-bXndKyw3.js");
409
+ const { runPollTransport } = await import("./poll-DKsUxQpG.js");
410
410
  return runPollTransport(tc);
411
411
  }
412
412
  case "expose": return runExposeTransport(tc);
413
413
  default: {
414
- const { runSseTransport } = await import("./sse-BEULwHS1.js");
414
+ const { runSseTransport } = await import("./sse-CL8OTrkL.js");
415
415
  return runSseTransport(tc);
416
416
  }
417
417
  }
@@ -611,7 +611,7 @@ function toOpenClawTool(def, ctx) {
611
611
  };
612
612
  }
613
613
  /**
614
- * Opt-in auto-pay (D2). When `channels.rine.payments.autoPay` is true, the exposed
614
+ * Opt-in auto-pay. When `channels.rine.payments.autoPay` is true, the exposed
615
615
  * `rine_pay` tool defaults its `auto_pay` argument to `true` — so a call that omits the
616
616
  * argument pays only at/below the wallet policy's `autoPayThreshold` (and returns
617
617
  * `above-auto-pay-threshold` otherwise). The model may still pass `auto_pay: false`
@@ -6,7 +6,7 @@ import { n as sleep } from "./backoff-BMNABavv.js";
6
6
  * only on `count > 0` does it mint a JWT, fetch `/messages?status=new`, and dispatch.
7
7
  *
8
8
  * Graceful fallback: the loop never crashes. A revoked/expired token (`401`/`403`) is
9
- * surfaced as an actionable error exactly once (REQ-FSH-06 — not masked as an empty inbox);
9
+ * surfaced as an actionable error exactly once (not masked as an empty inbox);
10
10
  * a transient network/HTTP error warns once; a healthy count of 0 is silent no-work. Every
11
11
  * failure keeps the loop alive at the fixed interval, and a healthy poll re-arms the warnings.
12
12
  */
package/dist/setup.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Setup-safe entry for the rine channel. Loaded in setup/discovery registration modes.
3
- * Side-effect-free at module top level. The transport posture is a config enum (SPEC
4
- * §2.5) surfaced via the manifest configSchema + uiHints — OpenClaw has no native
3
+ * Side-effect-free at module top level. The transport posture is a config enum surfaced via
4
+ * the manifest configSchema + uiHints — OpenClaw has no native
5
5
  * radio-select setup primitive, so the human sets `channels.rine.transport` directly.
6
6
  *
7
7
  * Credential auto-detection (no re-auth for an already-onboarded agent): the wizard
package/dist/setup.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as resolveRineConfig, i as readRineCredentials, t as rinePlugin } from "./channel-gwGzeOb6.js";
1
+ import { a as resolveRineConfig, i as readRineCredentials, t as rinePlugin } from "./channel-DqxESY90.js";
2
2
  import { defineSetupPluginEntry } from "openclaw/plugin-sdk/channel-core";
3
3
  //#region setup.ts
4
4
  /** Auto-detect existing rine creds for the setup flow. Pure read; no writes. */
@@ -15,8 +15,8 @@ export interface DispatchOpts {
15
15
  /**
16
16
  * This frame was replayed during the SSE catch-up phase (before the stream reached the
17
17
  * live/heartbeat state) — wake the agent to ACT, but never auto-reply. A restart against
18
- * an undelivered backlog would otherwise fan out one canned reply per replayed message
19
- * (REQ-FSH-01). Live-phase frames (opts absent / `replayed:false`) still auto-reply.
18
+ * an undelivered backlog would otherwise fan out one canned reply per replayed message.
19
+ * Live-phase frames (opts absent / `replayed:false`) still auto-reply.
20
20
  */
21
21
  replayed?: boolean;
22
22
  }
@@ -41,7 +41,7 @@ export declare function msgOf(err: unknown): string;
41
41
  /**
42
42
  * Build the shared `onMessage` path all transports converge on.
43
43
  *
44
- * Invariants (acceptance §6):
44
+ * Invariants:
45
45
  * - dedupe by rine message id (Set, add-id-BEFORE-await race guard; delete-on-error
46
46
  * so a failed dispatch is retried; hourly clear bounds memory).
47
47
  * - mark-delivered ONLY after a successful dispatch (at-least-once).
@@ -5,8 +5,7 @@ import type { ResolvedCreds } from "./config.js";
5
5
  /**
6
6
  * Outcome of a `/poll` count probe. A revoked/expired poll token (`401`/`403`) is
7
7
  * distinguished from a healthy count and from a transient network/HTTP error so the poll
8
- * loop can surface an actionable auth warning instead of masking it as an empty inbox
9
- * (REQ-FSH-06).
8
+ * loop can surface an actionable auth warning instead of masking it as an empty inbox.
10
9
  */
11
10
  export type PollResult = {
12
11
  kind: "count";
@@ -28,7 +27,7 @@ export interface RineClient {
28
27
  /**
29
28
  * Unauthenticated poll: `GET {pollUrl}` → a {@link PollResult}. Reports `auth-error` on a
30
29
  * `401`/`403` (revoked token) and `error` on any transient network/HTTP failure, so the
31
- * caller never confuses a dead token for an empty inbox (REQ-FSH-06).
30
+ * caller never confuses a dead token for an empty inbox.
32
31
  */
33
32
  pollCount: (pollUrl: string, signal?: AbortSignal) => Promise<PollResult>;
34
33
  /** Fetch new messages for an agent (auth). */
@@ -7,7 +7,7 @@ import type { RineInbound } from "./types.js";
7
7
  *
8
8
  * The body also binds the reply target to the SENDER. Without this, a model that replies via the
9
9
  * optional `rine_send` tool can copy the message's own `to_agent_id` (= this agent's id, surfaced
10
- * by `rine_read`) and self-target, producing `Unknown target` (TODO-4). The auto-routing path is
10
+ * by `rine_read`) and self-target, producing `Unknown target`. The auto-routing path is
11
11
  * `rine_reply message_id=<id>`, which derives the recipient from the original sender server-side.
12
12
  */
13
13
  export declare function pointerText(msg: RineInbound): string;
@@ -37,7 +37,7 @@ export declare function assertInternalTools(all?: ToolDef[]): void;
37
37
  */
38
38
  export declare function toOpenClawTool(def: ToolDef, ctx: ToolContext): AnyAgentTool;
39
39
  /**
40
- * Opt-in auto-pay (D2). When `channels.rine.payments.autoPay` is true, the exposed
40
+ * Opt-in auto-pay. When `channels.rine.payments.autoPay` is true, the exposed
41
41
  * `rine_pay` tool defaults its `auto_pay` argument to `true` — so a call that omits the
42
42
  * argument pays only at/below the wallet policy's `autoPayThreshold` (and returns
43
43
  * `above-auto-pay-threshold` otherwise). The model may still pass `auto_pay: false`
@@ -4,7 +4,7 @@ import type { TransportContext } from "./context.js";
4
4
  * only on `count > 0` does it mint a JWT, fetch `/messages?status=new`, and dispatch.
5
5
  *
6
6
  * Graceful fallback: the loop never crashes. A revoked/expired token (`401`/`403`) is
7
- * surfaced as an actionable error exactly once (REQ-FSH-06 — not masked as an empty inbox);
7
+ * surfaced as an actionable error exactly once (not masked as an empty inbox);
8
8
  * a transient network/HTTP error warns once; a healthy count of 0 is silent no-work. Every
9
9
  * failure keeps the loop alive at the fixed interval, and a healthy poll re-arms the warnings.
10
10
  */
@@ -18,8 +18,8 @@ export interface RineInbound {
18
18
  /**
19
19
  * `from_agent_id == to_agent_id` — a self-addressed message. A Funnel `rine.v1.webhook`
20
20
  * is the canonical case (the relay sends on the agent's behalf), and the server rejects a
21
- * reply to it ("Cannot reply to your own message"). Drives the one-way no-auto-reply guard
22
- * (REQ-FSH-02). Absent when the transport can't determine both agent ids (e.g. A2A push).
21
+ * reply to it ("Cannot reply to your own message"). Drives the one-way no-auto-reply guard.
22
+ * Absent when the transport can't determine both agent ids (e.g. A2A push).
23
23
  */
24
24
  selfSend?: boolean;
25
25
  /** Whether this is a group/broadcast message. */
@@ -36,7 +36,7 @@ export interface RineInbound {
36
36
  groupId?: string;
37
37
  }
38
38
  /**
39
- * x402 payment posture (D2). Opt-in, default OFF: with `autoPay` false the exposed
39
+ * x402 payment posture. Opt-in, default OFF: with `autoPay` false the exposed
40
40
  * `rine_pay` tool keeps its shipped explicit-authorization semantics (each call is the
41
41
  * authorization, bounded by the wallet spend caps). With `autoPay` true the tool defaults
42
42
  * to threshold-gated auto-pay — it pays a quote only at/below the wallet policy's
@@ -57,7 +57,7 @@ async function runSseTransport(tc) {
57
57
  logger.warn(`rine: SSE stream error (attempt ${attempt}): ${err instanceof Error ? err.message : String(err)}`);
58
58
  if (attempt >= MAX_ATTEMPTS_BEFORE_FALLBACK) {
59
59
  logger.warn("rine: SSE failed repeatedly — falling back to POLL transport");
60
- const { runPollTransport } = await import("./poll-bXndKyw3.js");
60
+ const { runPollTransport } = await import("./poll-DKsUxQpG.js");
61
61
  await runPollTransport(tc);
62
62
  return;
63
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rine-network/openclaw",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Official OpenClaw plugin for rine.network \u2014 agent-to-agent E2EE messaging as a native channel, with A2A-relay / SSE / poll transports, tools, and the bundled rine skill.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -64,8 +64,8 @@
64
64
  "prepublishOnly": "node scripts/check-no-file-deps.mjs"
65
65
  },
66
66
  "dependencies": {
67
- "@rine-network/core": "^0.11.0",
68
- "@rine-network/mcp": "^0.8.0"
67
+ "@rine-network/core": "^0.12.0",
68
+ "@rine-network/mcp": "^0.9.0"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "openclaw": ">=2026.6.1"