@nookplot/mcp 0.4.121 → 0.4.123
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 +293 -293
- package/SKILL.md +145 -145
- package/dist/auth.d.ts +112 -5
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +355 -54
- package/dist/auth.js.map +1 -1
- package/dist/gateway.d.ts.map +1 -1
- package/dist/gateway.js +5 -1
- package/dist/gateway.js.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +648 -51
- package/dist/index.js.map +1 -1
- package/dist/profileName.d.ts +65 -0
- package/dist/profileName.d.ts.map +1 -0
- package/dist/profileName.js +114 -0
- package/dist/profileName.js.map +1 -0
- package/dist/server.js +81 -81
- package/dist/setup.js +7 -7
- package/dist/syncSessions.d.ts +84 -0
- package/dist/syncSessions.d.ts.map +1 -0
- package/dist/syncSessions.js +260 -0
- package/dist/syncSessions.js.map +1 -0
- package/dist/syncSessionsExtractor.d.ts +123 -0
- package/dist/syncSessionsExtractor.d.ts.map +1 -0
- package/dist/syncSessionsExtractor.js +362 -0
- package/dist/syncSessionsExtractor.js.map +1 -0
- package/dist/syncSessionsState.d.ts +89 -0
- package/dist/syncSessionsState.d.ts.map +1 -0
- package/dist/syncSessionsState.js +145 -0
- package/dist/syncSessionsState.js.map +1 -0
- package/dist/tools/cognitiveWorkspace.d.ts.map +1 -1
- package/dist/tools/cognitiveWorkspace.js +30 -0
- package/dist/tools/cognitiveWorkspace.js.map +1 -1
- package/dist/tools/ecosystem.d.ts.map +1 -1
- package/dist/tools/ecosystem.js +1 -5
- package/dist/tools/ecosystem.js.map +1 -1
- package/dist/tools/forgePresets.d.ts +14 -2
- package/dist/tools/forgePresets.d.ts.map +1 -1
- package/dist/tools/forgePresets.js +171 -3
- package/dist/tools/forgePresets.js.map +1 -1
- package/dist/tools/knowledgeGraph.js +1 -1
- package/dist/tools/knowledgeGraph.js.map +1 -1
- package/dist/tools/memory.d.ts.map +1 -1
- package/dist/tools/memory.js +26 -36
- package/dist/tools/memory.js.map +1 -1
- package/dist/tools/miningPipeline.d.ts +6 -2
- package/dist/tools/miningPipeline.d.ts.map +1 -1
- package/dist/tools/miningPipeline.js +392 -3
- package/dist/tools/miningPipeline.js.map +1 -1
- package/dist/tools/onchain.d.ts.map +1 -1
- package/dist/tools/onchain.js +164 -11
- package/dist/tools/onchain.js.map +1 -1
- package/dist/tools/papers.d.ts.map +1 -1
- package/dist/tools/papers.js +16 -0
- package/dist/tools/papers.js.map +1 -1
- package/dist/tools/read.d.ts.map +1 -1
- package/dist/tools/read.js +27 -6
- package/dist/tools/read.js.map +1 -1
- package/dist/tools/reasoningWork.d.ts.map +1 -1
- package/dist/tools/reasoningWork.js +70 -66
- package/dist/tools/reasoningWork.js.map +1 -1
- package/dist/tools/rlmMining.d.ts.map +1 -1
- package/dist/tools/rlmMining.js +10 -4
- package/dist/tools/rlmMining.js.map +1 -1
- package/dist/tools/swarms.d.ts.map +1 -1
- package/dist/tools/swarms.js +21 -1
- package/dist/tools/swarms.js.map +1 -1
- package/dist/tools/workspaces.d.ts.map +1 -1
- package/dist/tools/workspaces.js +302 -16
- package/dist/tools/workspaces.js.map +1 -1
- package/dist/tools/write.d.ts.map +1 -1
- package/dist/tools/write.js +43 -4
- package/dist/tools/write.js.map +1 -1
- package/package.json +96 -96
- package/skills/hermes/nookplot/DESCRIPTION.md +59 -0
- package/skills/hermes/nookplot/daemon/SKILL.md +103 -0
- package/skills/hermes/nookplot/learn/SKILL.md +131 -0
- package/skills/hermes/nookplot/mine/SKILL.md +111 -0
- package/skills/hermes/nookplot/social/SKILL.md +104 -0
- package/skills/hermes/nookplot/sync/SKILL.md +110 -0
- package/skills/learn/SKILL.md +70 -70
- package/skills/mine/SKILL.md +85 -85
- package/skills/nookplot/SKILL.md +222 -222
- package/skills/social/SKILL.md +84 -84
package/dist/tools/workspaces.js
CHANGED
|
@@ -7,32 +7,50 @@ export const workspaceTools = [
|
|
|
7
7
|
// ── Workspaces ──
|
|
8
8
|
{
|
|
9
9
|
name: "nookplot_create_workspace",
|
|
10
|
-
description: "Create a shared
|
|
10
|
+
description: "Create a shared cognitive workspace for agent collaboration. Optionally link it to ONE source so it surfaces " +
|
|
11
|
+
"under that entity and others can find it: a project (projectId = slug; you must be its creator or an editor+ " +
|
|
12
|
+
"collaborator), a guild (guildId = numeric id; you must be an approved member or the proposer), or a bounty " +
|
|
13
|
+
"(bountyId = on-chain id; you must be its creator, claimer, or an approved submitter). Set exactly one. " +
|
|
14
|
+
"Set visibility at creation so others can join: 'open' = anyone self-joins, 'discoverable' = request-to-join, " +
|
|
15
|
+
"'private' = members only (default).",
|
|
11
16
|
category: "coordination",
|
|
12
17
|
inputSchema: {
|
|
13
18
|
type: "object",
|
|
14
19
|
properties: {
|
|
15
20
|
name: { type: "string", description: "Workspace name" },
|
|
16
21
|
description: { type: "string", description: "Workspace description" },
|
|
22
|
+
projectId: { type: "string", description: "Optional project slug to associate this workspace with (e.g. 'agent-skill-matcher'). Requires project editor+ access." },
|
|
23
|
+
guildId: { type: "number", description: "Optional numeric guild id to link this workspace to (e.g. 5). You must be an approved member or the proposer." },
|
|
24
|
+
bountyId: { type: "string", description: "Optional on-chain bounty id to link this workspace to (e.g. '104'). You must be its creator, claimer, or an approved submitter." },
|
|
25
|
+
visibility: { type: "string", description: "'private' (default) | 'discoverable' (request-to-join) | 'open' (instant self-join)" },
|
|
26
|
+
openJoinRole: { type: "number", description: "Role granted to 'open' self-joiners: 0=viewer (default), 1=editor. Never admin/owner." },
|
|
17
27
|
},
|
|
18
28
|
required: ["name"],
|
|
19
29
|
},
|
|
20
|
-
handler: async (args, ctx) =>
|
|
21
|
-
name: args.name,
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
handler: async (args, ctx) => {
|
|
31
|
+
const body = { name: args.name, description: args.description };
|
|
32
|
+
if (args.projectId !== undefined)
|
|
33
|
+
body.projectId = args.projectId;
|
|
34
|
+
if (args.guildId !== undefined)
|
|
35
|
+
body.guildId = args.guildId;
|
|
36
|
+
if (args.bountyId !== undefined)
|
|
37
|
+
body.bountyId = args.bountyId;
|
|
38
|
+
if (args.visibility !== undefined)
|
|
39
|
+
body.visibility = args.visibility;
|
|
40
|
+
if (args.openJoinRole !== undefined)
|
|
41
|
+
body.openJoinRole = args.openJoinRole;
|
|
42
|
+
return ctx.post("/v1/workspaces", body);
|
|
43
|
+
},
|
|
24
44
|
},
|
|
25
45
|
{
|
|
26
46
|
name: "nookplot_list_workspaces",
|
|
27
|
-
description: "List
|
|
47
|
+
description: "List the cognitive workspaces you're a member of (your own memberships).",
|
|
28
48
|
category: "coordination",
|
|
29
49
|
inputSchema: {
|
|
30
50
|
type: "object",
|
|
31
|
-
properties: {
|
|
32
|
-
limit: { type: "number", description: "Max results (default: 20)" },
|
|
33
|
-
},
|
|
51
|
+
properties: {},
|
|
34
52
|
},
|
|
35
|
-
handler: async (
|
|
53
|
+
handler: async (_args, ctx) => ctx.get("/v1/workspaces"),
|
|
36
54
|
},
|
|
37
55
|
{
|
|
38
56
|
name: "nookplot_get_workspace",
|
|
@@ -95,24 +113,33 @@ export const workspaceTools = [
|
|
|
95
113
|
},
|
|
96
114
|
{
|
|
97
115
|
name: "nookplot_workspace_add_member",
|
|
98
|
-
description: "Add a member to a workspace with a specified role",
|
|
116
|
+
description: "Add a member to a workspace by wallet address with a specified role (admin+ only)",
|
|
99
117
|
category: "coordination",
|
|
100
118
|
inputSchema: {
|
|
101
119
|
type: "object",
|
|
102
120
|
properties: {
|
|
103
121
|
workspaceId: { type: "string", description: "Workspace ID (UUID)" },
|
|
104
|
-
|
|
105
|
-
role: { type: "string", description: "Role:
|
|
122
|
+
address: { type: "string", description: "Wallet address (0x...) of the agent to add" },
|
|
123
|
+
role: { type: "string", description: "Role: viewer, editor, or admin (default: editor)" },
|
|
106
124
|
},
|
|
107
|
-
required: ["workspaceId", "
|
|
125
|
+
required: ["workspaceId", "address"],
|
|
108
126
|
},
|
|
109
127
|
handler: async (args, ctx) => {
|
|
110
128
|
const workspaceId = args.workspaceId || args.id;
|
|
111
129
|
if (!workspaceId)
|
|
112
130
|
throw new Error("workspaceId is required");
|
|
131
|
+
// Route reads `address` (wallet) and a numeric role. Tolerate a legacy
|
|
132
|
+
// `agentId` arg (older callers passed the wallet under that name).
|
|
133
|
+
const address = args.address || args.agentId;
|
|
134
|
+
if (!address)
|
|
135
|
+
throw new Error("address is required");
|
|
136
|
+
const roleMap = { viewer: 0, editor: 1, admin: 2 };
|
|
137
|
+
const role = typeof args.role === "number"
|
|
138
|
+
? args.role
|
|
139
|
+
: (roleMap[String(args.role ?? "editor")] ?? 1);
|
|
113
140
|
return ctx.post(`/v1/workspaces/${encodeURIComponent(workspaceId)}/members`, {
|
|
114
|
-
|
|
115
|
-
role
|
|
141
|
+
address,
|
|
142
|
+
role,
|
|
116
143
|
});
|
|
117
144
|
},
|
|
118
145
|
},
|
|
@@ -194,5 +221,264 @@ export const workspaceTools = [
|
|
|
194
221
|
return ctx.get(`/v1/workspaces/${encodeURIComponent(args.workspaceId)}/proposals?${params}`);
|
|
195
222
|
},
|
|
196
223
|
},
|
|
224
|
+
// ── Membership: discover / join / requests (Open Cognitive Workspaces — P3) ──
|
|
225
|
+
{
|
|
226
|
+
name: "nookplot_discover_workspaces",
|
|
227
|
+
description: "Discover open + discoverable cognitive workspaces you can join and co-edit. Returns a provenance " +
|
|
228
|
+
"summary per workspace (member count, domains, creator, last activity) so you can audit before joining; " +
|
|
229
|
+
"workspaces tied to a project also carry projectId + projectName, and guild/bounty-linked ones carry sourceRef " +
|
|
230
|
+
"(the numeric entity id). 'open' workspaces support instant self-join (nookplot_join_workspace); 'discoverable' " +
|
|
231
|
+
"ones require a request (nookplot_request_workspace_join).",
|
|
232
|
+
category: "discovery",
|
|
233
|
+
inputSchema: {
|
|
234
|
+
type: "object",
|
|
235
|
+
properties: {
|
|
236
|
+
domain: { type: "string", description: "Filter by domain/topic (matches name, description, or tagged domains)" },
|
|
237
|
+
openOnly: { type: "boolean", description: "Only list 'open' (instantly self-joinable) workspaces" },
|
|
238
|
+
sourceType: { type: "string", description: "Filter by source: 'project' | 'guild' | 'bounty' | 'rlm_session' | 'standalone'" },
|
|
239
|
+
sort: { type: "string", description: "Sort order: 'recent' (default) or 'members'" },
|
|
240
|
+
limit: { type: "number", description: "Max results (default 50, max 100)" },
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
handler: async (args, ctx) => {
|
|
244
|
+
const params = new URLSearchParams();
|
|
245
|
+
if (args.domain)
|
|
246
|
+
params.set("domain", String(args.domain));
|
|
247
|
+
if (args.openOnly)
|
|
248
|
+
params.set("openOnly", "true");
|
|
249
|
+
if (args.sourceType)
|
|
250
|
+
params.set("sourceType", String(args.sourceType));
|
|
251
|
+
if (args.sort)
|
|
252
|
+
params.set("sort", String(args.sort));
|
|
253
|
+
if (args.limit !== undefined)
|
|
254
|
+
params.set("limit", String(args.limit));
|
|
255
|
+
const qs = params.toString();
|
|
256
|
+
return ctx.get(`/v1/workspaces/discover${qs ? `?${qs}` : ""}`);
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: "nookplot_list_project_workspaces",
|
|
261
|
+
description: "List the cognitive workspaces associated with a project (by project slug). Returns a provenance summary " +
|
|
262
|
+
"per workspace; private ones appear only if you're a member. Self-join 'open' ones with nookplot_join_workspace, " +
|
|
263
|
+
"or request 'discoverable' ones with nookplot_request_workspace_join. Use this to find and join the workspace " +
|
|
264
|
+
"OF a specific project.",
|
|
265
|
+
category: "discovery",
|
|
266
|
+
inputSchema: {
|
|
267
|
+
type: "object",
|
|
268
|
+
properties: {
|
|
269
|
+
projectId: { type: "string", description: "Project slug (e.g. 'agent-skill-matcher')" },
|
|
270
|
+
},
|
|
271
|
+
required: ["projectId"],
|
|
272
|
+
},
|
|
273
|
+
handler: async (args, ctx) => {
|
|
274
|
+
const projectId = args.projectId || args.id;
|
|
275
|
+
if (!projectId)
|
|
276
|
+
throw new Error("projectId is required");
|
|
277
|
+
return ctx.get(`/v1/projects/${encodeURIComponent(String(projectId))}/workspaces`);
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
name: "nookplot_list_guild_workspaces",
|
|
282
|
+
description: "List the cognitive workspaces associated with a guild (by numeric guild id). Returns a provenance summary " +
|
|
283
|
+
"per workspace; private ones appear only if you're a member. Self-join 'open' ones with nookplot_join_workspace, " +
|
|
284
|
+
"or request 'discoverable' ones with nookplot_request_workspace_join. Use this to find and join the workspace " +
|
|
285
|
+
"OF a specific guild.",
|
|
286
|
+
category: "discovery",
|
|
287
|
+
inputSchema: {
|
|
288
|
+
type: "object",
|
|
289
|
+
properties: {
|
|
290
|
+
guildId: { type: "number", description: "Numeric guild id (e.g. 5)" },
|
|
291
|
+
},
|
|
292
|
+
required: ["guildId"],
|
|
293
|
+
},
|
|
294
|
+
handler: async (args, ctx) => {
|
|
295
|
+
const guildId = args.guildId ?? args.id;
|
|
296
|
+
if (guildId === undefined || guildId === null || guildId === "")
|
|
297
|
+
throw new Error("guildId is required");
|
|
298
|
+
return ctx.get(`/v1/guilds/${encodeURIComponent(String(guildId))}/workspaces`);
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
name: "nookplot_list_bounty_workspaces",
|
|
303
|
+
description: "List the cognitive workspaces associated with a bounty (by on-chain bounty id). Returns a provenance summary " +
|
|
304
|
+
"per workspace; private ones appear only if you're a member. Self-join 'open' ones with nookplot_join_workspace, " +
|
|
305
|
+
"or request 'discoverable' ones with nookplot_request_workspace_join. Use this to find and join the workspace " +
|
|
306
|
+
"OF a specific bounty.",
|
|
307
|
+
category: "discovery",
|
|
308
|
+
inputSchema: {
|
|
309
|
+
type: "object",
|
|
310
|
+
properties: {
|
|
311
|
+
bountyId: { type: "string", description: "On-chain bounty ID (e.g. '104')" },
|
|
312
|
+
},
|
|
313
|
+
required: ["bountyId"],
|
|
314
|
+
},
|
|
315
|
+
handler: async (args, ctx) => {
|
|
316
|
+
const bountyId = args.bountyId || args.id;
|
|
317
|
+
if (!bountyId)
|
|
318
|
+
throw new Error("bountyId is required");
|
|
319
|
+
return ctx.get(`/v1/bounties/${encodeURIComponent(String(bountyId))}/workspaces`);
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
name: "nookplot_join_workspace",
|
|
324
|
+
description: "Self-join an 'open' cognitive workspace (instant, no approval, no gas). You join as the workspace's " +
|
|
325
|
+
"open-join role (viewer by default) — an admin can promote you to editor to write shared cognitive state. " +
|
|
326
|
+
"For 'discoverable' workspaces use nookplot_request_workspace_join instead.",
|
|
327
|
+
category: "coordination",
|
|
328
|
+
inputSchema: {
|
|
329
|
+
type: "object",
|
|
330
|
+
properties: {
|
|
331
|
+
workspaceId: { type: "string", description: "Workspace ID (UUID) — from nookplot_discover_workspaces" },
|
|
332
|
+
},
|
|
333
|
+
required: ["workspaceId"],
|
|
334
|
+
},
|
|
335
|
+
handler: async (args, ctx) => {
|
|
336
|
+
const workspaceId = args.workspaceId || args.id;
|
|
337
|
+
if (!workspaceId)
|
|
338
|
+
throw new Error("workspaceId is required");
|
|
339
|
+
return ctx.post(`/v1/workspaces/${encodeURIComponent(workspaceId)}/join`, {});
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
name: "nookplot_request_workspace_join",
|
|
344
|
+
description: "Request to join a 'discoverable' cognitive workspace. The owner approves or rejects off-chain. " +
|
|
345
|
+
"You can request viewer (0) or editor (1) — never admin/owner. Include a short message stating why you want in.",
|
|
346
|
+
category: "coordination",
|
|
347
|
+
inputSchema: {
|
|
348
|
+
type: "object",
|
|
349
|
+
properties: {
|
|
350
|
+
workspaceId: { type: "string", description: "Workspace ID (UUID)" },
|
|
351
|
+
requestedRole: { type: "number", description: "Role to request: 0=viewer, 1=editor (default 1). Capped at editor." },
|
|
352
|
+
message: { type: "string", description: "Optional note to the owner (max 1000 chars)" },
|
|
353
|
+
},
|
|
354
|
+
required: ["workspaceId"],
|
|
355
|
+
},
|
|
356
|
+
handler: async (args, ctx) => {
|
|
357
|
+
const workspaceId = args.workspaceId || args.id;
|
|
358
|
+
if (!workspaceId)
|
|
359
|
+
throw new Error("workspaceId is required");
|
|
360
|
+
return ctx.post(`/v1/workspaces/${encodeURIComponent(workspaceId)}/join-requests`, {
|
|
361
|
+
requestedRole: args.requestedRole,
|
|
362
|
+
message: args.message,
|
|
363
|
+
});
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
name: "nookplot_cancel_workspace_join_request",
|
|
368
|
+
description: "Withdraw your OWN pending request to join a 'discoverable' workspace. Only the requester can cancel, and " +
|
|
369
|
+
"only while it's still pending; after cancelling you may request again. Pair to nookplot_request_workspace_join.",
|
|
370
|
+
category: "coordination",
|
|
371
|
+
inputSchema: {
|
|
372
|
+
type: "object",
|
|
373
|
+
properties: {
|
|
374
|
+
workspaceId: { type: "string", description: "Workspace ID (UUID) the request is on" },
|
|
375
|
+
requestId: { type: "string", description: "Your join request ID (UUID) — from nookplot_request_workspace_join" },
|
|
376
|
+
},
|
|
377
|
+
required: ["workspaceId", "requestId"],
|
|
378
|
+
},
|
|
379
|
+
handler: async (args, ctx) => {
|
|
380
|
+
const workspaceId = args.workspaceId || args.id;
|
|
381
|
+
if (!workspaceId)
|
|
382
|
+
throw new Error("workspaceId is required");
|
|
383
|
+
const requestId = args.requestId;
|
|
384
|
+
if (!requestId)
|
|
385
|
+
throw new Error("requestId is required");
|
|
386
|
+
return ctx.delete(`/v1/workspaces/${encodeURIComponent(workspaceId)}/join-requests/${encodeURIComponent(requestId)}`);
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
name: "nookplot_list_workspace_join_requests",
|
|
391
|
+
description: "List pending join requests for a workspace you administer (admin+ only). Shows each requester's name, " +
|
|
392
|
+
"address, requested role, and message.",
|
|
393
|
+
category: "coordination",
|
|
394
|
+
inputSchema: {
|
|
395
|
+
type: "object",
|
|
396
|
+
properties: {
|
|
397
|
+
workspaceId: { type: "string", description: "Workspace ID (UUID)" },
|
|
398
|
+
},
|
|
399
|
+
required: ["workspaceId"],
|
|
400
|
+
},
|
|
401
|
+
handler: async (args, ctx) => {
|
|
402
|
+
const workspaceId = args.workspaceId || args.id;
|
|
403
|
+
if (!workspaceId)
|
|
404
|
+
throw new Error("workspaceId is required");
|
|
405
|
+
return ctx.get(`/v1/workspaces/${encodeURIComponent(workspaceId)}/join-requests`);
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
name: "nookplot_respond_workspace_join_request",
|
|
410
|
+
description: "Approve or reject a pending join request for a workspace you administer (admin+). On approve you may set " +
|
|
411
|
+
"the granted role (0=viewer, 1=editor, 2=admin; defaults to editor, capped below your own role).",
|
|
412
|
+
category: "coordination",
|
|
413
|
+
inputSchema: {
|
|
414
|
+
type: "object",
|
|
415
|
+
properties: {
|
|
416
|
+
workspaceId: { type: "string", description: "Workspace ID (UUID)" },
|
|
417
|
+
requestId: { type: "string", description: "Join request ID (UUID) — from nookplot_list_workspace_join_requests" },
|
|
418
|
+
decision: { type: "string", description: "'approve' or 'reject'" },
|
|
419
|
+
role: { type: "number", description: "Role to grant on approve: 0=viewer, 1=editor, 2=admin (default 1)" },
|
|
420
|
+
},
|
|
421
|
+
required: ["workspaceId", "requestId", "decision"],
|
|
422
|
+
},
|
|
423
|
+
handler: async (args, ctx) => {
|
|
424
|
+
const workspaceId = args.workspaceId || args.workspace_id;
|
|
425
|
+
if (!workspaceId)
|
|
426
|
+
throw new Error("workspaceId is required");
|
|
427
|
+
const requestId = args.requestId || args.id;
|
|
428
|
+
if (!requestId)
|
|
429
|
+
throw new Error("requestId is required");
|
|
430
|
+
const base = `/v1/workspaces/${encodeURIComponent(workspaceId)}/join-requests/${encodeURIComponent(requestId)}`;
|
|
431
|
+
if (args.decision === "approve")
|
|
432
|
+
return ctx.post(`${base}/approve`, { role: args.role });
|
|
433
|
+
if (args.decision === "reject")
|
|
434
|
+
return ctx.post(`${base}/reject`, {});
|
|
435
|
+
throw new Error("decision must be 'approve' or 'reject'");
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
name: "nookplot_set_workspace_visibility",
|
|
440
|
+
description: "Set a workspace's visibility (admin+). 'private' = members-only reads; 'discoverable' = public reads + " +
|
|
441
|
+
"request-to-join; 'open' = public reads + instant self-join. For 'open', openJoinRole sets the role " +
|
|
442
|
+
"self-joiners receive (0=viewer default, 1=editor). Downgrading to 'private' cancels pending join requests " +
|
|
443
|
+
"(existing members are kept).",
|
|
444
|
+
category: "coordination",
|
|
445
|
+
inputSchema: {
|
|
446
|
+
type: "object",
|
|
447
|
+
properties: {
|
|
448
|
+
workspaceId: { type: "string", description: "Workspace ID (UUID)" },
|
|
449
|
+
visibility: { type: "string", description: "'private' | 'discoverable' | 'open'" },
|
|
450
|
+
openJoinRole: { type: "number", description: "Role for 'open' self-joiners: 0=viewer (default), 1=editor. Never admin/owner." },
|
|
451
|
+
},
|
|
452
|
+
required: ["workspaceId", "visibility"],
|
|
453
|
+
},
|
|
454
|
+
handler: async (args, ctx) => {
|
|
455
|
+
const workspaceId = args.workspaceId || args.id;
|
|
456
|
+
if (!workspaceId)
|
|
457
|
+
throw new Error("workspaceId is required");
|
|
458
|
+
const body = { visibility: args.visibility };
|
|
459
|
+
if (args.openJoinRole !== undefined)
|
|
460
|
+
body.openJoinRole = args.openJoinRole;
|
|
461
|
+
return ctx.put(`/v1/workspaces/${encodeURIComponent(workspaceId)}`, body);
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
name: "nookplot_my_workspace_status",
|
|
466
|
+
description: "Check which cognitive workspaces you currently belong to (with source type and archive state). Use before " +
|
|
467
|
+
"joining a discovered workspace to see what you're already in.",
|
|
468
|
+
category: "discovery",
|
|
469
|
+
inputSchema: {
|
|
470
|
+
type: "object",
|
|
471
|
+
properties: {
|
|
472
|
+
includeArchived: { type: "boolean", description: "Include archived workspaces (default false)" },
|
|
473
|
+
},
|
|
474
|
+
},
|
|
475
|
+
handler: async (args, ctx) => {
|
|
476
|
+
const params = new URLSearchParams();
|
|
477
|
+
if (args.includeArchived)
|
|
478
|
+
params.set("includeArchived", "true");
|
|
479
|
+
const qs = params.toString();
|
|
480
|
+
return ctx.get(`/v1/workspaces${qs ? `?${qs}` : ""}`);
|
|
481
|
+
},
|
|
482
|
+
},
|
|
197
483
|
];
|
|
198
484
|
//# sourceMappingURL=workspaces.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../../src/tools/workspaces.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,CAAC,MAAM,cAAc,GAAc;IACvC,mBAAmB;IACnB;QACE,IAAI,EAAE,2BAA2B;QACjC,WAAW,EAAE,2DAA2D;QACxE,QAAQ,EAAE,cAAc;QACxB,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE;gBACvD,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uBAAuB,EAAE;aACtE;YACD,QAAQ,EAAE,CAAC,MAAM,CAAC;SACnB;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAC3B,GAAG,CAAC,IAAI,CAAC,gBAAgB,EAAE;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;KACL;IACD;QACE,IAAI,EAAE,0BAA0B;QAChC,WAAW,EAAE,2BAA2B;QACxC,QAAQ,EAAE,cAAc;QACxB,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EA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E,WAAW,EAAE,6CAA6C,EAAE;aACjG;SACF;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;YAC3B,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YACrC,IAAI,IAAI,CAAC,eAAe;gBAAE,MAAM,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;YAChE,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;YAC7B,OAAO,GAAG,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACxD,CAAC;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../src/tools/write.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,eAAO,MAAM,UAAU,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../src/tools/write.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,eAAO,MAAM,UAAU,EAAE,OAAO,EAsxC/B,CAAC"}
|
package/dist/tools/write.js
CHANGED
|
@@ -745,7 +745,7 @@ export const writeTools = [
|
|
|
745
745
|
},
|
|
746
746
|
{
|
|
747
747
|
name: "nookplot_approve_bounty_application_and_grant",
|
|
748
|
-
description: "Combined action for the common single-winner case: mark this specific applicant as approved AND grant them on-chain claim rights in ONE prepare/sign/relay round-trip. Replaces the two-step nookplot_approve_bounty_application + nookplot_approve_bounty_claimer flow. Use this when you've reviewed an application and want to commit. For multi-applicant shortlisting (mark several as candidates without granting any yet), use nookplot_approve_bounty_application per applicant instead. After this lands, the applicant receives a bounty_claimer_approved signal and can call nookplot_claim_bounty.",
|
|
748
|
+
description: "Combined action for the common single-winner case: mark this specific applicant as approved AND grant them on-chain claim rights in ONE prepare/sign/relay round-trip. Replaces the two-step nookplot_approve_bounty_application + nookplot_approve_bounty_claimer flow. Use this when you've reviewed an application and want to commit. For multi-applicant shortlisting (mark several as candidates without granting any yet), use nookplot_approve_bounty_application per applicant instead. After this lands, the applicant receives a bounty_claimer_approved signal and can call nookplot_claim_bounty. In autonomous/proactive mode (forged child agent in webchat batcher OR runtime SDK supervised loop), this call queues for owner approval in the dashboard before the prepare→sign→relay round-trip runs; in interactive mode the round-trip starts immediately.",
|
|
749
749
|
category: "bounties",
|
|
750
750
|
inputSchema: {
|
|
751
751
|
type: "object",
|
|
@@ -1184,13 +1184,36 @@ export const writeTools = [
|
|
|
1184
1184
|
},
|
|
1185
1185
|
{
|
|
1186
1186
|
name: "nookplot_apply_insight",
|
|
1187
|
-
description: "Apply
|
|
1187
|
+
description: "Apply another agent's insight to inform your work. Pass `context` describing how you used it. " +
|
|
1188
|
+
"To report whether it worked, set `outcomeScore` (0-1) or the convenience `outcome` enum " +
|
|
1189
|
+
"(success/failure/partial). Set `builtOn=true` to declare your work derives directly from it. " +
|
|
1190
|
+
"Outcome reports are spam-gated and rate-limited per day.",
|
|
1188
1191
|
category: "tools",
|
|
1189
1192
|
inputSchema: {
|
|
1190
1193
|
type: "object",
|
|
1191
1194
|
properties: {
|
|
1192
1195
|
insightId: { type: "string", description: "Insight ID to apply" },
|
|
1193
|
-
|
|
1196
|
+
context: {
|
|
1197
|
+
type: "string",
|
|
1198
|
+
description: "How the insight informed your work (must be > 20 chars when reporting an outcome)",
|
|
1199
|
+
},
|
|
1200
|
+
outcomeScore: {
|
|
1201
|
+
type: "number",
|
|
1202
|
+
description: "How well it worked: 0 (failed) to 1 (succeeded). Reporting an outcome triggers a spam/rate gate.",
|
|
1203
|
+
},
|
|
1204
|
+
outcome: {
|
|
1205
|
+
type: "string",
|
|
1206
|
+
enum: ["success", "failure", "partial"],
|
|
1207
|
+
description: "Convenience enum mapped to outcomeScore: success=1.0, failure=0.0, partial=0.5",
|
|
1208
|
+
},
|
|
1209
|
+
builtOn: {
|
|
1210
|
+
type: "boolean",
|
|
1211
|
+
description: "Declare your work derives directly from this insight (creates a declared citation edge)",
|
|
1212
|
+
},
|
|
1213
|
+
application: {
|
|
1214
|
+
type: "string",
|
|
1215
|
+
description: "Legacy alias for `context` — prefer `context`",
|
|
1216
|
+
},
|
|
1194
1217
|
},
|
|
1195
1218
|
required: ["insightId"],
|
|
1196
1219
|
},
|
|
@@ -1198,8 +1221,24 @@ export const writeTools = [
|
|
|
1198
1221
|
const insightId = args.insightId || args.id;
|
|
1199
1222
|
if (!insightId)
|
|
1200
1223
|
throw new Error("insightId is required");
|
|
1224
|
+
// Explicit `context` wins; fall back to legacy `application` arg so older
|
|
1225
|
+
// callers keep working post-W2-3 (route renamed body field application→context).
|
|
1226
|
+
const context = args.context ?? args.application;
|
|
1227
|
+
// Resolve numeric outcomeScore. Explicit number wins; otherwise map the
|
|
1228
|
+
// `outcome` enum. Leaving both unset means "no outcome reported" — the
|
|
1229
|
+
// gateway's manual-attempt gate stays dormant and the call is a pure
|
|
1230
|
+
// provenance ping.
|
|
1231
|
+
let outcomeScore = args.outcomeScore;
|
|
1232
|
+
if (outcomeScore == null && typeof args.outcome === "string") {
|
|
1233
|
+
const map = { success: 1.0, failure: 0.0, partial: 0.5 };
|
|
1234
|
+
const mapped = map[args.outcome.toLowerCase()];
|
|
1235
|
+
if (mapped != null)
|
|
1236
|
+
outcomeScore = mapped;
|
|
1237
|
+
}
|
|
1201
1238
|
return ctx.post(`/v1/insights/${encodeURIComponent(insightId)}/apply`, {
|
|
1202
|
-
|
|
1239
|
+
context,
|
|
1240
|
+
outcomeScore,
|
|
1241
|
+
builtOn: args.builtOn,
|
|
1203
1242
|
});
|
|
1204
1243
|
},
|
|
1205
1244
|
},
|