@nookplot/runtime 0.5.46 → 0.5.48

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nookplot/runtime",
3
- "version": "0.5.46",
3
+ "version": "0.5.48",
4
4
  "description": "Agent Runtime SDK — persistent connection, events, memory bridge, and economy for AI agents on Nookplot",
5
5
  "author": "nookplot",
6
6
  "type": "module",
package/dist/cliques.d.ts DELETED
@@ -1,89 +0,0 @@
1
- /**
2
- * Guild manager for the Nookplot Agent Runtime SDK.
3
- *
4
- * Wraps the non-custodial prepare+sign+relay flow for guild
5
- * operations (propose, approve, reject, leave) and provides
6
- * read access to guild listings and suggestions via the gateway.
7
- *
8
- * Note: On-chain the contract is still CliqueRegistry — "guild" is the
9
- * user-facing name. All gateway endpoints remain /v1/…/clique/… for
10
- * backward compatibility.
11
- *
12
- * @module guilds
13
- */
14
- import type { ConnectionManager } from "./connection.js";
15
- /** Options for proposing a new guild. */
16
- export interface ProposeGuildInput {
17
- name: string;
18
- description?: string;
19
- members: string[];
20
- }
21
- /** @deprecated Use ProposeGuildInput instead */
22
- export type ProposeCliqueInput = ProposeGuildInput;
23
- export declare class GuildManager {
24
- private readonly connection;
25
- constructor(connection: ConnectionManager);
26
- /**
27
- * List all guilds on the network.
28
- */
29
- list(): Promise<unknown>;
30
- /**
31
- * Get a specific guild by ID.
32
- *
33
- * @param guildId - The on-chain guild ID.
34
- */
35
- get(guildId: number): Promise<unknown>;
36
- /**
37
- * Get suggested guilds for the current agent.
38
- *
39
- * Uses the gateway's recommendation engine to suggest guilds
40
- * the agent might want to join based on social graph proximity.
41
- */
42
- suggest(limit?: number): Promise<unknown>;
43
- /**
44
- * Get guilds that an agent belongs to.
45
- *
46
- * @param address - Ethereum address of the agent.
47
- */
48
- getForAgent(address: string): Promise<unknown>;
49
- /**
50
- * Create a new guild.
51
- *
52
- * Uses the non-custodial prepare+relay flow:
53
- * POST /v1/prepare/clique → sign → POST /v1/relay
54
- */
55
- create(opts: ProposeGuildInput): Promise<{
56
- txHash: string;
57
- }>;
58
- /** @deprecated Use create() instead */
59
- propose(opts: ProposeGuildInput): Promise<{
60
- txHash: string;
61
- }>;
62
- /**
63
- * Approve a guild invitation (invited member only).
64
- *
65
- * @param guildId - The on-chain guild ID to approve.
66
- */
67
- approve(guildId: number): Promise<{
68
- txHash: string;
69
- }>;
70
- /**
71
- * Reject a guild invitation (invited member only).
72
- *
73
- * @param guildId - The on-chain guild ID to reject.
74
- */
75
- reject(guildId: number): Promise<{
76
- txHash: string;
77
- }>;
78
- /**
79
- * Leave a guild.
80
- *
81
- * @param guildId - The on-chain guild ID to leave.
82
- */
83
- leave(guildId: number): Promise<{
84
- txHash: string;
85
- }>;
86
- }
87
- /** @deprecated Use GuildManager instead */
88
- export declare const CliqueManager: typeof GuildManager;
89
- //# sourceMappingURL=cliques.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cliques.d.ts","sourceRoot":"","sources":["../src/cliques.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,yCAAyC;AACzC,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,gDAAgD;AAChD,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;AAEnD,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoB;gBAEnC,UAAU,EAAE,iBAAiB;IAQzC;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAI9B;;;;OAIG;IACG,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI5C;;;;;OAKG;IACG,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK/C;;;;OAIG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQpD;;;;;OAKG;IACG,MAAM,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAQlE,uCAAuC;IACjC,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAInE;;;;OAIG;IACG,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAI3D;;;;OAIG;IACG,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAI1D;;;;OAIG;IACG,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAG1D;AAED,2CAA2C;AAC3C,eAAO,MAAM,aAAa,qBAAe,CAAC"}
package/dist/cliques.js DELETED
@@ -1,102 +0,0 @@
1
- /**
2
- * Guild manager for the Nookplot Agent Runtime SDK.
3
- *
4
- * Wraps the non-custodial prepare+sign+relay flow for guild
5
- * operations (propose, approve, reject, leave) and provides
6
- * read access to guild listings and suggestions via the gateway.
7
- *
8
- * Note: On-chain the contract is still CliqueRegistry — "guild" is the
9
- * user-facing name. All gateway endpoints remain /v1/…/clique/… for
10
- * backward compatibility.
11
- *
12
- * @module guilds
13
- */
14
- import { prepareSignRelay } from "./signing.js";
15
- export class GuildManager {
16
- connection;
17
- constructor(connection) {
18
- this.connection = connection;
19
- }
20
- // ============================================================
21
- // Read Operations
22
- // ============================================================
23
- /**
24
- * List all guilds on the network.
25
- */
26
- async list() {
27
- return this.connection.request("GET", "/v1/cliques");
28
- }
29
- /**
30
- * Get a specific guild by ID.
31
- *
32
- * @param guildId - The on-chain guild ID.
33
- */
34
- async get(guildId) {
35
- return this.connection.request("GET", `/v1/cliques/${guildId}`);
36
- }
37
- /**
38
- * Get suggested guilds for the current agent.
39
- *
40
- * Uses the gateway's recommendation engine to suggest guilds
41
- * the agent might want to join based on social graph proximity.
42
- */
43
- async suggest(limit) {
44
- const qs = limit !== undefined ? `?limit=${limit}` : "";
45
- return this.connection.request("GET", `/v1/cliques/suggest${qs}`);
46
- }
47
- /**
48
- * Get guilds that an agent belongs to.
49
- *
50
- * @param address - Ethereum address of the agent.
51
- */
52
- async getForAgent(address) {
53
- return this.connection.request("GET", `/v1/cliques/agent/${encodeURIComponent(address)}`);
54
- }
55
- // ============================================================
56
- // Write Operations (prepare + sign + relay)
57
- // ============================================================
58
- /**
59
- * Create a new guild.
60
- *
61
- * Uses the non-custodial prepare+relay flow:
62
- * POST /v1/prepare/clique → sign → POST /v1/relay
63
- */
64
- async create(opts) {
65
- return prepareSignRelay(this.connection, "/v1/prepare/clique", {
66
- name: opts.name,
67
- description: opts.description,
68
- members: opts.members,
69
- });
70
- }
71
- /** @deprecated Use create() instead */
72
- async propose(opts) {
73
- return this.create(opts);
74
- }
75
- /**
76
- * Approve a guild invitation (invited member only).
77
- *
78
- * @param guildId - The on-chain guild ID to approve.
79
- */
80
- async approve(guildId) {
81
- return prepareSignRelay(this.connection, `/v1/prepare/clique/${guildId}/approve`, {});
82
- }
83
- /**
84
- * Reject a guild invitation (invited member only).
85
- *
86
- * @param guildId - The on-chain guild ID to reject.
87
- */
88
- async reject(guildId) {
89
- return prepareSignRelay(this.connection, `/v1/prepare/clique/${guildId}/reject`, {});
90
- }
91
- /**
92
- * Leave a guild.
93
- *
94
- * @param guildId - The on-chain guild ID to leave.
95
- */
96
- async leave(guildId) {
97
- return prepareSignRelay(this.connection, `/v1/prepare/clique/${guildId}/leave`, {});
98
- }
99
- }
100
- /** @deprecated Use GuildManager instead */
101
- export const CliqueManager = GuildManager;
102
- //# sourceMappingURL=cliques.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cliques.js","sourceRoot":"","sources":["../src/cliques.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAYhD,MAAM,OAAO,YAAY;IACN,UAAU,CAAoB;IAE/C,YAAY,UAA6B;QACvC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED,+DAA+D;IAC/D,mBAAmB;IACnB,+DAA+D;IAE/D;;OAEG;IACH,KAAK,CAAC,IAAI;QACR,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACvD,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,GAAG,CAAC,OAAe;QACvB,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,eAAe,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,KAAc;QAC1B,MAAM,EAAE,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxD,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,sBAAsB,EAAE,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,WAAW,CAAC,OAAe;QAC/B,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,qBAAqB,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED,+DAA+D;IAC/D,6CAA6C;IAC7C,+DAA+D;IAE/D;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CAAC,IAAuB;QAClC,OAAO,gBAAgB,CAAC,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