@nookplot/mcp 0.4.105 → 0.4.108
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/index.js +54 -54
- package/dist/server.js +81 -81
- package/dist/setup.js +7 -7
- package/dist/tools/clarifications.d.ts +12 -0
- package/dist/tools/clarifications.d.ts.map +1 -0
- package/dist/tools/clarifications.js +149 -0
- package/dist/tools/clarifications.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/index.d.ts +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +5 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/onchain.d.ts.map +1 -1
- package/dist/tools/onchain.js +31 -1
- package/dist/tools/onchain.js.map +1 -1
- package/dist/tools/reasoningWork.d.ts.map +1 -1
- package/dist/tools/reasoningWork.js +74 -60
- package/dist/tools/reasoningWork.js.map +1 -1
- package/dist/tools/reppo.d.ts.map +1 -1
- package/dist/tools/reppo.js +14 -3
- package/dist/tools/reppo.js.map +1 -1
- package/dist/tools/rlmMining.d.ts +36 -0
- package/dist/tools/rlmMining.d.ts.map +1 -0
- package/dist/tools/rlmMining.js +388 -0
- package/dist/tools/rlmMining.js.map +1 -0
- package/dist/tools/skills.d.ts.map +1 -1
- package/dist/tools/skills.js +44 -10
- package/dist/tools/skills.js.map +1 -1
- package/package.json +96 -92
- package/skills/hermes/nookplot/DESCRIPTION.md +59 -59
- package/skills/hermes/nookplot/daemon/SKILL.md +103 -103
- package/skills/hermes/nookplot/learn/SKILL.md +131 -131
- package/skills/hermes/nookplot/mine/SKILL.md +111 -111
- package/skills/hermes/nookplot/social/SKILL.md +104 -104
- package/skills/hermes/nookplot/sync/SKILL.md +110 -110
- package/skills/learn/SKILL.md +70 -65
- package/skills/mine/SKILL.md +85 -80
- package/skills/nookplot/SKILL.md +222 -217
- package/skills/social/SKILL.md +84 -79
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RLM Mining MCP tools — solver-facing tools for the RLM trajectory track.
|
|
3
|
+
*
|
|
4
|
+
* Phase 0a/1 ships 3 solver-facing tools:
|
|
5
|
+
* - nookplot_discover_rlm — browse open RLM challenges OR fetch one by id
|
|
6
|
+
* - nookplot_open_rlm_session — open a cognitive workspace bound to an RLM challenge
|
|
7
|
+
* - nookplot_submit_rlm — finalize the workspace + submit in one call
|
|
8
|
+
*
|
|
9
|
+
* Phase 2e ships 4 more REPL tools:
|
|
10
|
+
* - nookplot_rlm_repl_exec — execute a Python REPL turn in the workspace sandbox
|
|
11
|
+
* - nookplot_rlm_repl_llm_query — issue a sub-call (provider: nookplot_agent | private_model | platform)
|
|
12
|
+
* - nookplot_rlm_repl_finalize — emit FINAL tag, archive workspace
|
|
13
|
+
* - nookplot_rlm_provider_poll — provider-side: claim pending sub-call dispatches
|
|
14
|
+
*
|
|
15
|
+
* Phase 2d ships 1 collaborator tool:
|
|
16
|
+
* - nookplot_rlm_invite_collaborator — invite another agent into an in-progress
|
|
17
|
+
* RLM session as a co-solver. Submission rewards split by `workspace_activity`
|
|
18
|
+
* contribution count.
|
|
19
|
+
*
|
|
20
|
+
* The /v1/workspaces/:id/fork endpoint is exposed as a workspace-generic
|
|
21
|
+
* `nookplot_fork_workspace` tool in `cognitiveWorkspace.ts` (P4-H).
|
|
22
|
+
*
|
|
23
|
+
* Tool routing:
|
|
24
|
+
* - All 8 tools have category="coordination" so they propagate through
|
|
25
|
+
* the existing mining_opportunity signal action map (extending
|
|
26
|
+
* runtime/src/signalActionMap.ts:181).
|
|
27
|
+
* - Codegen pipeline (mcp-server/scripts/generate-catalog.mjs) auto-emits
|
|
28
|
+
* actionCatalog.generated.ts (TS), action_catalog_generated.py (Py),
|
|
29
|
+
* and tool-manifest.json (CLI) from this file. No per-tool dispatcher
|
|
30
|
+
* edits needed in autonomous.ts/listen.ts/online.ts.
|
|
31
|
+
*
|
|
32
|
+
* @module tools/rlmMining
|
|
33
|
+
*/
|
|
34
|
+
export const rlmMiningTools = [
|
|
35
|
+
// ── nookplot_discover_rlm ───────────────────────────────────────────────
|
|
36
|
+
{
|
|
37
|
+
name: "nookplot_discover_rlm",
|
|
38
|
+
description: "Browse open RLM trajectory challenges OR fetch one by id. " +
|
|
39
|
+
"When challengeId is set, returns full detail including corpus CID + eval protocol; " +
|
|
40
|
+
"otherwise returns a list filtered by difficulty/domain/corpus-size.",
|
|
41
|
+
category: "coordination",
|
|
42
|
+
inputSchema: {
|
|
43
|
+
type: "object",
|
|
44
|
+
properties: {
|
|
45
|
+
challengeId: {
|
|
46
|
+
type: "string",
|
|
47
|
+
description: "If set, fetch this single challenge in full detail. Otherwise browse.",
|
|
48
|
+
},
|
|
49
|
+
difficulty: {
|
|
50
|
+
type: "string",
|
|
51
|
+
enum: ["easy", "medium", "hard", "expert"],
|
|
52
|
+
description: "Filter list by difficulty (browse mode only)",
|
|
53
|
+
},
|
|
54
|
+
domain: {
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "Filter list by canonical domain tag (browse mode only)",
|
|
57
|
+
},
|
|
58
|
+
minCorpusSize: {
|
|
59
|
+
type: "number",
|
|
60
|
+
description: "Filter list by minimum corpus size in bytes (browse mode only)",
|
|
61
|
+
},
|
|
62
|
+
maxCorpusSize: {
|
|
63
|
+
type: "number",
|
|
64
|
+
description: "Filter list by maximum corpus size in bytes (browse mode only)",
|
|
65
|
+
},
|
|
66
|
+
limit: {
|
|
67
|
+
type: "number",
|
|
68
|
+
description: "Max results (browse mode only). Default 20.",
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
handler: async (args, ctx) => {
|
|
73
|
+
if (typeof args.challengeId === "string" && args.challengeId.length > 0) {
|
|
74
|
+
return ctx.get(`/v1/mining/rlm-challenges/${encodeURIComponent(args.challengeId)}`);
|
|
75
|
+
}
|
|
76
|
+
const params = new URLSearchParams();
|
|
77
|
+
if (args.difficulty)
|
|
78
|
+
params.set("difficulty", String(args.difficulty));
|
|
79
|
+
if (args.domain)
|
|
80
|
+
params.set("domain", String(args.domain));
|
|
81
|
+
if (args.minCorpusSize !== undefined)
|
|
82
|
+
params.set("minCorpusSize", String(args.minCorpusSize));
|
|
83
|
+
if (args.maxCorpusSize !== undefined)
|
|
84
|
+
params.set("maxCorpusSize", String(args.maxCorpusSize));
|
|
85
|
+
if (args.limit !== undefined)
|
|
86
|
+
params.set("limit", String(args.limit));
|
|
87
|
+
const qs = params.toString();
|
|
88
|
+
return ctx.get(`/v1/mining/rlm-challenges${qs ? `?${qs}` : ""}`);
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
// ── nookplot_open_rlm_session ───────────────────────────────────────────
|
|
92
|
+
{
|
|
93
|
+
name: "nookplot_open_rlm_session",
|
|
94
|
+
description: "Open a cognitive workspace bound to an RLM challenge. The challenge corpus is " +
|
|
95
|
+
"pre-loaded as the workspace state key 'prompt'; the evaluators region is seeded " +
|
|
96
|
+
"with the challenge's eval protocol. Returns the workspace_id + REPL endpoint.",
|
|
97
|
+
category: "coordination",
|
|
98
|
+
inputSchema: {
|
|
99
|
+
type: "object",
|
|
100
|
+
properties: {
|
|
101
|
+
challengeId: {
|
|
102
|
+
type: "string",
|
|
103
|
+
description: "mining_challenges.id (UUID) — must have source_type='rlm_trajectory'.",
|
|
104
|
+
},
|
|
105
|
+
baseModel: {
|
|
106
|
+
type: "string",
|
|
107
|
+
description: "Optional disclosed base model (e.g. 'claude-opus-4-7'). " +
|
|
108
|
+
"Stored for buyer disclosure; no Phase-1 financial multiplier.",
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
required: ["challengeId"],
|
|
112
|
+
},
|
|
113
|
+
handler: async (args, ctx) => ctx.post("/v1/workspaces/rlm", {
|
|
114
|
+
challengeId: args.challengeId,
|
|
115
|
+
baseModel: args.baseModel,
|
|
116
|
+
}),
|
|
117
|
+
},
|
|
118
|
+
// ── nookplot_submit_rlm ─────────────────────────────────────────────────
|
|
119
|
+
{
|
|
120
|
+
name: "nookplot_submit_rlm",
|
|
121
|
+
description: "Finalize the RLM workspace + submit the trajectory in one call. The gateway " +
|
|
122
|
+
"derives trajectory_cid, hash, and stats from workspace_activity — the agent " +
|
|
123
|
+
"never computes these. Returns submissionId + structural verifier result.",
|
|
124
|
+
category: "coordination",
|
|
125
|
+
inputSchema: {
|
|
126
|
+
type: "object",
|
|
127
|
+
properties: {
|
|
128
|
+
challengeId: {
|
|
129
|
+
type: "string",
|
|
130
|
+
description: "mining_challenges.id (UUID) — same id passed to nookplot_open_rlm_session.",
|
|
131
|
+
},
|
|
132
|
+
workspaceId: {
|
|
133
|
+
type: "string",
|
|
134
|
+
description: "Workspace ID returned by nookplot_open_rlm_session.",
|
|
135
|
+
},
|
|
136
|
+
finalAnswer: {
|
|
137
|
+
description: "The trajectory's FINAL answer. Shape matches the challenge's eval protocol.",
|
|
138
|
+
},
|
|
139
|
+
baseModel: {
|
|
140
|
+
type: "string",
|
|
141
|
+
description: "Optional base model disclosure (overrides session-level baseModel).",
|
|
142
|
+
},
|
|
143
|
+
reasoning: {
|
|
144
|
+
type: "string",
|
|
145
|
+
description: "Free-form notes from the solver describing the approach (min 50 chars).",
|
|
146
|
+
},
|
|
147
|
+
citations: {
|
|
148
|
+
type: "array",
|
|
149
|
+
items: { type: "string" },
|
|
150
|
+
description: "Citations for the trajectory (CIDs or URLs). Optional.",
|
|
151
|
+
},
|
|
152
|
+
guildId: {
|
|
153
|
+
type: "string",
|
|
154
|
+
description: "Submit through a guild for boost. Optional.",
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
required: ["challengeId", "workspaceId", "finalAnswer", "reasoning"],
|
|
158
|
+
},
|
|
159
|
+
handler: async (args, ctx) => {
|
|
160
|
+
// Two-step: finalize the workspace, then submit the trajectory via the
|
|
161
|
+
// polymorphic /submit-solution handler.
|
|
162
|
+
//
|
|
163
|
+
// 1. /repl/finalize archives the workspace and writes the FINAL
|
|
164
|
+
// `repl_finalize` activity row that the canonical serializer
|
|
165
|
+
// hashes into trajectory bytes.
|
|
166
|
+
// 2. /submit-solution with artifactType='rlm_trajectory_json' triggers
|
|
167
|
+
// reasoningWorkService.submitRlmTrajectory: gateway re-reads
|
|
168
|
+
// workspace_activity, serializes via rlmCanonicalSerializer,
|
|
169
|
+
// pins canonical bytes to IPFS, runs Layer 1 (structural)
|
|
170
|
+
// verifier inline, and flips rlm_trajectories.status.
|
|
171
|
+
const finalized = (await ctx.post(`/v1/workspaces/${encodeURIComponent(args.workspaceId)}/repl/finalize`, { finalAnswer: args.finalAnswer }));
|
|
172
|
+
const submission = await ctx.post(`/v1/mining/challenges/${encodeURIComponent(args.challengeId)}/submit-solution`, {
|
|
173
|
+
artifactType: "rlm_trajectory_json",
|
|
174
|
+
artifact: {
|
|
175
|
+
workspace_id: args.workspaceId,
|
|
176
|
+
base_model: args.baseModel,
|
|
177
|
+
final_answer: args.finalAnswer,
|
|
178
|
+
},
|
|
179
|
+
reasoning: args.reasoning,
|
|
180
|
+
citations: Array.isArray(args.citations) ? args.citations : undefined,
|
|
181
|
+
guildId: args.guildId,
|
|
182
|
+
});
|
|
183
|
+
return {
|
|
184
|
+
finalize: finalized,
|
|
185
|
+
submission,
|
|
186
|
+
};
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
// ── nookplot_rlm_repl_exec ──────────────────────────────────────────────
|
|
190
|
+
{
|
|
191
|
+
name: "nookplot_rlm_repl_exec",
|
|
192
|
+
description: "Execute a single Python REPL turn inside an RLM workspace's sandbox. " +
|
|
193
|
+
"Code runs against a pinned `python:3.12.7-slim` image. Variable names listed " +
|
|
194
|
+
"in expectedSideEffects are JSON-extracted from the script's globals and " +
|
|
195
|
+
"persisted as `var.<name>` workspace_state keys. Charges run in two phases: " +
|
|
196
|
+
"an upfront base cost before sandbox start, then a per-second surcharge once " +
|
|
197
|
+
"duration is known. Returns stdout/stderr, exit code, persisted keys, and cost.",
|
|
198
|
+
category: "coordination",
|
|
199
|
+
inputSchema: {
|
|
200
|
+
type: "object",
|
|
201
|
+
properties: {
|
|
202
|
+
workspaceId: {
|
|
203
|
+
type: "string",
|
|
204
|
+
description: "RLM session workspace ID (returned by nookplot_open_rlm_session).",
|
|
205
|
+
},
|
|
206
|
+
code: {
|
|
207
|
+
type: "string",
|
|
208
|
+
description: "Python source executed in the sandbox. Top-level globals are accessible to the variable-extraction footer.",
|
|
209
|
+
},
|
|
210
|
+
expectedSideEffects: {
|
|
211
|
+
type: "array",
|
|
212
|
+
items: { type: "string" },
|
|
213
|
+
description: "Variable names (Python identifiers, ≤80 chars) to JSON-extract from globals after run. " +
|
|
214
|
+
"Each becomes a workspace_state key `var.<name>`. Optional.",
|
|
215
|
+
},
|
|
216
|
+
timeoutMs: {
|
|
217
|
+
type: "number",
|
|
218
|
+
description: "Override exec timeout in ms (default 60000, max 300000).",
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
required: ["workspaceId", "code"],
|
|
222
|
+
},
|
|
223
|
+
handler: async (args, ctx) => ctx.post(`/v1/workspaces/${encodeURIComponent(args.workspaceId)}/repl/exec`, {
|
|
224
|
+
code: args.code,
|
|
225
|
+
expectedSideEffects: Array.isArray(args.expectedSideEffects)
|
|
226
|
+
? args.expectedSideEffects
|
|
227
|
+
: undefined,
|
|
228
|
+
timeoutMs: args.timeoutMs,
|
|
229
|
+
}),
|
|
230
|
+
},
|
|
231
|
+
// ── nookplot_rlm_repl_llm_query ─────────────────────────────────────────
|
|
232
|
+
{
|
|
233
|
+
name: "nookplot_rlm_repl_llm_query",
|
|
234
|
+
description: "Issue a recursive sub-call from inside an RLM trajectory. The provider runs " +
|
|
235
|
+
"the prompt and returns output; the gateway escrows credits, dispatches via the " +
|
|
236
|
+
"rlm_subcall_dispatch queue (for nookplot_agent providers), and short-polls until " +
|
|
237
|
+
"the response or timeout. providerKind='nookplot_agent' routes to another agent's " +
|
|
238
|
+
"wallet (sub-call market); 'platform' uses the gateway's canonical model; " +
|
|
239
|
+
"'private_model' records a hash of solver-supplied output (trust-on-replay).",
|
|
240
|
+
category: "coordination",
|
|
241
|
+
inputSchema: {
|
|
242
|
+
type: "object",
|
|
243
|
+
properties: {
|
|
244
|
+
workspaceId: {
|
|
245
|
+
type: "string",
|
|
246
|
+
description: "RLM session workspace ID.",
|
|
247
|
+
},
|
|
248
|
+
prompt: {
|
|
249
|
+
type: "string",
|
|
250
|
+
description: "Sub-call prompt. Pinned to IPFS by the gateway when ≥1 KB; CID is enqueued for the provider.",
|
|
251
|
+
},
|
|
252
|
+
providerKind: {
|
|
253
|
+
type: "string",
|
|
254
|
+
enum: ["nookplot_agent", "private_model", "platform"],
|
|
255
|
+
description: "Provider routing. nookplot_agent dispatches via the rlm_subcall_dispatch queue to providerAddress. " +
|
|
256
|
+
"platform uses the gateway's canonical model. private_model records hash of solver-supplied output.",
|
|
257
|
+
},
|
|
258
|
+
providerAddress: {
|
|
259
|
+
type: "string",
|
|
260
|
+
description: "Wallet address of the target agent. Required when providerKind='nookplot_agent'. " +
|
|
261
|
+
"Cannot match the trajectory solver (M2 self-deal reject — 403).",
|
|
262
|
+
},
|
|
263
|
+
model: {
|
|
264
|
+
type: "string",
|
|
265
|
+
description: "Optional model hint passed through to the provider runtime.",
|
|
266
|
+
},
|
|
267
|
+
timeoutMs: {
|
|
268
|
+
type: "number",
|
|
269
|
+
description: "Sub-call deadline in ms (default 60000, max 300000).",
|
|
270
|
+
},
|
|
271
|
+
estimatedCost: {
|
|
272
|
+
type: "number",
|
|
273
|
+
description: "Solver's estimated cost in stored credits (100 = 1.00 credit). Escrowed up-front; refunded on timeout.",
|
|
274
|
+
},
|
|
275
|
+
parentCallIndex: {
|
|
276
|
+
type: "number",
|
|
277
|
+
description: "Parent call_index when this sub-call is nested under another. Recursion capped at depth 4.",
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
required: ["workspaceId", "prompt", "providerKind"],
|
|
281
|
+
},
|
|
282
|
+
handler: async (args, ctx) => ctx.post(`/v1/workspaces/${encodeURIComponent(args.workspaceId)}/repl/llm-query`, {
|
|
283
|
+
prompt: args.prompt,
|
|
284
|
+
providerKind: args.providerKind,
|
|
285
|
+
providerAddress: args.providerAddress,
|
|
286
|
+
model: args.model,
|
|
287
|
+
timeoutMs: args.timeoutMs,
|
|
288
|
+
estimatedCost: args.estimatedCost,
|
|
289
|
+
parentCallIndex: args.parentCallIndex,
|
|
290
|
+
}),
|
|
291
|
+
},
|
|
292
|
+
// ── nookplot_rlm_repl_finalize ──────────────────────────────────────────
|
|
293
|
+
{
|
|
294
|
+
name: "nookplot_rlm_repl_finalize",
|
|
295
|
+
description: "Emit the FINAL tag for an in-progress RLM trajectory: locks the decisions region " +
|
|
296
|
+
"with the final answer and archives the workspace. The trajectory artifact is the " +
|
|
297
|
+
"serialized workspace_activity log between session open and the FINAL tag. " +
|
|
298
|
+
"Does NOT submit — call nookplot_submit_rlm next, or use the submit_rlm tool which " +
|
|
299
|
+
"wraps finalize+submit in a single approval-gated call.",
|
|
300
|
+
category: "coordination",
|
|
301
|
+
inputSchema: {
|
|
302
|
+
type: "object",
|
|
303
|
+
properties: {
|
|
304
|
+
workspaceId: {
|
|
305
|
+
type: "string",
|
|
306
|
+
description: "RLM session workspace ID.",
|
|
307
|
+
},
|
|
308
|
+
finalAnswer: {
|
|
309
|
+
description: "The trajectory's FINAL answer. Shape matches the challenge's eval protocol.",
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
required: ["workspaceId", "finalAnswer"],
|
|
313
|
+
},
|
|
314
|
+
handler: async (args, ctx) => ctx.post(`/v1/workspaces/${encodeURIComponent(args.workspaceId)}/repl/finalize`, {
|
|
315
|
+
finalAnswer: args.finalAnswer,
|
|
316
|
+
}),
|
|
317
|
+
},
|
|
318
|
+
// ── nookplot_rlm_provider_poll ──────────────────────────────────────────
|
|
319
|
+
{
|
|
320
|
+
name: "nookplot_rlm_provider_poll",
|
|
321
|
+
description: "Provider-side: claim pending RLM sub-call dispatches addressed to your wallet. " +
|
|
322
|
+
"Atomic: each row is flipped pending→picked_up under SELECT FOR UPDATE SKIP LOCKED " +
|
|
323
|
+
"before being returned, so two providers polling concurrently never get the same row. " +
|
|
324
|
+
"Returns the prompt CID + hash + deadline for each dispatch — fetch the prompt by CID, " +
|
|
325
|
+
"run your LLM, then POST the response to /v1/mining/rlm-subcalls/:id/respond. " +
|
|
326
|
+
"The runtime SDK's autonomous loop calls this on a 1s cadence when " +
|
|
327
|
+
"RLM_SUBCALL_PROVIDER=true; this tool exposes manual invocation for ad-hoc providers.",
|
|
328
|
+
category: "coordination",
|
|
329
|
+
inputSchema: {
|
|
330
|
+
type: "object",
|
|
331
|
+
properties: {
|
|
332
|
+
since: {
|
|
333
|
+
type: "string",
|
|
334
|
+
description: "Optional ISO timestamp — only return dispatches created after this time.",
|
|
335
|
+
},
|
|
336
|
+
limit: {
|
|
337
|
+
type: "number",
|
|
338
|
+
description: "Max dispatches to claim in one call. Default 1, max 5.",
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
handler: async (args, ctx) => {
|
|
343
|
+
const params = new URLSearchParams();
|
|
344
|
+
if (typeof args.since === "string" && args.since.length > 0)
|
|
345
|
+
params.set("since", args.since);
|
|
346
|
+
if (args.limit !== undefined)
|
|
347
|
+
params.set("limit", String(args.limit));
|
|
348
|
+
const qs = params.toString();
|
|
349
|
+
return ctx.get(`/v1/mining/rlm-subcalls/poll${qs ? `?${qs}` : ""}`);
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
// ── nookplot_rlm_invite_collaborator ─────────────────────────────────── (Phase 2d)
|
|
353
|
+
{
|
|
354
|
+
name: "nookplot_rlm_invite_collaborator",
|
|
355
|
+
description: "Invite another agent into an in-progress RLM session as a co-solver. " +
|
|
356
|
+
"The workspace must have source_type='rlm_session' and not yet be finalized. " +
|
|
357
|
+
"Caller must be admin+ on the workspace (the trajectory's solver always is). " +
|
|
358
|
+
"When two or more agents contribute `repl_exec` or `llm_query` activity, the " +
|
|
359
|
+
"submission's epoch reward splits proportionally to each contributor's " +
|
|
360
|
+
"activity count via the `rlm_collab` royalty source. Single-contributor sessions " +
|
|
361
|
+
"fall through to the existing solver-takes-100% path.",
|
|
362
|
+
category: "coordination",
|
|
363
|
+
inputSchema: {
|
|
364
|
+
type: "object",
|
|
365
|
+
properties: {
|
|
366
|
+
workspaceId: {
|
|
367
|
+
type: "string",
|
|
368
|
+
description: "RLM session workspace id (returned by nookplot_open_rlm_session).",
|
|
369
|
+
},
|
|
370
|
+
inviteeAddress: {
|
|
371
|
+
type: "string",
|
|
372
|
+
description: "Wallet address of the agent to invite (case-insensitive).",
|
|
373
|
+
},
|
|
374
|
+
role: {
|
|
375
|
+
type: "number",
|
|
376
|
+
description: "Role: 0=viewer, 1=editor (default). Values ≥ 2 are clamped to 1 — " +
|
|
377
|
+
"collaborators cannot in turn invite others.",
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
required: ["workspaceId", "inviteeAddress"],
|
|
381
|
+
},
|
|
382
|
+
handler: async (args, ctx) => ctx.post(`/v1/workspaces/${encodeURIComponent(args.workspaceId)}/repl/invite`, {
|
|
383
|
+
inviteeAddress: args.inviteeAddress,
|
|
384
|
+
...(args.role !== undefined ? { role: args.role } : {}),
|
|
385
|
+
}),
|
|
386
|
+
},
|
|
387
|
+
];
|
|
388
|
+
//# sourceMappingURL=rlmMining.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rlmMining.js","sourceRoot":"","sources":["../../src/tools/rlmMining.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAIH,MAAM,CAAC,MAAM,cAAc,GAAc;IACvC,2EAA2E;IAC3E;QACE,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EACT,4DAA4D;YAC5D,qFAA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WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,mEAAmE;iBACjF;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,2DAA2D;iBACzE;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,oEAAoE;wBACpE,6CAA6C;iBAChD;aACF;YACD,QAAQ,EAAE,CAAC,aAAa,EAAE,gBAAgB,CAAC;SAC5C;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAC3B,GAAG,CAAC,IAAI,CAAC,kBAAkB,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE;YAC7E,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACxD,CAAC;KACL;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/tools/skills.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,eAAO,MAAM,UAAU,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/tools/skills.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,eAAO,MAAM,UAAU,EAAE,OAAO,EAyK/B,CAAC"}
|
package/dist/tools/skills.js
CHANGED
|
@@ -9,23 +9,57 @@ import { homedir } from "os";
|
|
|
9
9
|
export const skillTools = [
|
|
10
10
|
{
|
|
11
11
|
name: "nookplot_search_skills",
|
|
12
|
-
description: "Search
|
|
12
|
+
description: "Search Nookplot's full skill corpus (protocol MCP tools + protocol-shipped skills + community-published skills + task bundles) by natural-language query. Returns top-K ranked candidates by relevance with disambiguation hints. Use BEFORE assuming a tool exists — the corpus is large.\n**Next:** call nookplot_load_skill(name, kind) to fetch full content/payload without installing.",
|
|
13
13
|
category: "skills",
|
|
14
14
|
inputSchema: {
|
|
15
15
|
type: "object",
|
|
16
16
|
properties: {
|
|
17
|
-
query: { type: "string", description: "
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
query: { type: "string", description: "Natural-language search query" },
|
|
18
|
+
k: { type: "number", description: "Max results (default 10, hard cap 50)" },
|
|
19
|
+
kinds: {
|
|
20
|
+
type: "array",
|
|
21
|
+
items: { type: "string", enum: ["mcp_tool", "community", "protocol_skill", "task_bundle"] },
|
|
22
|
+
description: "Restrict to a subset of corpus kinds (default: all four)",
|
|
23
|
+
},
|
|
20
24
|
},
|
|
25
|
+
required: ["query"],
|
|
21
26
|
},
|
|
22
27
|
handler: async (args, ctx) => {
|
|
23
|
-
const params = new URLSearchParams(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (args.
|
|
27
|
-
params.set("
|
|
28
|
-
|
|
28
|
+
const params = new URLSearchParams();
|
|
29
|
+
params.set("q", String(args.query));
|
|
30
|
+
params.set("k", String(args.k ?? 10));
|
|
31
|
+
if (Array.isArray(args.kinds) && args.kinds.length > 0) {
|
|
32
|
+
params.set("kinds", args.kinds.join(","));
|
|
33
|
+
}
|
|
34
|
+
return ctx.get(`/v1/skills/registry/search?${params}`);
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "nookplot_load_skill",
|
|
39
|
+
description: "Read full content and payload of a skill into your context WITHOUT installing it to disk. Use after nookplot_search_skills returns a candidate you want to read more about. To persist a skill across sessions, use nookplot_install_skill instead.",
|
|
40
|
+
category: "skills",
|
|
41
|
+
inputSchema: {
|
|
42
|
+
type: "object",
|
|
43
|
+
properties: {
|
|
44
|
+
name: { type: "string", description: "Skill name (for mcp_tool: tool_name; for community/protocol_skill/task_bundle: slug or name)" },
|
|
45
|
+
kind: {
|
|
46
|
+
type: "string",
|
|
47
|
+
enum: ["mcp_tool", "community", "protocol_skill", "task_bundle"],
|
|
48
|
+
description: "Which corpus this skill belongs to",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
required: ["name", "kind"],
|
|
52
|
+
},
|
|
53
|
+
handler: async (args, ctx) => {
|
|
54
|
+
// Both branches hit the new unified load endpoint (Phase 2c). The
|
|
55
|
+
// gateway resolves slug-or-name and flips skill_utility_signals.used
|
|
56
|
+
// for the matching search-time row (Phase 4b). The mcp_tool branch
|
|
57
|
+
// keeps the older /tool/:tool_name path for backward compat.
|
|
58
|
+
const kind = String(args.kind);
|
|
59
|
+
if (kind === "mcp_tool") {
|
|
60
|
+
return ctx.get(`/v1/skills/registry/tool/${enc(String(args.name))}`);
|
|
61
|
+
}
|
|
62
|
+
return ctx.get(`/v1/skills/registry/load/${enc(kind)}/${enc(String(args.name))}`);
|
|
29
63
|
},
|
|
30
64
|
},
|
|
31
65
|
{
|
package/dist/tools/skills.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/tools/skills.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAG7B,MAAM,CAAC,MAAM,UAAU,GAAc;IACnC;QACE,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/tools/skills.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE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