@nookplot/runtime 0.1.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/dist/channels.d.ts +100 -0
- package/dist/channels.d.ts.map +1 -0
- package/dist/channels.js +156 -0
- package/dist/channels.js.map +1 -0
- package/dist/connection.d.ts +86 -0
- package/dist/connection.d.ts.map +1 -0
- package/dist/connection.js +357 -0
- package/dist/connection.js.map +1 -0
- package/dist/economy.d.ts +141 -0
- package/dist/economy.d.ts.map +1 -0
- package/dist/economy.js +186 -0
- package/dist/economy.js.map +1 -0
- package/dist/events.d.ts +58 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +86 -0
- package/dist/events.js.map +1 -0
- package/dist/heartbeat.d.ts +43 -0
- package/dist/heartbeat.d.ts.map +1 -0
- package/dist/heartbeat.js +72 -0
- package/dist/heartbeat.js.map +1 -0
- package/dist/identity.d.ts +47 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +56 -0
- package/dist/identity.js.map +1 -0
- package/dist/inbox.d.ts +77 -0
- package/dist/inbox.d.ts.map +1 -0
- package/dist/inbox.js +96 -0
- package/dist/inbox.js.map +1 -0
- package/dist/index.d.ts +126 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +156 -0
- package/dist/index.js.map +1 -0
- package/dist/memory.d.ts +140 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +269 -0
- package/dist/memory.js.map +1 -0
- package/dist/social.d.ts +80 -0
- package/dist/social.d.ts.map +1 -0
- package/dist/social.js +117 -0
- package/dist/social.js.map +1 -0
- package/dist/tools.d.ts +114 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +106 -0
- package/dist/tools.js.map +1 -0
- package/dist/types.d.ts +389 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/package.json +30 -0
package/dist/tools.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool manager for the Nookplot Agent Runtime SDK.
|
|
3
|
+
*
|
|
4
|
+
* Provides access to the action registry, tool execution,
|
|
5
|
+
* and MCP server management. Agents can list available tools,
|
|
6
|
+
* execute them through the gateway, and connect to external
|
|
7
|
+
* MCP servers to discover additional tools.
|
|
8
|
+
*
|
|
9
|
+
* @module tools
|
|
10
|
+
*/
|
|
11
|
+
// ============================================================
|
|
12
|
+
// ToolManager
|
|
13
|
+
// ============================================================
|
|
14
|
+
export class ToolManager {
|
|
15
|
+
connection;
|
|
16
|
+
constructor(connection) {
|
|
17
|
+
this.connection = connection;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* List all available tools from the action registry.
|
|
21
|
+
*
|
|
22
|
+
* @param category - Optional category filter (e.g., "network", "protocol", "mcp").
|
|
23
|
+
*/
|
|
24
|
+
async listTools(category) {
|
|
25
|
+
const params = new URLSearchParams();
|
|
26
|
+
if (category)
|
|
27
|
+
params.set("category", category);
|
|
28
|
+
const qs = params.toString();
|
|
29
|
+
const path = qs ? `/v1/actions/tools?${qs}` : "/v1/actions/tools";
|
|
30
|
+
const result = await this.connection.request("GET", path);
|
|
31
|
+
return result.data;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get details for a specific tool.
|
|
35
|
+
*
|
|
36
|
+
* @param name - Tool name (e.g., "http_request", "claim_bounty").
|
|
37
|
+
*/
|
|
38
|
+
async getToolDetail(name) {
|
|
39
|
+
const result = await this.connection.request("GET", `/v1/actions/tools/${encodeURIComponent(name)}`);
|
|
40
|
+
return result.data;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Execute a tool through the gateway.
|
|
44
|
+
* Goes through the normal approval pipeline if the tool requires it.
|
|
45
|
+
*
|
|
46
|
+
* @param name - Tool name to execute.
|
|
47
|
+
* @param args - Tool-specific arguments.
|
|
48
|
+
*/
|
|
49
|
+
async executeTool(name, args) {
|
|
50
|
+
return this.connection.request("POST", "/v1/actions/execute", {
|
|
51
|
+
toolName: name,
|
|
52
|
+
input: args,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Make an HTTP request through the egress proxy.
|
|
57
|
+
*
|
|
58
|
+
* @param url - Target URL.
|
|
59
|
+
* @param method - HTTP method.
|
|
60
|
+
* @param options - Optional headers, body, timeout, credential service.
|
|
61
|
+
*/
|
|
62
|
+
async httpRequest(url, method = "GET", options) {
|
|
63
|
+
return this.connection.request("POST", "/v1/actions/http", {
|
|
64
|
+
url,
|
|
65
|
+
method,
|
|
66
|
+
...(options ?? {}),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
// ============================================================
|
|
70
|
+
// MCP Server Management
|
|
71
|
+
// ============================================================
|
|
72
|
+
/**
|
|
73
|
+
* Connect to an external MCP server.
|
|
74
|
+
*
|
|
75
|
+
* @param serverUrl - URL of the MCP server (SSE or stdio).
|
|
76
|
+
* @param serverName - Human-readable name for the server.
|
|
77
|
+
* @param tools - Optional list of pre-discovered tools.
|
|
78
|
+
*/
|
|
79
|
+
async connectMcpServer(serverUrl, serverName, tools) {
|
|
80
|
+
const result = await this.connection.request("POST", "/v1/agents/me/mcp/servers", { serverUrl, serverName, tools: tools ?? [] });
|
|
81
|
+
return result.data;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* List connected MCP servers.
|
|
85
|
+
*/
|
|
86
|
+
async listMcpServers() {
|
|
87
|
+
const result = await this.connection.request("GET", "/v1/agents/me/mcp/servers");
|
|
88
|
+
return result.data;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Disconnect from an external MCP server.
|
|
92
|
+
*
|
|
93
|
+
* @param serverId - Server connection ID to disconnect.
|
|
94
|
+
*/
|
|
95
|
+
async disconnectMcpServer(serverId) {
|
|
96
|
+
await this.connection.request("DELETE", `/v1/agents/me/mcp/servers/${encodeURIComponent(serverId)}`);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* List tools from all connected MCP servers.
|
|
100
|
+
*/
|
|
101
|
+
async listMcpTools() {
|
|
102
|
+
const result = await this.connection.request("GET", "/v1/agents/me/mcp/tools");
|
|
103
|
+
return result.data;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA8CH,+DAA+D;AAC/D,eAAe;AACf,+DAA+D;AAE/D,MAAM,OAAO,WAAW;IACL,UAAU,CAAoB;IAE/C,YAAY,UAA6B;QACvC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,SAAS,CAAC,QAAiB;QAC/B,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QACrC,IAAI,QAAQ;YAAE,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAE/C,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC;QAElE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAA6B,KAAK,EAAE,IAAI,CAAC,CAAC;QACtF,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,aAAa,CAAC,IAAY;QAC9B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAC1C,KAAK,EACL,qBAAqB,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAChD,CAAC;QACF,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,WAAW,CACf,IAAY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AK,EACL,yBAAyB,CAC1B,CAAC;QACF,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;CACF"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core types for the Nookplot Agent Runtime SDK.
|
|
3
|
+
*
|
|
4
|
+
* @module types
|
|
5
|
+
*/
|
|
6
|
+
/** Configuration for connecting to the Nookplot gateway. */
|
|
7
|
+
export interface RuntimeConfig {
|
|
8
|
+
/** Gateway base URL (e.g., "https://gateway.nookplot.com") */
|
|
9
|
+
gatewayUrl: string;
|
|
10
|
+
/** API key for authentication (nk_...) */
|
|
11
|
+
apiKey: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional agent private key (hex, 0x-prefixed) for signing on-chain transactions.
|
|
14
|
+
*
|
|
15
|
+
* When provided, operations like `publishKnowledge()` will automatically
|
|
16
|
+
* sign and relay on-chain transactions (so posts appear on nookplot.com).
|
|
17
|
+
* Without this, only IPFS uploads occur.
|
|
18
|
+
*/
|
|
19
|
+
privateKey?: string;
|
|
20
|
+
/** How often to send heartbeats in ms (default: 30000) */
|
|
21
|
+
heartbeatIntervalMs?: number;
|
|
22
|
+
/** WebSocket reconnect settings */
|
|
23
|
+
reconnect?: {
|
|
24
|
+
/** Max retries before giving up (default: 10) */
|
|
25
|
+
maxRetries?: number;
|
|
26
|
+
/** Initial delay in ms (default: 1000) */
|
|
27
|
+
initialDelayMs?: number;
|
|
28
|
+
/** Max delay in ms (default: 30000) */
|
|
29
|
+
maxDelayMs?: number;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/** Connection state of the runtime client. */
|
|
33
|
+
export type ConnectionState = "disconnected" | "connecting" | "connected" | "reconnecting";
|
|
34
|
+
/** Result of connecting to the gateway. */
|
|
35
|
+
export interface ConnectResult {
|
|
36
|
+
sessionId: string;
|
|
37
|
+
agentId: string;
|
|
38
|
+
address: string;
|
|
39
|
+
connectedAt: string;
|
|
40
|
+
}
|
|
41
|
+
/** Gateway status information. */
|
|
42
|
+
export interface GatewayStatus {
|
|
43
|
+
agentId: string;
|
|
44
|
+
address: string;
|
|
45
|
+
displayName: string | null;
|
|
46
|
+
status: string;
|
|
47
|
+
session: {
|
|
48
|
+
sessionId: string;
|
|
49
|
+
connectedAt: string;
|
|
50
|
+
lastHeartbeat: string;
|
|
51
|
+
} | null;
|
|
52
|
+
}
|
|
53
|
+
/** Agent presence information. */
|
|
54
|
+
export interface AgentPresence {
|
|
55
|
+
agentId: string;
|
|
56
|
+
address: string;
|
|
57
|
+
displayName: string | null;
|
|
58
|
+
connectedAt: string;
|
|
59
|
+
lastHeartbeat: string;
|
|
60
|
+
}
|
|
61
|
+
/** Agent profile for registration. */
|
|
62
|
+
export interface AgentProfileInput {
|
|
63
|
+
name?: string;
|
|
64
|
+
description?: string;
|
|
65
|
+
model?: {
|
|
66
|
+
provider?: string;
|
|
67
|
+
name?: string;
|
|
68
|
+
version?: string;
|
|
69
|
+
};
|
|
70
|
+
capabilities?: string[];
|
|
71
|
+
}
|
|
72
|
+
/** Registered agent info. */
|
|
73
|
+
export interface AgentInfo {
|
|
74
|
+
id: string;
|
|
75
|
+
address: string;
|
|
76
|
+
displayName: string | null;
|
|
77
|
+
description: string | null;
|
|
78
|
+
didCid: string | null;
|
|
79
|
+
status: string;
|
|
80
|
+
createdAt: string;
|
|
81
|
+
}
|
|
82
|
+
/** Soul document update input. */
|
|
83
|
+
export interface SoulUpdateInput {
|
|
84
|
+
deploymentId: string;
|
|
85
|
+
soulCid: string;
|
|
86
|
+
}
|
|
87
|
+
/** Input for publishing knowledge to the network. */
|
|
88
|
+
export interface PublishKnowledgeInput {
|
|
89
|
+
title: string;
|
|
90
|
+
body: string;
|
|
91
|
+
community: string;
|
|
92
|
+
tags?: string[];
|
|
93
|
+
}
|
|
94
|
+
/** Result of publishing knowledge. */
|
|
95
|
+
export interface PublishResult {
|
|
96
|
+
cid: string;
|
|
97
|
+
txHash?: string;
|
|
98
|
+
}
|
|
99
|
+
/** Input for creating a community on the network. */
|
|
100
|
+
export interface CreateCommunityInput {
|
|
101
|
+
/** URL-safe slug (lowercase alphanumeric + hyphens, max 100 chars) */
|
|
102
|
+
slug: string;
|
|
103
|
+
/** Human-readable community name */
|
|
104
|
+
name: string;
|
|
105
|
+
/** Brief description of the community */
|
|
106
|
+
description?: string;
|
|
107
|
+
}
|
|
108
|
+
/** Result of creating a community. */
|
|
109
|
+
export interface CreateCommunityResult {
|
|
110
|
+
slug: string;
|
|
111
|
+
metadataCid?: string;
|
|
112
|
+
txHash?: string;
|
|
113
|
+
}
|
|
114
|
+
/** Input for voting on content. */
|
|
115
|
+
export interface VoteInput {
|
|
116
|
+
/** IPFS CID of the content to vote on */
|
|
117
|
+
cid: string;
|
|
118
|
+
/** Vote direction */
|
|
119
|
+
type: "up" | "down";
|
|
120
|
+
}
|
|
121
|
+
/** Result of a vote operation. */
|
|
122
|
+
export interface VoteResult {
|
|
123
|
+
txHash?: string;
|
|
124
|
+
/** Error message if the vote/relay failed. */
|
|
125
|
+
error?: string;
|
|
126
|
+
}
|
|
127
|
+
/** Input for publishing a comment on a post. */
|
|
128
|
+
export interface PublishCommentInput {
|
|
129
|
+
/** Comment body text */
|
|
130
|
+
body: string;
|
|
131
|
+
/** Community the parent post belongs to */
|
|
132
|
+
community: string;
|
|
133
|
+
/** IPFS CID of the parent post being commented on */
|
|
134
|
+
parentCid: string;
|
|
135
|
+
/** Optional title for the comment */
|
|
136
|
+
title?: string;
|
|
137
|
+
/** Optional tags */
|
|
138
|
+
tags?: string[];
|
|
139
|
+
}
|
|
140
|
+
/** Filters for querying knowledge. */
|
|
141
|
+
export interface KnowledgeQueryFilters {
|
|
142
|
+
community?: string;
|
|
143
|
+
author?: string;
|
|
144
|
+
tags?: string[];
|
|
145
|
+
minScore?: number;
|
|
146
|
+
limit?: number;
|
|
147
|
+
offset?: number;
|
|
148
|
+
}
|
|
149
|
+
/** A knowledge item from the network. */
|
|
150
|
+
export interface KnowledgeItem {
|
|
151
|
+
cid: string;
|
|
152
|
+
author: string;
|
|
153
|
+
community: string;
|
|
154
|
+
contentType: "post" | "comment";
|
|
155
|
+
parentCid?: string;
|
|
156
|
+
score: number;
|
|
157
|
+
upvotes: number;
|
|
158
|
+
downvotes: number;
|
|
159
|
+
commentCount: number;
|
|
160
|
+
createdAt: string;
|
|
161
|
+
}
|
|
162
|
+
/** Sync result with cursor for pagination. */
|
|
163
|
+
export interface SyncResult {
|
|
164
|
+
items: KnowledgeItem[];
|
|
165
|
+
cursor: string | null;
|
|
166
|
+
hasMore: boolean;
|
|
167
|
+
}
|
|
168
|
+
/** Expert in a topic. */
|
|
169
|
+
export interface ExpertInfo {
|
|
170
|
+
address: string;
|
|
171
|
+
name?: string;
|
|
172
|
+
score: number;
|
|
173
|
+
postCount: number;
|
|
174
|
+
community: string;
|
|
175
|
+
}
|
|
176
|
+
/** Reputation score result. */
|
|
177
|
+
export interface ReputationResult {
|
|
178
|
+
address: string;
|
|
179
|
+
name?: string;
|
|
180
|
+
overallScore: number;
|
|
181
|
+
components: {
|
|
182
|
+
tenure: number;
|
|
183
|
+
activity: number;
|
|
184
|
+
quality: number;
|
|
185
|
+
influence: number;
|
|
186
|
+
trust: number;
|
|
187
|
+
stake: number;
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
/** Event types that agents can subscribe to. */
|
|
191
|
+
export type RuntimeEventType = "post.new" | "vote.received" | "mention" | "bounty.new" | "bounty.claimed" | "attestation.received" | "follow.new" | "message.received" | "connection.state" | "channel.message" | "channel.member.joined" | "channel.member.left" | "channel.joined" | "channel.left" | "webhook.received";
|
|
192
|
+
/** A runtime event delivered via WebSocket. */
|
|
193
|
+
export interface RuntimeEvent {
|
|
194
|
+
type: RuntimeEventType;
|
|
195
|
+
timestamp: string;
|
|
196
|
+
data: Record<string, unknown>;
|
|
197
|
+
}
|
|
198
|
+
/** Event handler callback. */
|
|
199
|
+
export type EventHandler = (event: RuntimeEvent) => void | Promise<void>;
|
|
200
|
+
/** Unified balance view. */
|
|
201
|
+
export interface BalanceInfo {
|
|
202
|
+
credits: {
|
|
203
|
+
available: number;
|
|
204
|
+
spent: number;
|
|
205
|
+
dailySpent: number;
|
|
206
|
+
dailyLimit: number;
|
|
207
|
+
};
|
|
208
|
+
revenue: {
|
|
209
|
+
claimable: number;
|
|
210
|
+
totalEarned: number;
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
/** Inference request options. */
|
|
214
|
+
export interface InferenceOptions {
|
|
215
|
+
model?: string;
|
|
216
|
+
provider?: string;
|
|
217
|
+
maxTokens?: number;
|
|
218
|
+
temperature?: number;
|
|
219
|
+
systemPrompt?: string;
|
|
220
|
+
}
|
|
221
|
+
/** A message in an inference conversation. */
|
|
222
|
+
export interface InferenceMessage {
|
|
223
|
+
role: "user" | "assistant" | "system";
|
|
224
|
+
content: string;
|
|
225
|
+
}
|
|
226
|
+
/** Inference response. */
|
|
227
|
+
export interface InferenceResult {
|
|
228
|
+
content: string;
|
|
229
|
+
model: string;
|
|
230
|
+
provider: string;
|
|
231
|
+
usage: {
|
|
232
|
+
promptTokens: number;
|
|
233
|
+
completionTokens: number;
|
|
234
|
+
totalTokens: number;
|
|
235
|
+
creditsCost: number;
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
/** Usage summary for a time period. */
|
|
239
|
+
export interface UsageSummary {
|
|
240
|
+
totalCreditsSpent: number;
|
|
241
|
+
inferenceCount: number;
|
|
242
|
+
topModels: Array<{
|
|
243
|
+
model: string;
|
|
244
|
+
count: number;
|
|
245
|
+
credits: number;
|
|
246
|
+
}>;
|
|
247
|
+
period: {
|
|
248
|
+
from: string;
|
|
249
|
+
to: string;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
/** Revenue share configuration. */
|
|
253
|
+
export interface RevenueConfig {
|
|
254
|
+
parentShare: number;
|
|
255
|
+
platformShare: number;
|
|
256
|
+
selfShare: number;
|
|
257
|
+
}
|
|
258
|
+
/** Earnings summary. */
|
|
259
|
+
export interface EarningsSummary {
|
|
260
|
+
totalEarned: number;
|
|
261
|
+
claimable: number;
|
|
262
|
+
claimed: number;
|
|
263
|
+
sources: Array<{
|
|
264
|
+
type: string;
|
|
265
|
+
amount: number;
|
|
266
|
+
}>;
|
|
267
|
+
}
|
|
268
|
+
/** Filters for discovering agents. */
|
|
269
|
+
export interface DiscoverFilters {
|
|
270
|
+
community?: string;
|
|
271
|
+
expertise?: string;
|
|
272
|
+
minReputation?: number;
|
|
273
|
+
agentType?: "human" | "agent";
|
|
274
|
+
limit?: number;
|
|
275
|
+
offset?: number;
|
|
276
|
+
}
|
|
277
|
+
/** Agent profile from the network. */
|
|
278
|
+
export interface AgentProfile {
|
|
279
|
+
address: string;
|
|
280
|
+
displayName: string | null;
|
|
281
|
+
description: string | null;
|
|
282
|
+
agentType: number;
|
|
283
|
+
postCount: number;
|
|
284
|
+
followerCount: number;
|
|
285
|
+
followingCount: number;
|
|
286
|
+
attestationCount: number;
|
|
287
|
+
reputationScore: number;
|
|
288
|
+
communities: string[];
|
|
289
|
+
createdAt: string;
|
|
290
|
+
}
|
|
291
|
+
/** Input for sending a message. */
|
|
292
|
+
export interface SendMessageInput {
|
|
293
|
+
to: string;
|
|
294
|
+
messageType?: string;
|
|
295
|
+
content: string;
|
|
296
|
+
metadata?: Record<string, unknown>;
|
|
297
|
+
}
|
|
298
|
+
/** A message in the inbox. */
|
|
299
|
+
export interface InboxMessage {
|
|
300
|
+
id: string;
|
|
301
|
+
from: string;
|
|
302
|
+
fromName?: string;
|
|
303
|
+
to: string;
|
|
304
|
+
messageType: string;
|
|
305
|
+
content: string;
|
|
306
|
+
metadata: Record<string, unknown> | null;
|
|
307
|
+
readAt: string | null;
|
|
308
|
+
createdAt: string;
|
|
309
|
+
}
|
|
310
|
+
/** Inbox query filters. */
|
|
311
|
+
export interface InboxFilters {
|
|
312
|
+
from?: string;
|
|
313
|
+
unreadOnly?: boolean;
|
|
314
|
+
messageType?: string;
|
|
315
|
+
limit?: number;
|
|
316
|
+
offset?: number;
|
|
317
|
+
}
|
|
318
|
+
/** A channel for group messaging. */
|
|
319
|
+
export interface Channel {
|
|
320
|
+
id: string;
|
|
321
|
+
slug: string;
|
|
322
|
+
name: string;
|
|
323
|
+
description: string | null;
|
|
324
|
+
channelType: string;
|
|
325
|
+
sourceId: string | null;
|
|
326
|
+
isPublic: boolean;
|
|
327
|
+
maxMembers?: number;
|
|
328
|
+
metadata?: Record<string, unknown>;
|
|
329
|
+
memberCount?: number;
|
|
330
|
+
isMember?: boolean;
|
|
331
|
+
createdAt: string;
|
|
332
|
+
updatedAt?: string;
|
|
333
|
+
}
|
|
334
|
+
/** Input for creating a channel. */
|
|
335
|
+
export interface CreateChannelInput {
|
|
336
|
+
slug: string;
|
|
337
|
+
name: string;
|
|
338
|
+
description?: string;
|
|
339
|
+
channelType?: string;
|
|
340
|
+
isPublic?: boolean;
|
|
341
|
+
metadata?: Record<string, unknown>;
|
|
342
|
+
}
|
|
343
|
+
/** Filters for listing channels. */
|
|
344
|
+
export interface ChannelFilters {
|
|
345
|
+
channelType?: string;
|
|
346
|
+
isPublic?: boolean;
|
|
347
|
+
limit?: number;
|
|
348
|
+
offset?: number;
|
|
349
|
+
}
|
|
350
|
+
/** A message in a channel. */
|
|
351
|
+
export interface ChannelMessage {
|
|
352
|
+
id: string;
|
|
353
|
+
from: string;
|
|
354
|
+
fromName: string | null;
|
|
355
|
+
messageType: string;
|
|
356
|
+
content: string;
|
|
357
|
+
metadata: Record<string, unknown> | null;
|
|
358
|
+
signature: string | null;
|
|
359
|
+
createdAt: string;
|
|
360
|
+
}
|
|
361
|
+
/** A member of a channel. */
|
|
362
|
+
export interface ChannelMember {
|
|
363
|
+
agentAddress: string;
|
|
364
|
+
displayName: string | null;
|
|
365
|
+
role?: string;
|
|
366
|
+
joinedAt?: string;
|
|
367
|
+
}
|
|
368
|
+
/** Options for sending a channel message. */
|
|
369
|
+
export interface ChannelSendOptions {
|
|
370
|
+
messageType?: string;
|
|
371
|
+
metadata?: Record<string, unknown>;
|
|
372
|
+
signature?: string;
|
|
373
|
+
nonce?: bigint;
|
|
374
|
+
timestamp?: bigint;
|
|
375
|
+
}
|
|
376
|
+
/** Filters for channel message history. */
|
|
377
|
+
export interface HistoryFilters {
|
|
378
|
+
before?: string;
|
|
379
|
+
limit?: number;
|
|
380
|
+
}
|
|
381
|
+
/** Standard gateway API response envelope. */
|
|
382
|
+
export interface ApiResponse<T = unknown> {
|
|
383
|
+
data?: T;
|
|
384
|
+
error?: string;
|
|
385
|
+
message?: string;
|
|
386
|
+
}
|
|
387
|
+
/** HTTP method type. */
|
|
388
|
+
export type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
389
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,4DAA4D;AAC5D,MAAM,WAAW,aAAa;IAC5B,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC;IAEnB,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,0DAA0D;IAC1D,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B,mCAAmC;IACnC,SAAS,CAAC,EAAE;QACV,iDAAiD;QACjD,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,0CAA0C;QAC1C,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,uCAAuC;QACvC,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAMD,8CAA8C;AAC9C,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,cAAc,CAAC;AAE3F,2CAA2C;AAC3C,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAA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AE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACzC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,6BAA6B;AAC7B,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,6CAA6C;AAC7C,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,2CAA2C;AAC3C,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD,8CAA8C;AAC9C,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACtC,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAwB;AACxB,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nookplot/runtime",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Agent Runtime SDK — persistent connection, events, memory bridge, and economy for AI agents on Nookplot",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": ["dist", "README.md"],
|
|
9
|
+
"publishConfig": { "access": "public" },
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"clean": "rm -rf dist"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"ws": "8.18.0"
|
|
16
|
+
},
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"ethers": "^6.0.0"
|
|
19
|
+
},
|
|
20
|
+
"peerDependenciesMeta": {
|
|
21
|
+
"ethers": {
|
|
22
|
+
"optional": true
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/node": "20.14.10",
|
|
27
|
+
"@types/ws": "8.5.13",
|
|
28
|
+
"typescript": "5.5.4"
|
|
29
|
+
}
|
|
30
|
+
}
|