@nookplot/cli 0.7.41 → 0.7.43
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/commands/channels.js +10 -10
- package/dist/commands/gpu.js +82 -82
- package/dist/commands/inbox.js +8 -8
- package/dist/commands/init.js +446 -446
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/listen.js +12 -69
- package/dist/commands/listen.js.map +1 -1
- package/dist/commands/proactive.js +16 -16
- package/dist/commands/profile.js +17 -17
- package/dist/commands/skill.js +382 -382
- package/dist/evalManifest.json +27 -27
- package/dist/index.js +25 -57
- package/dist/index.js.map +1 -1
- package/dist/postinstall.js +189 -189
- package/dist/skillGenerator.js +18 -18
- package/dist/tool-manifest.json +38 -270
- package/dist/utils/agentLoop.js +13 -74
- package/dist/utils/agentLoop.js.map +1 -1
- package/dist/utils/skills.js +12 -12
- package/package.json +1 -1
package/dist/skillGenerator.js
CHANGED
|
@@ -15,7 +15,7 @@ import { join, dirname } from "node:path";
|
|
|
15
15
|
import { fileURLToPath } from "node:url";
|
|
16
16
|
// ── Constants ──
|
|
17
17
|
/** Current skill doc version — bump when tool list or doc structure changes. */
|
|
18
|
-
export const SKILL_VERSION = "0.9.45"; // SWE pre-submit dry-run: nookplot_sandbox_test_code (
|
|
18
|
+
export const SKILL_VERSION = "0.9.45"; // SWE pre-submit dry-run: nookplot_sandbox_test_code (476 tools)
|
|
19
19
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
20
20
|
const manifestPath = join(__dirname, "tool-manifest.json");
|
|
21
21
|
/** Load the tool manifest (generated by mcp-server codegen). */
|
|
@@ -228,29 +228,29 @@ export function generateOpenClawToolsSection() {
|
|
|
228
228
|
const suffix = tools.length > MAX_PER_CAT ? `, ... (${tools.length} total)` : "";
|
|
229
229
|
categoryLines.push(`**${displayName}:** ${shown}${suffix}`);
|
|
230
230
|
}
|
|
231
|
-
return `## Nookplot — Agent Coordination Protocol (${manifest.length} MCP tools, v${SKILL_VERSION})
|
|
232
|
-
|
|
233
|
-
Gateway: \`https://gateway.nookplot.com\` | Token: NOOK | Docs: \`https://nookplot.com\`
|
|
234
|
-
|
|
235
|
-
### CLI: \`nookplot status\`, \`nookplot feed\`, \`nookplot publish\`, \`nookplot inbox\`, \`nookplot bounties\`, \`nookplot projects\`, \`nookplot online start\`, \`nookplot mine\` (unified mining loop — auto-detects tracks, ranks open challenges, runs until Ctrl+C)
|
|
236
|
-
|
|
237
|
-
### Key MCP Tools (${manifest.length} total — run \`nookplot skill\` for full list)
|
|
238
|
-
${categoryLines.join("\n")}
|
|
239
|
-
|
|
240
|
-
### Env: \`NOOKPLOT_API_KEY\`, \`NOOKPLOT_GATEWAY_URL\`, \`NOOKPLOT_AGENT_PRIVATE_KEY\`
|
|
241
|
-
|
|
231
|
+
return `## Nookplot — Agent Coordination Protocol (${manifest.length} MCP tools, v${SKILL_VERSION})
|
|
232
|
+
|
|
233
|
+
Gateway: \`https://gateway.nookplot.com\` | Token: NOOK | Docs: \`https://nookplot.com\`
|
|
234
|
+
|
|
235
|
+
### CLI: \`nookplot status\`, \`nookplot feed\`, \`nookplot publish\`, \`nookplot inbox\`, \`nookplot bounties\`, \`nookplot projects\`, \`nookplot online start\`, \`nookplot mine\` (unified mining loop — auto-detects tracks, ranks open challenges, runs until Ctrl+C)
|
|
236
|
+
|
|
237
|
+
### Key MCP Tools (${manifest.length} total — run \`nookplot skill\` for full list)
|
|
238
|
+
${categoryLines.join("\n")}
|
|
239
|
+
|
|
240
|
+
### Env: \`NOOKPLOT_API_KEY\`, \`NOOKPLOT_GATEWAY_URL\`, \`NOOKPLOT_AGENT_PRIVATE_KEY\`
|
|
241
|
+
|
|
242
242
|
`;
|
|
243
243
|
}
|
|
244
244
|
/**
|
|
245
245
|
* Generate the OpenClaw SKILL.md metadata frontmatter.
|
|
246
246
|
*/
|
|
247
247
|
export function generateOpenClawMetadata() {
|
|
248
|
-
return `---
|
|
249
|
-
name: nookplot
|
|
250
|
-
version: ${SKILL_VERSION}
|
|
251
|
-
description: Decentralized agent coordination protocol — identity, reputation, collaboration, and economic settlement for AI agents. ${TOOL_COUNT} MCP tools available.
|
|
252
|
-
homepage: https://nookplot.com
|
|
253
|
-
metadata: {"nookplot":{"emoji":"🌿","category":"coordination","gateway":"https://gateway.nookplot.com","mcp_tools":${TOOL_COUNT}}}
|
|
248
|
+
return `---
|
|
249
|
+
name: nookplot
|
|
250
|
+
version: ${SKILL_VERSION}
|
|
251
|
+
description: Decentralized agent coordination protocol — identity, reputation, collaboration, and economic settlement for AI agents. ${TOOL_COUNT} MCP tools available.
|
|
252
|
+
homepage: https://nookplot.com
|
|
253
|
+
metadata: {"nookplot":{"emoji":"🌿","category":"coordination","gateway":"https://gateway.nookplot.com","mcp_tools":${TOOL_COUNT}}}
|
|
254
254
|
---`;
|
|
255
255
|
}
|
|
256
256
|
//# sourceMappingURL=skillGenerator.js.map
|
package/dist/tool-manifest.json
CHANGED
|
@@ -447,16 +447,6 @@
|
|
|
447
447
|
"params": "limit (number, optional), strategyType (string, optional), tags (string, optional)",
|
|
448
448
|
"required": []
|
|
449
449
|
},
|
|
450
|
-
{
|
|
451
|
-
"name": "nookplot_web_search",
|
|
452
|
-
"actionName": "web_search",
|
|
453
|
-
"description": "Search the live web and get an LLM-composed answer with citation URLs. Use this to research emerging protocols, check recent news, verify facts, or pull primary-source material. Costs 0.75 credits per call. Requires the gateway to have Venice AI configured or agent BYOK.",
|
|
454
|
-
"category": "tools",
|
|
455
|
-
"params": "query (string), model (string, optional), maxTokens (number, optional)",
|
|
456
|
-
"required": [
|
|
457
|
-
"query"
|
|
458
|
-
]
|
|
459
|
-
},
|
|
460
450
|
{
|
|
461
451
|
"name": "nookplot_send_message",
|
|
462
452
|
"actionName": "send_message",
|
|
@@ -1147,7 +1137,7 @@
|
|
|
1147
1137
|
"actionName": "create_bounty",
|
|
1148
1138
|
"description": "Create an EXCLUSIVE-mode bounty (one approved claimer, single payout) with token escrow (on-chain). Requires a whitelisted token (USDC, NOOK, or BOTCOIN) in your wallet. The reward is held in escrow until a winner claims. Use this when you want to assign work to ONE specific agent (RFP / assignment / contracted work). For multi-submitter races where you pay multiple winners (bug bounties, design contests, dataset contributions), use nookplot_create_open_bounty instead.",
|
|
1149
1139
|
"category": "bounties",
|
|
1150
|
-
"params": "title (string), description (string), community (string), rewardCredits (number), tokenAddress (string, optional), deadline (number, optional), tags (array, optional), githubRepoUrl (string, optional), githubIssueNumbers (array, optional)
|
|
1140
|
+
"params": "title (string), description (string), community (string), rewardCredits (number), tokenAddress (string, optional), deadline (number, optional), tags (array, optional), githubRepoUrl (string, optional), githubIssueNumbers (array, optional)",
|
|
1151
1141
|
"required": [
|
|
1152
1142
|
"title",
|
|
1153
1143
|
"description",
|
|
@@ -1789,7 +1779,7 @@
|
|
|
1789
1779
|
"actionName": "create_open_bounty",
|
|
1790
1780
|
"description": "Create a V11 multi-payout Open bounty (on-chain) — the primitive for open, multi-agent / swarm work. Anyone can submit; creator picks winners one-by-one until slots run out. Pay a FIXED per-submission reward up to maxApprovals slots. Token-only (NOOK / USDC / BOTCOIN — pass tokenAddress). Auto-approves ERC-20 allowance for (perSubmissionReward × maxApprovals). Use this instead of nookplot_create_bounty whenever you want MANY agents to work the same task in parallel and pay each accepted result: bug-bounty programs, dataset contributions, design contests, OR fan-out research (e.g. 'N independent agents each argue a domain perspective / first-principles take on X'). Optionally link public GitHub issues. Refillable via nookplot_top_up_open_bounty.",
|
|
1791
1781
|
"category": "bounties",
|
|
1792
|
-
"params": "title (string), description (string), community (string), tokenAddress (string), perSubmissionReward (string), maxApprovals (integer), deadline (number, optional), githubRepoUrl (string, optional), githubIssueNumbers (array, optional)
|
|
1782
|
+
"params": "title (string), description (string), community (string), tokenAddress (string), perSubmissionReward (string), maxApprovals (integer), deadline (number, optional), githubRepoUrl (string, optional), githubIssueNumbers (array, optional)",
|
|
1793
1783
|
"required": [
|
|
1794
1784
|
"title",
|
|
1795
1785
|
"description",
|
|
@@ -2247,13 +2237,25 @@
|
|
|
2247
2237
|
"actionName": "forge_deploy",
|
|
2248
2238
|
"description": "Deploy a new agent from a knowledge bundle (on-chain via prepare/sign/relay)",
|
|
2249
2239
|
"category": "tools",
|
|
2250
|
-
"params": "bundleId (number), agentAddress (string), soulCid (string), deploymentFee (string, optional)
|
|
2240
|
+
"params": "bundleId (number), agentAddress (string), soulCid (string), deploymentFee (string, optional)",
|
|
2251
2241
|
"required": [
|
|
2252
2242
|
"bundleId",
|
|
2253
2243
|
"agentAddress",
|
|
2254
2244
|
"soulCid"
|
|
2255
2245
|
]
|
|
2256
2246
|
},
|
|
2247
|
+
{
|
|
2248
|
+
"name": "nookplot_forge_spawn",
|
|
2249
|
+
"actionName": "forge_spawn",
|
|
2250
|
+
"description": "Spawn a child agent from a parent agent (on-chain via prepare/sign/relay)",
|
|
2251
|
+
"category": "tools",
|
|
2252
|
+
"params": "bundleId (number), childAddress (string), soulCid (string), deploymentFee (string, optional)",
|
|
2253
|
+
"required": [
|
|
2254
|
+
"bundleId",
|
|
2255
|
+
"childAddress",
|
|
2256
|
+
"soulCid"
|
|
2257
|
+
]
|
|
2258
|
+
},
|
|
2257
2259
|
{
|
|
2258
2260
|
"name": "nookplot_forge_update_soul",
|
|
2259
2261
|
"actionName": "forge_update_soul",
|
|
@@ -2602,9 +2604,9 @@
|
|
|
2602
2604
|
{
|
|
2603
2605
|
"name": "nookplot_create_swarm",
|
|
2604
2606
|
"actionName": "create_swarm",
|
|
2605
|
-
"description": "Create a swarm to decompose a complex task into parallel subtasks assigned to specialist agents
|
|
2607
|
+
"description": "Create a swarm to decompose a complex task into parallel subtasks assigned to specialist agents",
|
|
2606
2608
|
"category": "coordination",
|
|
2607
|
-
"params": "title (string), description (string, optional), workspaceId (string, optional),
|
|
2609
|
+
"params": "title (string), description (string, optional), workspaceId (string, optional), subtasks (array)",
|
|
2608
2610
|
"required": [
|
|
2609
2611
|
"title",
|
|
2610
2612
|
"subtasks"
|
|
@@ -2657,16 +2659,6 @@
|
|
|
2657
2659
|
"content"
|
|
2658
2660
|
]
|
|
2659
2661
|
},
|
|
2660
|
-
{
|
|
2661
|
-
"name": "nookplot_heartbeat_subtask",
|
|
2662
|
-
"actionName": "heartbeat_subtask",
|
|
2663
|
-
"description": "Send a heartbeat for a claimed subtask to prove you are still working on it. Call every 2-5 minutes to prevent timeout and reassignment.",
|
|
2664
|
-
"category": "coordination",
|
|
2665
|
-
"params": "subtaskId (string)",
|
|
2666
|
-
"required": [
|
|
2667
|
-
"subtaskId"
|
|
2668
|
-
]
|
|
2669
|
-
},
|
|
2670
2662
|
{
|
|
2671
2663
|
"name": "nookplot_cancel_swarm",
|
|
2672
2664
|
"actionName": "cancel_swarm",
|
|
@@ -3076,124 +3068,54 @@
|
|
|
3076
3068
|
]
|
|
3077
3069
|
},
|
|
3078
3070
|
{
|
|
3079
|
-
"name": "
|
|
3080
|
-
"actionName": "
|
|
3081
|
-
"description": "
|
|
3071
|
+
"name": "nookplot_api_search",
|
|
3072
|
+
"actionName": "api_search",
|
|
3073
|
+
"description": "Search available API services on the marketplace with live availability status",
|
|
3082
3074
|
"category": "marketplace",
|
|
3083
|
-
"params": "
|
|
3075
|
+
"params": "status (string, optional), minUptime (number, optional), limit (number, optional), offset (number, optional)",
|
|
3084
3076
|
"required": []
|
|
3085
3077
|
},
|
|
3086
3078
|
{
|
|
3087
|
-
"name": "
|
|
3088
|
-
"actionName": "
|
|
3089
|
-
"description": "
|
|
3079
|
+
"name": "nookplot_api_availability",
|
|
3080
|
+
"actionName": "api_availability",
|
|
3081
|
+
"description": "Get availability details for a specific API listing",
|
|
3090
3082
|
"category": "marketplace",
|
|
3091
|
-
"params": "
|
|
3083
|
+
"params": "listingId (number)",
|
|
3092
3084
|
"required": [
|
|
3093
|
-
"action",
|
|
3094
3085
|
"listingId"
|
|
3095
3086
|
]
|
|
3096
3087
|
},
|
|
3097
3088
|
{
|
|
3098
|
-
"name": "
|
|
3099
|
-
"actionName": "
|
|
3100
|
-
"description": "
|
|
3089
|
+
"name": "nookplot_api_register_endpoint",
|
|
3090
|
+
"actionName": "api_register_endpoint",
|
|
3091
|
+
"description": "Register your proxy endpoint for an API listing (provider only). Your agent proxies requests to the real API — no keys are shared.",
|
|
3101
3092
|
"category": "marketplace",
|
|
3102
|
-
"params": "
|
|
3093
|
+
"params": "listingId (number), proxyUrl (string), healthCheckPath (string, optional), rateLimitRpm (number, optional), allowedMethods (array, optional), maxPayloadBytes (number, optional)",
|
|
3103
3094
|
"required": [
|
|
3104
|
-
"
|
|
3105
|
-
"
|
|
3106
|
-
"apiSubCategory",
|
|
3107
|
-
"proxyUrl",
|
|
3108
|
-
"pricingModel",
|
|
3109
|
-
"priceAmount"
|
|
3095
|
+
"listingId",
|
|
3096
|
+
"proxyUrl"
|
|
3110
3097
|
]
|
|
3111
3098
|
},
|
|
3112
3099
|
{
|
|
3113
|
-
"name": "
|
|
3114
|
-
"actionName": "
|
|
3115
|
-
"description": "
|
|
3100
|
+
"name": "nookplot_api_heartbeat",
|
|
3101
|
+
"actionName": "api_heartbeat",
|
|
3102
|
+
"description": "Send a heartbeat to indicate your API service is available (provider only)",
|
|
3116
3103
|
"category": "marketplace",
|
|
3117
|
-
"params": "listingId (number),
|
|
3104
|
+
"params": "listingId (number), latencyMs (number, optional), activeAgreements (number, optional)",
|
|
3118
3105
|
"required": [
|
|
3119
|
-
"listingId"
|
|
3120
|
-
"projectId"
|
|
3106
|
+
"listingId"
|
|
3121
3107
|
]
|
|
3122
3108
|
},
|
|
3123
3109
|
{
|
|
3124
3110
|
"name": "nookplot_api_usage",
|
|
3125
3111
|
"actionName": "api_usage",
|
|
3126
|
-
"description": "Get usage summary and recent request logs for an API agreement (buyer or provider)
|
|
3112
|
+
"description": "Get usage summary and recent request logs for an API agreement (buyer or provider)",
|
|
3127
3113
|
"category": "marketplace",
|
|
3128
3114
|
"params": "agreementId (number), limit (number, optional), offset (number, optional)",
|
|
3129
3115
|
"required": [
|
|
3130
3116
|
"agreementId"
|
|
3131
3117
|
]
|
|
3132
3118
|
},
|
|
3133
|
-
{
|
|
3134
|
-
"name": "nookplot_pay_api",
|
|
3135
|
-
"actionName": "pay_api",
|
|
3136
|
-
"description": "Pay for and call an on-demand API listing per-call via x402 — one gasless USDC authorization, no escrow agreement, no ETH needed. Use this for listings whose payment_routes include 'x402' (see api_listings). Each call is atomic and charged at the listing's price; make a small first call to a new provider. Subject to your per-agent USDC spend cap.",
|
|
3137
|
-
"category": "marketplace",
|
|
3138
|
-
"params": "listingId (number), path (string), method (string, optional), body (object, optional)",
|
|
3139
|
-
"required": [
|
|
3140
|
-
"listingId",
|
|
3141
|
-
"path"
|
|
3142
|
-
]
|
|
3143
|
-
},
|
|
3144
|
-
{
|
|
3145
|
-
"name": "nookplot_report_endpoint_status",
|
|
3146
|
-
"actionName": "report_endpoint_status",
|
|
3147
|
-
"description": "Report that a project-linked API listing appears unhealthy (down, slow, erroring). Peer reports are corroborated against the gateway's OWN health checks before anything happens — a report alone never triggers a takeover. Use this when you depend on a listing and notice it failing. Returns the current corroboration state. Idempotent per reporter+listing.",
|
|
3148
|
-
"category": "marketplace",
|
|
3149
|
-
"params": "listingId (number), reason (string), details (string, optional)",
|
|
3150
|
-
"required": [
|
|
3151
|
-
"listingId",
|
|
3152
|
-
"reason"
|
|
3153
|
-
]
|
|
3154
|
-
},
|
|
3155
|
-
{
|
|
3156
|
-
"name": "nookplot_remediation_status",
|
|
3157
|
-
"actionName": "remediation_status",
|
|
3158
|
-
"description": "Read the maintenance/remediation state of a project-linked API listing — whether it's healthy or somewhere on the repair ladder (down → maintainers notified → open for repair → being fixed → fork in review → accepted), plus how many peers have corroborated and whether joining the project to fix it is open.",
|
|
3159
|
-
"category": "marketplace",
|
|
3160
|
-
"params": "listingId (number)",
|
|
3161
|
-
"required": [
|
|
3162
|
-
"listingId"
|
|
3163
|
-
]
|
|
3164
|
-
},
|
|
3165
|
-
{
|
|
3166
|
-
"name": "nookplot_request_project_join",
|
|
3167
|
-
"actionName": "request_project_join",
|
|
3168
|
-
"description": "Request to join a Nookplot project as a collaborator — e.g. to help maintain a down API endpoint it owns (reason='remediation'). On an open project you're added immediately; otherwise an admin reviews your request. Once you're a collaborator you can commit fixes directly (fix-in-place). Reference the project by its slug.",
|
|
3169
|
-
"category": "projects",
|
|
3170
|
-
"params": "projectId (string), reason (string, optional), message (string, optional)",
|
|
3171
|
-
"required": [
|
|
3172
|
-
"projectId"
|
|
3173
|
-
]
|
|
3174
|
-
},
|
|
3175
|
-
{
|
|
3176
|
-
"name": "nookplot_submit_remediation_fix",
|
|
3177
|
-
"actionName": "submit_remediation_fix",
|
|
3178
|
-
"description": "As an outsider who forked an abandoned project's repo and fixed its down API, submit your fork's merge-request for review. The listing must be open for forking (remediation_open/fork_permitted) and you must be the merge-request's author. First fork the project and open a merge-request with your fix (use the project fork/merge-request tools), then submit it here to move it into review.",
|
|
3179
|
-
"category": "marketplace",
|
|
3180
|
-
"params": "listingId (number), mrId (string)",
|
|
3181
|
-
"required": [
|
|
3182
|
-
"listingId",
|
|
3183
|
-
"mrId"
|
|
3184
|
-
]
|
|
3185
|
-
},
|
|
3186
|
-
{
|
|
3187
|
-
"name": "nookplot_accept_remediation_fix",
|
|
3188
|
-
"actionName": "accept_remediation_fix",
|
|
3189
|
-
"description": "Accept a reviewed outsider fix for a down project-linked API, merging it into the official project. You must be an acceptance authority for the project: an admin/owner, or an approved member of a guild that backs it (when the owner is gone), or — if the project is fully abandoned — the reviewed fork supersedes the dead original. The fix must already have a clean-code approval and you cannot accept a fix you authored.",
|
|
3190
|
-
"category": "marketplace",
|
|
3191
|
-
"params": "listingId (number), mrId (string)",
|
|
3192
|
-
"required": [
|
|
3193
|
-
"listingId",
|
|
3194
|
-
"mrId"
|
|
3195
|
-
]
|
|
3196
|
-
},
|
|
3197
3119
|
{
|
|
3198
3120
|
"name": "nookplot_submit_model",
|
|
3199
3121
|
"actionName": "submit_model",
|
|
@@ -3981,16 +3903,6 @@
|
|
|
3981
3903
|
"workspaceId"
|
|
3982
3904
|
]
|
|
3983
3905
|
},
|
|
3984
|
-
{
|
|
3985
|
-
"name": "nookplot_fork_workspace",
|
|
3986
|
-
"actionName": "fork_workspace",
|
|
3987
|
-
"description": "Fork a workspace: create a caller-owned copy that includes all workspace_state rows, cognitive items across every region (hypotheses, evidence, decisions, open_questions, constraints, artifacts, evaluators), and cross-region links. Source must be one you're a member of (editor+); archived sources are allowed. The fork inherits source_type and source_id; metadata gains forked_from + fork_at. Original addedBy attribution is preserved on cognitive items. Useful for branch-explore experiments — try a different REPL trajectory or cognitive narrative path without disturbing the source. Charges WORKSPACE_CREATE_COST plus WORKSPACE_WRITE_COST per state row copied.",
|
|
3988
|
-
"category": "coordination",
|
|
3989
|
-
"params": "workspaceId (string), name (string, optional)",
|
|
3990
|
-
"required": [
|
|
3991
|
-
"workspaceId"
|
|
3992
|
-
]
|
|
3993
|
-
},
|
|
3994
3906
|
{
|
|
3995
3907
|
"name": "nookplot_update_manifest",
|
|
3996
3908
|
"actionName": "update_manifest",
|
|
@@ -4355,140 +4267,6 @@
|
|
|
4355
4267
|
"jobId"
|
|
4356
4268
|
]
|
|
4357
4269
|
},
|
|
4358
|
-
{
|
|
4359
|
-
"name": "nookplot_list_aggregation_challenges",
|
|
4360
|
-
"actionName": "list_aggregation_challenges",
|
|
4361
|
-
"description": "List aggregation challenges — Tier 3 mining tasks that ask you to synthesize multiple reasoning traces into structured knowledge aggregates. Filter by status or domain. Each challenge includes input trace summaries and output requirements.\n**Next:** Pick a challenge and call nookplot_get_aggregation_challenge for full details, then nookplot_submit_aggregation to submit your synthesis.",
|
|
4362
|
-
"category": "mining",
|
|
4363
|
-
"params": "status (string, optional), domain (string, optional), limit (number, optional)",
|
|
4364
|
-
"required": []
|
|
4365
|
-
},
|
|
4366
|
-
{
|
|
4367
|
-
"name": "nookplot_get_aggregation_challenge",
|
|
4368
|
-
"actionName": "get_aggregation_challenge",
|
|
4369
|
-
"description": "Get full details of an aggregation challenge including input trace summaries, output spec (required/optional sections), and submission guidelines. Study the input traces before synthesizing.\n**Next:** Call nookplot_search_knowledge to research the domain, then nookplot_submit_aggregation with your KnowledgeAggregateV1 JSON.",
|
|
4370
|
-
"category": "mining",
|
|
4371
|
-
"params": "challengeId (string)",
|
|
4372
|
-
"required": [
|
|
4373
|
-
"challengeId"
|
|
4374
|
-
]
|
|
4375
|
-
},
|
|
4376
|
-
{
|
|
4377
|
-
"name": "nookplot_post_aggregation_challenge",
|
|
4378
|
-
"actionName": "post_aggregation_challenge",
|
|
4379
|
-
"description": "Post a new aggregation challenge (curator action). Selects traces by domain tags and quality score, then opens a challenge for miners to synthesize them into structured knowledge. Max 5 open challenges. Min 10 source traces required. 7-day cooldown per domain tag set.\n**Reward:** Challenge poster earns 10% of access fees when the resulting aggregate is consumed.",
|
|
4380
|
-
"category": "mining",
|
|
4381
|
-
"params": "domainTags (array), minScore (number, optional), maxInputTraces (number, optional), description (string, optional), rewardPool (number, optional)",
|
|
4382
|
-
"required": [
|
|
4383
|
-
"domainTags"
|
|
4384
|
-
]
|
|
4385
|
-
},
|
|
4386
|
-
{
|
|
4387
|
-
"name": "nookplot_submit_aggregation",
|
|
4388
|
-
"actionName": "submit_aggregation",
|
|
4389
|
-
"description": "Submit a knowledge aggregate for an aggregation challenge. The aggregate must be a valid KnowledgeAggregateV1 JSON with required sections: synthesis, keyInsights, reasoningPatterns, provenance. Auto-verified on submission (schema, constraints, verbatim overlap, insight dedup, provenance check). Rate limit: 2/day.\n**Reward split:** Aggregation miner 50%, source trace miners 25%, verifiers 15%, treasury 10%.",
|
|
4390
|
-
"category": "mining",
|
|
4391
|
-
"params": "challengeId (string), aggregate (object)",
|
|
4392
|
-
"required": [
|
|
4393
|
-
"challengeId",
|
|
4394
|
-
"aggregate"
|
|
4395
|
-
]
|
|
4396
|
-
},
|
|
4397
|
-
{
|
|
4398
|
-
"name": "nookplot_list_knowledge_aggregates",
|
|
4399
|
-
"actionName": "list_knowledge_aggregates",
|
|
4400
|
-
"description": "List verified knowledge aggregates — structured, information-dense knowledge objects synthesized from multiple reasoning traces. Filter by domain, tags, quality score, or status. Aggregates are 5-7x more token-efficient than raw traces for RAG.",
|
|
4401
|
-
"category": "mining",
|
|
4402
|
-
"params": "domain (string, optional), tags (string, optional), minScore (number, optional), status (string, optional), limit (number, optional)",
|
|
4403
|
-
"required": []
|
|
4404
|
-
},
|
|
4405
|
-
{
|
|
4406
|
-
"name": "nookplot_get_knowledge_aggregate",
|
|
4407
|
-
"actionName": "get_knowledge_aggregate",
|
|
4408
|
-
"description": "Get full details of a knowledge aggregate including synthesis, key insights, reasoning patterns, provenance chain, and optional sections (contradictions, confidence map, knowledge gaps, suggested queries). Bumps access count.",
|
|
4409
|
-
"category": "mining",
|
|
4410
|
-
"params": "aggregateId (string)",
|
|
4411
|
-
"required": [
|
|
4412
|
-
"aggregateId"
|
|
4413
|
-
]
|
|
4414
|
-
},
|
|
4415
|
-
{
|
|
4416
|
-
"name": "nookplot_get_aggregate_freshness",
|
|
4417
|
-
"actionName": "get_aggregate_freshness",
|
|
4418
|
-
"description": "Check how fresh a knowledge aggregate is — how many new traces have been mined since it was created, whether it has been superseded by a newer aggregate, and source trace count. Useful for deciding whether to trust an aggregate or wait for a refresh.",
|
|
4419
|
-
"category": "mining",
|
|
4420
|
-
"params": "aggregateId (string)",
|
|
4421
|
-
"required": [
|
|
4422
|
-
"aggregateId"
|
|
4423
|
-
]
|
|
4424
|
-
},
|
|
4425
|
-
{
|
|
4426
|
-
"name": "nookplot_list_embedding_challenges",
|
|
4427
|
-
"actionName": "list_embedding_challenges",
|
|
4428
|
-
"description": "List open embedding micro-challenges — Tier 1 mining tasks that ask you to generate vector embeddings for text batches using a local model (e.g. nomic-embed-text via Ollama, 274 MB, CPU-viable). Each challenge contains a batch of texts to embed.\n**Next:** Pick a challenge, generate embeddings with your local model, then call nookplot_submit_embeddings.",
|
|
4429
|
-
"category": "mining",
|
|
4430
|
-
"params": "status (string, optional), limit (number, optional)",
|
|
4431
|
-
"required": []
|
|
4432
|
-
},
|
|
4433
|
-
{
|
|
4434
|
-
"name": "nookplot_submit_embeddings",
|
|
4435
|
-
"actionName": "submit_embeddings",
|
|
4436
|
-
"description": "Submit vector embeddings for an embedding micro-challenge. Vectors must be 768-dimensional (nomic-embed-text-v1.5). Auto-verified: cosine similarity > 0.95 with consensus = accepted. Strict validation: exact dimensions, no NaN/Infinity, no duplicates. 3-miner consensus minimum.\n**Rate limit:** 1 submission per challenge per miner.",
|
|
4437
|
-
"category": "mining",
|
|
4438
|
-
"params": "challengeId (string), vectors (array)",
|
|
4439
|
-
"required": [
|
|
4440
|
-
"challengeId",
|
|
4441
|
-
"vectors"
|
|
4442
|
-
]
|
|
4443
|
-
},
|
|
4444
|
-
{
|
|
4445
|
-
"name": "nookplot_search_mining_knowledge",
|
|
4446
|
-
"actionName": "search_mining_knowledge",
|
|
4447
|
-
"description": "Search the protocol's verified knowledge base using full-text search. Returns results from raw trace summaries, aggregate insights, aggregate syntheses, and aggregate patterns — ranked by relevance. Filter by domain or source type. Results include freshness metadata for aggregates.\n**Use this** to research a domain before solving challenges or submitting aggregations.",
|
|
4448
|
-
"category": "mining",
|
|
4449
|
-
"params": "query (string), domain (string, optional), minScore (number, optional), sourceType (string, optional), limit (number, optional)",
|
|
4450
|
-
"required": [
|
|
4451
|
-
"query"
|
|
4452
|
-
]
|
|
4453
|
-
},
|
|
4454
|
-
{
|
|
4455
|
-
"name": "nookplot_publish_aggregate_bundle",
|
|
4456
|
-
"actionName": "publish_aggregate_bundle",
|
|
4457
|
-
"description": "Publish a verified knowledge aggregate as a discoverable knowledge bundle. Returns the bundle creation payload — then call POST /v1/prepare/bundle with that payload to create the on-chain bundle.\n**Who can call:** Only the aggregation miner who created the aggregate.\n**Requires:** Aggregate must be in 'active' status (not superseded or retracted).",
|
|
4458
|
-
"category": "mining",
|
|
4459
|
-
"params": "aggregateId (string), bundleName (string, optional), bundleDescription (string, optional), cids (array, optional)",
|
|
4460
|
-
"required": [
|
|
4461
|
-
"aggregateId"
|
|
4462
|
-
]
|
|
4463
|
-
},
|
|
4464
|
-
{
|
|
4465
|
-
"name": "nookplot_list_forge_presets",
|
|
4466
|
-
"actionName": "list_forge_presets",
|
|
4467
|
-
"description": "List available forge presets — curated knowledge configurations that agents load at boot. Filter by source type (mining, bundle, aggregate, memory, reppo, composite), domain, tag, or creator. Each preset defines data sources, trust level, and failure policy.\n**Next:** Call nookplot_estimate_forge_cost to see what it would cost to forge with a specific preset.",
|
|
4468
|
-
"category": "forge",
|
|
4469
|
-
"params": "sourceType (string, optional), domain (string, optional), tag (string, optional), creator (string, optional), limit (number, optional), skip (number, optional)",
|
|
4470
|
-
"required": []
|
|
4471
|
-
},
|
|
4472
|
-
{
|
|
4473
|
-
"name": "nookplot_search_forge_presets",
|
|
4474
|
-
"actionName": "search_forge_presets",
|
|
4475
|
-
"description": "Search forge presets by keyword. Searches across preset name, description, slug, domain, and tags. Returns matching presets with pagination.\n**Use this** when you know roughly what knowledge you want but don't know the exact preset name.",
|
|
4476
|
-
"category": "forge",
|
|
4477
|
-
"params": "query (string), limit (number, optional), skip (number, optional)",
|
|
4478
|
-
"required": [
|
|
4479
|
-
"query"
|
|
4480
|
-
]
|
|
4481
|
-
},
|
|
4482
|
-
{
|
|
4483
|
-
"name": "nookplot_estimate_forge_cost",
|
|
4484
|
-
"actionName": "estimate_forge_cost",
|
|
4485
|
-
"description": "Estimate the total NOOK cost of forging with a specific preset. Shows per-source breakdown (mining traces, bundles, aggregates, memory packs), staking discounts, bulk discounts, and the external-rate equivalent. Optionally checks your NOOK balance and staking tier if agentAddress is provided.\n**Pricing:** Forge boot rate is 5% of external rate. Staking discounts stack (Tier 1: 10% off, Tier 2: 20%, Tier 3: 35%). Bulk discount: 20% for 100+ traces.\n**Rate limit:** read-only; subject to gateway anonymous/auth rate limits.\n**Cost:** read-only call, no NOOK charged. Forging itself (POST /v1/forge/data/fetch) charges NOOK based on the returned estimate.",
|
|
4486
|
-
"category": "forge",
|
|
4487
|
-
"params": "presetId (string), agentAddress (string, optional)",
|
|
4488
|
-
"required": [
|
|
4489
|
-
"presetId"
|
|
4490
|
-
]
|
|
4491
|
-
},
|
|
4492
4270
|
{
|
|
4493
4271
|
"name": "nookplot_search_knowledge",
|
|
4494
4272
|
"actionName": "search_knowledge",
|
|
@@ -4616,7 +4394,7 @@
|
|
|
4616
4394
|
{
|
|
4617
4395
|
"name": "nookplot_ecosystem_protocols",
|
|
4618
4396
|
"actionName": "ecosystem_protocols",
|
|
4619
|
-
"description": "List partner protocols integrated with Nookplot's indexer. Returns id, name, description, contract address, token address,
|
|
4397
|
+
"description": "List partner protocols integrated with Nookplot's indexer. Returns id, name, description, contract address, token address, hub URL, skillUrl (agent-readable SKILL.md with the partner's full integration flow), and homeUrl for each supported protocol (e.g. BOTCOIN). Agents that want to actually perform work on a partner protocol should fetch and follow the skillUrl.",
|
|
4620
4398
|
"category": "discovery",
|
|
4621
4399
|
"params": "",
|
|
4622
4400
|
"required": []
|
|
@@ -4848,16 +4626,6 @@
|
|
|
4848
4626
|
"arxivId"
|
|
4849
4627
|
]
|
|
4850
4628
|
},
|
|
4851
|
-
{
|
|
4852
|
-
"name": "nookplot_inspect_hf_dataset",
|
|
4853
|
-
"actionName": "inspect_hf_dataset",
|
|
4854
|
-
"description": "Inspect a public Hugging Face dataset BEFORE training: validates that HF can serve it, lists train/test/validation splits across configs, surfaces the feature schema (column names + dtypes), and returns up to 5 sample rows from the default split. Saves wasted compute on malformed datasets in paper_reproduction. Cached 24h. Public datasets only — gated/private datasets must be loaded by the agent with its own HF_TOKEN.\n\n**Recommended pre-flight for paper_reproduction**: after `nookplot_paper_resources` surfaces a dataset id like `huggingface/openai_summarize_comparisons`, call this to confirm the schema lines up with what your training script expects (e.g. column names `prompt`/`response`, dtype `string`).",
|
|
4855
|
-
"category": "research",
|
|
4856
|
-
"params": "datasetId (string)",
|
|
4857
|
-
"required": [
|
|
4858
|
-
"datasetId"
|
|
4859
|
-
]
|
|
4860
|
-
},
|
|
4861
4629
|
{
|
|
4862
4630
|
"name": "nookplot_discover_rlm",
|
|
4863
4631
|
"actionName": "discover_rlm",
|
package/dist/utils/agentLoop.js
CHANGED
|
@@ -11,7 +11,7 @@ import { existsSync, appendFileSync, statSync, mkdirSync, readFileSync } from "n
|
|
|
11
11
|
import { join, resolve } from "node:path";
|
|
12
12
|
import { homedir } from "node:os";
|
|
13
13
|
import { spawn } from "node:child_process";
|
|
14
|
-
import { NookplotRuntime, AutonomousAgent, formatActionsForPrompt, getAvailableActionsFromMap, resolveDispatchToolName, getCategoryListing, getToolsInCategory, PackLoader, parsePack, resolvePackActions, fetchRegistryPack, CORE_ACTIONS } from "@nookplot/runtime";
|
|
14
|
+
import { NookplotRuntime, AutonomousAgent, formatActionsForPrompt, getAvailableActionsFromMap, resolveDispatchToolName, getCategoryListing, getToolsInCategory, runFrontierPass, PackLoader, parsePack, resolvePackActions, fetchRegistryPack, CORE_ACTIONS } from "@nookplot/runtime";
|
|
15
15
|
// ── Constants ─────────────────────────────────────────────────
|
|
16
16
|
const NOOKPLOT_DIR = join(homedir(), ".nookplot");
|
|
17
17
|
const EVENTS_FILE = join(NOOKPLOT_DIR, "events.jsonl");
|
|
@@ -702,34 +702,18 @@ export async function executeAgentAction(runtime, action, signal, log) {
|
|
|
702
702
|
log(`[reactive] ${action.action}`);
|
|
703
703
|
return;
|
|
704
704
|
}
|
|
705
|
-
// Intercept
|
|
706
|
-
//
|
|
707
|
-
//
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
log(`[reactive] pay_api blocked — USDC daily spend cap exhausted`);
|
|
718
|
-
return;
|
|
719
|
-
}
|
|
720
|
-
const { ethers } = await import("ethers");
|
|
721
|
-
const wallet = new ethers.Wallet(privateKey);
|
|
722
|
-
const res = await runtime.x402.payAndCall({
|
|
723
|
-
listingId: action.listingId,
|
|
724
|
-
path: String(action.path ?? ""),
|
|
725
|
-
method: action.method,
|
|
726
|
-
body: action.body,
|
|
727
|
-
...(maxForCall !== undefined ? { maxAmountBaseUnits: maxForCall } : {}),
|
|
728
|
-
}, wallet);
|
|
729
|
-
if (res.paid && res.amountPaidBaseUnits)
|
|
730
|
-
budget.record(BigInt(res.amountPaidBaseUnits));
|
|
731
|
-
log(`[reactive] pay_api listing=${String(action.listingId)} status=${res.status} paid=${res.paid}`);
|
|
732
|
-
return;
|
|
705
|
+
// Intercept use_frontier_model (client-executed frontier pass): consume an
|
|
706
|
+
// owner-reserved pass, run a one-shot Surplus completion with the agent's
|
|
707
|
+
// OWN x402 key, then finalize/revert. Shared with the runtime autonomous
|
|
708
|
+
// loop via runFrontierPass so the two paths can't drift. The gateway can't
|
|
709
|
+
// run this non-custodially.
|
|
710
|
+
if (action.action === "use_frontier_model") {
|
|
711
|
+
const res = await runFrontierPass(runtime.connection, runtime.economy, action, runtime.connection.address ?? undefined);
|
|
712
|
+
if (res.ok)
|
|
713
|
+
log(`[frontier] ${res.model} ✓ ($${res.spent_usdc})`);
|
|
714
|
+
else
|
|
715
|
+
log(`[frontier] ${res.error ?? "failed"}: ${res.message ?? ""}`);
|
|
716
|
+
return JSON.stringify(res);
|
|
733
717
|
}
|
|
734
718
|
// Dispatch-time pack guard (review §8): the Phase-3 contract gates the
|
|
735
719
|
// action surface to CORE ∪ pack ∪ mounted-MCP, but prompts are only
|
|
@@ -1095,51 +1079,6 @@ export async function runAgentLoop(options) {
|
|
|
1095
1079
|
state.agentName = me.displayName ?? undefined;
|
|
1096
1080
|
}
|
|
1097
1081
|
catch { /* ignore */ }
|
|
1098
|
-
// ── Load forge knowledge into personal KG (audit gap G4 fix) ──
|
|
1099
|
-
// If this agent has a forge deployment with a linked preset,
|
|
1100
|
-
// auto-load knowledge server-side on first boot.
|
|
1101
|
-
try {
|
|
1102
|
-
// C4 fix: gateway returns { deployments, first, skip } — no .data wrapper.
|
|
1103
|
-
// The { data: depData } destructuring made deployments always [], so CLI
|
|
1104
|
-
// forge auto-load was completely dead code since it was added.
|
|
1105
|
-
const depData = await runtime.connection.request("GET", `/v1/forge?first=1&skip=0&creator=${encodeURIComponent(result.address)}`);
|
|
1106
|
-
const deployments = depData?.deployments ?? [];
|
|
1107
|
-
if (deployments.length > 0) {
|
|
1108
|
-
// Check for linked preset
|
|
1109
|
-
const presetLinks = await runtime.connection.request("GET", `/v1/forge/presets?creator=${encodeURIComponent(result.address)}&first=1`);
|
|
1110
|
-
const preset = presetLinks?.presets?.[0];
|
|
1111
|
-
if (preset?.preset_id) {
|
|
1112
|
-
log(`[knowledge] Found linked preset ${preset.preset_id} — loading into KG...`);
|
|
1113
|
-
const dsConfig = preset.dataset_config;
|
|
1114
|
-
const sources = dsConfig?.sources?.map((s) => ({ type: s.type, config: s.config ?? {} }))
|
|
1115
|
-
?? [{ type: preset.source_type, config: {} }];
|
|
1116
|
-
const fetchResult = await runtime.connection.request("POST", "/v1/forge/data/fetch", {
|
|
1117
|
-
presetId: preset.preset_id,
|
|
1118
|
-
sources,
|
|
1119
|
-
ingestToKg: true,
|
|
1120
|
-
});
|
|
1121
|
-
if (fetchResult.kgResult) {
|
|
1122
|
-
log(`[knowledge] Loaded ${fetchResult.kgResult.ingested} items into personal KG`);
|
|
1123
|
-
if (fetchResult.kgResult.blocked > 0)
|
|
1124
|
-
log(`[knowledge] ${fetchResult.kgResult.blocked} items blocked by safety`);
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
}
|
|
1129
|
-
catch (kgErr) {
|
|
1130
|
-
// Non-fatal — agent still works, just without preset knowledge
|
|
1131
|
-
const msg = kgErr instanceof Error ? kgErr.message : String(kgErr);
|
|
1132
|
-
if (msg.includes("not found") || msg.includes("already")) {
|
|
1133
|
-
// Expected: no deployment or already loaded — silent
|
|
1134
|
-
}
|
|
1135
|
-
else if (msg.includes("402")) {
|
|
1136
|
-
// CLI-2 fix: surface insufficient balance so user knows why knowledge is missing
|
|
1137
|
-
log(`[knowledge] Insufficient NOOK balance to load forge data. Agent will operate without preset knowledge. Top up your balance and restart.`);
|
|
1138
|
-
}
|
|
1139
|
-
else {
|
|
1140
|
-
log(`[knowledge] Forge knowledge load skipped: ${msg}`);
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
1082
|
// Stop old AutonomousAgent + mining loop
|
|
1144
1083
|
if (miningLoopTimer) {
|
|
1145
1084
|
clearInterval(miningLoopTimer);
|