@rine-network/eve 0.2.0 → 0.5.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.
Files changed (49) hide show
  1. package/README.md +12 -6
  2. package/dist/_zod.d.ts +1 -1
  3. package/dist/{channel-b0iIAZTh.js → channel-B81UiHyr.js} +29 -26
  4. package/dist/channel-core.d.ts +14 -11
  5. package/dist/channel-outbound.d.ts +3 -3
  6. package/dist/channel.d.ts +5 -5
  7. package/dist/channel.js +1 -1
  8. package/dist/{client-X_-9CpQT.js → client-CXJATA-m.js} +24 -4
  9. package/dist/client.d.ts +20 -2
  10. package/dist/errors.d.ts +1 -1
  11. package/dist/format-groups-list.d.ts +140 -0
  12. package/dist/format-groups.d.ts +81 -0
  13. package/dist/format.d.ts +57 -13
  14. package/dist/inbound.d.ts +3 -3
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.js +7 -7
  17. package/dist/onboard.d.ts +1 -1
  18. package/dist/onboard.js +3 -3
  19. package/dist/{registry-6sWyhOyF.js → registry-DsU13KY3.js} +57 -2
  20. package/dist/relay.d.ts +1 -1
  21. package/dist/relay.js +3 -3
  22. package/dist/scaffold-DQ2CA1kD.js +239 -0
  23. package/dist/scaffold.js +1 -1
  24. package/dist/schemas-groups-list.d.ts +29 -0
  25. package/dist/schemas-groups.d.ts +95 -9
  26. package/dist/schemas-payments.d.ts +2 -2
  27. package/dist/schemas.d.ts +27 -7
  28. package/dist/skill-content.d.ts +8 -2
  29. package/dist/tool-DeOeMNlK.js +618 -0
  30. package/dist/tool.d.ts +8 -8
  31. package/dist/tools/discovery.d.ts +8 -2
  32. package/dist/tools/groups-admin.d.ts +25 -0
  33. package/dist/tools/groups-admission.d.ts +56 -0
  34. package/dist/tools/groups-list.d.ts +21 -0
  35. package/dist/tools/groups-resolve.d.ts +80 -0
  36. package/dist/tools/groups.d.ts +22 -9
  37. package/dist/tools/index.d.ts +6 -4
  38. package/dist/tools/index.js +3 -3
  39. package/dist/tools/messaging.d.ts +14 -12
  40. package/dist/tools-CQDZG-qN.js +1149 -0
  41. package/dist/transcript.d.ts +2 -2
  42. package/dist/types.d.ts +4 -1
  43. package/dist/webhook.d.ts +9 -2
  44. package/dist/webhook.js +34 -14
  45. package/dist/x402.d.ts +3 -3
  46. package/package.json +3 -3
  47. package/dist/scaffold-0luQyBRK.js +0 -146
  48. package/dist/tool-BC49DldZ.js +0 -259
  49. package/dist/tools-BcVm_Onx.js +0 -535
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Zod input schemas for the three group READ verbs (`tools/groups-list.ts`):
3
+ * `rine_groups`, `rine_discover_groups`, `rine_group_roster`.
4
+ *
5
+ * Their own module because `schemas-groups.ts` already carries the ten write
6
+ * and admission verbs at its ~200-LOC budget. Same authoring rules as every
7
+ * other schema file here: rich `.describe()` on every field, and NO identity or
8
+ * credentials in a model-visible schema (both are env-injected).
9
+ */
10
+ import { z } from "zod";
11
+ /** No input: lists the groups this agent's ORG belongs to, never one agent's own. */
12
+ export declare const groupsInput: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
13
+ export declare const discoverGroupsInput: z.ZodObject<{
14
+ q: z.ZodOptional<z.ZodString>;
15
+ limit: z.ZodDefault<z.ZodNumber>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ limit: number;
18
+ q?: string | undefined;
19
+ }, {
20
+ limit?: number | undefined;
21
+ q?: string | undefined;
22
+ }>;
23
+ export declare const groupRosterInput: z.ZodObject<{
24
+ group: z.ZodString;
25
+ }, "strip", z.ZodTypeAny, {
26
+ group: string;
27
+ }, {
28
+ group: string;
29
+ }>;
@@ -1,42 +1,72 @@
1
1
  /**
2
- * Zod input schemas for the 4 group tools (split out of `schemas.ts` to hold the
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, R3).
2
+ * Zod input schemas for the 11 group WRITE and admission tools (split out of
3
+ * `schemas.ts` to hold the ~200-LOC budget — one file per domain; the three
4
+ * group READ schemas are in `schemas-groups-list.ts`). Same authoring rules:
5
+ * rich `.describe()` on every field, NO identity/credentials in the schema
6
+ * (env-injected).
5
7
  *
6
8
  * Groups are MLS-capable by default — `enableMls` (default true) on create.
9
+ *
10
+ * `visibility` carries no default and never will. Every surface used to invent
11
+ * one and they disagreed, so the same call produced a group listed at
12
+ * dir.rine.network from here and an unlisted one from the CLI — and the listing
13
+ * also flips the member-joined signal, so the two differed in who gets told
14
+ * about a join as well as in who can find the group.
15
+ *
16
+ * Admission is plural: `members` on create and `agentsToInvite` on invite each
17
+ * take a batch and report one outcome per requested agent.
7
18
  */
8
19
  import { z } from "zod";
20
+ /**
21
+ * The refusal when no visibility was named.
22
+ *
23
+ * It sits on the schema because `makeExecute` parses the input before the tool
24
+ * body runs, so the body could never speak here — and a bare zod "Required"
25
+ * would be the dump this obligation exists to replace. It names both choices
26
+ * and what each one does, so a model that reads it can pick without consulting
27
+ * docs.
28
+ */
29
+ export declare const VISIBILITY_REQUIRED = "visibility is required and has no default. Choose \"public\" \u2014 the group is listed at dir.rine.network for anyone to find, and the member-joined signal is off \u2014 or \"private\" \u2014 it is not listed, and members are signalled when someone joins.";
9
30
  export declare const groupCreateInput: z.ZodObject<{
10
31
  name: z.ZodString;
11
32
  enrollment: z.ZodDefault<z.ZodEnum<["open", "closed", "majority", "unanimity"]>>;
12
- visibility: z.ZodDefault<z.ZodEnum<["public", "private"]>>;
33
+ visibility: z.ZodEnum<["public", "private"]>;
13
34
  description: z.ZodOptional<z.ZodString>;
35
+ voteDurationHours: z.ZodOptional<z.ZodNumber>;
36
+ members: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
14
37
  enableMls: z.ZodDefault<z.ZodBoolean>;
15
38
  }, "strip", z.ZodTypeAny, {
16
39
  name: string;
17
- enrollment: "open" | "closed" | "majority" | "unanimity";
18
40
  visibility: "public" | "private";
41
+ enrollment: "open" | "closed" | "majority" | "unanimity";
19
42
  enableMls: boolean;
20
43
  description?: string | undefined;
44
+ voteDurationHours?: number | undefined;
45
+ members?: string[] | undefined;
21
46
  }, {
22
47
  name: string;
48
+ visibility: "public" | "private";
23
49
  description?: string | undefined;
24
50
  enrollment?: "open" | "closed" | "majority" | "unanimity" | undefined;
25
- visibility?: "public" | "private" | undefined;
51
+ voteDurationHours?: number | undefined;
52
+ members?: string[] | undefined;
26
53
  enableMls?: boolean | undefined;
27
54
  }>;
28
55
  export declare const groupInviteInput: z.ZodObject<{
29
56
  group: z.ZodString;
30
- agentToInvite: z.ZodString;
57
+ agentToInvite: z.ZodOptional<z.ZodString>;
58
+ agentsToInvite: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
31
59
  message: z.ZodOptional<z.ZodString>;
32
60
  }, "strip", z.ZodTypeAny, {
33
61
  group: string;
34
- agentToInvite: string;
35
62
  message?: string | undefined;
63
+ agentToInvite?: string | undefined;
64
+ agentsToInvite?: string[] | undefined;
36
65
  }, {
37
66
  group: string;
38
- agentToInvite: string;
39
67
  message?: string | undefined;
68
+ agentToInvite?: string | undefined;
69
+ agentsToInvite?: string[] | undefined;
40
70
  }>;
41
71
  export declare const groupRemoveInput: z.ZodObject<{
42
72
  group: z.ZodString;
@@ -55,3 +85,59 @@ export declare const groupInspectInput: z.ZodObject<{
55
85
  }, {
56
86
  group: string;
57
87
  }>;
88
+ export declare const groupJoinInput: z.ZodObject<{
89
+ group: z.ZodString;
90
+ message: z.ZodOptional<z.ZodString>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ group: string;
93
+ message?: string | undefined;
94
+ }, {
95
+ group: string;
96
+ message?: string | undefined;
97
+ }>;
98
+ /** No input: lists the caller's own pending group invites. */
99
+ export declare const groupInvitesInput: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
100
+ export declare const groupRequestsInput: z.ZodObject<{
101
+ group: z.ZodString;
102
+ outstanding: z.ZodDefault<z.ZodEnum<["pending", "invited", "live"]>>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ group: string;
105
+ outstanding: "pending" | "invited" | "live";
106
+ }, {
107
+ group: string;
108
+ outstanding?: "pending" | "invited" | "live" | undefined;
109
+ }>;
110
+ export declare const groupVoteInput: z.ZodObject<{
111
+ group: z.ZodString;
112
+ requestId: z.ZodString;
113
+ vote: z.ZodEnum<["approve", "deny"]>;
114
+ }, "strip", z.ZodTypeAny, {
115
+ group: string;
116
+ requestId: string;
117
+ vote: "approve" | "deny";
118
+ }, {
119
+ group: string;
120
+ requestId: string;
121
+ vote: "approve" | "deny";
122
+ }>;
123
+ export declare const groupLeaveInput: z.ZodObject<{
124
+ group: z.ZodString;
125
+ }, "strip", z.ZodTypeAny, {
126
+ group: string;
127
+ }, {
128
+ group: string;
129
+ }>;
130
+ export declare const groupSyncInput: z.ZodObject<{
131
+ group: z.ZodString;
132
+ }, "strip", z.ZodTypeAny, {
133
+ group: string;
134
+ }, {
135
+ group: string;
136
+ }>;
137
+ export declare const groupReclaimInput: z.ZodObject<{
138
+ group: z.ZodString;
139
+ }, "strip", z.ZodTypeAny, {
140
+ group: string;
141
+ }, {
142
+ group: string;
143
+ }>;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Zod input schemas for the 2 x402 payment tools (split out of `schemas.ts` to
3
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 (env-injected,
5
- * R3). The facilitator is infra config, resolved from the tool factory / env —
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
6
  * never a model-visible input.
7
7
  */
8
8
  import { z } from "zod";
package/dist/schemas.d.ts CHANGED
@@ -1,12 +1,23 @@
1
1
  /**
2
- * Shared Zod input schemas for the 12 rine tools.
2
+ * Shared Zod input schemas for the 25 rine tools.
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` (R3), never the model-visible
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";
10
+ /**
11
+ * The exactly-one-of rule for `rine_thread`'s two references, in the words the
12
+ * refusal will use if it is broken.
13
+ *
14
+ * One string teaches the schema and answers the mistake, so the model can never
15
+ * be told a rule the product does not enforce. Its spellings come from
16
+ * `rine-core` — these tools name the two references exactly as the TypeScript
17
+ * SDK does (`group` / `conversationId`), which is what `THREAD_REF_SURFACES.sdk`
18
+ * holds.
19
+ */
20
+ export declare const THREAD_REF_RULE: string;
10
21
  export declare const sendInput: z.ZodObject<{
11
22
  to: z.ZodString;
12
23
  body: z.ZodString;
@@ -39,11 +50,14 @@ export declare const sendAndWaitInput: z.ZodObject<{
39
50
  messageType?: string | undefined;
40
51
  waitSeconds?: number | undefined;
41
52
  }>;
42
- export declare const checkInboxInput: z.ZodObject<{
53
+ export declare const inboxInput: z.ZodObject<{
54
+ status: z.ZodDefault<z.ZodEnum<["new", "delivered", "read", "all"]>>;
43
55
  limit: z.ZodDefault<z.ZodNumber>;
44
56
  }, "strip", z.ZodTypeAny, {
57
+ status: "delivered" | "new" | "read" | "all";
45
58
  limit: number;
46
59
  }, {
60
+ status?: "delivered" | "new" | "read" | "all" | undefined;
47
61
  limit?: number | undefined;
48
62
  }>;
49
63
  export declare const readInput: z.ZodObject<{
@@ -67,14 +81,17 @@ export declare const replyInput: z.ZodObject<{
67
81
  messageType?: string | undefined;
68
82
  }>;
69
83
  export declare const threadInput: z.ZodObject<{
70
- conversationId: z.ZodString;
84
+ group: z.ZodOptional<z.ZodString>;
85
+ conversationId: z.ZodOptional<z.ZodString>;
71
86
  limit: z.ZodOptional<z.ZodNumber>;
72
87
  }, "strip", z.ZodTypeAny, {
73
- conversationId: string;
88
+ conversationId?: string | undefined;
74
89
  limit?: number | undefined;
90
+ group?: string | undefined;
75
91
  }, {
76
- conversationId: string;
92
+ conversationId?: string | undefined;
77
93
  limit?: number | undefined;
94
+ group?: string | undefined;
78
95
  }>;
79
96
  export declare const discoverInput: z.ZodObject<{
80
97
  q: z.ZodOptional<z.ZodString>;
@@ -102,5 +119,8 @@ export declare const inspectInput: z.ZodObject<{
102
119
  }, {
103
120
  handleOrId: string;
104
121
  }>;
105
- export { groupCreateInput, groupInspectInput, groupInviteInput, groupRemoveInput, } from "./schemas-groups.js";
122
+ /** No input: reports this agent's OWN org, trust tier, and live handles. */
123
+ export declare const whoamiInput: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
124
+ export { discoverGroupsInput, groupRosterInput, groupsInput, } from "./schemas-groups-list.js";
125
+ export { groupCreateInput, groupInspectInput, groupInviteInput, groupInvitesInput, groupJoinInput, groupLeaveInput, groupReclaimInput, groupRemoveInput, groupRequestsInput, groupSyncInput, groupVoteInput, } from "./schemas-groups.js";
106
126
  export { fulfillInput, payInput } from "./schemas-payments.js";
@@ -3,9 +3,15 @@
3
3
  * and CLI can write `agent/skills/rine/SKILL.md` without resolving the `eve` peer
4
4
  * dependency. `skill.ts` wraps {@link RINE_SKILL_BODY} in `defineSkill` for the
5
5
  * TypeScript-skill path.
6
+ *
7
+ * The electorate rule is interpolated from `@rine-network/core`, never retyped:
8
+ * it is one founder-pinned sentence that every surface renders, and a skill that
9
+ * carries its own copy is how a model comes to state a rule the server stopped
10
+ * implementing. `@rine-network/core` is a real dependency of this package, so
11
+ * the no-`eve`-import rule above is untouched.
6
12
  */
7
13
  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
14
  /** 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 `#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";
15
+ export declare const RINE_SKILL_BODY: string;
10
16
  /** 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 `#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";
17
+ export declare const RINE_SKILL_FILE: string;