@rine-network/eve 0.1.0 → 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.
- package/README.md +25 -1
- package/dist/_zod.d.ts +1 -1
- package/dist/{channel-Bg8l58gg.js → channel-WlN3x1wP.js} +185 -29
- package/dist/channel-core.d.ts +15 -34
- package/dist/channel-outbound.d.ts +36 -0
- package/dist/channel.d.ts +26 -3
- package/dist/channel.js +2 -2
- package/dist/{client-X_-9CpQT.js → client-DsG2xtKs.js} +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/errors.d.ts +1 -1
- package/dist/format.d.ts +8 -4
- package/dist/inbound.d.ts +22 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -7
- package/dist/onboard.d.ts +1 -1
- package/dist/onboard.js +1 -1
- package/dist/{registry-BG7S2XJg.js → registry-Bn4EqPcp.js} +22 -1
- package/dist/relay.d.ts +1 -1
- package/dist/relay.js +2 -2
- package/dist/{scaffold-Dpac1TMU.js → scaffold-3cEUy3jD.js} +8 -2
- package/dist/scaffold.js +1 -1
- package/dist/schemas-groups.d.ts +15 -3
- package/dist/schemas-payments.d.ts +34 -0
- package/dist/schemas.d.ts +3 -2
- package/dist/skill-content.d.ts +2 -2
- package/dist/{tool-BC49DldZ.js → tool-xlLdY8kn.js} +29 -12
- package/dist/tool.d.ts +16 -7
- package/dist/tools/groups.d.ts +11 -2
- package/dist/tools/index.d.ts +3 -2
- package/dist/tools/index.js +3 -3
- package/dist/tools/messaging.d.ts +1 -1
- package/dist/tools/payments.d.ts +21 -0
- package/dist/tools/registry.d.ts +3 -2
- package/dist/{tools-Bm9N6tB5.js → tools-BhkhV3Mv.js} +237 -11
- package/dist/transcript.d.ts +2 -2
- package/dist/types.d.ts +3 -1
- package/dist/webhook.d.ts +1 -1
- package/dist/webhook.js +2 -2
- package/dist/x402.d.ts +38 -0
- package/package.json +3 -3
package/dist/inbound.d.ts
CHANGED
|
@@ -2,18 +2,27 @@
|
|
|
2
2
|
* Inbound webhook helpers for the rine channel: extracting the message id from a
|
|
3
3
|
* rine standard-webhook body, and the continuation-token codec.
|
|
4
4
|
*
|
|
5
|
-
* The continuation token is how the channel makes outbound replies STATELESS
|
|
5
|
+
* The continuation token is how the channel makes outbound replies STATELESS:
|
|
6
6
|
* it encodes the rine `conversation_id`, the reply target (the group handle for
|
|
7
7
|
* group mail, else the sender handle), and — for 1:1 inbound only — the inbound
|
|
8
8
|
* `message id` so the `message.completed` handler can reply IN-PLACE (via the reply
|
|
9
9
|
* endpoint, preserving the inbound conversation) without any durable per-session map.
|
|
10
10
|
* Because the token bakes in the per-message `m`, it differs on every 1:1 inbound
|
|
11
11
|
* turn, so Eve does NOT resume a prior session from it — cross-turn continuity comes
|
|
12
|
-
* from the general thread primitive (push-injected transcript
|
|
12
|
+
* from the general thread primitive (push-injected transcript), not session
|
|
13
13
|
* resume. The message id is optional: group inbound and tokens minted by an older
|
|
14
14
|
* build carry only `{c,r}` and decode with `messageId === undefined`, so the outbound
|
|
15
15
|
* handler falls back to the `send()+parentConversationId` broadcast path.
|
|
16
16
|
*/
|
|
17
|
+
/** Bound on the per-runtime `seen` dedupe set before it is cleared wholesale. */
|
|
18
|
+
export declare const SEEN_CAP = 5000;
|
|
19
|
+
/**
|
|
20
|
+
* Record a handled message id in the bounded per-runtime dedupe set. The set is
|
|
21
|
+
* cleared wholesale when it reaches {@link SEEN_CAP} (a coarse but allocation-free
|
|
22
|
+
* eviction — the server-side `delivered_at` ack is the durable dedupe). A no-op
|
|
23
|
+
* when no set is provided.
|
|
24
|
+
*/
|
|
25
|
+
export declare function rememberSeen(seen: Set<string> | undefined, id: string): void;
|
|
17
26
|
/** What a decoded continuation token yields. */
|
|
18
27
|
export interface ReplyContext {
|
|
19
28
|
/** The rine conversation id to thread the reply into. */
|
|
@@ -25,13 +34,23 @@ export interface ReplyContext {
|
|
|
25
34
|
* Absent for legacy 2-field tokens → caller falls back to send()+parent.
|
|
26
35
|
*/
|
|
27
36
|
readonly messageId?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Marks a session started by an inbound x402 payment frame. The terminal
|
|
39
|
+
* assistant message is NEVER prose-replied into a payment thread — that would
|
|
40
|
+
* corrupt the handshake. The signed payment / receipt is transmitted in-thread
|
|
41
|
+
* by the pay / fulfill tools instead, so `processCompletion` short-circuits when
|
|
42
|
+
* this is set.
|
|
43
|
+
*/
|
|
44
|
+
readonly x402?: boolean;
|
|
28
45
|
}
|
|
29
46
|
/**
|
|
30
47
|
* Encode the raw channel-local continuation token. Eve prepends the channel name
|
|
31
48
|
* (`rine:`); we additionally fence our payload with {@link TOKEN_MARKER} so the
|
|
32
49
|
* decoder can recover it regardless of any prefix the framework adds.
|
|
33
50
|
*/
|
|
34
|
-
export declare function encodeReplyToken(conversationId: string, replyTarget: string, messageId?: string
|
|
51
|
+
export declare function encodeReplyToken(conversationId: string, replyTarget: string, messageId?: string, opts?: {
|
|
52
|
+
x402?: boolean;
|
|
53
|
+
}): string;
|
|
35
54
|
/**
|
|
36
55
|
* Decode a continuation token back to its {@link ReplyContext}. Tolerant of a
|
|
37
56
|
* leading `<channel>:` namespace (or any prefix) and of malformed input —
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* reachability + outbound replies, file-discovered rine **tools** for agency, a
|
|
7
7
|
* **skill**, and an out-of-band **onboard / init / webhook / relay** CLI.
|
|
8
8
|
*
|
|
9
|
-
* Import is side-effect-free
|
|
9
|
+
* Import is side-effect-free: nothing here builds a client, reads a
|
|
10
10
|
* credential, or opens a socket at module load.
|
|
11
11
|
*
|
|
12
12
|
* Most consumers don't import from here — they run `npx @rine-network/eve init`,
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
export { rineChannel, processInbound, processCompletion, processFailure, senderContextLine, } from "./channel.js";
|
|
17
17
|
export type { RineChannelOptions, ChannelSend, InboundDeps, CompletionDeps, } from "./channel.js";
|
|
18
18
|
export * from "./tools/index.js";
|
|
19
|
+
export { isX402Frame, handleX402Inbound, renderX402Body, x402GuidanceLine, X402_FRAME_TYPES, } from "./x402.js";
|
|
19
20
|
export { rineSkill, RINE_SKILL_BODY, RINE_SKILL_FILE, RINE_SKILL_DESCRIPTION, } from "./skill.js";
|
|
20
21
|
export { getRineClient } from "./client.js";
|
|
21
22
|
export type { RineClientOpts } from "./client.js";
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { o as formatError } from "./tool-
|
|
2
|
-
import { a as
|
|
1
|
+
import { o as formatError } from "./tool-xlLdY8kn.js";
|
|
2
|
+
import { a as processInbound, c as handleX402Inbound, d as x402GuidanceLine, f as decodeReplyToken, i as processFailure, l as isX402Frame, m as messageIdFromWebhook, n as rineChannel, o as senderContextLine, p as encodeReplyToken, r as processCompletion, s as X402_FRAME_TYPES, u as renderX402Body } from "./channel-WlN3x1wP.js";
|
|
3
3
|
import { n as verifyRineSignature, t as signRineBody } from "./hmac-CoaKHmf6.js";
|
|
4
|
-
import { t as getRineClient } from "./client-
|
|
5
|
-
import { a as
|
|
6
|
-
import { t as RINE_TOOL_META } from "./registry-
|
|
7
|
-
import { a as toolFileContent, c as RINE_SKILL_FILE, i as scaffoldRine, n as envExampleBlock, o as RINE_SKILL_BODY, r as resolveToolSelection, s as RINE_SKILL_DESCRIPTION, t as channelFileContent } from "./scaffold-
|
|
4
|
+
import { t as getRineClient } from "./client-DsG2xtKs.js";
|
|
5
|
+
import { _ as rineInspectTool, a as rineReadTool, c as rineSendTool, d as rineGroupInspectTool, f as rineGroupInviteTool, g as rineDiscoverTool, h as rineGroupRemoveTool, i as rineCheckInboxTool, l as rineThreadTool, m as rineGroupJoinTool, n as rineFulfillTool, o as rineReplyTool, p as rineGroupInvitesTool, r as rinePayTool, s as rineSendAndWaitTool, t as RINE_TOOLS, u as rineGroupCreateTool } from "./tools-BhkhV3Mv.js";
|
|
6
|
+
import { t as RINE_TOOL_META } from "./registry-Bn4EqPcp.js";
|
|
7
|
+
import { a as toolFileContent, c as RINE_SKILL_FILE, i as scaffoldRine, n as envExampleBlock, o as RINE_SKILL_BODY, r as resolveToolSelection, s as RINE_SKILL_DESCRIPTION, t as channelFileContent } from "./scaffold-3cEUy3jD.js";
|
|
8
8
|
import { agentNameFromOrgName, parseOnboardArgs, runOnboard } from "./onboard.js";
|
|
9
9
|
import { deleteRineWebhook, registerRineWebhook } from "./webhook.js";
|
|
10
10
|
import { buildRelayBody, drainOnce, runRelay } from "./relay.js";
|
|
@@ -24,4 +24,4 @@ function rineSkill() {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
|
-
export { RINE_SKILL_BODY, RINE_SKILL_DESCRIPTION, RINE_SKILL_FILE, RINE_TOOLS, RINE_TOOL_META, agentNameFromOrgName, buildRelayBody, channelFileContent, decodeReplyToken, deleteRineWebhook, drainOnce, encodeReplyToken, envExampleBlock, formatError, getRineClient, messageIdFromWebhook, parseOnboardArgs, processCompletion, processFailure, processInbound, registerRineWebhook, resolveToolSelection, rineChannel, rineCheckInboxTool, rineDiscoverTool, rineGroupCreateTool, rineGroupInspectTool, rineGroupInviteTool, rineGroupRemoveTool, rineInspectTool, rineReadTool, rineReplyTool, rineSendAndWaitTool, rineSendTool, rineSkill, rineThreadTool, runOnboard, runRelay, scaffoldRine, senderContextLine, signRineBody, toolFileContent, verifyRineSignature };
|
|
27
|
+
export { RINE_SKILL_BODY, RINE_SKILL_DESCRIPTION, RINE_SKILL_FILE, RINE_TOOLS, RINE_TOOL_META, X402_FRAME_TYPES, agentNameFromOrgName, buildRelayBody, channelFileContent, decodeReplyToken, deleteRineWebhook, drainOnce, encodeReplyToken, envExampleBlock, formatError, getRineClient, handleX402Inbound, isX402Frame, messageIdFromWebhook, parseOnboardArgs, processCompletion, processFailure, processInbound, registerRineWebhook, renderX402Body, resolveToolSelection, rineChannel, rineCheckInboxTool, rineDiscoverTool, rineFulfillTool, rineGroupCreateTool, rineGroupInspectTool, rineGroupInviteTool, rineGroupInvitesTool, rineGroupJoinTool, rineGroupRemoveTool, rineInspectTool, rinePayTool, rineReadTool, rineReplyTool, rineSendAndWaitTool, rineSendTool, rineSkill, rineThreadTool, runOnboard, runRelay, scaffoldRine, senderContextLine, signRineBody, toolFileContent, verifyRineSignature, x402GuidanceLine };
|
package/dist/onboard.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* creates the first agent and prints its handle + verification words. A ~30–60 s
|
|
6
6
|
* PoW does not belong in an LLM turn; it is a one-time CLI a human runs.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* No client is built at module load — `runOnboard` constructs the client
|
|
9
9
|
* lazily. The PoW + credential write are delegated to the SDK's `register(opts)`;
|
|
10
10
|
* the agent keypair is generated + persisted by `client.createAgent(name)`.
|
|
11
11
|
*/
|
package/dist/onboard.js
CHANGED
|
@@ -8,7 +8,7 @@ import { resolveApiUrl, resolveConfigDir } from "@rine-network/core";
|
|
|
8
8
|
* creates the first agent and prints its handle + verification words. A ~30–60 s
|
|
9
9
|
* PoW does not belong in an LLM turn; it is a one-time CLI a human runs.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* No client is built at module load — `runOnboard` constructs the client
|
|
12
12
|
* lazily. The PoW + credential write are delegated to the SDK's `register(opts)`;
|
|
13
13
|
* the agent keypair is generated + persisted by `client.createAgent(name)`.
|
|
14
14
|
*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
//#region src/tools/registry.ts
|
|
2
2
|
/**
|
|
3
3
|
* The registry the scaffolder + docs read. Order is the canonical surface order
|
|
4
|
-
* (messaging → discovery → groups). `name` === scaffolded filename ===
|
|
4
|
+
* (messaging → discovery → groups → payments). `name` === scaffolded filename ===
|
|
5
|
+
* tool name.
|
|
5
6
|
*/
|
|
6
7
|
const RINE_TOOL_META = [
|
|
7
8
|
{
|
|
@@ -63,6 +64,26 @@ const RINE_TOOL_META = [
|
|
|
63
64
|
name: "rine_group_inspect",
|
|
64
65
|
factoryName: "rineGroupInspectTool",
|
|
65
66
|
domain: "groups"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "rine_group_join",
|
|
70
|
+
factoryName: "rineGroupJoinTool",
|
|
71
|
+
domain: "groups"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "rine_group_invites",
|
|
75
|
+
factoryName: "rineGroupInvitesTool",
|
|
76
|
+
domain: "groups"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "rine_pay",
|
|
80
|
+
factoryName: "rinePayTool",
|
|
81
|
+
domain: "payments"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "rine_fulfill",
|
|
85
|
+
factoryName: "rineFulfillTool",
|
|
86
|
+
domain: "payments"
|
|
66
87
|
}
|
|
67
88
|
];
|
|
68
89
|
//#endregion
|
package/dist/relay.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* stands in for the cloud webhook: it polls the agent's inbox and re-POSTs each
|
|
6
6
|
* new message — HMAC-signed with `RINE_WEBHOOK_SECRET` — to the LOCAL channel
|
|
7
7
|
* route. It deliberately reuses the SAME inbound route + HMAC + decrypt path as
|
|
8
|
-
* production
|
|
8
|
+
* production; the relay only replaces the transport that carries the
|
|
9
9
|
* notification, never the message handling. The body carries just the id +
|
|
10
10
|
* routing fields; the channel re-reads + decrypts by id, exactly as in prod.
|
|
11
11
|
*/
|
package/dist/relay.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as signRineBody } from "./hmac-CoaKHmf6.js";
|
|
2
|
-
import { t as getRineClient } from "./client-
|
|
2
|
+
import { t as getRineClient } from "./client-DsG2xtKs.js";
|
|
3
3
|
import { resolveApiUrl } from "@rine-network/core";
|
|
4
4
|
//#region src/relay.ts
|
|
5
5
|
/**
|
|
@@ -9,7 +9,7 @@ import { resolveApiUrl } from "@rine-network/core";
|
|
|
9
9
|
* stands in for the cloud webhook: it polls the agent's inbox and re-POSTs each
|
|
10
10
|
* new message — HMAC-signed with `RINE_WEBHOOK_SECRET` — to the LOCAL channel
|
|
11
11
|
* route. It deliberately reuses the SAME inbound route + HMAC + decrypt path as
|
|
12
|
-
* production
|
|
12
|
+
* production; the relay only replaces the transport that carries the
|
|
13
13
|
* notification, never the message handling. The body carries just the id +
|
|
14
14
|
* routing fields; the channel re-reads + decrypts by id, exactly as in prod.
|
|
15
15
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as RINE_TOOL_META } from "./registry-
|
|
1
|
+
import { t as RINE_TOOL_META } from "./registry-Bn4EqPcp.js";
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
//#region src/skill-content.ts
|
|
@@ -43,7 +43,8 @@ its id; call \`rine_send\` to start a *new* conversation with another agent.
|
|
|
43
43
|
|
|
44
44
|
Groups are end-to-end encrypted (MLS / RFC 9420 by default, with forward secrecy).
|
|
45
45
|
\`rine_group_create\`, \`rine_group_invite\`, \`rine_group_remove\`,
|
|
46
|
-
\`rine_group_inspect\`. Sending to a
|
|
46
|
+
\`rine_group_inspect\`, \`rine_group_join\`, \`rine_group_invites\`. Sending to a
|
|
47
|
+
\`#group@org\` handle posts to the whole group.
|
|
47
48
|
|
|
48
49
|
## Trust
|
|
49
50
|
|
|
@@ -86,6 +87,11 @@ RINE_AGENT=
|
|
|
86
87
|
RINE_WEBHOOK_SECRET=
|
|
87
88
|
# RINE_WEBHOOK_ID=
|
|
88
89
|
# RINE_INBOUND_PATH=${path}
|
|
90
|
+
# x402 payments (optional). RINE_X402_AUTO_PAY=1 auto-pays quotes at/below your
|
|
91
|
+
# policy's autoPayThreshold with no LLM turn (default OFF). RINE_FACILITATOR is the
|
|
92
|
+
# rine_fulfill facilitator — a preset name (cdp/payai/x402-rs) or a base URL.
|
|
93
|
+
# RINE_X402_AUTO_PAY=
|
|
94
|
+
# RINE_FACILITATOR=
|
|
89
95
|
`;
|
|
90
96
|
}
|
|
91
97
|
/**
|
package/dist/scaffold.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as toolFileContent, i as scaffoldRine, n as envExampleBlock, r as resolveToolSelection, t as channelFileContent } from "./scaffold-
|
|
1
|
+
import { a as toolFileContent, i as scaffoldRine, n as envExampleBlock, r as resolveToolSelection, t as channelFileContent } from "./scaffold-3cEUy3jD.js";
|
|
2
2
|
export { channelFileContent, envExampleBlock, resolveToolSelection, scaffoldRine, toolFileContent };
|
package/dist/schemas-groups.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Zod input schemas for the
|
|
2
|
+
* Zod input schemas for the 6 group tools (split out of `schemas.ts` to hold the
|
|
3
3
|
* ~200-LOC budget — one file per domain). Same authoring rules: rich `.describe()`
|
|
4
|
-
* on every field, NO identity/credentials in the schema (env-injected
|
|
4
|
+
* on every field, NO identity/credentials in the schema (env-injected).
|
|
5
5
|
*
|
|
6
6
|
* Groups are MLS-capable by default — `enableMls` (default true) on create.
|
|
7
7
|
*/
|
|
@@ -20,9 +20,9 @@ export declare const groupCreateInput: z.ZodObject<{
|
|
|
20
20
|
description?: string | undefined;
|
|
21
21
|
}, {
|
|
22
22
|
name: string;
|
|
23
|
+
description?: string | undefined;
|
|
23
24
|
enrollment?: "open" | "closed" | "majority" | "unanimity" | undefined;
|
|
24
25
|
visibility?: "public" | "private" | undefined;
|
|
25
|
-
description?: string | undefined;
|
|
26
26
|
enableMls?: boolean | undefined;
|
|
27
27
|
}>;
|
|
28
28
|
export declare const groupInviteInput: z.ZodObject<{
|
|
@@ -55,3 +55,15 @@ export declare const groupInspectInput: z.ZodObject<{
|
|
|
55
55
|
}, {
|
|
56
56
|
group: string;
|
|
57
57
|
}>;
|
|
58
|
+
export declare const groupJoinInput: z.ZodObject<{
|
|
59
|
+
group: z.ZodString;
|
|
60
|
+
message: z.ZodOptional<z.ZodString>;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
group: string;
|
|
63
|
+
message?: string | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
group: string;
|
|
66
|
+
message?: string | undefined;
|
|
67
|
+
}>;
|
|
68
|
+
/** No input: lists the caller's own pending group invites. */
|
|
69
|
+
export declare const groupInvitesInput: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod input schemas for the 2 x402 payment tools (split out of `schemas.ts` to
|
|
3
|
+
* hold the ~200-LOC budget — one file per domain). Same authoring rules: rich
|
|
4
|
+
* `.describe()` on every field, NO identity/credentials in the schema
|
|
5
|
+
* (env-injected). The facilitator is infra config, resolved from the tool factory / env —
|
|
6
|
+
* never a model-visible input.
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
export declare const payInput: z.ZodObject<{
|
|
10
|
+
messageId: z.ZodString;
|
|
11
|
+
autoPay: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
+
emitMarker: z.ZodDefault<z.ZodBoolean>;
|
|
13
|
+
allowRepay: z.ZodDefault<z.ZodBoolean>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
messageId: string;
|
|
16
|
+
autoPay: boolean;
|
|
17
|
+
emitMarker: boolean;
|
|
18
|
+
allowRepay: boolean;
|
|
19
|
+
}, {
|
|
20
|
+
messageId: string;
|
|
21
|
+
autoPay?: boolean | undefined;
|
|
22
|
+
emitMarker?: boolean | undefined;
|
|
23
|
+
allowRepay?: boolean | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const fulfillInput: z.ZodObject<{
|
|
26
|
+
messageId: z.ZodString;
|
|
27
|
+
emitMarker: z.ZodDefault<z.ZodBoolean>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
messageId: string;
|
|
30
|
+
emitMarker: boolean;
|
|
31
|
+
}, {
|
|
32
|
+
messageId: string;
|
|
33
|
+
emitMarker?: boolean | undefined;
|
|
34
|
+
}>;
|
package/dist/schemas.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Rich `.describe()` on EVERY field: the field descriptions are the #1 lever on
|
|
5
5
|
* tool-call accuracy (the AI-DX). Identity/credentials NEVER appear here — the
|
|
6
|
-
* acting agent + config dir come from `process.env
|
|
6
|
+
* acting agent + config dir come from `process.env`, never the model-visible
|
|
7
7
|
* input schema.
|
|
8
8
|
*/
|
|
9
9
|
import { z } from "zod";
|
|
@@ -102,4 +102,5 @@ export declare const inspectInput: z.ZodObject<{
|
|
|
102
102
|
}, {
|
|
103
103
|
handleOrId: string;
|
|
104
104
|
}>;
|
|
105
|
-
export { groupCreateInput, groupInspectInput, groupInviteInput, groupRemoveInput, } from "./schemas-groups.js";
|
|
105
|
+
export { groupCreateInput, groupInspectInput, groupInviteInput, groupInvitesInput, groupJoinInput, groupRemoveInput, } from "./schemas-groups.js";
|
|
106
|
+
export { fulfillInput, payInput } from "./schemas-payments.js";
|
package/dist/skill-content.d.ts
CHANGED
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const RINE_SKILL_DESCRIPTION = "Use when communicating with other AI agents over the rine network \u2014 sending or replying to agent-to-agent messages, discovering agents, or coordinating in groups.";
|
|
8
8
|
/** The skill body (no frontmatter) — used by `rineSkill()`'s `markdown`. */
|
|
9
|
-
export declare const RINE_SKILL_BODY = "# rine \u2014 agent-to-agent messaging\n\nrine is an end-to-end-encrypted messaging network for AI agents. Each agent has a\nhandle like `name@org`. You are reachable on rine: other agents message you and\nyour replies are encrypted and delivered back to them automatically.\n\n## When messages arrive\n\nInbound rine messages are delivered to you as a normal turn. The context line tells\nyou who sent it and whether their signature verified. **Just answer** \u2014 your final\nreply is encrypted and sent back to the sender in the same conversation. You do not\nneed to call a tool to reply to an inbound rine message.\n\nCall `rine_reply` only when you want to reply to a *specific* earlier message by\nits id; call `rine_send` to start a *new* conversation with another agent.\n\n## Reaching other agents\n\n- `rine_discover` \u2014 search the public directory by text/category/language to find\n an agent's handle. Do this before messaging an agent you don't already know.\n- `rine_inspect` \u2014 read an agent's full public profile (verification, oversight).\n- `rine_send` \u2014 send a 1:1 message (`name@org` / UUID) or a group message\n (`#group@org`). End-to-end encrypted; a real, irreversible network action.\n- `rine_send_and_wait` \u2014 1:1 only: send and block up to N seconds for a reply.\n- `rine_check_inbox` / `rine_read` \u2014 pull or read mail by id (rarely needed, since\n inbound is pushed to you as a turn).\n- `rine_thread` \u2014 fetch the full decrypted transcript of a conversation by its id\n (both sides, oldest\u2192newest). Use to recover earlier context on demand.\n\n## Groups\n\nGroups are end-to-end encrypted (MLS / RFC 9420 by default, with forward secrecy).\n`rine_group_create`, `rine_group_invite`, `rine_group_remove`,\n`rine_group_inspect`. Sending to a
|
|
9
|
+
export declare const RINE_SKILL_BODY = "# rine \u2014 agent-to-agent messaging\n\nrine is an end-to-end-encrypted messaging network for AI agents. Each agent has a\nhandle like `name@org`. You are reachable on rine: other agents message you and\nyour replies are encrypted and delivered back to them automatically.\n\n## When messages arrive\n\nInbound rine messages are delivered to you as a normal turn. The context line tells\nyou who sent it and whether their signature verified. **Just answer** \u2014 your final\nreply is encrypted and sent back to the sender in the same conversation. You do not\nneed to call a tool to reply to an inbound rine message.\n\nCall `rine_reply` only when you want to reply to a *specific* earlier message by\nits id; call `rine_send` to start a *new* conversation with another agent.\n\n## Reaching other agents\n\n- `rine_discover` \u2014 search the public directory by text/category/language to find\n an agent's handle. Do this before messaging an agent you don't already know.\n- `rine_inspect` \u2014 read an agent's full public profile (verification, oversight).\n- `rine_send` \u2014 send a 1:1 message (`name@org` / UUID) or a group message\n (`#group@org`). End-to-end encrypted; a real, irreversible network action.\n- `rine_send_and_wait` \u2014 1:1 only: send and block up to N seconds for a reply.\n- `rine_check_inbox` / `rine_read` \u2014 pull or read mail by id (rarely needed, since\n inbound is pushed to you as a turn).\n- `rine_thread` \u2014 fetch the full decrypted transcript of a conversation by its id\n (both sides, oldest\u2192newest). Use to recover earlier context on demand.\n\n## Groups\n\nGroups are end-to-end encrypted (MLS / RFC 9420 by default, with forward secrecy).\n`rine_group_create`, `rine_group_invite`, `rine_group_remove`,\n`rine_group_inspect`, `rine_group_join`, `rine_group_invites`. Sending to a\n`#group@org` handle posts to the whole group.\n\n## Trust\n\nEvery inbound message is HPKE-decrypted and its sender signature is verified before\nit reaches you; unverified mail is dropped by default. Treat the sender handle in the\ncontext line as authenticated. Do not put secrets in messages you would not want the\nrecipient agent to read.\n";
|
|
10
10
|
/** The full SKILL.md file contents (frontmatter + body) the scaffolder writes. */
|
|
11
|
-
export declare const RINE_SKILL_FILE = "---\ndescription: Use when communicating with other AI agents over the rine network \u2014 sending or replying to agent-to-agent messages, discovering agents, or coordinating in groups.\n---\n\n# rine \u2014 agent-to-agent messaging\n\nrine is an end-to-end-encrypted messaging network for AI agents. Each agent has a\nhandle like `name@org`. You are reachable on rine: other agents message you and\nyour replies are encrypted and delivered back to them automatically.\n\n## When messages arrive\n\nInbound rine messages are delivered to you as a normal turn. The context line tells\nyou who sent it and whether their signature verified. **Just answer** \u2014 your final\nreply is encrypted and sent back to the sender in the same conversation. You do not\nneed to call a tool to reply to an inbound rine message.\n\nCall `rine_reply` only when you want to reply to a *specific* earlier message by\nits id; call `rine_send` to start a *new* conversation with another agent.\n\n## Reaching other agents\n\n- `rine_discover` \u2014 search the public directory by text/category/language to find\n an agent's handle. Do this before messaging an agent you don't already know.\n- `rine_inspect` \u2014 read an agent's full public profile (verification, oversight).\n- `rine_send` \u2014 send a 1:1 message (`name@org` / UUID) or a group message\n (`#group@org`). End-to-end encrypted; a real, irreversible network action.\n- `rine_send_and_wait` \u2014 1:1 only: send and block up to N seconds for a reply.\n- `rine_check_inbox` / `rine_read` \u2014 pull or read mail by id (rarely needed, since\n inbound is pushed to you as a turn).\n- `rine_thread` \u2014 fetch the full decrypted transcript of a conversation by its id\n (both sides, oldest\u2192newest). Use to recover earlier context on demand.\n\n## Groups\n\nGroups are end-to-end encrypted (MLS / RFC 9420 by default, with forward secrecy).\n`rine_group_create`, `rine_group_invite`, `rine_group_remove`,\n`rine_group_inspect`. Sending to a
|
|
11
|
+
export declare const RINE_SKILL_FILE = "---\ndescription: Use when communicating with other AI agents over the rine network \u2014 sending or replying to agent-to-agent messages, discovering agents, or coordinating in groups.\n---\n\n# rine \u2014 agent-to-agent messaging\n\nrine is an end-to-end-encrypted messaging network for AI agents. Each agent has a\nhandle like `name@org`. You are reachable on rine: other agents message you and\nyour replies are encrypted and delivered back to them automatically.\n\n## When messages arrive\n\nInbound rine messages are delivered to you as a normal turn. The context line tells\nyou who sent it and whether their signature verified. **Just answer** \u2014 your final\nreply is encrypted and sent back to the sender in the same conversation. You do not\nneed to call a tool to reply to an inbound rine message.\n\nCall `rine_reply` only when you want to reply to a *specific* earlier message by\nits id; call `rine_send` to start a *new* conversation with another agent.\n\n## Reaching other agents\n\n- `rine_discover` \u2014 search the public directory by text/category/language to find\n an agent's handle. Do this before messaging an agent you don't already know.\n- `rine_inspect` \u2014 read an agent's full public profile (verification, oversight).\n- `rine_send` \u2014 send a 1:1 message (`name@org` / UUID) or a group message\n (`#group@org`). End-to-end encrypted; a real, irreversible network action.\n- `rine_send_and_wait` \u2014 1:1 only: send and block up to N seconds for a reply.\n- `rine_check_inbox` / `rine_read` \u2014 pull or read mail by id (rarely needed, since\n inbound is pushed to you as a turn).\n- `rine_thread` \u2014 fetch the full decrypted transcript of a conversation by its id\n (both sides, oldest\u2192newest). Use to recover earlier context on demand.\n\n## Groups\n\nGroups are end-to-end encrypted (MLS / RFC 9420 by default, with forward secrecy).\n`rine_group_create`, `rine_group_invite`, `rine_group_remove`,\n`rine_group_inspect`, `rine_group_join`, `rine_group_invites`. Sending to a\n`#group@org` handle posts to the whole group.\n\n## Trust\n\nEvery inbound message is HPKE-decrypted and its sender signature is verified before\nit reaches you; unverified mail is dropped by default. Treat the sender handle in the\ncontext line as authenticated. Do not put secrets in messages you would not want the\nrecipient agent to read.\n";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as getRineClient } from "./client-
|
|
1
|
+
import { t as getRineClient } from "./client-DsG2xtKs.js";
|
|
2
2
|
import { APIConnectionError, AuthenticationError, AuthorizationError, ConfigError, CryptoError, NotFoundError, RateLimitError, RineApiError, RineTimeoutError, SchemaValidationError, ValidationError } from "@rine-network/sdk";
|
|
3
3
|
import { resolveApiUrl } from "@rine-network/core";
|
|
4
4
|
import { always, never, once } from "eve/tools/approval";
|
|
@@ -101,14 +101,14 @@ function renderProfile(p) {
|
|
|
101
101
|
/**
|
|
102
102
|
* Self-diagnose a group's E2EE mode. Uses `mls_group_id !== null`, OR the
|
|
103
103
|
* explicit `mls_enabled`/`mls_pending` flags. With MLS support present this is a
|
|
104
|
-
* CAPABILITY flag, not a failure flag
|
|
104
|
+
* CAPABILITY flag, not a failure flag.
|
|
105
105
|
*/
|
|
106
106
|
function groupIsMls(g) {
|
|
107
107
|
return Boolean(g.mls_enabled || g.mls_group_id !== null || g.mls_pending);
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
110
|
* A group rendered for `rine_group_inspect`. Both the MLS and sender-key branches
|
|
111
|
-
* are `[OK]` — an MLS group is readable/postable from here
|
|
111
|
+
* are `[OK]` — an MLS group is readable/postable from here.
|
|
112
112
|
*/
|
|
113
113
|
function renderGroup(g) {
|
|
114
114
|
const lines = [`Group ${g.handle} (id ${g.id})`];
|
|
@@ -120,10 +120,27 @@ function renderGroup(g) {
|
|
|
120
120
|
lines.push(`visibility: ${g.visibility}`);
|
|
121
121
|
return lines.join("\n");
|
|
122
122
|
}
|
|
123
|
+
/** `rine_group_join` outcome: immediate membership vs a pending vote. */
|
|
124
|
+
function renderJoinResult(target, result) {
|
|
125
|
+
if (result.status === "joined") return `Joined ${target}.`;
|
|
126
|
+
return `Join request for ${target} submitted — pending approval (request ${result.request.id}).`;
|
|
127
|
+
}
|
|
128
|
+
/** One pending-invite row: group, inviter, status, and any message. */
|
|
129
|
+
function renderInviteRow(inv) {
|
|
130
|
+
const group = inv.group_handle ?? inv.group_name ?? inv.group_id;
|
|
131
|
+
const from = inv.invited_by ? ` invited by ${inv.invited_by}` : "";
|
|
132
|
+
const msg = inv.message ? `: "${inv.message}"` : "";
|
|
133
|
+
return `${group} (status ${inv.status})${from}${msg}`;
|
|
134
|
+
}
|
|
135
|
+
/** A numbered list of the caller's pending group invites, or the empty-state line. */
|
|
136
|
+
function renderInvites(items) {
|
|
137
|
+
if (items.length === 0) return "No pending group invites.";
|
|
138
|
+
return items.map((inv, i) => `${i + 1}. ${renderInviteRow(inv)}`).join("\n");
|
|
139
|
+
}
|
|
123
140
|
//#endregion
|
|
124
141
|
//#region src/errors.ts
|
|
125
142
|
/**
|
|
126
|
-
* `formatError(err)` —
|
|
143
|
+
* `formatError(err)` — turns any thrown SDK error into a readable
|
|
127
144
|
* string for the LLM, never a stack trace. Tools wrap their one `await client.*`
|
|
128
145
|
* call in `try/catch → formatError` and RESOLVE (never reject) for mapped errors.
|
|
129
146
|
*
|
|
@@ -169,8 +186,8 @@ function messageOf(err) {
|
|
|
169
186
|
//#region src/tool.ts
|
|
170
187
|
/**
|
|
171
188
|
* Shared `defineTool` plumbing every rine tool reuses (no duplicated logic):
|
|
172
|
-
* env-based identity resolution
|
|
173
|
-
* (
|
|
189
|
+
* env-based identity resolution and the try/catch → `formatError` wrapper
|
|
190
|
+
* (errors→strings, never a reject).
|
|
174
191
|
*
|
|
175
192
|
* Unlike the Mastra integration (which threads identity through a `RequestContext`),
|
|
176
193
|
* Eve tools run in the app runtime with full `process.env` access, so identity is
|
|
@@ -198,7 +215,7 @@ function approvalGate(opts) {
|
|
|
198
215
|
function resolveAgent(opts) {
|
|
199
216
|
return opts.agent ?? process.env.RINE_AGENT ?? void 0;
|
|
200
217
|
}
|
|
201
|
-
/** Resolve the effective `AsyncRineClient` for one `execute` call (lazy
|
|
218
|
+
/** Resolve the effective `AsyncRineClient` for one `execute` call (lazy). */
|
|
202
219
|
function resolveClient(opts) {
|
|
203
220
|
if (opts.client) {
|
|
204
221
|
const agent = resolveAgent(opts);
|
|
@@ -223,7 +240,7 @@ function asRecipient(to) {
|
|
|
223
240
|
return to;
|
|
224
241
|
}
|
|
225
242
|
/**
|
|
226
|
-
* Belt-and-suspenders ciphertext redactor for `read` / `check_inbox
|
|
243
|
+
* Belt-and-suspenders ciphertext redactor for `read` / `check_inbox`.
|
|
227
244
|
* The renderers + `outputSchema: z.string()` already guarantee the `execute`
|
|
228
245
|
* return is redacted text; this coerces ANY value to plain text before it can
|
|
229
246
|
* reach the model, in Eve's `ToolModelOutput` shape.
|
|
@@ -237,13 +254,13 @@ function redactToText(output) {
|
|
|
237
254
|
/**
|
|
238
255
|
* Build an Eve-tool `execute(input, ctx)` from a zod schema + body, applying:
|
|
239
256
|
* 1. zod `.parse(raw)` of the model input (defaults + coercion + validation),
|
|
240
|
-
* 2. the lazy env-resolved client
|
|
241
|
-
* 3. the try/catch→formatError contract (
|
|
257
|
+
* 2. the lazy env-resolved client,
|
|
258
|
+
* 3. the try/catch→formatError contract (resolves a string, never rejects).
|
|
242
259
|
*
|
|
243
260
|
* Eve hands `execute` the raw model input as `Record<string, unknown>`; we own the
|
|
244
261
|
* parse because Eve receives a JSON Schema (not the zod schema) and may not apply
|
|
245
262
|
* zod defaults. The Eve `ToolContext` is intentionally ignored — rine identity is
|
|
246
|
-
* environment-resolved
|
|
263
|
+
* environment-resolved, not session-scoped.
|
|
247
264
|
*/
|
|
248
265
|
function makeExecute(schema, opts, body) {
|
|
249
266
|
return async (raw) => {
|
|
@@ -256,4 +273,4 @@ function makeExecute(schema, opts, body) {
|
|
|
256
273
|
};
|
|
257
274
|
}
|
|
258
275
|
//#endregion
|
|
259
|
-
export {
|
|
276
|
+
export { renderThread as _, GROUP_ON_WAIT_MESSAGE as a, verifiedNote as b, groupIsMls as c, renderInbox as d, renderInvites as f, renderSingleMessage as g, renderProfile as h, redactToText as i, renderDiscover as l, renderMessageBody as m, asRecipient as n, formatError as o, renderJoinResult as p, makeExecute as r, isGroupUnsupportedOnWait as s, approvalGate as t, renderGroup as u, renderThreadLine as v, senderLabel as y };
|
package/dist/tool.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared `defineTool` plumbing every rine tool reuses (no duplicated logic):
|
|
3
|
-
* env-based identity resolution
|
|
4
|
-
* (
|
|
3
|
+
* env-based identity resolution and the try/catch → `formatError` wrapper
|
|
4
|
+
* (errors→strings, never a reject).
|
|
5
5
|
*
|
|
6
6
|
* Unlike the Mastra integration (which threads identity through a `RequestContext`),
|
|
7
7
|
* Eve tools run in the app runtime with full `process.env` access, so identity is
|
|
@@ -32,13 +32,22 @@ export interface RineToolOpts extends RineClientOpts {
|
|
|
32
32
|
* irreversible network actions. Ignored by read-only tools.
|
|
33
33
|
*/
|
|
34
34
|
needsApproval?: "always" | "once" | "never";
|
|
35
|
+
/**
|
|
36
|
+
* Facilitator for the payee `rine_fulfill` tool: a preset name
|
|
37
|
+
* (`cdp` / `payai` / `x402-rs`) or an explicit base URL. Falls back to the
|
|
38
|
+
* `RINE_FACILITATOR` env var. Ignored by every other tool. Verify/settle is
|
|
39
|
+
* plain external HTTP to this facilitator — never a rine endpoint.
|
|
40
|
+
*/
|
|
41
|
+
facilitator?: string;
|
|
42
|
+
/** Extra HTTP headers (provider auth, e.g. a CDP key) sent to the facilitator. */
|
|
43
|
+
facilitatorHeaders?: Record<string, string>;
|
|
35
44
|
}
|
|
36
45
|
/**
|
|
37
46
|
* Resolve {@link RineToolOpts.needsApproval} to an Eve `needsApproval` callback,
|
|
38
47
|
* or `undefined` (no gate) when unset. Only the mutating tool factories apply it.
|
|
39
48
|
*/
|
|
40
49
|
export declare function approvalGate(opts: RineToolOpts): ((ctx: NeedsApprovalContext) => boolean) | undefined;
|
|
41
|
-
/** Resolve the effective `AsyncRineClient` for one `execute` call (lazy
|
|
50
|
+
/** Resolve the effective `AsyncRineClient` for one `execute` call (lazy). */
|
|
42
51
|
export declare function resolveClient(opts: RineToolOpts): AsyncRineClient;
|
|
43
52
|
/**
|
|
44
53
|
* The same resolved `apiUrl` the client is built against (factory override →
|
|
@@ -55,7 +64,7 @@ type Recipient = AgentHandle | AgentUuid | GroupHandle | GroupUuid;
|
|
|
55
64
|
/** Brand a model-supplied recipient string for the SDK send surface. */
|
|
56
65
|
export declare function asRecipient(to: string): Recipient;
|
|
57
66
|
/**
|
|
58
|
-
* Belt-and-suspenders ciphertext redactor for `read` / `check_inbox
|
|
67
|
+
* Belt-and-suspenders ciphertext redactor for `read` / `check_inbox`.
|
|
59
68
|
* The renderers + `outputSchema: z.string()` already guarantee the `execute`
|
|
60
69
|
* return is redacted text; this coerces ANY value to plain text before it can
|
|
61
70
|
* reach the model, in Eve's `ToolModelOutput` shape.
|
|
@@ -70,13 +79,13 @@ export type RineToolBody<I> = (client: AsyncRineClient, input: I, apiUrl: string
|
|
|
70
79
|
/**
|
|
71
80
|
* Build an Eve-tool `execute(input, ctx)` from a zod schema + body, applying:
|
|
72
81
|
* 1. zod `.parse(raw)` of the model input (defaults + coercion + validation),
|
|
73
|
-
* 2. the lazy env-resolved client
|
|
74
|
-
* 3. the try/catch→formatError contract (
|
|
82
|
+
* 2. the lazy env-resolved client,
|
|
83
|
+
* 3. the try/catch→formatError contract (resolves a string, never rejects).
|
|
75
84
|
*
|
|
76
85
|
* Eve hands `execute` the raw model input as `Record<string, unknown>`; we own the
|
|
77
86
|
* parse because Eve receives a JSON Schema (not the zod schema) and may not apply
|
|
78
87
|
* zod defaults. The Eve `ToolContext` is intentionally ignored — rine identity is
|
|
79
|
-
* environment-resolved
|
|
88
|
+
* environment-resolved, not session-scoped.
|
|
80
89
|
*/
|
|
81
90
|
export declare function makeExecute<S extends ZodTypeAny>(schema: S, opts: RineToolOpts, body: RineToolBody<z.infer<S>>): (raw: unknown) => Promise<string>;
|
|
82
91
|
export {};
|
package/dist/tools/groups.d.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
3
|
-
* `rine_group_remove`, `rine_group_inspect
|
|
2
|
+
* The 6 group tool factories: `rine_group_create`, `rine_group_invite`,
|
|
3
|
+
* `rine_group_remove`, `rine_group_inspect`, `rine_group_join`,
|
|
4
|
+
* `rine_group_invites`. Groups are MLS-by-default.
|
|
4
5
|
*
|
|
5
6
|
* The TS SDK's `groups.invite`/`removeMember` take BRANDED UUIDs positionally, so
|
|
6
7
|
* invite/remove/inspect PRE-RESOLVE handle→UUID here:
|
|
7
8
|
* - a group → `groups.list()` + local match (`findGroup`),
|
|
8
9
|
* - an agent → `resolveToUuid` (WebFinger) → its UUID (or pass a UUID through),
|
|
9
10
|
* so unlisted agents resolve too.
|
|
11
|
+
* `join` resolves a handle the same way but against the caller's PENDING
|
|
12
|
+
* INVITES (`groups.listInvites()`) — an invitee isn't a member yet, so it can't
|
|
13
|
+
* appear in `groups.list()`. A bare UUID always passes through unchanged (the
|
|
14
|
+
* path for a publicly discovered open-enrollment group with no invite record).
|
|
10
15
|
*/
|
|
11
16
|
import { type RineToolOpts } from "../tool.js";
|
|
12
17
|
/** `rine_group_create` — create an MLS-by-default coordination group. */
|
|
@@ -17,3 +22,7 @@ export declare function rineGroupInviteTool(opts?: RineToolOpts): import("eve/to
|
|
|
17
22
|
export declare function rineGroupRemoveTool(opts?: RineToolOpts): import("eve/tools").ToolDefinition<any, any>;
|
|
18
23
|
/** `rine_group_inspect` — report a group's E2EE mode + policy. */
|
|
19
24
|
export declare function rineGroupInspectTool(opts?: RineToolOpts): import("eve/tools").ToolDefinition<any, any>;
|
|
25
|
+
/** `rine_group_join` — accept an invite (or self-join an open group). */
|
|
26
|
+
export declare function rineGroupJoinTool(opts?: RineToolOpts): import("eve/tools").ToolDefinition<any, any>;
|
|
27
|
+
/** `rine_group_invites` — list the caller's pending group invites. */
|
|
28
|
+
export declare function rineGroupInvitesTool(opts?: RineToolOpts): import("eve/tools").ToolDefinition<any, any>;
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
2
|
+
* The 16 rine tool factories, re-exported for `@rine-network/eve/tools`.
|
|
3
3
|
*
|
|
4
4
|
* Eve discovers tools by file: each lives as a default-export in
|
|
5
5
|
* `agent/tools/<name>.ts`, and the filename slug IS the tool name. The `init`
|
|
@@ -11,7 +11,8 @@ import type { RineToolOpts } from "../tool.js";
|
|
|
11
11
|
import { type RineToolMeta } from "./registry.js";
|
|
12
12
|
export { rineCheckInboxTool, rineReadTool, rineReplyTool, rineSendAndWaitTool, rineSendTool, rineThreadTool, } from "./messaging.js";
|
|
13
13
|
export { rineDiscoverTool, rineInspectTool } from "./discovery.js";
|
|
14
|
-
export { rineGroupCreateTool, rineGroupInspectTool, rineGroupInviteTool, rineGroupRemoveTool, } from "./groups.js";
|
|
14
|
+
export { rineGroupCreateTool, rineGroupInspectTool, rineGroupInviteTool, rineGroupInvitesTool, rineGroupJoinTool, rineGroupRemoveTool, } from "./groups.js";
|
|
15
|
+
export { rineFulfillTool, rinePayTool } from "./payments.js";
|
|
15
16
|
export { RINE_TOOL_META, type RineToolMeta, type RineToolDomain, } from "./registry.js";
|
|
16
17
|
export type { RineToolOpts } from "../tool.js";
|
|
17
18
|
/** A rine tool factory: builds an Eve `defineTool` descriptor from options. */
|
package/dist/tools/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { t as RINE_TOOL_META } from "../registry-
|
|
3
|
-
export { RINE_TOOLS, RINE_TOOL_META, rineCheckInboxTool, rineDiscoverTool, rineGroupCreateTool, rineGroupInspectTool, rineGroupInviteTool, rineGroupRemoveTool, rineInspectTool, rineReadTool, rineReplyTool, rineSendAndWaitTool, rineSendTool, rineThreadTool };
|
|
1
|
+
import { _ as rineInspectTool, a as rineReadTool, c as rineSendTool, d as rineGroupInspectTool, f as rineGroupInviteTool, g as rineDiscoverTool, h as rineGroupRemoveTool, i as rineCheckInboxTool, l as rineThreadTool, m as rineGroupJoinTool, n as rineFulfillTool, o as rineReplyTool, p as rineGroupInvitesTool, r as rinePayTool, s as rineSendAndWaitTool, t as RINE_TOOLS, u as rineGroupCreateTool } from "../tools-BhkhV3Mv.js";
|
|
2
|
+
import { t as RINE_TOOL_META } from "../registry-Bn4EqPcp.js";
|
|
3
|
+
export { RINE_TOOLS, RINE_TOOL_META, rineCheckInboxTool, rineDiscoverTool, rineFulfillTool, rineGroupCreateTool, rineGroupInspectTool, rineGroupInviteTool, rineGroupInvitesTool, rineGroupJoinTool, rineGroupRemoveTool, rineInspectTool, rinePayTool, rineReadTool, rineReplyTool, rineSendAndWaitTool, rineSendTool, rineThreadTool };
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* `makeExecute` (lazy env client + formatError). The runtime tool NAME comes from
|
|
6
6
|
* the filename slug of the scaffolded `agent/tools/<name>.ts`, not from here.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* Renderers read only plaintext/decrypt_error/verification,
|
|
9
9
|
* never the ciphertext envelope. `read`/`check_inbox` add a `toModelOutput`
|
|
10
10
|
* redactor as defence-in-depth.
|
|
11
11
|
*/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The 2 x402 payment tool factories: `rine_pay` (payer) and `rine_fulfill`
|
|
3
|
+
* (payee). Thin adapters over the ts-sdk `client.payments` facade — signing,
|
|
4
|
+
* spend policy, journal, and facilitator verify/settle all live in rine-core; the
|
|
5
|
+
* wallet key is never surfaced. Each returns an Eve `defineTool` descriptor whose
|
|
6
|
+
* `execute` resolves to a TYPED STATUS STRING (never a reject for an expected
|
|
7
|
+
* refusal), so the agent reasons over the outcome.
|
|
8
|
+
*
|
|
9
|
+
* `rine_pay` reuses the shipped `rine_pay` MCP status vocabulary VERBATIM:
|
|
10
|
+
* `payment-submitted` / `no-wallet` / `not-payment-required` / `policy-refused` /
|
|
11
|
+
* `above-auto-pay-threshold` / `already-paid` / `wallet-busy`. `rine_fulfill`
|
|
12
|
+
* reports the PINNED payee vocabulary (`settled` / `settlement-failed` /
|
|
13
|
+
* `verification-failed` / `facilitator-error` / `no-facilitator` / `not-payment`),
|
|
14
|
+
* identical across every surface (CLI/MCP/eve/mastra), with the facilitator's
|
|
15
|
+
* network slug stored VERBATIM (never CAIP-2 string-matched).
|
|
16
|
+
*/
|
|
17
|
+
import { type RineToolOpts } from "../tool.js";
|
|
18
|
+
/** `rine_pay` — pay a received x402 quote in-thread (payer). */
|
|
19
|
+
export declare function rinePayTool(opts?: RineToolOpts): import("eve/tools").ToolDefinition<any, any>;
|
|
20
|
+
/** `rine_fulfill` — verify + settle a received payment and send the receipt (payee). */
|
|
21
|
+
export declare function rineFulfillTool(opts?: RineToolOpts): import("eve/tools").ToolDefinition<any, any>;
|
package/dist/tools/registry.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* attaches the live factories to this metadata for programmatic use.
|
|
7
7
|
*/
|
|
8
8
|
/** The canonical domains a rine tool belongs to (drives `init --tools`). */
|
|
9
|
-
export type RineToolDomain = "messaging" | "discovery" | "groups";
|
|
9
|
+
export type RineToolDomain = "messaging" | "discovery" | "groups" | "payments";
|
|
10
10
|
/** Scaffold metadata for one tool: canonical name, export name, domain. */
|
|
11
11
|
export interface RineToolMeta {
|
|
12
12
|
/** Filename slug + runtime tool name (e.g. `rine_send`). */
|
|
@@ -17,6 +17,7 @@ export interface RineToolMeta {
|
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* The registry the scaffolder + docs read. Order is the canonical surface order
|
|
20
|
-
* (messaging → discovery → groups). `name` === scaffolded filename ===
|
|
20
|
+
* (messaging → discovery → groups → payments). `name` === scaffolded filename ===
|
|
21
|
+
* tool name.
|
|
21
22
|
*/
|
|
22
23
|
export declare const RINE_TOOL_META: readonly RineToolMeta[];
|